diff options
author | Kevin Buettner <kevinb@redhat.com> | 2003-04-22 23:18:26 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2003-04-22 23:18:26 +0000 |
commit | 051caad9cbf42e18ac57f9bce21734693ee1f03f (patch) | |
tree | 432bae8fdee1d55e0202f6e7c3a8d07041fa5e11 /gdb/dwarf2loc.c | |
parent | 772968793e153e2091371b08a64eba6a414c040c (diff) | |
download | gdb-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.c | 5 |
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)); |