DWARF_LNE_SET_ADDRESS(3)

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

πŸ’– NAME πŸ’–

Okay bestie, this is the DWARF_LNE_SET_ADDRESS(3) page from the Library Functions Manual ✨. dwarf_lne_set_address β€” it sets the base address for line number information. Like, the main character of line-number setup πŸ‘‘.

πŸ“š LIBRARY πŸ“š

DWARF Access Library (libdwarf, -ldwarf) β€” that's the squad you're linking with, no cap πŸ’….

✨ SYNOPSIS ✨

#include <libdwarf.h>

Dwarf_Unsigned
dwarf_lne_set_address(Dwarf_P_Debug dbg, Dwarf_Addr off,
    Dwarf_Unsigned symndx, Dwarf_Error *err);

🌸 DESCRIPTION 🌸

So dwarf_lne_set_address() sets the base address used by subsequent invocations of the dwarf_add_line_entry(3) function. It's giving setup energy for the line entries that come after it πŸŽ€.

  • dbg β€” should reference a DWARF producer instance allocated using dwarf_producer_init(3) or dwarf_producer_init_b(3). Like, don't just roll up with a random pointer, bestie 🫢.
  • off β€” specifies a relocatable program address πŸ› οΈ.
  • symndx β€” specifies the index of the ELF symbol to be used for relocation πŸ”—.
  • err β€” if this argument is not NULL, it will be used to store error information in case of an error. If it's NULL, then no error info gets stored there, obviously πŸ™ˆ.

🫢 RETURN VALUES 🫢

On success, function dwarf_lne_set_address() returns DW_DLV_OK β€” slay βœ…. In case of an error, function dwarf_lne_set_address() returns DW_DLV_NOCOUNT and sets the argument err.

πŸ’€ ERRORS πŸ’€

Function dwarf_lne_set_address() can fail with:

  • [DW_DLE_ARGUMENT] β€” Argument dbg was NULL. Like bestie, you forgot the producer instance 😭.
  • [DW_DLE_ARGUMENT] β€” The argument symndx had an illegal value. That index is not it πŸ’….
  • [DW_DLE_MEMORY] β€” An out of memory condition was encountered during the execution of the function. The memory said nope πŸ’€.

πŸ‘€ SEE ALSO πŸ‘€


This page is from Debian, dated September 14, 2011 β€” mwah, and that's the whole vibe check, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from