From mboxrd@z Thu Jan 1 00:00:00 1970 From: Todd Whitesel To: ac131313@cygnus.com (Andrew Cagney) Cc: qqi@world.std.com, fche@redhat.com, gdb@sourceware.cygnus.com Subject: Re: [remote] Make registers network byteordered? Date: Wed, 21 Mar 2001 15:59:00 -0000 Message-id: <200103211051.CAA14665@shell17.ba.best.com> References: <3A2ED523.70DCA415@cygnus.com> X-SW-Source: 2001-03/msg00225.html 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