This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA/RFC] dwarf2-frame read_reg
- From: Michael Snyder <msnyder at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Jim Blandy <jimb at red-bean dot com>, Daniel Jacobowitz <drow at false dot org>
- Date: Tue, 11 Apr 2006 20:34:01 -0700
- Subject: [RFA/RFC] dwarf2-frame read_reg
I want you guys to vett this change. I was getting wrong results
on a target where sizeof (SP) != sizeof (void *). The local func
read_reg was calling extract_unsigned_integer with the wrong size.
2006-04-11 Michael Snyder <msnyder@redhat.com>
* dwarf2-frame.c (read_reg): Use register type instead of
builtin_data_pointer_type to extract register's value.
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.59
diff -p -r1.59 dwarf2-frame.c
*** dwarf2-frame.c 5 Apr 2006 20:01:19 -0000 1.59
--- dwarf2-frame.c 12 Apr 2006 03:30:08 -0000
*************** read_reg (void *baton, int reg)
*** 214,220 ****
buf = alloca (register_size (gdbarch, regnum));
frame_unwind_register (next_frame, regnum, buf);
! return extract_typed_address (buf, builtin_type_void_data_ptr);
}
static void
--- 214,220 ----
buf = alloca (register_size (gdbarch, regnum));
frame_unwind_register (next_frame, regnum, buf);
! return extract_typed_address (buf, register_type (gdbarch, regnum));
}
static void