DwarfLinesDeinit
Description
Release storage owned by a DwarfLines. Safe on a zeroed struct.
Success
Returns to the caller. *self is zeroed.
Failure
Function cannot fail. NULL self is a no-op.
Usage example (Cross-references)
Usage examples (Cross-references)
#if FEATURE_PARSER_DWARF
if (e->dwarf_built && e->dwarf_ok) {
DwarfLinesDeinit(&e->dwarf);
}
if (e->sidecar_dwarf_built && e->sidecar_dwarf_ok) { }
if (e->sidecar_dwarf_built && e->sidecar_dwarf_ok) {
DwarfLinesDeinit(&e->sidecar_dwarf);
}
if (e->cfi_built && e->cfi_ok) {- In
Dwarf.c:652:
if (!ok) {
DwarfLinesDeinit(out);
return false;
}- In
Dwarf.c:658:
}
void DwarfLinesDeinit(DwarfLines *self) {
if (!self)
return;- In
Dwarf.Mut.c:237:
// Out-of-range file -> no file string (NULL), not a bogus pointer.
ok = ok && e && e->file == NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
}- In
Dwarf.Mut.c:309:
ok = ok && e && e->file && ZstrFindSubstring(e->file, "only.c") != NULL;
ok = ok && e && e->dir == NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
}- In
Dwarf.Mut.c:354:
u64 addr = 0;
ok = ok && first_real_row_address(&lines, &addr) && addr == (u64)-1;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
}- In
Dwarf.Mut.c:384:
u64 addr = 0;
ok = ok && first_real_row_address(&lines, &addr) && addr == (u64)-1;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
}- In
Dwarf.Mut.c:414:
u64 addr = 0;
ok = ok && first_real_row_address(&lines, &addr) && addr == (u64)-1;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
}- In
Dwarf.Mut.c:443:
u64 addr = 0;
ok = ok && first_real_row_address(&lines, &addr) && addr == (u64)-1;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
}- In
Dwarf.Mut.c:478:
bool ok = !built;
if (built) {
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
} else {- In
Dwarf.Mut.c:531:
bool built = build_from_dl(&lines, &elf, base, dl, dl_len);
if (built)
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);- In
Dwarf.Mut.c:581:
bool built = build_from_dl(&lines, &elf, base, dl, dl_len);
if (built)
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);- In
Dwarf.c:33:
if (built)
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:76:
ok = true;
}
DwarfLinesDeinit(&lines);
}- In
Dwarf.c:606:
ok = ok && DwarfLinesResolve(&lines, 0x2010) == NULL;
DwarfLinesDeinit(&lines);
}- In
Dwarf.c:644:
if (built)
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:765:
static void lines_fixture_close(LinesFixture *fx) {
DwarfLinesDeinit(&fx->lines);
ElfDeinit(&fx->elf);
DefaultAllocatorDeinit(&fx->alloc);- In
Dwarf.c:1539:
// row, with end correctly bounded.
ok = (e == NULL) || (e->address == 0x17000);
DwarfLinesDeinit(&lines);
}- In
Dwarf.c:1633:
e = DwarfLinesResolve(&lines, 0x5123);
ok = ok && e && e->address == 0x5123 && e->line == 42;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:1667:
e = DwarfLinesResolve(&lines, 0x8000 + 0x7abc - 1);
ok = ok && e && e->address == 0x8000;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:1715:
// The file string came through.
ok = ok && e->file && ZstrFindSubstring(e->file, "source.c") != NULL;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:1750:
e = DwarfLinesResolve(&lines, 0x7003);
ok = ok && e && e->address == 0x7003 && e->line == 48;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:1785:
const DwarfLineEntry *e = DwarfLinesResolve(&lines, 0x9002);
ok = ok && e && e->address == 0x9002;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:1830:
const DwarfLineEntry *e = DwarfLinesResolve(&lines, 0xA000);
ok = ok && e && e->address == 0xA000 && e->line == 7;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:1979:
const DwarfLineEntry *e = DwarfLinesResolve(&lines, 0xB000);
ok = ok && e && e->address == 0xB000 && e->line == 5;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2028:
const DwarfLineEntry *e = DwarfLinesResolve(&lines, 0xC000);
ok = ok && e && e->address == 0xC000 && e->line == 3;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2070:
// before seq 2) does not resolve to seq 1.
ok = ok && DwarfLinesResolve(&lines, 0xCFFF) == NULL;
DwarfLinesDeinit(&lines);
}
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2161:
ok = ok && DwarfLinesResolve(&lines, 0x2010) == NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2212:
ok = ok && e && e->dir == NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2268:
ok = ok && DwarfLinesResolve(&lines, 0x5000) == NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2349:
ok = ok && DwarfLinesResolve(&lines, 0x6800) == NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2385:
if (built)
DwarfLinesDeinit(&lines);
// ElfOpenFromMemoryCopy may have succeeded even if the DWARF build did
// not; close the ELF either way (lines_from_debug_line opens it before
- In
Dwarf.c:2437:
ok = ok && e && e->is_stmt == false;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2484:
ok = ok && e && e->file && ZstrCompare(e->file, "source.c") == 0 && e->line == 20;
DwarfLinesDeinit(&lines);
}- In
Dwarf.c:2522:
if (built)
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2558:
if (built)
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2610:
ok = ok && DwarfLinesResolve(&lines, 0x3000) == NULL;
DwarfLinesDeinit(&lines);
}- In
Dwarf.c:2650:
const DwarfLineEntry *e = DwarfLinesResolve(&lines, 0x2000);
ok = ok && e && e->file && ZstrCompare(e->file, "source.c") == 0;
DwarfLinesDeinit(&lines);
}- In
Dwarf.c:2698:
// After the build there must be live allocations to release.
ok = ok && (DebugAllocatorLiveCount(&dbg) > before);
DwarfLinesDeinit(&lines);
}- In
Dwarf.c:2765:
ok = ok && e && e->dir && ZstrFindSubstring(e->dir, "real_dir") != NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2819:
ok = ok && e && e->file && ZstrFindSubstring(e->file, "first.c") != NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2876:
ok = ok && e && e->file && ZstrFindSubstring(e->file, "second.c") != NULL;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);- In
Dwarf.c:2935:
// the kill condition for this test.
ok = false;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
} else {- In
Dwarf.c:2981:
ok = ok && e && e->address == 0x6000 && e->line == 10;
DwarfLinesDeinit(&lines);
ElfDeinit(&elf);
DefaultAllocatorDeinit(&alloc);
Last updated on