Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@science.uva.nl>
To: "Glenn F. Maynard" <g_gdb@zewt.org>
Cc: gdb@sourceware.cygnus.com
Subject: Re: gdb: detection and/or fork+gethostbyname crash workaround?
Date: Tue, 24 Jul 2001 13:54:00 -0000	[thread overview]
Message-ID: <s3i3d7mjbez.fsf@soliton.wins.uva.nl> (raw)
In-Reply-To: <20010724142248.A2923@zewt.org>

"Glenn F. Maynard" <g_gdb@zewt.org> writes:

> > I searched gdb@sources.redhat.com w/ both of these search phrases and
> > only came up with the message to which I'm responding.  Can you provide
> > some URLs for the archived messages?
> 
> http://sources.redhat.com/ml/bug-glibc/2000-04/msg00018.html
> http://sources.redhat.com/ml/bug-gdb/2001-03/msg00049.html
> 
> (the first is more useful; it was apparently CC'd to both
> bug-glibc and bug-gdb, but that's what google turned up.)

Hmm, I'd expect a Trace/breakpoint trap...

Yup, that's what I get.  What's happening is that when you fork, GDB
has its breakpoints inserted in the inferior.  Therefore the child
inherits those breakpoints from its parents.  When it trips such a
breakpoint, it gets killed since the child isn't traced by GDB.

In this particular case it's a GDB-internal solib_event breakpoint
that gets tripped, since gethostbyname() causes one or more NSS
modules to be loaded.

It's not easy to solve this (and I suspect that a lot of platforms
suffer from the same problems).  Implementing the follow-fork stuff
for Linux would probably do the trick.  Perhaps I can find some time
to implement that, but it won't be ready for the next release.

Mark


  parent reply	other threads:[~2001-07-24 13:54 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
2001-07-24 13:26     ` Daniel Jacobowitz
2001-07-24 13:44       ` Kevin Buettner
2001-07-24 13:54     ` Mark Kettenis [this message]
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=s3i3d7mjbez.fsf@soliton.wins.uva.nl \
    --to=kettenis@science.uva.nl \
    --cc=g_gdb@zewt.org \
    --cc=gdb@sourceware.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