#include "leb128.h"
#include "gdbtypes.h"
+struct dwarf2_per_objfile;
+
/* The location of a value. */
enum dwarf_value_location
{
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);
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. */
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;