This is the mail archive of the gdb@sources.redhat.com 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: output formats bug?


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


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