From 9f6f94ff251ac7faaed16ff4cc13b6e8a9ad8997 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 17 Feb 2011 16:20:44 +0000 Subject: * 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. --- gdb/dwarf2loc.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gdb/dwarf2loc.h') diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h index ee525061608..96a490e5def 100644 --- a/gdb/dwarf2loc.h +++ b/gdb/dwarf2loc.h @@ -25,6 +25,8 @@ struct symbol_computed_ops; struct objfile; struct dwarf2_per_cu_data; struct dwarf2_loclist_baton; +struct agent_expr; +struct axs_value; /* This header is private to the DWARF-2 reader. It is shared between dwarf2read.c and dwarf2loc.c. */ @@ -106,4 +108,25 @@ struct dwarf2_loclist_baton extern const struct symbol_computed_ops dwarf2_locexpr_funcs; extern const struct symbol_computed_ops dwarf2_loclist_funcs; +/* Compile a DWARF location expression to an agent expression. + + EXPR is the agent expression we are building. + LOC is the agent value we modify. + ARCH is the architecture. + ADDR_SIZE is the size of addresses, in bytes. + OP_PTR is the start of the location expression. + OP_END is one past the last byte of the location expression. + + This will throw an exception for various kinds of errors -- for + example, if the expression cannot be compiled, or if the expression + is invalid. */ + +extern 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); + #endif /* dwarf2loc.h */ -- cgit v1.2.1