This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [commit/Ada] print null array pointer as `0x0' rather than `(null)'


> > gdb/ChangeLog:
> >
> >         * ada-valprint.c (ada_val_print_1): Print null array pointers as
> >         `0x0' rather than `(null)'.  Add assertion.
> 
> Why not `null'?

`null' would indeed be more Ada-like.  But two reasons lead to use
plain `0x0' for now: First, it is more consistent with the way we
display all other pointer (we delegate the printing of a pointer
to the common code with prints null pointers as 0x0). And the second
reason is that the language parser in the debugger does not handle
`null' yet.  When GDB prints a value, I try to print it in a way that
the user can copy-paste it in a expression that you can feed back
to GDB.

All the above is on my list of minor little improvements to make
some rainy day, but there are so many more important things I want
to get to, it's not likely to be done anytime soon.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]