Example using DWARF2-5 loclists and loc-expressions.
Valid for DWARF2 and later DWARF.
*/
{
int lres = 0;
&lcount,error);
if (lres == DW_DLV_OK) {
for (i = 0; i < lcount; ++i) {
i,
&lle_value,
&rawval1,&rawval2,
&debug_addr_unavailable,
&lopc,&hipc,
&loclist_expr_op_count,
&locdesc_entry,
&loclist_lkind,
&expression_offset,
&locdesc_offset,
error);
if (lres == DW_DLV_OK) {
int opres = 0;
for (j = 0; j < loclist_expr_op_count; ++j) {
locdesc_entry, j,&op,
&opd1,&opd2,&opd3,
&offsetforbranch,
error);
if (opres == DW_DLV_OK) {
} else {
return opres;
}
}
} else {
return lres;
}
}
}
loclist_head = 0;
return lres;
}
struct Dwarf_Error_s * Dwarf_Error
Definition: libdwarf.h:597
struct Dwarf_Locdesc_c_s * Dwarf_Locdesc_c
Definition: libdwarf.h:341
struct Dwarf_Loc_Head_c_s * Dwarf_Loc_Head_c
Definition: libdwarf.h:347
struct Dwarf_Attribute_s * Dwarf_Attribute
Definition: libdwarf.h:658
unsigned char Dwarf_Small
Definition: libdwarf.h:204
unsigned long long Dwarf_Unsigned
Definition: libdwarf.h:196
int Dwarf_Bool
Definition: libdwarf.h:202
unsigned long long Dwarf_Addr
Definition: libdwarf.h:199
int dwarf_get_location_op_value_c(Dwarf_Locdesc_c dw_locdesc, Dwarf_Unsigned dw_index, Dwarf_Small *dw_operator_out, Dwarf_Unsigned *dw_operand1, Dwarf_Unsigned *dw_operand2, Dwarf_Unsigned *dw_operand3, Dwarf_Unsigned *dw_offset_for_branch, Dwarf_Error *dw_error)
Get the raw values from a single location operation.
int dwarf_get_locdesc_entry_d(Dwarf_Loc_Head_c dw_loclist_head, Dwarf_Unsigned dw_index, Dwarf_Small *dw_lle_value_out, Dwarf_Unsigned *dw_rawlowpc, Dwarf_Unsigned *dw_rawhipc, Dwarf_Bool *dw_debug_addr_unavailable, Dwarf_Addr *dw_lowpc_cooked, Dwarf_Addr *dw_hipc_cooked, Dwarf_Unsigned *dw_locexpr_op_count_out, Dwarf_Locdesc_c *dw_locentry_out, Dwarf_Small *dw_loclist_source_out, Dwarf_Unsigned *dw_expression_offset_out, Dwarf_Unsigned *dw_locdesc_offset_out, Dwarf_Error *dw_error)
Retrieve the details(_d) of a location expression.
int dwarf_get_loclist_c(Dwarf_Attribute dw_attr, Dwarf_Loc_Head_c *dw_loclist_head, Dwarf_Unsigned *dw_locentry_count, Dwarf_Error *dw_error)
Location Lists and Expressions.
void dwarf_dealloc_loc_head_c(Dwarf_Loc_Head_c dw_head)
Dealloc (free) all memory allocated for Dwarf_Loc_Head_c.