Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: use execvp() rather than execv() in gdbserver
Date: Wed, 13 Jun 2007 00:07:00 -0000	[thread overview]
Message-ID: <200706122008.07546.vapier@gentoo.org> (raw)


[-- 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));

             reply	other threads:[~2007-06-13  0:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-13  0:07 Mike Frysinger [this message]
2007-06-13 19:21 ` Daniel Jacobowitz
2007-06-13 20:59   ` Mike Frysinger
2007-06-13 21:03     ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200706122008.07546.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox