DWARF_FORMADDR(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

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 arguments attr or ret was NULL. πŸ™ˆ
  • [DW_DLE_ATTR_FORM_BAD] β€” The attribute referenced by argument attr was not of form DW_FORM_addr. πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

Go read these next, iykyk:


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