This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: output formats bug?
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Chris Zankel <zankel at tensilica dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Fri, 6 Feb 2004 15:26:37 -0500
- Subject: Re: output formats bug?
- References: <4023E9C2.3060903@tensilica.com>
On Fri, Feb 06, 2004 at 11:23:46AM -0800, Chris Zankel wrote:
> GDB seems to be stuck with the constant char output format
> once that was used:
>
>
> GNU gdb 2004-02-02-cvs
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB. Type "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
> library "/lib/i686/libthread_db.so.1".
>
> (gdb) x/c main
> 0x804830c <main>: 85 'U'
> (gdb) x/w main
> 0x804830c <main>: 85 'U'
> (gdb)
>
> (This is not a new bug, it seems to be there for a long time)
The thing is, w isn't an output specifier - it's a size qualifier. It
changes the size qualifier to "word". Then the code for printing a
char ignores it.
The behavior you want is probably:
x/c main
x/x main
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer