9e87a40907
Trying to print a variable defined as an access to an unconstrained array: type String_Access is access String; S1 : String_Access; If that variable is null, then GDB prints its value in an odd way: (gdb) print S1 $1 = (string_bug.string_access) (null) ^^^^^^ This patch changes the debugger behavior to print the pointer using the same output we'd use for any null pointer: (gdb) print S1 $1 = (string_bug.string_access) 0x0 It also adds an assert, helping us verify an assumption. gdb/ChangeLog: * ada-valprint.c (ada_val_print_1): Print null array pointers as `0x0' rather than `(null)'. Add assertion. gdb/testsuite/ChangeLog: * gdb.ada/arrayptr/foo.adb: Add new local variable Null_String. * gdb.ada/arrayptr.exp: Add test printing that new variable. |
||
---|---|---|
.. | ||
config | ||
gdb.ada | ||
gdb.arch | ||
gdb.asm | ||
gdb.base | ||
gdb.cell | ||
gdb.cp | ||
gdb.disasm | ||
gdb.dwarf2 | ||
gdb.fortran | ||
gdb.gdb | ||
gdb.hp | ||
gdb.java | ||
gdb.mi | ||
gdb.modula2 | ||
gdb.multi | ||
gdb.objc | ||
gdb.opencl | ||
gdb.opt | ||
gdb.pascal | ||
gdb.python | ||
gdb.reverse | ||
gdb.server | ||
gdb.stabs | ||
gdb.threads | ||
gdb.trace | ||
gdb.xml | ||
lib | ||
.gdbinit | ||
aclocal.m4 | ||
ChangeLog | ||
configure | ||
configure.ac | ||
dg-extract-results.sh | ||
Makefile.in | ||
TODO |