]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* remote-sim.c (gdbsim_open): Only pass -E to sim_open if
authorDavid Edelsohn <dje.gcc@gmail.com>
Fri, 18 Apr 1997 20:39:38 +0000 (20:39 +0000)
committerDavid Edelsohn <dje.gcc@gmail.com>
Fri, 18 Apr 1997 20:39:38 +0000 (20:39 +0000)
TARGET_BYTE ORDER_SELECTABLE.

gdb/ChangeLog
gdb/remote-sim.c

index 76cfbce46532f24d881cda1b9f1de9e277535365..fbc1aec6bd964d7cbcb4d6562496f26dc1215e63 100644 (file)
@@ -1,3 +1,8 @@
+Fri Apr 18 13:38:19 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * remote-sim.c (gdbsim_open): Only pass -E to sim_open if
+       TARGET_BYTE ORDER_SELECTABLE.
+
 Fri Apr 18 16:52:41 1997  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * remote-sim.c (init_callbacks): Initialize poll_quit and magic
index 1c2de529e4cf13ec7cccc8ba0e734a02b2d00dd6..a4af8e3f22c50c666f3c705ed2d7a7a26ac9317b 100644 (file)
@@ -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.");