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 Sun, Jan 20, 2002 at 02:00:33PM -0500, Andrew Cagney wrote:
> >On Sun, Jan 20, 2002 at 01:33:29PM -0500, Andrew Cagney wrote:
> >
> >>>
> >>>Woah!  That's neat!  I need to remember that :)
> >>>
> >>>And I suppose I of all people shouldn't be griping about allowing more
> >>>endianness choices.  I have a patch here to support big-endian
> >>>ARM/Linux.  All I did was change TARGET_BYTE_ORDER_*.
> >
> >>
> >>
> >>Delete it :-)  As Michael observed, if the code is written correctly it 
> >>works from day one.  (Problem is it has taken ~10 years to figure out 
> >>how to correctly write the code :-)
> >
> >
> >Well, I need to set TARGET_BYTE_ORDER_DEFAULT.  If you start a cross
> >debugger without giving it a binary, and attach to a random remote
> >target, then we need to default to the right one.  Other than that
> >everything is fine, though!
> 
> 
> Nope! I'm about to delete TARGET_BYTE_ORDER_DEFAULT.
> 
> There is this really nasty bit of code in arch-utils.c that roots around 
> the internals of BFD and uses that to determine the initial architecture 
> and byte-order.  Doing this ensures that GDB's behavour is better 
> aligned with that of BINUTILS.
> See arch-utils.c:initialize_current_architecture().
> 
> If GDB initializes its self to the wrong byte-order then there is likely 
> a bug in BFD.

Oh, I see.  I -think- this will work correctly for my targets; I'll
check after you do it.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


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