DWARF_ADD_AT_PRODUCER(3)

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

🌸 NAME 🌸

okay bestie, welcome to the dwarf_add_AT_producer(3) page β€” manual name DWARF_ADD_AT_PRODUCER(3) β€” and it’s literally about dwarf_add_AT_producer: create and attach a DW_AT_producer attribute πŸ’…βœ¨

πŸ¦‹ LIBRARY πŸ¦‹

DWARF Access Library (libdwarf, -ldwarf) β€” yes, that’s the vibe, link it with -ldwarf 🫢

πŸŽ€ SYNOPSIS πŸŽ€

       #include <libdwarf.h>

       Dwarf_P_Attribute
       dwarf_add_AT_producer(Dwarf_P_Die die, char *producer,
           Dwarf_Error *err);

✨ DESCRIPTION ✨

Function dwarf_add_AT_producer() creates a DW_AT_producer attribute descriptor and attaches it to the debugging information entry referenced by argument die. The created attribute will have DWARF form DW_FORM_strp β€” iconic, no cap πŸ’–

Argument die should reference a debugging information entry allocated using dwarf_new_die(3). That part matters, bestie πŸ¦‹

Argument producer should point to a NUL-terminated string which will become the value of the created attribute. Cute, simple, slay 🌸

If argument err is not NULL, it will be used to store error information in case of an error. Very considerate of it, honestly πŸ’œ

πŸ’œ RETURN VALUES πŸ’œ

On success, function dwarf_add_AT_producer() returns the created attribute descriptor. In case of an error, function dwarf_add_AT_producer() returns DW_DLV_BADADDR and sets the argument err. Not the glow-up we wanted, but okay 😭

πŸ”₯ ERRORS πŸ”₯

Function dwarf_add_AT_producer() can fail with:

  • [DW_DLE_ARGUMENT] β€” Either of the arguments die or producer was NULL. rude but valid πŸ’€
  • [DW_DLE_MEMORY] β€” An out of memory condition was encountered during the execution of the function. the memory said no πŸ™ˆ

🌈 SEE ALSO 🌈

go give these besties a read, iykyk:


πŸ’– that’s the whole page, bestie! Signed off from Debian, dated September 4, 2011, on the DWARF_ADD_AT_PRODUCER(3) manual β€” mwah! πŸ’‹

πŸ“¦ where this page comes from