aboutsummaryrefslogtreecommitdiff
path: root/gdb/maint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-08-10 05:21:06 -0600
committerTom Tromey <tromey@adacore.com>2020-09-02 11:30:51 -0600
commit02c6f3f1fc2af7ad02bc649f0adfb479bf163441 (patch)
treebd8d8af76bc483e61c5c330f3cf106a752c8281f /gdb/maint.c
parent7c80dd4c2cc080036b95176bcf35bb6f46355598 (diff)
downloadfsf-binutils-gdb-02c6f3f1fc2af7ad02bc649f0adfb479bf163441.zip
fsf-binutils-gdb-02c6f3f1fc2af7ad02bc649f0adfb479bf163441.tar.gz
fsf-binutils-gdb-02c6f3f1fc2af7ad02bc649f0adfb479bf163441.tar.bz2
Do not auto-dereference null pointers in Ada MI varobj
The Ada varobj code automatically dereferences access types. This is often handy, but it also does so for null pointers -- showing children with empty values. These children are weird, but even weirder when a variant type is involved, because only the non-varying parts of the type are displayed. This behavior conflicts a bit with my ongoing quest to move the Ada code to use DWARF rather than gnat encodings, in that reproducing this behavior with the DWARF code seems rather hacky. So, this patch instead changes the Ada varobj code so that it does not automatically dereference null pointers. As this patch only affects Ada, and it was already reviewed internally by Joel, I am checking it in. 2020-09-02 Tom Tromey <tromey@adacore.com> * ada-varobj.c (ada_varobj_get_ptr_number_of_children): Return 0 for null pointers. (ada_varobj_adjust_for_child_access): Special-case null pointers. gdb/testsuite/ChangeLog 2020-09-02 Tom Tromey <tromey@adacore.com> * gdb.ada/mi_var_access.exp: Test children of access variable. * gdb.ada/mi_var_access/mi_access.adb: Add new stop markers. * gdb.ada/mi_var_array.exp: Update.
Diffstat (limited to 'gdb/maint.c')
0 files changed, 0 insertions, 0 deletions