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: [2/5] make print_address_demangle use hex for 0


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


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