GDB (xrefs)
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dwarf_expr_context Struct Reference

#include "expr.h"

Public Member Functions

 dwarf_expr_context (dwarf2_per_objfile *per_objfile, int addr_size)
 
virtual ~dwarf_expr_context ()=default
 
void push_address (CORE_ADDR value, bool in_stack_memory)
 
valueevaluate (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)
 

Private Member Functions

void eval (const gdb_byte *addr, size_t len)
 
struct typeaddress_type () const
 
void push (struct value *value, bool in_stack_memory)
 
bool stack_empty_p () const
 
void add_piece (ULONGEST size, ULONGEST offset)
 
void execute_stack_op (const gdb_byte *op_ptr, const gdb_byte *op_end)
 
void pop ()
 
struct valuefetch (int n)
 
CORE_ADDR fetch_address (int n)
 
bool fetch_in_stack_memory (int n)
 
valuefetch_result (struct type *type, struct type *subobj_type, LONGEST subobj_offset, bool as_lval)
 
void get_frame_base (const gdb_byte **start, size_t *length)
 
struct typeget_base_type (cu_offset die_cu_off)
 
void dwarf_call (cu_offset die_cu_off)
 
void push_dwarf_reg_entry_value (call_site_parameter_kind kind, call_site_parameter_u kind_u, int deref_size)
 
void read_mem (gdb_byte *buf, CORE_ADDR addr, size_t length)
 

Private Attributes

std::vector< dwarf_stack_valuem_stack
 
int m_addr_size = 0
 
int m_recursion_depth = 0
 
int m_max_recursion_depth = 0x100
 
dwarf_value_location m_location = DWARF_VALUE_MEMORY
 
ULONGEST m_len = 0
 
const gdb_byte * m_data = nullptr
 
bool m_initialized = false
 
std::vector< dwarf_expr_piecem_pieces
 
dwarf2_per_objfilem_per_objfile
 
frame_info_ptr m_frame = nullptr
 
dwarf2_per_cu_datam_per_cu = nullptr
 
const struct property_addr_infom_addr_info = nullptr
 

Detailed Description

Definition at line 120 of file expr.h.

Constructor & Destructor Documentation

◆ dwarf_expr_context()

dwarf_expr_context::dwarf_expr_context ( dwarf2_per_objfile * per_objfile,
int addr_size )

Definition at line 722 of file expr.c.

◆ ~dwarf_expr_context()

virtual dwarf_expr_context::~dwarf_expr_context ( )
virtualdefault

Member Function Documentation

◆ add_piece()

void dwarf_expr_context::add_piece ( ULONGEST size,
ULONGEST offset )
private

◆ address_type()

struct type * dwarf_expr_context::address_type ( ) const
private

◆ dwarf_call()

void dwarf_expr_context::dwarf_call ( cu_offset die_cu_off)
private

◆ eval()

void dwarf_expr_context::eval ( const gdb_byte * addr,
size_t len )
private

Definition at line 1245 of file expr.c.

References execute_stack_op(), and m_recursion_depth.

Referenced by dwarf_call(), evaluate(), execute_stack_op(), and push_dwarf_reg_entry_value().

◆ evaluate()

value * dwarf_expr_context::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 )

◆ execute_stack_op()

void dwarf_expr_context::execute_stack_op ( const gdb_byte * op_ptr,
const gdb_byte * op_end )
private

Definition at line 1494 of file expr.c.

References add_piece(), property_addr_info::addr, address_type(), objfile::arch(), base_types_equal_p(), CALL_SITE_PARAMETER_DWARF_REG, CALL_SITE_PARAMETER_PARAM_OFFSET, value::contents_all(), dwarf2_frame_cfa(), dwarf2_read_addr_index(), dwarf_block_to_dwarf_reg(), dwarf_block_to_dwarf_reg_deref(), dwarf_call(), dwarf_expr_require_composition(), call_site_parameter_u::dwarf_reg, dwarf_reg_to_regnum_or_error(), dwarf_require_integral(), DWARF_VALUE_IMPLICIT_POINTER, DWARF_VALUE_LITERAL, DWARF_VALUE_MEMORY, DWARF_VALUE_OPTIMIZED_OUT, DWARF_VALUE_REGISTER, DWARF_VALUE_STACK, ensure_have_frame(), ensure_have_per_cu(), eval(), extract_signed_integer(), extract_unsigned_integer(), fetch(), fetch_address(), fetch_in_stack_memory(), gdbarch_byte_order(), get_base_type(), get_frame_arch(), get_frame_base(), get_signed_type(), get_unsigned_type(), type::is_unsigned(), type::length(), m_addr_info, m_addr_size, m_data, m_frame, m_initialized, m_len, m_location, m_max_recursion_depth, m_per_cu, m_per_objfile, m_recursion_depth, m_stack, not_lval, dwarf2_per_objfile::objfile, call_site_parameter_u::param_cu_off, pop(), push(), push_dwarf_reg_entry_value(), QUIT, read_addr_from_reg(), read_mem(), dwarf2_per_cu_data::ref_addr_size(), regnum, dwarf2_per_objfile::relocate(), safe_read_sleb128(), safe_read_uleb128(), sect_variable_value(), size, store_unsigned_integer(), stype, target_translate_tls_address(), objfile::text_section_offset(), type, value::type(), property_addr_info::valaddr, value_as_long(), value_binop(), value_cast(), value_complement(), value_equal(), value_from_contents(), value_from_contents_and_address(), value_from_register(), value_from_ulongest(), value_less(), value_neg(), and value::zero().

