Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: John Baldwin <jhb@freebsd.org>
To: Simon Marchi <simark@simark.ca>
Cc: Christian Groessler <chris@groessler.org>,
	"gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: debugging a program which spawns multiple children
Date: Thu, 15 Feb 2018 23:16:00 -0000	[thread overview]
Message-ID: <1761137.QktPY87a0O@ralph.baldwin.cx> (raw)
In-Reply-To: <9334b884-9d22-2352-7f2d-fe75550b3a45@simark.ca>

On Monday, February 12, 2018 08:24:32 PM Simon Marchi wrote:
> On 2018-02-12 08:19 PM, Christian Groessler wrote:
> > Hi,
> > 
> > I'm trying to debug a problem in FreeBSD's "dump" command. The dump 
> > command creates 4 or 5 child processes,
> > and in my use case one of them gets a SIGSEGV.
> > 
> > Is it possible to monitor all spawned processes simultaneously? I'm 
> > currently using gdb version 7.12.1 from the FreeBSD ports.
> > I would have to problem to use a newer version of gdb and compile it 
> > locally.
> > 
> > regards,
> > chris
> > 
> 
> Hi Christian,
> 
> If GDB for FreeBSD supports it, you can keep debugging the parent process as
> well as child processes by using "set detach-on-fork off".  John (in CC) may
> give more info about the support for multi process debugging with FreeBSD.

GDB 7.12.1 from ports should support fork following as Simon noted, but that
does only work on FreeBSD versions 9.1 and later.

> You might want to read more about the "all-stop" vs "non-stop" modes in the GDB
> documentation and their related settings.

The FreeBSD native target only supports "all-stop" mode currently.

-- 
John Baldwin


  reply	other threads:[~2018-02-15 23:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13  1:19 Christian Groessler
2018-02-13  1:21 ` Christian Groessler
2018-02-13  1:24 ` Simon Marchi
2018-02-15 23:16   ` John Baldwin [this message]
2018-02-16 11:34     ` Christian Groessler
2018-02-21  1:33       ` John Baldwin

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=1761137.QktPY87a0O@ralph.baldwin.cx \
    --to=jhb@freebsd.org \
    --cc=chris@groessler.org \
    --cc=gdb@sourceware.org \
    --cc=simark@simark.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