From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30630 invoked by alias); 2 Nov 2011 18:55:02 -0000 Received: (qmail 30583 invoked by uid 22791); 2 Nov 2011 18:55:01 -0000 X-SWARE-Spam-Status: No, hits=-1.7 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; Wed, 02 Nov 2011 18:54:48 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RLfxX-0006I8-07 from pedro_alves@mentor.com ; Wed, 02 Nov 2011 11:54:47 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 2 Nov 2011 18:54:45 +0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: RFC: don't set the pspace on ordinary breakpoints Date: Wed, 02 Nov 2011 18:55:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-12-generic; KDE/4.7.2; x86_64; ; ) Cc: Tom Tromey , Ulrich Weigand References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111021854.42981.pedro@codesourcery.com> 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-11/txt/msg00050.txt.bz2 On Thursday 27 October 2011 16:20:38, Tom Tromey wrote: > I would appreciate comments on this patch. > > This is the second of two patches in preparation for my "ambiguous > linespec" patch. I think they are reasonably independent so I am > sending them separately. > > > This patch does two things. Could have been two independent patches. > 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. I'm not clear how this isn't breaking multi-process without the linespec changes. I mean, if we no longer have a pspace pointer, breakpoint re-setting will no longer work correctly. (breakpoint_re_set -> ... -> prepare_re_set_context) > I looked at removing the pspace field entirely. Internal breakpoints > often set this field, though, and I chose not to touch all this code in > hopes of keeping the patch down to a reasonable size. So, I left the > field and added a special meaning for NULL. > > > Second, this patch removes bp_startup_disabled. Instead, I changed > should_be_inserted to directly examine the location's pspace, and I > changed one spot (update_global_location_list) to use should_be_inserted > to pick this up. I don't think that's correct. During startup, we disable user breakpoints, because the symbols haven't been relocated yet. But, we still need to insert internal breakpoints set at magic addresses (not through symbols), so that we know when the startup is done with. Ulrich? -- Pedro Alves