From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26605 invoked by alias); 9 Mar 2003 06:51:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26598 invoked from network); 9 Mar 2003 06:51:52 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (142.179.108.108) by 172.16.49.205 with SMTP; 9 Mar 2003 06:51:52 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id A1E7ED34B6; Sat, 8 Mar 2003 22:51:55 -0800 (PST) Date: Sun, 09 Mar 2003 06:51:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: [RFA/doco] Add documentation for observer.[hc] (gdbint.texinfo) Message-ID: <20030309065155.GB966@gnat.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="azLHFNyN32YCQGCU" Content-Disposition: inline User-Agent: Mutt/1.4i X-SW-Source: 2003-03/txt/msg00202.txt.bz2 --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 487 The following patch adds some light documentation about the new observer paradigm introduced recently. 2003-03-08 J. Brobecker * gdbint.texinfo: Fix a small typo. (Observing Changes in GDB internals): New section. (GDB Observers currently available): Add menu entry to new appendix. * observer.texi: New file. * Makefile.in (GDBINT_DOC_SOURCE_INCLUDES): Add dependency on new observer.texi file. Cheers, -- Joel --azLHFNyN32YCQGCU Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="observers-texi.diff" Content-length: 2995 Index: gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.127 diff -c -r1.127 gdbint.texinfo *** gdbint.texinfo 5 Mar 2003 23:14:18 -0000 1.127 --- gdbint.texinfo 9 Mar 2003 06:45:25 -0000 *************** *** 40,46 **** @author Cygnus Solutions @page @tex ! \def\$#1${{#1}} % Kluge: collect RCS revision info without $...$ \xdef\manvers{\$Revision$} % For use in headers, footers too {\parskip=0pt \hfill Cygnus Solutions\par --- 40,46 ---- @author Cygnus Solutions @page @tex ! \def\$#1${{#1}} % Kludge: collect RCS revision info without $...$ \xdef\manvers{\$Revision$} % For use in headers, footers too {\parskip=0pt \hfill Cygnus Solutions\par *************** *** 95,100 **** --- 95,101 ---- * Hints:: * GNU Free Documentation License:: The license for this documentation + * GDB Observers:: @value{GDBN} Observers currently available * Index:: @end menu *************** *** 696,701 **** --- 697,723 ---- unavailable in many platforms. @end enumerate + @section Observing changes in @value{GDBN} internals + @cindex observer + + In order to function properly, several modules need to be notified when + some changes occur in the @value{GDBN} internals. Traditionally, these + modules have relied on several paradigms, the most common ones being + hooks and gdb-events. Unfortunately, none of these paradigms was + versatile enough to become the standard notification mechanism in + @value{GDBN}. The fact that they only supported one ``client'' was also + a strong limitation. + + A new paradigm, based on the Observer pattern of the @cite{Design + Patterns} book, has therefore been implemented. The goal was to provide + a new interface overcoming the issues with the notification mechanisms + previously available. This new interface needed to be strongly typed, + easy to extend, and versatile enough to be used as the standard + interface when adding new notifications. + + The rationale for the current implementation of the Observer pattern + is described in @file{observer.c}. + @node User Interface @chapter User Interface *************** *** 6578,6583 **** --- 6600,6606 ---- @end table @include fdl.texi + @include observer.texi @node Index @unnumbered Index Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/doc/Makefile.in,v retrieving revision 1.26 diff -c -r1.26 Makefile.in *** Makefile.in 3 Mar 2003 03:59:16 -0000 1.26 --- Makefile.in 9 Mar 2003 06:45:21 -0000 *************** *** 114,120 **** # Internals Manual GDBINT_DOC_SOURCE_INCLUDES = \ ! $(srcdir)/fdl.texi GDBINT_DOC_BUILD_INCLUDES = \ gdb-cfg.texi \ GDBvn.texi --- 114,121 ---- # Internals Manual GDBINT_DOC_SOURCE_INCLUDES = \ ! $(srcdir)/fdl.texi \ ! $(srcdir)/observer.texi GDBINT_DOC_BUILD_INCLUDES = \ gdb-cfg.texi \ GDBvn.texi --azLHFNyN32YCQGCU Content-Type: application/x-texinfo Content-Disposition: attachment; filename="observer.texi" Content-Transfer-Encoding: quoted-printable Content-length: 348 @c -*-texinfo-*-=0A= @node GDB Observers=0A= =0A= @appendix @value{GDBN} Observers currently available=0A= =0A= @section @code{normal_stop} Notifications=0A= =0A= @value{GDBN} will notify all @code{normal_stop} observers when the=0A= inferior execution has just stopped and the @value{GDBN} prompt is=0A= about to be returned to the user.=0A= =0A= --azLHFNyN32YCQGCU--