From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21544 invoked by alias); 6 Apr 2011 18:50:43 -0000 Received: (qmail 21528 invoked by uid 22791); 6 Apr 2011 18:50:42 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Apr 2011 18:50:36 +0000 Received: by vws4 with SMTP id 4so1773570vws.0 for ; Wed, 06 Apr 2011 11:50:35 -0700 (PDT) Received: by 10.220.92.71 with SMTP id q7mr368745vcm.114.1302115835282; Wed, 06 Apr 2011 11:50:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.175.197 with HTTP; Wed, 6 Apr 2011 11:50:15 -0700 (PDT) In-Reply-To: <201104061844.01479.pedro@codesourcery.com> References: <201104061844.01479.pedro@codesourcery.com> From: Kevin Pouget Date: Wed, 06 Apr 2011 18:50:00 -0000 Message-ID: Subject: Re: Multiple remote inferiors To: Pedro Alves Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2011-04/txt/msg00014.txt.bz2 On Wed, Apr 6, 2011 at 7:44 PM, Pedro Alves wrote: > On Wednesday 06 April 2011 16:02:15, Kevin Pouget wrote: >> Hello, >> >> it looks like it's not possible to connect to several >> remote/extended-remote inferiors at the same time: >> >> (gdb) target remote :1234 >> ... >> (gdb) add-inferior >> Added inferior 2 >> (gdb) inferior 2 >> [Switching to inferior 2 [process 0] ()] >> (gdb) target remote :1235 >> A program is being debugged already. =A0Kill it? (y or n) >> >> and I was wondering what was the reason? > > GDB support multiple processes, but they currently > all need to be behind the same target. > > For remote targets, only extended-remote allows that. > E.g., adding a new inferior with add-inferior, switching > to it, and doing "start", should work. yes, sure, I wanted to use only the "remote" target stack to connect GDB to 2 different inferiors "start" seems not to be used with the remote/extended remote ("No symbol table loaded. Use the "file" command.") target, (gdb) target [extended-]remote is, AFAIK, the only way to initiate such a connection > >> it should theoretically be possible, > > This is just software, so in theory, anything > is possible. =A0:-) :) I meant, "easily feasible with the current GDB implementation!" > It goes further beyond that. =A0There's only one target_ops stack. > Going multi-target would be awesome. yep, sure ! but that's why my initial question only targeted the remote target stack, and (although I'm not sure that's mandatory) the same target architecture Kevin