From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>,
Brendan Kirby <brendan.kirby@imgtec.com>,
Sergio Durigan Junior <sergiodj@redhat.com>
Cc: Simon Marchi <simon.marchi@polymtl.ca>, gdb-patches@sourceware.org
Subject: Re: MIPS build slave
Date: Thu, 23 Jul 2015 11:20:00 -0000 [thread overview]
Message-ID: <55B0CE08.6000502@redhat.com> (raw)
In-Reply-To: <55AE84AB.6080807@ericsson.com>
On 07/21/2015 06:43 PM, Simon Marchi wrote:
> On 15-07-21 01:21 PM, Brendan Kirby wrote:
>> I overrode the SHELL variable in the Buildbot systemd service I wrote to
>> start it.
>>
>> Brendan
>
> Ok thanks, I added a little warning in the wiki:
>
>
> /!\ It has been reported that the tests won't run properly if the SHELL variable is not
> set to a valid shell (e.g. /sbin/nologin instead of /bin/bash). Make sure that the
> user running the buildslave has a valid shell or override the SHELL environment
> variable somehow.
You always need a valid SHELL set. Not just for the testsuite, but
for gdb itself: gdb starts programs with the shell for
argument globbing, variable expansion ("run *", "run $foo", etc), and
redirection ("run 1>foo.txt", etc.), unless you disable all that
with "set startup-with-shell off".
$ SHELL=/foo gdb /usr/bin/sleep
...
(gdb) r
Starting program: /usr/bin/sleep
Cannot exec /usr/bin/sleep -c exec /usr/bin/sleep .
Error: No such file or directory
During startup program exited with code 127.
(gdb)
As you found, that's a bogus error message. It should have been:
(gdb) r
Starting program: /usr/bin/sleep
Cannot exec /foo -c exec /usr/bin/sleep .
Error: No such file or directory
During startup program exited with code 127.
(gdb)
This patchlet fixes that:
From 767ecf74811b010c47a0721306beae1979141c61 Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Thu, 23 Jul 2015 12:10:18 +0100
Subject: [PATCH] fix exec error message
---
gdb/fork-child.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index 66c07fb..4ba62b0 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -365,7 +365,7 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
/* If we get here, it's an error. */
save_errno = errno;
- fprintf_unfiltered (gdb_stderr, "Cannot exec %s", exec_file);
+ fprintf_unfiltered (gdb_stderr, "Cannot exec %s", argv[0]);
for (i = 1; argv[i] != NULL; i++)
fprintf_unfiltered (gdb_stderr, " %s", argv[i]);
fprintf_unfiltered (gdb_stderr, ".\n");
--
1.9.3
prev parent reply other threads:[~2015-07-23 11:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-18 4:15 Simon Marchi
2015-07-18 5:28 ` Brendan Kirby
2015-07-19 2:35 ` Sergio Durigan Junior
2015-07-20 20:04 ` Brendan Kirby
2015-07-20 20:45 ` Simon Marchi
2015-07-20 21:24 ` Brendan Kirby
2015-07-20 21:31 ` Simon Marchi
2015-07-20 21:05 ` Sergio Durigan Junior
[not found] ` <55AD8A7F.3080009@imgtec.com>
2015-07-21 0:14 ` Sergio Durigan Junior
2015-07-21 1:50 ` Brendan Kirby
2015-07-21 4:34 ` Sergio Durigan Junior
2015-07-21 14:57 ` Simon Marchi
2015-07-21 16:38 ` Brendan Kirby
2015-07-21 16:42 ` Simon Marchi
2015-07-21 17:21 ` Brendan Kirby
2015-07-21 17:43 ` Simon Marchi
2015-07-23 11:20 ` Pedro Alves [this message]
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=55B0CE08.6000502@redhat.com \
--to=palves@redhat.com \
--cc=brendan.kirby@imgtec.com \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@redhat.com \
--cc=simon.marchi@ericsson.com \
--cc=simon.marchi@polymtl.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).