From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13015 invoked by alias); 31 Oct 2011 09:41:10 -0000 Received: (qmail 12927 invoked by uid 22791); 31 Oct 2011 09:41:08 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Oct 2011 09:40:51 +0000 Received: from nat-jpt.mentorg.com ([192.94.33.2] helo=PR1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RKoML-0000C3-Kl from Yao_Qi@mentor.com ; Mon, 31 Oct 2011 02:40:49 -0700 Received: from [127.0.0.1] ([172.16.63.104]) by PR1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 31 Oct 2011 18:40:46 +0900 Message-ID: <4EAE6D2C.5010700@codesourcery.com> Date: Mon, 31 Oct 2011 12:07:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0) Gecko/20110923 Thunderbird/7.0 MIME-Version: 1.0 To: Tom Tromey CC: gdb-patches@sourceware.org Subject: Re: RFC: don't set the pspace on ordinary breakpoints References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00818.txt.bz2 On 10/27/2011 11:20 PM, Tom Tromey wrote: > First, it changes ordinary breakpoints to set leave their 'pspace' field > NULL. The rationale for this is that, with the ambiguous linespec > patch, a linespec may apply to different program spaces, not just the > one which was selected when the breakpoint was created. For these > breakpoints, we do not want breakpoint_program_space_exit to remove the > breakpoint. > > @@ -5817,9 +5819,11 @@ init_raw_breakpoint (struct breakpoint *b, struct gdbarch *gdbarch, > b->loc->address = adjusted_address; > b->loc->pspace = sal.pspace; > > - /* Store the program space that was used to set the breakpoint, for > - breakpoint resetting. */ > - b->pspace = sal.pspace; > + /* Store the program space that was used to set the breakpoint, > + except for ordinary breakpoints, which are independent of the > + program space. */ > + if (bptype != bp_breakpoint && bptype != bp_hardware_breakpoint) > + b->pspace = sal.pspace; Looks "ordinary breakpoints" includes bp_breakpoint and bp_hardware_breakpoint. However, as you described above, IIUC, 'ambiguous linespec' should apply to trap tracepoint and fast tracepoint as well. -- Yao (齐尧)