summaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-02-17 16:20:37 +0000
committerTom Tromey <tromey@redhat.com>2011-02-17 16:20:37 +0000
commit8d35b3995d73e87826263f02da0fd05190d34638 (patch)
treed611d7380414e6d36ea9a8707ae5d00e3d460efb /gdb/dwarf2loc.h
parent029b4abd8e0cefb1a5441fa21aef6194e2937005 (diff)
downloadgdb-8d35b3995d73e87826263f02da0fd05190d34638.tar.gz
* 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.h')
-rw-r--r--gdb/dwarf2loc.h23
1 files changed, 23 insertions, 0 deletions
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 */