From: Daniel Jacobowitz <drow@false.org>
To: PoWah Wong <wong_powah@yahoo.ca>
Cc: gdb@sourceware.org
Subject: Re: newbie question: debug a multiple processes server program
Date: Fri, 09 Feb 2007 22:27:00 -0000 [thread overview]
Message-ID: <20070209222709.GA6719@nevyn.them.org> (raw)
In-Reply-To: <802891.67096.qm@web56314.mail.re3.yahoo.com>
On Fri, Feb 09, 2007 at 02:17:52PM -0800, PoWah Wong wrote:
> This is what I am think, please comment:
> - cd src
> - Start testd by ../linux/testd
> - Start gdb
> - Load debugging info
> symbol-file ../linux/testd
Always use "file".
> - Attach to the parent process (i.e. pid 31629)
> - set breakpoint in the foo() of the util.c
> b foo
> - Resume testd execution
> run
"continue"
> - Execute the client program
> - Wait for breakpoint to occur
Yes, this is usually the best way. If you know which process the bug
will occur in, you can also get to it by running the program under
GDB and using "catch fork" and "set follow-fork-mode".
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-02-09 22:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 22:18 PoWah Wong
2007-02-09 22:27 ` Daniel Jacobowitz [this message]
2007-02-09 22:38 ` Nick Roberts
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=20070209222709.GA6719@nevyn.them.org \
--to=drow@false.org \
--cc=gdb@sourceware.org \
--cc=wong_powah@yahoo.ca \
/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