GDB (xrefs)

Classes | Functions | Variables
/tmp/gdb-8.1/gdb/dwarf2loc.h File Reference
`#include "dwarf2expr.h"`

Go to the source code of this file.

## Classes
struct | property_addr_info
struct | dwarf2_locexpr_baton
struct | dwarf2_loclist_baton
struct | dwarf2_offset_baton
struct | dwarf2_property_baton
struct | call_site_chain

## Functions
struct objfile * | dwarf2_per_cu_objfile (struct dwarf2_per_cu_data *cu)
int | dwarf2_per_cu_addr_size (struct dwarf2_per_cu_data *cu)
int | dwarf2_per_cu_ref_addr_size (struct dwarf2_per_cu_data *cu)
int | dwarf2_per_cu_offset_size (struct dwarf2_per_cu_data *cu)
CORE_ADDR | dwarf2_per_cu_text_offset (struct dwarf2_per_cu_data *cu)
short | dwarf2_version (struct dwarf2_per_cu_data *per_cu)
const gdb_byte * | dwarf2_find_location_expression (struct dwarf2_loclist_baton *baton, size_t *locexpr_length, CORE_ADDR pc)
struct dwarf2_locexpr_baton | dwarf2_fetch_die_loc_sect_off (sect_offset offset_in_cu, struct dwarf2_per_cu_data *per_cu, CORE_ADDR(*get_frame_pc)(void *baton), void *baton)
struct dwarf2_locexpr_baton | dwarf2_fetch_die_loc_cu_off (cu_offset offset_in_cu, struct dwarf2_per_cu_data *per_cu, CORE_ADDR(*get_frame_pc)(void *baton), void *baton)
const gdb_byte * | dwarf2_fetch_constant_bytes (sect_offset, struct dwarf2_per_cu_data *, struct obstack *, LONGEST *)
struct type * | dwarf2_fetch_die_type_sect_off (sect_offset, struct dwarf2_per_cu_data *)
struct type * | dwarf2_get_die_type (cu_offset die_offset, struct dwarf2_per_cu_data *per_cu)
void | func_get_frame_base_dwarf_block (struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length)
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)
int | dwarf2_evaluate_property (const struct dynamic_prop *prop, struct frame_info *frame, struct property_addr_info *addr_stack, CORE_ADDR *value)
void | dwarf2_compile_property_to_c (string_file &stream, const char *result_name, struct gdbarch *gdbarch, unsigned char *registers_used, const struct dynamic_prop *prop, CORE_ADDR address, struct symbol *sym)
CORE_ADDR | dwarf2_read_addr_index (struct dwarf2_per_cu_data *per_cu, unsigned int addr_index)
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, struct dwarf2_per_cu_data *per_cu)
struct 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)
int | dwarf_reg_to_regnum_or_error (struct gdbarch *arch, ULONGEST dwarf_reg)

## Variables
unsigned int | entry_values_debug
const struct symbol_computed_ops | dwarf2_locexpr_funcs
const struct symbol_computed_ops | dwarf2_loclist_funcs
const struct symbol_block_ops | dwarf2_block_frame_base_locexpr_funcs
const struct symbol_block_ops | dwarf2_block_frame_base_loclist_funcs

## Function Documentation

## ◆ call_site_find_chain()

struct call_site_chain* call_site_find_chain | ( | struct gdbarch * | gdbarch,
|  | CORE_ADDR | caller_pc,
|  | CORE_ADDR | callee_pc
| ) |  |

Definition at line 1155 of file dwarf2loc.c.

References call_site_find_chain_1(), CATCH, END_CATCH, entry_values_debug, exception_print(), gdb_stdout, NO_ENTRY_VALUE_ERROR, RETURN_MASK_ERROR, throw_exception(), and TRY.

Referenced by dwarf2_tailcall_sniffer_first().

## ◆ dwarf2_compile_expr_to_ax()

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,
|  | struct dwarf2_per_cu_data * | per_cu
| ) |  |

Definition at line 3001 of file dwarf2loc.c.

