This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Hex number formatting
- From: Sean Gies <sean dot gies at discreet dot com>
- To: gdb at sources dot redhat dot com
- Date: Tue, 14 Oct 2003 16:07:10 -0700
- Subject: Hex number formatting
So, I've figured out how to set the default output radix so all numbers
are displayed in hex. Is there a similar option to cause all numbers
to be formatted with leading zeros? This would be very useful for
debugging binary I/O code.
For example, if A is a 32-bit number, B is a 16-bit number and C is an
8-bit number with values 4, 5 and 6 respectively, they would be
displayed as follows:
A = 0x00000004
B = 0x0005
C = 0x06
instead of:
A = 0x4
B = 0x5
C = 0x6
Thanks,
-Sean