This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] undefined printf format crashes gdb
- From: "Andrew Burgess" <aburgess at broadcom dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 13 Aug 2013 17:08:11 +0100
- Subject: Re: [PATCH] undefined printf format crashes gdb
- References: <520A2D08 dot 4080600 at broadcom dot com> <520A428C dot 2070505 at redhat dot com>
On 13/08/2013 3:28 PM, Pedro Alves wrote:
> On 08/13/2013 01:56 PM, Andrew Burgess wrote:
>> Current gdb HEAD:
>>
>> (gdb) printf "%#p", 0
>> ./printcmd.c:2655: internal-error: ui_printf: Assertion `*p == 'p' && *(p + 1) == '\0'' failed.
>> A problem internal to GDB has been detected,
>> further debugging may prove unreliable.
>> Quit this debugging session? (y or n) y
>>
>> With my patch:
>>
>> (gdb) printf "%#p", 0
>> Inappropriate modifiers to format specifier 'p' in printf
>>
>> The man page for printf (on my machine) says # on pointers is undefined,
>> but my undefined seems better than the current undefined :)
>>
>> OK to apply?
>
> OK.
>
Committed.
Thanks,
Andrew