This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] dwarf2 read_reg


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  <hunt@redhat.com>
 
        * dwarf2-frame.c (read_reg): Use register_size() instead
        of sizeof pointer.

-- 
Martin M. Hunt <hunt@redhat.com>
Red Hat Inc.
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]