aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2/expr.h')
-rw-r--r--gdb/dwarf2/expr.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/dwarf2/expr.h b/gdb/dwarf2/expr.h
index 2f3d2ce..fd9c2bb 100644
--- a/gdb/dwarf2/expr.h
+++ b/gdb/dwarf2/expr.h
@@ -25,6 +25,8 @@
#include "leb128.h"
#include "gdbtypes.h"
+struct dwarf2_per_objfile;
+
/* The location of a value. */
enum dwarf_value_location
{
@@ -117,7 +119,7 @@ struct dwarf_stack_value
its current state and its callbacks. */
struct dwarf_expr_context
{
- dwarf_expr_context ();
+ dwarf_expr_context (dwarf2_per_objfile *per_objfile);
virtual ~dwarf_expr_context () = default;
void push_address (CORE_ADDR value, bool in_stack_memory);
@@ -139,10 +141,6 @@ struct dwarf_expr_context
context and operations depending on DW_FORM_ref_addr are not allowed. */
int ref_addr_size;
- /* Offset used to relocate DW_OP_addr, DW_OP_addrx, and
- DW_OP_GNU_addr_index arguments. */
- CORE_ADDR offset;
-
/* The current depth of dwarf expression recursion, via DW_OP_call*,
DW_OP_fbreg, DW_OP_push_object_address, etc., and the maximum
depth we'll tolerate before raising an error. */
@@ -185,6 +183,9 @@ struct dwarf_expr_context
two cases need to be handled separately.) */
std::vector<dwarf_expr_piece> pieces;
+ /* We evaluate the expression in the context of this objfile. */
+ dwarf2_per_objfile *per_objfile;
+
/* Return the value of register number REGNUM (a DWARF register number),
read as an address. */
virtual CORE_ADDR read_addr_from_reg (int regnum) = 0;