Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <stan@codesourcery.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 01/08] multi-process support: struct inferior (alternate  manual content)
Date: Wed, 17 Sep 2008 00:33:00 -0000	[thread overview]
Message-ID: <48D0501E.2060802@codesourcery.com> (raw)
In-Reply-To: <200809121637.34647.pedro@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

Here is an alternate phrasing for GDB's new inferior objects, 
wordsmithed so that it (mostly) makes sense with just Pedro's patches, 
and also so that it can be easily expanded into the full multi-exec 
section in the near future. To repeat from my last comment, I don't 
think we need to be really polished just yet, the single-exec + 
multi-inferior case is just a transitional stage of limited interest.

Stan

2008-09-16  Stan Shebs  <stan@codesourcery.com>

    * gdb.texinfo (Inferiors): New section.



[-- Attachment #2: manual-inf-patch-1 --]
[-- Type: text/plain, Size: 3045 bytes --]

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.521
diff -p -r1.521 gdb.texinfo
*** gdb.texinfo	3 Sep 2008 23:54:19 -0000	1.521
--- gdb.texinfo	17 Sep 2008 00:25:23 -0000
*************** kill a child process.
*** 1785,1790 ****
--- 1785,1791 ----
  * Attach::                      Debugging an already-running process
  * Kill Process::                Killing the child process
  
+ * Inferiors::                   Debugging multiple inferiors
  * Threads::                     Debugging programs with multiple threads
  * Processes::                   Debugging programs with multiple processes
  * Checkpoint/Restart::          Setting a @emph{bookmark} to return to later
*************** next type @code{run}, @value{GDBN} notic
*** 2354,2359 ****
--- 2355,2406 ----
  reads the symbol table again (while trying to preserve your current
  breakpoint settings).
  
+ @node Inferiors
+ @section Debugging Multiple Inferiors
+ 
+ Some @value{GDBN} targets are able to run multiple processes created
+ from a single executable. This can happen, for instance, with an
+ embedded system reporting back several processes via the remote
+ protocol.
+ 
+ @cindex inferior
+ @value{GDBN} represents the state of each program execution with an
+ object called an @dfn{inferior}. An inferior typically corresponds to a
+ process, but is more general and applies also to targets that do not
+ have processes. Inferiors may be created before a process runs, and
+ may (in future) be retained after a process exits. Each run of an
+ executable creates a new inferior, as does each attachment to an
+ existing process. Inferiors have unique identifiers that are different
+ from process ids, and may optionally be named as well. Usually each
+ inferior will also have its own distinct address space, although some
+ embedded targets may have several inferiors running in different parts
+ of a single space.
+ 
+ Each inferior may in turn have multiple threads running in it.
+ 
+ To find out what inferiors exist at any moment, use @code{info inferiors}:
+ 
+ @table @code
+ @kindex info inferiors
+ @item info inferiors
+ Print a list of all inferiors currently being managed by @value{GDBN}.
+ 
+ @kindex set print inferior-events
+ @cindex print messages on inferior start and exit
+ @item set print inferior-events
+ @itemx set print inferior-events on
+ @itemx set print inferior-events off
+ The @code{set print inferior-events} command allows you to enable or
+ disable printing of messages when @value{GDBN} notices that new
+ inferiors have started or that inferiors have exited or have been
+ detached.  By default, these messages will not be printed.
+ 
+ @kindex show print inferior-events
+ @item show print inferior-events
+ Show whether messages will be printed when @value{GDBN} detects that
+ inferiors have started, exited or have been detached.
+ @end table
+ 
  @node Threads
  @section Debugging Programs with Multiple Threads
  

  parent reply	other threads:[~2008-09-17  0:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-12 15:38 [RFA 01/08] multi-process support: struct inferior Pedro Alves
2008-09-12 16:08 ` Eli Zaretskii
2008-09-12 17:21   ` Pedro Alves
2008-09-12 20:00     ` Eli Zaretskii
2008-09-16 22:05       ` Stan Shebs
2008-09-12 16:08 ` Eli Zaretskii
2008-09-17  0:33 ` Stan Shebs [this message]
2008-09-17  3:17   ` [RFA 01/08] multi-process support: struct inferior (alternate manual content) Eli Zaretskii
2008-09-18 22:46 ` [RFA 01/08] multi-process support: struct inferior Daniel Jacobowitz
2008-09-22 15:35   ` Pedro Alves

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=48D0501E.2060802@codesourcery.com \
    --to=stan@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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