This is the mail archive of the 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]

Re: [remote] Make registers network byteordered?

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

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 @

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