diff options
author | Daniel Jacobowitz <drow@false.org> | 2007-06-20 18:54:21 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2007-06-20 18:54:21 +0000 |
commit | 2b876972d066b862720551f83ca8b08be847b6ce (patch) | |
tree | 6ca4366885f19c1ec4ecaed6c8afbae46fc6e84d /gdb/gdbserver | |
parent | 52b572086640c9f87e7947fcb3bbd0c6b0bb9d70 (diff) | |
download | gdb-2b876972d066b862720551f83ca8b08be847b6ce.zip gdb-2b876972d066b862720551f83ca8b08be847b6ce.tar.gz gdb-2b876972d066b862720551f83ca8b08be847b6ce.tar.bz2 |
* linux-low.c (linux_create_inferior): Try execv before execvp.
* spu-low.c (spu_create_inferior): Likewise.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 4 | ||||
-rw-r--r-- | gdb/gdbserver/spu-low.c | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 2a06b99..1b96c68 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2007-06-20 Daniel Jacobowitz <dan@codesourcery.com> + + * linux-low.c (linux_create_inferior): Try execv before execvp. + * spu-low.c (spu_create_inferior): Likewise. + 2007-06-13 Mike Frysinger <vapier@gentoo.org> * linux-low.c (linux_create_inferior): Change execv to execvp. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 1ea3ccc..067a632 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -165,7 +165,9 @@ linux_create_inferior (char *program, char **allargs) setpgid (0, 0); - execvp (program, allargs); + execv (program, allargs); + if (errno == ENOENT) + execvp (program, allargs); fprintf (stderr, "Cannot exec %s: %s.\n", program, strerror (errno)); diff --git a/gdb/gdbserver/spu-low.c b/gdb/gdbserver/spu-low.c index 2298824..77f671e 100644 --- a/gdb/gdbserver/spu-low.c +++ b/gdb/gdbserver/spu-low.c @@ -278,7 +278,9 @@ spu_create_inferior (char *program, char **allargs) setpgid (0, 0); - execvp (program, allargs); + execv (program, allargs); + if (errno == ENOENT) + execvp (program, allargs); fprintf (stderr, "Cannot exec %s: %s.\n", program, strerror (errno)); |