This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb 6.8 selected_byte_order function
- From: Daniel Jacobowitz <drow at false dot org>
- To: Richard Stuckey <richard dot stuckey at arc dot com>
- Cc: gdb at sourceware dot org
- Date: Wed, 24 Sep 2008 09:07:46 -0400
- Subject: Re: gdb 6.8 selected_byte_order function
- References: <1222253904.3506.12.camel@sad-richards.arc.com>
On Wed, Sep 24, 2008 at 11:58:24AM +0100, Richard Stuckey wrote:
> Given that that the variable âtarget_byte_order_user â holds the userâs
> preference as specified by the âset endianâ command, it seems to me that
> the code should be
>
> if (target_byte_order_user != BFD_ENDIAN_UNKNOWN)
> return target_byte_order_user;
> else
> return gdbarch_byte_order (current_gdbarch);
>
> i.e. if the user has explicitly specified the byte order then we use
> that, otherwise we use the order determined from the current
> architecture.
This happens at a higher level. When the user sets the byte order, we
go through set_endian just below. THe call to gdbarch_update_p
changes current_gdbarch.
--
Daniel Jacobowitz
CodeSourcery