1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

libdwarf

libdwarf A library for parsing DWARF debug information

Implementation Notes

  • Memory management is totally different from SGI/DA libdwarf. Most data structures are stored in internal linked lists. When an application requires data objects pointers to internally stored objects are returned instead of allocating new copies. As a result, in most situations, applications should not free the pointers returned by the library.

Tickets

Implementation Status

API ImplementationManual PageTest CasesCompatible w/ SGIComments
Error Handling
dwarf_seterrhand()YYNYExtended semantics.
dwarf_seterrarg()YYNYExtended semantics.
dwarf_errnoYYNYOur Dwarf_Error is not opaque
dwarf_errmsgYYNYOur Dwarf_Error is not opaque
Initialization
dwarf_init()YYYY
dwarf_elf_init()YYNY
dwarf_get_elf()YYNY
dwarf_finish()YYNY
Misc
dwarf_get_address_size()YYYY
dwarf_dealloc()YYNYOurs is a dummy call
dwarf_set_reloc_application()YNNY
DIE delivery
dwarf_next_cu_headerYYYY
dwarf_next_cu_header_bYNYY
dwarf_siblingof()YYYY
dwarf_child()YYYY
dwarf_offdie()YYNY
DIE query
dwarf_tag()YYYY
dwarf_dieoffset()YYYY
dwarf_die_CU_offset()YYYY
dwarf_die_CU_offset_range()YYYY
dwarf_diename()YYYY
dwarf_die_abbrev_code()YYYY
dwarf_attrlistYYYY
dwarf_hasattrYYYY
dwarf_attrYYYY
dwarf_lowpcYYYY
dwarf_highpcYYYY
dwarf_bytesizeYYYY
dwarf_bitsizeYYYY
dwarf_bitoffsetYYYY
dwarf_srclangYYYY
dwarf_arrayorderYYYY
dwarf_get_cu_die_offset_given_cu_header_offset()YYYYName too long...
Attribute Form Queries
dwarf_hasformYYYY
dwarf_whatformYYYY
dwarf_whatform_directYYYY
dwarf_whatattrYYYY
dwarf_formrefYYYY
dwarf_global_formrefYYYY
dwarf_formaddrYNYY
dwarf_formexprlocYNNY
dwarf_formflagYYYY
dwarf_formudataYYYY
dwarf_formsdataYYYY
dwarf_formsig8YNNY
dwarf_formblockYNYY
dwarf_formstringYNYY
dwarf_get_form_classYNNY
dwarf_attrval_flagYNNOur Extension
dwarf_attrval_stringYNNOur Extension
dwarf_attrval_signedYNNOur Extension
dwarf_attrval_unsignedYNNOur Extension
Location List Queries
dwarf_loclist_n()YNYY
dwarf_loclist()YNYY
dwarf_loclist_from_expr()YNNY
dwarf_loclist_from_expr_a()YNNY
dwarf_loclist_from_expr_dealloc()YNNOur Extension
dwarf_get_loclist_entry()YNNY
Line Number Operations
dwarf_srclines()YNYY
dwarf_srcfiles()YYYY
dwarf_linebeginstatement()YNYY
dwarf_lineendsequence()YNYY
dwarf_lineno()YNYY
dwarf_line_srcfileno()YNYY
dwarf_lineaddr()YNYY
dwarf_lineoff()YNYY
dwarf_linesrc()YNYY
dwarf_lineblock()YNYY
Global Name Space Operations
dwarf_get_globals()YNYY
dwarf_globname()YNYY
dwarf_global_die_offset()YNYY
dwarf_global_cu_offset()YNYY
dwarf_global_name_offsets()YNYY
Type Names Operations
dwarf_get_pubtypes()YNNY
dwarf_pubtypename()YNNY
dwarf_pubtype_die_offset()YNNY
dwarf_pubtype_cu_offset()YNNY
dwarf_pubtype_name_offsets()YNNY
User Defined Type Names Operations
dwarf_get_types()YNNY
dwarf_typename()YNNY
dwarf_type_die_offset()YNNY
dwarf_type_cu_offset()YNNY
dwarf_type_name_offsets()YNNY
Static Variable Names Operations
dwarf_get_vars()YNNY
dwarf_varname()YNNY
dwarf_var_die_offset()YNNY
dwarf_var_cu_offset()YNNY
dwarf_var_name_offsets()YNNY
Static Function Names Operataions
dwarf_get_funcs()YNNY
dwarf_funcname()YNNY
dwarf_func_die_offset()YNNY
dwarf_func_cu_offset()YNNY
dwarf_func_name_offsets()YNNY
Weak Names Space Operations
dwarf_get_weaks()YNNY
dwarf_weakname()YNNY
dwarf_weak_die_offset()YNNY
dwarf_weak_cu_offset()YNNY
dwarf_weak_name_offsets()YNNY
Macro Information Operations
dwarf_find_macro_value_start()YNYY
dwarf_get_macro_details()YNYY
Call Frame Operations
dwarf_get_fde_list()YNYY
dwarf_get_fde_list_eh()YNYY
dwarf_get_fde_n()YNYY
dwarf_get_fde_at_pc()YNYY
dwarf_get_cie_of_fde()YNYY
dwarf_get_fde_for_die()YNNY
dwarf_get_fde_range()YNYY
dwarf_get_cie_info()YNYY
dwarf_get_fde_instr_bytes()YNYY
dwarf_get_fde_info_for_reg()YNYY
dwarf_get_fde_info_for_all_regs()YNYY
dwarf_get_fde_info_for_reg3()YNYY
dwarf_get_fde_info_for_cfa_reg3()YNYY
dwarf_get_fde_info_for_all_regs3()YNYY
dwarf_set_frame_rule_table_size()YNNY
dwarf_set_frame_rule_initial_value()YNNY
dwarf_set_frame_cfa_value()YNYY
dwarf_set_frame_same_value()YNNY
dwarf_set_frame_undefined_value()YNNY
dwarf_expand_frame_instructions()YNNY
dwarf_free_expanded_frame_instructions()YNNOur Extension
Abbreviations access
dwarf_get_abbrev()YNYY
dwarf_get_abbrev_tag()YNYY
dwarf_get_abbrev_code()YNYY
dwarf_get_abbrev_children_flag()YNYY
dwarf_get_abbrev_entry()YNYY
String Section Operations
dwarf_get_str()YNNY
Address Range Operations
dwarf_get_aranges()YNYY
dwarf_get_arange()YNYY
dwarf_get_cu_die_offset()YNYY
dwarf_get_arange_cu_header_offset()YNYY
dwarf_get_arange_info()YNYY
Ranges Operations
dwarf_get_ranges()YNYY
dwarf_get_ranges_a()YNYYOurs is identical to dwarf_get_ranges()
dwarf_ranges_dealloc()YNNYno-op
Convert Names To Strings
dwarf_get_ACCESS_name()YNNY
dwarf_get_AT_name()YNNY
dwarf_get_ATE_name()YNNY
dwarf_get_ADDR_name()N
dwarf_get_ATCF_name()N
dwarf_get_CC_name()YNNY
dwarf_get_CFA_name()YNNY
dwarf_get_CHILDREN_name()YNNY
dwarf_get_children_name()N
dwarf_get_DS_name()N
dwarf_get_DSC_name()YNNY
dwarf_get_EH_name()N
dwarf_get_END_name()N
dwarf_get_FORM_name()YNNY
dwarf_get_FRAME_name()N
dwarf_get_ID_name()YNNY
dwarf_get_INL_name()YNNY
dwarf_get_LANG_name()YNNY
dwarf_get_LNE_name()YNNY
dwarf_get_LNS_name()YNNY
dwarf_get_MACINFO_name()YNNY
dwarf_get_OP_name()YNNY
dwarf_get_ORD_name()YNNY
dwarf_get_TAG_name()YNNY
dwarf_get_VIRTUALITY_name()YNNY
dwarf_get_VIS_name()YNNY
Producer General
dwarf_producer_init()YNNY
dwarf_producer_init_b()YNNY
dwarf_transform_to_disk_form()YNNY
dwarf_get_section_bytes()YNNY
dwarf_get_relocation_info_count()YNNY
dwarf_get_relocation_info()YNNY
dwarf_reset_section_bytes()YNNY
dwarf_producer_init()N
Debugging Information Entry Creation
dwarf_add_die_to_debug()YNNY
dwarf_new_die()YNNY
dwarf_die_link()YNNYneeds further verification
Attributes Creation
dwarf_add_AT_location_expr()YNNY
dwarf_add_AT_name()YNNYWe always use DW_FORM_strp
dwarf_add_AT_comp_dir()YNNYWe always use DW_FORM_strp
dwarf_add_AT_producer()YNNYWe always use DW_FORM_strp
dwarf_add_AT_const_value_signedint()YNNY
dwarf_add_AT_const_value_unsignedint()YNNY
dwarf_add_AT_const_value_string()YNNYWe always use DW_FORM_strp
dwarf_add_AT_targ_address()YNNY
dwarf_add_AT_targ_address_b()YNNY
dwarf_add_AT_dataref()YNNY
dwarf_add_AT_ref_address()YNNY
dwarf_add_AT_unsigned_const()YNNY
dwarf_add_AT_signed_const()YNNY
dwarf_add_AT_reference()YNNY
dwarf_add_AT_flag()YNNY
dwarf_add_AT_string()YNNYWe always use DW_FORM_strp
Expression Creation
dwarf_new_expr()YNNY
dwarf_add_expr_gen()YNNY
dwarf_add_expr_addr()YNNY
dwarf_add_expr_addr_b()YNNY
dwarf_expr_current_offset()YNNY
dwarf_expr_into_block()YNNY
Line Number Creation
dwarf_add_line_entry()YNNY
dwarf_lne_set_address()YNNY
dwarf_lne_end_sequence()YNNY
dwarf_add_directory_decl()YNNY
dwarf_add_file_decl()YNNY
Arange Creation
dwarf_add_arange()YNNY
dwarf_add_arange_b()YNNY
Pubnames Creation
dwarf_add_pubname()YNNY
Weaknames Creation
dwarf_add_weakname()YNNY
Static Function Name Creation
dwarf_add_funcname()YNNY
User-defined Type Name Creation
dwarf_add_typename()YNNY
Static Variable Name Creation
dwarf_add_varname()YNNY
Macro Info Creation
dwarf_def_macro()YNNY
dwarf_undef_macro()YNNY
dwarf_start_macro_file()YNNY
dwarf_end_macro_file()YNNY
dwarf_vendor_ext()YNNY
Frame Info Creation
dwarf_new_fde()YNNY
dwarf_add_frame_cie()YNNY
dwarf_add_frame_fde()YNNY
dwarf_add_frame_fde_b()YNNY
dwarf_add_frame_info()NSGI libdwarf MIPS extension?
dwarf_add_frame_info_b()NSGI libdwarf MIPS extension?
dwarf_fde_cfa_offset()YNNY
dwarf_add_fde_inst()YNNY

References