GDB (xrefs)
|
#include "defs.h"
#include "block.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "gdbcore.h"
#include "dwarf2.h"
#include "dwarf2/expr.h"
#include "dwarf2/loc.h"
#include "dwarf2/read.h"
#include "frame.h"
#include "gdbsupport/underlying.h"
#include "gdbarch.h"
#include "objfiles.h"
Go to the source code of this file.
Classes | |
struct | dwarf_gdbarch_types |
struct | piece_closure |
Functions | |
static void | ensure_have_frame (frame_info_ptr frame, const char *op_name) |
static void | ensure_have_per_cu (dwarf2_per_cu_data *per_cu, const char *op_name) |
static size_t | bits_to_bytes (ULONGEST start, ULONGEST n_bits) |
CORE_ADDR | read_addr_from_reg (frame_info_ptr frame, int reg) |
static piece_closure * | allocate_piece_closure (dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile, std::vector< dwarf_expr_piece > &&pieces, frame_info_ptr frame) |
static bool | rw_pieced_value (value *v, value *from, bool check_optimized) |
static void | read_pieced_value (value *v) |
static void | write_pieced_value (value *to, value *from) |
static bool | is_optimized_out_pieced_value (value *v) |
static bool | check_pieced_synthetic_pointer (const value *value, LONGEST bit_offset, int bit_length) |
static value * | indirect_pieced_value (value *value) |
static value * | coerce_pieced_ref (const value *value) |
static void * | copy_pieced_value_closure (const value *v) |
static void | free_pieced_value_closure (value *v) |
static value * | sect_variable_value (sect_offset sect_off, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile) |
static void | dwarf_require_integral (struct type *type) |
static struct type * | get_unsigned_type (struct gdbarch *gdbarch, struct type *type) |
static struct type * | get_signed_type (struct gdbarch *gdbarch, struct type *type) |
const gdb_byte * | safe_read_uleb128 (const gdb_byte *buf, const gdb_byte *buf_end, uint64_t *r) |
const gdb_byte * | safe_read_sleb128 (const gdb_byte *buf, const gdb_byte *buf_end, int64_t *r) |
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) |
static int | base_types_equal_p (struct type *t1, struct type *t2) |
int | dwarf_block_to_dwarf_reg (const gdb_byte *buf, const gdb_byte *buf_end) |
int | dwarf_block_to_dwarf_reg_deref (const gdb_byte *buf, const gdb_byte *buf_end, CORE_ADDR *deref_size_return) |
int | dwarf_block_to_fb_offset (const gdb_byte *buf, const gdb_byte *buf_end, CORE_ADDR *fb_offset_return) |
int | dwarf_block_to_sp_offset (struct gdbarch *gdbarch, const gdb_byte *buf, const gdb_byte *buf_end, CORE_ADDR *sp_offset_return) |
Variables | |
static const registry< gdbarch >::key< dwarf_gdbarch_types > | dwarf_arch_cookie |
static const struct lval_funcs | pieced_value_funcs |
|
static |
Definition at line 112 of file expr.c.
References DWARF_VALUE_STACK, piece_closure::frame_id, get_frame_id(), null_frame_id, piece_closure::per_cu, piece_closure::per_objfile, piece_closure::pieces, and piece_closure::refc.
Referenced by dwarf_expr_context::fetch_result().
Definition at line 1311 of file expr.c.
References type::code(), type::is_unsigned(), and type::length().
Referenced by dwarf_expr_context::execute_stack_op().
|
static |
Definition at line 73 of file expr.c.
Referenced by rw_pieced_value().
|
static |
Definition at line 470 of file expr.c.
References value::bitpos(), value::bitsize(), value::computed_closure(), DWARF_VALUE_IMPLICIT_POINTER, dwarf_expr_piece::location, value::offset(), piece_closure::pieces, and dwarf_expr_piece::size.
Definition at line 582 of file expr.c.
References value::bits_synthetic_pointer(), check_typedef(), value::computed_closure(), value::embedded_offset(), get_selected_frame(), indirect_synthetic_pointer(), type::length(), piece_closure::per_cu, piece_closure::per_objfile, piece_closure::pieces, and value::type().
|
static |
Definition at line 612 of file expr.c.
References value::computed_closure(), and piece_closure::refc.
int dwarf_block_to_dwarf_reg | ( | const gdb_byte * | buf, |
const gdb_byte * | buf_end ) |
Definition at line 1324 of file expr.c.
References gdb_read_uleb128(), and gdb_skip_leb128().
Referenced by dwarf_expr_context::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 1367 of file expr.c.
References gdb_read_sleb128(), and gdb_read_uleb128().
Referenced by dwarf_expr_context::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 1426 of file expr.c.
References gdb_read_sleb128().
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 1453 of file expr.c.
References dwarf_reg_to_regnum(), gdb_read_sleb128(), gdb_read_uleb128(), and gdbarch_sp_regnum().
Referenced by read_call_site_scope().
void dwarf_expr_require_composition | ( | const gdb_byte * | op_ptr, |
const gdb_byte * | op_end, | ||
const char * | op_name ) |
Definition at line 1295 of file expr.c.
Referenced by do_compile_dwarf_expr_to_c(), dwarf2_compile_expr_to_ax(), and dwarf_expr_context::execute_stack_op().
|
static |
Definition at line 1095 of file expr.c.
References type::code().
Referenced by dwarf_expr_context::execute_stack_op(), and dwarf_expr_context::fetch_address().
|
static |
Definition at line 52 of file expr.c.
Referenced by dwarf_expr_context::dwarf_call(), dwarf_expr_context::execute_stack_op(), dwarf_expr_context::get_frame_base(), and dwarf_expr_context::push_dwarf_reg_entry_value().
|
static |
Definition at line 62 of file expr.c.
Referenced by dwarf_expr_context::dwarf_call(), dwarf_expr_context::execute_stack_op(), and dwarf_expr_context::push_dwarf_reg_entry_value().
|
static |
Definition at line 621 of file expr.c.
References value::computed_closure(), DWARF_VALUE_STACK, piece_closure::pieces, and piece_closure::refc.
Definition at line 1129 of file expr.c.
References builtin_type::builtin_int16, builtin_type::builtin_int32, builtin_type::builtin_int64, builtin_type::builtin_int8, builtin_type(), and type::length().
Referenced by dwarf_expr_context::execute_stack_op().
Definition at line 1107 of file expr.c.
References builtin_type(), builtin_type::builtin_uint16, builtin_type::builtin_uint32, builtin_type::builtin_uint64, builtin_type::builtin_uint8, and type::length().
Referenced by dwarf_expr_context::execute_stack_op(), and dwarf_expr_context::fetch_address().
Definition at line 510 of file expr.c.
References type::bit_offset(), value::bitpos(), value::bitsize(), check_typedef(), type::code(), value::computed_closure(), value::contents(), dwarf_expr_piece::die_sect_off, DWARF_VALUE_IMPLICIT_POINTER, extract_signed_integer(), gdbarch_byte_order(), get_frame_arch(), get_selected_frame(), indirect_synthetic_pointer(), type::length(), dwarf_expr_piece::location, dwarf_expr_piece::offset, value::offset(), piece_closure::per_cu, piece_closure::per_objfile, piece_closure::pieces, dwarf_expr_piece::ptr, dwarf_expr_piece::size, value::type(), and dwarf_expr_piece::v.
|
static |
Definition at line 461 of file expr.c.
References rw_pieced_value().
CORE_ADDR read_addr_from_reg | ( | frame_info_ptr | frame, |
int | reg ) |
Definition at line 81 of file expr.c.
References address_from_register(), dwarf_reg_to_regnum_or_error(), get_frame_arch(), and regnum.
Referenced by dwarf2_frame_cache(), and dwarf_expr_context::execute_stack_op().
|
static |
Definition at line 449 of file expr.c.
References rw_pieced_value().
Definition at line 145 of file expr.c.
References dwarf_expr_piece::addr, objfile::arch(), value::bitpos(), bits_to_bytes(), value::bitsize(), value::computed_closure(), value::contents(), value::contents_all(), value::contents_raw(), copy_bitwise(), dwarf_expr_piece::data, dwarf_reg_to_regnum_or_error(), DWARF_VALUE_IMPLICIT_POINTER, DWARF_VALUE_LITERAL, DWARF_VALUE_MEMORY, DWARF_VALUE_OPTIMIZED_OUT, DWARF_VALUE_REGISTER, DWARF_VALUE_STACK, frame_find_by_id(), piece_closure::frame_id, gdbarch_byte_order(), get_frame_arch(), get_frame_register_bytes(), dwarf_expr_piece::in_stack_memory, dwarf_expr_piece::length, type::length(), dwarf_expr_piece::literal, dwarf_expr_piece::location, value::mark_bits_optimized_out(), value::mark_bits_unavailable(), dwarf_expr_piece::mem, dwarf2_per_objfile::objfile, dwarf_expr_piece::offset, value::offset(), value::parent(), piece_closure::per_objfile, piece_closure::pieces, put_frame_register_bytes(), read_memory(), read_value_memory(), register_size(), dwarf_expr_piece::regno, dwarf_expr_piece::size, value::type(), type_byte_order(), dwarf_expr_piece::v, dwarf_expr_piece::value, and write_memory_with_notification().
Referenced by is_optimized_out_pieced_value(), read_pieced_value(), and write_pieced_value().
const gdb_byte * safe_read_sleb128 | ( | const gdb_byte * | buf, |
const gdb_byte * | buf_end, | ||
int64_t * | r ) |
Definition at line 1271 of file expr.c.
References gdb_read_sleb128().
Referenced by compute_stack_depth_worker(), disassemble_dwarf_expression(), do_compile_dwarf_expr_to_c(), dwarf2_compile_expr_to_ax(), execute_cfa_program(), dwarf_expr_context::execute_stack_op(), locexpr_describe_location_piece(), and read_encoded_value().
const gdb_byte * safe_read_uleb128 | ( | const gdb_byte * | buf, |
const gdb_byte * | buf_end, | ||
uint64_t * | r ) |
Definition at line 1259 of file expr.c.
References gdb_read_uleb128().
Referenced by compute_stack_depth_worker(), disassemble_dwarf_expression(), do_compile_dwarf_expr_to_c(), dwarf2_compile_expr_to_ax(), dwarf2_get_symbol_read_needs(), execute_cfa_program(), dwarf_expr_context::execute_stack_op(), get_mpz(), locexpr_describe_location_1(), locexpr_describe_location_piece(), and read_encoded_value().
const gdb_byte * safe_skip_leb128 | ( | const gdb_byte * | buf, |
const gdb_byte * | buf_end ) |
Definition at line 1281 of file expr.c.
References gdb_skip_leb128().
Referenced by dwarf2_get_symbol_read_needs(), and skip_one_die().
|
static |
Definition at line 653 of file expr.c.
References type::code(), compute_var_value(), die_type(), dwarf2_fetch_die_type_sect_off(), get_selected_frame(), indirect_synthetic_pointer(), and lookup_pointer_type().
Referenced by dwarf_expr_context::execute_stack_op().
Definition at line 455 of file expr.c.
References rw_pieced_value().
|
static |
Definition at line 47 of file expr.c.
Referenced by dwarf_expr_context::address_type().
|
static |
Definition at line 637 of file expr.c.
Referenced by dwarf_expr_context::fetch_result().