2012-04-11 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Wed, 11 Apr 2012 13:42:44 +0000 (13:42 +0000)
committerTristan Gingold <gingold@adacore.com>
Wed, 11 Apr 2012 13:42:44 +0000 (13:42 +0000)
PR gdb/13901
* darwin-nat.c (darwin_execvp): Revert previous patch.

gdb/ChangeLog
gdb/darwin-nat.c

index 1d65759d129e3633eb09e87bfcaaf00d94d7a281..1c2e48b243cd350520995bcf3ba5153ef0f73e64 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-11  Tristan Gingold  <gingold@adacore.com>
+
+       PR gdb/13901
+       * darwin-nat.c (darwin_execvp): Revert previous patch.
+
 2012-04-11  Tristan Gingold  <gingold@adacore.com>
 
        PR gdb/13901
index 3c5ddbef9b425b493899d7001fbd0c57ba418ece..b5bf7cc8ca0ec18b3c55f7f05345383c7a477fba 100644 (file)
@@ -1529,22 +1529,6 @@ darwin_execvp (const char *file, char * const argv[], char * const env[])
       return;
     }
 
-  /* Specify the same binary preference to spawn the shell as the
-     exec binary.  This avoids spawning a 64bit shell while debugging
-     a 32bit program, which may confuse gdb.
-     Also, this slightly breaks internal layers as we suppose the binary
-     is Mach-O.  Doesn't harm in practice.  */
-  if (exec_bfd != NULL)
-    {
-      cpu_type_t pref;
-      size_t ocount;
-
-      pref = bfd_mach_o_get_data (exec_bfd)->header.cputype;
-      res = posix_spawnattr_setbinpref_np (&attr, 1, &pref, &ocount);
-      if (res != 0 || ocount != 1)
-       fprintf_unfiltered (gdb_stderr, "Cannot set posix_spawn binpref\n");
-    }
-
   posix_spawnp (NULL, argv[0], NULL, &attr, argv, env);
 }
 
This page took 0.027474 seconds and 4 git commands to generate.