aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-02-17 16:20:44 +0000
committerTom Tromey <tromey@redhat.com>2011-02-17 16:20:44 +0000
commit9f6f94ff251ac7faaed16ff4cc13b6e8a9ad8997 (patch)
tree3291ae5bd655545060156cb49a061a11f8fc0970 /gdb/dwarf2loc.c
parent98e16b7718cb6978c9a0bd1919bd1856a3b442cb (diff)
downloadgdb-9f6f94ff251ac7faaed16ff4cc13b6e8a9ad8997.zip
gdb-9f6f94ff251ac7faaed16ff4cc13b6e8a9ad8997.tar.gz
gdb-9f6f94ff251ac7faaed16ff4cc13b6e8a9ad8997.tar.bz2
* dwarf2loc.h (dwarf2_compile_expr_to_ax): Declare.
* dwarf2loc.c (dwarf2_compile_expr_to_ax): Rename from compile_dwarf_to_ax. No longer static. Call dwarf2_compile_cfa_to_ax. (locexpr_tracepoint_var_ref): Update. (loclist_tracepoint_var_ref): Update. * dwarf2-frame.h (dwarf2_compile_cfa_to_ax): Declare. * dwarf2-frame.c (execute_cfa_program): Remove 'this_frame' argument; add 'gdbarch' and 'pc'. (dwarf2_compile_cfa_to_ax): New function. (dwarf2_frame_cache): Update.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 3a297c7..4d31afa 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -1426,11 +1426,11 @@ get_ax_pc (void *baton)
example, if the expression cannot be compiled, or if the expression
is invalid. */
-static void
-compile_dwarf_to_ax (struct agent_expr *expr, struct axs_value *loc,
- struct gdbarch *arch, unsigned int addr_size,
- const gdb_byte *op_ptr, const gdb_byte *op_end,
- struct dwarf2_per_cu_data *per_cu)
+void
+dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
+ struct gdbarch *arch, unsigned int addr_size,
+ const gdb_byte *op_ptr, const gdb_byte *op_end,
+ struct dwarf2_per_cu_data *per_cu)
{
struct cleanup *cleanups;
int i, *offsets;
@@ -1717,8 +1717,8 @@ compile_dwarf_to_ax (struct agent_expr *expr, struct axs_value *loc,
&datastart, &datalen);
op_ptr = read_sleb128 (op_ptr, op_end, &offset);
- compile_dwarf_to_ax (expr, loc, arch, addr_size, datastart,
- datastart + datalen, per_cu);
+ dwarf2_compile_expr_to_ax (expr, loc, arch, addr_size, datastart,
+ datastart + datalen, per_cu);
if (offset != 0)
{
@@ -1955,7 +1955,8 @@ compile_dwarf_to_ax (struct agent_expr *expr, struct axs_value *loc,
break;
case DW_OP_call_frame_cfa:
- unimplemented (op);
+ dwarf2_compile_cfa_to_ax (expr, loc, arch, expr->scope, per_cu);
+ loc->kind = axs_lvalue_memory;
break;
case DW_OP_GNU_push_tls_address:
@@ -2069,9 +2070,9 @@ compile_dwarf_to_ax (struct agent_expr *expr, struct axs_value *loc,
/* DW_OP_call_ref is currently not supported. */
gdb_assert (block.per_cu == per_cu);
- compile_dwarf_to_ax (expr, loc, arch, addr_size,
- block.data, block.data + block.size,
- per_cu);
+ dwarf2_compile_expr_to_ax (expr, loc, arch, addr_size,
+ block.data, block.data + block.size,
+ per_cu);
}
break;
@@ -2673,9 +2674,9 @@ locexpr_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
if (dlbaton->data == NULL || dlbaton->size == 0)
value->optimized_out = 1;
else
- compile_dwarf_to_ax (ax, value, gdbarch, addr_size,
- dlbaton->data, dlbaton->data + dlbaton->size,
- dlbaton->per_cu);
+ dwarf2_compile_expr_to_ax (ax, value, gdbarch, addr_size,
+ dlbaton->data, dlbaton->data + dlbaton->size,
+ dlbaton->per_cu);
}
/* The set of location functions used with the DWARF-2 expression
@@ -2826,8 +2827,8 @@ loclist_tracepoint_var_ref (struct symbol *symbol, struct gdbarch *gdbarch,
if (data == NULL || size == 0)
value->optimized_out = 1;
else
- compile_dwarf_to_ax (ax, value, gdbarch, addr_size, data, data + size,
- dlbaton->per_cu);
+ dwarf2_compile_expr_to_ax (ax, value, gdbarch, addr_size, data, data + size,
+ dlbaton->per_cu);
}
/* The set of location functions used with the DWARF-2 expression