Uniquefy gdb.threads/attach-into-signal.exp
[deliverable/binutils-gdb.git] / gdb / remote-sim.c
index 0c43379001d0826702ed524af5499e3619d8c8b8..82c129db9c0a35980152622024973cbb88e70000 100644 (file)
@@ -670,9 +670,13 @@ gdbsim_open (const char *args, int from_tty)
   int len;
   char *arg_buf;
   struct sim_inferior_data *sim_data;
-  const char *sysroot = gdb_sysroot;
+  const char *sysroot;
   SIM_DESC gdbsim_desc;
 
+  sysroot = gdb_sysroot;
+  if (is_target_filename (sysroot))
+    sysroot += strlen (TARGET_SYSROOT_PREFIX);
+
   if (remote_debug)
     fprintf_unfiltered (gdb_stdlog,
                        "gdbsim_open: args \"%s\"\n", args ? args : "(null)");
@@ -717,8 +721,6 @@ gdbsim_open (const char *args, int from_tty)
     }
   /* Pass along gdb's concept of the sysroot.  */
   strcat (arg_buf, " --sysroot=");
-  if (is_target_filename (sysroot))
-    sysroot += strlen (TARGET_SYSROOT_PREFIX);
   strcat (arg_buf, sysroot);
   /* finally, any explicit args */
   if (args)
This page took 0.025905 seconds and 4 git commands to generate.