From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17748 invoked by alias); 7 Nov 2011 16:10:20 -0000 Received: (qmail 17739 invoked by uid 22791); 7 Nov 2011 16:10:18 -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; Mon, 07 Nov 2011 16:09:46 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RNRlY-0002vX-Cp from pedro_alves@mentor.com ; Mon, 07 Nov 2011 08:09:44 -0800 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 7 Nov 2011 16:09:42 +0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: RFC: remove gdbarch from struct breakpoint Date: Mon, 07 Nov 2011 16:10:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-12-generic; KDE/4.7.2; x86_64; ; ) Cc: Joel Brobecker , Tom Tromey , Ulrich Weigand References: <20111107152058.GD14508@adacore.com> In-Reply-To: <20111107152058.GD14508@adacore.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201111071609.39862.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/msg00156.txt.bz2 On Monday 07 November 2011 15:20:58, Joel Brobecker wrote: > > This patch removes the 'gdbarch' field from struct breakpoint. > > > > In most cases, it is sufficient to replace the use of this field with > > the location's gdbarch instead. In fact, I think the cases in > > tracepoint.c where this is not done are probably latent bugs. > > I think that makes sense. I am trying to figure out how a breakpoint > could have a gdbarch that made some sort of sense when the breakpoint > has two locations and each location had a different gdbarch from > the other.... History behind the fields: http://sourceware.org/ml/gdb-patches/2009-06/msg00215.html and: http://sourceware.org/ml/gdb-patches/2009-07/msg00075.html Reading the first url, I was wondering if we'd indeed need the breakpoint's gdbarch for reparsing conditions and watchpoint expressions (or anything that uses expressions instead of linespecs), but I can't find such dependency in the code. Maybe Ulrich can take a look at this. The Cell combined debugger can maybe reveal hidden dependencies with the gdbarch fallbacks we do. > In most cases, it is sufficient to replace the use of this field with > the location's gdbarch instead. In fact, I think the cases in > tracepoint.c where this is not done are probably latent bugs. Yeah. -- Pedro Alves