DWARF_GET_FDE_N(3)
hey bestie π you just opened DWARF_GET_FDE_N(3) from the Library Functions Manual, and we're folding that manual-name energy right into the intro like a little name tag π. This page is all about grabbing one FDE descriptor out of a whole lineup, and the vibes are very "pick your fave from the group chat" π
.
β¨ NAME β¨
dwarf_get_fde_n β retrieve FDE descriptor π¦
π¦ LIBRARY π¦
DWARF Access Library β literally libdwarf, -ldwarf β yes, that's the library, and yes, it's lowkey iconic.
π SYNOPSIS π
#include <libdwarf.h>
int
dwarf_get_fde_n(Dwarf_Fde *fdelist, Dwarf_Unsigned fde_index,
Dwarf_Fde *ret_fde, Dwarf_Error *err);
π DESCRIPTION π
Function dwarf_get_fde_n() retrieves an FDE descriptor from an array of FDE descriptors. It's giving "one specific bestie from the squad" β¨.
Here's the cast, no cap:
fdelistβ should point to an array of FDE descriptors, as returned by the functionsdwarf_get_fde_list(3)ordwarf_get_fde_list_eh(3). This is the whole friend group π«Ά.fde_indexβ specifies the 0-based index of the desired FDE descriptor. Yes, zero-based, so the first one is at0, periodt π .ret_fdeβ should point to a location that will hold the returned FDE descriptor. This is where your chosen fave gets delivered π.errβ if this argument is notNULL, it will be used to store error information in case of an error. If it isNULL, then that's just how it is, bestie.
tiny vibe check:fdelistandret_fdeare not optional in the pointer department β the error section below literally calls outNULLπ.
π₯ RETURN VALUES π₯
Function dwarf_get_fde_n() returns DW_DLV_OK when it succeeds. Slay β
.
It returns DW_DLV_NO_ENTRY if the FDE descriptor index specified by argument fde_index is out of range. Basically, you asked for a bestie who isn't in this group chat π.
In case of an error, it returns DW_DLV_ERROR and sets the argument err. So the error info lands in err when you gave it somewhere to go π.
πΈ ERRORS πΈ
Function dwarf_get_fde_n() can fail with:
[DW_DLE_ARGUMENT]β Either of the argumentsfdelistorret_fdewasNULL.[DW_DLE_NO_ENTRY]β The FDE descriptor index specified by argumentfde_indexwas out of range.
π SEE ALSO π
The whole recommended-reading squad, all present and accounted for π:
dwarf(3)dwarf_get_cie_of_fde(3)dwarf_get_fde_at_pc(3)dwarf_get_fde_info_for_all_regs(3)dwarf_get_fde_info_for_all_regs3(3)dwarf_get_fde_info_for_cfa_reg3(3)dwarf_get_fde_info_for_reg(3)dwarf_get_fde_info_for_reg3(3)dwarf_get_fde_instr_bytes(3)dwarf_get_fde_list(3)dwarf_get_fde_list_eh(3)dwarf_get_fde_range(3)
okay bye bestie π«Ά this page's footer energy is Debian, May 14, 2011, and DWARF_GET_FDE_N(3) β so that's the source/version and date folded into this cute little sign-off instead of copied as a boring last line πβ¨.
π¦ 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