From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3866 invoked by alias); 22 May 2013 18:50:16 -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 3849 invoked by uid 89); 22 May 2013 18:50:14 -0000 X-Spam-SWARE-Status: No, score=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 22 May 2013 18:50:14 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4MIo6Bj001501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 22 May 2013 14:50:06 -0400 Received: from barimba (ovpn-113-72.phx2.redhat.com [10.3.113.72]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4MIo08d002052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 22 May 2013 14:50:01 -0400 From: Tom Tromey To: David Taylor Cc: "gdb\@sourceware.org" Subject: Re: add-inferior / clone-inferior References: <7249.1369061005@usendtaylorx2l> <87bo84l5ad.fsf@fleche.redhat.com> <87ehczhy0c.fsf@fleche.redhat.com> <8702.1369246895@usendtaylorx2l> Date: Wed, 22 May 2013 18:50:00 -0000 In-Reply-To: <8702.1369246895@usendtaylorx2l> (David Taylor's message of "Wed, 22 May 2013 14:21:35 -0400") Message-ID: <87k3mqhmsn.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-05/txt/msg00101.txt.bz2 Tom> One that comes to mind is what target is associated with an inferior Tom> created with add-inferior? How could you change this inferior's target Tom> to connect it to some existing target? David> Perhaps I misunderstand the question. Initially, there is just a dummy David> target. David> Do a command like 'file' and you have an exec target. David> Do a command like 'run' or 'attach' or 'target remote' or 'target David> extended-remote' and your process stratum target is pushed on top of the David> old file stratum target. David> Do a command like 'kill' or 'detach' and your process stratum target is David> popped and you are back at the exec stratum target -- the exec file -- David> at the top of your target stack. I was thinking of a scenario like: I have an existing connection to an extended-remote target, then I want to add an inferior and then run it on that target. I guess something like this would work if "target extended-remote" always did connection sharing: add-inferior -exec whatever target extended-remote server:port run The issue I have is differentiating this from the scenario of: add inferior, connect for the first time, then try to run. Won't this do something different if the remote is already running? I feel like I'm confused somehow. David> . you want to know the full set of inferiors and their targets. David> Seems somewhat esoteric. Perhaps a maint command would be appropriate? I suppose we could just print it in "info inferiors". Tom