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: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 13 Aug 2013 15:28:28 +0100
- Subject: Re: [PATCH] undefined printf format crashes gdb
- References: <520A2D08 dot 4080600 at broadcom dot com>
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.
Thanks,
--
Pedro Alves