This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [2/5] make print_address_demangle use hex for 0
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 16 May 2012 21:58:07 +0100
- Subject: Re: [2/5] make print_address_demangle use hex for 0
- References: <873972wnii.fsf@fleche.redhat.com>
On 05/14/2012 08:50 PM, Tom Tromey wrote:
> --- a/gdb/printcmd.c
> +++ b/gdb/printcmd.c
> @@ -773,7 +773,7 @@ print_address_demangle (const struct value_print_options *opts,
> {
> if (addr == 0)
> {
> - fprintf_filtered (stream, "0");
> + fprintf_filtered (stream, "0x0");
> }
> else if (opts->addressprint)
Do you know why we special case 0 at all? (There are targets where 0 is a valid address.)
--
Pedro Alves