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]

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


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