gdb 6.8 selected_byte_order function

Daniel Jacobowitz drow@false.org
Wed Sep 24 13:08:00 GMT 2008


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



More information about the Gdb mailing list