From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8276 invoked by alias); 11 Apr 2011 17:16:35 -0000 Received: (qmail 8268 invoked by uid 22791); 11 Apr 2011 17:16:33 -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; Mon, 11 Apr 2011 17:16:29 +0000 Received: (qmail 10607 invoked from network); 11 Apr 2011 17:16:27 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Apr 2011 17:16:27 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Breakpoints and multi-process using the same binary Date: Mon, 11 Apr 2011 17:16:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-28-generic; KDE/4.6.2; x86_64; ; ) Cc: Marc Khouzam References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201104111816.30042.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/msg00031.txt.bz2 On Monday 11 April 2011 15:52:45, Marc Khouzam wrote: > Hi, > > the next release of Eclipse CDT will make use of GDB's great > multi-process (multi-exec) support. Nice work! > > Quick question about breakpoints in that case (with non-stop). > I'm trying to set a breakpoint in a process that has one > thread stopped. The problem is that there is another > process fully running, which uses the same binary > (parent/child of a fork()). > > From what I can see, I cannot set such a breakpoint without > interrupting a thread for each and every process sharing the > binary. > > I just wanted to confirm that this was the right behavior > for GDB. 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. We're likely to get to fix all of this for proper ptsets/itsets support (which we'll be starting on real soon). -- Pedro Alves