Referenced by eval().

◆ fetch()

struct value * dwarf_expr_context::fetch ( int n)
private

Definition at line 759 of file expr.c.

References m_stack.

Referenced by add_piece(), execute_stack_op(), fetch_address(), and fetch_result().

◆ fetch_address()

CORE_ADDR dwarf_expr_context::fetch_address ( int n)
private

◆ fetch_in_stack_memory()

bool dwarf_expr_context::fetch_in_stack_memory ( int n)
private

Definition at line 1182 of file expr.c.

References m_stack.

Referenced by add_piece(), execute_stack_op(), and fetch_result().

◆ fetch_result()

value * dwarf_expr_context::fetch_result ( struct type * type,
struct type * subobj_type,
LONGEST subobj_offset,
bool as_lval )
private

◆ get_base_type()

struct type * dwarf_expr_context::get_base_type ( cu_offset die_cu_off)
private

◆ get_frame_base()

void dwarf_expr_context::get_frame_base ( const gdb_byte ** start,
size_t * length )
private

◆ pop()

void dwarf_expr_context::pop ( )
private

Definition at line 748 of file expr.c.

References m_stack.

Referenced by execute_stack_op().

◆ push()

void dwarf_expr_context::push ( struct value * value,
bool in_stack_memory )
private

Definition at line 732 of file expr.c.

References m_stack.

Referenced by execute_stack_op(), and push_address().

◆ push_address()

void dwarf_expr_context::push_address ( CORE_ADDR value,
bool in_stack_memory )

Definition at line 740 of file expr.c.

References address_type(), push(), and value_from_ulongest().

Referenced by dwarf2_locexpr_baton_eval(), and execute_stack_op().

◆ push_dwarf_reg_entry_value()

void dwarf_expr_context::push_dwarf_reg_entry_value ( call_site_parameter_kind kind,
call_site_parameter_u kind_u,
int deref_size )
private

◆ read_mem()

void dwarf_expr_context::read_mem ( gdb_byte * buf,
CORE_ADDR addr,
size_t length )
private

Definition at line 841 of file expr.c.

References property_addr_info::addr, m_addr_info, read_memory(), and property_addr_info::valaddr.

Referenced by execute_stack_op().

◆ stack_empty_p()

bool dwarf_expr_context::stack_empty_p ( ) const
private

Definition at line 1194 of file expr.c.

References m_stack.

Referenced by add_piece().

Member Data Documentation

◆ m_addr_info

const struct property_addr_info* dwarf_expr_context::m_addr_info = nullptr
private

Definition at line 205 of file expr.h.

Referenced by evaluate(), execute_stack_op(), push_dwarf_reg_entry_value(), and read_mem().

◆ m_addr_size

int dwarf_expr_context::m_addr_size = 0
private

Definition at line 151 of file expr.h.

Referenced by address_type(), execute_stack_op(), fetch_address(), and push_dwarf_reg_entry_value().

◆ m_data

const gdb_byte* dwarf_expr_context::m_data = nullptr
private

Definition at line 165 of file expr.h.

Referenced by add_piece(), execute_stack_op(), and fetch_result().

◆ m_frame

frame_info_ptr dwarf_expr_context::m_frame = nullptr
private

◆ m_initialized

bool dwarf_expr_context::m_initialized = false
private

Definition at line 169 of file expr.h.

Referenced by execute_stack_op(), and fetch_result().

◆ m_len

ULONGEST dwarf_expr_context::m_len = 0
private

Definition at line 164 of file expr.h.

Referenced by add_piece(), execute_stack_op(), and fetch_result().

◆ m_location

dwarf_value_location dwarf_expr_context::m_location = DWARF_VALUE_MEMORY
private

Definition at line 159 of file expr.h.

Referenced by add_piece(), execute_stack_op(), and fetch_result().

◆ m_max_recursion_depth

int dwarf_expr_context::m_max_recursion_depth = 0x100
private

Definition at line 156 of file expr.h.

Referenced by execute_stack_op().

◆ m_per_cu

dwarf2_per_cu_data* dwarf_expr_context::m_per_cu = nullptr
private

◆ m_per_objfile

dwarf2_per_objfile* dwarf_expr_context::m_per_objfile
private

◆ m_pieces

std::vector<dwarf_expr_piece> dwarf_expr_context::m_pieces
private

Definition at line 193 of file expr.h.

Referenced by add_piece(), and fetch_result().

◆ m_recursion_depth

int dwarf_expr_context::m_recursion_depth = 0
private

Definition at line 156 of file expr.h.

Referenced by eval(), and execute_stack_op().

◆ m_stack

std::vector<dwarf_stack_value> dwarf_expr_context::m_stack
private

Definition at line 148 of file expr.h.

Referenced by execute_stack_op(), fetch(), fetch_in_stack_memory(), pop(), push(), and stack_empty_p().


The documentation for this struct was generated from the following files: