From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17490 invoked by alias); 11 Apr 2011 18:05:13 -0000 Received: (qmail 17482 invoked by uid 22791); 11 Apr 2011 18:05:12 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from imr4.ericy.com (HELO imr4.ericy.com) (198.24.6.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Apr 2011 18:05:05 +0000 Received: from eusaamw0706.eamcs.ericsson.se ([147.117.20.31]) by imr4.ericy.com (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id p3BI52eZ020549; Mon, 11 Apr 2011 13:05:03 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.203]) by eusaamw0706.eamcs.ericsson.se ([147.117.20.31]) with mapi; Mon, 11 Apr 2011 14:04:57 -0400 From: Marc Khouzam To: "'Pedro Alves'" , "'gdb@sourceware.org'" Date: Mon, 11 Apr 2011 18:05:00 -0000 Subject: RE: Breakpoints and multi-process using the same binary Message-ID: References: <201104111816.30042.pedro@codesourcery.com> In-Reply-To: <201104111816.30042.pedro@codesourcery.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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/msg00032.txt.bz2 > -----Original Message----- > From: Pedro Alves [mailto:pedro@codesourcery.com]=20 > Sent: Monday, April 11, 2011 1:16 PM > To: gdb@sourceware.org > Cc: Marc Khouzam > Subject: Re: Breakpoints and multi-process using the same binary >=20 > On Monday 11 April 2011 15:52:45, Marc Khouzam wrote: > > Hi, > >=20 > > the next release of Eclipse CDT will make use of GDB's great > > multi-process (multi-exec) support. Nice work! > >=20 > > Quick question about breakpoints in that case (with non-stop). > > I'm trying to set a breakpoint in a process that has one=20 > > thread stopped. The problem is that there is another > > process fully running, which uses the same binary > > (parent/child of a fork()). > >=20 > > From what I can see, I cannot set such a breakpoint without > > interrupting a thread for each and every process sharing the=20 > > binary. > >=20 > > I just wanted to confirm that this was the right behavior > > for GDB.=20=20 >=20 > Yeah, it's a current limitation. I've looked at this a > bit after Tom reporting some other multi-process breakage, and > it didn't look like a quick fix. You may not need that > against linux gdbserver since it allows reading/writing > memory even when threads are running, while native linux gdb > doesn't.=20=20 Thanks for mentioning that, I was not aware of it, but did confirm it just now. I was able to set a breakpoint while the inferior was completely running using gdbserver, but=20 only with GDB 7.3 (even 7.2.1 didn't support it). For native gdb (or pre-7.3), I'll have to interrupt a thread for every process before dealing with breakpoints. (I could be more efficient and look for processes that have the same executable, but I won't break my head over that small optimization). > We're likely to get to fix all of this for > proper ptsets/itsets support (which we'll be starting > on real soon). Looking forward to it. Thanks for the quick answer. Marc