#include "config.h"#include <sys/types.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <elf.h>#include "libelf/libelf.h"#include <dwarf.h>#include <libdwarf.h>


Go to the source code of this file.
| #define ATTRIB_BUFSIZ 999 |
| #define DWARF_CHECK_ERROR | ( | str | ) |
Value:
{\
printf("*** DWARF CHECK: %s ***\n", str);\
check_error ++; \
}
Definition at line 174 of file globals.h.
Referenced by get_attr_value(), and print_die_and_children().
| #define DWARF_CHECK_ERROR2 | ( | str1, | |||
| str2 | ) |
Value:
{\
printf("*** DWARF CHECK: %s: %s ***\n", str1, str2);\
check_error ++; \
}
Definition at line 179 of file globals.h.
Referenced by print_attribute(), print_die_and_children(), and print_pubnames().
| string get_fde_proc_name | ( | Dwarf_Debug | dbg, | |
| Dwarf_Addr | low_pc | |||
| ) |
Definition at line 450 of file print_sections.c.
References DW_DLA_DIE, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_child(), dwarf_dealloc(), dwarf_next_cu_header(), dwarf_siblingof(), err, get_nested_proc_name(), NULL, and print_error().
Referenced by print_frames().
| void print_abbrevs | ( | Dwarf_Debug | dbg | ) |
Definition at line 1501 of file print_sections.c.
References dense, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_get_abbrev(), dwarf_get_abbrev_children_flag(), dwarf_get_abbrev_code(), dwarf_get_abbrev_entry(), dwarf_get_abbrev_tag(), err, i, length, offset, print_error(), printf(), and tag.
Referenced by process_one_file().
| void print_aranges | ( | Dwarf_Debug | dbg | ) |
Definition at line 1627 of file print_sections.c.
References count, cu_name, cu_name_flag, DW_AT_name, DW_DLA_ARANGE, DW_DLA_ATTR, DW_DLA_DIE, DW_DLA_LIST, DW_DLA_STRING, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, DW_FORM_string, DW_FORM_strp, dwarf_attr(), dwarf_dealloc(), dwarf_formstring(), dwarf_get_arange_cu_header_offset(), dwarf_get_arange_info(), dwarf_get_aranges(), dwarf_offdie(), dwarf_whatform(), err, i, length, NULL, p, print_error(), print_one_die(), printf(), start, strcmp(), strrchr(), tag, TRUE, and verbose.
Referenced by process_one_file().
| void print_die_and_children | ( | Dwarf_Debug | dbg, | |
| Dwarf_Die | in_die, | |||
| char ** | srcfiles, | |||
| Dwarf_Signed | cnt | |||
| ) |
Definition at line 91 of file print_die.c.
References check_tag_tree, Dwarf_Check_Result::checks, DW_DLA_DIE, DW_DLV_ERROR, DW_DLV_OK, DW_TAG_compile_unit, DWARF_CHECK_ERROR, DWARF_CHECK_ERROR2, dwarf_child(), dwarf_dealloc(), dwarf_siblingof(), err, Dwarf_Check_Result::errors, FALSE, indent_level, info_flag, local_symbols_already_began, POP_DIE_STACK, print_die_and_children(), print_error(), print_one_die(), PUSH_DIE_STACK, tag, tag_tree_combination(), and tag_tree_result.
Referenced by print_die_and_children(), and print_infos().
| void print_error | ( | Dwarf_Debug | dbg, | |
| string | msg, | |||
| int | res, | |||
| Dwarf_Error | err | |||
| ) |
Definition at line 602 of file dwarfdump.c.
References DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_errmsg(), dwarf_errno(), exit(), FAILED, and fprintf().
Referenced by _dwarf_print_one_locdesc(), get_attr_value(), get_fde_proc_name(), get_location_list(), get_nested_proc_name(), get_proc_name(), print_abbrevs(), print_aranges(), print_die_and_children(), print_frames(), print_infos(), print_line_numbers_this_cu(), print_locs(), print_macinfo(), print_one_die(), print_pubnames(), print_relocinfo(), print_relocinfo_32(), print_relocinfo_64(), print_static_funcs(), print_static_vars(), print_strings(), print_types(), print_weaknames(), and process_one_file().
| void print_exception_tables | ( | Dwarf_Debug | dbg | ) |
| void print_frames | ( | Dwarf_Debug | dbg | ) |
Definition at line 868 of file print_sections.c.
References _dwarf_cie_section_offset(), _dwarf_fde_section_offset(), cie_index, cu_name_flag, data_alignment_factor, DW_DLA_LIST, DW_DLV_BADOFFSET, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, DW_DLX_EH_OFFSET_UNAVAILABLE, DW_DLX_NO_EH_OFFSET, DW_FRAME_LAST_REG_NUM, DW_FRAME_SAME_VAL, DW_FRAME_UNDEFINED_VAL, dwarf_dealloc(), dwarf_get_address_size(), dwarf_get_cie_info(), dwarf_get_fde_exception_info(), dwarf_get_fde_info_for_reg(), dwarf_get_fde_instr_bytes(), dwarf_get_fde_list(), dwarf_get_fde_list_eh(), dwarf_get_fde_range(), err, fde_offset_for_cu_high, fde_offset_for_cu_low, get_fde_proc_name(), i, offset, print_error(), print_frame_inst_bytes(), printf(), printreg(), verbose, and version.
Referenced by process_one_file().
| void print_line_numbers_this_cu | ( | Dwarf_Debug | dbg, | |
| Dwarf_Die | in_die | |||
| ) |
Definition at line 90 of file print_sections.c.
References _dwarf_print_lines(), DW_DLA_LINE, DW_DLA_LIST, DW_DLA_STRING, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_dealloc(), dwarf_lineaddr(), dwarf_linebeginstatement(), dwarf_lineblock(), dwarf_lineendsequence(), dwarf_lineno(), dwarf_lineoff(), dwarf_linesrc(), dwarf_srclines(), err, filename, i, lineno, new_basic_block(), pc, print_error(), printf(), and verbose.
Referenced by print_infos().
| void print_locs | ( | Dwarf_Debug | dbg | ) |
Definition at line 1472 of file print_sections.c.
References DW_DLV_ERROR, DW_DLV_OK, dwarf_get_loclist_entry(), err, offset, print_error(), and printf().
Referenced by process_one_file().
| void print_macinfo | ( | Dwarf_Debug | dbg | ) |
Definition at line 1400 of file print_sections.c.
References count, Dwarf_Macro_Details_s::dmd_offset, DW_DLA_STRING, DW_DLV_ERROR, DW_DLV_OK, dwarf_dealloc(), dwarf_get_macro_details(), err, i, max, macro_counts_s::mc_code_zero, macro_counts_s::mc_define, macro_counts_s::mc_end_file, macro_counts_s::mc_extension, macro_counts_s::mc_start_file, macro_counts_s::mc_undef, macro_counts_s::mc_unknown, memset, offset, print_error(), print_one_macro_entry(), and printf().
Referenced by process_one_file().
| void print_one_die | ( | Dwarf_Debug | dbg, | |
| Dwarf_Die | die, | |||
| boolean | print_information, | |||
| char ** | srcfiles, | |||
| Dwarf_Signed | cnt | |||
| ) |
Definition at line 212 of file print_die.c.
References dense, dst_format, DW_DLA_ATTR, DW_DLA_LIST, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_attrlist(), dwarf_dealloc(), dwarf_die_CU_offset(), dwarf_dieoffset(), dwarf_whatattr(), err, FALSE, i, indent_level, local_symbols_already_began, offset, print_attribute(), print_error(), printf(), SPACE, tag, and TRUE.
Referenced by print_aranges(), and print_die_and_children().
| void print_pubnames | ( | Dwarf_Debug | dbg | ) |
Definition at line 1204 of file print_sections.c.
References check_pubname_attr, Dwarf_Check_Result::checks, count, die(), DW_AT_external, DW_DLA_GLOBAL, DW_DLA_LIST, DW_DLA_STRING, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, DWARF_CHECK_ERROR2, dwarf_dealloc(), dwarf_die_CU_offset(), dwarf_get_globals(), dwarf_global_cu_offset(), dwarf_global_name_offsets(), dwarf_hasattr(), dwarf_offdie(), err, Dwarf_Check_Result::errors, exit(), i, print_error(), printf(), and pubname_attr_result.
Referenced by process_one_file().
| void print_relocinfo | ( | Dwarf_Debug | dbg | ) |
Definition at line 194 of file print_reloc.c.
References DW_DLV_OK, DW_SECTION_REL_DEBUG_NUM, dwarf_get_elf(), EI_CLASS, elf_getident(), ELFCLASS64, err, i, NULL, print_error(), print_relocinfo_32(), print_relocinfo_64(), and sect_data.
Referenced by process_one_file().
| void print_static_funcs | ( | Dwarf_Debug | dbg | ) |
Definition at line 1758 of file print_sections.c.
References count, die(), DW_DLA_FUNC, DW_DLA_LIST, DW_DLA_STRING, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_dealloc(), dwarf_die_CU_offset(), dwarf_func_cu_offset(), dwarf_func_name_offsets(), dwarf_get_funcs(), dwarf_offdie(), err, exit(), i, print_error(), printf(), and verbose.
Referenced by process_one_file().
| void print_static_vars | ( | Dwarf_Debug | dbg | ) |
Definition at line 1834 of file print_sections.c.
References count, die(), DW_DLA_LIST, DW_DLA_STRING, DW_DLA_VAR, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_dealloc(), dwarf_die_CU_offset(), dwarf_get_vars(), dwarf_offdie(), dwarf_var_cu_offset(), dwarf_var_name_offsets(), err, exit(), i, print_error(), printf(), and verbose.
Referenced by process_one_file().
| void print_strings | ( | Dwarf_Debug | dbg | ) |
Definition at line 1606 of file print_sections.c.
References DW_DLV_ERROR, DW_DLV_OK, dwarf_get_str(), err, length, offset, print_error(), and printf().
Referenced by process_one_file().
| void print_types | ( | Dwarf_Debug | dbg | ) |
Definition at line 1915 of file print_sections.c.
References count, die(), DW_DLA_LIST, DW_DLA_STRING, DW_DLA_TYPENAME, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_dealloc(), dwarf_die_CU_offset(), dwarf_get_types(), dwarf_offdie(), dwarf_type_cu_offset(), dwarf_type_name_offsets(), err, exit(), i, print_error(), printf(), and verbose.
Referenced by process_one_file().
| void print_weaknames | ( | Dwarf_Debug | dbg | ) |
Definition at line 1994 of file print_sections.c.
References count, die(), DW_DLA_LIST, DW_DLA_STRING, DW_DLA_WEAK, DW_DLV_ERROR, DW_DLV_NO_ENTRY, DW_DLV_OK, dwarf_dealloc(), dwarf_die_CU_offset(), dwarf_get_weaks(), dwarf_offdie(), dwarf_weak_cu_offset(), dwarf_weak_name_offsets(), err, exit(), i, print_error(), printf(), and verbose.
Referenced by process_one_file().
Definition at line 105 of file dwarfdump.c.
Definition at line 95 of file dwarfdump.c.
Referenced by print_attribute(), process_args(), and process_one_file().
| int check_error |
Definition at line 93 of file dwarfdump.c.
Referenced by print_pubnames(), process_args(), and process_one_file().
Definition at line 96 of file dwarfdump.c.
Referenced by print_die_and_children(), process_args(), and process_one_file().
Definition at line 97 of file dwarfdump.c.
Referenced by get_attr_value(), process_args(), and process_one_file().
| char cu_name[] |
Definition at line 101 of file dwarfdump.c.
Referenced by print_aranges(), print_infos(), and process_args().
Definition at line 102 of file dwarfdump.c.
Referenced by get_attr_value(), print_aranges(), print_frames(), print_infos(), process_args(), and process_one_file().
Definition at line 88 of file dwarfdump.c.
Referenced by get_location_list(), print_abbrevs(), print_attribute(), print_infos(), print_one_die(), and process_args().
Definition at line 89 of file dwarfdump.c.
Referenced by c_parser_objc_method_decl(), cp_parser_label_for_labeled_statement(), cp_parser_labeled_statement(), cp_parser_objc_method_signature(), grokparms(), and process_args().
Definition at line 112 of file dwarfdump.c.
Referenced by $auxinit(), $ssdallc(), $ssdfree(), __c_fp_class_q(), __f77_f_back_com(), _dwarf_addr_finder(), _dwarf_print_one_locdesc(), _dwarf_stream_relocs_to_disk(), _dwarf_symbolic_relocs_to_disk(), _elf_arhdr(), _elf_init_ar(), _elf_output(), _stat(), alpha_ecoff_get_relocated_section_contents(), bfd_check_format_matches(), c_dfe(), c_due(), c_le(), check_buflen(), collect_execute(), compile_re(), complex_divide(), complex_sqrt(), do_this_die_and_dealloc(), do_ui(), do_uio_1dim_work(), Dump_Rta_Scns(), dwarf_transform_to_disk_form(), elfNN_ia64_install_value(), execute(), f_clos_com(), f_del_com(), f_duped(), f_end_com(), f_find_com(), f_open_com(), f_unl_com(), ffestb_R100110_(), fstat(), get_attr_value(), get_fde_proc_name(), get_location_list(), get_nested_proc_name(), get_proc_name(), handle_debug_aranges(), handle_debug_frame(), handle_debug_info(), handle_debug_line(), idxopen(), idxread(), ir_b_create_map(), ISA_Operands_End(), ISA_Pack_End(), ISA_Print_End(), ISA_Subset_End(), l_C(), l_CHAR(), l_L(), l_R(), l_R16(), l_read(), l_write(), lang_specific_pre_link(), load_file_data(), load_symbols(), lwrt_A(), lwrt_I(), main(), mv_cur(), My_Atoq(), NAMEgetvar(), TOP_SCHED_INFO_MAP::Output(), parse_derived_type_stmt(), pex_free(), pex_get_status(), pex_get_times(), pex_read_output(), pexecute(), print_abbrevs(), print_aranges(), print_attribute(), print_die_and_children(), print_elf_error(), print_frames(), print_insn_ia64(), print_line_numbers_this_cu(), print_locs(), print_macinfo(), print_one_die(), print_pubnames(), print_relocinfo(), print_relocinfo_32(), print_relocinfo_64(), print_static_funcs(), print_static_vars(), print_strings(), print_types(), print_weaknames(), process_O_option(), process_this_die_attrs(), pushdecl(), pushdecl_maybe_friend(), QUADOP_ADD(), QUADOP_DIV(), QUADOP_DTOQ(), QUADOP_EQ(), QUADOP_GE(), QUADOP_GT(), QUADOP_ITOQ(), QUADOP_LE(), QUADOP_LT(), QUADOP_MPY(), QUADOP_NE(), QUADOP_NEGATE(), QUADOP_QTOD(), QUADOP_QTOI(), QUADOP_QTOS(), QUADOP_QTOU(), QUADOP_SQRT(), QUADOP_STOQ(), QUADOP_SUB(), QUADOP_UTOQ(), rd_ed(), remove_do_parallel_blk(), remove_pdo_blk(), rtl_verify_flow_info(), rtl_verify_flow_info_1(), s_rsle_com(), s_xsue64_mp(), scan_prog_file(), section_cache_section(), t_runc(), Targ_Atoc(), Targ_Conv(), Targ_Ipower(), Targ_Is_Integral(), Targ_WhirlOp(), tree_verify_flow_info(), utime(), verify_call_clobbering(), verify_def(), verify_dominators(), verify_eh_tree(), verify_flow_info(), verify_flow_insensitive_alias_info(), verify_flow_sensitive_alias_info(), verify_hot_cold_block_grouping(), verify_loop_structure(), verify_name_tags(), verify_phi_args(), verify_ssa(), verify_stmts(), verify_use(), vms_object_p(), w_ed(), w_ned(), wrt_G(), y_getc(), y_gets(), y_ierr(), y_putc(), z_getc(), and z_putc().
Definition at line 66 of file dwarfdump.c.
Referenced by print_die_and_children(), print_infos(), process_args(), and process_one_file().
Definition at line 107 of file dwarfdump.c.
1.5.6