This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: cli/1337: -Wformat-nonliteral vs printcmd.c - make "(gdb) printf"host independant
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 18 Aug 2003 15:38:00 -0000
- Subject: Re: cli/1337: -Wformat-nonliteral vs printcmd.c - make "(gdb) printf"host independant
- Reply-to: Andrew Cagney <ac131313 at redhat dot com>
The following reply was made to PR cli/1337; it has been noted by GNATS.
From: Andrew Cagney <ac131313@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-gnats@sources.redhat.com
Subject: Re: cli/1337: -Wformat-nonliteral vs printcmd.c - make "(gdb) printf"
host independant
Date: Mon, 18 Aug 2003 11:34:09 -0400
> Description:
>
>> printcmd.c is taking user input strings and then passing them through
>> to printf. It should, I think, instead implement a full "%" parser.
>> If nothing else it would eliminate a few limitations (such as %ll
>> support being dependant on the host's CC and printf).
>
>
> Could we use the publicly available libvsnprintf for this? I think
> it's a GNU or else public domain project; there was some talk about
> adding it to libiberty.
Does it use <stdargs.h>? If not that, and the type casting system,
would also need to be abstracted. GDB's printf [effectively] extracts
its argument list from an array of 'struct value'.
Andrew