From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32621 invoked by alias); 8 Apr 2011 10:02:35 -0000 Received: (qmail 32610 invoked by uid 22791); 8 Apr 2011 10:02:34 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Apr 2011 10:02:28 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p38A2Saa005567 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 8 Apr 2011 06:02:28 -0400 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p38A2Ptc006463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 8 Apr 2011 06:02:27 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p38A2Pgo002070; Fri, 8 Apr 2011 12:02:25 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p38A2O2N002069; Fri, 8 Apr 2011 12:02:24 +0200 Date: Fri, 08 Apr 2011 10:02:00 -0000 From: Jan Kratochvil To: Kevin Pouget Cc: gdb@sourceware.org Subject: Re: Multiple remote inferiors Message-ID: <20110408100224.GA29376@host1.jankratochvil.net> References: <201104061844.01479.pedro@codesourcery.com> <201104062029.52921.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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/msg00024.txt.bz2 On Fri, 08 Apr 2011 11:42:55 +0200, Kevin Pouget wrote: > --> should it be possible to start _two different_ processes from a > single GDBServer ? yes, I have already seen it working. > here is what I got (debugging functionPtr and stackoverflow): > > > $ gdbserver :1234 functionPtr I would say --multi should be here. > > GNU gdb (GDB) Fedora (7.2-46.fc14) Reproduced also with: GNU gdb (GDB) 7.3.50.20110408-cvs $ gdbserver --multi :1234 Listening on port 1234 Remote debugging from host 127.0.0.1 Process /home/jkratoch/t/1 created; pid = 1921 Process /home/jkratoch/t/2 created; pid = 1968 $ gdb ~/t/1 GNU gdb (GDB) 7.3.50.20110408-cvs Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/jkratoch/t/1...done. (gdb) target extended-remote localhost:1234 Remote debugging using localhost:1234 (gdb) set remote exec-file /home/jkratoch/t/1 (gdb) start Temporary breakpoint 1 at 0x400483: file 1.c, line 5. Starting program: /home/jkratoch/t/1 Temporary breakpoint 1, main () at 1.c:5 5 return f (); (gdb) add-inferior Added inferior 2 (gdb) inferior 2 [Switching to inferior 2 [Thread 0.0] ()] (gdb) set remote exec-file /home/jkratoch/t/2 (gdb) file /home/jkratoch/t/2 Reading symbols from /home/jkratoch/t/2...done. (gdb) start Temporary breakpoint 2 at 0x400478: file 2.c, line 4. Starting program: /home/jkratoch/t/2 Ignoring packet error, continuing... Ignoring packet error, continuing... Ignoring packet error, continuing... Malformed response to offset query, timeout (gdb) q Thanks, Jan