This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Skip server-kill.exp on remote target
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Tue, 07 Oct 2014 16:21:19 +0100
- Subject: Re: [PATCH] Skip server-kill.exp on remote target
- Authentication-results: sourceware.org; auth=none
- References: <1412082645-30629-1-git-send-email-yao at codesourcery dot com>
On 09/30/2014 02:10 PM, Yao Qi wrote:
> I thought about different ways to handle remote target, for example:
>
> - use command ps on remote target to gdbserver pid, but it doesn't work
> if we have multiple gdbserver instances during testing,
> - port number can be regarded as an id to differentiate different
> instances, but port number is unknown to each test case. Likewise,
> we can't use 'pkill' due to the same reason.
> - close the gdbserver channel, but gdbserver doesn't exit on the target,
gdbserver will be the parent of the tested process. So how about
tweaking the test program to do:
int server_pid;
int main ()
{
server_pid = getppid ();
}
and then simply read "server_pid" out of the inferior ?
Thanks,
Pedro Alves