This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] Notification for attach/detach.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 13 Nov 2008 15:23:13 -0800
- Subject: Re: [RFC] Notification for attach/detach.
- References: <200811122335.01950.vladimir@codesourcery.com>
> index f76bf9f..cc0eb06 100644
> --- a/gdb/doc/observer.texi
> +++ b/gdb/doc/observer.texi
> @@ -187,3 +187,13 @@ a pointer to the new architecture.
> The thread's ptid has changed. The @var{old_ptid} parameter specifies
> the old value, and @var{new_ptid} specifies the new value.
> @end deftypefun
> +
> +@deftypefun void new_inferior (int @var{pid})
> +@value{GDBN} has attached to a new inferior identified by @var{pid}.
> +@end deftypefun
> +
> +@deftypefun void inferior_exit (int @var{pid})
> +The inferior identified by @var{pid} has either exited, or was detached
> +from.
> +@end deftypefun
> +
This part should be reviewed by Eli. The documentation for the first
observer looks fine to me, but I find the second one a little awkward.
Perhaps Eli will have another one of his good suggestions. In the
meantime, perhaps the following would do:
The inferior identified by @var{pid} has exited, or @value{GDBN}
detached from it.
> gdb/
> * Makefile.in: Update dependencies.
> * inferior.c: Call the process observers.
> * mi/mi-interp.c (mi_new_inferior, mi_inferior_exit): New.
> (mi_interpreter_init): Register the above.
As spotted by Tom, the Makefile.in entry needs to be removed.
The inferior.c part looks good to me. As for the mi changes,
I looked at them and I didn't see anything wrong, but you are
the maintainer and you know way more about this part than I do,
so you don't need my approval.
> gdb/doc/
> * observer.texi (new_inferior, inferior_exit): New observers.
--
Joel