GDB (xrefs)
|
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "gdbcore.h"
#include "dwarf2.h"
#include "dwarf2expr.h"
#include "gdb_assert.h"
Go to the source code of this file.
void _initialize_dwarf2expr | ( | void | ) |
Definition at line 1577 of file dwarf2expr.c.
References _initialize_dwarf2expr, dwarf_gdbarch_types_init(), and gdbarch_data_register_post_init().
static void add_piece | ( | struct dwarf_expr_context * | ctx, |
ULONGEST | size, | ||
ULONGEST | offset | ||
) | [static] |
Definition at line 308 of file dwarf2expr.c.
References dwarf_expr_context::data, dwarf_expr_fetch(), dwarf_expr_fetch_address(), dwarf_expr_fetch_in_stack_memory(), dwarf_expr_stack_empty_p(), DWARF_VALUE_IMPLICIT_POINTER, DWARF_VALUE_LITERAL, DWARF_VALUE_MEMORY, DWARF_VALUE_OPTIMIZED_OUT, DWARF_VALUE_REGISTER, dwarf_expr_context::len, dwarf_expr_piece::literal, dwarf_expr_context::location, dwarf_expr_piece::location, dwarf_expr_piece::mem, dwarf_expr_context::num_pieces, offset, dwarf_expr_piece::offset, p, dwarf_expr_context::pieces, dwarf_expr_piece::ptr, dwarf_expr_piece::regno, dwarf_expr_piece::size, size, dwarf_expr_piece::v, dwarf_expr_piece::value, value_as_long(), and xrealloc().
Referenced by execute_stack_op().
static int base_types_equal_p | ( | struct type * | t1, |
struct type * | t2 | ||
) | [static] |
Definition at line 427 of file dwarf2expr.c.
References TYPE_CODE, TYPE_LENGTH, and TYPE_UNSIGNED.
Referenced by execute_stack_op().
void ctx_no_dwarf_call | ( | struct dwarf_expr_context * | ctx, |
cu_offset | die_offset | ||
) |
Definition at line 1539 of file dwarf2expr.c.
CORE_ADDR ctx_no_get_addr_index | ( | void * | baton, |
unsigned int | index | ||
) |
Definition at line 1568 of file dwarf2expr.c.
struct type* ctx_no_get_base_type | ( | struct dwarf_expr_context * | ctx, |
cu_offset | die | ||
) | [read] |
Definition at line 1547 of file dwarf2expr.c.
void ctx_no_get_frame_base | ( | void * | baton, |
const gdb_byte ** | start, | ||
size_t * | length | ||
) |
Definition at line 1507 of file dwarf2expr.c.
CORE_ADDR ctx_no_get_frame_cfa | ( | void * | baton | ) |
Definition at line 1515 of file dwarf2expr.c.
CORE_ADDR ctx_no_get_frame_pc | ( | void * | baton | ) |
Definition at line 1523 of file dwarf2expr.c.
CORE_ADDR ctx_no_get_tls_address | ( | void * | baton, |
CORE_ADDR | offset | ||
) |
Definition at line 1531 of file dwarf2expr.c.
void ctx_no_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 | ||
) |
Definition at line 1556 of file dwarf2expr.c.
References _, and internal_error().
Definition at line 465 of file dwarf2expr.c.
References gdb_read_uleb128(), and gdb_skip_leb128().
Referenced by execute_stack_op(), read_call_site_scope(), and value_of_dwarf_block_entry().
int dwarf_block_to_dwarf_reg_deref | ( | const gdb_byte * | buf, |
const gdb_byte * | buf_end, | ||
CORE_ADDR * | deref_size_return | ||
) |
Definition at line 508 of file dwarf2expr.c.
References gdb_read_sleb128(), gdb_read_uleb128(), and offset.
Referenced by execute_stack_op().
int dwarf_block_to_fb_offset | ( | const gdb_byte * | buf, |
const gdb_byte * | buf_end, | ||
CORE_ADDR * | fb_offset_return | ||
) |
Definition at line 567 of file dwarf2expr.c.
References gdb_read_sleb128(), and LONGEST.
Referenced by value_of_dwarf_block_entry().
int dwarf_block_to_sp_offset | ( | struct gdbarch * | gdbarch, |
const gdb_byte * | buf, | ||
const gdb_byte * | buf_end, | ||
CORE_ADDR * | sp_offset_return | ||
) |
Definition at line 594 of file dwarf2expr.c.
References gdb_read_sleb128(), gdb_read_uleb128(), gdbarch_dwarf2_reg_to_regnum(), gdbarch_sp_regnum(), and LONGEST.
Referenced by read_call_site_scope().
static struct type* dwarf_expr_address_type | ( | struct dwarf_expr_context * | ctx | ) | [static, read] |
Definition at line 66 of file dwarf2expr.c.
References _, dwarf_expr_context::addr_size, arch_integer_type(), dwarf_gdbarch_types::dw_types, error(), dwarf_expr_context::gdbarch, and gdbarch_data().
Referenced by dwarf_expr_push_address(), and execute_stack_op().
void dwarf_expr_eval | ( | struct dwarf_expr_context * | ctx, |
const gdb_byte * | addr, | ||
size_t | len | ||
) |
Definition at line 359 of file dwarf2expr.c.
References execute_stack_op(), gdb_assert, and dwarf_expr_context::recursion_depth.
Referenced by dwarf2_evaluate_loc_desc_full(), dwarf2_loc_desc_needs_frame(), dwarf_expr_push_dwarf_reg_entry_value(), execute_stack_op(), and per_cu_dwarf_call().
struct value* dwarf_expr_fetch | ( | struct dwarf_expr_context * | ctx, |
int | n | ||
) | [read] |
Definition at line 189 of file dwarf2expr.c.
References _, error(), dwarf_expr_context::stack, and dwarf_expr_context::stack_len.
Referenced by add_piece(), dwarf2_evaluate_loc_desc_full(), dwarf_expr_fetch_address(), and execute_stack_op().
CORE_ADDR dwarf_expr_fetch_address | ( | struct dwarf_expr_context * | ctx, |
int | n | ||
) |
Definition at line 256 of file dwarf2expr.c.
References dwarf_expr_context::addr_size, dwarf_expr_fetch(), dwarf_require_integral(), extract_unsigned_integer(), dwarf_expr_context::gdbarch, gdbarch_byte_order(), gdbarch_integer_to_address(), gdbarch_integer_to_address_p(), get_unsigned_type(), store_unsigned_integer(), TYPE_LENGTH, ULONGEST, value_contents(), and value_type().
Referenced by add_piece(), dwarf2_evaluate_loc_desc_full(), and execute_stack_op().
int dwarf_expr_fetch_in_stack_memory | ( | struct dwarf_expr_context * | ctx, |
int | n | ||
) |
Definition at line 289 of file dwarf2expr.c.
References _, error(), dwarf_expr_context::stack, and dwarf_expr_context::stack_len.
Referenced by add_piece(), dwarf2_evaluate_loc_desc_full(), and execute_stack_op().
static void dwarf_expr_grow_stack | ( | struct dwarf_expr_context * | ctx, |
size_t | need | ||
) | [static] |
Definition at line 139 of file dwarf2expr.c.
References dwarf_expr_context::stack, dwarf_expr_context::stack_allocated, dwarf_expr_context::stack_len, and xrealloc().
Referenced by dwarf_expr_push().
static void dwarf_expr_pop | ( | struct dwarf_expr_context * | ctx | ) | [static] |
Definition at line 179 of file dwarf2expr.c.
References _, error(), and dwarf_expr_context::stack_len.
Referenced by execute_stack_op().
static void dwarf_expr_push | ( | struct dwarf_expr_context * | ctx, |
struct value * | value, | ||
int | in_stack_memory | ||
) | [static] |
Definition at line 154 of file dwarf2expr.c.
References dwarf_expr_grow_stack(), dwarf_stack_value::in_stack_memory, dwarf_expr_context::stack, dwarf_expr_context::stack_len, and dwarf_stack_value::value.
Referenced by dwarf_expr_push_address(), and execute_stack_op().
void dwarf_expr_push_address | ( | struct dwarf_expr_context * | ctx, |
CORE_ADDR | value, | ||
int | in_stack_memory | ||
) |
Definition at line 168 of file dwarf2expr.c.
References dwarf_expr_address_type(), dwarf_expr_push(), and value_from_ulongest().
Referenced by execute_stack_op(), and needs_dwarf_reg_entry_value().
void dwarf_expr_require_composition | ( | const gdb_byte * | op_ptr, |
const gdb_byte * | op_end, | ||
const char * | op_name | ||
) |
Definition at line 409 of file dwarf2expr.c.
Referenced by dwarf2_compile_expr_to_ax(), and execute_stack_op().
static int dwarf_expr_stack_empty_p | ( | struct dwarf_expr_context * | ctx | ) | [static] |
Definition at line 301 of file dwarf2expr.c.
References dwarf_expr_context::stack_len.
Referenced by add_piece().
static void* dwarf_gdbarch_types_init | ( | struct gdbarch * | gdbarch | ) | [static] |
Definition at line 51 of file dwarf2expr.c.
References GDBARCH_OBSTACK_ZALLOC.
Referenced by _initialize_dwarf2expr().
static struct type* dwarf_get_base_type | ( | struct dwarf_expr_context * | ctx, |
cu_offset | die, | ||
int | size | ||
) | [static, read] |
Definition at line 442 of file dwarf2expr.c.
References _, builtin_type::builtin_int, builtin_type(), error(), dwarf_expr_context::funcs, dwarf_expr_context::gdbarch, dwarf_expr_context_funcs::get_base_type, and TYPE_LENGTH.
Referenced by execute_stack_op().
static void dwarf_require_integral | ( | struct type * | type | ) | [static] |
Definition at line 201 of file dwarf2expr.c.
References _, error(), TYPE_CODE, TYPE_CODE_BOOL, TYPE_CODE_CHAR, and TYPE_CODE_INT.
Referenced by dwarf_expr_fetch_address(), and execute_stack_op().
static void execute_stack_op | ( | struct dwarf_expr_context * | ctx, |
const gdb_byte * | op_ptr, | ||
const gdb_byte * | op_end | ||
) | [static] |
Definition at line 635 of file dwarf2expr.c.
References _, add_piece(), dwarf_expr_context::addr_size, base_types_equal_p(), dwarf_expr_context::baton, CALL_SITE_PARAMETER_DWARF_REG, CALL_SITE_PARAMETER_PARAM_OFFSET, cu_offset::cu_off, dwarf_expr_context::data, dwarf_block_to_dwarf_reg(), dwarf_block_to_dwarf_reg_deref(), dwarf_expr_context_funcs::dwarf_call, dwarf_expr_address_type(), dwarf_expr_eval(), dwarf_expr_fetch(), dwarf_expr_fetch_address(), dwarf_expr_fetch_in_stack_memory(), dwarf_expr_pop(), dwarf_expr_push(), dwarf_expr_require_composition(), dwarf_get_base_type(), dwarf_require_integral(), DWARF_VALUE_IMPLICIT_POINTER, DWARF_VALUE_LITERAL, DWARF_VALUE_MEMORY, DWARF_VALUE_OPTIMIZED_OUT, DWARF_VALUE_REGISTER, DWARF_VALUE_STACK, error(), extract_signed_integer(), extract_unsigned_integer(), dwarf_expr_context::funcs, gdb_assert, dwarf_expr_context::gdbarch, gdbarch_byte_order(), dwarf_expr_context_funcs::get_addr_index, dwarf_expr_context_funcs::get_frame_base, dwarf_expr_context_funcs::get_frame_cfa, get_signed_type(), dwarf_expr_context_funcs::get_tls_address, get_unsigned_type(), dwarf_expr_context::initialized, internal_error(), len, dwarf_expr_context::len, dwarf_expr_context::location, dwarf_expr_context::max_recursion_depth, not_lval, offset, dwarf_expr_context::offset, dwarf_expr_context_funcs::push_dwarf_reg_entry_value, QUIT, dwarf_expr_context_funcs::read_mem, dwarf_expr_context_funcs::read_reg, dwarf_expr_context::recursion_depth, dwarf_expr_context::ref_addr_size, safe_read_sleb128(), safe_read_uleb128(), size, dwarf_expr_context::stack, dwarf_expr_context::stack_len, store_unsigned_integer(), stype, type, TYPE_LENGTH, TYPE_UNSIGNED, ULONGEST, value_as_long(), value_binop(), value_cast(), value_complement(), value_contents_all(), value_equal(), value_from_contents(), value_from_contents_and_address(), value_from_ulongest(), value_less(), value_neg(), value_type(), and value_zero().
Referenced by dwarf_expr_eval().
void free_dwarf_expr_context | ( | struct dwarf_expr_context * | ctx | ) |
Definition at line 112 of file dwarf2expr.c.
References dwarf_expr_context::pieces, dwarf_expr_context::stack, and xfree().
Referenced by free_dwarf_expr_context_cleanup().
static void free_dwarf_expr_context_cleanup | ( | void * | arg | ) | [static] |
Definition at line 122 of file dwarf2expr.c.
References free_dwarf_expr_context().
Referenced by make_cleanup_free_dwarf_expr_context().
static struct type* get_signed_type | ( | struct gdbarch * | gdbarch, |
struct type * | type | ||
) | [static, read] |
Definition at line 235 of file dwarf2expr.c.
References _, builtin_type::builtin_int16, builtin_type::builtin_int32, builtin_type::builtin_int64, builtin_type::builtin_int8, builtin_type(), error(), and TYPE_LENGTH.
Referenced by execute_stack_op().
static struct type* get_unsigned_type | ( | struct gdbarch * | gdbarch, |
struct type * | type | ||
) | [static, read] |
Definition at line 213 of file dwarf2expr.c.
References _, builtin_type(), builtin_type::builtin_uint16, builtin_type::builtin_uint32, builtin_type::builtin_uint64, builtin_type::builtin_uint8, error(), and TYPE_LENGTH.
Referenced by dwarf_expr_fetch_address(), and execute_stack_op().
struct cleanup* make_cleanup_free_dwarf_expr_context | ( | struct dwarf_expr_context * | ctx | ) | [read] |
Definition at line 130 of file dwarf2expr.c.
References free_dwarf_expr_context_cleanup(), and make_cleanup().
Referenced by dwarf2_evaluate_loc_desc_full(), dwarf2_loc_desc_needs_frame(), and execute_stack_op().
struct dwarf_expr_context* new_dwarf_expr_context | ( | void | ) | [read] |
Definition at line 94 of file dwarf2expr.c.
References dwarf_expr_context::max_recursion_depth, dwarf_expr_context::num_pieces, dwarf_expr_context::pieces, dwarf_expr_context::stack, dwarf_expr_context::stack_allocated, dwarf_expr_context::stack_len, xcalloc(), and xmalloc().
Referenced by dwarf2_evaluate_loc_desc_full(), dwarf2_loc_desc_needs_frame(), and execute_stack_op().
Definition at line 386 of file dwarf2expr.c.
References _, error(), and gdb_read_sleb128().
Referenced by disassemble_dwarf_expression(), dwarf2_compile_expr_to_ax(), execute_cfa_program(), execute_stack_op(), locexpr_describe_location_piece(), and read_encoded_value().
Definition at line 374 of file dwarf2expr.c.
References _, error(), and gdb_read_uleb128().
Referenced by disassemble_dwarf_expression(), dwarf2_compile_expr_to_ax(), execute_cfa_program(), execute_stack_op(), locexpr_describe_location_1(), locexpr_describe_location_piece(), and read_encoded_value().
Definition at line 396 of file dwarf2expr.c.
References _, error(), and gdb_skip_leb128().
Referenced by skip_one_die().
Referenced by _initialize_dwarf2expr(), and initialize_all_files().
struct gdbarch_data* dwarf_arch_cookie [static] |
Definition at line 38 of file dwarf2expr.c.