binutils-gdb/gdb/testsuite
Joel Brobecker 9e87a40907 [Ada] print null array pointer as 0x0' rather than (null)'
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.
2010-12-29 08:02:59 +00:00
..
config Update copyright year in most headers. 2010-01-01 07:32:07 +00:00
gdb.ada [Ada] print null array pointer as 0x0' rather than (null)' 2010-12-29 08:02:59 +00:00
gdb.arch
gdb.asm
gdb.base
gdb.cell
gdb.cp
gdb.disasm
gdb.dwarf2
gdb.fortran
gdb.gdb
gdb.hp
gdb.java
gdb.mi 2010-09-16 Phil Muldoon <pmuldoon@redhat.com> 2010-09-16 13:47:55 +00:00
gdb.modula2
gdb.multi
gdb.objc
gdb.opencl
gdb.opt
gdb.pascal
gdb.python
gdb.reverse 2010-06-03 Michael Snyder <msnyder@vmware.com> 2010-06-03 23:54:18 +00:00
gdb.server
gdb.stabs
gdb.threads * gdb.threads/tls.exp: Fix typo. 2010-12-25 19:22:39 +00:00
gdb.trace
gdb.xml * gdbtypes.c (append_composite_type_field_raw): New. 2010-03-01 17:19:23 +00:00
lib
.gdbinit
aclocal.m4
ChangeLog [Ada] print null array pointer as 0x0' rather than (null)' 2010-12-29 08:02:59 +00:00
configure
configure.ac
dg-extract-results.sh
Makefile.in
TODO