XS-libdwarf

 view release on metacpan or  search on metacpan

libdwarf-code-0.11.1/src/bin/dwarfgen/irepform.h  view on Meta::CPAN

        finalform_(0), initialform_(0),
        formclass_(DW_FORM_CLASS_EXPRLOC)
        {};
    IRFormExprloc(IRFormInterface *);
    ~IRFormExprloc() {};
    IRFormExprloc & operator=(const IRFormExprloc &r) {
        if (this == &r) return *this;
        finalform_ = r.finalform_;
        initialform_ = r.initialform_;
        formclass_ = r.formclass_;
        exprlocdata_ = r.exprlocdata_;
        return *this;
    };
    IRFormExprloc(const IRFormExprloc &r) {
        finalform_ = r.finalform_;
        initialform_ = r.initialform_;
        formclass_ = r.formclass_;
        exprlocdata_ = r.exprlocdata_;

    }
    virtual IRFormExprloc * clone() const {
        return new IRFormExprloc(*this);
    }
    void setInitialForm(Dwarf_Half v) { initialform_ = v;}
    void setFinalForm(Dwarf_Half v) { finalform_ = v;}
    Dwarf_Half getInitialForm() { return initialform_;}
    Dwarf_Half getFinalForm() {return finalform_;}
    enum Dwarf_Form_Class getFormClass() const { return formclass_; };
    std::vector<char> getexprlocdata() const {return exprlocdata_; };
    void insertBlock(Dwarf_Unsigned len, Dwarf_Ptr data) {
        char *d = static_cast<char *>(data);
        exprlocdata_.clear();
        exprlocdata_.insert(exprlocdata_.end(),d+0,d+len);
    };
private:
    Dwarf_Half finalform_;
    // In most cases directform == indirect form.
    // Otherwise, directform == DW_FORM_indirect.
    Dwarf_Half initialform_;
    enum Dwarf_Form_Class formclass_;
    std::vector<char> exprlocdata_;
};

class IRFormFlag : public IRForm {
public:
    IRFormFlag():
        initialform_(0),
        finalform_(0),
        formclass_(DW_FORM_CLASS_FLAG),
        flagval_(0)
        {};

libdwarf-code-0.11.1/src/lib/libdwarf/ChangeLog2020  view on Meta::CPAN

    * dwarf_opaque.h,dwarf_query.c: Make
      _dwarf_look_in_local_and_tied_by_index global,not
      _dwarf_extract_address_from_debug_addr.
2020-08-22: David Anderson
    * dwarf_names.c,dwarf_names.h,dwarf_names_enum.h,
      dwarf_names_new.h,libdwarf_version.h: Updated  version
      string, regenerated files that reference it.
2020-08-21: David Anderson
    * dwarf_init_finish.c(insert_sht_list_in_group_map):
      Added checks of dss_data_was_malloc around
      a couple of calls saying free(secdata.dss_data).
      The missing checks could only result in duplicate
      free with user calls that allocated their
      own section data to load a section and a certain
      error arising during the call.
    * dwarf_loc.c: To elminate ambiguity, renamed
      some fields from lowpc to rawlowpc (for example).
    * dwarf_loclists.c(build_array_of_lle): Removed
      a block of code duplicating work done in dwarf_loc.c.
      Fixed arguments passing ld_lopc, ld_highpc
      to pass ld_rawlow, ld_rawhigh for correctness.

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_debugnames.c  view on Meta::CPAN


