From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 130029 invoked by alias); 16 Feb 2018 11:34:36 -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 130019 invoked by uid 89); 16 Feb 2018 11:34:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*Ad:U*chris, baldwin, Baldwin X-HELO: vigilia.groessler.org Received: from vigilia.groessler.org (HELO vigilia.groessler.org) (79.143.177.135) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Feb 2018 11:34:34 +0000 Received: from blasi.groessler.org (p54A55833.dip0.t-ipconnect.de [84.165.88.51]) by vigilia.groessler.org (8.14.7/8.14.6) with ESMTP id w1GBcjs9003983 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=OK); Fri, 16 Feb 2018 12:38:47 +0100 (CET) Subject: Re: debugging a program which spawns multiple children To: John Baldwin Cc: Simon Marchi , "gdb@sourceware.org" References: <9334b884-9d22-2352-7f2d-fe75550b3a45@simark.ca> <1761137.QktPY87a0O@ralph.baldwin.cx> From: Christian Groessler Message-ID: <60e28546-e843-5f81-69ec-74cfc3f9aeb7@groessler.org> Date: Fri, 16 Feb 2018 11:34:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1761137.QktPY87a0O@ralph.baldwin.cx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00095.txt.bz2 On 02/15/18 20:54, John Baldwin wrote: > 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. I have 7.12.1 already installed and am using FreeBSD 10.3. I haven't had time to try this gdb version it out yet... > >> 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. That should be enough. In fact, I want everything to stop when the first SIGSEGV happens... Thanks, chris