DWARF_GET_FDE_AT_PC(3)
π DWARF_GET_FDE_AT_PC(3) π
okay bestie, welcome to this Library Functions Manual page π
we're talking about dwarf_get_fde_at_pc, and it's literally the little matchmaker between a program counter address and an FDE descriptor. no cap.
β¨ NAME β¨
dwarf_get_fde_at_pc β retrieve the FDE descriptor for an address π
π¦ LIBRARY π¦
DWARF Access Library (libdwarf, -ldwarf) β yes, that's the whole library vibe π
πΈ SYNOPSIS πΈ
#include <libdwarf.h>
int
dwarf_get_fde_at_pc(Dwarf_Fde *fdelist, Dwarf_Addr pc,
Dwarf_Fde *ret_fde, Dwarf_Addr *lopc, Dwarf_Addr *hipc,
Dwarf_Error *err);
π« DESCRIPTION π«
Function dwarf_get_fde_at_pc() searches the provided array of DWARF FDE descriptors for a descriptor covering a given program counter address. it's giving "find the one that matches," fr fr π₯
Here's the cast of arguments, bestie:
fdelistβ should point to an array of FDE descriptors, as returned by the functionsdwarf_get_fde_list(3)ordwarf_get_fde_list_eh(3).pcβ should contain the program counter address being looked up.ret_fdeβ should point to a location that will hold the returned FDE descriptor.lopcβ should point to a location that will be set to the lowest address covered by the returned FDE descriptor.hipcβ should point to a location that will be set to the highest address covered by the returned FDE descriptor.errβ if argumenterris notNULL, it will be used to store error information in case of an error.
lowkey important:fdelist,ret_fde,lopc, andhipcare main characters here, so don't be handing overNULLunless you want an error moment π
π RETURN VALUES π
Function dwarf_get_fde_at_pc() returns DW_DLV_OK when it succeeds. slay β
It returns DW_DLV_NO_ENTRY if a FDE descriptor that covers the address specified by argument pc is not found. not every search finds its match, and that's okay π
In case of an error, it returns DW_DLV_ERROR and sets the argument err.
π ERRORS π
Function dwarf_get_fde_at_pc() can fail with:
[DW_DLE_ARGUMENT]β One of the argumentsfdelist,ret_fde,lopc, orhipcwasNULL.[DW_DLE_NO_ENTRY]β There was no FDE descriptor covering the address specified by argumentpc.
π SEE ALSO π
dwarf(3)dwarf_get_cie_of_fde(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_n(3)dwarf_get_fde_range(3)
okay that's the whole page, bestie β source/version: Debian, dated May 22, 2011 π«Ά 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