Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 18 of file dwarfabbrev.c.
{ int nattr, nabbrev; DwarfAbbrev *abbrev; DwarfAttr *attr; if(d->acache.off == off && d->acache.na){ *aa = d->acache.a; return d->acache.na; } /* two passes - once to count, then allocate, then a second to copy */ if(parseabbrevs(d, off, nil, nil, &nabbrev, &nattr) < 0) { return -1; } abbrev = malloc(nabbrev*sizeof(DwarfAbbrev) + nattr*sizeof(DwarfAttr)); attr = (DwarfAttr*)(abbrev+nabbrev); if(parseabbrevs(d, off, abbrev, attr, nil, nil) < 0){ free(abbrev); return -1; } free(d->acache.a); d->acache.a = abbrev; d->acache.na = nabbrev; d->acache.off = off; *aa = abbrev; return nabbrev; }