This is the mail archive of the gdb-patches@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: [patch/rfc] Eliminate TARGET_BYTE_ORDER_SELECTABLE


> On Sat, Jan 19, 2002 at 12:58:36AM -0500, Andrew Cagney wrote:
> 
>> Hello,
>> 
>> All multi-arch targets (yep, including the i386) allow the byte order to 
>> be selected at run time.  This means that the macro 
>> TARGET_BYTE_ORDER_SELECTABLE which was used by non-multi-arch targets is 
>> obsolete.
>> 
>> The attached patch eliminates that macro.  I've tested it on a 
>> multi-arch target and I don't think it breaks non-multi-arch targets.
>> 
>> Anyway, I intend committing this in a few days.
>> Andrew
> 
> 
> Hmm, I don't know.  Do we really want to do this?  This allows, for
> instance, 'set endian big' on i386.  That may someday make someone
> think that GDB supports such a beast, on the off chance one is ever
> made.


Ah, but we live in dangerous times :-)

TARGET_BYTE_ORDER_SELECTABLE, TARGET_BYTE_ORDER_SELECTABLE_P and even 
TARGET_BYTE_ORDER_DEFAULT are all there just to prop up old pre- 
multi-arch targets.  They are not used by a multi-arch GDB.

All multi-arch architectures allow both big and little byte orders 
(regardless of what the spec says).  This lets the user do things like:

	(gdb) print network_structure
	(gdb) set endian big
	(gdb) print network_structure

enjoy,
Andrew


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