GDB (xrefs)
|
#include "defs.h"
#include "ui-out.h"
#include "value.h"
#include "frame.h"
#include "gdbcore.h"
#include "target.h"
#include "inferior.h"
#include "ax.h"
#include "ax-gdb.h"
#include "regcache.h"
#include "objfiles.h"
#include "exceptions.h"
#include "block.h"
#include "gdbcmd.h"
#include "dwarf2.h"
#include "dwarf2expr.h"
#include "dwarf2loc.h"
#include "dwarf2-frame.h"
#include "gdb_string.h"
#include "gdb_assert.h"
Go to the source code of this file.
typedef struct call_site* call_sitep |
Definition at line 724 of file dwarf2loc.c.
enum debug_loc_kind |
DEBUG_LOC_END_OF_LIST | |
DEBUG_LOC_BASE_ADDRESS | |
DEBUG_LOC_START_END | |
DEBUG_LOC_START_LENGTH | |
DEBUG_LOC_BUFFER_OVERFLOW | |
DEBUG_LOC_INVALID_ENTRY |
Definition at line 64 of file dwarf2loc.c.
void _initialize_dwarf2loc | ( | void | ) |
Definition at line 4231 of file dwarf2loc.c.
References _, add_setshow_zuinteger_cmd(), class_maintenance, setdebuglist, show_entry_values_debug(), and showdebuglist.
static void access_memory | ( | struct gdbarch * | arch, |
struct agent_expr * | expr, | ||
ULONGEST | nbits | ||
) | [static] |
Definition at line 2616 of file dwarf2loc.c.
References ax_const_l(), ax_simple(), ax_trace_quick(), ax_zero_ext(), gdb_assert, gdbarch_bits_big_endian(), LONGEST, agent_expr::tracing, and ULONGEST.
Referenced by dwarf2_compile_expr_to_ax().
static struct piece_closure* allocate_piece_closure | ( | struct dwarf2_per_cu_data * | per_cu, |
int | n_pieces, | ||
struct dwarf_expr_piece * | pieces, | ||
int | addr_size | ||
) | [static, read] |
Definition at line 1400 of file dwarf2loc.c.
References piece_closure::addr_size, DWARF_VALUE_STACK, dwarf_expr_piece::location, memcpy(), piece_closure::n_pieces, piece_closure::per_cu, piece_closure::pieces, piece_closure::refc, dwarf_expr_piece::v, dwarf_expr_piece::value, value_incref(), XCALLOC, and XZALLOC.
Referenced by dwarf2_evaluate_loc_desc_full().
struct call_site_chain* call_site_find_chain | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | caller_pc, | ||
CORE_ADDR | callee_pc | ||
) | [read] |
Definition at line 976 of file dwarf2loc.c.
References call_site_find_chain_1(), gdb_exception::error, exception_print(), gdb_stdout, NO_ENTRY_VALUE_ERROR, gdb_exception::reason, RETURN_MASK_ERROR, throw_exception(), and TRY_CATCH.
Referenced by dwarf2_tailcall_sniffer_first().
static struct call_site_chain* call_site_find_chain_1 | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | caller_pc, | ||
CORE_ADDR | callee_pc | ||
) | [static, read] |
Definition at line 834 of file dwarf2loc.c.
References _, call_site_for_pc(), call_site_to_target_addr(), chain_candidate(), core_addr_eq(), core_addr_hash(), discard_cleanups(), do_cleanups(), free_current_contents(), func_addr_to_tail_call_list(), gdb_assert, get_pc_function_start(), hashtab_obstack_allocate(), lookup_minimal_symbol_by_pc(), make_cleanup(), make_cleanup_htab_delete(), make_cleanup_obstack_free(), bound_minimal_symbol::minsym, NO_ENTRY_VALUE_ERROR, paddress(), call_site::pc, SYMBOL_PRINT_NAME, SYMBOL_TYPE, call_site::tail_call_next, throw_error(), TYPE_TAIL_CALL_LIST, VEC, VEC_cleanup, VEC_empty, VEC_last, VEC_pop, and VEC_safe_push.
Referenced by call_site_find_chain().
static int call_site_parameter_matches | ( | struct call_site_parameter * | parameter, |
enum call_site_parameter_kind | kind, | ||
union call_site_parameter_u | kind_u | ||
) | [static] |
Definition at line 1004 of file dwarf2loc.c.
References CALL_SITE_PARAMETER_DWARF_REG, CALL_SITE_PARAMETER_FB_OFFSET, and CALL_SITE_PARAMETER_PARAM_OFFSET.
Referenced by dwarf_expr_reg_to_entry_parameter().
static CORE_ADDR call_site_to_target_addr | ( | struct gdbarch * | call_site_gdbarch, |
struct call_site * | call_site, | ||
struct frame_info * | caller_frame | ||
) | [static] |
Definition at line 522 of file dwarf2loc.c.
References _, builtin_type::builtin_func_ptr, builtin_type(), dwarf2_locexpr_baton::data, dwarf2_evaluate_loc_desc(), FIELD_DWARF_BLOCK, FIELD_LOC_KIND, FIELD_LOC_KIND_DWARF_BLOCK, FIELD_LOC_KIND_PHYSADDR, FIELD_LOC_KIND_PHYSNAME, FIELD_STATIC_PHYSADDR, FIELD_STATIC_PHYSNAME, get_frame_arch(), internal_error(), lookup_minimal_symbol(), lookup_minimal_symbol_by_pc(), lval_memory, bound_minimal_symbol::minsym, NO_ENTRY_VALUE_ERROR, paddress(), call_site::pc, dwarf2_locexpr_baton::per_cu, dwarf2_locexpr_baton::size, SYMBOL_PRINT_NAME, SYMBOL_VALUE_ADDRESS, call_site::target, throw_error(), value_address(), value_as_address(), and VALUE_LVAL.
Referenced by call_site_find_chain_1(), dwarf_expr_reg_to_entry_parameter(), and func_verify_no_selftailcall().
static void chain_candidate | ( | struct gdbarch * | gdbarch, |
struct call_site_chain ** | resultp, | ||
VEC(call_sitep)* | chain | ||
) | [static] |
Definition at line 737 of file dwarf2loc.c.
References call_site_chain::call_site, call_site_chain::callees, call_site_chain::callers, fprintf_unfiltered(), fputc_unfiltered(), fputs_unfiltered(), gdb_assert, gdb_stdlog, call_site_chain::length, memcpy(), min, tailcall_dump(), VEC_address, VEC_index, VEC_length, xfree(), and xmalloc().
Referenced by call_site_find_chain_1().
static int check_pieced_synthetic_pointer | ( | const struct value * | value, |
int | bit_offset, | ||
int | bit_length | ||
) | [static] |
Definition at line 2018 of file dwarf2loc.c.
References check_pieced_value_bits(), and DWARF_VALUE_IMPLICIT_POINTER.
static int check_pieced_value_bits | ( | const struct value * | value, |
int | bit_offset, | ||
int | bit_length, | ||
enum dwarf_value_location | check_for | ||
) | [static] |
Definition at line 1944 of file dwarf2loc.c.
References DWARF_VALUE_IMPLICIT_POINTER, DWARF_VALUE_MEMORY, DWARF_VALUE_OPTIMIZED_OUT, dwarf_expr_piece::location, piece_closure::n_pieces, p, piece_closure::pieces, dwarf_expr_piece::size, value_bitpos(), value_bitsize(), value_computed_closure(), and value_offset().
Referenced by check_pieced_synthetic_pointer(), check_pieced_value_invalid(), and check_pieced_value_validity().
static int check_pieced_value_invalid | ( | const struct value * | value | ) | [static] |
Definition at line 2007 of file dwarf2loc.c.
References check_pieced_value_bits(), DWARF_VALUE_OPTIMIZED_OUT, TYPE_LENGTH, and value_type().
static int check_pieced_value_validity | ( | const struct value * | value, |
int | bit_offset, | ||
int | bit_length | ||
) | [static] |
Definition at line 1999 of file dwarf2loc.c.
References check_pieced_value_bits(), and DWARF_VALUE_MEMORY.
static void copy_bitwise | ( | gdb_byte * | dest, |
unsigned int | dest_offset_bits, | ||
const gdb_byte * | source, | ||
unsigned int | source_offset_bits, | ||
unsigned int | bit_count, | ||
int | bits_big_endian | ||
) | [static] |
Definition at line 1547 of file dwarf2loc.c.
References extract_bits(), gdb_assert, and insert_bits().
Referenced by read_pieced_value(), and write_pieced_value().
static void* copy_pieced_value_closure | ( | const struct value * | v | ) | [static] |
Definition at line 2138 of file dwarf2loc.c.
References piece_closure::refc, and value_computed_closure().
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 | ||
) | [static] |
Definition at line 107 of file dwarf2loc.c.
References DEBUG_LOC_BASE_ADDRESS, DEBUG_LOC_BUFFER_OVERFLOW, DEBUG_LOC_END_OF_LIST, DEBUG_LOC_START_END, extract_signed_integer(), and extract_unsigned_integer().
Referenced by dwarf2_find_location_expression(), and loclist_describe_location().
static enum debug_loc_kind decode_debug_loc_dwo_addresses | ( | struct dwarf2_per_cu_data * | per_cu, |
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] |
Definition at line 150 of file dwarf2loc.c.
References DEBUG_LOC_BASE_ADDRESS, DEBUG_LOC_BUFFER_OVERFLOW, DEBUG_LOC_END_OF_LIST, DEBUG_LOC_INVALID_ENTRY, DEBUG_LOC_START_END, DEBUG_LOC_START_LENGTH, dwarf2_read_addr_index(), extract_unsigned_integer(), and gdb_read_uleb128().
Referenced by dwarf2_find_location_expression(), and loclist_describe_location().
DEF_VEC_P | ( | call_sitep | ) |
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, | ||
struct dwarf2_per_cu_data * | per_cu | ||
) | [static] |
Definition at line 3547 of file dwarf2loc.c.
References _, cu_offset::cu_off, dwarf2_get_die_type(), dwarf2_read_addr_index(), error(), extract_signed_integer(), extract_unsigned_integer(), fprintf_filtered(), fputc_filtered(), gdbarch_byte_order(), locexpr_regname(), name, offset, phex_nz(), plongest(), pulongest(), safe_read_sleb128(), safe_read_uleb128(), type, and type_print().
Referenced by locexpr_describe_location_1().
void dwarf2_compile_expr_to_ax | ( | struct agent_expr * | expr, |
struct axs_value * | loc, | ||
struct gdbarch * | arch, | ||
unsigned int | addr_size, | ||
const gdb_byte * | op_ptr, | ||
const gdb_byte * | op_end, | ||
struct dwarf2_per_cu_data * | per_cu | ||
) |
Definition at line 2676 of file dwarf2loc.c.
References _, access_memory(), ax_const_l(), ax_ext(), ax_goto(), ax_label(), ax_pick(), ax_reg(), ax_simple(), ax_zero_ext(), axs_lvalue_memory, axs_lvalue_register, axs_rvalue, block_for_pc(), block_linkage_function(), cu_offset::cu_off, dwarf2_locexpr_baton::data, do_cleanups(), dwarf2_compile_cfa_to_ax(), dwarf2_compile_expr_to_ax(), dwarf2_fetch_die_loc_cu_off(), dwarf2_per_cu_text_offset(), dwarf_expr_frame_base_1(), dwarf_expr_require_composition(), error(), extract_signed_integer(), extract_unsigned_integer(), gdb_assert, gdbarch_bits_big_endian(), gdbarch_byte_order(), get_ax_pc(), internal_error(), axs_value::kind, len, agent_expr::len, LONGEST, make_cleanup(), offset, dwarf2_locexpr_baton::per_cu, axs_value::reg, require_rvalue(), safe_read_sleb128(), safe_read_uleb128(), agent_expr::scope, dwarf2_locexpr_baton::size, size, translate_register(), axs_value::u, ULONGEST, unimplemented(), VEC, VEC_cleanup, VEC_index, VEC_length, VEC_safe_push, xfree(), and xmalloc().
Referenced by dwarf2_compile_cfa_to_ax(), dwarf2_compile_expr_to_ax(), locexpr_tracepoint_var_ref(), and loclist_tracepoint_var_ref().
struct value* dwarf2_evaluate_loc_desc | ( | struct type * | type, |
struct frame_info * | frame, | ||
const gdb_byte * | data, | ||
size_t | size, | ||
struct dwarf2_per_cu_data * | per_cu | ||
) | [read] |
Definition at line 2412 of file dwarf2loc.c.
References dwarf2_evaluate_loc_desc_full().
Referenced by call_site_to_target_addr(), dwarf2_compute_name(), dwarf_entry_parameter_to_value(), locexpr_read_variable(), and loclist_read_variable().
static struct value * dwarf2_evaluate_loc_desc_full | ( | struct type * | type, |
struct frame_info * | frame, | ||
const gdb_byte * | data, | ||
size_t | size, | ||
struct dwarf2_per_cu_data * | per_cu, | ||
LONGEST | byte_offset | ||
) | [static, read] |
Definition at line 2202 of file dwarf2loc.c.
References _, dwarf_expr_context::addr_size, allocate_computed_value(), allocate_optimized_out_value(), allocate_piece_closure(), allocate_value(), dwarf_expr_context::baton, value::contents, dwarf_expr_context::data, do_cleanups(), dwarf2_per_cu_addr_size(), dwarf2_per_cu_objfile(), dwarf2_per_cu_ref_addr_size(), dwarf2_per_cu_text_offset(), dwarf_expr_ctx_funcs, dwarf_expr_eval(), dwarf_expr_fetch(), dwarf_expr_fetch_address(), dwarf_expr_fetch_in_stack_memory(), DWARF_VALUE_IMPLICIT_POINTER, DWARF_VALUE_LITERAL, DWARF_VALUE_MEMORY, DWARF_VALUE_OPTIMIZED_OUT, DWARF_VALUE_REGISTER, DWARF_VALUE_STACK, gdb_exception::error, error(), exception_print(), dwarf_expr_baton::frame, dwarf_expr_context::funcs, gdb_stdout, dwarf_expr_context::gdbarch, gdbarch_byte_order(), gdbarch_dwarf2_reg_to_regnum(), get_frame_arch(), get_frame_id(), get_objfile_arch(), dwarf_expr_context::initialized, internal_error(), invalid_synthetic_pointer(), dwarf_expr_context::len, dwarf_expr_context::location, longest_to_int(), make_cleanup_free_dwarf_expr_context(), make_cleanup_value_free(), make_cleanup_value_free_to_mark(), mark_value_bytes_unavailable(), memcpy(), new_dwarf_expr_context(), NO_ENTRY_VALUE_ERROR, NOT_AVAILABLE_ERROR, dwarf_expr_context::num_pieces, dwarf_expr_context::offset, dwarf_expr_baton::per_cu, dwarf_expr_context::pieces, gdb_exception::reason, dwarf_expr_context::ref_addr_size, RETURN_MASK_ERROR, set_value_initialized(), set_value_offset(), set_value_stack(), dwarf_expr_piece::size, throw_exception(), TRY_CATCH, TYPE_LENGTH, ULONGEST, value_as_long(), value_at_lazy(), value_contents_all(), value_contents_raw(), VALUE_FRAME_ID, value_from_register(), value_incref(), value_mark(), value_optimized_out(), and value_type().
Referenced by dwarf2_evaluate_loc_desc(), and indirect_pieced_value().
const gdb_byte* dwarf2_find_location_expression | ( | struct dwarf2_loclist_baton * | baton, |
size_t * | locexpr_length, | ||
CORE_ADDR | pc | ||
) |
Definition at line 211 of file dwarf2loc.c.
References _, dwarf2_loclist_baton::base_address, block_for_pc(), block_linkage_function(), BLOCK_START, gdbarch::byte_order, dwarf2_loclist_baton::data, DEBUG_LOC_BASE_ADDRESS, DEBUG_LOC_BUFFER_OVERFLOW, DEBUG_LOC_END_OF_LIST, DEBUG_LOC_INVALID_ENTRY, DEBUG_LOC_START_END, DEBUG_LOC_START_LENGTH, decode_debug_loc_addresses(), decode_debug_loc_dwo_addresses(), dwarf2_per_cu_addr_size(), dwarf2_per_cu_objfile(), dwarf2_per_cu_text_offset(), error(), extract_unsigned_integer(), dwarf2_loclist_baton::from_dwo, gdb_assert_not_reached, gdbarch_byte_order(), get_objfile_arch(), objfile::obfd, dwarf2_loclist_baton::per_cu, dwarf2_loclist_baton::size, and SYMBOL_BLOCK_VALUE.
Referenced by dwarf2_fetch_die_loc_sect_off(), loclist_find_frame_base_location(), loclist_read_variable(), loclist_read_variable_at_entry(), and loclist_tracepoint_var_ref().
static int dwarf2_loc_desc_needs_frame | ( | const gdb_byte * | data, |
size_t | size, | ||
struct dwarf2_per_cu_data * | per_cu | ||
) | [static] |
Definition at line 2534 of file dwarf2loc.c.
References dwarf_expr_context::addr_size, dwarf_expr_context::baton, do_cleanups(), dwarf2_per_cu_addr_size(), dwarf2_per_cu_objfile(), dwarf2_per_cu_ref_addr_size(), dwarf2_per_cu_text_offset(), dwarf_expr_eval(), DWARF_VALUE_REGISTER, dwarf_expr_context::funcs, dwarf_expr_context::gdbarch, get_objfile_arch(), dwarf_expr_context::location, dwarf_expr_piece::location, make_cleanup_free_dwarf_expr_context(), make_cleanup_value_free_to_mark(), needs_frame_baton::needs_frame, needs_frame_ctx_funcs, new_dwarf_expr_context(), dwarf_expr_context::num_pieces, dwarf_expr_context::offset, needs_frame_baton::per_cu, dwarf_expr_context::pieces, dwarf_expr_context::ref_addr_size, and value_mark().
Referenced by locexpr_read_needs_frame().
static struct value* dwarf_entry_parameter_to_value | ( | struct call_site_parameter * | parameter, |
CORE_ADDR | deref_size, | ||
struct type * | type, | ||
struct frame_info * | caller_frame, | ||
struct dwarf2_per_cu_data * | per_cu | ||
) | [static, read] |
Definition at line 1136 of file dwarf2loc.c.
References _, dwarf2_evaluate_loc_desc(), memcpy(), NO_ENTRY_VALUE_ERROR, size, and throw_error().
Referenced by value_of_dwarf_reg_entry().
static void dwarf_expr_dwarf_call | ( | struct dwarf_expr_context * | ctx, |
cu_offset | die_offset | ||
) | [static] |
Definition at line 483 of file dwarf2loc.c.
References dwarf_expr_context::baton, dwarf_expr_context::funcs, dwarf_expr_context_funcs::get_frame_pc, dwarf_expr_baton::per_cu, and per_cu_dwarf_call().
static void dwarf_expr_frame_base | ( | void * | baton, |
const gdb_byte ** | start, | ||
size_t * | length | ||
) | [static] |
Definition at line 341 of file dwarf2loc.c.
References _, block_linkage_function(), dwarf_expr_frame_base_1(), error(), dwarf_expr_baton::frame, gdb_assert, get_frame_address_in_block(), and get_frame_block().
static void dwarf_expr_frame_base_1 | ( | struct symbol * | framefunc, |
CORE_ADDR | pc, | ||
const gdb_byte ** | start, | ||
size_t * | length | ||
) | [static] |
Definition at line 410 of file dwarf2loc.c.
References _, error(), symbol_block_ops::find_frame_base_location, SYMBOL_BLOCK_OPS, and SYMBOL_NATURAL_NAME.
Referenced by dwarf2_compile_expr_to_ax(), dwarf_expr_frame_base(), and locexpr_describe_location_piece().
static CORE_ADDR dwarf_expr_frame_cfa | ( | void * | baton | ) | [static] |
Definition at line 431 of file dwarf2loc.c.
References dwarf2_frame_cfa(), and dwarf_expr_baton::frame.
static CORE_ADDR dwarf_expr_frame_pc | ( | void * | baton | ) | [static] |
Definition at line 442 of file dwarf2loc.c.
References dwarf_expr_baton::frame, and get_frame_address_in_block().
static CORE_ADDR dwarf_expr_get_addr_index | ( | void * | baton, |
unsigned int | index | ||
) | [static] |
Definition at line 1224 of file dwarf2loc.c.
References dwarf2_read_addr_index(), and dwarf_expr_baton::per_cu.
static struct type* dwarf_expr_get_base_type | ( | struct dwarf_expr_context * | ctx, |
cu_offset | die_offset | ||
) | [static, read] |
Definition at line 494 of file dwarf2loc.c.
References dwarf_expr_context::baton, dwarf2_get_die_type(), and dwarf_expr_baton::per_cu.
static void dwarf_expr_push_dwarf_reg_entry_value | ( | struct dwarf_expr_context * | ctx, |
enum call_site_parameter_kind | kind, | ||
union call_site_parameter_u | kind_u, | ||
int | deref_size | ||
) | [static] |
Definition at line 1171 of file dwarf2loc.c.
References _, dwarf_expr_context::addr_size, dwarf_expr_context::baton, dwarf2_per_cu_addr_size(), dwarf2_per_cu_objfile(), dwarf2_per_cu_text_offset(), dwarf_expr_ctx_funcs, dwarf_expr_eval(), dwarf_expr_reg_to_entry_parameter(), dwarf_expr_baton::frame, dwarf_expr_context::funcs, gdb_assert, dwarf_expr_context::gdbarch, get_objfile_arch(), get_prev_frame(), NO_ENTRY_VALUE_ERROR, dwarf_expr_context::offset, dwarf_expr_baton::per_cu, size, and throw_error().
static void dwarf_expr_read_mem | ( | void * | baton, |
gdb_byte * | buf, | ||
CORE_ADDR | addr, | ||
size_t | len | ||
) | [static] |
Definition at line 332 of file dwarf2loc.c.
References read_memory().
static CORE_ADDR dwarf_expr_read_reg | ( | void * | baton, |
int | dwarf_regnum | ||
) | [static] |
Definition at line 316 of file dwarf2loc.c.
References address_from_register(), dwarf_expr_baton::frame, gdbarch_dwarf2_reg_to_regnum(), get_frame_arch(), and regnum.
static struct call_site_parameter* dwarf_expr_reg_to_entry_parameter | ( | struct frame_info * | frame, |
enum call_site_parameter_kind | kind, | ||
union call_site_parameter_u | kind_u, | ||
struct dwarf2_per_cu_data ** | per_cu_return | ||
) | [static, read] |
Definition at line 1028 of file dwarf2loc.c.
References _, call_site_for_pc(), call_site_parameter_matches(), call_site_to_target_addr(), frame_unwind_arch(), func_verify_no_selftailcall(), gdb_assert, gdbarch_bfd_arch_info(), get_frame_arch(), get_frame_func(), get_frame_pc(), get_frame_type(), get_prev_frame(), INLINE_FRAME, lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, NO_ENTRY_VALUE_ERROR, paddress(), call_site::parameter, call_site::parameter_count, call_site::per_cu, SYMBOL_PRINT_NAME, and throw_error().
Referenced by dwarf_expr_push_dwarf_reg_entry_value(), and value_of_dwarf_reg_entry().
static CORE_ADDR dwarf_expr_tls_address | ( | void * | baton, |
CORE_ADDR | offset | ||
) | [static] |
Definition at line 452 of file dwarf2loc.c.
References dwarf2_per_cu_objfile(), dwarf_expr_baton::per_cu, and target_translate_tls_address().
static struct value* entry_data_value_coerce_ref | ( | const struct value * | value | ) | [static, read] |
Definition at line 1236 of file dwarf2loc.c.
References check_typedef(), TYPE_CODE, TYPE_CODE_REF, value_computed_closure(), value_incref(), and value_type().
static void* entry_data_value_copy_closure | ( | const struct value * | v | ) | [static] |
Definition at line 1252 of file dwarf2loc.c.
References value_computed_closure(), and value_incref().
static void entry_data_value_free_closure | ( | struct value * | v | ) | [static] |
Definition at line 1263 of file dwarf2loc.c.
References value_computed_closure(), and value_free().
static unsigned int extract_bits | ( | const gdb_byte ** | source, |
unsigned int * | source_offset_bits, | ||
int | nbits, | ||
int | bits_big_endian | ||
) | [static] |
Definition at line 1476 of file dwarf2loc.c.
References extract_bits_primitive(), and gdb_assert.
Referenced by copy_bitwise().
static void free_pieced_value_closure | ( | struct value * | v | ) | [static] |
Definition at line 2148 of file dwarf2loc.c.
References DWARF_VALUE_STACK, dwarf_expr_piece::location, piece_closure::n_pieces, piece_closure::pieces, piece_closure::refc, dwarf_expr_piece::v, dwarf_expr_piece::value, value_computed_closure(), value_free(), and xfree().
static struct symbol* func_addr_to_tail_call_list | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | addr | ||
) | [static, read] |
Definition at line 611 of file dwarf2loc.c.
References _, BLOCK_START, find_pc_function(), gdb_assert, NO_ENTRY_VALUE_ERROR, paddress(), SYMBOL_BLOCK_VALUE, SYMBOL_TYPE, throw_error(), type, TYPE_CODE, TYPE_CODE_FUNC, TYPE_SPECIFIC_FIELD, and TYPE_SPECIFIC_FUNC.
Referenced by call_site_find_chain_1(), and func_verify_no_selftailcall().
static void func_verify_no_selftailcall | ( | struct gdbarch * | gdbarch, |
CORE_ADDR | verify_addr | ||
) | [static] |
Definition at line 639 of file dwarf2loc.c.
References _, call_site_to_target_addr(), core_addr_eq(), core_addr_hash(), do_cleanups(), func_addr_to_tail_call_list(), hashtab_obstack_allocate(), lookup_minimal_symbol_by_pc(), make_cleanup(), make_cleanup_htab_delete(), make_cleanup_obstack_free(), NO_ENTRY_VALUE_ERROR, paddress(), SYMBOL_PRINT_NAME, SYMBOL_TYPE, call_site::tail_call_next, throw_error(), TYPE_TAIL_CALL_LIST, VEC, VEC_cleanup, VEC_empty, VEC_pop, and VEC_safe_push.
Referenced by dwarf_expr_reg_to_entry_parameter().
Definition at line 2655 of file dwarf2loc.c.
References agent_expr::scope.
Referenced by dwarf2_compile_expr_to_ax().
static CORE_ADDR get_frame_address_in_block_wrapper | ( | void * | baton | ) | [static] |
Definition at line 2028 of file dwarf2loc.c.
References get_frame_address_in_block().
Referenced by indirect_pieced_value().
static struct value* indirect_pieced_value | ( | struct value * | value | ) | [static, read] |
Definition at line 2037 of file dwarf2loc.c.
References _, allocate_optimized_out_value(), check_typedef(), dwarf2_locexpr_baton::data, do_cleanups(), dwarf2_evaluate_loc_desc_full(), dwarf2_fetch_constant_bytes(), dwarf2_fetch_die_loc_sect_off(), DWARF_VALUE_IMPLICIT_POINTER, error(), gdb_assert, gdb_sign_extend(), get_frame_address_in_block_wrapper(), get_selected_frame(), invalid_synthetic_pointer(), len, dwarf_expr_piece::location, LONGEST, make_cleanup_obstack_free(), piece_closure::n_pieces, p, dwarf2_locexpr_baton::per_cu, piece_closure::per_cu, piece_closure::pieces, dwarf_expr_piece::ptr, dwarf2_locexpr_baton::size, dwarf_expr_piece::size, type, TYPE_CODE, TYPE_CODE_PTR, TYPE_LENGTH, TYPE_TARGET_TYPE, dwarf_expr_piece::v, value_as_address(), value_bitpos(), value_bitsize(), value_computed_closure(), value_from_contents(), value_offset(), and value_type().
static void invalid_synthetic_pointer | ( | void | ) | [static] |
Definition at line 95 of file dwarf2loc.c.
Referenced by dwarf2_evaluate_loc_desc_full(), and indirect_pieced_value().
static void locexpr_describe_location | ( | struct symbol * | symbol, |
CORE_ADDR | addr, | ||
struct ui_file * | stream | ||
) | [static] |
Definition at line 4005 of file dwarf2loc.c.
References dwarf2_locexpr_baton::data, dwarf2_per_cu_addr_size(), dwarf2_per_cu_objfile(), dwarf2_per_cu_offset_size(), locexpr_describe_location_1(), dwarf2_locexpr_baton::per_cu, dwarf2_locexpr_baton::size, and SYMBOL_LOCATION_BATON.
static void locexpr_describe_location_1 | ( | struct symbol * | symbol, |
CORE_ADDR | addr, | ||
struct ui_file * | stream, | ||
const gdb_byte * | data, | ||
size_t | size, | ||
struct objfile * | objfile, | ||
unsigned int | addr_size, | ||
int | offset_size, | ||
struct dwarf2_per_cu_data * | per_cu | ||
) | [static] |
Definition at line 3911 of file dwarf2loc.c.
References _, bits, disassemble_dwarf_expression(), dwarf2_always_disassemble, error(), fprintf_filtered(), get_objfile_arch(), locexpr_describe_location_piece(), offset, pulongest(), safe_read_uleb128(), size, and SYMBOL_PRINT_NAME.
Referenced by locexpr_describe_location(), and loclist_describe_location().
static const gdb_byte* locexpr_describe_location_piece | ( | struct symbol * | symbol, |
struct ui_file * | stream, | ||
CORE_ADDR | addr, | ||
struct objfile * | objfile, | ||
struct dwarf2_per_cu_data * | per_cu, | ||
const gdb_byte * | data, | ||
const gdb_byte * | end, | ||
unsigned int | addr_size | ||
) | [static] |
Definition at line 3377 of file dwarf2loc.c.
References _, block_for_pc(), block_linkage_function(), dwarf2_read_addr_index(), dwarf_expr_frame_base_1(), error(), extract_unsigned_integer(), fprintf_filtered(), gdbarch_byte_order(), get_objfile_arch(), leb128_size(), locexpr_regname(), objfile_name(), offset, phex_nz(), piece_end_p(), plongest(), safe_read_sleb128(), safe_read_uleb128(), SYMBOL_PRINT_NAME, and ULONGEST.
Referenced by locexpr_describe_location_1().
static void locexpr_find_frame_base_location | ( | struct symbol * | framefunc, |
CORE_ADDR | pc, | ||
const gdb_byte ** | start, | ||
size_t * | length | ||
) | [static] |
Definition at line 372 of file dwarf2loc.c.
References dwarf2_locexpr_baton::data, dwarf2_locexpr_baton::size, and SYMBOL_LOCATION_BATON.
static int locexpr_read_needs_frame | ( | struct symbol * | symbol | ) | [static] |
Definition at line 3341 of file dwarf2loc.c.
References dwarf2_locexpr_baton::data, dwarf2_loc_desc_needs_frame(), dwarf2_locexpr_baton::per_cu, dwarf2_locexpr_baton::size, and SYMBOL_LOCATION_BATON.
static struct value* locexpr_read_variable | ( | struct symbol * | symbol, |
struct frame_info * | frame | ||
) | [static, read] |
Definition at line 3315 of file dwarf2loc.c.
References dwarf2_locexpr_baton::data, dwarf2_evaluate_loc_desc(), dwarf2_locexpr_baton::per_cu, dwarf2_locexpr_baton::size, SYMBOL_LOCATION_BATON, and SYMBOL_TYPE.
static struct value* locexpr_read_variable_at_entry | ( | struct symbol * | symbol, |
struct frame_info * | frame | ||
) | [static, read] |
Definition at line 3331 of file dwarf2loc.c.
References dwarf2_locexpr_baton::data, dwarf2_locexpr_baton::size, SYMBOL_LOCATION_BATON, SYMBOL_TYPE, and value_of_dwarf_block_entry().
static const char* locexpr_regname | ( | struct gdbarch * | gdbarch, |
int | dwarf_regnum | ||
) | [static] |
Definition at line 3362 of file dwarf2loc.c.
References gdbarch_dwarf2_reg_to_regnum(), gdbarch_register_name(), and regnum.
Referenced by disassemble_dwarf_expression(), and locexpr_describe_location_piece().
static void locexpr_tracepoint_var_ref | ( | struct symbol * | symbol, |
struct gdbarch * | gdbarch, | ||
struct agent_expr * | ax, | ||
struct axs_value * | value | ||
) | [static] |
Definition at line 4023 of file dwarf2loc.c.
References dwarf2_locexpr_baton::data, dwarf2_compile_expr_to_ax(), dwarf2_per_cu_addr_size(), axs_value::optimized_out, dwarf2_locexpr_baton::per_cu, dwarf2_locexpr_baton::size, and SYMBOL_LOCATION_BATON.
static void loclist_describe_location | ( | struct symbol * | symbol, |
CORE_ADDR | addr, | ||
struct ui_file * | stream | ||
) | [static] |
Definition at line 4114 of file dwarf2loc.c.
References _, dwarf2_loclist_baton::base_address, gdbarch::byte_order, dwarf2_loclist_baton::data, DEBUG_LOC_BASE_ADDRESS, DEBUG_LOC_BUFFER_OVERFLOW, DEBUG_LOC_END_OF_LIST, DEBUG_LOC_INVALID_ENTRY, DEBUG_LOC_START_END, DEBUG_LOC_START_LENGTH, decode_debug_loc_addresses(), decode_debug_loc_dwo_addresses(), dwarf2_per_cu_addr_size(), dwarf2_per_cu_objfile(), dwarf2_per_cu_offset_size(), dwarf2_per_cu_text_offset(), error(), extract_unsigned_integer(), fprintf_filtered(), dwarf2_loclist_baton::from_dwo, gdb_assert_not_reached, gdbarch_byte_order(), get_objfile_arch(), locexpr_describe_location_1(), objfile::obfd, paddress(), dwarf2_loclist_baton::per_cu, dwarf2_loclist_baton::size, SYMBOL_LOCATION_BATON, and SYMBOL_PRINT_NAME.
static void loclist_find_frame_base_location | ( | struct symbol * | framefunc, |
CORE_ADDR | pc, | ||
const gdb_byte ** | start, | ||
size_t * | length | ||
) | [static] |
Definition at line 393 of file dwarf2loc.c.
References dwarf2_find_location_expression(), and SYMBOL_LOCATION_BATON.
static int loclist_read_needs_frame | ( | struct symbol * | symbol | ) | [static] |
Definition at line 4098 of file dwarf2loc.c.
static struct value* loclist_read_variable | ( | struct symbol * | symbol, |
struct frame_info * | frame | ||
) | [static, read] |
Definition at line 4055 of file dwarf2loc.c.
References dwarf2_evaluate_loc_desc(), dwarf2_find_location_expression(), get_frame_address_in_block(), dwarf2_loclist_baton::per_cu, size, SYMBOL_LOCATION_BATON, and SYMBOL_TYPE.
static struct value* loclist_read_variable_at_entry | ( | struct symbol * | symbol, |
struct frame_info * | frame | ||
) | [static, read] |
Definition at line 4079 of file dwarf2loc.c.
References allocate_optimized_out_value(), dwarf2_loclist_baton::data, dwarf2_find_location_expression(), get_frame_func_if_available(), size, SYMBOL_LOCATION_BATON, SYMBOL_TYPE, and value_of_dwarf_block_entry().
static void loclist_tracepoint_var_ref | ( | struct symbol * | symbol, |
struct gdbarch * | gdbarch, | ||
struct agent_expr * | ax, | ||
struct axs_value * | value | ||
) | [static] |
Definition at line 4200 of file dwarf2loc.c.
References dwarf2_loclist_baton::data, dwarf2_compile_expr_to_ax(), dwarf2_find_location_expression(), dwarf2_per_cu_addr_size(), axs_value::optimized_out, dwarf2_loclist_baton::per_cu, agent_expr::scope, size, and SYMBOL_LOCATION_BATON.
static void needs_dwarf_reg_entry_value | ( | struct dwarf_expr_context * | ctx, |
enum call_site_parameter_kind | kind, | ||
union call_site_parameter_u | kind_u, | ||
int | deref_size | ||
) | [static] |
Definition at line 2493 of file dwarf2loc.c.
References dwarf_expr_context::baton, dwarf_expr_push_address(), and needs_frame_baton::needs_frame.
static void needs_frame_dwarf_call | ( | struct dwarf_expr_context * | ctx, |
cu_offset | die_offset | ||
) | [static] |
Definition at line 2482 of file dwarf2loc.c.
References dwarf_expr_context::baton, dwarf_expr_context::funcs, dwarf_expr_context_funcs::get_frame_pc, needs_frame_baton::per_cu, and per_cu_dwarf_call().
static void needs_frame_frame_base | ( | void * | baton, |
const gdb_byte ** | start, | ||
size_t * | length | ||
) | [static] |
Definition at line 2447 of file dwarf2loc.c.
References needs_frame_baton::needs_frame.
static CORE_ADDR needs_frame_frame_cfa | ( | void * | baton | ) | [static] |
Definition at line 2461 of file dwarf2loc.c.
References needs_frame_baton::needs_frame.
static void needs_frame_read_mem | ( | void * | baton, |
gdb_byte * | buf, | ||
CORE_ADDR | addr, | ||
size_t | len | ||
) | [static] |
Definition at line 2440 of file dwarf2loc.c.
References memset().
static CORE_ADDR needs_frame_read_reg | ( | void * | baton, |
int | regnum | ||
) | [static] |
Definition at line 2430 of file dwarf2loc.c.
References needs_frame_baton::needs_frame.
static CORE_ADDR needs_frame_tls_address | ( | void * | baton, |
CORE_ADDR | offset | ||
) | [static] |
Definition at line 2471 of file dwarf2loc.c.
References needs_frame_baton::needs_frame.
static CORE_ADDR needs_get_addr_index | ( | void * | baton, |
unsigned int | index | ||
) | [static] |
Definition at line 2508 of file dwarf2loc.c.
static void per_cu_dwarf_call | ( | struct dwarf_expr_context * | ctx, |
cu_offset | die_offset, | ||
struct dwarf2_per_cu_data * | per_cu, | ||
CORE_ADDR(*)(void *baton) | get_frame_pc, | ||
void * | baton | ||
) | [static] |
Definition at line 465 of file dwarf2loc.c.
References dwarf_expr_context::data, dwarf2_fetch_die_loc_cu_off(), dwarf_expr_eval(), gdb_assert, and get_frame_pc().
Referenced by dwarf_expr_dwarf_call(), and needs_frame_dwarf_call().
Definition at line 3353 of file dwarf2loc.c.
Referenced by locexpr_describe_location_piece().
static void read_pieced_value | ( | struct value * | v | ) | [static] |
Definition at line 1594 of file dwarf2loc.c.
References _, piece_closure::addr_size, copy_bitwise(), do_cleanups(), DWARF_VALUE_IMPLICIT_POINTER, DWARF_VALUE_LITERAL, DWARF_VALUE_MEMORY, DWARF_VALUE_OPTIMIZED_OUT, DWARF_VALUE_REGISTER, DWARF_VALUE_STACK, error(), frame_find_by_id(), free_current_contents(), gdbarch_bits_big_endian(), gdbarch_byte_order(), gdbarch_dwarf2_reg_to_regnum(), get_frame_arch(), get_frame_register_bytes(), get_type_arch(), internal_error(), dwarf_expr_piece::literal, dwarf_expr_piece::location, make_cleanup(), mark_value_bytes_unavailable(), dwarf_expr_piece::mem, memset(), piece_closure::n_pieces, offset, p, paddress(), piece_closure::pieces, read_value_memory(), reg_offset, register_size(), dwarf_expr_piece::regno, set_value_optimized_out(), dwarf_expr_piece::size, TYPE_LENGTH, ULONGEST, dwarf_expr_piece::v, dwarf_expr_piece::value, value_bitpos(), value_bitsize(), value_computed_closure(), value_contents_all(), value_contents_raw(), value_enclosing_type(), VALUE_FRAME_ID, value_offset(), value_type(), and xrealloc().
static void show_entry_values_debug | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 509 of file dwarf2loc.c.
References _, and fprintf_filtered().
Referenced by _initialize_dwarf2loc().
static void tailcall_dump | ( | struct gdbarch * | gdbarch, |
const struct call_site * | call_site | ||
) | [static] |
Definition at line 712 of file dwarf2loc.c.
References fprintf_unfiltered(), gdb_stdlog, lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, paddress(), call_site::pc, and SYMBOL_PRINT_NAME.
Referenced by chain_candidate().
static int translate_register | ( | struct gdbarch * | arch, |
int | dwarf_reg | ||
) | [static] |
Definition at line 2601 of file dwarf2loc.c.
References _, error(), and gdbarch_dwarf2_reg_to_regnum().
Referenced by dwarf2_compile_expr_to_ax().
static void unimplemented | ( | unsigned int | op | ) | [static] |
Definition at line 2581 of file dwarf2loc.c.
References _, error(), and name.
Referenced by dwarf2_compile_expr_to_ax().
static struct value* value_of_dwarf_block_entry | ( | struct type * | type, |
struct frame_info * | frame, | ||
const gdb_byte * | block, | ||
size_t | block_len | ||
) | [static, read] |
Definition at line 1356 of file dwarf2loc.c.
References _, CALL_SITE_PARAMETER_DWARF_REG, CALL_SITE_PARAMETER_FB_OFFSET, dwarf_block_to_dwarf_reg(), dwarf_block_to_fb_offset(), NO_ENTRY_VALUE_ERROR, throw_error(), and value_of_dwarf_reg_entry().
Referenced by locexpr_read_variable_at_entry(), and loclist_read_variable_at_entry().
static struct value* value_of_dwarf_reg_entry | ( | struct type * | type, |
struct frame_info * | frame, | ||
enum call_site_parameter_kind | kind, | ||
union call_site_parameter_u | kind_u | ||
) | [static, read] |
Definition at line 1295 of file dwarf2loc.c.
References allocate_computed_value(), check_typedef(), dwarf_entry_parameter_to_value(), dwarf_expr_reg_to_entry_parameter(), extract_typed_address(), get_prev_frame(), lval_memory, memcpy(), release_value(), set_value_address(), set_value_lazy(), TYPE_CODE, TYPE_CODE_REF, TYPE_LENGTH, TYPE_TARGET_TYPE, value_contents(), value_contents_raw(), and VALUE_LVAL.
Referenced by value_of_dwarf_block_entry().
static void write_pieced_value | ( | struct value * | to, |
struct value * | from | ||
) | [static] |
Definition at line 1777 of file dwarf2loc.c.
References _, copy_bitwise(), do_cleanups(), DWARF_VALUE_MEMORY, DWARF_VALUE_REGISTER, error(), frame_find_by_id(), free_current_contents(), gdbarch_bits_big_endian(), gdbarch_byte_order(), gdbarch_dwarf2_reg_to_regnum(), get_frame_arch(), get_frame_register_bytes(), get_type_arch(), dwarf_expr_piece::location, make_cleanup(), dwarf_expr_piece::mem, piece_closure::n_pieces, NOT_AVAILABLE_ERROR, offset, p, paddress(), piece_closure::pieces, put_frame_register_bytes(), read_memory(), reg_offset, register_size(), dwarf_expr_piece::regno, set_value_optimized_out(), dwarf_expr_piece::size, throw_error(), TYPE_LENGTH, ULONGEST, dwarf_expr_piece::v, value_bitpos(), value_bitsize(), value_computed_closure(), value_contents(), VALUE_FRAME_ID, value_offset(), value_type(), write_memory(), and xrealloc().
Referenced by initialize_all_files().
Definition at line 22300 of file dwarf2read.c.
Referenced by locexpr_describe_location_1().
Definition at line 384 of file dwarf2loc.c.
Definition at line 404 of file dwarf2loc.c.
{ locexpr_read_variable, locexpr_read_variable_at_entry, locexpr_read_needs_frame, locexpr_describe_location, 0, locexpr_tracepoint_var_ref }
Definition at line 4039 of file dwarf2loc.c.
{ loclist_read_variable, loclist_read_variable_at_entry, loclist_read_needs_frame, loclist_describe_location, 1, loclist_tracepoint_var_ref }
Definition at line 4218 of file dwarf2loc.c.
static struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs [static] |
{ dwarf_expr_read_reg, dwarf_expr_read_mem, dwarf_expr_frame_base, dwarf_expr_frame_cfa, dwarf_expr_frame_pc, dwarf_expr_tls_address, dwarf_expr_dwarf_call, dwarf_expr_get_base_type, dwarf_expr_push_dwarf_reg_entry_value, dwarf_expr_get_addr_index }
Definition at line 50 of file dwarf2loc.c.
Referenced by dwarf2_evaluate_loc_desc_full(), and dwarf_expr_push_dwarf_reg_entry_value().
struct lval_funcs entry_data_value_funcs [static] |
{ NULL, NULL, NULL, NULL, NULL, entry_data_value_coerce_ref, NULL, entry_data_value_copy_closure, entry_data_value_free_closure }
Definition at line 1274 of file dwarf2loc.c.
unsigned int entry_values_debug = 0 |
Definition at line 504 of file dwarf2loc.c.
Referenced by dwarf2_tailcall_sniffer_first().
struct dwarf_expr_context_funcs needs_frame_ctx_funcs [static] |
{ needs_frame_read_reg, needs_frame_read_mem, needs_frame_frame_base, needs_frame_frame_cfa, needs_frame_frame_cfa, needs_frame_tls_address, needs_frame_dwarf_call, NULL, needs_dwarf_reg_entry_value, needs_get_addr_index }
Definition at line 2516 of file dwarf2loc.c.
Referenced by dwarf2_loc_desc_needs_frame().
struct lval_funcs pieced_value_funcs [static] |
{ read_pieced_value, write_pieced_value, check_pieced_value_validity, check_pieced_value_invalid, indirect_pieced_value, NULL, check_pieced_synthetic_pointer, copy_pieced_value_closure, free_pieced_value_closure }
Definition at line 2168 of file dwarf2loc.c.