DWARF_FDE_CFA_OFFSET(3)
π DWARF_FDE_CFA_OFFSET π
okay so bestie, welcome to the dwarf_fde_cfa_offset page β it lives in the DWARF Access Library (that's libdwarf, and you link it with -ldwarf, mwah). This is the manpage that tells you how to add a DW_CFA_offset frame instruction to a DWARF frame descriptor. iconic behavior honestly.
β¨ NAME β¨
dwarf_fde_cfa_offset β add a DW_CFA_offset frame instruction to a DWARF frame descriptor π
π LIBRARY π
DWARF Access Library (libdwarf, -ldwarf) π
π¦ SYNOPSIS π¦
#include <libdwarf.h>
Dwarf_P_Fde
dwarf_fde_cfa_offset(Dwarf_P_Fde fde, Dwarf_Unsigned reg,
Dwarf_Signed offset, Dwarf_Error *err);
like, that's the whole vibe. three args plus an error slot. slay.
πΈ DESCRIPTION πΈ
So. Function dwarf_fde_cfa_offset() appends a DW_CFA_offset frame instruction onto the frame descriptor that argument fde is pointing at. it's giving "add one (1) instruction, no drama."
Argument fde should reference a frame descriptor that was allocated using dwarf_new_fde(3) β like, that's the expected provenance, don't come at it with a random pointer bestie π
Argument reg specifies the register operand for the frame instruction. that's the register. that's its whole job.
Argument offset specifies the offset operand for the frame instruction. yes ma'am, the offset. π
If argument err is not NULL, it will be used to store error information in case of an error. super handy, and if you pass NULL you just don't get the tea. π
π RETURN VALUES π
On success, function dwarf_fde_cfa_offset() returns the frame descriptor given in argument fde β yes, it just hands your own fde right back to you, that's the whole personality π
In case of an error, function dwarf_fde_cfa_offset() returns DW_DLV_BADADDR and sets the argument err. so if you see DW_DLV_BADADDR, that's the π moment, go check err.
π₯ ERRORS π₯
Function dwarf_fde_cfa_offset() can fail with:
[DW_DLE_ARGUMENT]β ArgumentfdewasNULL. (bestie. it was null. π)[DW_DLE_MEMORY]β An out of memory condition was encountered during the execution of the function. (the machine simply said no π« )
β SEE ALSO β
dwarf(3)dwarf_add_fde_inst(3)dwarf_add_frame_cie(3)dwarf_add_frame_fde(3)dwarf_add_frame_fde_b(3)dwarf_new_fde(3)
go read the whole friend group, iykyk π§
and that's the page!! muah π this one's from the Debian crew, dated September 26, 2011</>, and it's filed under DWARF_FDE_CFA_OFFSET(3) β stan. π
π¦ 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