From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16195 invoked by alias); 8 Sep 2009 19:16:19 -0000 Received: (qmail 15978 invoked by uid 22791); 8 Sep 2009 19:16:14 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_JMF_BL X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Sep 2009 19:16:05 +0000 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KPO00M002T63400@i_mtaout2.012.net.il> for gdb-patches@sourceware.org; Tue, 08 Sep 2009 22:16:02 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.50.163]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KPO004IP2UPSR60@i_mtaout2.012.net.il>; Tue, 08 Sep 2009 22:16:02 +0300 (IDT) Date: Tue, 08 Sep 2009 19:16:00 -0000 From: Eli Zaretskii Subject: Re: [v4 2/2] multi-executable support (new v5 patch included) In-reply-to: <200909081616.18200.pedro@codesourcery.com> To: Pedro Alves Cc: gdb-patches@sourceware.org, marc.khouzam@ericsson.com, vladimir@codesourcery.com Reply-to: Eli Zaretskii Message-id: <83hbvd2qrk.fsf@gnu.org> References: <200909030349.38319.pedro@codesourcery.com> <200909052215.32972.pedro@codesourcery.com> <837hwc4ven.fsf@gnu.org> <200909081616.18200.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00219.txt.bz2 > From: Pedro Alves > Date: Tue, 8 Sep 2009 16:16:16 +0100 > Cc: Marc Khouzam , > Vladimir Prus > > >./gdb ./gdb > (top-gdb) info inferiors > Num Description Executable > * 1 /home/pedro/gdb/sspaces/build/gdb/gdb > > (top-gdb) info inferiors > Num Description Executable > * 1 process 1429 /home/pedro/gdb/sspaces/build/gdb/gdb > > (top-gdb) kill > Kill the program being debugged? (y or n) y > (top-gdb) info inferiors > Num Description Executable > * 1 /home/pedro/gdb/sspaces/build/gdb/gdb > > (top-gdb) add-inferior > Added inferior 2 > 1 inferiors added. > > (top-gdb) info inferiors > Num Description Executable > 2 > * 1 /home/pedro/gdb/sspaces/build/gdb/gdb > > (top-gdb) inferior 2 > [Switching to inferior 2 [process 0] ()] > > (top-gdb) file /home/pedro/gdb/tests/threads > Reading symbols from /home/pedro/gdb/tests/threads...done. > > (top-gdb) info inferiors > Num Description Executable > * 2 /home/pedro/gdb/tests/threads > 1 /home/pedro/gdb/sspaces/build/gdb/gdb > > (top-gdb) start > Temporary breakpoint 4 at 0x400640: file threads.c, line 35. > Starting program: /home/pedro/gdb/tests/threads > [Thread debugging using libthread_db enabled] > > Temporary breakpoint 4, main () at threads.c:35 > 35 long i = 0; > (top-gdb) info inferiors > Num Description Executable > * 2 process 1526 /home/pedro/gdb/tests/threads > 1 /home/pedro/gdb/sspaces/build/gdb/gdb This is what I had in mind, yes. If it really works in practice (and others are happy with this model), then great. > The symbol-spaces concept is still needed and is still there, but > the user doesn't see them anymore. I've moved "info symbol-spaces" > to "maintenanced info symbol-spaces". Maybe rename that to "maintenance info program-spaces". It's quite easy to explain that a ``program space'' is a space in which to run programs. > (gdb) attach 123 > Attached to process 123. > (gdb) info inferiors > Num Description Executable > 1 > * 2 Process 2323 > > It's a shame, and that was one of my main concerns (that we'd > end up getting too stuck in the unix model of things) but I guess > we can live with it somehow. Can't we have that inferior hidden in "info inferiors", like we do with breakpoints set by GDB for its own purposes? > Does this make more sense to you? What do others think? Yes, this makes more sense to me. Yes, I would also like to hear what others think. Thanks.