DWARF_ATTROFFSET(3)

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

πŸ’… dwarf_attroffset β€” the libdwarf bestie you needed πŸ’…

okay so welcome to the DWARF_ATTROFFSET(3) page, bestie ✨ this one lives in the DWARF Access Library and it’s lowkey here to hand you an offset. iconic behavior, no cap πŸŽ€

🌸 NAME 🌸

dwarf_attroffset β€” retrieve the section-relative offset of an attribute descriptor πŸ¦‹

πŸ’– LIBRARY πŸ’–

DWARF Access Library (libdwarf, -ldwarf) πŸ‘‘

✨ SYNOPSIS ✨

#include <libdwarf.h>

int
dwarf_attroffset(Dwarf_Attribute at, Dwarf_Off *ret_off,
    Dwarf_Error *err);

πŸŽ€ DESCRIPTION πŸŽ€

Function dwarf_attroffset() retrieves the section-relative offset of the attribute descriptor referenced by argument at. literally its whole job πŸ’…

Argument ret_off should point to a location that is to hold the returned section-relative offset. If argument err is non-NULL, it is used to return an error descriptor in case of an error. so yes, give it somewhere cute to put the offset 🫢

⭐ RETURN VALUES ⭐

On success, function dwarf_attroffset() returns DW_DLV_OK. slay βœ…

In case of an error, it returns DW_DLV_ERROR and sets argument err. sad girl hours but at least you get the error descriptor 😭

🌈 COMPATIBILITY 🌈

This function is an extension to the DWARF(3) API. iykyk 🧚

πŸ’€ ERRORS πŸ’€

The dwarf_attroffset() function may fail with the following errors:

  • [DW_DLE_ARGUMENT] β€” Either of the arguments at or ret_off was NULL. not the NULL erasure bestie πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

dwarf(3), dwarf_attr(3) πŸ“


mwah πŸ’‹ this page is from Debian, dated December 20, 2014 β€” and that’s the whole vibe check, byeee βœ¨πŸ¦‹

πŸ“¦ where this page comes from