aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch-utils.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-02-26 20:13:18 +0000
committerDaniel Jacobowitz <drow@false.org>2007-02-26 20:13:18 +0000
commitb6d373df1e5729606ff51f3947dd636eab6738b6 (patch)
tree4d83417c0f10a898bcd98764e03cce86189447b1 /gdb/arch-utils.c
parentc74d0ad8276928d58b080ecd50eb5026aac49c5d (diff)
downloadfsf-binutils-gdb-b6d373df1e5729606ff51f3947dd636eab6738b6.zip
fsf-binutils-gdb-b6d373df1e5729606ff51f3947dd636eab6738b6.tar.gz
fsf-binutils-gdb-b6d373df1e5729606ff51f3947dd636eab6738b6.tar.bz2
* arch-utils.c (selected_byte_order): New.
* arch-utils.h (selected_byte_order): New prototype. * remote-sim.c (gdbsim_open): Use selected_byte_order.
Diffstat (limited to 'gdb/arch-utils.c')
-rw-r--r--gdb/arch-utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 1a987f3..1ec3c37 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -287,6 +287,15 @@ static const char *endian_enum[] =
};
static const char *set_endian_string;
+enum bfd_endian
+selected_byte_order (void)
+{
+ if (target_byte_order_user != BFD_ENDIAN_UNKNOWN)
+ return TARGET_BYTE_ORDER;
+ else
+ return BFD_ENDIAN_UNKNOWN;
+}
+
/* Called by ``show endian''. */
static void