From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28866 invoked by alias); 22 Apr 2003 23:48:44 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28859 invoked from network); 22 Apr 2003 23:48:44 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 22 Apr 2003 23:48:44 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h3MNmhD21147 for ; Tue, 22 Apr 2003 19:48:44 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3MNmhq03922 for ; Tue, 22 Apr 2003 19:48:43 -0400 Received: from localhost.localdomain (vpn50-16.rdu.redhat.com [172.16.50.16]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h3MNmhk24172; Tue, 22 Apr 2003 19:48:43 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h3MNmbO04468; Tue, 22 Apr 2003 16:48:37 -0700 Date: Tue, 22 Apr 2003 23:48:00 -0000 From: Kevin Buettner Message-Id: <1030422234837.ZM4467@localhost.localdomain> In-Reply-To: Elena Zannoni "Re: [RFA] dwarf2loc.c: Add missing DWARF2_REG_TO_REGNUM call" (Apr 22, 10:20am) References: <1030421214653.ZM18664@localhost.localdomain> <20030421220254.GA6912@nevyn.them.org> <16037.20395.87464.994345@localhost.redhat.com> To: Elena Zannoni Subject: Re: [RFA] dwarf2loc.c: Add missing DWARF2_REG_TO_REGNUM call Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-04/txt/msg00418.txt.bz2 On Apr 22, 10:20am, Elena Zannoni wrote: > OK from my side, except, could you introduce a new variable 'regnum'? Here's what I committed: * dwarf2loc.c (dwarf2_evaluate_loc_desc): Invoke DWARF2_REG_TO_REGNUM on the DWARF2 register number prior to fetching a register. Index: dwarf2loc.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2loc.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- dwarf2loc.c 13 Apr 2003 15:53:44 -0000 1.6 +++ dwarf2loc.c 22 Apr 2003 23:18:26 -0000 1.7 @@ -223,7 +223,10 @@ dwarf2_evaluate_loc_desc (struct symbol result = dwarf_expr_fetch (ctx, 0); if (ctx->in_reg) - retval = value_from_register (SYMBOL_TYPE (var), result, frame); + { + int regnum = DWARF2_REG_TO_REGNUM (result); + retval = value_from_register (SYMBOL_TYPE (var), regnum, frame); + } else { retval = allocate_value (SYMBOL_TYPE (var));