References _, access_memory(), symbol::arch, 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(), dwarf2_compile_expr_to_ax(), dwarf2_fetch_cfa_info(), dwarf2_fetch_die_loc_cu_off(), dwarf2_per_cu_text_offset(), dwarf_expr_require_composition(), dwarf_reg_to_regnum_or_error(), error(), extract_signed_integer(), extract_unsigned_integer(), func_get_frame_base_dwarf_block(), gdb_assert, agent_expr::gdbarch, gdbarch_bits_big_endian(), gdbarch_byte_order(), get_ax_pc(), internal_error(), agent_expr::len, loc, offset, dwarf2_locexpr_baton::per_cu, regnum, require_rvalue(), safe_read_sleb128(), safe_read_uleb128(), agent_expr::scope, size, TARGET_CHAR_BIT, and unimplemented().

Referenced by dwarf2_compile_expr_to_ax(), locexpr_tracepoint_var_ref(), and loclist_tracepoint_var_ref().

## ◆ dwarf2_compile_property_to_c()

void dwarf2_compile_property_to_c | ( | string_file & | stream,
|  | const char * | result_name,
|  | struct gdbarch * | gdbarch,
|  | unsigned char * | registers_used,
|  | const struct dynamic_prop * | prop,
|  | CORE_ADDR | address,
|  | struct symbol * | sym
| ) |  |

Definition at line 2694 of file dwarf2loc.c.

References dynamic_prop_data::baton, compile_dwarf_bounds_to_c(), dwarf2_locexpr_baton::data, dynamic_prop::data, dwarf2_find_location_expression(), dwarf2_per_cu_addr_size(), gdb_assert, if(), dynamic_prop::kind, dwarf2_property_baton::locexpr, dwarf2_property_baton::loclist, dwarf2_locexpr_baton::per_cu, dwarf2_loclist_baton::per_cu, PROP_LOCEXPR, PROP_LOCLIST, dwarf2_locexpr_baton::size, and size.

Referenced by generate_vla_size().

## ◆ dwarf2_evaluate_loc_desc()

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
| ) |  |

Definition at line 2539 of file dwarf2loc.c.

References dwarf2_evaluate_loc_desc_full(), and size.

Referenced by call_site_to_target_addr(), dwarf2_compute_name(), dwarf2_evaluate_property(), dwarf_entry_parameter_to_value(), locexpr_get_frame_base(), locexpr_read_variable(), loclist_get_frame_base(), and loclist_read_variable().

## ◆ dwarf2_evaluate_property()

int dwarf2_evaluate_property | ( | const struct dynamic_prop * | prop,
|  | struct frame_info * | frame,
|  | struct property_addr_info * | addr_stack,
|  | CORE_ADDR * | value
| ) |  |

Definition at line 2604 of file dwarf2loc.c.

References _, property_addr_info::addr, dynamic_prop_data::baton, dynamic_prop_data::const_val, dynamic_prop::data, dwarf2_evaluate_loc_desc(), dwarf2_find_location_expression(), dwarf2_locexpr_baton_eval(), error(), get_frame_address_in_block(), get_selected_frame(), has_stack_frames(), if(), dynamic_prop::kind, dwarf2_property_baton::locexpr, dwarf2_property_baton::loclist, property_addr_info::next, dwarf2_offset_baton::offset, dwarf2_property_baton::offset_info, dwarf2_loclist_baton::per_cu, PROP_ADDR_OFFSET, PROP_CONST, PROP_LOCEXPR, PROP_LOCLIST, dwarf2_property_baton::referenced_type, size, dwarf2_offset_baton::type, value_as_address(), value_at(), value_from_contents(), and value_optimized_out().

Referenced by follow_static_link(), resolve_dynamic_array(), resolve_dynamic_range(), and resolve_dynamic_type_internal().

## ◆ dwarf2_fetch_constant_bytes()

const gdb_byte* dwarf2_fetch_constant_bytes | ( | sect_offset | ,
|  | struct dwarf2_per_cu_data * | ,
|  | struct obstack * | ,
|  | LONGEST * |
| ) |  |

