From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5973 invoked by alias); 8 Nov 2011 17:00:20 -0000 Received: (qmail 5876 invoked by uid 22791); 8 Nov 2011 17:00:18 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BJ X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Nov 2011 17:00:01 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA8GxYHX007720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 8 Nov 2011 11:59:34 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pA8GxXvT023846; Tue, 8 Nov 2011 11:59:33 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pA8GxVOK032411; Tue, 8 Nov 2011 11:59:31 -0500 From: Tom Tromey To: "Ulrich Weigand" Cc: pedro@codesourcery.com (Pedro Alves), gdb-patches@sourceware.org, brobecker@adacore.com (Joel Brobecker) Subject: Re: RFC: remove gdbarch from struct breakpoint References: <201111071609.39862.pedro@codesourcery.com> <201111081622.pA8GMAfm019242@d06av02.portsmouth.uk.ibm.com> Date: Tue, 08 Nov 2011 17:00:00 -0000 In-Reply-To: <201111081622.pA8GMAfm019242@d06av02.portsmouth.uk.ibm.com> (Ulrich Weigand's message of "Tue, 8 Nov 2011 17:22:10 +0100 (CET)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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/msg00196.txt.bz2 >>>>> "Ulrich" == Ulrich Weigand writes: Ulrich> Most other architecture-dependent things in breakpoint.c etc really Ulrich> should use a per-location architecture. However, the way the per- Ulrich> location arch is currently chosen is to either determine it from Ulrich> the location --but this works only if we find a symtab!-- or else Ulrich> fall back to the main breakpoint architecture. If we remove that Ulrich> fall back, there will be cases where breakpoints are set at locations Ulrich> with no symtab (e.g. in generated code, stack trampolines, etc.) Ulrich> and we will not find any associated architecture. Ok, I see. Why not just use the location's arch when parsing and re-parsing the expression, though? With my patches this still defaults to the current arch when the breakpoint is set -- this just isn't stored on the breakpoint any more. (Now get_sal_arch tries to get the objfile arch as a fallback, which I hope avoids any missing cases.) Tom