This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] read_reg() patch
- From: "Martin M. Hunt" <hunt at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 20 Jul 2004 12:16:51 -0700
- Subject: [RFA] read_reg() patch
- Organization: Red Hat Inc.
2004-07-20 Kevin Buettner and Martin Hunt <hunt@redhat.com>
* dwarf2-frame.c (read_reg): Add a call to
store_unsigned_integer.
This extracts the least significant register_size() bits and
extends it to the size of a pointer. Without this, big-endian
targets where pointer size != register size breaks.
--
Martin M. Hunt <hunt@redhat.com>
Red Hat Inc.
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.36
diff -w -u -r1.36 dwarf2-frame.c
--- dwarf2-frame.c 15 Jun 2004 01:04:19 -0000 1.36
+++ dwarf2-frame.c 20 Jul 2004 18:54:54 -0000
@@ -214,6 +214,8 @@
buf = (char *) alloca (register_size (gdbarch, regnum));
frame_unwind_register (next_frame, regnum, buf);
+ store_unsigned_integer (buf, TYPE_LENGTH (builtin_type_void_data_ptr),
+ extract_unsigned_integer (buf, register_size (gdbarch, regnum)));
return extract_typed_address (buf, builtin_type_void_data_ptr);
}