This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: [remote] Make registers network byteordered?
- To: ac131313 at cygnus dot com (Andrew Cagney)
- Subject: Re: [remote] Make registers network byteordered?
- From: Todd Whitesel <toddpw at best dot com>
- Date: Wed, 21 Mar 2001 02:51:24 -0800 (PST)
- Cc: qqi at world dot std dot com, fche at redhat dot com, gdb at sourceware dot cygnus dot com
Another December twin-dilemma time warp victim...
> Even when you know the target, you may not know its current byte order.
> I must admit, thought, that it is a very rare situtation to be trying to
> debug a target that switches its byte order.
>
> Oh, and I've seen people debug targets using the wrong GDB. Sick yes,
> but it does work.
Commercial debuggers in the USA embedded market generally detect endianness
on startup, or design the issue out of their protocols by using a "network
byte order" concept or endian-neutral formats (like bigendian hex ascii).
Switching endianness after startup is rare, except possibly on bi-endian
targets that set bits at runtime or have memory spaces which can select
the endianness (i960 Cx core series...) Sounds like a job for JTC's memory
attributes!
In any case, I consider hard-compiled endian assumptions to be disgusting.
It should always be possible to force a specific endianness in the case
where the auto-detect fails for any reason, but it's lame to rely on people
picking the right configure option or typing "set endianness" all the time...
Todd Whitesel
toddpw @ best.com