43#include "gdbsupport/selftest.h"
46#include <unordered_set>
47#include "gdbsupport/underlying.h"
48#include "gdbsupport/byte-vector.h"
53 struct type *subobj_type, LONGEST subobj_byte_offset,
bool as_lval =
true);
98 error (_(
"access outside bounds of object "
99 "referenced via synthetic pointer"));
109 const gdb_byte **new_ptr,
110 unrelocated_addr *lowp, unrelocated_addr *highp,
111 enum bfd_endian byte_order,
112 unsigned int addr_size,
115 CORE_ADDR base_mask = ~(~(CORE_ADDR)1 << (addr_size * 8 - 1));
117 if (buf_end - loc_ptr < 2 * addr_size)
125 loc_ptr += addr_size;
131 loc_ptr += addr_size;
134 *lowp = (unrelocated_addr) low;
135 *highp = (unrelocated_addr) high;
138 if ((low & base_mask) == base_mask)
142 if (low == 0 && high == 0)
158 const gdb_byte *loc_ptr,
159 const gdb_byte *buf_end,
160 const gdb_byte **new_ptr,
161 unrelocated_addr *low,
162 unrelocated_addr *high,
163 enum bfd_endian byte_order,
164 unsigned int addr_size,
169 if (loc_ptr == buf_end)
174 case DW_LLE_base_addressx:
184 case DW_LLE_startx_length:
195 *high = (unrelocated_addr) ((uint64_t) *high + u64);
199 case DW_LLE_start_length:
200 if (buf_end - loc_ptr < addr_size)
210 loc_ptr += addr_size;
217 *high = (unrelocated_addr) ((uint64_t) *high + u64);
221 case DW_LLE_end_of_list:
225 case DW_LLE_base_address:
226 if (loc_ptr + addr_size > buf_end)
236 loc_ptr += addr_size;
240 case DW_LLE_offset_pair:
245 *low = (unrelocated_addr) u64;
250 *high = (unrelocated_addr) u64;
254 case DW_LLE_start_end:
255 if (loc_ptr + 2 * addr_size > buf_end)
265 loc_ptr += addr_size;
273 loc_ptr += addr_size;
278 case DW_LLE_startx_endx:
279 case DW_LLE_default_location:
293 const gdb_byte *loc_ptr,
294 const gdb_byte *buf_end,
295 const gdb_byte **new_ptr,
296 unrelocated_addr *low,
297 unrelocated_addr *high,
298 enum bfd_endian byte_order)
300 uint64_t low_index, high_index;
302 if (loc_ptr == buf_end)
307 case DW_LLE_GNU_end_of_list_entry:
311 case DW_LLE_GNU_base_address_selection_entry:
321 case DW_LLE_GNU_start_end_entry:
335 case DW_LLE_GNU_start_length_entry:
341 if (loc_ptr + 4 > buf_end)
345 *high = (unrelocated_addr) ((CORE_ADDR) *high
348 *new_ptr = loc_ptr + 4;
366 size_t *locexpr_length,
const CORE_ADDR pc)
373 int signed_addr_p = bfd_get_sign_extend_vma (
objfile->
obfd.get ());
376 unrelocated_addr unrel_pc = (unrelocated_addr) (pc - text_offset);
378 const gdb_byte *loc_ptr, *buf_end;
380 loc_ptr = baton->
data;
381 buf_end = baton->
data + baton->
size;
385 unrelocated_addr low = {}, high = {};
388 const gdb_byte *new_ptr = NULL;
393 loc_ptr, buf_end, &new_ptr,
394 &low, &high, byte_order);
398 byte_order, addr_size,
403 loc_ptr, buf_end, &new_ptr,
404 &low, &high, byte_order,
405 addr_size, signed_addr_p);
425 error (_(
"dwarf2_find_location_expression: "
426 "Corrupted DWARF expression."));
429 gdb_assert_not_reached (
"bad debug_loc_kind");
442 low = (unrelocated_addr) ((CORE_ADDR) low + (CORE_ADDR) base_address);
443 high = (unrelocated_addr) ((CORE_ADDR) high + (CORE_ADDR) base_address);
453 unsigned int bytes_read;
456 loc_ptr += bytes_read;
459 if (low == high && unrel_pc == low)
465 struct symbol *pc_func = NULL;
472 *locexpr_length = length;
477 if (unrel_pc >= low && unrel_pc < high)
479 *locexpr_length = length;
492 const gdb_byte **start,
size_t *length)
497 *length = symbaton->
size;
498 *start = symbaton->
data;
510 const gdb_byte *start;
512 struct value *result;
517 gdb_assert (
SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location != NULL);
550 const gdb_byte **start,
size_t *length)
567 const gdb_byte *start;
569 struct value *result;
574 gdb_assert (
SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location != NULL);
606 const gdb_byte **start,
size_t *length)
618 error (_(
"Could not find the frame base for \"%s\"."),
629 if (sym.
symbol !=
nullptr)
645 _(
"Entry values and tail call frames debugging is %s.\n"),
653 (
struct gdbarch *call_site_gdbarch,
664 struct type *caller_core_addr_type;
673 throw_error (NO_ENTRY_VALUE_ERROR,
674 _(
"DW_AT_call_target is not specified at %s in %s"),
676 (msym.
minsym == NULL ?
"???"
680 if (caller_frame == NULL)
685 throw_error (NO_ENTRY_VALUE_ERROR,
686 _(
"DW_AT_call_target DWARF block resolving "
687 "requires known frame which is currently not "
688 "available at %s in %s"),
690 (msym.
minsym == NULL ?
"???"
720 throw_error (NO_ENTRY_VALUE_ERROR,
721 _(
"Cannot find function \"%s\" for a call site target "
724 (msym.
minsym == NULL ?
"???"
748 for (
unsigned i = 0; i <
m_loc.addresses.length; ++i)
749 callback (per_objfile->
relocate (
m_loc.addresses.values[i]));
754 internal_error (_(
"invalid call site target kind"));
769 throw_error (NO_ENTRY_VALUE_ERROR,
770 _(
"DW_TAG_call_site resolving failed to find function "
771 "name for address %s"),
775 gdb_assert (
type->
code () == TYPE_CODE_FUNC);
797 std::vector<CORE_ADDR> todo;
800 std::unordered_set<CORE_ADDR> addr_hash;
802 todo.push_back (verify_addr);
803 while (!todo.empty ())
819 [&] (CORE_ADDR target_addr)
821 if (target_addr == verify_addr)
826 throw_error (NO_ENTRY_VALUE_ERROR,
827 _(
"DW_OP_entry_value resolving has found "
828 "function \"%s\" at %s can call itself via tail "
830 (msym.
minsym == NULL ?
"???"
835 if (addr_hash.insert (target_addr).second)
836 todo.push_back (target_addr);
852 (msym.
minsym == NULL ?
"???"
866 gdb::unique_xmalloc_ptr<struct call_site_chain> *resultp,
867 const std::vector<struct call_site *> &chain)
869 long length = chain.size ();
870 int callers, callees, idx;
872 if (*resultp == NULL)
883 memcpy (result->
call_site, chain.data (),
885 resultp->reset (result);
890 for (idx = 0; idx <
length; idx++)
901 for (idx = 0; idx <
length; idx++)
909 for (idx = 0; idx <
callers; idx++)
910 if ((*resultp)->call_site[idx] != chain[idx])
912 (*resultp)->callers = idx;
919 for (idx = 0; idx <
callees; idx++)
920 if ((*resultp)->call_site[(*resultp)->length - 1 - idx]
921 != chain[
length - 1 - idx])
923 (*resultp)->callees = idx;
930 for (idx = 0; idx < (*resultp)->callers; idx++)
933 for (idx = 0; idx < (*resultp)->callees; idx++)
935 (*resultp)->call_site[(*resultp)->length
936 - (*resultp)->callees + idx]);
940 if ((*resultp)->callers == 0 && (*resultp)->callees == 0)
946 resultp->reset (NULL);
953 gdb_assert ((*resultp)->callers + (*resultp)->callees <= (*resultp)->length);
968 gdb::unique_xmalloc_ptr<struct call_site_chain> *resultp,
969 std::vector<struct call_site *> &chain,
970 std::unordered_set<CORE_ADDR> &addr_hash,
974 std::vector<CORE_ADDR> addresses;
975 bool found_exact =
false;
979 if (addr == callee_pc)
982 addresses.push_back (addr);
990 return *resultp !=
nullptr;
993 for (CORE_ADDR target_func_addr : addresses)
995 struct symbol *target_func
999 target_call_site !=
nullptr;
1000 target_call_site = target_call_site->tail_call_next)
1002 if (addr_hash.insert (target_call_site->pc ()).second)
1005 chain.push_back (target_call_site);
1008 addr_hash, target_call_site,
1012 size_t removed = addr_hash.erase (target_call_site->pc ());
1013 gdb_assert (removed == 1);
1026static gdb::unique_xmalloc_ptr<call_site_chain>
1028 CORE_ADDR callee_pc)
1030 CORE_ADDR save_callee_pc = callee_pc;
1031 gdb::unique_xmalloc_ptr<struct call_site_chain> retval;
1038 std::vector<struct call_site *> chain;
1044 std::vector<std::vector<CORE_ADDR>> unvisited_addresses;
1049 throw_error (NO_ENTRY_VALUE_ERROR, _(
"Unable to find function for PC %s"),
1053 std::unordered_set<CORE_ADDR> addr_hash;
1071 throw_error (NO_ENTRY_VALUE_ERROR,
1072 _(
"There are no unambiguously determinable intermediate "
1073 "callers or callees between caller function \"%s\" at %s "
1074 "and callee function \"%s\" at %s"),
1075 (msym_caller.
minsym == NULL
1078 (msym_callee.
minsym == NULL
1090gdb::unique_xmalloc_ptr<call_site_chain>
1092 CORE_ADDR callee_pc)
1094 gdb::unique_xmalloc_ptr<call_site_chain> retval;
1100 catch (
const gdb_exception_error &e)
1102 if (e.error == NO_ENTRY_VALUE_ERROR)
1123 if (kind == parameter->
kind)
1147 CORE_ADDR func_addr, caller_pc;
1154 CORE_ADDR target_addr;
1159 gdb_assert (frame != NULL);
1171 throw_error (NO_ENTRY_VALUE_ERROR,
1172 _(
"DW_OP_entry_value resolving callee gdbarch %s "
1173 "(of %s (%s)) does not match caller gdbarch %s"),
1176 (msym.
minsym == NULL ?
"???"
1181 if (caller_frame == NULL)
1186 throw_error (NO_ENTRY_VALUE_ERROR, _(
"DW_OP_entry_value resolving "
1187 "requires caller of %s (%s)"),
1189 (msym.
minsym == NULL ?
"???"
1198 [&] (CORE_ADDR addr)
1203 if (addr == func_addr)
1212 throw_error (NO_ENTRY_VALUE_ERROR,
1213 _(
"DW_OP_entry_value resolving expects callee %s at %s %s"
1214 "but the called frame is for %s at %s"),
1215 (target_msym == NULL ?
"???"
1219 ? _(
"(but note there are multiple addresses not listed)")
1221 func_msym == NULL ?
"???" : func_msym->
print_name (),
1242 throw_error (NO_ENTRY_VALUE_ERROR, _(
"Cannot find matching parameter "
1243 "at DW_TAG_call_site %s at %s"),
1263static struct value *
1265 CORE_ADDR deref_size,
struct type *
type,
1270 const gdb_byte *data_src;
1273 data_src = deref_size == -1 ? parameter->
value : parameter->
data_value;
1277 if (data_src == NULL)
1278 throw_error (NO_ENTRY_VALUE_ERROR,
1279 _(
"Cannot resolve DW_AT_call_data_value"));
1282 per_objfile,
false);
1289static struct value *
1293 struct value *target_val;
1349 struct value *outer_val, *target_val, *val;
1356 &caller_per_objfile);
1361 caller_per_objfile);
1374 target_type, caller_frame,
1376 caller_per_objfile);
1384 checked_type->
length ());
1397static struct value *
1399 const gdb_byte *
block,
size_t block_len)
1415 throw_error (NO_ENTRY_VALUE_ERROR,
1416 _(
"DWARF-2 expression error: DW_OP_entry_value is supported "
1417 "only for single DW_OP_reg* or for DW_OP_fbreg(*)"));
1422static struct value *
1428 struct value *result = NULL;
1429 const gdb_byte *bytes;
1432 auto_obstack temp_obstack;
1434 &temp_obstack, &len);
1438 if (byte_offset >= 0
1441 bytes += byte_offset;
1460 bool resolve_abstract_p)
1463 auto get_frame_address_in_block_wrapper = [frame] ()
1469 get_frame_address_in_block_wrapper,
1470 resolve_abstract_p);
1475 if (orig_type == NULL)
1481 if (baton.
data != NULL)
1498static struct value *
1500 const gdb_byte *data,
size_t size,
1503 struct type *subobj_type,
1504 LONGEST subobj_byte_offset,
1507 if (subobj_type == NULL)
1510 subobj_byte_offset = 0;
1512 else if (subobj_byte_offset < 0)
1525 retval = ctx.
evaluate (data,
size, as_lval, per_cu, frame,
nullptr,
1526 type, subobj_type, subobj_byte_offset);
1528 catch (
const gdb_exception_error &ex)
1530 if (ex.error == NOT_AVAILABLE_ERROR)
1538 else if (ex.error == NO_ENTRY_VALUE_ERROR)
1554 value_ref_ptr value_holder = value_ref_ptr::new_reference (retval);
1557 return retval->
copy ();
1565 const gdb_byte *data,
size_t size,
1570 per_objfile, NULL, 0, as_lval);
1590 gdb::array_view<CORE_ADDR> push_values,
1593 if (dlbaton == NULL || dlbaton->
size == 0)
1604 for (
const auto &val : push_values)
1610 true, per_cu, frame, addr_stack);
1612 catch (
const gdb_exception_error &ex)
1614 if (ex.error == NOT_AVAILABLE_ERROR)
1618 else if (ex.error == NO_ENTRY_VALUE_ERROR)
1636 *is_reference =
false;
1651 gdb::array_view<CORE_ADDR> push_values)
1664 switch (prop->
kind ())
1673 value, push_values, &is_reference))
1695 const CORE_ADDR neg_mask
1696 = (~((CORE_ADDR) 0) << (addr_size - 1));
1699 if (*
value & neg_mask)
1712 const gdb_byte *data;
1745 for (pinfo = addr_stack; pinfo != NULL; pinfo = pinfo->
next)
1753 error (_(
"cannot find reference address for offset property"));
1754 if (pinfo->
valaddr.data () != NULL)
1784 const char *result_name,
1786 std::vector<bool> ®isters_used,
1792 const gdb_byte *data;
1816 data, data +
size, per_cu, per_objfile);
1829 bfd_endian byte_order,
1838 return symbol_needs;
1840 const gdb_byte *expr_end =
expr.data () +
expr.size ();
1844 std::vector<const gdb_byte *> ops_to_visit;
1847 std::unordered_set<const gdb_byte *> visited_ops;
1851 auto insert_in_ops_to_visit
1852 = [expr_end, &visited_ops, &ops_to_visit] (
const gdb_byte *op_ptr)
1854 if (op_ptr >= expr_end)
1857 if (visited_ops.find (op_ptr) != visited_ops.end ())
1860 ops_to_visit.push_back (op_ptr);
1865 const int max_depth = 256;
1867 if (depth > max_depth)
1868 error (_(
"DWARF-2 expression error: Loop detected."));
1873 insert_in_ops_to_visit (&
expr[0]);
1875 while (!ops_to_visit.empty ())
1878 const gdb_byte *op_ptr = ops_to_visit.back ();
1879 ops_to_visit.pop_back ();
1880 gdb_assert (visited_ops.find (op_ptr) == visited_ops.end ());
1881 visited_ops.insert (op_ptr);
1883 dwarf_location_atom op = (dwarf_location_atom) *op_ptr;
1930 case DW_OP_stack_value:
1957 case DW_OP_GNU_push_tls_address:
1959 case DW_OP_GNU_uninit:
1960 case DW_OP_push_object_address:
1963 case DW_OP_form_tls_address:
1969 case DW_OP_GNU_convert:
1970 case DW_OP_reinterpret:
1971 case DW_OP_GNU_reinterpret:
1973 case DW_OP_GNU_addr_index:
1974 case DW_OP_GNU_const_index:
1976 case DW_OP_plus_uconst:
1985 case DW_OP_bit_piece:
1990 case DW_OP_deref_type:
1991 case DW_OP_GNU_deref_type:
1997 op_ptr += addr_size;
2087 case DW_OP_call_frame_cfa:
2088 case DW_OP_entry_value:
2089 case DW_OP_GNU_entry_value:
2090 case DW_OP_GNU_parameter_ref:
2091 case DW_OP_regval_type:
2092 case DW_OP_GNU_regval_type:
2096 case DW_OP_implicit_value:
2104 case DW_OP_implicit_pointer:
2105 case DW_OP_GNU_implicit_pointer:
2106 op_ptr += ref_addr_size;
2110 case DW_OP_deref_size:
2130 insert_in_ops_to_visit (op_ptr +
offset);
2131 insert_in_ops_to_visit (op_ptr);
2138 unsigned int len = op == DW_OP_call2 ? 2 : 4;
2159 gdb::array_view<const gdb_byte> sub_expr (baton.
data,
2173 case DW_OP_GNU_variable_value:
2175 sect_offset sect_off
2179 op_ptr += ref_addr_size;
2186 error (_(
"Bad DW_OP_GNU_variable_value DIE."));
2193 error (_(
"Type of DW_OP_GNU_variable_value DIE must be "
2194 "an integer or pointer."));
2212 gdb::array_view<const gdb_byte> sub_expr (baton.
data,
2226 case DW_OP_const_type:
2227 case DW_OP_GNU_const_type:
2231 gdb_byte offset = *op_ptr++;
2237 error (_(
"Unhandled DWARF expression opcode 0x%x"), op);
2245 insert_in_ops_to_visit (op_ptr);
2248 return symbol_needs;
2254static void ATTRIBUTE_NORETURN
2257 const char *
name = get_DW_OP_name (op);
2260 error (_(
"DWARF operator %s cannot be translated to an agent expression"),
2263 error (_(
"Unknown DWARF operator 0x%02x cannot be translated "
2264 "to an agent expression"),
2281 complaint (_(
"bad DWARF register number %d"), dwarf_reg);
2295 if ((
int) dwarf_reg == dwarf_reg)
2296 error (_(
"Unable to access DWARF register number %d"), (
int) dwarf_reg);
2297 error (_(
"Unable to access DWARF register number %s"),
2298 pulongest (dwarf_reg));
2308 if (dwarf_reg > INT_MAX)
2327 ULONGEST nbytes = (nbits + 7) / 8;
2329 gdb_assert (nbytes > 0 && nbytes <=
sizeof (LONGEST));
2336 else if (nbits <= 16)
2338 else if (nbits <= 32)
2344 if (8 * nbytes == nbits)
2376 unsigned int addr_size,
const gdb_byte *op_ptr,
2377 const gdb_byte *op_end,
2382 std::vector<int> dw_labels, patches;
2383 const gdb_byte *
const base = op_ptr;
2384 const gdb_byte *previous_piece = op_ptr;
2386 ULONGEST bits_collected = 0;
2387 unsigned int addr_size_bits = 8 * addr_size;
2388 bool bits_big_endian = byte_order == BFD_ENDIAN_BIG;
2390 std::vector<int> offsets (op_end - op_ptr, -1);
2395 while (op_ptr < op_end)
2397 enum dwarf_location_atom op = (
enum dwarf_location_atom) *op_ptr;
2398 uint64_t uoffset, reg;
2402 offsets[op_ptr - base] =
expr->buf.size ();
2460 op_ptr += addr_size;
2465 if (op_ptr >= op_end || *op_ptr != DW_OP_GNU_push_tls_address)
2564 case DW_OP_implicit_value:
2569 if (op_ptr + len > op_end)
2570 error (_(
"DW_OP_implicit_value: too few bytes available."));
2571 if (len >
sizeof (ULONGEST))
2572 error (_(
"Cannot translate DW_OP_implicit_value of %d bytes"),
2579 "DW_OP_implicit_value");
2585 case DW_OP_stack_value:
2648 const gdb_byte *datastart;
2650 const struct block *b;
2651 struct symbol *framefunc;
2656 error (_(
"No block found for address"));
2661 error (_(
"No function found for block"));
2664 &datastart, &datalen);
2668 datastart + datalen, per_cu,
2709 case DW_OP_deref_size:
2713 if (op == DW_OP_deref_size)
2719 error (_(
"Unsupported size %d in %s"),
2720 size, get_DW_OP_name (op));
2753 case DW_OP_plus_uconst:
2871 case DW_OP_call_frame_cfa:
2874 CORE_ADDR text_offset;
2876 const gdb_byte *cfa_start, *cfa_end;
2880 &text_offset, &cfa_start, &cfa_end))
2895 cfa_end, per_cu, per_objfile);
2902 case DW_OP_GNU_push_tls_address:
2903 case DW_OP_form_tls_address:
2907 case DW_OP_push_object_address:
2915 dw_labels.push_back (op_ptr + offset - base);
2916 patches.push_back (i);
2925 dw_labels.push_back (op_ptr + offset - base);
2926 patches.push_back (i);
2933 case DW_OP_bit_piece:
2937 if (op_ptr - 1 == previous_piece)
2938 error (_(
"Cannot translate empty pieces to agent expressions"));
2939 previous_piece = op_ptr - 1;
2942 if (op == DW_OP_piece)
2950 if (bits_collected +
size > 8 *
sizeof (LONGEST))
2951 error (_(
"Expression pieces exceed word size"));
2977 if (bits_collected > 0)
2979 if (bits_big_endian)
2995 bits_collected +=
size;
3000 case DW_OP_GNU_uninit:
3007 int size = (op == DW_OP_call2 ? 2 : 4);
3012 auto get_frame_pc_from_expr = [
expr] ()
3016 cu_offset cuoffset = (cu_offset) uoffset;
3018 get_frame_pc_from_expr);
3029 case DW_OP_call_ref:
3032 case DW_OP_GNU_variable_value:
3041 for (
int i = 0; i < patches.size (); ++i)
3043 int targ = offsets[dw_labels[i]];
3045 internal_error (_(
"invalid label"));
3053static struct value *
3071static struct value *
3091 gdb::array_view<const gdb_byte>
expr (dlbaton->
data, dlbaton->
size);
3107 return data == end ||
data[0] == DW_OP_piece ||
data[0] == DW_OP_bit_piece;
3127 return _(
"bad_register_number");
3138static const gdb_byte *
3142 const gdb_byte *
data,
const gdb_byte *end,
3143 unsigned int addr_size)
3149 if (data[0] >= DW_OP_reg0 && data[0] <= DW_OP_reg31)
3155 else if (data[0] == DW_OP_regx)
3163 else if (data[0] == DW_OP_fbreg)
3165 const struct block *b;
3166 struct symbol *framefunc;
3168 int64_t frame_offset;
3169 const gdb_byte *base_data, *new_data, *save_data = data;
3171 int64_t base_offset = 0;
3181 error (_(
"No block found for address for symbol \"%s\"."),
3187 error (_(
"No function found for block for symbol \"%s\"."),
3192 if (base_data[0] >= DW_OP_breg0 && base_data[0] <= DW_OP_breg31)
3194 const gdb_byte *buf_end;
3196 frame_reg = base_data[0] - DW_OP_breg0;
3199 if (buf_end != base_data + base_size)
3200 error (_(
"Unexpected opcode after "
3201 "DW_OP_breg%u for symbol \"%s\"."),
3204 else if (base_data[0] >= DW_OP_reg0 && base_data[0] <= DW_OP_reg31)
3207 frame_reg = base_data[0] - DW_OP_reg0;
3218 _(
"a variable at frame base reg $%s offset %s+%s"),
3220 plongest (base_offset), plongest (frame_offset));
3222 else if (data[0] >= DW_OP_breg0 && data[0] <= DW_OP_breg31
3230 _(
"a variable at offset %s from base reg $%s"),
3249 else if (data + 1 + addr_size < end
3250 && (data[0] == DW_OP_addr
3251 || (addr_size == 4 && data[0] == DW_OP_const4u)
3252 || (addr_size == 8 && data[0] == DW_OP_const8u))
3253 && (data[1 + addr_size] == DW_OP_GNU_push_tls_address
3254 || data[1 + addr_size] == DW_OP_form_tls_address)
3262 _(
"a thread-local variable at offset 0x%s "
3263 "in the thread-local storage for `%s'"),
3266 data += 1 + addr_size + 1;
3273 else if (data + 3 <= end
3274 && data + 1 + (
leb128_size = skip_leb128 (data + 1, end)) < end
3275 && data[0] == DW_OP_GNU_const_index
3277 && (data[1 +
leb128_size] == DW_OP_GNU_push_tls_address
3278 || data[1 +
leb128_size] == DW_OP_form_tls_address)
3286 _(
"a thread-local variable at offset 0x%s "
3287 "in the thread-local storage for `%s'"),
3292 else if (data[0] >= DW_OP_lit0
3293 && data[0] <= DW_OP_lit31
3295 && data[1] == DW_OP_stack_value)
3297 gdb_printf (stream, _(
"the constant %d"), data[0] - DW_OP_lit0);
3311static const gdb_byte *
3314 int offset_size,
const gdb_byte *start,
3315 const gdb_byte *data,
const gdb_byte *end,
3316 int indent,
int all,
3322 || (data[0] != DW_OP_piece && data[0] != DW_OP_bit_piece)))
3324 enum dwarf_location_atom op = (
enum dwarf_location_atom) *data++;
3329 name = get_DW_OP_name (op);
3332 error (_(
"Unrecognized DWARF opcode 0x%02x at %ld"),
3333 op, (
long) (data - 1 - start));
3335 (
long) (data - 1 - start),
name);
3343 gdb_printf (stream,
" 0x%s", phex_nz (ul, addr_size));
3442 gdb_printf (stream,
" %s [$%s]", pulongest (ul),
3446 case DW_OP_implicit_value:
3485 gdb_printf (stream,
" %s [$%s]", plongest (l),
3492 gdb_printf (stream,
" register %s [$%s] offset %s",
3503 case DW_OP_xderef_size:
3504 case DW_OP_deref_size:
3510 case DW_OP_plus_uconst:
3519 (
long) (data + l - start));
3526 (
long) (data + l - start));
3532 gdb_printf (stream,
" offset %s", phex_nz (ul, 2));
3538 gdb_printf (stream,
" offset %s", phex_nz (ul, 4));
3541 case DW_OP_call_ref:
3544 data += offset_size;
3545 gdb_printf (stream,
" offset %s", phex_nz (ul, offset_size));
3550 gdb_printf (stream,
" %s (bytes)", pulongest (ul));
3553 case DW_OP_bit_piece:
3559 gdb_printf (stream,
" size %s offset %s (bits)",
3560 pulongest (ul), pulongest (offset));
3564 case DW_OP_implicit_pointer:
3565 case DW_OP_GNU_implicit_pointer:
3569 data += offset_size;
3574 phex_nz (ul, offset_size),
3579 case DW_OP_deref_type:
3580 case DW_OP_GNU_deref_type:
3582 int deref_addr_size = *data++;
3586 cu_offset offset = (cu_offset) ul;
3591 phex_nz (to_underlying (offset), 0),
3596 case DW_OP_const_type:
3597 case DW_OP_GNU_const_type:
3602 cu_offset type_die = (cu_offset) ul;
3607 phex_nz (to_underlying (type_die), 0));
3611 for (
int i = 0; i < n; ++i)
3617 case DW_OP_regval_type:
3618 case DW_OP_GNU_regval_type:
3625 cu_offset type_die = (cu_offset) ul;
3631 phex_nz (to_underlying (type_die), 0),
3637 case DW_OP_GNU_convert:
3638 case DW_OP_reinterpret:
3639 case DW_OP_GNU_reinterpret:
3642 cu_offset type_die = (cu_offset) ul;
3644 if (to_underlying (type_die) == 0)
3654 phex_nz (to_underlying (type_die), 0));
3659 case DW_OP_entry_value:
3660 case DW_OP_GNU_entry_value:
3664 start, data, data + ul, indent + 2,
3665 all, per_cu, per_objfile);
3669 case DW_OP_GNU_parameter_ref:
3672 gdb_printf (stream,
" offset %s", phex_nz (ul, 4));
3676 case DW_OP_GNU_addr_index:
3679 gdb_printf (stream,
" 0x%s", phex_nz (ul, addr_size));
3682 case DW_OP_GNU_const_index:
3688 case DW_OP_GNU_variable_value:
3691 data += offset_size;
3692 gdb_printf (stream,
" offset %s", phex_nz (ul, offset_size));
3709 _(
"Whether to always disassemble "
3710 "DWARF expressions is %s.\n"),
3720 const gdb_byte *data,
size_t size,
3721 unsigned int addr_size,
3725 const gdb_byte *end = data +
size;
3726 int first_piece = 1, bad = 0;
3731 const gdb_byte *here = data;
3732 int disassemble = 1;
3742 addr, per_cu, per_objfile,
3743 data, end, addr_size);
3747 || data[0] == DW_OP_piece
3748 || data[0] == DW_OP_bit_piece)
3753 gdb_printf (stream, _(
"a complex DWARF expression:\n"));
3756 addr_size, offset_size, data,
3759 per_cu, per_objfile);
3764 int empty = data == here;
3768 if (data[0] == DW_OP_piece)
3775 gdb_printf (stream, _(
"an empty %s-byte piece"),
3781 else if (data[0] == DW_OP_bit_piece)
3783 uint64_t
bits, offset;
3790 _(
"an empty %s-bit piece"),
3794 _(
" [%s-bit piece, offset %s bits]"),
3795 pulongest (
bits), pulongest (offset));
3805 if (bad || data > end)
3806 error (_(
"Corrupted DWARF2 expression for \"%s\"."),
3824 addr_size, offset_size,
3839 if (dlbaton->
size == 0)
3852 std::vector<bool> ®isters_used,
3853 CORE_ADDR pc,
const char *result_name)
3859 if (dlbaton->
size == 0)
3860 error (_(
"symbol \"%s\" is optimized out"), sym->
natural_name ());
3863 sym, pc,
gdbarch, registers_used, addr_size,
3886static struct value *
3892 const gdb_byte *data;
3911static struct value *
3916 const gdb_byte *
data;
3955 const gdb_byte *loc_ptr, *buf_end;
3962 int signed_addr_p = bfd_get_sign_extend_vma (
objfile->
obfd.get ());
3966 loc_ptr = dlbaton->
data;
3967 buf_end = dlbaton->
data + dlbaton->
size;
3974 unrelocated_addr low = {}, high = {};
3977 const gdb_byte *new_ptr = NULL;
3982 loc_ptr, buf_end, &new_ptr,
3983 &low, &high, byte_order);
3987 byte_order, addr_size,
3992 loc_ptr, buf_end, &new_ptr,
3993 &low, &high, byte_order,
3994 addr_size, signed_addr_p);
4003 base_address = high;
4015 error (_(
"Corrupted DWARF expression for symbol \"%s\"."),
4019 gdb_assert_not_reached (
"bad debug_loc_kind");
4025 low = (unrelocated_addr) ((CORE_ADDR) low
4026 + (CORE_ADDR) base_address);
4027 high = (unrelocated_addr) ((CORE_ADDR) high
4028 + (CORE_ADDR) base_address);
4031 CORE_ADDR low_reloc = per_objfile->
relocate (low);
4032 CORE_ADDR high_reloc = per_objfile->
relocate (high);
4041 unsigned int bytes_read;
4043 loc_ptr += bytes_read;
4054 addr_size, offset_size,
4055 dlbaton->
per_cu, per_objfile);
4071 const gdb_byte *
data;
4088 std::vector<bool> ®isters_used,
4089 CORE_ADDR pc,
const char *result_name)
4094 const gdb_byte *
data;
4099 error (_(
"symbol \"%s\" is optimized out"), sym->
natural_name ());
4102 sym, pc,
gdbarch, registers_used, addr_size,
4126 _(
"Set entry values and tail call frames "
4128 _(
"Show entry values and tail call frames "
4130 _(
"When non-zero, the process of determining "
4131 "parameter values from function entry point "
4132 "and tail call frames will be printed."),
4139Set whether `info address' always disassembles DWARF expressions."), _(
"\
4140Show whether `info address' always disassembles DWARF expressions."), _(
"\
4141When enabled, DWARF expressions are always printed in an assembly-like\n\
4142syntax. When disabled, expressions will be printed in a more\n\
4143conversational style, when possible."),
#define bits(obj, st, fn)
void require_rvalue(struct agent_expr *ax, struct axs_value *value)
void ax_label(struct agent_expr *x, int patch, int target)
void ax_zero_ext(struct agent_expr *x, int n)
void ax_simple(struct agent_expr *x, enum agent_op op)
void ax_pick(struct agent_expr *x, int depth)
void ax_const_l(struct agent_expr *x, LONGEST l)
void ax_ext(struct agent_expr *x, int n)
int ax_goto(struct agent_expr *x, enum agent_op op)
void ax_reg(struct agent_expr *x, int reg)
void ax_trace_quick(struct agent_expr *x, int n)
struct call_site * call_site_for_pc(struct gdbarch *gdbarch, CORE_ADDR pc)
const struct block * block_for_pc(CORE_ADDR pc)
struct symbol * find_pc_function(CORE_ADDR pc)
CORE_ADDR get_pc_function_start(CORE_ADDR pc)
@ CALL_SITE_PARAMETER_FB_OFFSET
@ CALL_SITE_PARAMETER_DWARF_REG
@ CALL_SITE_PARAMETER_PARAM_OFFSET
struct cmd_list_element * showdebuglist
struct cmd_list_element * setdebuglist
set_show_commands add_setshow_boolean_cmd(const char *name, enum command_class theclass, bool *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
set_show_commands add_setshow_zuinteger_cmd(const char *name, enum command_class theclass, unsigned int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_func_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
void compile_dwarf_bounds_to_c(string_file *stream, const char *result_name, const struct dynamic_prop *prop, struct symbol *sym, CORE_ADDR pc, struct gdbarch *arch, std::vector< bool > ®isters_used, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
void compile_dwarf_expr_to_c(string_file *stream, const char *result_name, struct symbol *sym, CORE_ADDR pc, struct gdbarch *arch, std::vector< bool > ®isters_used, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
#define complaint(FMT,...)
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)
int dwarf2_fetch_cfa_info(struct gdbarch *gdbarch, CORE_ADDR pc, struct dwarf2_per_cu_data *data, int *regnum_out, LONGEST *offset_out, CORE_ADDR *text_offset_out, const gdb_byte **cfa_start_out, const gdb_byte **cfa_end_out)
void exception_print(struct ui_file *file, const struct gdb_exception &e)
const gdb_byte * safe_skip_leb128(const gdb_byte *buf, const gdb_byte *buf_end)
void dwarf_expr_require_composition(const gdb_byte *op_ptr, const gdb_byte *op_end, const char *op_name)
const gdb_byte * safe_read_sleb128(const gdb_byte *buf, const gdb_byte *buf_end, int64_t *r)
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)
int dwarf_block_to_dwarf_reg(const gdb_byte *buf, const gdb_byte *buf_end)
static const gdb_byte * gdb_read_uleb128(const gdb_byte *buf, const gdb_byte *buf_end, uint64_t *r)
CORE_ADDR get_frame_pc(frame_info_ptr frame)
bool get_frame_func_if_available(frame_info_ptr this_frame, CORE_ADDR *pc)
struct gdbarch * frame_unwind_arch(frame_info_ptr next_frame)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
enum frame_type get_frame_type(frame_info_ptr frame)
bool get_frame_address_in_block_if_available(frame_info_ptr this_frame, CORE_ADDR *pc)
CORE_ADDR get_frame_func(frame_info_ptr this_frame)
frame_info_ptr get_selected_frame(const char *message)
CORE_ADDR get_frame_address_in_block(frame_info_ptr this_frame)
frame_info_ptr get_prev_frame(frame_info_ptr this_frame)
int gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, int dwarf2_regnr)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
const struct bfd_arch_info * gdbarch_bfd_arch_info(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
struct type * check_typedef(struct type *type)
#define TYPE_IS_REFERENCE(t)
#define TYPE_MAIN_TYPE(thistype)
#define TYPE_TAIL_CALL_LIST(thistype)
#define TYPE_SPECIFIC_FIELD(thistype)
struct inferior * current_inferior(void)
ULONGEST read_unsigned_leb128(bfd *abfd, const gdb_byte *buf, unsigned int *bytes_read_ptr)
static enum symbol_needs_kind dwarf2_get_symbol_read_needs(gdb::array_view< const gdb_byte > expr, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, bfd_endian byte_order, int addr_size, int ref_addr_size, int depth=0)
static const struct lval_funcs entry_data_value_funcs
static const char * locexpr_regname(struct gdbarch *gdbarch, int dwarf_regnum)
void invalid_synthetic_pointer(void)
static struct value * fetch_const_value_from_synthetic_pointer(sect_offset die, LONGEST byte_offset, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, struct type *type)
static struct value * loclist_read_variable(struct symbol *symbol, frame_info_ptr frame)
static void locexpr_find_frame_base_location(struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
static int piece_end_p(const gdb_byte *data, const gdb_byte *end)
static void show_dwarf_always_disassemble(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static const gdb_byte * locexpr_describe_location_piece(struct symbol *symbol, struct ui_file *stream, CORE_ADDR addr, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, const gdb_byte *data, const gdb_byte *end, unsigned int addr_size)
static enum debug_loc_kind decode_debug_loc_dwo_addresses(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, const gdb_byte *loc_ptr, const gdb_byte *buf_end, const gdb_byte **new_ptr, unrelocated_addr *low, unrelocated_addr *high, enum bfd_endian byte_order)
static gdb::unique_xmalloc_ptr< call_site_chain > call_site_find_chain_1(struct gdbarch *gdbarch, CORE_ADDR caller_pc, CORE_ADDR callee_pc)
static void func_verify_no_selftailcall(struct gdbarch *gdbarch, CORE_ADDR verify_addr)
struct value * dwarf2_evaluate_loc_desc(struct type *type, frame_info_ptr frame, const gdb_byte *data, size_t size, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, bool as_lval)
void dwarf2_compile_property_to_c(string_file *stream, const char *result_name, struct gdbarch *gdbarch, std::vector< bool > ®isters_used, const struct dynamic_prop *prop, CORE_ADDR pc, struct symbol *sym)
static struct value * value_of_dwarf_block_entry(struct type *type, frame_info_ptr frame, const gdb_byte *block, size_t block_len)
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)
static void loclist_generate_c_location(struct symbol *sym, string_file *stream, struct gdbarch *gdbarch, std::vector< bool > ®isters_used, CORE_ADDR pc, const char *result_name)
static int call_site_parameter_matches(struct call_site_parameter *parameter, enum call_site_parameter_kind kind, union call_site_parameter_u kind_u)
unsigned int entry_values_debug
static int dwarf2_locexpr_baton_eval(const struct dwarf2_locexpr_baton *dlbaton, frame_info_ptr frame, const struct property_addr_info *addr_stack, CORE_ADDR *valp, gdb::array_view< CORE_ADDR > push_values, bool *is_reference)
@ DEBUG_LOC_BUFFER_OVERFLOW
@ DEBUG_LOC_INVALID_ENTRY
static enum symbol_needs_kind locexpr_get_symbol_read_needs(struct symbol *symbol)
static bool dwarf_always_disassemble
const gdb_byte * dwarf2_find_location_expression(const dwarf2_loclist_baton *baton, size_t *locexpr_length, const CORE_ADDR pc)
static void show_entry_values_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
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)
const struct symbol_computed_ops dwarf2_loclist_funcs
static struct value * dwarf_entry_parameter_to_value(struct call_site_parameter *parameter, CORE_ADDR deref_size, struct type *type, frame_info_ptr caller_frame, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
static struct value * locexpr_read_variable_at_entry(struct symbol *symbol, frame_info_ptr frame)
gdb::unique_xmalloc_ptr< call_site_chain > call_site_find_chain(struct gdbarch *gdbarch, CORE_ADDR caller_pc, CORE_ADDR callee_pc)
int dwarf_reg_to_regnum(struct gdbarch *arch, int dwarf_reg)
const struct symbol_computed_ops dwarf2_locexpr_funcs
int dwarf_reg_to_regnum_or_error(struct gdbarch *arch, ULONGEST dwarf_reg)
static CORE_ADDR locexpr_get_frame_base(struct symbol *framefunc, frame_info_ptr frame)
static void locexpr_describe_location_1(struct symbol *symbol, CORE_ADDR addr, struct ui_file *stream, const gdb_byte *data, size_t size, unsigned int addr_size, int offset_size, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
static struct value * loclist_read_variable_at_entry(struct symbol *symbol, frame_info_ptr frame)
static struct value * dwarf2_evaluate_loc_desc_full(struct type *type, frame_info_ptr frame, const gdb_byte *data, size_t size, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, struct type *subobj_type, LONGEST subobj_byte_offset, bool as_lval=true)
static void locexpr_describe_location(struct symbol *symbol, CORE_ADDR addr, struct ui_file *stream)
static void locexpr_tracepoint_var_ref(struct symbol *symbol, struct agent_expr *ax, struct axs_value *value)
static enum debug_loc_kind decode_debug_loc_addresses(const gdb_byte *loc_ptr, const gdb_byte *buf_end, const gdb_byte **new_ptr, unrelocated_addr *lowp, unrelocated_addr *highp, enum bfd_endian byte_order, unsigned int addr_size, int signed_addr_p)
static void loclist_describe_location(struct symbol *symbol, CORE_ADDR addr, struct ui_file *stream)
static void access_memory(struct gdbarch *arch, struct agent_expr *expr, ULONGEST nbits)
bool dwarf2_evaluate_property(const struct dynamic_prop *prop, frame_info_ptr frame, const struct property_addr_info *addr_stack, CORE_ADDR *value, gdb::array_view< CORE_ADDR > push_values)
static struct symbol * func_addr_to_tail_call_list(struct gdbarch *gdbarch, CORE_ADDR addr)
static void locexpr_generate_c_location(struct symbol *sym, string_file *stream, struct gdbarch *gdbarch, std::vector< bool > ®isters_used, CORE_ADDR pc, const char *result_name)
value * compute_var_value(const char *name)
const struct symbol_block_ops dwarf2_block_frame_base_locexpr_funcs
void func_get_frame_base_dwarf_block(struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
static void ATTRIBUTE_NORETURN unimplemented(unsigned int op)
static void throw_bad_regnum_error(ULONGEST dwarf_reg)
struct value * value_of_dwarf_reg_entry(struct type *type, frame_info_ptr frame, enum call_site_parameter_kind kind, union call_site_parameter_u kind_u)
static struct value * entry_data_value_coerce_ref(const struct value *value)
static bool call_site_find_chain_2(struct gdbarch *gdbarch, gdb::unique_xmalloc_ptr< struct call_site_chain > *resultp, std::vector< struct call_site * > &chain, std::unordered_set< CORE_ADDR > &addr_hash, struct call_site *call_site, CORE_ADDR callee_pc)
static void loclist_tracepoint_var_ref(struct symbol *symbol, struct agent_expr *ax, struct axs_value *value)
void _initialize_dwarf2loc()
static CORE_ADDR loclist_get_frame_base(struct symbol *framefunc, frame_info_ptr frame)
static void tailcall_dump(struct gdbarch *gdbarch, const struct call_site *call_site)
const struct symbol_block_ops dwarf2_block_frame_base_loclist_funcs
static struct value * locexpr_read_variable(struct symbol *symbol, frame_info_ptr frame)
static void chain_candidate(struct gdbarch *gdbarch, gdb::unique_xmalloc_ptr< struct call_site_chain > *resultp, const std::vector< struct call_site * > &chain)
static void entry_data_value_free_closure(struct value *v)
static enum debug_loc_kind decode_debug_loclists_addresses(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, const gdb_byte *loc_ptr, const gdb_byte *buf_end, const gdb_byte **new_ptr, unrelocated_addr *low, unrelocated_addr *high, enum bfd_endian byte_order, unsigned int addr_size, int signed_addr_p)
static enum symbol_needs_kind loclist_symbol_needs(struct symbol *symbol)
static void * entry_data_value_copy_closure(const struct value *v)
static void dwarf2_compile_expr_to_ax(struct agent_expr *expr, struct axs_value *loc, unsigned int addr_size, const gdb_byte *op_ptr, const gdb_byte *op_end, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
static void loclist_find_frame_base_location(struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
static const gdb_byte * disassemble_dwarf_expression(struct ui_file *stream, struct gdbarch *arch, unsigned int addr_size, int offset_size, const gdb_byte *start, const gdb_byte *data, const gdb_byte *end, int indent, int all, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
struct bound_minimal_symbol lookup_minimal_symbol(const char *name, const char *sfile, struct objfile *objf)
struct bound_minimal_symbol lookup_minimal_symbol_by_pc(CORE_ADDR pc)
const char * objfile_name(const struct objfile *objfile)
static int leb128_size(const gdb_byte *buf)
const gdb_byte * dwarf2_fetch_constant_bytes(sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, obstack *obstack, LONGEST *len)
static struct type * die_type(struct die_info *, struct dwarf2_cu *)
struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_sect_off(sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, gdb::function_view< CORE_ADDR()> get_frame_pc, bool resolve_abstract_p)
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)
unrelocated_addr dwarf2_read_addr_index(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, unsigned int addr_index)
struct cmd_list_element * set_dwarf_cmdlist
struct cmd_list_element * show_dwarf_cmdlist
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)
const struct block * block
CORE_ADDR entry_pc() const
struct symbol * linkage_function() const
CORE_ADDR value_address() const
struct minimal_symbol * minsym
struct type * builtin_func_ptr
struct type * builtin_data_ptr
struct call_site * call_site[1]
__extension__ enum call_site_parameter_kind kind
union call_site_parameter_u u
const gdb_byte * data_value
struct dwarf2_locexpr_baton * dwarf_block
void iterate_over_addresses(struct gdbarch *call_site_gdbarch, const struct call_site *call_site, frame_info_ptr caller_frame, iterate_ftype callback) const
gdb::function_view< void(CORE_ADDR)> iterate_ftype
union call_site_target::@40 m_loc
struct call_site_parameter parameter[]
void iterate_over_addresses(struct gdbarch *call_site_gdbarch, frame_info_ptr caller_frame, call_site_target::iterate_ftype callback) const
call_site(unrelocated_addr pc, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
struct call_site * tail_call_next
dwarf2_per_cu_data *const per_cu
dwarf2_per_objfile *const per_objfile
struct dwarf2_per_cu_data * per_cu
dwarf2_per_objfile * per_objfile
struct dwarf2_per_cu_data * per_cu
unrelocated_addr base_address
dwarf2_per_objfile * per_objfile
int ref_addr_size() const
CORE_ADDR relocate(unrelocated_addr addr)
struct dwarf2_offset_baton offset_info
struct dwarf2_locexpr_baton locexpr
struct dwarf2_loclist_baton loclist
struct type * property_type
void push_address(CORE_ADDR value, bool in_stack_memory)
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)
const dwarf2_property_baton * baton() const
const char * variable_name() const
LONGEST const_val() const
dynamic_prop_kind kind() const
const char * natural_name() const
const char * print_name() const
struct gdbarch * arch() const
CORE_ADDR text_section_offset() const
gdb::array_view< const gdb_byte > valaddr
struct property_addr_info * next
void(* find_frame_base_location)(struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
const block * value_block() const
struct type * type() const
struct type * target_type() const
static struct value * allocate_optimized_out(struct type *type)
struct value * copy() const
static struct value * allocate_computed(struct type *type, const struct lval_funcs *funcs, void *closure)
static struct value * allocate(struct type *type)
void mark_bytes_unavailable(LONGEST offset, ULONGEST length)
gdb::array_view< gdb_byte > contents_raw()
struct type * type() const
void * computed_closure() const
enum lval_type lval() const
struct block_symbol lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
#define SYMBOL_BLOCK_OPS(symbol)
#define SYMBOL_LOCATION_BATON(symbol)
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void gdb_printf(struct ui_file *stream, const char *format,...)
void gdb_puts(const char *linebuffer, struct ui_file *stream)
struct value * value_at(struct type *type, CORE_ADDR addr)
struct value * value_of_variable(struct symbol *var, const struct block *b)
CORE_ADDR value_as_address(struct value *val)
struct value * value_from_contents(struct type *type, const gdb_byte *contents)
LONGEST value_as_long(struct value *val)
value_ref_ptr release_value(struct value *val)
gdb::ref_ptr< struct value, value_ref_policy > value_ref_ptr