This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Fix for gdb.server/non-existing-program.exp test case
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: cel at us dot ibm dot com (Carl E. Love)
- Cc: arnez at linux dot vnet dot ibm dot com (Andreas Arnez), gdb-patches at sourceware dot org, cel at us dot ibm dot com, emachado at linux dot vnet dot ibm dot com (Edjunior Barbosa Machado), Ulrich dot Weigand at de dot ibm dot com (Ulrich Weigand)
- Date: Tue, 13 Sep 2016 15:26:30 +0200 (CEST)
- Subject: Re: [PATCH] Fix for gdb.server/non-existing-program.exp test case
- Authentication-results: sourceware.org; auth=none
Carl Love wrote:
> 2016-09-06 Carl Love <firstname.lastname@example.org>
> * server.c (start_inferior): Do not call
> function target_post_create_inferior () if the
> inferior process has already exited.
The patch makes sense to me, however there seem to be
some formatting issues (mail client problems?):
> + /* The last_status.kind was set by the call to
> ptrace(PTRACE_TRACEME, ...).
> + The function linux_wait() has also been called. At this point,
> + target process, if it exits, is stopped. Depending on the
> + the function target_post_create_inferior () may make additional
> ptrace ()
> + calls that will fail if the target has already exited.
> + */
Please make sure this is properly formatted (and does not exceed
the 80 characters per line limit).
Also, the comment seems a bit too specific; this file is also used
for targets other than Linux that may not use ptrace specifically.
I'd word the comment a bit more generically, along the lines of
"Do not call target_post_create_inferior if the process has already
exited, since the target implementation of that routine may rely on
the process being live."
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain