This is the mail archive of the gdb@sourceware.org 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: gdb 6.8 selected_byte_order function


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


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