From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28024 invoked by alias); 15 Feb 2018 23:16:32 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 23689 invoked by uid 89); 15 Feb 2018 23:16:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,DATE_IN_PAST_03_06,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*Ad:U*chris X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Feb 2018 23:16:21 +0000 Received: from ralph.baldwin.cx (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id ADD6410A8C2; Thu, 15 Feb 2018 18:16:19 -0500 (EST) From: John Baldwin To: Simon Marchi Cc: Christian Groessler , "gdb@sourceware.org" Subject: Re: debugging a program which spawns multiple children Date: Thu, 15 Feb 2018 23:16:00 -0000 Message-ID: <1761137.QktPY87a0O@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <9334b884-9d22-2352-7f2d-fe75550b3a45@simark.ca> References: <9334b884-9d22-2352-7f2d-fe75550b3a45@simark.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00094.txt.bz2 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