output-radix breaks char output
Mike Frysinger
vapier@gentoo.org
Tue Nov 8 04:39:00 GMT 2011
am i doing something wrong here ? seems like setting output-radix to 16
breaks x/c output.
$ echo 'char f[]="abc";main(){}' | gcc -x c -g - -o a.out
$ gdb ./a.out
(gdb) b main
(gdb) r
(gdb) set output-radix 10
Output radix now set to decimal 10, hex a, octal 12.
(gdb) x/4c f
0x601018 <f>: 97 'a' 98 'b' 99 'c' 0 '\000'
(gdb) set output-radix 16
Output radix now set to decimal 16, hex 10, octal 20.
(gdb) x/4c f
0x601018 <f>: 0x61 0x62 0x63 0x0
i can understand the 0x61/97 change, but imo, the latter output shouldn't be
missing the 'a' bits.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb/attachments/20111108/88c5d0b2/attachment.sig>
More information about the Gdb
mailing list