aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2003-04-22 23:18:26 +0000
committerKevin Buettner <kevinb@redhat.com>2003-04-22 23:18:26 +0000
commit051caad9cbf42e18ac57f9bce21734693ee1f03f (patch)
tree432bae8fdee1d55e0202f6e7c3a8d07041fa5e11 /gdb/dwarf2loc.c
parent772968793e153e2091371b08a64eba6a414c040c (diff)
downloadgdb-051caad9cbf42e18ac57f9bce21734693ee1f03f.zip
gdb-051caad9cbf42e18ac57f9bce21734693ee1f03f.tar.gz
gdb-051caad9cbf42e18ac57f9bce21734693ee1f03f.tar.bz2
* dwarf2loc.c (dwarf2_evaluate_loc_desc): Invoke DWARF2_REG_TO_REGNUM
on the DWARF2 register number prior to fetching a register.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 8927e87..c236c11 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -223,7 +223,10 @@ dwarf2_evaluate_loc_desc (struct symbol *var, struct frame_info *frame,
result = dwarf_expr_fetch (ctx, 0);
if (ctx->in_reg)
- retval = value_from_register (SYMBOL_TYPE (var), result, frame);
+ {
+ int regnum = DWARF2_REG_TO_REGNUM (result);
+ retval = value_from_register (SYMBOL_TYPE (var), regnum, frame);
+ }
else
{
retval = allocate_value (SYMBOL_TYPE (var));