XS-libdwarf

 view release on metacpan or  search on metacpan

libdwarf-code-0.11.1/src/bin/dwarfdump/dd_glflags.h  view on Meta::CPAN


struct section_high_offsets_s {
    Dwarf_Unsigned debug_info_size;
    Dwarf_Unsigned debug_abbrev_size;
    Dwarf_Unsigned debug_line_size;
    Dwarf_Unsigned debug_loc_size;
    Dwarf_Unsigned debug_aranges_size;
    Dwarf_Unsigned debug_macinfo_size;
    Dwarf_Unsigned debug_pubnames_size;
    Dwarf_Unsigned debug_str_size;
    Dwarf_Unsigned debug_frame_size;
    Dwarf_Unsigned debug_ranges_size;
    Dwarf_Unsigned debug_pubtypes_size;
    Dwarf_Unsigned debug_types_size;
    Dwarf_Unsigned debug_macro_size;
    Dwarf_Unsigned debug_str_offsets_size;
    Dwarf_Unsigned debug_sup_size;
    Dwarf_Unsigned debug_cu_index_size;
    Dwarf_Unsigned debug_tu_index_size;
    Dwarf_Unsigned debug_names_size;
    Dwarf_Unsigned debug_loclists_size;
    Dwarf_Unsigned debug_rnglists_size;
};

/* Options to enable debug tracing. */
#define MAX_TRACE_LEVEL 3

struct glflags_s {

    /*  This so both
        dwarf_loclist_n()  and dwarf_get_loclist_c()
        and the dwarf_loclist_from_expr
        variations can be
        tested. Defaults to new
        dwarf_get_loclist_c(). See -g option.
        original IRIX dwarf_loclist() no longer tested
        as of October 2015. */
    Dwarf_Bool gf_use_old_dwarf_loclist;
    enum line_flag_type_e gf_line_flag_selection;

    Dwarf_Bool gf_abbrev_flag;
    Dwarf_Bool gf_aranges_flag; /* .debug_aranges section. */
    Dwarf_Bool gf_debug_names_flag; /* .debug_names section */
    Dwarf_Bool gf_eh_frame_flag;   /* GNU .eh_frame section. */
    Dwarf_Bool gf_frame_flag;      /* .debug_frame section. */
    Dwarf_Bool gf_gdbindex_flag;   /* .gdbindex section. */
    Dwarf_Bool gf_gnu_debuglink_flag;   /* .gnu_debuglink section. */
    Dwarf_Bool gf_debug_gnu_flag;  /* .debug_gnu_pubtypes, pubnames*/
    Dwarf_Bool gf_debug_sup_flag;  /* .debug_sup */
    Dwarf_Bool gf_info_flag;  /* .debug_info */
    Dwarf_Bool gf_line_flag;
    Dwarf_Bool gf_no_follow_debuglink;
    Dwarf_Bool gf_line_print_pc;
    Dwarf_Bool gf_line_skeleton_flag;
    Dwarf_Bool gf_loc_flag;
    Dwarf_Bool gf_macinfo_flag; /* DWARF2,3,4. Old macro section*/
    Dwarf_Bool gf_macro_flag; /* DWARF5 */
    Dwarf_Bool gf_pubnames_flag;
    Dwarf_Bool gf_debug_addr_flag;
    Dwarf_Bool gf_ranges_flag; /* .debug_ranges section. */
    Dwarf_Bool gf_reloc_flag;  /* Elf relocations, not DWARF. */
    Dwarf_Bool gf_static_func_flag;/* SGI only */
    Dwarf_Bool gf_static_var_flag; /* SGI only */
    Dwarf_Bool gf_string_flag;
    Dwarf_Bool gf_pubtypes_flag;   /* SGI only */
    Dwarf_Bool gf_types_flag; /* .debug_types, not all CU types */
    Dwarf_Bool gf_weakname_flag;   /* SGI only */

    Dwarf_Bool gf_print_utf8_flag;

    Dwarf_Bool gf_header_flag; /* Control printing of Elf header. */
    Dwarf_Bool gf_section_groups_flag;

    /* Print list of CUs per compiler */
    Dwarf_Bool gf_producer_children_flag;

    Dwarf_Bool gf_check_abbrev_code;
    Dwarf_Bool gf_check_pubname_attr;
    Dwarf_Bool gf_check_reloc_offset;
    Dwarf_Bool gf_check_tag_attr;
    Dwarf_Bool gf_check_tag_tree;
    Dwarf_Bool gf_check_type_offset;
    Dwarf_Bool gf_check_decl_file;
    Dwarf_Bool gf_check_macros;
    Dwarf_Bool gf_check_lines;
    Dwarf_Bool gf_check_fdes;
    Dwarf_Bool gf_check_ranges;
    Dwarf_Bool gf_check_aranges;
    Dwarf_Bool gf_check_harmless;
    Dwarf_Bool gf_check_abbreviations;
    Dwarf_Bool gf_check_dwarf_constants;
    Dwarf_Bool gf_check_di_gaps;
    Dwarf_Bool gf_check_forward_decl;
    Dwarf_Bool gf_check_self_references;
    Dwarf_Bool gf_check_attr_encoding;   /* Attributes encoding */
    Dwarf_Bool gf_generic_1200_regs;
    Dwarf_Bool gf_suppress_check_extensions_tables;
    Dwarf_Bool gf_check_duplicated_attributes;
    Dwarf_Bool gf_check_functions;

