Skip to content
DwarfFunctionsDeinit

DwarfFunctionsDeinit

Description

Release the function table built by DwarfFunctionsBuildFromElf or DwarfFunctionsBuildFromSlices. Frees the owned function-name pool and the sorted entries vector, then zeroes the struct so any later use trips the NULL-self diagnostic.

Parameters

Name Direction Description
self in,out DwarfFunctions instance, or NULL.

Success

Function returns. Every DwarfFunction previously handed out by DwarfFunctionsResolve is invalid.

Failure

No action when self is NULL.

Usage example (Cross-references)

Usage examples (Cross-references)
            }
            if (e->functions_built && e->functions_ok) {
                DwarfFunctionsDeinit(&e->functions);
            }
            if (e->sidecar_functions_built && e->sidecar_functions_ok) {
            }
            if (e->sidecar_functions_built && e->sidecar_functions_ok) {
                DwarfFunctionsDeinit(&e->sidecar_functions);
            }
    #endif
            MachoCacheEntry *e = VecPtrAt(&self->entries, i);
            if (e->fns_built && e->fns_ok)
                DwarfFunctionsDeinit(&e->fns);
            if (e->dsym_open)
                MachoDeinit(&e->dsym);
    
        if (!ok) {
            DwarfFunctionsDeinit(out);
            MemSet(out, 0, sizeof(*out));
        }
    }
    
    void DwarfFunctionsDeinit(DwarfFunctions *self) {
        if (!self)
            return;
            const DwarfFunction *f = DwarfFunctionsResolve(&fns, file_relative);
            ok = f != NULL && f->name != NULL && ZstrFindSubstring(f->name, "dwarf_marker_helper") != NULL;
            DwarfFunctionsDeinit(&fns);
        }
            const DwarfFunction *f = DwarfFunctionsResolve(&fns, file_relative);
            ok                     = f && f->name && ZstrFindSubstring(f->name, expect_name) != NULL;
            DwarfFunctionsDeinit(&fns);
        }
Last updated on