From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA/doco] Add documentation for observer.[hc] (gdbint.texinfo)
Date: Sun, 09 Mar 2003 06:51:00 -0000 [thread overview]
Message-ID: <20030309065155.GB966@gnat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 487 bytes --]
The following patch adds some light documentation about the new observer
paradigm introduced recently.
2003-03-08 J. Brobecker <brobecker@gnat.com>
* 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
[-- Attachment #2: observers-texi.diff --]
[-- Type: text/plain, Size: 2995 bytes --]
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
[-- Attachment #3: observer.texi --]
[-- Type: application/x-texinfo, Size: 315 bytes --]
next reply other threads:[~2003-03-09 6:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-09 6:51 Joel Brobecker [this message]
2003-03-09 15:36 ` Daniel Jacobowitz
2003-03-10 14:41 ` Andrew Cagney
2003-03-10 18:46 ` Joel Brobecker
2003-03-09 16:10 ` Eli Zaretskii
2003-03-10 19:01 ` Joel Brobecker
2003-03-10 20:04 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030309065155.GB966@gnat.com \
--to=brobecker@gnat.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox