DWARF_FORMADDR(3)
okay so this is DWARF_FORMADDR(3) from the Library Functions Manual, and we're about to make an ADDRESS class attribute make sense, bestie π
β¨ NAME β¨
dwarf_formaddr β return the value of an ADDRESS class attribute π
π LIBRARY π
DWARF Access Library β libdwarf, -ldwarf π¦
π§ SYNOPSIS π§
#include <libdwarf.h>
int
dwarf_formaddr(Dwarf_Attribute attr, Dwarf_Addr *ret, Dwarf_Error *err);
π DESCRIPTION π
So dwarf_formaddr() takes the attribute you point at with attr, grabs the address it represents, and writes that address into the location that ret points to. Slay. β¨
The form of attr must be DW_FORM_addr β that's the vibe check it has to pass, no cap.
If err is not NULL, it gets used to return an error descriptor in case of an error. π«Ά
π RETURN VALUES π
On success, dwarf_formaddr() returns DW_DLV_OK β iconic behavior, honestly π.
If something goes wrong, it returns DW_DLV_ERROR and sets err. π
π ERRORS π
Okay so heads up: the page itself literally says dwarf_formblock() in this sentence, not dwarf_formaddr() β I'm keeping the name exactly as written, bestie. It may fail with these errors:
[DW_DLE_ARGUMENT]β Either of argumentsattrorretwasNULL. π[DW_DLE_ATTR_FORM_BAD]β The attribute referenced by argumentattrwas not of formDW_FORM_addr. π
π¦ SEE ALSO π¦
Go read these next, iykyk:
dwarf(3)dwarf_attr(3)dwarf_formblock(3)dwarf_formflag(3)dwarf_formref(3)dwarf_formsdata(3)dwarf_formsig8(3)dwarf_formstring(3)dwarf_formudata(3)dwarf_hasattr(3)
Signed, sealed, and delivered by Debian on July 23, 2010 β that's the source/version and date from the original footer, and the page is DWARF_FORMADDR(3) π
π
π¦ 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) 2010 Joseph Koshy
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms