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 CORE_ADDR *low, CORE_ADDR *high,
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)
124 loc_ptr += addr_size;
130 loc_ptr += addr_size;
135 if ((*low & base_mask) == base_mask)
139 if (*low == 0 && *high == 0)
155 const gdb_byte *loc_ptr,
156 const gdb_byte *buf_end,
157 const gdb_byte **new_ptr,
158 CORE_ADDR *low, CORE_ADDR *high,
159 enum bfd_endian byte_order,
160 unsigned int addr_size,
165 if (loc_ptr == buf_end)
170 case DW_LLE_base_addressx:
180 case DW_LLE_startx_length:
195 case DW_LLE_start_length:
196 if (buf_end - loc_ptr < addr_size)
204 loc_ptr += addr_size;
215 case DW_LLE_end_of_list:
219 case DW_LLE_base_address:
220 if (loc_ptr + addr_size > buf_end)
228 loc_ptr += addr_size;
232 case DW_LLE_offset_pair:
246 case DW_LLE_start_end:
247 if (loc_ptr + 2 * addr_size > buf_end)
255 loc_ptr += addr_size;
261 loc_ptr += addr_size;
266 case DW_LLE_startx_endx:
267 case DW_LLE_default_location:
281 const gdb_byte *loc_ptr,
282 const gdb_byte *buf_end,
283 const gdb_byte **new_ptr,
284 CORE_ADDR *low, CORE_ADDR *high,
285 enum bfd_endian byte_order)
287 uint64_t low_index, high_index;
289 if (loc_ptr == buf_end)
294 case DW_LLE_GNU_end_of_list_entry:
298 case DW_LLE_GNU_base_address_selection_entry:
308 case DW_LLE_GNU_start_end_entry:
322 case DW_LLE_GNU_start_length_entry:
328 if (loc_ptr + 4 > buf_end)
333 *new_ptr = loc_ptr + 4;
351 size_t *locexpr_length, CORE_ADDR pc)
358 int signed_addr_p = bfd_get_sign_extend_vma (
objfile->
obfd.get ());
362 const gdb_byte *loc_ptr, *buf_end;
364 loc_ptr = baton->
data;
365 buf_end = baton->
data + baton->
size;
369 CORE_ADDR low = 0, high = 0;
372 const gdb_byte *new_ptr = NULL;
377 loc_ptr, buf_end, &new_ptr,
378 &low, &high, byte_order);
382 byte_order, addr_size,
387 loc_ptr, buf_end, &new_ptr,
388 &low, &high, byte_order,
389 addr_size, signed_addr_p);
409 error (_(
"dwarf2_find_location_expression: "
410 "Corrupted DWARF expression."));
413 gdb_assert_not_reached (
"bad debug_loc_kind");
429 high += base_address;
439 unsigned int bytes_read;
442 loc_ptr += bytes_read;
445 if (low == high && pc == low)
451 struct symbol *pc_func = NULL;
458 *locexpr_length = length;
463 if (pc >= low && pc < high)
465 *locexpr_length = length;
478 const gdb_byte **start,
size_t *length)
483 *length = symbaton->
size;
484 *start = symbaton->
data;
496 const gdb_byte *start;
498 struct value *result;
503 gdb_assert (
SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location != NULL);
536 const gdb_byte **start,
size_t *length)
553 const gdb_byte *start;
555 struct value *result;
560 gdb_assert (
SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location != NULL);
592 const gdb_byte **start,
size_t *length)
604 error (_(
"Could not find the frame base for \"%s\"."),
615 if (sym.
symbol !=
nullptr)
631 _(
"Entry values and tail call frames debugging is %s.\n"),
639 (
struct gdbarch *call_site_gdbarch,
650 struct type *caller_core_addr_type;
659 throw_error (NO_ENTRY_VALUE_ERROR,
660 _(
"DW_AT_call_target is not specified at %s in %s"),
662 (msym.
minsym == NULL ?
"???"
666 if (caller_frame == NULL)
671 throw_error (NO_ENTRY_VALUE_ERROR,
672 _(
"DW_AT_call_target DWARF block resolving "
673 "requires known frame which is currently not "
674 "available at %s in %s"),
676 (msym.
minsym == NULL ?
"???"
706 throw_error (NO_ENTRY_VALUE_ERROR,
707 _(
"Cannot find function \"%s\" for a call site target "
710 (msym.
minsym == NULL ?
"???"
725 callback (
m_loc.physaddr + delta);
736 for (
unsigned i = 0; i <
m_loc.addresses.length; ++i)
737 callback (
m_loc.addresses.values[i] + delta);
742 internal_error (_(
"invalid call site target kind"));
757 throw_error (NO_ENTRY_VALUE_ERROR,
758 _(
"DW_TAG_call_site resolving failed to find function "
759 "name for address %s"),
763 gdb_assert (
type->
code () == TYPE_CODE_FUNC);
785 std::vector<CORE_ADDR> todo;
788 std::unordered_set<CORE_ADDR> addr_hash;
790 todo.push_back (verify_addr);
791 while (!todo.empty ())
807 [&] (CORE_ADDR target_addr)
809 if (target_addr == verify_addr)
814 throw_error (NO_ENTRY_VALUE_ERROR,
815 _(
"DW_OP_entry_value resolving has found "
816 "function \"%s\" at %s can call itself via tail "
818 (msym.
minsym == NULL ?
"???"
823 if (addr_hash.insert (target_addr).second)
824 todo.push_back (target_addr);
840 (msym.
minsym == NULL ?
"???"
854 gdb::unique_xmalloc_ptr<struct call_site_chain> *resultp,
855 const std::vector<struct call_site *> &chain)
857 long length = chain.size ();
858 int callers, callees, idx;
860 if (*resultp == NULL)
871 memcpy (result->
call_site, chain.data (),
873 resultp->reset (result);
878 for (idx = 0; idx <
length; idx++)
889 for (idx = 0; idx <
length; idx++)
897 for (idx = 0; idx <
callers; idx++)
898 if ((*resultp)->call_site[idx] != chain[idx])
900 (*resultp)->callers = idx;
907 for (idx = 0; idx <
callees; idx++)
908 if ((*resultp)->call_site[(*resultp)->length - 1 - idx]
909 != chain[
length - 1 - idx])
911 (*resultp)->callees = idx;
918 for (idx = 0; idx < (*resultp)->callers; idx++)
921 for (idx = 0; idx < (*resultp)->callees; idx++)
923 (*resultp)->call_site[(*resultp)->length
924 - (*resultp)->callees + idx]);
928 if ((*resultp)->callers == 0 && (*resultp)->callees == 0)
934 resultp->reset (NULL);
941 gdb_assert ((*resultp)->callers + (*resultp)->callees <= (*resultp)->length);
956 gdb::unique_xmalloc_ptr<struct call_site_chain> *resultp,
957 std::vector<struct call_site *> &chain,
958 std::unordered_set<CORE_ADDR> &addr_hash,
962 std::vector<CORE_ADDR> addresses;
963 bool found_exact =
false;
967 if (addr == callee_pc)
970 addresses.push_back (addr);
978 return *resultp !=
nullptr;
981 for (CORE_ADDR target_func_addr : addresses)
983 struct symbol *target_func
987 target_call_site !=
nullptr;
988 target_call_site = target_call_site->tail_call_next)
990 if (addr_hash.insert (target_call_site->pc ()).second)
993 chain.push_back (target_call_site);
996 addr_hash, target_call_site,
1000 size_t removed = addr_hash.erase (target_call_site->pc ());
1001 gdb_assert (removed == 1);
1014static gdb::unique_xmalloc_ptr<call_site_chain>
1016 CORE_ADDR callee_pc)
1018 CORE_ADDR save_callee_pc = callee_pc;
1019 gdb::unique_xmalloc_ptr<struct call_site_chain> retval;
1026 std::vector<struct call_site *> chain;
1032 std::vector<std::vector<CORE_ADDR>> unvisited_addresses;
1037 throw_error (NO_ENTRY_VALUE_ERROR, _(
"Unable to find function for PC %s"),
1041 std::unordered_set<CORE_ADDR> addr_hash;
1059 throw_error (NO_ENTRY_VALUE_ERROR,
1060 _(
"There are no unambiguously determinable intermediate "
1061 "callers or callees between caller function \"%s\" at %s "
1062 "and callee function \"%s\" at %s"),
1063 (msym_caller.
minsym == NULL
1066 (msym_callee.
minsym == NULL
1078gdb::unique_xmalloc_ptr<call_site_chain>
1080 CORE_ADDR callee_pc)
1082 gdb::unique_xmalloc_ptr<call_site_chain> retval;
1088 catch (
const gdb_exception_error &e)
1090 if (e.error == NO_ENTRY_VALUE_ERROR)
1111 if (kind == parameter->
kind)
1135 CORE_ADDR func_addr, caller_pc;
1142 CORE_ADDR target_addr;
1147 gdb_assert (frame != NULL);
1159 throw_error (NO_ENTRY_VALUE_ERROR,
1160 _(
"DW_OP_entry_value resolving callee gdbarch %s "
1161 "(of %s (%s)) does not match caller gdbarch %s"),
1164 (msym.
minsym == NULL ?
"???"
1169 if (caller_frame == NULL)
1174 throw_error (NO_ENTRY_VALUE_ERROR, _(
"DW_OP_entry_value resolving "
1175 "requires caller of %s (%s)"),
1177 (msym.
minsym == NULL ?
"???"
1186 [&] (CORE_ADDR addr)
1191 if (addr == func_addr)
1200 throw_error (NO_ENTRY_VALUE_ERROR,
1201 _(
"DW_OP_entry_value resolving expects callee %s at %s %s"
1202 "but the called frame is for %s at %s"),
1203 (target_msym == NULL ?
"???"
1207 ? _(
"(but note there are multiple addresses not listed)")
1209 func_msym == NULL ?
"???" : func_msym->
print_name (),
1230 throw_error (NO_ENTRY_VALUE_ERROR, _(
"Cannot find matching parameter "
1231 "at DW_TAG_call_site %s at %s"),
1251static struct value *
1253 CORE_ADDR deref_size,
struct type *
type,
1258 const gdb_byte *data_src;
1261 data_src = deref_size == -1 ? parameter->
value : parameter->
data_value;
1265 if (data_src == NULL)
1266 throw_error (NO_ENTRY_VALUE_ERROR,
1267 _(
"Cannot resolve DW_AT_call_data_value"));
1270 per_objfile,
false);
1277static struct value *
1281 struct value *target_val;
1337 struct value *outer_val, *target_val, *val;
1344 &caller_per_objfile);
1349 caller_per_objfile);
1362 target_type, caller_frame,
1364 caller_per_objfile);
1372 checked_type->
length ());
1385static struct value *
1387 const gdb_byte *
block,
size_t block_len)
1403 throw_error (NO_ENTRY_VALUE_ERROR,
1404 _(
"DWARF-2 expression error: DW_OP_entry_value is supported "
1405 "only for single DW_OP_reg* or for DW_OP_fbreg(*)"));
1410static struct value *
1416 struct value *result = NULL;
1417 const gdb_byte *bytes;
1420 auto_obstack temp_obstack;
1422 &temp_obstack, &len);
1426 if (byte_offset >= 0
1429 bytes += byte_offset;
1448 bool resolve_abstract_p)
1451 auto get_frame_address_in_block_wrapper = [frame] ()
1457 get_frame_address_in_block_wrapper,
1458 resolve_abstract_p);
1463 if (orig_type == NULL)
1469 if (baton.
data != NULL)
1486static struct value *
1488 const gdb_byte *data,
size_t size,
1491 struct type *subobj_type,
1492 LONGEST subobj_byte_offset,
1495 if (subobj_type == NULL)
1498 subobj_byte_offset = 0;
1500 else if (subobj_byte_offset < 0)
1513 retval = ctx.
evaluate (data,
size, as_lval, per_cu, frame,
nullptr,
1514 type, subobj_type, subobj_byte_offset);
1516 catch (
const gdb_exception_error &ex)
1518 if (ex.error == NOT_AVAILABLE_ERROR)
1526 else if (ex.error == NO_ENTRY_VALUE_ERROR)
1542 value_ref_ptr value_holder = value_ref_ptr::new_reference (retval);
1553 const gdb_byte *data,
size_t size,
1558 per_objfile, NULL, 0, as_lval);
1578 gdb::array_view<CORE_ADDR> push_values,
1581 if (dlbaton == NULL || dlbaton->
size == 0)
1592 for (
const auto &val : push_values)
1598 true, per_cu, frame, addr_stack);
1600 catch (
const gdb_exception_error &ex)
1602 if (ex.error == NOT_AVAILABLE_ERROR)
1606 else if (ex.error == NO_ENTRY_VALUE_ERROR)
1624 *is_reference =
false;
1639 gdb::array_view<CORE_ADDR> push_values)
1647 switch (prop->
kind ())
1657 value, push_values, &is_reference))
1679 const CORE_ADDR neg_mask
1680 = (~((CORE_ADDR) 0) << (addr_size - 1));
1683 if (*
value & neg_mask)
1697 const gdb_byte *data;
1731 for (pinfo = addr_stack; pinfo != NULL; pinfo = pinfo->
next)
1739 error (_(
"cannot find reference address for offset property"));
1740 if (pinfo->
valaddr.data () != NULL)
1770 const char *result_name,
1772 std::vector<bool> ®isters_used,
1779 const gdb_byte *data;
1803 data, data +
size, per_cu, per_objfile);
1816 bfd_endian byte_order,
1825 return symbol_needs;
1827 const gdb_byte *expr_end =
expr.data () +
expr.size ();
1831 std::vector<const gdb_byte *> ops_to_visit;
1834 std::unordered_set<const gdb_byte *> visited_ops;
1838 auto insert_in_ops_to_visit
1839 = [expr_end, &visited_ops, &ops_to_visit] (
const gdb_byte *op_ptr)
1841 if (op_ptr >= expr_end)
1844 if (visited_ops.find (op_ptr) != visited_ops.end ())
1847 ops_to_visit.push_back (op_ptr);
1852 const int max_depth = 256;
1854 if (depth > max_depth)
1855 error (_(
"DWARF-2 expression error: Loop detected."));
1860 insert_in_ops_to_visit (&
expr[0]);
1862 while (!ops_to_visit.empty ())
1865 const gdb_byte *op_ptr = ops_to_visit.back ();
1866 ops_to_visit.pop_back ();
1867 gdb_assert (visited_ops.find (op_ptr) == visited_ops.end ());
1868 visited_ops.insert (op_ptr);
1870 dwarf_location_atom op = (dwarf_location_atom) *op_ptr;
1917 case DW_OP_stack_value:
1944 case DW_OP_GNU_push_tls_address:
1946 case DW_OP_GNU_uninit:
1947 case DW_OP_push_object_address:
1950 case DW_OP_form_tls_address:
1956 case DW_OP_GNU_convert:
1957 case DW_OP_reinterpret:
1958 case DW_OP_GNU_reinterpret:
1960 case DW_OP_GNU_addr_index:
1961 case DW_OP_GNU_const_index:
1963 case DW_OP_plus_uconst:
1972 case DW_OP_bit_piece:
1977 case DW_OP_deref_type:
1978 case DW_OP_GNU_deref_type:
1984 op_ptr += addr_size;
2074 case DW_OP_call_frame_cfa:
2075 case DW_OP_entry_value:
2076 case DW_OP_GNU_entry_value:
2077 case DW_OP_GNU_parameter_ref:
2078 case DW_OP_regval_type:
2079 case DW_OP_GNU_regval_type:
2083 case DW_OP_implicit_value:
2091 case DW_OP_implicit_pointer:
2092 case DW_OP_GNU_implicit_pointer:
2093 op_ptr += ref_addr_size;
2097 case DW_OP_deref_size:
2117 insert_in_ops_to_visit (op_ptr + offset);
2118 insert_in_ops_to_visit (op_ptr);
2125 unsigned int len = op == DW_OP_call2 ? 2 : 4;
2146 gdb::array_view<const gdb_byte> sub_expr (baton.
data,
2160 case DW_OP_GNU_variable_value:
2162 sect_offset sect_off
2166 op_ptr += ref_addr_size;
2173 error (_(
"Bad DW_OP_GNU_variable_value DIE."));
2180 error (_(
"Type of DW_OP_GNU_variable_value DIE must be "
2181 "an integer or pointer."));
2199 gdb::array_view<const gdb_byte> sub_expr (baton.
data,
2213 case DW_OP_const_type:
2214 case DW_OP_GNU_const_type:
2218 gdb_byte offset = *op_ptr++;
2224 error (_(
"Unhandled DWARF expression opcode 0x%x"), op);
2232 insert_in_ops_to_visit (op_ptr);
2235 return symbol_needs;
2241static void ATTRIBUTE_NORETURN
2244 const char *
name = get_DW_OP_name (op);
2247 error (_(
"DWARF operator %s cannot be translated to an agent expression"),
2250 error (_(
"Unknown DWARF operator 0x%02x cannot be translated "
2251 "to an agent expression"),
2268 complaint (_(
"bad DWARF register number %d"), dwarf_reg);
2282 if ((
int) dwarf_reg == dwarf_reg)
2283 error (_(
"Unable to access DWARF register number %d"), (
int) dwarf_reg);
2284 error (_(
"Unable to access DWARF register number %s"),
2285 pulongest (dwarf_reg));
2314 ULONGEST nbytes = (nbits + 7) / 8;
2316 gdb_assert (nbytes > 0 && nbytes <=
sizeof (LONGEST));
2323 else if (nbits <= 16)
2325 else if (nbits <= 32)
2331 if (8 * nbytes == nbits)
2363 unsigned int addr_size,
const gdb_byte *op_ptr,
2364 const gdb_byte *op_end,
2369 std::vector<int> dw_labels, patches;
2370 const gdb_byte *
const base = op_ptr;
2371 const gdb_byte *previous_piece = op_ptr;
2373 ULONGEST bits_collected = 0;
2374 unsigned int addr_size_bits = 8 * addr_size;
2375 bool bits_big_endian = byte_order == BFD_ENDIAN_BIG;
2377 std::vector<int> offsets (op_end - op_ptr, -1);
2382 while (op_ptr < op_end)
2384 enum dwarf_location_atom op = (
enum dwarf_location_atom) *op_ptr;
2385 uint64_t uoffset, reg;
2389 offsets[op_ptr - base] =
expr->len;
2447 op_ptr += addr_size;
2452 if (op_ptr >= op_end || *op_ptr != DW_OP_GNU_push_tls_address)
2551 case DW_OP_implicit_value:
2556 if (op_ptr + len > op_end)
2557 error (_(
"DW_OP_implicit_value: too few bytes available."));
2558 if (len >
sizeof (ULONGEST))
2559 error (_(
"Cannot translate DW_OP_implicit_value of %d bytes"),
2566 "DW_OP_implicit_value");
2572 case DW_OP_stack_value:
2635 const gdb_byte *datastart;
2637 const struct block *b;
2638 struct symbol *framefunc;
2643 error (_(
"No block found for address"));
2648 error (_(
"No function found for block"));
2651 &datastart, &datalen);
2655 datastart + datalen, per_cu,
2696 case DW_OP_deref_size:
2700 if (op == DW_OP_deref_size)
2706 error (_(
"Unsupported size %d in %s"),
2707 size, get_DW_OP_name (op));
2740 case DW_OP_plus_uconst:
2858 case DW_OP_call_frame_cfa:
2861 CORE_ADDR text_offset;
2863 const gdb_byte *cfa_start, *cfa_end;
2867 &text_offset, &cfa_start, &cfa_end))
2882 cfa_end, per_cu, per_objfile);
2889 case DW_OP_GNU_push_tls_address:
2890 case DW_OP_form_tls_address:
2894 case DW_OP_push_object_address:
2902 dw_labels.push_back (op_ptr + offset - base);
2903 patches.push_back (i);
2912 dw_labels.push_back (op_ptr + offset - base);
2913 patches.push_back (i);
2920 case DW_OP_bit_piece:
2924 if (op_ptr - 1 == previous_piece)
2925 error (_(
"Cannot translate empty pieces to agent expressions"));
2926 previous_piece = op_ptr - 1;
2929 if (op == DW_OP_piece)
2937 if (bits_collected +
size > 8 *
sizeof (LONGEST))
2938 error (_(
"Expression pieces exceed word size"));
2964 if (bits_collected > 0)
2966 if (bits_big_endian)
2982 bits_collected +=
size;
2987 case DW_OP_GNU_uninit:
2994 int size = (op == DW_OP_call2 ? 2 : 4);
2999 auto get_frame_pc_from_expr = [
expr] ()
3003 cu_offset cuoffset = (cu_offset) uoffset;
3005 get_frame_pc_from_expr);
3016 case DW_OP_call_ref:
3019 case DW_OP_GNU_variable_value:
3028 for (
int i = 0; i < patches.size (); ++i)
3030 int targ = offsets[dw_labels[i]];
3032 internal_error (_(
"invalid label"));
3040static struct value *
3058static struct value *
3078 gdb::array_view<const gdb_byte>
expr (dlbaton->
data, dlbaton->
size);
3094 return data == end ||
data[0] == DW_OP_piece ||
data[0] == DW_OP_bit_piece;
3114 return _(
"bad_register_number");
3125static const gdb_byte *
3129 const gdb_byte *
data,
const gdb_byte *end,
3130 unsigned int addr_size)
3136 if (data[0] >= DW_OP_reg0 && data[0] <= DW_OP_reg31)
3142 else if (data[0] == DW_OP_regx)
3150 else if (data[0] == DW_OP_fbreg)
3152 const struct block *b;
3153 struct symbol *framefunc;
3155 int64_t frame_offset;
3156 const gdb_byte *base_data, *new_data, *save_data = data;
3158 int64_t base_offset = 0;
3168 error (_(
"No block found for address for symbol \"%s\"."),
3174 error (_(
"No function found for block for symbol \"%s\"."),
3179 if (base_data[0] >= DW_OP_breg0 && base_data[0] <= DW_OP_breg31)
3181 const gdb_byte *buf_end;
3183 frame_reg = base_data[0] - DW_OP_breg0;
3186 if (buf_end != base_data + base_size)
3187 error (_(
"Unexpected opcode after "
3188 "DW_OP_breg%u for symbol \"%s\"."),
3191 else if (base_data[0] >= DW_OP_reg0 && base_data[0] <= DW_OP_reg31)
3194 frame_reg = base_data[0] - DW_OP_reg0;
3205 _(
"a variable at frame base reg $%s offset %s+%s"),
3207 plongest (base_offset), plongest (frame_offset));
3209 else if (data[0] >= DW_OP_breg0 && data[0] <= DW_OP_breg31
3217 _(
"a variable at offset %s from base reg $%s"),
3236 else if (data + 1 + addr_size < end
3237 && (data[0] == DW_OP_addr
3238 || (addr_size == 4 && data[0] == DW_OP_const4u)
3239 || (addr_size == 8 && data[0] == DW_OP_const8u))
3240 && (data[1 + addr_size] == DW_OP_GNU_push_tls_address
3241 || data[1 + addr_size] == DW_OP_form_tls_address)
3249 _(
"a thread-local variable at offset 0x%s "
3250 "in the thread-local storage for `%s'"),
3253 data += 1 + addr_size + 1;
3260 else if (data + 3 <= end
3261 && data + 1 + (
leb128_size = skip_leb128 (data + 1, end)) < end
3262 && data[0] == DW_OP_GNU_const_index
3264 && (data[1 +
leb128_size] == DW_OP_GNU_push_tls_address
3265 || data[1 +
leb128_size] == DW_OP_form_tls_address)
3273 _(
"a thread-local variable at offset 0x%s "
3274 "in the thread-local storage for `%s'"),
3279 else if (data[0] >= DW_OP_lit0
3280 && data[0] <= DW_OP_lit31
3282 && data[1] == DW_OP_stack_value)
3284 gdb_printf (stream, _(
"the constant %d"), data[0] - DW_OP_lit0);
3298static const gdb_byte *
3301 int offset_size,
const gdb_byte *start,
3302 const gdb_byte *data,
const gdb_byte *end,
3303 int indent,
int all,
3309 || (data[0] != DW_OP_piece && data[0] != DW_OP_bit_piece)))
3311 enum dwarf_location_atom op = (
enum dwarf_location_atom) *data++;
3316 name = get_DW_OP_name (op);
3319 error (_(
"Unrecognized DWARF opcode 0x%02x at %ld"),
3320 op, (
long) (data - 1 - start));
3322 (
long) (data - 1 - start),
name);
3330 gdb_printf (stream,
" 0x%s", phex_nz (ul, addr_size));
3429 gdb_printf (stream,
" %s [$%s]", pulongest (ul),
3433 case DW_OP_implicit_value:
3472 gdb_printf (stream,
" %s [$%s]", plongest (l),
3479 gdb_printf (stream,
" register %s [$%s] offset %s",
3490 case DW_OP_xderef_size:
3491 case DW_OP_deref_size:
3497 case DW_OP_plus_uconst:
3506 (
long) (data + l - start));
3513 (
long) (data + l - start));
3519 gdb_printf (stream,
" offset %s", phex_nz (ul, 2));
3525 gdb_printf (stream,
" offset %s", phex_nz (ul, 4));
3528 case DW_OP_call_ref:
3531 data += offset_size;
3532 gdb_printf (stream,
" offset %s", phex_nz (ul, offset_size));
3537 gdb_printf (stream,
" %s (bytes)", pulongest (ul));
3540 case DW_OP_bit_piece:
3546 gdb_printf (stream,
" size %s offset %s (bits)",
3547 pulongest (ul), pulongest (offset));
3551 case DW_OP_implicit_pointer:
3552 case DW_OP_GNU_implicit_pointer:
3556 data += offset_size;
3561 phex_nz (ul, offset_size),
3566 case DW_OP_deref_type:
3567 case DW_OP_GNU_deref_type:
3569 int deref_addr_size = *data++;
3573 cu_offset offset = (cu_offset) ul;
3578 phex_nz (to_underlying (offset), 0),
3583 case DW_OP_const_type:
3584 case DW_OP_GNU_const_type:
3589 cu_offset type_die = (cu_offset) ul;
3594 phex_nz (to_underlying (type_die), 0));
3598 for (
int i = 0; i < n; ++i)
3604 case DW_OP_regval_type:
3605 case DW_OP_GNU_regval_type:
3612 cu_offset type_die = (cu_offset) ul;
3618 phex_nz (to_underlying (type_die), 0),
3624 case DW_OP_GNU_convert:
3625 case DW_OP_reinterpret:
3626 case DW_OP_GNU_reinterpret:
3629 cu_offset type_die = (cu_offset) ul;
3631 if (to_underlying (type_die) == 0)
3641 phex_nz (to_underlying (type_die), 0));
3646 case DW_OP_entry_value:
3647 case DW_OP_GNU_entry_value:
3651 start, data, data + ul, indent + 2,
3652 all, per_cu, per_objfile);
3656 case DW_OP_GNU_parameter_ref:
3659 gdb_printf (stream,
" offset %s", phex_nz (ul, 4));
3663 case DW_OP_GNU_addr_index:
3666 gdb_printf (stream,
" 0x%s", phex_nz (ul, addr_size));
3669 case DW_OP_GNU_const_index:
3675 case DW_OP_GNU_variable_value:
3678 data += offset_size;
3679 gdb_printf (stream,
" offset %s", phex_nz (ul, offset_size));
3696 _(
"Whether to always disassemble "
3697 "DWARF expressions is %s.\n"),
3707 const gdb_byte *data,
size_t size,
3708 unsigned int addr_size,
3712 const gdb_byte *end = data +
size;
3713 int first_piece = 1, bad = 0;
3718 const gdb_byte *here = data;
3719 int disassemble = 1;
3729 addr, per_cu, per_objfile,
3730 data, end, addr_size);
3734 || data[0] == DW_OP_piece
3735 || data[0] == DW_OP_bit_piece)
3740 gdb_printf (stream, _(
"a complex DWARF expression:\n"));
3743 addr_size, offset_size, data,
3746 per_cu, per_objfile);
3751 int empty = data == here;
3755 if (data[0] == DW_OP_piece)
3762 gdb_printf (stream, _(
"an empty %s-byte piece"),
3768 else if (data[0] == DW_OP_bit_piece)
3770 uint64_t
bits, offset;
3777 _(
"an empty %s-bit piece"),
3781 _(
" [%s-bit piece, offset %s bits]"),
3782 pulongest (
bits), pulongest (offset));
3792 if (bad || data > end)
3793 error (_(
"Corrupted DWARF2 expression for \"%s\"."),
3811 addr_size, offset_size,
3826 if (dlbaton->
size == 0)
3839 std::vector<bool> ®isters_used,
3840 CORE_ADDR pc,
const char *result_name)
3846 if (dlbaton->
size == 0)
3847 error (_(
"symbol \"%s\" is optimized out"), sym->
natural_name ());
3850 sym, pc,
gdbarch, registers_used, addr_size,
3873static struct value *
3879 const gdb_byte *data;
3898static struct value *
3903 const gdb_byte *
data;
3942 const gdb_byte *loc_ptr, *buf_end;
3949 int signed_addr_p = bfd_get_sign_extend_vma (
objfile->
obfd.get ());
3955 loc_ptr = dlbaton->
data;
3956 buf_end = dlbaton->
data + dlbaton->
size;
3963 CORE_ADDR low = 0, high = 0;
3966 const gdb_byte *new_ptr = NULL;
3971 loc_ptr, buf_end, &new_ptr,
3972 &low, &high, byte_order);
3976 byte_order, addr_size,
3981 loc_ptr, buf_end, &new_ptr,
3982 &low, &high, byte_order,
3983 addr_size, signed_addr_p);
3992 base_address = high;
4004 error (_(
"Corrupted DWARF expression for symbol \"%s\"."),
4008 gdb_assert_not_reached (
"bad debug_loc_kind");
4013 high += text_offset;
4016 low += base_address;
4017 high += base_address;
4030 unsigned int bytes_read;
4032 loc_ptr += bytes_read;
4042 addr_size, offset_size,
4059 const gdb_byte *
data;
4076 std::vector<bool> ®isters_used,
4077 CORE_ADDR pc,
const char *result_name)
4082 const gdb_byte *
data;
4087 error (_(
"symbol \"%s\" is optimized out"), sym->
natural_name ());
4090 sym, pc,
gdbarch, registers_used, addr_size,
4114 _(
"Set entry values and tail call frames "
4116 _(
"Show entry values and tail call frames "
4118 _(
"When non-zero, the process of determining "
4119 "parameter values from function entry point "
4120 "and tail call frames will be printed."),
4127Set whether `info address' always disassembles DWARF expressions."), _(
"\
4128Show whether `info address' always disassembles DWARF expressions."), _(
"\
4129When enabled, DWARF expressions are always printed in an assembly-like\n\
4130syntax. When disabled, expressions will be printed in a more\n\
4131conversational 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 * block_linkage_function(const struct block *bl)
struct symbol * find_pc_function(CORE_ADDR pc)
CORE_ADDR get_pc_function_start(CORE_ADDR pc)
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)
CORE_ADDR gdbarch_adjust_dwarf2_addr(struct gdbarch *gdbarch, CORE_ADDR pc)
const struct bfd_arch_info * gdbarch_bfd_arch_info(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)
@ CALL_SITE_PARAMETER_FB_OFFSET
@ CALL_SITE_PARAMETER_DWARF_REG
@ CALL_SITE_PARAMETER_PARAM_OFFSET
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 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)
const gdb_byte * dwarf2_find_location_expression(struct dwarf2_loclist_baton *baton, size_t *locexpr_length, CORE_ADDR pc)
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 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, CORE_ADDR *low, CORE_ADDR *high, enum bfd_endian byte_order, unsigned int addr_size, int signed_addr_p)
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
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 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, CORE_ADDR *low, CORE_ADDR *high, enum bfd_endian byte_order)
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 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 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)
static enum debug_loc_kind decode_debug_loc_addresses(const gdb_byte *loc_ptr, const gdb_byte *buf_end, const gdb_byte **new_ptr, CORE_ADDR *low, CORE_ADDR *high, enum bfd_endian byte_order, unsigned int addr_size, int signed_addr_p)
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)
CORE_ADDR dwarf2_read_addr_index(dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, unsigned int addr_index)
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)
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
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::@64 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
struct call_site * tail_call_next
dwarf2_per_cu_data *const per_cu
dwarf2_per_objfile *const per_objfile
int block_line_section() const
struct dwarf2_per_cu_data * per_cu
dwarf2_per_objfile * per_objfile
struct dwarf2_per_cu_data * per_cu
dwarf2_per_objfile * per_objfile
int ref_addr_size() const
compunit_symtab * get_symtab(const dwarf2_per_cu_data *per_cu) const
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 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
::section_offsets section_offsets
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
std::vector< range > optimized_out
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)
struct type * value_type(const struct value *value)
struct value * allocate_value(struct type *type)
CORE_ADDR value_as_address(struct value *val)
struct value * allocate_optimized_out_value(struct type *type)
void mark_value_bytes_unavailable(struct value *value, LONGEST offset, LONGEST length)
CORE_ADDR value_address(const struct value *value)
gdb::array_view< gdb_byte > value_contents_raw(struct value *value)
struct value * value_from_contents(struct type *type, const gdb_byte *contents)
void value_incref(struct value *val)
LONGEST value_as_long(struct value *val)
struct value * value_copy(const value *arg)
int value_optimized_out(struct value *value)
struct value * allocate_computed_value(struct type *type, const struct lval_funcs *funcs, void *closure)
value_ref_ptr release_value(struct value *val)
void set_value_lazy(struct value *value, int val)
void * value_computed_closure(const struct value *v)
void value_decref(struct value *val)
gdb::ref_ptr< struct value, value_ref_policy > value_ref_ptr