Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* use execvp() rather than execv() in gdbserver
@ 2007-06-13  0:07 Mike Frysinger
  2007-06-13 19:21 ` Daniel Jacobowitz
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2007-06-13  0:07 UTC (permalink / raw)
  To: gdb-patches


[-- Attachment #1.1: Type: text/plain, Size: 404 bytes --]

is there a compelling reason that execv() is used rather than execvp() in 
gdbserver/linux-low.c ?  seems it's just always been that way ...

personally, i find it annoying having to do:
# gdbserver :1234 /bin/ls /
on my embedded board instead of:
# gdbserver :1234 ls /

having used native gdb a lot more, i typo this pretty often since gdb will 
search $PATH for the program to run ;(
-mike

[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

[-- Attachment #2: gdbserver-use-execvp.patch --]
[-- Type: text/x-diff, Size: 389 bytes --]

2007-06-12  Mike Frysinger  <vapier@gentoo.org>

	* linux-low.c (linux_create_inferior): Change execv to execvp.

--- linux-low.c
+++ linux-low.c
@@ -165,7 +165,7 @@ linux_create_inferior (char *program, ch
 
       setpgid (0, 0);
 
-      execv (program, allargs);
+      execvp (program, allargs);
 
       fprintf (stderr, "Cannot exec %s: %s.\n", program,
 	       strerror (errno));

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-13 21:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-13  0:07 use execvp() rather than execv() in gdbserver Mike Frysinger
2007-06-13 19:21 ` Daniel Jacobowitz
2007-06-13 20:59   ` Mike Frysinger
2007-06-13 21:03     ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox