old-cross-binutils/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
gdb.ada [Ada] print null array pointer as 0x0' rather than (null)' 2010-12-29 08:02:59 +00:00
gdb.arch 2010-12-23 Yao Qi <yao@codesourcery.com> 2010-12-23 15:10:24 +00:00
gdb.asm 2010-11-24 Edjunior Machado <emachado@br.ibm.com> 2010-11-24 18:06:18 +00:00
gdb.base gdb 2010-12-09 19:23:49 +00:00
gdb.cell ChangeLog: 2010-06-25 13:00:33 +00:00
gdb.cp gdb 2010-12-15 21:19:50 +00:00
gdb.disasm Examine instruction at label start' instead of _start'. 2010-06-14 19:21:11 +00:00
gdb.dwarf2 gdb 2010-11-29 21:18:16 +00:00
gdb.fortran gdb/ 2010-09-22 19:22:44 +00:00
gdb.gdb 2010-08-18 Yao Qi <yao@codesourcery.com> 2010-08-18 02:30:07 +00:00
gdb.hp Do not set prms_id/bug_id anymore. 2010-05-05 18:07:04 +00:00
gdb.java gdb 2010-12-09 16:09:54 +00:00
gdb.mi 2010-09-16 Phil Muldoon <pmuldoon@redhat.com> 2010-09-16 13:47:55 +00:00
gdb.modula2
gdb.multi * gdb.multi/base.exp, gdb.multi/bkpt-multi-exec.exp: Use 2010-06-18 15:08:29 +00:00
gdb.objc gdb/testsuite/ 2010-09-06 15:48:34 +00:00
gdb.opencl gdb: 2010-11-05 14:31:30 +00:00
gdb.opt * gdb.opt/inline-cmds.c (ATTR): New define. 2010-07-27 18:08:48 +00:00
gdb.pascal gdb/testsuite/ 2010-09-06 15:48:34 +00:00
gdb.python PR python/12227 2010-12-07 17:26:06 +00:00
gdb.reverse 2010-06-03 Michael Snyder <msnyder@vmware.com> 2010-06-03 23:54:18 +00:00
gdb.server * lib/gdb.exp (gdb_test_sequence): New function. 2010-11-23 22:25:37 +00:00
gdb.stabs gdb/testsuite/ 2010-11-12 21:49:55 +00:00
gdb.threads * gdb.threads/tls.exp: Fix typo. 2010-12-25 19:22:39 +00:00
gdb.trace 2010-12-12 Stan Shebs <stan@codesourcery.com> 2010-12-13 05:29:32 +00:00
gdb.xml * gdbtypes.c (append_composite_type_field_raw): New. 2010-03-01 17:19:23 +00:00
lib PR python/12227 2010-12-07 17:26:06 +00:00
.gdbinit
aclocal.m4
ChangeLog [Ada] print null array pointer as 0x0' rather than (null)' 2010-12-29 08:02:59 +00:00
configure gdb: 2010-11-05 14:31:30 +00:00
configure.ac gdb: 2010-11-05 14:31:30 +00:00
dg-extract-results.sh gdb/testsuite/ 2010-03-22 20:38:58 +00:00
Makefile.in gdb: 2010-11-05 14:31:30 +00:00
TODO