From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5649 invoked by alias); 8 Jun 2004 04:08:38 -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 5633 invoked from network); 8 Jun 2004 04:08:32 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 8 Jun 2004 04:08:32 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i5848Wi5006930 for ; Tue, 8 Jun 2004 00:08:32 -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 i5848W024024 for ; Tue, 8 Jun 2004 00:08:32 -0400 Received: from hunt.cipe.redhat.com (hunt.cipe.redhat.com [10.0.0.52]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id i5848V17016773 for ; Tue, 8 Jun 2004 00:08:31 -0400 Subject: [RFA] dwarf2 read_reg From: "Martin M. Hunt" To: gdb-patches@sources.redhat.com Content-Type: multipart/mixed; boundary="=-fy45m2N/QTVwPOIqPOIw" Organization: Red Hat Inc. Message-Id: <1086667710.5507.27.camel@hunt.cipe.redhat.com> Mime-Version: 1.0 Date: Tue, 08 Jun 2004 04:08:00 -0000 X-SW-Source: 2004-06/txt/msg00148.txt.bz2 --=-fy45m2N/QTVwPOIqPOIw Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 342 The read_reg() function made an assumption that sizeof pointer was the same as a register size. This broke lots of things for architectures like mips. 2004-05-26 Martin Hunt * dwarf2-frame.c (read_reg): Use register_size() instead of sizeof pointer. -- Martin M. Hunt Red Hat Inc. --=-fy45m2N/QTVwPOIqPOIw Content-Disposition: attachment; filename=040526-1-dwarf2_frame.diff Content-Type: text/x-patch; name=040526-1-dwarf2_frame.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 653 Index: gdb/dwarf2-frame.c =================================================================== RCS file: /cvs/cvsfiles/gnupro/gdb/dwarf2-frame.c,v retrieving revision 1.4.2.1 diff -u -p -u -r1.4.2.1 dwarf2-frame.c --- gdb/dwarf2-frame.c 20 May 2004 03:46:47 -0000 1.4.2.1 +++ gdb/dwarf2-frame.c 25 May 2004 23:29:11 -0000 @@ -214,8 +214,8 @@ read_reg (void *baton, int reg) buf = (char *) alloca (register_size (gdbarch, regnum)); frame_unwind_register (next_frame, regnum, buf); - return extract_typed_address (buf, builtin_type_void_data_ptr); + return extract_signed_integer (buf, register_size (current_gdbarch, regnum)); } static void --=-fy45m2N/QTVwPOIqPOIw--