From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22221 invoked by alias); 4 Jun 2009 12:36:27 -0000 Received: (qmail 22207 invoked by uid 22791); 4 Jun 2009 12:36:26 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate4.de.ibm.com (HELO mtagate4.de.ibm.com) (195.212.29.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Jun 2009 12:36:20 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate4.de.ibm.com (8.14.3/8.13.8) with ESMTP id n54Ca1SU152932 for ; Thu, 4 Jun 2009 12:36:01 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n54Ca1ph1581112 for ; Thu, 4 Jun 2009 14:36:01 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n54Ca0OM005661 for ; Thu, 4 Jun 2009 14:36:01 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n54CZxke005634; Thu, 4 Jun 2009 14:35:59 +0200 Message-Id: <200906041235.n54CZxke005634@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Thu, 04 Jun 2009 14:35:59 +0200 Subject: Re: [rfc] Remove current_gdbarch register handling from symbol readers To: uweigand@de.ibm.com (Ulrich Weigand) Date: Thu, 04 Jun 2009 12:36:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <200905201503.n4KF3ofO011061@d12av02.megacenter.de.ibm.com> from "Ulrich Weigand" at May 20, 2009 05:03:50 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2009-06/txt/msg00065.txt.bz2 > this patch removes most of the remaining instances of current_gdbarch > from the symbol readers. These are all related to handling register > numbers. The problem is that during symbol reading, we may not > actually know the GDB register numbers for the target -- those may > change once we actually connect to a target which may provide its > own target description. > > What the patch does is to delay register renaming by storing the > original number from the debug info into SYMBOL_VALUE, and perform > the conversion to a GDB register number only when debug info is > actually used -- at which time we must have a frame context in > order to evaluate "register" symbols, so we can use the correct > architecture. > > This is implemented by extending the SYMBOL_OPS field, which is > currently only used for LOC_COMPUTED types, to also provide > callback routine for LOC_REGISTER (and LOC_REGPARM_ADDR) types. > All symbol readers using those types are adapted to provide > an appropriate implementation of the callback. I've now checked in this patch as well. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com