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: gdb print /x always big endian order?


JK:


Indeed. If you want to see endianness, use 'x' instead, and ask it for a string of hex bytes. :^)



b.g.



Andreas Schwab writes:


J K <ellips@yahoo.com> writes:

 It seems in GNU gdb Red Hat Linux (5.1-1) when
 I do a print /x the order is Big Endian regardless
 of the host architecture.

The print command just prints a value, and values don't have endianess.
Only memory contents have.


Andreas.

--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



--
Bill Gatliff
Embedded GNU, Linux training and development.
bgat@billgatliff.com



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