diff options
author | Joel Brobecker <brobecker@adacore.com> | 2013-11-16 07:33:36 +0400 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2013-11-17 06:59:37 +0400 |
commit | b13704181fe2e5d89f95342d9a173df8b9a1a34c (patch) | |
tree | 96130579c0f9a523807f4828118d1411ce228f83 /gdb/dwarf2expr.c | |
parent | daily update (diff) | |
download | binutils-gdb-b13704181fe2e5d89f95342d9a173df8b9a1a34c.tar.gz binutils-gdb-b13704181fe2e5d89f95342d9a173df8b9a1a34c.tar.bz2 binutils-gdb-b13704181fe2e5d89f95342d9a173df8b9a1a34c.zip |
Rename "read_reg" into "read_addr_from_reg" in struct dwarf_expr_context_funcs
This is to help make it slightly clearer how this method is expected
to extract data from the given register.
gdb/ChangeLog:
* dwarf2expr.h (struct dwarf_expr_context_funcs)
<read_addr_from_reg>: Renames "read_reg".
* dwarf2-frame.c (read_addr_from_reg): Renames "read_reg".
Adjust comment.
(dwarf2_frame_ctx_funcs, execute_stack_op, dwarf2_frame_cache):
Use read_addr_from_reg in place of read_reg.
* dwarf2expr.c (execute_stack_op): Use read_addr_from_reg
in place of read_reg.
* dwarf2loc.c (dwarf_expr_read_addr_from_reg): Renames
dwarf_expr_read_reg.
(dwarf_expr_ctx_funcs): Replace dwarf_expr_read_reg
with dwarf_expr_read_addr_from_reg.
(needs_frame_read_addr_from_reg): Renames needs_frame_read_reg.
(needs_frame_ctx_funcs): Replace needs_frame_read_reg with
needs_frame_read_addr_from_reg.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r-- | gdb/dwarf2expr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c index 25e9dc40a94..69c08c21f18 100644 --- a/gdb/dwarf2expr.c +++ b/gdb/dwarf2expr.c @@ -921,7 +921,8 @@ execute_stack_op (struct dwarf_expr_context *ctx, case DW_OP_breg31: { op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset); - result = (ctx->funcs->read_reg) (ctx->baton, op - DW_OP_breg0); + result = (ctx->funcs->read_addr_from_reg) (ctx->baton, + op - DW_OP_breg0); result += offset; result_val = value_from_ulongest (address_type, result); } @@ -930,7 +931,7 @@ execute_stack_op (struct dwarf_expr_context *ctx, { op_ptr = safe_read_uleb128 (op_ptr, op_end, ®); op_ptr = safe_read_sleb128 (op_ptr, op_end, &offset); - result = (ctx->funcs->read_reg) (ctx->baton, reg); + result = (ctx->funcs->read_addr_from_reg) (ctx->baton, reg); result += offset; result_val = value_from_ulongest (address_type, result); } @@ -955,8 +956,9 @@ execute_stack_op (struct dwarf_expr_context *ctx, if (ctx->location == DWARF_VALUE_MEMORY) result = dwarf_expr_fetch_address (ctx, 0); else if (ctx->location == DWARF_VALUE_REGISTER) - result = (ctx->funcs->read_reg) (ctx->baton, - value_as_long (dwarf_expr_fetch (ctx, 0))); + result = (ctx->funcs->read_addr_from_reg) + (ctx->baton, + value_as_long (dwarf_expr_fetch (ctx, 0))); else error (_("Not implemented: computing frame " "base using explicit value operator")); |