/* DWARF 2 location expression support for GDB.
- Copyright (C) 2003-2021 Free Software Foundation, Inc.
+ Copyright (C) 2003-2022 Free Software Foundation, Inc.
This file is part of GDB.
/* Evaluate a location description, starting at DATA and with length
SIZE, to find the current location of variable of TYPE in the context
- of FRAME. */
+ of FRAME. AS_LVAL defines if the resulting struct value is expected to
+ be a value or a location description. */
struct value *dwarf2_evaluate_loc_desc (struct type *type,
struct frame_info *frame,
const gdb_byte *data,
size_t size,
dwarf2_per_cu_data *per_cu,
- dwarf2_per_objfile *per_objfile);
+ dwarf2_per_objfile *per_objfile,
+ bool as_lval = true);
/* A chain of addresses that might be needed to resolve a dynamic
property. */
Returns true if PROP could be converted and the static value is passed
back into VALUE, otherwise returns false.
- If PUSH_INITIAL_VALUE is true, then the top value of ADDR_STACK
- will be pushed before evaluating a location expression. */
+ Any values in PUSH_VALUES will be pushed before evaluating the location
+ expression, PUSH_VALUES[0] will be pushed first, then PUSH_VALUES[1],
+ etc. This means the during evaluation PUSH_VALUES[0] will be at the
+ bottom of the stack. */
bool dwarf2_evaluate_property (const struct dynamic_prop *prop,
struct frame_info *frame,
const struct property_addr_info *addr_stack,
CORE_ADDR *value,
- bool push_initial_value = false);
+ gdb::array_view<CORE_ADDR> push_values = {});
/* A helper for the compiler interface that compiles a single dynamic
property to C code.
extern int dwarf_reg_to_regnum_or_error (struct gdbarch *arch,
ULONGEST dwarf_reg);
+/* Helper function which throws an error if a synthetic pointer is
+ invalid. */
+
+extern void invalid_synthetic_pointer ();
+
/* Fetch the value pointed to by a synthetic pointer. */
extern struct value *indirect_synthetic_pointer
dwarf2_per_objfile *per_objfile, struct frame_info *frame,
struct type *type, bool resolve_abstract_p = false);
-#endif /* dwarf2loc.h */
+#endif /* DWARF2LOC_H */