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: [RFC] Notification for attach/detach.


> 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


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