summaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1997-04-18 20:39:38 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1997-04-18 20:39:38 +0000
commit0c4cec9f7257763af9b18c50b481be10618d287a (patch)
treec96860d7fcd2c895c2431991fe384ed4717f100e /gdb/remote-sim.c
parentd90eb3ff6b8386c46b41734f87f51fae63e1e5ab (diff)
downloadbinutils-gdb-0c4cec9f7257763af9b18c50b481be10618d287a.tar.gz
* remote-sim.c (gdbsim_open): Only pass -E to sim_open if
TARGET_BYTE ORDER_SELECTABLE.
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 1c2de529e4c..a4af8e3f22c 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -521,9 +521,14 @@ gdbsim_open (args, from_tty)
len = 7 + 1 + (args ? strlen (args) : 0) + 50;
arg_buf = (char *) alloca (len);
- sprintf (arg_buf, "gdbsim%s%s -E %s",
- args ? " " : "", args ? args : "",
- TARGET_BYTE_ORDER == BIG_ENDIAN ? "big" : "little");
+ sprintf (arg_buf, "gdbsim%s%s",
+ args ? " " : "", args ? args : "");
+#ifdef TARGET_BYTE_ORDER_SELECTABLE
+ if (TARGET_BYTE_ORDER == BIG_ENDIAN)
+ strcat (arg_buf, " -E big");
+ else
+ strcat (arg_buf, " -E little");
+#endif
argv = buildargv (arg_buf);
if (argv == NULL)
error ("Insufficient memory available to allocate simulator arg list.");