From: Pedro Alves <palves@redhat.com>
To: Yao Qi <yao@codesourcery.com>
Cc: "Agovic, Sanimir" <sanimir.agovic@intel.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix PR server/15959
Date: Wed, 18 Sep 2013 13:24:00 -0000 [thread overview]
Message-ID: <5239A972.1040902@redhat.com> (raw)
In-Reply-To: <5239058D.5020400@codesourcery.com>
On 09/18/2013 02:44 AM, Yao Qi wrote:
> On 09/17/2013 11:57 PM, Pedro Alves wrote:
>> Missing space after parens (you added it in "marker").
>>
>>>> +{
>>>> + d = getenv("TEST");
>> Here too.
>>
>
> Fixed.
>
>>>> +
>>>> + marker ();
>>>> +
>>>> + return 0;
>>>> +}
>> I think the test will fail on Windows, because there's no
>> "env" binary there. I think we should first try to see
>> if running "env" works, with "remote_exec target", and
>> mark the test UNSUPPORTED if it doesn't.
>
> We are testing mingw32 native gdb in cygwin, so "env" is there (shipped
> from cygwin), but gdbserver is still unable to create process with
> "env TEST=1".
Actually, even though "env" is available on Cygwin, --wrapper doesn't
really work there. --wrapper works by gdbserver expecting more
more exec/trap in the initial create_inferior phase, but the Windows
debug API is different, there are no execs at all like that.
$ ./gdbserver.exe --wrapper /usr/bin/env TEST=1 -- :9999 /usr/bin/echo 1
Process /usr/bin/echo created; pid = 488
1
Child exited with status 0
No program to debug. GDBserver exiting.
$
(gdbserver did one resume too many, and didn't actually end up debugging
the right process)
I've filed PR server/15967 for that.
> I mark test unsupported and return on mingw target in the updated patch.
Thanks. I've applied this follow up.
Subject: [COMMIT PATCH] gdbserver --wrapper also doesn't work on Cygwin.
Skip the test on Cygwin too.
2013-09-18 Pedro Alves <palves@redhat.com>
PR server/15967
* gdb.server/wrapper.exp: Also return unsupported for Cygwin, and
change text.
---
gdb/testsuite/gdb.server/wrapper.exp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.server/wrapper.exp b/gdb/testsuite/gdb.server/wrapper.exp
index 5b2e2b7..a5fb714 100644
--- a/gdb/testsuite/gdb.server/wrapper.exp
+++ b/gdb/testsuite/gdb.server/wrapper.exp
@@ -25,8 +25,9 @@ if { [skip_gdbserver_tests] } {
return 0
}
-if [istarget *-*-mingw*] {
- unsupported "Command env doesn't exist on Windows."
+if { [istarget *-*-mingw*]
+ || [istarget *-*-cygwin*] } {
+ unsupported "gdbserver does not support --wrapper on this target (PR server/15967)"
return -1
}
--
1.7.11.7
prev parent reply other threads:[~2013-09-18 13:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-17 4:14 Yao Qi
2013-09-17 7:11 ` Agovic, Sanimir
2013-09-17 9:19 ` Yao Qi
2013-09-17 15:57 ` Pedro Alves
2013-09-18 1:45 ` Yao Qi
2013-09-18 13:24 ` 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=5239A972.1040902@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=sanimir.agovic@intel.com \
--cc=yao@codesourcery.com \
/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