From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10289 invoked by alias); 13 Nov 2008 23:24:09 -0000 Received: (qmail 10273 invoked by uid 22791); 13 Nov 2008 23:24:08 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 13 Nov 2008 23:23:17 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id CC6031EE815; Thu, 13 Nov 2008 18:23:15 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nrwTUadx0uq6; Thu, 13 Nov 2008 18:23:15 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8026E1EE809; Thu, 13 Nov 2008 18:23:15 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 75D4EE7ACD; Thu, 13 Nov 2008 15:23:13 -0800 (PST) Date: Fri, 14 Nov 2008 11:19:00 -0000 From: Joel Brobecker To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC] Notification for attach/detach. Message-ID: <20081113232313.GQ5112@adacore.com> References: <200811122335.01950.vladimir@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811122335.01950.vladimir@codesourcery.com> User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00313.txt.bz2 > 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