From: Simon Marchi <simon.marchi@ericsson.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Cc: <tom@tromey.com>
Subject: Re: [PATCH] Fix -list-thread-groups --available logic and add test
Date: Wed, 04 Oct 2017 16:31:00 -0000 [thread overview]
Message-ID: <148cef57-4bee-ba90-5dad-897e983e01c8@ericsson.com> (raw)
In-Reply-To: <92fed2cd-29a3-f074-3419-c066f2134577@redhat.com>
On 2017-10-04 12:13 PM, Pedro Alves wrote:
> On 10/04/2017 05:00 PM, Simon Marchi wrote:
>> New in v2:
>>
>> - Match more precisely process entry in output. Actually, match two, to
>> test that giving more than one pid works.
>>
>
> Great, thanks!
>
> I noticed something else. Don't we need to kill/reap
> the spawned spawn_id's?
>
> There's kill_wait_spawned_process for that, but it operators
> on build, not on target.
I just assumed dejagnu/expect/tcl did that for us. I looked at the process list just after
running the test and there are no leftover test processes. I'll add some calls to
kill_wait_spawned_process anyhow. If I replace use_gdb_stub with can_spawn_for_attach, as you
suggest, it should work since we know that build == target.
> Maybe it'd be OK to limit the test to local testing,
> and so you'd use can_spawn_for_attach instead of
> use_gdb_stub.
>
> Hmm, actually, I do think that you should do that, given:
>
> proc can_spawn_for_attach { } {
> # We use exp_pid to get the inferior's pid, assuming that gives
> # back the pid of the program. On remote boards, that would give
> # us instead the PID of e.g., the ssh client, etc.
> if [is_remote target] then {
> return 0
> }
>
> (the "we" above refers to spawn_id_get_pid.)
Good point, thanks.
Simon
next prev parent reply other threads:[~2017-10-04 16:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 14:01 Simon Marchi
2017-10-04 14:14 ` Pedro Alves
2017-10-04 14:32 ` Simon Marchi
2017-10-04 14:42 ` Pedro Alves
2017-10-04 16:01 ` Simon Marchi
2017-10-04 16:13 ` Pedro Alves
2017-10-04 16:31 ` Simon Marchi [this message]
2017-10-04 16:31 ` [PATCH v3] " Simon Marchi
2017-10-04 16:38 ` Pedro Alves
2017-10-04 16:45 ` Simon Marchi
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=148cef57-4bee-ba90-5dad-897e983e01c8@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=tom@tromey.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