(read_reg): Use unpack_long and register_type.
* Makefile.in (dwarf2-frame.o): Update.
+2006-05-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf2-frame.c: Include "value.h".
+ (read_reg): Use unpack_long and register_type.
+ * Makefile.in (dwarf2-frame.o): Update.
+
2006-05-17 Daniel Jacobowitz <dan@codesourcery.com>
* remote-rdp.c: Deleted.
dwarf2-frame.o: dwarf2-frame.c $(defs_h) $(dwarf2expr_h) $(elf_dwarf2_h) \
$(frame_h) $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) \
$(gdbtypes_h) $(symtab_h) $(objfiles_h) $(regcache_h) \
- $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h)
+ $(gdb_assert_h) $(gdb_string_h) $(complaints_h) $(dwarf2_frame_h) \
+ $(value_h)
dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \
$(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \
$(regcache_h) $(objfiles_h) $(exceptions_h) $(elf_dwarf2_h) \
#include "symtab.h"
#include "objfiles.h"
#include "regcache.h"
+#include "value.h"
#include "gdb_assert.h"
#include "gdb_string.h"
buf = alloca (register_size (gdbarch, regnum));
frame_unwind_register (next_frame, regnum, buf);
- return extract_typed_address (buf, builtin_type_void_data_ptr);
+
+ /* Convert the register to an integer. This returns a LONGEST
+ rather than a CORE_ADDR, but unpack_pointer does the same thing
+ under the covers, and this makes more sense for non-pointer
+ registers. Maybe read_reg and the associated interfaces should
+ deal with "struct value" instead of CORE_ADDR. */
+ return unpack_long (register_type (gdbarch, regnum), buf);
}
static void