From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 533 invoked by alias); 6 Apr 2011 17:44:10 -0000 Received: (qmail 519 invoked by uid 22791); 6 Apr 2011 17:44:09 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Apr 2011 17:44:03 +0000 Received: (qmail 28036 invoked from network); 6 Apr 2011 17:44:02 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Apr 2011 17:44:02 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Multiple remote inferiors Date: Wed, 06 Apr 2011 17:44:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-28-generic; KDE/4.6.1; x86_64; ; ) Cc: Kevin Pouget References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104061844.01479.pedro@codesourcery.com> 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/msg00013.txt.bz2 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. Kill 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. > it should theoretically be possible, This is just software, so in theory, anything is possible. :-) > now that multiprocess debugging > has been enabled, so maybe it's because remote.c relies a lot on > global variables? It goes further beyond that. There's only one target_ops stack. Going multi-target would be awesome. -- Pedro Alves