From 051caad9cbf42e18ac57f9bce21734693ee1f03f Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Tue, 22 Apr 2003 23:18:26 +0000 Subject: [PATCH] * dwarf2loc.c (dwarf2_evaluate_loc_desc): Invoke DWARF2_REG_TO_REGNUM on the DWARF2 register number prior to fetching a register. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2loc.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cfbd9ce5fe7..31199e7a0b7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-04-22 Kevin Buettner + + * dwarf2loc.c (dwarf2_evaluate_loc_desc): Invoke DWARF2_REG_TO_REGNUM + on the DWARF2 register number prior to fetching a register. + 2003-04-22 J. Brobecker * config/pa/tm-hppa.h (SOFT_FLOAT): Delete this macro. diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 8927e8798b5..c236c11f37c 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)); -- 2.30.2