        READ_UNALIGNED_CK(dbg, debugstroffset, Dwarf_Unsigned,
            ptr, dn->dn_offset_size,
            error,endptr);
        if (offset_to_debug_str) {
            *offset_to_debug_str = debugstroffset;
        }
    }
    /* Get str ptr from .debug_str */
    {
        Dwarf_Small *secdataptr = 0;
        Dwarf_Unsigned secdatalen = 0;
        Dwarf_Small *secend = 0;
        int res_s = 0;

        secdataptr = (Dwarf_Small *)dbg->de_debug_str.dss_data;
        secdatalen = dbg->de_debug_str.dss_size;
        secend = secdataptr+secdatalen;
        strpointer = secdataptr +debugstroffset;
        res_s = _dwarf_check_string_valid(dbg,
            secdataptr,strpointer,secend,
            DW_DLE_FORM_STRING_BAD_STRING,error);
        if (res_s != DW_DLV_OK) {
            return res_s;
        }
        if (ptrtostr) {
            *ptrtostr = (char *)strpointer;
        }
    }

    {

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_die_deliv.c  view on Meta::CPAN

        so allow for that and allow one (arbitrarily) more. */
    if ((std_sec_name_len + 5) < sizeof(tbuf)) {
        _dwarf_safe_strcpy(tbuf,sizeof(tbuf),
            std_section_name,std_sec_name_len);
        _dwarf_safe_strcpy(tbuf+std_sec_name_len,
            sizeof(tbuf)-std_sec_name_len,
            ".dwo",4);
    }
    for (i=0; i < dbg->de_debug_sections_total_entries; i++) {
        struct Dwarf_dbg_sect_s *sdata = &dbg->de_debug_sections[i];
        struct Dwarf_Section_s *section = sdata->ds_secdata;
        const char *std = section->dss_standard_name;

        if (!strcmp(std,std_section_name) ||
            !strcmp(std,tbuf)) {
            const char *used = section->dss_name;
            *actual_sec_name_out = used;
            if (sdata->ds_have_zdebug) {
                *marked_zcompressed = TRUE;
            }
            if (section->dss_ZLIB_compressed) {

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_elfread.h  view on Meta::CPAN

    int            f_is_64bit;
    unsigned       f_endian;
    Dwarf_Unsigned f_filesize;
    Dwarf_Unsigned f_flags;
    /* Elf size, not DWARF. 32 or 64 */
    Dwarf_Small    f_offsetsize;
    Dwarf_Small    f_pointersize;
    int            f_ftype;
    int            f_path_source;

    Dwarf_Unsigned f_max_secdata_offset;
    Dwarf_Unsigned f_max_progdata_offset;

    void (*f_copy_word) (void *, const void *, unsigned long);

    struct location      f_loc_ehdr;
    struct generic_ehdr* f_ehdr;

    struct location      f_loc_shdr;
    struct generic_shdr* f_shdr;

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_form.c  view on Meta::CPAN

   Documentation fixed July 2005.
*/
int
dwarf_formstring(Dwarf_Attribute attr,
    char **return_str, Dwarf_Error * error)
{
    Dwarf_CU_Context cu_context = 0;
    Dwarf_Debug dbg = 0;
    Dwarf_Unsigned offset = 0;
    int res = DW_DLV_ERROR;
    Dwarf_Small *secdataptr = 0;
    Dwarf_Small *secend = 0;
    Dwarf_Unsigned secdatalen = 0;
    Dwarf_Small *infoptr = attr->ar_debug_ptr;
    Dwarf_Small *contextend = 0;

    res  = get_attr_dbg(&dbg,&cu_context,attr,error);
    if (res != DW_DLV_OK) {
        return res;
    }
    if (cu_context->cc_is_info) {
        secdataptr = (Dwarf_Small *)dbg->de_debug_info.dss_data;
        secdatalen = dbg->de_debug_info.dss_size;
    } else {
        secdataptr = (Dwarf_Small *)dbg->de_debug_types.dss_data;
        secdatalen = dbg->de_debug_types.dss_size;
    }
    contextend = secdataptr +
        cu_context->cc_debug_offset +
        cu_context->cc_length +
        cu_context->cc_length_size +
        cu_context->cc_extension_size;
    secend = secdataptr + secdatalen;
    if (contextend < secend) {
        secend = contextend;
    }
    switch(attr->ar_attribute_form) {
    case DW_FORM_string: {
        Dwarf_Small *begin = attr->ar_debug_ptr;

        res= _dwarf_check_string_valid(dbg,secdataptr,begin, secend,
            DW_DLE_FORM_STRING_BAD_STRING,error);
        if (res != DW_DLV_OK) {
            return res;
        }
        *return_str = (char *) (begin);
        return DW_DLV_OK;
    }
    case DW_FORM_GNU_strp_alt:
    case DW_FORM_strp_sup:  {
        Dwarf_Error alterr = 0;

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_init_finish.c  view on Meta::CPAN

    int oldval = _dwarf_assume_string_in_bounds;

    _dwarf_assume_string_in_bounds = (Dwarf_Small)newval;
    return oldval;
}

/*  Unifies the basic duplicate/empty testing and section
    data setting to one place. */
static int
get_basic_section_data(Dwarf_Debug dbg,
    struct Dwarf_Section_s *secdata,
    struct Dwarf_Obj_Access_Section_a_s *doas,
    Dwarf_Unsigned section_index,
    unsigned group_number,
    Dwarf_Error* error,
    int duperr, int emptyerr )
{
    /*  There is an elf convention that section index 0  is reserved,
        and that section is always empty.
        Non-elf object formats must honor that by ensuring that
        (when they assign numbers to 'sections' or
        'section-like-things')
        they never assign a real section section-number
        0 to dss_index. */
    if (secdata->dss_index != 0) {
        DWARF_DBG_ERROR(dbg, duperr, DW_DLV_ERROR);
    }
    if (doas->as_size == 0) {
        /*  As of 2018 it seems impossible to detect
            (via dwarfdump) whether emptyerr has any
            practical effect, whether TRUE or FALSE.  */
        if (emptyerr == 0 ) {
            /*  Allow empty section. */
            return DW_DLV_OK;
        }
        /* Know no reason to allow section */
        DWARF_DBG_ERROR(dbg, emptyerr, DW_DLV_ERROR);
    }
    secdata->dss_index = section_index;
    secdata->dss_size  = doas->as_size;
    secdata->dss_group_number = group_number;
    secdata->dss_addr  = doas->as_addr;
    secdata->dss_link  = doas->as_link;
    secdata->dss_flags = doas->as_flags;
    if (secdata->dss_flags & SHF_COMPRESSED) {
        secdata->dss_shf_compressed = TRUE;
    }
    secdata->dss_entrysize = doas->as_entrysize;
    secdata->dss_addralign = doas->as_addralign;
    return DW_DLV_OK;
}

static void
add_relx_data_to_secdata( struct Dwarf_Section_s *secdata,
    struct Dwarf_Obj_Access_Section_a_s *doas,
    Dwarf_Unsigned section_index,
    int is_rela)
{
    secdata->dss_reloc_index = section_index;
    secdata->dss_reloc_size = doas->as_size;
    secdata->dss_reloc_entrysize = doas->as_entrysize;
    secdata->dss_reloc_addr = doas->as_addr;
    secdata->dss_reloc_symtab = doas->as_link;
    secdata->dss_reloc_link = doas->as_link;
    secdata->dss_is_rela = (char)is_rela;
}

#if 0 /* dump_bytes */
static void
dump_bytes(const char *msg,Dwarf_Small * start, long len)
{
    Dwarf_Small *end = start + len;
    Dwarf_Small *cur = start;

    printf("dump_bytes: %s ",msg);

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_init_finish.c  view on Meta::CPAN

static int
insert_sht_list_in_group_map(Dwarf_Debug dbg,
    struct Dwarf_Obj_Access_Section_a_s *doas,
    unsigned comdat_group_number,
    unsigned section_number,
    Dwarf_Unsigned section_count,
    struct Dwarf_Obj_Access_Interface_a_s * obj,
    unsigned *did_add_map,
    Dwarf_Error *error)
{
    struct Dwarf_Section_s secdata;
    Dwarf_Small * data = 0;
    int           res = 0;
    Dwarf_Small*  secend = 0;

    memset(&secdata,0,sizeof(secdata));
    secdata.dss_size =      doas->as_size;
    secdata.dss_entrysize = doas->as_entrysize;
    secdata.dss_group_number = 1; /* arbitrary. */
    secdata.dss_index     = section_number;
    secdata.dss_name      = ".group";
    secdata.dss_standard_name = ".group";
    secdata.dss_number = section_number;
    secdata.dss_ignore_reloc_group_sec = TRUE;
    res = _dwarf_load_section(dbg,&secdata,error);
    if (res != DW_DLV_OK) {
        if (secdata.dss_data_was_malloc) {
            free(secdata.dss_data);
            secdata.dss_data = 0;
        }
        return res;
    }
    if (!secdata.dss_data) {
        _dwarf_error(dbg,error,DW_DLE_GROUP_INTERNAL_ERROR);
        return DW_DLV_ERROR;
    }
    if (doas->as_entrysize != 4) {
        if (secdata.dss_data_was_malloc) {
            free(secdata.dss_data);
            secdata.dss_data = 0;
        }
        _dwarf_error(dbg,error,DW_DLE_GROUP_INTERNAL_ERROR);
        return DW_DLV_ERROR;
    }
    /*  So now pick up the data in dss_data.
        It is an array of 32 bit fields.
        Entry zero is just a constant 1.
        Each additional is a section number. */
    data = secdata.dss_data;
    secend = data + secdata.dss_size;
    {
        Dwarf_Unsigned i = 1;
        Dwarf_Unsigned count = doas->as_size/doas->as_entrysize;
        Dwarf_Unsigned  fval = 0;

        /*  The fields treatments with  regard
            to endianness is unclear.  In any case a single
            bit should be on, as 0x01000000
            without any endiannes swapping.
            Or so it seems given limited evidence.
            We read with length checking and allow the
            reader to byte swap and then fix things.
            At least one test case has big-endian
            data but little-endian SHT_GROUP data. */
        if ((data+DWARF_32BIT_SIZE) > secend) {
            /* Duplicates the check in READ_UNALIGNED_CK
                so we can free allocated memory bere. */
            if (secdata.dss_data_was_malloc) {
                free(secdata.dss_data);
                secdata.dss_data = 0;
            }
            _dwarf_error(dbg,error,DW_DLE_GROUP_INTERNAL_ERROR);
            return DW_DLV_ERROR;
        }
        READ_UNALIGNED_CK(dbg,fval,Dwarf_Unsigned,
            data,
            DWARF_32BIT_SIZE,
            error,
            secend);
        if (fval != 1 && fval != 0x1000000) {
            /*  Could be corrupted elf object. */
            if (secdata.dss_data_was_malloc) {
                free(secdata.dss_data);
                secdata.dss_data = 0;
            }
            _dwarf_error(dbg,error,DW_DLE_GROUP_INTERNAL_ERROR);
            return DW_DLV_ERROR;
        }

        data = data + doas->as_entrysize;
        for (i = 1 ; i < count ; ++i) {
            Dwarf_Unsigned  val = 0;

            if ((data+DWARF_32BIT_SIZE) > secend) {
                /* Duplicates the check in READ_UNALIGNED_CK
                    so we can free allocated memory bere. */
                if (secdata.dss_data_was_malloc) {
                    free(secdata.dss_data);
                    secdata.dss_data = 0;
                }
                _dwarf_error(dbg,error,DW_DLE_GROUP_INTERNAL_ERROR);
                return DW_DLV_ERROR;
            }
            READ_UNALIGNED_CK(dbg,val,Dwarf_Unsigned,
                data,
                DWARF_32BIT_SIZE,
                error,
                secend);
            if (val > section_count) {
                /*  Might be confused endianness by
                    the compiler generating the SHT_GROUP.
                    This is pretty horrible. */
                Dwarf_Unsigned valr = 0;
                _dwarf_memcpy_swap_bytes(&valr,&val,
                    DWARF_32BIT_SIZE);
                if (valr > section_count) {
                    if (secdata.dss_data_was_malloc) {
                        free(secdata.dss_data);
                        secdata.dss_data = 0;
                    }
                    _dwarf_error(dbg,error,
                        DW_DLE_GROUP_INTERNAL_ERROR);
                    return DW_DLV_ERROR;
                }
                /* Ok. Yes, ugly. */
                val = valr;
            }
            {
                /*  Ensure this group entry DWARF relevant before

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_init_finish.c  view on Meta::CPAN

                memset(&doasx,0,sizeof(doasx));
                resx = obj->ai_methods->
                    om_get_section_info(obj->ai_object,
                    val,
                    &doasx, &err);
                if (resx == DW_DLV_NO_ENTRY){
                    /*  Should we really ignore this? */
                    continue;
                }
                if (resx == DW_DLV_ERROR){
                    if (secdata.dss_data_was_malloc) {
                        free(secdata.dss_data);
                        secdata.dss_data = 0;
                    }
                    _dwarf_error(dbg,error,err);
                    return resx;
                }
                if (!this_section_dwarf_relevant(doasx.as_name,
                    (int)doasx.as_type,&is_rela) ) {
                    continue;
                }
                data += DWARF_32BIT_SIZE;
                *did_add_map = TRUE;
                res = _dwarf_insert_in_group_map(dbg,
                    (unsigned)comdat_group_number,
                    (unsigned)val,
                    doasx.as_name,
                    error);
                if (res != DW_DLV_OK) {
                    if (secdata.dss_data_was_malloc) {
                        free(secdata.dss_data);
                        secdata.dss_data = 0;
                    }
                    return res;
                }
            }
        }
    }
    if (secdata.dss_data_was_malloc) {
        free(secdata.dss_data);
        secdata.dss_data = 0;
    }
    return DW_DLV_OK;
}

/*  Split dwarf CUs can be in an object with non-split
    or split may be in a separate object.
    If all in one object the default is to deal with group_number
    and ignore DW_GROUPNUMBER_DWO.
    If only .dwo the default is DW_GROUPNUMBER_DWO(2).
    Otherwise use DW_GROUP_NUMBER_BASE(1).

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_init_finish.c  view on Meta::CPAN

                free(sections);
                DWARF_DBG_ERROR(dbg, err, DW_DLV_ERROR);
            }
            /* No entry: new-to-us section, the normal case. */
            res = _dwarf_enter_section_in_de_debug_sections_array(dbg,
                scn_name, obj_section_index, groupnumber,&err);
            if (res == DW_DLV_OK) {
                section = &dbg->de_debug_sections[
                    dbg->de_debug_sections_total_entries-1];
                res = get_basic_section_data(dbg,
                    section->ds_secdata, &doas,
                    obj_section_index,
                    groupnumber,
                    error,
                    section->ds_duperr,
                    section->ds_emptyerr);
                if (res != DW_DLV_OK) {
                    free(sections);
                    return res;
                }
                sections[obj_section_index] = section->ds_secdata;
                foundDwarf += section->ds_have_dwarf;
                found_match = TRUE;
                /*  Normal section set up.
                    Fall through. */
            } else if (res == DW_DLV_NO_ENTRY) {
                /*  We get here for relocation sections.
                    Fall through. */
            } else {
                free(sections);
                DWARF_DBG_ERROR(dbg, err, DW_DLV_ERROR);

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_init_finish.c  view on Meta::CPAN

                    prints correct debug information,
                    as the tool takes the section type instead
                    of the section name. If the current section
                    is a RELA one and the 'sh_info'
                    refers to a debug section, add the
                    relocation data. */
                if (is_a_relx_section(scn_name,
                    (int)doas.as_type, &is_rela)) {
                    if ( doas.as_info < section_count) {
                        if (sections[doas.as_info]) {
                            add_relx_data_to_secdata(
                                sections[doas.as_info],
                                &doas,
                                obj_section_index,is_rela);
                        }
                    } else {
                        /* Something is wrong with the ELF file. */
                        free(sections);
                        DWARF_DBG_ERROR(dbg, DW_DLE_ELF_SECT_ERR,
                            DW_DLV_ERROR);
                    }

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_opaque.h  view on Meta::CPAN

*/

struct Dwarf_dbg_sect_s {
    /*  Debug section name must not be freed, is quoted string.
        This is the name from the object file itself. */
    const char    *ds_name;
    /* The section number in object section numbering. */
    Dwarf_Unsigned ds_number;
    /*   Debug section information, points to de_debug_*member
        (or the like) of the dbg struct.  */
    struct Dwarf_Section_s *ds_secdata;

    unsigned ds_groupnumber;
    int ds_duperr;            /* Error code for duplicated section */
    int ds_emptyerr;          /* Error code for empty section */
    int ds_have_dwarf;        /* Section contains DWARF */
    int ds_have_zdebug;       /* Section compressed: .zdebug name */
};

/*  As the number of debug sections does not change very often,
    in the case a

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_setup_sections.c  view on Meta::CPAN

    DWARF_MAX_DEBUG_SECTIONS must be large enough to allow
    that all sections of interest fit in the table.
    returns DW_DLV_ERROR or DW_DLV_OK.
    */
static int
add_debug_section_info(Dwarf_Debug dbg,
    /* Name as seen in object file. */
    const char *name,
    const char *standard_section_name,
    Dwarf_Unsigned obj_sec_num,
    struct Dwarf_Section_s *secdata,
    unsigned groupnum,
    /*  The have_dwarf flag is a somewhat imprecise
        way to determine if there is at least one 'meaningful'
        DWARF information section present in the object file.
        If not set on some section we claim (later) that there
        is no DWARF info present. see 'foundDwarf' in this file */
    int duperr,int emptyerr,int have_dwarf,
    int havezdebug,
    int *err)
{
    unsigned total_entries = dbg->de_debug_sections_total_entries;
    if (secdata->dss_is_in_use) {
        *err = duperr;
        return DW_DLV_ERROR;
    }
    if (total_entries < DWARF_MAX_DEBUG_SECTIONS) {
        struct Dwarf_dbg_sect_s *debug_section =
            &dbg->de_debug_sections[total_entries];
        secdata->dss_is_in_use = TRUE;
        debug_section->ds_name = name;
        debug_section->ds_number = obj_sec_num;
        debug_section->ds_secdata = secdata;
        debug_section->ds_groupnumber =  groupnum;
        secdata->dss_name = name; /* Actual name from object file. */
        secdata->dss_standard_name = standard_section_name;
        secdata->dss_number = obj_sec_num;
        secdata->dss_zdebug_requires_decompress =
            (Dwarf_Small)havezdebug;
        /* We don't yet know about SHF_COMPRESSED */
        debug_section->ds_duperr = duperr;
        debug_section->ds_emptyerr = emptyerr;
        debug_section->ds_have_dwarf = have_dwarf;
        debug_section->ds_have_zdebug = havezdebug;
        ++dbg->de_debug_sections_total_entries;
        return DW_DLV_OK;
    }
    /*  This represents a bug in libdwarf.

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_setup_sections.c  view on Meta::CPAN

        pointers to strings. */
static int
set_up_section(Dwarf_Debug dbg,
    /*  Section name from object format.
        Might start with .zdebug not .debug if compressed section. */
    const char *secname,
    /*  Standard section name, such as .debug_info */
    const char *sec_standard_name,
    /*  Section number from object format  */
    Dwarf_Unsigned obj_sec_num,
    /*  The name associated with this secdata in libdwarf */
    const char *targname,
    /*  DW_GROUPNUMBER_ANY or BASE or DWO or some other group num */
    unsigned  groupnum_of_sec,
    struct Dwarf_Section_s *secdata,
    int duperr,int emptyerr,int have_dwarf,
    int *err)
{
    /*  Here accommodate the .debug or .zdebug version, (and of
        course non- .debug too, but those never zlib) .
        SECNAMEMAX should be a little bigger than any section
        name we care about as possibly compressed, which
        is to say bigger than any standard section name. */
#define SECNAMEMAX 30
    size_t secnamelen = strlen(secname);

libdwarf-code-0.11.1/src/lib/libdwarf/dwarf_setup_sections.c  view on Meta::CPAN


    /* SETUP_SECTION. See also BUILDING_SECTIONS, BUILDING_MAP  */
    {
        /*  The section name is a match with targname, or
            the .zdebug version of targname. */
        int sectionerr = 0;

        sectionerr = add_debug_section_info(dbg,secname,
            sec_standard_name,
            obj_sec_num,
            secdata,
            groupnum_of_sec,
            duperr,emptyerr, have_dwarf,
            havezdebug,err);
        if (sectionerr != DW_DLV_OK) {
            /* *err is set already */
            return sectionerr;
        }
    }
    return DW_DLV_OK;
}

libdwarf-code-0.11.1/src/lib/libdwarf/libdwarf.h  view on Meta::CPAN

#define DW_DLS_FORWARD     1  /* slide forward to find line */

/*  Defined larger than necessary.
    struct Dwarf_Debug_Fission_Per_CU_s,
    being visible, will be difficult to change:
    binary compatibility. The count is for arrays
    inside the struct, the struct itself is
    a single struct.  */
#define DW_FISSION_SECT_COUNT 12

/*! @defgroup basicdatatypes Basic Library Datatypes Group
    @{
    @typedef Dwarf_Unsigned
    The basic unsigned data type.
    Intended to be an unsigned 64bit value.
    @typedef Dwarf_Signed
    The basic signed data type.
    Intended to be a signed 64bit value.
    @typedef Dwarf_Off
    Used for offsets. It should be same size as Dwarf_Unsigned.
    @typedef Dwarf_Addr

libdwarf-code-0.11.1/src/lib/libdwarf/libdwarf.h  view on Meta::CPAN

typedef unsigned long long Dwarf_Addr;
    /*  Dwarf_Bool as int is wasteful, but for compatibility
        it must stay as int, not unsigned char. */
typedef int                Dwarf_Bool;   /* boolean type */
typedef unsigned short     Dwarf_Half;   /* 2 byte unsigned value */
typedef unsigned char      Dwarf_Small;  /* 1 byte unsigned value */
/*  If sizeof(Dwarf_Half) is greater than 2
    we believe libdwarf still works properly. */

typedef void*        Dwarf_Ptr;          /* host machine pointer */
/*! @}   endgroup basicdatatypes */

/*! @defgroup enums Enumerators with various purposes
    @{
    @enum Dwarf_Ranges_Entry_Type
    The dwr_addr1/addr2 data is either pair of offsets
    of a base pc address (DW_RANGES_ENTRY)
    or a base pc address (dwr_addr2 in DW_RANGES_ADDRESS_SELECTION) or
    both are zero(end of list, DW_RANGES_END)
    or both non-zero but identical
    (means an empty range, DW_RANGES_ENTRY).

libdwarf-code-0.11.1/test/test_setupsections.c  view on Meta::CPAN

#include "dwarf_secname_ck.h"
#include "dwarf_setup_sections.h"

static int errcount;

struct Dwarf_Debug_s dbgs;
Dwarf_Debug dbg = &dbgs;
struct basis_s {
    const char *name;
    unsigned    group_number;
    unsigned    secdataoff;
    int         duperr;
    int         emptyerr;
    int         havedwarf;
};
struct basis_s basis[] = {
{".debug_info",
DW_GROUPNUMBER_BASE,
offsetof(struct Dwarf_Debug_s,de_debug_info),
DW_DLE_DEBUG_INFO_DUPLICATE,DW_DLE_DEBUG_INFO_NULL,TRUE
},



( run in 0.283 second using v1.01-cache-2.11-cpan-ec4f86ec37b )