From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2265 invoked by alias); 9 Jul 2012 20:01:56 -0000 Received: (qmail 2257 invoked by uid 22791); 9 Jul 2012 20:01:55 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Jul 2012 20:01:33 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SoK9E-0006Xr-JW from Vladimir_Prus@mentor.com for gdb@sourceware.org; Mon, 09 Jul 2012 13:01:32 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 9 Jul 2012 13:00:39 -0700 Received: from [172.30.88.164] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Mon, 9 Jul 2012 21:01:30 +0100 Message-ID: <4FFB3899.3080900@codesourcery.com> Date: Mon, 09 Jul 2012 20:01:00 -0000 From: Vladimir Prus User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: Subject: Should detach-on-fork be per-inferiour Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2012-07/txt/msg00007.txt.bz2 At present, it seems like 'detach-on-fork' variable is global for GDB instance. Should it be possible to have this variable, or some other one, working per-inferior. So that, after I attach to a couple of system processes, I can automatically attach to children spawned by one process but not another? Here's the output that illustates what I'm talking about: (gdb) inferior 1 [Switching to inferior 1 [] ()] (gdb) set detach-on-work off No symbol table is loaded. Use the "file" command. (gdb) inferior 2 [Switching to inferior 2 [] ()] (gdb) set detach-on-fork on (gdb) inferior 1 [Switching to inferior 1 [] ()] (gdb) show detach-on-fork Whether gdb will detach the child of a fork is on. Thanks, -- Vladimir Prus CodeSourcery / Mentor Graphics http://www.mentor.com/embedded-software/