DWARF_GET_CIE_INDEX(3)
π DWARF_GET_CIE_INDEX π
okay so this whole page lives in the Library Functions Manual and it's all about dwarf_get_cie_index from the DWARF Access Library β yes bestie, libdwarf, and you link it with -ldwarf. let's get into it β¨
π NAME π
dwarf_get_cie_index β the function that retrieves the index of a CIE descriptor. that's the whole vibe, that's the job π«Ά
π LIBRARY π
DWARF Access Library β libdwarf, -ldwarf. she's iconic, she's linked in with -ldwarf, periodt.
β¨ SYNOPSIS β¨
#include <libdwarf.h>
int
dwarf_get_cie_index(Dwarf_Cie cie, Dwarf_Signed *cie_index,
Dwarf_Error *err);
π DESCRIPTION π
okay so here's what dwarf_get_cie_index() does: it retrieves the zero-based index of a given CIE descriptor, inside the array of CIE descriptors that the functions dwarf_get_fde_list(3) and dwarf_get_fde_list_eh(3) hand back to you. zero-based, so the first one is 0, not 1 β don't come for me, that's just how it is π
the argument cie should reference a valid DWARF CIE descriptor. like, an actual valid one. that's the vibe check it has to pass.
and the argument cie_index should point to a location that will hold the returned index. that's where the answer lands, bestie π―
π₯ RETURN VALUES π₯
when it succeeds, dwarf_get_cie_index() returns DW_DLV_OK. slay.
but π if something goes wrong, it returns DW_DLV_ERROR and sets the argument err. so yeah, check your err, always check your err.
π ERRORS π
function dwarf_get_cie_index() can fail with:
[DW_DLE_ARGUMENT]β either of the argumentscieorcie_indexwasNULL. literally either one. don't passNULL, it's giving chaos π
π SEE ALSO π
dwarf(3), dwarf_get_cie_info(3), dwarf_get_cie_of_fde(3), dwarf_get_fde_list(3), dwarf_get_fde_list_eh(3) β go read those next, iykyk π
and that's the page, bestie π this lil masterpiece is from Debian, dated May 22, 2011 β yes, she's an elder icon and she still ate. mwah πβ¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: libdwarf 15.0.0
- Copyright (c) 2011 Kai Wang
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms