33#include "gdbsupport/underlying.h"
55 throw_error (GENERIC_ERROR,
56 _(
"%s evaluation requires a frame."),
op_name);
64 if (per_cu ==
nullptr)
65 throw_error (GENERIC_ERROR,
66 _(
"%s evaluation requires a compilation unit."),
op_name);
75 return (start % HOST_CHAR_BIT + n_bits + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
114 std::vector<dwarf_expr_piece> &&pieces,
123 c->
pieces = std::move (pieces);
124 if (frame ==
nullptr)
148 LONGEST offset = 0, max_offset;
149 gdb_byte *v_contents;
150 const gdb_byte *from_contents;
153 gdb::byte_vector buffer;
156 gdb_assert (!check_optimized || from ==
nullptr);
160 v_contents =
nullptr;
165 internal_error (_(
"Should not be able to create a lazy value with "
166 "an enclosing type"));
168 v_contents =
nullptr;
171 from_contents =
nullptr;
194 for (i = 0; i < c->
pieces.size () && bits_to_skip >= c->
pieces[i].size; i++)
195 bits_to_skip -= c->
pieces[i].size;
197 for (; i < c->
pieces.size () && offset < max_offset; i++)
200 size_t this_size_bits, this_size;
202 this_size_bits = p->
size - bits_to_skip;
203 if (this_size_bits > max_offset - offset)
204 this_size_bits = max_offset - offset;
220 bits_to_skip += reg_bits - (p->
offset + p->
size);
223 bits_to_skip += p->
offset;
226 buffer.resize (this_size);
233 buffer, &optim, &unavail))
242 if (unavail && !check_optimized)
248 if (!check_optimized)
250 buffer.data (), bits_to_skip % 8,
251 this_size_bits, bits_big_endian);
256 if (bits_to_skip % 8 != 0 || this_size_bits % 8 != 0)
262 buffer, &optim, &unavail);
264 throw_error (OPTIMIZED_OUT_ERROR,
265 _(
"Can't do read-modify-write to "
266 "update bitfield; containing word "
267 "has been optimized out"));
269 throw_error (NOT_AVAILABLE_ERROR,
270 _(
"Can't do read-modify-write to "
271 "update bitfield; containing word "
276 from_contents, offset,
277 this_size_bits, bits_big_endian);
290 bits_to_skip += p->
offset;
292 CORE_ADDR start_addr = p->
v.
mem.
addr + bits_to_skip / 8;
294 if (bits_to_skip % 8 == 0 && this_size_bits % 8 == 0
307 v_contents + offset / 8,
313 buffer.resize (this_size);
321 buffer.data (), this_size);
323 buffer.data (), bits_to_skip % 8,
324 this_size_bits, bits_big_endian);
329 if (bits_to_skip % 8 != 0 || this_size_bits % 8 != 0)
343 &buffer[this_size - 1], 1);
348 from_contents, offset,
349 this_size_bits, bits_big_endian);
369 ULONGEST stack_value_size_bits
373 if (p->
offset + p->
size > stack_value_size_bits)
378 bits_to_skip += stack_value_size_bits - p->
offset - p->
size;
380 bits_to_skip += p->
offset;
385 this_size_bits, bits_big_endian);
401 size_t n = this_size_bits;
404 bits_to_skip += p->
offset;
405 if (bits_to_skip >= literal_size_bits)
407 if (n > literal_size_bits - bits_to_skip)
408 n = literal_size_bits - bits_to_skip;
434 internal_error (_(
"invalid location type"));
437 offset += this_size_bits;
476 for (i = 0; i < c->
pieces.size () && bit_length > 0; i++)
479 size_t this_size_bits = p->
size;
483 if (bit_offset >= this_size_bits)
485 bit_offset -= this_size_bits;
489 bit_length -= this_size_bits - bit_offset;
493 bit_length -= this_size_bits;
522 for (i = 0; i < c->
pieces.size () && bit_length > 0; i++)
525 size_t this_size_bits = p->
size;
539 bit_length -= this_size_bits;
545 error (_(
"Invalid use of DW_OP_implicit_pointer"));
551 gdb_assert (piece != NULL && c->
per_cu !=
nullptr);
592 gdb_assert (closure != NULL);
593 gdb_assert (closure->
pieces.size () == 1);
596 (closure->
pieces[0].v.ptr.die_sect_off,
597 closure->
pieces[0].v.ptr.offset,
653 const char *var_name =
nullptr;
659 error (_(
"Bad DW_OP_GNU_variable_value DIE."));
667 error (_(
"Type of DW_OP_GNU_variable_value DIE must be an integer or pointer."));
669 if (var_name !=
nullptr)
672 if (result !=
nullptr)
691 if (types ==
nullptr)
702 error (_(
"Unsupported address size in DWARF expressions: %d bits"),
708 0,
"<signed DWARF address type>");
717: m_addr_size (addr_size),
718 m_per_objfile (per_objfile)
727 this->
m_stack.emplace_back (value, in_stack_memory);
744 error (_(
"dwarf expression stack underflow"));
754 if (this->
m_stack.size () <= n)
755 error (_(
"Asked for position %d of stack, "
756 "stack only has %zu elements on it."),
772 error (_(
"frame address is not available."));
782 gdb_assert (framefunc != NULL);
800 if (result ==
nullptr)
801 error (_(
"Could not find type for operation"));
815 auto get_pc_from_frame = [frame] ()
826 gdb_assert (
block.per_cu == this->m_per_cu);
872 &caller_per_objfile);
873 const gdb_byte *data_src
879 if (data_src ==
nullptr)
880 throw_error (NO_ENTRY_VALUE_ERROR,
881 _(
"Cannot resolve DW_AT_call_data_value"));
889 scoped_restore save_frame = make_scoped_restore (&this->
m_frame,
891 scoped_restore save_per_cu = make_scoped_restore (&this->
m_per_cu,
893 scoped_restore save_addr_info = make_scoped_restore (&this->
m_addr_info,
895 scoped_restore save_per_objfile = make_scoped_restore (&this->
m_per_objfile,
898 scoped_restore save_addr_size = make_scoped_restore (&this->
m_addr_size);
908 LONGEST subobj_offset,
bool as_lval)
910 value *retval =
nullptr;
916 if (subobj_type ==
nullptr)
926 ULONGEST bit_size = 0;
929 bit_size += piece.size;
937 std::move (this->m_pieces), this->
m_frame);
959 if (subobj_offset != 0)
960 error (_(
"cannot use offset on synthetic pointer to register"));
962 gdb_assert (this->
m_frame != NULL);
984 struct type *ptr_type;
996 switch (subobj_type->
code ())
999 case TYPE_CODE_METHOD:
1009 address + subobj_offset);
1010 if (in_stack_memory)
1019 size_t len = subobj_type->
length ();
1022 if (subobj_offset + len > max)
1029 subobj_offset += n - max;
1038 size_t n = subobj_type->
length ();
1040 if (subobj_offset + n > this->
m_len)
1045 memcpy (contents, this->
m_data + subobj_offset, n);
1059 internal_error (_(
"invalid location type"));
1075 LONGEST subobj_offset)
1092 &&
type->
code () != TYPE_CODE_BOOL)
1093 error (_(
"integral type expected in DWARF expression"));
1113 error (_(
"no unsigned variant found for type, while evaluating "
1114 "DWARF expression"));
1135 error (_(
"no signed variant found for type, while evaluating "
1136 "DWARF expression"));
1161 gdb_byte *buf = (gdb_byte *) alloca (this->
m_addr_size);
1169 return (CORE_ADDR) result;
1177 if (this->
m_stack.size () <= n)
1178 error (_(
"Asked for position %d of stack, "
1179 "stack only has %zu elements on it."),
1181 return this->
m_stack[this->
m_stack.size () - (1 + n)].in_stack_memory;
1257 error (_(
"DWARF expression error: ran off end of buffer reading uleb128 value"));
1269 error (_(
"DWARF expression error: ran off end of buffer reading sleb128 value"));
1278 error (_(
"DWARF expression error: ran off end of buffer reading leb128 value"));
1291 if (op_ptr != op_end && *op_ptr != DW_OP_piece && *op_ptr != DW_OP_bit_piece
1292 && *op_ptr != DW_OP_GNU_uninit)
1293 error (_(
"DWARF-2 expression error: `%s' operations must be "
1294 "used either alone or in conjunction with DW_OP_piece "
1295 "or DW_OP_bit_piece."),
1323 if (*buf >= DW_OP_reg0 && *buf <= DW_OP_reg31)
1325 if (buf_end - buf != 1)
1327 return *buf - DW_OP_reg0;
1330 if (*buf == DW_OP_regval_type || *buf == DW_OP_GNU_regval_type)
1340 else if (*buf == DW_OP_regx)
1349 if (buf != buf_end || (
int) dwarf_reg != dwarf_reg)
1361 CORE_ADDR *deref_size_return)
1369 if (*buf >= DW_OP_breg0 && *buf <= DW_OP_breg31)
1371 dwarf_reg = *buf - DW_OP_breg0;
1376 else if (*buf == DW_OP_bregx)
1382 if ((
int) dwarf_reg != dwarf_reg)
1394 if (*buf == DW_OP_deref)
1397 *deref_size_return = -1;
1399 else if (*buf == DW_OP_deref_size)
1404 *deref_size_return = *buf++;
1420 CORE_ADDR *fb_offset_return)
1427 if (*buf != DW_OP_fbreg)
1434 *fb_offset_return = fb_offset;
1435 if (buf != buf_end || fb_offset != (LONGEST) *fb_offset_return)
1447 const gdb_byte *buf_end, CORE_ADDR *sp_offset_return)
1454 if (*buf >= DW_OP_breg0 && *buf <= DW_OP_breg31)
1456 dwarf_reg = *buf - DW_OP_breg0;
1461 if (*buf != DW_OP_bregx)
1476 *sp_offset_return = sp_offset;
1477 if (buf != buf_end || sp_offset != (LONGEST) *sp_offset_return)
1488 const gdb_byte *op_end)
1505 error (_(
"DWARF-2 expression error: Loop detected (%d)."),
1509 while (op_ptr < op_end)
1511 dwarf_location_atom op = (dwarf_location_atom) *op_ptr++;
1519 bool in_stack_memory =
false;
1520 uint64_t uoffset, reg;
1522 value *result_val = NULL;
1562 result = op - DW_OP_lit0;
1574 if (op_ptr >= op_end || *op_ptr != DW_OP_GNU_push_tls_address)
1580 case DW_OP_GNU_addr_index:
1589 case DW_OP_GNU_const_index:
1685 result = op - DW_OP_reg0;
1699 case DW_OP_implicit_value:
1704 if (op_ptr + len > op_end)
1705 error (_(
"DW_OP_implicit_value: too few bytes available."));
1711 "DW_OP_implicit_value");
1715 case DW_OP_stack_value:
1720 case DW_OP_implicit_pointer:
1721 case DW_OP_GNU_implicit_pointer:
1731 op_ptr += ref_addr_size;
1735 result = (ULONGEST) len;
1740 "DW_OP_implicit_pointer");
1798 const gdb_byte *datastart;
1807 std::vector<dwarf_stack_value> saved_stack = std::move (this->
m_stack);
1814 eval (datastart, datalen);
1821 error (_(
"Not implemented: computing frame "
1822 "base using explicit value operator"));
1823 result = result + offset;
1825 in_stack_memory =
true;
1828 this->
m_stack = std::move (saved_stack);
1835 result_val =
fetch (0);
1845 result_val =
fetch (offset);
1851 if (this->
m_stack.size () < 2)
1852 error (_(
"Not enough elements for "
1853 "DW_OP_swap. Need 2, have %zu."),
1863 result_val =
fetch (1);
1869 if (this->
m_stack.size () < 3)
1870 error (_(
"Not enough elements for "
1871 "DW_OP_rot. Need 3, have %zu."),
1884 case DW_OP_deref_size:
1885 case DW_OP_deref_type:
1886 case DW_OP_GNU_deref_type:
1888 int addr_size = (op == DW_OP_deref ? this->
m_addr_size : *op_ptr++);
1889 gdb_byte *buf = (gdb_byte *) alloca (addr_size);
1895 if (op == DW_OP_deref_type || op == DW_OP_GNU_deref_type)
1898 cu_offset type_die_cu_off = (cu_offset) uoffset;
1904 this->
read_mem (buf, addr, addr_size);
1925 case DW_OP_plus_uconst:
1928 result_val =
fetch (0);
1945 case DW_OP_plus_uconst:
1975 struct value *first, *second;
1984 error (_(
"Incompatible types on DWARF stack"));
1991 result_val =
value_binop (first, second, BINOP_BITWISE_AND);
1994 result_val =
value_binop (first, second, BINOP_DIV);
1997 result_val =
value_binop (first, second, BINOP_SUB);
2017 result_val =
value_binop (first, second, BINOP_MOD);
2019 result_val =
value_cast (orig_type, result_val);
2023 result_val =
value_binop (first, second, BINOP_MUL);
2028 result_val =
value_binop (first, second, BINOP_BITWISE_IOR);
2031 result_val =
value_binop (first, second, BINOP_ADD);
2036 result_val =
value_binop (first, second, BINOP_LSH);
2049 result_val =
value_binop (first, second, BINOP_RSH);
2066 result_val =
value_binop (first, second, BINOP_RSH);
2075 result_val =
value_binop (first, second, BINOP_BITWISE_XOR);
2105 internal_error (_(
"Can't be reached."));
2110 case DW_OP_call_frame_cfa:
2115 in_stack_memory =
true;
2118 case DW_OP_GNU_push_tls_address:
2119 case DW_OP_form_tls_address:
2175 case DW_OP_bit_piece:
2177 uint64_t
size, uleb_offset;
2193 case DW_OP_GNU_uninit:
2194 if (op_ptr != op_end)
2195 error (_(
"DWARF-2 expression error: DW_OP_GNU_uninit must always "
2196 "be the very last op."));
2219 case DW_OP_GNU_variable_value:
2224 sect_offset sect_off
2228 op_ptr += ref_addr_size;
2235 case DW_OP_entry_value:
2236 case DW_OP_GNU_entry_value:
2239 CORE_ADDR deref_size;
2243 if (op_ptr + len > op_end)
2244 error (_(
"DW_OP_entry_value: too few bytes available."));
2261 if (deref_size == -1)
2265 kind_u, deref_size);
2269 error (_(
"DWARF-2 expression error: DW_OP_entry_value is "
2270 "supported only for single DW_OP_reg* "
2271 "or for DW_OP_breg*(0)+DW_OP_deref*"));
2274 case DW_OP_GNU_parameter_ref:
2287 case DW_OP_const_type:
2288 case DW_OP_GNU_const_type:
2291 const gdb_byte *data;
2295 cu_offset type_die_cu_off = (cu_offset) uoffset;
2304 error (_(
"DW_OP_const_type has different sizes for type and data"));
2310 case DW_OP_regval_type:
2311 case DW_OP_GNU_regval_type:
2315 cu_offset type_die_cu_off = (cu_offset) uoffset;
2328 case DW_OP_GNU_convert:
2329 case DW_OP_reinterpret:
2330 case DW_OP_GNU_reinterpret:
2335 cu_offset type_die_cu_off = (cu_offset) uoffset;
2337 if (to_underlying (type_die_cu_off) == 0)
2342 result_val =
fetch (0);
2345 if (op == DW_OP_convert || op == DW_OP_GNU_convert)
2353 error (_(
"DW_OP_reinterpret has wrong size"));
2361 case DW_OP_push_object_address:
2365 && this->m_addr_info->addr == 0))
2366 error (_(
"Location address is not set."));
2373 error (_(
"Unhandled dwarf expression opcode 0x%x"), op);
2377 gdb_assert (result_val != NULL);
2378 push (result_val, in_stack_memory);
struct symbol * block_linkage_function(const struct block *bl)
const struct block * get_frame_block(frame_info_ptr frame, CORE_ADDR *addr_in_block)
void read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
void write_memory_with_notification(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
int longest_to_int(LONGEST)
static LONGEST extract_signed_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
CORE_ADDR dwarf2_frame_cfa(frame_info_ptr this_frame)
const char * op_name(enum exp_opcode opcode)
static value * indirect_pieced_value(value *value)
const gdb_byte * safe_skip_leb128(const gdb_byte *buf, const gdb_byte *buf_end)
static void dwarf_require_integral(struct type *type)
static void read_pieced_value(value *v)
static void ensure_have_per_cu(dwarf2_per_cu_data *per_cu, const char *op_name)
static void write_pieced_value(value *to, value *from)
static size_t bits_to_bytes(ULONGEST start, ULONGEST n_bits)
static void * copy_pieced_value_closure(const value *v)
static void free_pieced_value_closure(value *v)
static const registry< gdbarch >::key< dwarf_gdbarch_types > dwarf_arch_cookie
static int check_pieced_synthetic_pointer(const value *value, LONGEST bit_offset, int bit_length)
static struct type * get_unsigned_type(struct gdbarch *gdbarch, struct type *type)
static bool rw_pieced_value(value *v, value *from, bool check_optimized)
void dwarf_expr_require_composition(const gdb_byte *op_ptr, const gdb_byte *op_end, const char *op_name)
int dwarf_block_to_dwarf_reg_deref(const gdb_byte *buf, const gdb_byte *buf_end, CORE_ADDR *deref_size_return)
const gdb_byte * safe_read_sleb128(const gdb_byte *buf, const gdb_byte *buf_end, int64_t *r)
static piece_closure * allocate_piece_closure(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, std::vector< dwarf_expr_piece > &&pieces, frame_info_ptr frame)
static value * coerce_pieced_ref(const value *value)
static int base_types_equal_p(struct type *t1, struct type *t2)
static void ensure_have_frame(frame_info_ptr frame, const char *op_name)
static const struct lval_funcs pieced_value_funcs
static bool is_optimized_out_pieced_value(value *v)
int dwarf_block_to_sp_offset(struct gdbarch *gdbarch, const gdb_byte *buf, const gdb_byte *buf_end, CORE_ADDR *sp_offset_return)
CORE_ADDR read_addr_from_reg(frame_info_ptr frame, int reg)
const gdb_byte * safe_read_uleb128(const gdb_byte *buf, const gdb_byte *buf_end, uint64_t *r)
int dwarf_block_to_fb_offset(const gdb_byte *buf, const gdb_byte *buf_end, CORE_ADDR *fb_offset_return)
static struct type * get_signed_type(struct gdbarch *gdbarch, struct type *type)
int dwarf_block_to_dwarf_reg(const gdb_byte *buf, const gdb_byte *buf_end)
static value * sect_variable_value(sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
static const gdb_byte * gdb_read_uleb128(const gdb_byte *buf, const gdb_byte *buf_end, uint64_t *r)
@ DWARF_VALUE_IMPLICIT_POINTER
@ DWARF_VALUE_OPTIMIZED_OUT
void dwarf_expr_require_composition(const gdb_byte *, const gdb_byte *, const char *)
static const gdb_byte * gdb_read_sleb128(const gdb_byte *buf, const gdb_byte *buf_end, int64_t *r)
int dwarf_block_to_dwarf_reg_deref(const gdb_byte *buf, const gdb_byte *buf_end, CORE_ADDR *deref_size_return)
const gdb_byte * safe_read_sleb128(const gdb_byte *buf, const gdb_byte *buf_end, int64_t *r)
static const gdb_byte * gdb_skip_leb128(const gdb_byte *buf, const gdb_byte *buf_end)
CORE_ADDR read_addr_from_reg(frame_info_ptr frame, int reg)
const gdb_byte * safe_read_uleb128(const gdb_byte *buf, const gdb_byte *buf_end, uint64_t *r)
int dwarf_block_to_dwarf_reg(const gdb_byte *buf, const gdb_byte *buf_end)
struct value * value_from_register(struct type *type, int regnum, frame_info_ptr frame)
CORE_ADDR address_from_register(int regnum, frame_info_ptr frame)
const struct frame_id null_frame_id
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
void put_frame_register_bytes(frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view< const gdb_byte > buffer)
frame_info_ptr get_selected_frame(const char *message)
frame_info_ptr frame_find_by_id(struct frame_id id)
bool get_frame_register_bytes(frame_info_ptr frame, int regnum, CORE_ADDR offset, gdb::array_view< gdb_byte > buffer, int *optimizedp, int *unavailablep)
CORE_ADDR get_frame_address_in_block(frame_info_ptr this_frame)
struct frame_id get_frame_id(frame_info_ptr fi)
frame_info_ptr get_prev_frame(frame_info_ptr this_frame)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_integer_to_address(struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf)
int gdbarch_sp_regnum(struct gdbarch *gdbarch)
bool gdbarch_integer_to_address_p(struct gdbarch *gdbarch)
enum bfd_endian type_byte_order(const struct type *type)
struct type * lookup_pointer_type(struct type *type)
struct type * arch_integer_type(struct gdbarch *gdbarch, int bit, int unsigned_p, const char *name)
struct type * check_typedef(struct type *type)
@ CALL_SITE_PARAMETER_DWARF_REG
@ CALL_SITE_PARAMETER_PARAM_OFFSET
void invalid_synthetic_pointer(void)
struct call_site_parameter * dwarf_expr_reg_to_entry_parameter(frame_info_ptr frame, enum call_site_parameter_kind kind, union call_site_parameter_u kind_u, dwarf2_per_cu_data **per_cu_return, dwarf2_per_objfile **per_objfile_return)
struct value * indirect_synthetic_pointer(sect_offset die, LONGEST byte_offset, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, frame_info_ptr frame, struct type *type, bool resolve_abstract_p)
int dwarf_reg_to_regnum(struct gdbarch *arch, int dwarf_reg)
int dwarf_reg_to_regnum_or_error(struct gdbarch *arch, ULONGEST dwarf_reg)
value * compute_var_value(const char *name)
void func_get_frame_base_dwarf_block(struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
CORE_ADDR dwarf2_read_addr_index(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, unsigned int addr_index)
static struct type * die_type(struct die_info *, struct dwarf2_cu *)
struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_cu_off(cu_offset offset_in_cu, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, gdb::function_view< CORE_ADDR()> get_frame_pc)
struct type * dwarf2_get_die_type(cu_offset die_offset, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
struct type * dwarf2_fetch_die_type_sect_off(sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, const char **var_name)
int register_size(struct gdbarch *gdbarch, int regnum)
struct type * builtin_uint16
struct type * builtin_int8
struct type * builtin_func_ptr
struct type * builtin_data_ptr
struct type * builtin_uint32
struct type * builtin_uint64
struct type * builtin_int64
struct type * builtin_int
struct type * builtin_int32
struct type * builtin_uint8
struct type * builtin_int16
const gdb_byte * data_value
int ref_addr_size() const
void execute_stack_op(const gdb_byte *op_ptr, const gdb_byte *op_end)
std::vector< dwarf_stack_value > m_stack
const struct property_addr_info * m_addr_info
void eval(const gdb_byte *addr, size_t len)
struct value * fetch(int n)
void push_address(CORE_ADDR value, bool in_stack_memory)
std::vector< dwarf_expr_piece > m_pieces
bool stack_empty_p() const
dwarf_expr_context(dwarf2_per_objfile *per_objfile, int addr_size)
struct type * address_type() const
value * evaluate(const gdb_byte *addr, size_t len, bool as_lval, dwarf2_per_cu_data *per_cu, frame_info_ptr frame, const struct property_addr_info *addr_info=nullptr, struct type *type=nullptr, struct type *subobj_type=nullptr, LONGEST subobj_offset=0)
CORE_ADDR fetch_address(int n)
struct type * get_base_type(cu_offset die_cu_off)
void push(struct value *value, bool in_stack_memory)
void dwarf_call(cu_offset die_cu_off)
int m_max_recursion_depth
dwarf_value_location m_location
dwarf2_per_cu_data * m_per_cu
bool fetch_in_stack_memory(int n)
void push_dwarf_reg_entry_value(call_site_parameter_kind kind, call_site_parameter_u kind_u, int deref_size)
dwarf2_per_objfile * m_per_objfile
value * fetch_result(struct type *type, struct type *subobj_type, LONGEST subobj_offset, bool as_lval)
void get_frame_base(const gdb_byte **start, size_t *length)
void read_mem(gdb_byte *buf, CORE_ADDR addr, size_t length)
void add_piece(ULONGEST size, ULONGEST offset)
struct dwarf_expr_piece::@38::@39 mem
enum dwarf_value_location location
struct dwarf_expr_piece::@38::@40 literal
union dwarf_expr_piece::@38 v
struct dwarf_expr_piece::@38::@41 ptr
struct type * dw_types[3]
struct gdbarch * arch() const
CORE_ADDR text_section_offset() const
dwarf2_per_objfile * per_objfile
dwarf2_per_cu_data * per_cu
std::vector< dwarf_expr_piece > pieces
gdb::array_view< const gdb_byte > valaddr
unsigned short bit_offset() const
CORE_ADDR target_translate_tls_address(struct objfile *objfile, CORE_ADDR offset)
void copy_bitwise(gdb_byte *dest, ULONGEST dest_offset, const gdb_byte *source, ULONGEST source_offset, ULONGEST nbits, int bits_big_endian)
struct value * value_neg(struct value *arg1)
struct value * value_complement(struct value *arg1)
int value_equal(struct value *arg1, struct value *arg2)
int value_less(struct value *arg1, struct value *arg2)
struct value * value_binop(struct value *arg1, struct value *arg2, enum exp_opcode op)
struct value * value_at_lazy(struct type *type, CORE_ADDR addr)
struct value * value_cast(struct type *type, struct value *arg2)
void read_value_memory(struct value *val, LONGEST bit_offset, int stack, CORE_ADDR memaddr, gdb_byte *buffer, size_t length)
struct type * value_type(const struct value *value)
struct value * value_zero(struct type *type, enum lval_type lv)
LONGEST value_embedded_offset(const struct value *value)
LONGEST value_offset(const struct value *value)
gdb::array_view< const gdb_byte > value_contents_all(struct value *value)
LONGEST value_bitsize(const struct value *value)
struct value * value_parent(const struct value *value)
void value_contents_copy(struct value *dst, LONGEST dst_offset, struct value *src, LONGEST src_offset, LONGEST length)
void set_value_initialized(struct value *val, int status)
struct value * allocate_value(struct type *type)
CORE_ADDR value_as_address(struct value *val)
void set_value_stack(struct value *value, int val)
void set_value_offset(struct value *value, LONGEST offset)
struct value * value_from_ulongest(struct type *type, ULONGEST num)
struct value * allocate_optimized_out_value(struct type *type)
gdb::array_view< gdb_byte > value_contents_raw(struct value *value)
struct value * value_from_contents(struct type *type, const gdb_byte *contents)
void mark_value_bits_unavailable(struct value *value, LONGEST offset, LONGEST length)
gdb::array_view< const gdb_byte > value_contents(struct value *value)
void mark_value_bits_optimized_out(struct value *value, LONGEST offset, LONGEST length)
void value_incref(struct value *val)
LONGEST value_as_long(struct value *val)
int value_optimized_out(struct value *value)
struct value * allocate_computed_value(struct type *type, const struct lval_funcs *funcs, void *closure)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
struct type * value_enclosing_type(const struct value *value)
int value_bits_synthetic_pointer(const struct value *value, LONGEST offset, LONGEST length)
struct value * value_from_contents_and_address(struct type *type, const gdb_byte *valaddr, CORE_ADDR address)
LONGEST value_bitpos(const struct value *value)
void * value_computed_closure(const struct value *v)
void value_decref(struct value *val)