From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112029 invoked by alias); 13 Feb 2018 01:24:38 -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 112015 invoked by uid 89); 13 Feb 2018 01:24:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HTo:U*chris X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Feb 2018 01:24:36 +0000 Received: from [10.0.0.11] (192-222-251-162.qc.cable.ebox.net [192.222.251.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0341B1E4F4; Mon, 12 Feb 2018 20:24:32 -0500 (EST) Subject: Re: debugging a program which spawns multiple children To: Christian Groessler , "gdb@sourceware.org" References: Cc: John Baldwin From: Simon Marchi Message-ID: <9334b884-9d22-2352-7f2d-fe75550b3a45@simark.ca> Date: Tue, 13 Feb 2018 01:24: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: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-02/txt/msg00088.txt.bz2 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. You might want to read more about the "all-stop" vs "non-stop" modes in the GDB documentation and their related settings. Simon