Definition at line 23007 of file dwarf2read.c.

References _, comp_unit_head::addr_size, complaint, dwarf2_per_cu_data::cu, die_type(), dw2_setup(), DW_ADDR, DW_BLOCK, DW_SND, DW_STRING, DW_UNSND, dwarf2_attr(), dwarf2_const_value_data(), dwarf_form_name(), error(), follow_die_offset(), attribute::form, dwarf2_cu::header, dwarf2_per_cu_data::is_dwz, load_cu(), objfile::obfd, dwarf2_per_cu_data::objfile, objfile_name(), store_unsigned_integer(), symfile_complaints, to_underlying(), type, and write_constant_as_bytes().

Referenced by fetch_const_value_from_synthetic_pointer().

## ◆ dwarf2_fetch_die_loc_cu_off()

struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_cu_off | ( | cu_offset | offset_in_cu,
|  | struct dwarf2_per_cu_data * | per_cu,
|  | CORE_ADDR(*)(void *baton) | get_frame_pc,
|  | void * | baton
| ) |  |

Definition at line 22972 of file dwarf2read.c.

References dwarf2_fetch_die_loc_sect_off(), get_frame_pc(), dwarf2_locexpr_baton::per_cu, dwarf2_per_cu_data::sect_off, and to_underlying().

Referenced by dwarf2_compile_expr_to_ax(), and per_cu_dwarf_call().

## ◆ dwarf2_fetch_die_loc_sect_off()

struct dwarf2_locexpr_baton dwarf2_fetch_die_loc_sect_off | ( | sect_offset | offset_in_cu,
|  | struct dwarf2_per_cu_data * | per_cu,
|  | CORE_ADDR(*)(void *baton) | get_frame_pc,
|  | void * | baton
| ) |  |

Definition at line 22902 of file dwarf2read.c.

References _, age_cached_comp_units(), attr_form_is_block(), attr_form_is_section_offset(), dwarf2_per_cu_data::cu, dwarf2_locexpr_baton::data, dw2_setup(), DW_BLOCK, dwarf2_attr(), dwarf2_find_location_expression(), error(), fill_in_loclist_baton(), follow_die_offset(), dwarf2_per_cu_data::is_dwz, load_cu(), dwarf2_per_cu_data::objfile, objfile_name(), dwarf2_locexpr_baton::per_cu, dwarf2_loclist_baton::per_cu, dwarf2_cu::per_cu, dwarf2_locexpr_baton::size, size, and to_underlying().

Referenced by dwarf2_fetch_die_loc_cu_off(), and indirect_synthetic_pointer().

## ◆ dwarf2_fetch_die_type_sect_off()

struct type* dwarf2_fetch_die_type_sect_off | ( | sect_offset | ,
|  | struct dwarf2_per_cu_data * |
| ) |  |

Definition at line 23139 of file dwarf2read.c.

References dwarf2_per_cu_data::cu, die_type(), dw2_setup(), follow_die_offset(), dwarf2_per_cu_data::is_dwz, load_cu(), dwarf2_per_cu_data::objfile, and die_info::sect_off.

Referenced by indirect_synthetic_pointer().

## ◆ dwarf2_find_location_expression()

const gdb_byte* dwarf2_find_location_expression | ( | struct dwarf2_loclist_baton * | baton,
|  | size_t * | locexpr_length,
|  | CORE_ADDR | pc
| ) |  |

Definition at line 267 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(), decode_debug_loclists_addresses(), dwarf2_per_cu_addr_size(), dwarf2_per_cu_objfile(), dwarf2_per_cu_text_offset(), dwarf2_version(), 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, read_unsigned_leb128(), dwarf2_loclist_baton::size, and SYMBOL_BLOCK_VALUE.

Referenced by dwarf2_compile_property_to_c(), dwarf2_evaluate_property(), dwarf2_fetch_die_loc_sect_off(), loclist_find_frame_base_location(), loclist_generate_c_location(), loclist_read_variable(), loclist_read_variable_at_entry(), and loclist_tracepoint_var_ref().

