From f2da6b3ac39c99dc54916518e57cebadc05b53bf Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 17 May 2006 14:53:02 +0000 Subject: [PATCH] * dwarf2-frame.c: Include "value.h". (read_reg): Use unpack_long and register_type. * Makefile.in (dwarf2-frame.o): Update. --- gdb/ChangeLog | 6 ++++++ gdb/Makefile.in | 3 ++- gdb/dwarf2-frame.c | 9 ++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ab781a4..9e21666 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2006-05-17 Daniel Jacobowitz + * 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 + * remote-rdp.c: Deleted. * NEWS: Mention removal of remote-rdp.c. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 5491351..5af00a7 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1926,7 +1926,8 @@ dwarf2expr.o: dwarf2expr.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) \ 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) \ diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 3f7fbfe..a11aac9 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -32,6 +32,7 @@ #include "symtab.h" #include "objfiles.h" #include "regcache.h" +#include "value.h" #include "gdb_assert.h" #include "gdb_string.h" @@ -218,7 +219,13 @@ read_reg (void *baton, int reg) 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 -- 2.7.4