From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23126 invoked by alias); 8 Apr 2011 09:43:20 -0000 Received: (qmail 23115 invoked by uid 22791); 8 Apr 2011 09:43:19 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Apr 2011 09:43:15 +0000 Received: by vxk20 with SMTP id 20so3353750vxk.0 for ; Fri, 08 Apr 2011 02:43:15 -0700 (PDT) Received: by 10.52.180.9 with SMTP id dk9mr2788833vdc.134.1302255795100; Fri, 08 Apr 2011 02:43:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.175.197 with HTTP; Fri, 8 Apr 2011 02:42:55 -0700 (PDT) In-Reply-To: References: <201104061844.01479.pedro@codesourcery.com> <201104062029.52921.pedro@codesourcery.com> From: Kevin Pouget Date: Fri, 08 Apr 2011 09:43:00 -0000 Message-ID: Subject: Re: Multiple remote inferiors To: 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/msg00022.txt.bz2 Hi Pedro, thanks for your answer, I gave it a try, but it seems to behave a bit stran= gely. --> should it be possible to start _two different_ processes from a single GDBServer ? here is what I got (debugging functionPtr and stackoverflow): > $ gdbserver :1234 functionPtr > Process functionPtr created; pid =3D 10820 > Listening on port 1234 > Remote debugging from host 127.0.0.1 > Process functionPtr created; pid =3D 10825 > $ gdb functionPtr > GNU gdb (GDB) Fedora (7.2-46.fc14) > ... > Reading symbols from /home/kevin/travail/arm/perso/root/sample/debug/func= tionPtr...done. > (gdb) target extended-remote :1234 > Remote debugging using :1234 > ... > (gdb) b main > Breakpoint 1 at 0x400533: file ./functionPtr.c, line 8. > (gdb) c > Continuing. > Breakpoint 1, main () at ./functionPtr.c:8 > 8 void (* my_say) (const char *) =3D NULL ; > > (gdb) add-inferior > Added inferior 2 > (gdb) inferior 2 > [Switching to inferior 2 [Thread 0.0] ()] > (gdb) file stackoverflow > Reading symbols from /home/kevin/travail/arm/perso/root/sample/debug/stac= koverflow...done. > (gdb) b main > Breakpoint 2 at 0x400522: file stackoverflow.c, line 10. > (gdb) r > Starting program: /home/kevin/travail/arm/perso/root/sample/debug/stackov= erflow > Ignoring packet error, continuing... GDBServer tries to start=A0 functionPtr twice, as confirmed by the `pstree' > $ pstree | grep functionPtr > =A0=A0 .... bash---gdbserver---2*[functionPtr] is it a bug or a feature a wrong usage of GDB ? but ultimately, what I would like to do is connecting GDB to two *different* gdbservers, ie maintain two TCP connections simultaneously.