## ◆ dwarf2_get_die_type()

struct type* dwarf2_get_die_type | ( | cu_offset | die_offset,
|  | struct dwarf2_per_cu_data * | per_cu
| ) |  |

Definition at line 23164 of file dwarf2read.c.

References dw2_setup(), get_die_type_at_offset(), dwarf2_per_cu_data::objfile, dwarf2_per_cu_data::sect_off, and to_underlying().

Referenced by disassemble_dwarf_expression(), and dwarf_evaluate_loc_desc::get_base_type().

## ◆ dwarf2_per_cu_addr_size()

int dwarf2_per_cu_addr_size | ( | struct dwarf2_per_cu_data * | cu | ) |

Definition at line 24853 of file dwarf2read.c.

References comp_unit_head::addr_size, and per_cu_header_read_in().

Referenced by dwarf2_compile_property_to_c(), dwarf2_evaluate_loc_desc_full(), dwarf2_find_location_expression(), dwarf2_loc_desc_get_symbol_read_needs(), dwarf2_locexpr_baton_eval(), locexpr_describe_location(), locexpr_generate_c_location(), locexpr_tracepoint_var_ref(), loclist_describe_location(), loclist_generate_c_location(), loclist_tracepoint_var_ref(), and dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value().

## ◆ dwarf2_per_cu_objfile()

struct objfile* dwarf2_per_cu_objfile | ( | struct dwarf2_per_cu_data * | cu | ) |

Definition at line 24816 of file dwarf2read.c.

References objfile::objfile(), dwarf2_per_cu_data::objfile, and objfile::separate_debug_objfile_backlink.

Referenced by dwarf2_evaluate_loc_desc_full(), dwarf2_find_location_expression(), dwarf2_loc_desc_get_symbol_read_needs(), dwarf2_locexpr_baton_eval(), dwarf_evaluate_loc_desc::get_tls_address(), locexpr_describe_location(), loclist_describe_location(), dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value(), and rw_pieced_value().

## ◆ dwarf2_per_cu_offset_size()

int dwarf2_per_cu_offset_size | ( | struct dwarf2_per_cu_data * | cu | ) |

Definition at line 24866 of file dwarf2read.c.

References comp_unit_head::offset_size, and per_cu_header_read_in().

Referenced by locexpr_describe_location(), and loclist_describe_location().

## ◆ dwarf2_per_cu_ref_addr_size()

int dwarf2_per_cu_ref_addr_size | ( | struct dwarf2_per_cu_data * | cu | ) |

Definition at line 24879 of file dwarf2read.c.

References comp_unit_head::addr_size, comp_unit_head::offset_size, per_cu_header_read_in(), and comp_unit_head::version.

Referenced by dwarf2_evaluate_loc_desc_full(), dwarf2_loc_desc_get_symbol_read_needs(), and dwarf2_locexpr_baton_eval().

## ◆ dwarf2_per_cu_text_offset()

CORE_ADDR dwarf2_per_cu_text_offset | ( | struct dwarf2_per_cu_data * | cu | ) |

Definition at line 24898 of file dwarf2read.c.

References ANOFFSET, dwarf2_per_cu_data::objfile, SECT_OFF_TEXT, and objfile::section_offsets.

Referenced by do_compile_dwarf_expr_to_c(), dwarf2_compile_expr_to_ax(), dwarf2_evaluate_loc_desc_full(), dwarf2_find_location_expression(), dwarf2_loc_desc_get_symbol_read_needs(), dwarf2_locexpr_baton_eval(), loclist_describe_location(), and dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value().

## ◆ dwarf2_read_addr_index()

CORE_ADDR dwarf2_read_addr_index | ( | struct dwarf2_per_cu_data * | per_cu,
|  | unsigned int | addr_index
| ) |  |

Definition at line 19618 of file dwarf2read.c.