    /* lots of checks make no sense on a dwp debugfission object. */
    Dwarf_Bool gf_suppress_checking_on_dwp;

    /*  suppress_nested_name_search is a band-aid.
        A workaround. A real fix for N**2 behavior is needed.  */
    Dwarf_Bool gf_suppress_nested_name_search;
    Dwarf_Bool gf_uri_options_translation;
    Dwarf_Bool gf_do_print_uri_in_input;

    /* Print global (unique) error messages */
    Dwarf_Bool gf_print_unique_errors;
    Dwarf_Bool gf_found_error_message;

    Dwarf_Bool gf_check_names;

    /* During '-k' mode, display errors */
    Dwarf_Bool gf_check_verbose_mode;

    Dwarf_Bool gf_check_frames;
    Dwarf_Bool gf_check_frames_extended; /* Extensive frames check */
    Dwarf_Bool gf_check_locations;       /* Location list check */

libdwarf-code-0.11.1/src/bin/dwarfdump/dd_glflags.h  view on Meta::CPAN

        arbitrary other DIEs.
        These traversals use pVisitedInfo to
        detect any compiler errors that introduce circular references.
        Printing of the traversals is also done on request.
        Entries are added and deleted as they are visited in
        a depth-first traversal.  */
    Bucket_Group *pVisitedInfo;

    /*  Compilation Unit information for improved error messages.
        If the strings are too short we just truncate so fixed length
        here is fine.  */
    #define COMPILE_UNIT_NAME_LEN 512
    char PU_name[COMPILE_UNIT_NAME_LEN]; /* PU Name */
    char CU_name[COMPILE_UNIT_NAME_LEN]; /* CU Name */
    char CU_producer[COMPILE_UNIT_NAME_LEN];  /* CU Producer Name */

    /*  Options to enable debug tracing. */
    int nTrace[MAX_TRACE_LEVEL + 1];

    /* Output filename */
    const char *output_file;
    int         group_number;
    unsigned gf_universalnumber; /* for Mach-O universal binaries*/

    /*  Global esb-buffers. */
    struct esb_s *newprogname;
    struct esb_s *cu_name;
    struct esb_s *config_file_path;
    struct esb_s *config_file_tiedpath;
    struct dwconf_s *config_file_data;

    /*  Check errors. */
    int check_error;
};

extern struct glflags_s glflags;

void init_global_flags(void);
void reset_global_flags(void);
void set_checks_off(void);
void reset_overall_CU_error_data(void);
Dwarf_Bool cu_data_is_set(void);

/*  Shortcuts for additional trace options */
#define KIND_OPTIONS        0   /* Dump options and stop. */
#define KIND_RANGES_INFO    1   /* Dump RangesInfo Table. */
#define KIND_LINKONCE_INFO  2   /* Dump Linkonce Table. */
#define KIND_VISITED_INFO   3   /* Dump Visited Info. */

#define dump_options        glflags.nTrace[KIND_OPTIONS]
#define dump_ranges_info    glflags.nTrace[KIND_RANGES_INFO]
#define dump_linkonce_info  glflags.nTrace[KIND_LINKONCE_INFO]
#define dump_visited_info   glflags.nTrace[KIND_VISITED_INFO]

/*  Section IDs. See also libdwarfp/pro_opaque.h DEBUG_INFO etc
    as we arbitrarily use the same numbering here.
    In pro_opaque the numbering matters.
    Here it helps us record where we are at any instant.
    It's not necessary they match but seems good to do.
    Here we have some extra sections not related to
    relocations so we just add those beginning with 22 */
#define         DEBUG_INFO      0
#define         DEBUG_LINE      1
#define         DEBUG_ABBREV    2
#define         DEBUG_FRAME     3
#define         DEBUG_ARANGES   4
#define         DEBUG_PUBNAMES  5
#define         DEBUG_FUNCNAMES 6
#define         DEBUG_TYPENAMES 7
#define         DEBUG_VARNAMES  8
#define         DEBUG_WEAKNAMES 9
#define         DEBUG_MACINFO   10 /* DWARF 2,3,4 only */
#define         DEBUG_LOC       11
#define         DEBUG_RANGES    12
#define         DEBUG_TYPES     13
#define         DEBUG_PUBTYPES  14
#define         DEBUG_NAMES     15 /* DWARF5. aka dnames */
#define         DEBUG_STR       16
#define         DEBUG_LINE_STR  17
#define         DEBUG_MACRO     18 /* DWARF 5. */
#define         DEBUG_LOCLISTS  19 /* DWARF 5. */
#define         DEBUG_RNGLISTS  20 /* DWARF 5. */
#define         DEBUG_SUP       21 /* DWARF 5. */

#define         DEBUG_GDB_INDEX    22
#define         DEBUG_FRAME_EH_GNU 23
#define         DEBUG_GNU_PUBNAMES 24
#define         DEBUG_GNU_PUBTYPES 25

/*  Print the information only if unique errors
    is set and it is first time */
#define PRINTING_UNIQUE (!glflags.gf_found_error_message)
#endif /* GLFLAGS_H */



( run in 0.795 second using v1.01-cache-2.11-cpan-5511b514fd6 )