From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27104 invoked by alias); 15 Feb 2008 17:44:26 -0000 Received: (qmail 27092 invoked by uid 22791); 15 Feb 2008 17:44:26 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate5.de.ibm.com (HELO mtagate5.de.ibm.com) (195.212.29.154) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Feb 2008 17:43:58 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate5.de.ibm.com (8.13.8/8.13.8) with ESMTP id m1FHhtkl098670 for ; Fri, 15 Feb 2008 17:43:55 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 v8.7) with ESMTP id m1FHhtGm2056208 for ; Fri, 15 Feb 2008 18:43:55 +0100 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 m1FHhsij027338 for ; Fri, 15 Feb 2008 17:43:55 GMT 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 m1FHhsnE027334; Fri, 15 Feb 2008 17:43:54 GMT Message-Id: <200802151743.m1FHhsnE027334@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 15 Feb 2008 18:43:54 +0100 Subject: Re: [rfc]: Replace current_gdbarch in sentinel-frame.c To: deuling@de.ibm.com (Markus Deuling) Date: Fri, 15 Feb 2008 17:44:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org (GDB Patches) In-Reply-To: <47B55A49.2040107@de.ibm.com> from "Markus Deuling" at Feb 15, 2008 10:24:25 AM X-Mailer: ELM [version 2.5 PL2] 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: 2008-02/txt/msg00257.txt.bz2 Markus Deuling wrote: > @@ -54,7 +54,7 @@ sentinel_frame_prev_register (struct fra > onto the corresponding hardware register. */ > *optimized = 0; > *lvalp = lval_register; > - *addrp = register_offset_hack (current_gdbarch, regnum); > + *addrp = register_offset_hack (get_frame_arch (next_frame), regnum); > *realnum = regnum; This is not OK -- as the sentinel frame is always the innermost frame, next_frame will always be NULL here. You could use the gdbarch of the sentinel frame's regcache (cache->regcache). However, I think setting the "address" for register values is no longer needed anymore, so the whole call to register_offset_hack (and the function itself) can be removed. Can you try whether simply setting *addrp = 0 works? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com