References dwarf2_read_addr_index_data::addr_base, comp_unit_head::addr_size, dwarf2_read_addr_index_data::addr_size, dwarf2_per_cu_data::cu, dw2_setup(), dwarf2_read_addr_index_reader(), dwarf2_cu::header, init_cutu_and_read_dies(), dwarf2_per_cu_data::objfile, dwarf2_cu::per_cu, and read_addr_index_1().

Referenced by decode_debug_loc_dwo_addresses(), disassemble_dwarf_expression(), dwarf_evaluate_loc_desc::get_addr_index(), and locexpr_describe_location_piece().

## ◆ dwarf2_version()

short dwarf2_version | ( | struct dwarf2_per_cu_data * | per_cu | ) |

Definition at line 24908 of file dwarf2read.c.

References dwarf2_per_cu_data::dwarf_version.

Referenced by dwarf2_find_location_expression().

## ◆ dwarf_reg_to_regnum()

int dwarf_reg_to_regnum | ( | struct gdbarch * | arch,
|  | int | dwarf_reg
| ) |  |

Definition at line 2890 of file dwarf2loc.c.

References _, complaint, gdbarch_dwarf2_reg_to_regnum(), and symfile_complaints.

Referenced by dwarf2_frame_cache(), dwarf2_restore_rule(), dwarf_block_to_sp_offset(), dwarf_reg_to_regnum_or_error(), and locexpr_regname().

## ◆ dwarf_reg_to_regnum_or_error()

int dwarf_reg_to_regnum_or_error | ( | struct gdbarch * | arch,
|  | ULONGEST | dwarf_reg
| ) |  |

Definition at line 2920 of file dwarf2loc.c.

References dwarf_reg_to_regnum(), INT_MAX, and throw_bad_regnum_error().

Referenced by do_compile_dwarf_expr_to_c(), dwarf2_compile_expr_to_ax(), dwarf2_evaluate_loc_desc_full(), dwarf2_fetch_cfa_info(), dwarf2_frame_prev_register(), dwarf_expr_executor::get_reg_value(), dwarf_evaluate_loc_desc::get_reg_value(), read_addr_from_reg(), dwarf_evaluate_loc_desc::read_addr_from_reg(), and rw_pieced_value().

## ◆ func_get_frame_base_dwarf_block()

void func_get_frame_base_dwarf_block | ( | struct symbol * | framefunc,
|  | CORE_ADDR | pc,
|  | const gdb_byte ** | start,
|  | size_t * | length
| ) |  |

Definition at line 508 of file dwarf2loc.c.

References _, error(), symbol_block_ops::find_frame_base_location, SYMBOL_BLOCK_OPS, and SYMBOL_NATURAL_NAME.

Referenced by do_compile_dwarf_expr_to_c(), dwarf2_compile_expr_to_ax(), dwarf_evaluate_loc_desc::get_frame_base(), and locexpr_describe_location_piece().

## Variable Documentation

## ◆ dwarf2_block_frame_base_locexpr_funcs

const struct symbol_block_ops dwarf2_block_frame_base_locexpr_funcs

Definition at line 442 of file dwarf2loc.c.

Referenced by _initialize_dwarf2_read().

## ◆ dwarf2_block_frame_base_loclist_funcs

const struct symbol_block_ops dwarf2_block_frame_base_loclist_funcs

Definition at line 499 of file dwarf2loc.c.

Referenced by _initialize_dwarf2_read().

## ◆ dwarf2_locexpr_funcs

const struct symbol_computed_ops dwarf2_locexpr_funcs

Definition at line 4428 of file dwarf2loc.c.

Referenced by _initialize_dwarf2_read().

## ◆ dwarf2_loclist_funcs

const struct symbol_computed_ops dwarf2_loclist_funcs

Definition at line 4641 of file dwarf2loc.c.

Referenced by _initialize_dwarf2_read().

## ◆ entry_values_debug

unsigned int entry_values_debug

Definition at line 725 of file dwarf2loc.c.

Referenced by _initialize_dwarf2loc(), call_site_find_chain(), chain_candidate(), dwarf2_evaluate_loc_desc_full(), and dwarf2_tailcall_sniffer_first().