From: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: "Glenn F. Maynard" <g_gdb@zewt.org>, gdb@sourceware.cygnus.com
Subject: Re: gdb: detection and/or fork+gethostbyname crash workaround?
Date: Tue, 24 Jul 2001 14:22:00 -0000 [thread overview]
Message-ID: <20010724142240.A20056@nevyn.them.org> (raw)
In-Reply-To: <1010724202607.ZM20680@ocotillo.lan>
On Tue, Jul 24, 2001 at 01:26:07PM -0700, Kevin Buettner wrote:
> [1] Actually, maybe there is. It may be possible to place a
> breakpoint libc's fork() entry point. When this breakpoint is hit,
> we call ptrace(PTRACE_SYSCALL,...) twice. From my reading of the
> documentation, the first PTRACE_SYSCALL call will stop at the fork
> syscall's entry point, the second will stop when the syscall is about
> to return. We could remove all breakpoints on the first stop (fork
> entry) and restore them on the second stop (fork exit).
Yeah, that's how PTRACE_SYSCALL works - see strace for the gory
details. It can even be used to stop in both the parent and the child.
I've wanted to be able to even access PTRACE_SYSCALL from gdb; it can
be convenient for getting to a particular point in execution. It would
require defining a new type of breakpoint, though.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2001-07-24 14:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-23 18:01 Glenn F. Maynard
2001-07-24 9:23 ` Kevin Buettner
2001-07-24 11:22 ` Glenn F. Maynard
2001-07-24 13:26 ` Kevin Buettner
2001-07-24 13:57 ` Glenn F. Maynard
2001-07-24 14:49 ` Kevin Buettner
2001-07-24 14:22 ` Daniel Jacobowitz [this message]
2001-07-24 13:26 ` Daniel Jacobowitz
2001-07-24 13:44 ` Kevin Buettner
2001-07-24 13:54 ` Mark Kettenis
2001-07-24 13:00 Michael Elizabeth Chastain
2001-07-24 13:53 ` Kevin Buettner
2001-07-24 14:26 ` Glenn F. Maynard
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=20010724142240.A20056@nevyn.them.org \
--to=dmj+@andrew.cmu.edu \
--cc=g_gdb@zewt.org \
--cc=gdb@sourceware.cygnus.com \
--cc=kevinb@cygnus.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