This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix -list-thread-groups --available logic and add test


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]