aboutsummaryrefslogtreecommitdiff
path: root/gdb/sentinel-frame.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-07-22 15:31:52 +0000
committerTom Tromey <tromey@redhat.com>2011-07-22 15:31:52 +0000
commit3543a589b22f9e26af4f71ce737dd9aae3410fda (patch)
tree527a7e87e1d9ae26fba99eb127227758a70c4fe4 /gdb/sentinel-frame.c
parent26ac12805d14072ea51a3e880e7ef1718f9b8d7b (diff)
downloadbinutils-3543a589b22f9e26af4f71ce737dd9aae3410fda.zip
binutils-3543a589b22f9e26af4f71ce737dd9aae3410fda.tar.gz
binutils-3543a589b22f9e26af4f71ce737dd9aae3410fda.tar.bz2
gdb
* amd64-tdep.c (amd64_pseudo_register_read_value): Rename from amd64_pseudo_register_read. Change arguments. Call mark_value_bytes_unavailable when needed. (amd64_init_abi): Use set_gdbarch_pseudo_register_read_value, not set_gdbarch_pseudo_register_read. * sentinel-frame.c (sentinel_frame_prev_register): Use regcache_cooked_read_value. * regcache.h (regcache_cooked_read_value): Declare. * regcache.c (regcache_cooked_read_value): New function. (regcache_cooked_read): Call gdbarch_pseudo_register_read_value if available. * i386-tdep.h (i386_pseudo_register_read_value): Declare. (i386_pseudo_register_read): Remove. * i386-tdep.c (i386_pseudo_register_read_into_value): Rename from i386_pseudo_register_read. Change arguments. Call mark_value_bytes_unavailable when needed. (i386_pseudo_register_read_value): New function. (i386_gdbarch_init): Call set_gdbarch_pseudo_register_read_value, not set_gdbarch_pseudo_register_read. * gdbarch.sh (pseudo_register_read_value): New method. * gdbarch.c, gdbarch.h: Rebuild. * findvar.c (value_from_register): Call get_frame_register_value. gdb/testsuite * gdb.dwarf2/typeddwarf.c: XFAIL 'z' on x86-64. * gdb.dwarf2/typeddwarf.exp (xfail-gdb-test): Add arch_pattern argument. * gdb.dwarf2/typeddwarf-amd64.S: New file.
Diffstat (limited to 'gdb/sentinel-frame.c')
-rw-r--r--gdb/sentinel-frame.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/gdb/sentinel-frame.c b/gdb/sentinel-frame.c
index 6c2f3e0..5d018bd 100644
--- a/gdb/sentinel-frame.c
+++ b/gdb/sentinel-frame.c
@@ -48,25 +48,12 @@ sentinel_frame_prev_register (struct frame_info *this_frame,
void **this_prologue_cache,
int regnum)
{
- struct gdbarch *gdbarch = get_frame_arch (this_frame);
struct frame_unwind_cache *cache = *this_prologue_cache;
struct value *value;
- struct type *regtype = register_type (gdbarch, regnum);
- /* Return the actual value. */
- value = allocate_value (regtype);
- VALUE_LVAL (value) = lval_register;
- VALUE_REGNUM (value) = regnum;
+ value = regcache_cooked_read_value (cache->regcache, regnum);
VALUE_FRAME_ID (value) = get_frame_id (this_frame);
- /* Use the regcache_cooked_read() method so that it, on the fly,
- constructs either a raw or pseudo register from the raw
- register cache. */
- if (regcache_cooked_read (cache->regcache,
- regnum,
- value_contents_raw (value)) == REG_UNAVAILABLE)
- mark_value_bytes_unavailable (value, 0, TYPE_LENGTH (regtype));
-
return value;
}