rust/src/etc
bors b358319353 Auto merge of #33612 - royalstream:royalstream-enc-enum-ptr, r=michaelwoerister
gdb Pretty Print: generic encoded was failing on reference/pointer types

If you debug this program using **gdb**
```rust
fn main() {
    let x = 10;
    let y = Some(&x);
    // additional code
}
```
And you try to print **y**'s value from the debugger, you get the following:
```
(gdb) print y
Python Exception <class 'gdb.error'> Cannot convert value to int.:
$1 = {RUST$ENCODED$ENUM$0$None = Some = {0x7fff5fbff97c}}
```
What happens is that inside **debugger_pretty_printers_common.py** the method `is_null_variant` doesn't have any special handling for pointer values so it ends up calling `.as_integer()` on `discriminant_val` (which holds a pointer) and fails.

Considering it needs to handle pointers and return _true_ when the pointer is _null_, I modified the `.as_integer()` method in **gdb_rust_pretty_printing.py** to take pointers into consideration.

After this modification **gdb** prints **y** like this:
```
(gdb) print y
$1 = Some = {0x7fff5fbff97c}
```
Now, it would be nice to print something useful (instead of a pointer address) but the pretty printer doesn't currently handle references/pointers so that's a completely different subject.
2016-05-15 05:26:50 -07:00
..
platform-intrinsics rustc_platform_intrinsics: remove unused rustc dependency. 2016-03-29 19:36:01 +03:00
test-float-parse drive-by doc fixes 2016-02-04 16:28:08 +01:00
third-party Strip all leading/trailing newlines 2015-03-15 09:08:21 -07:00
adb_run_wrapper.sh Add one more depth on android test directory for multiple targets 2015-02-10 21:53:31 +09:00
apple-darwin.supp update valgrind suppressions 2015-12-25 15:46:36 -05:00
check-sanitycheck.py Fix platform detection 2015-06-01 20:50:35 +03:00
check-summary.py etc: py3 compat for check-summary.py 2015-05-24 05:12:40 -07:00
CONFIGS.md remove broken config 2016-03-24 17:27:15 -04:00
ctags.rust Update the ctags rules and targets. 2015-07-30 06:35:42 +10:00
debugger_pretty_printers_common.py fix pretty printers to handle new Vec 2015-07-17 10:43:58 -07:00
dec2flt_table.py Speed up dec2flt fast path with additional tables. 2016-01-12 22:25:16 +01:00
gdb_load_rust_pretty_printers.py debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
gdb_rust_pretty_printing.py Generic encoded enums no longer crash on reference/pointer types 2016-05-12 22:01:49 -06:00
generate-deriving-span-tests.py Remove #[derive(Show)] 2015-10-18 19:12:09 +03:00
generate-keyword-tests.py Fix keyword parsing tests 2016-04-24 21:35:50 +03:00
get-stage0.py mk: Bootstrap from stable instead of snapshots 2016-04-19 10:56:49 -07:00
htmldocck.py Only record the same impl once 2016-04-22 19:10:30 +02:00
indenter Port indenter to python 2015-01-16 08:49:54 -08:00
lldb_batchmode.py etc: Add debugger.Terminate() to lldb_batchmode.py 2016-04-19 09:39:04 -07:00
lldb_rust_formatters.py debuginfo: Create common debugger pretty printer module. 2015-05-30 20:06:08 +02:00
local_stage0.sh Copy more libraries from local Rust to stage0 2016-05-10 15:12:19 +10:00
make-win-dist.py Make sure rsbegin.o and rsend.o get packaged with target lib artifacts. 2015-11-07 17:56:55 -08:00
mklldeps.py Better support for --llvm-root. 2015-12-13 15:05:43 -06:00
rust-gdb debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty printers enabled. 2014-12-30 17:26:13 +01:00
rust-lldb rustc: Start "stabilizing" some flags 2014-12-19 11:38:24 -08:00
sugarise-doc-comments.py Fix PEP8 in sugarise-doc-comments 2015-01-27 01:26:02 -08:00
unicode.py libsyntax: accept only whitespace with the PATTERN_WHITE_SPACE property 2016-01-16 00:57:12 +00:00
x86.supp update valgrind suppressions 2015-12-25 15:46:36 -05:00
ziggurat_tables.py std: Move rand to librand. 2014-03-12 11:31:05 +11:00