This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix -list-thread-groups --available logic and add test
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>, gdb-patches at sourceware dot org
- Cc: tom at tromey dot com
- Date: Wed, 4 Oct 2017 17:13:26 +0100
- Subject: Re: [PATCH] Fix -list-thread-groups --available logic and add test
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 57F037E439
- References: <7b48234b-1a7d-b4b4-2de0-2514d70cc59c@redhat.com> <1507132859-27807-1-git-send-email-simon.marchi@ericsson.com>
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.
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.)
Thanks,
Pedro Alves