DWARF_LNE_SET_ADDRESS(3)
π 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 usingdwarf_producer_init(3)ordwarf_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 notNULL, it will be used to store error information in case of an error. If it'sNULL, 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]β ArgumentdbgwasNULL. Like bestie, you forgot the producer instance π.[DW_DLE_ARGUMENT]β The argumentsymndxhad 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 π
dwarf(3)dwarf_add_directory_decl(3)dwarf_add_file_decl(3)dwarf_add_line_entry(3)dwarf_lne_end_sequence(3)dwarf_producer_init(3)dwarf_producer_init_b(3)
This page is from Debian, dated September 14, 2011 β mwah, and that's the whole vibe check, bestie πβ¨
π¦ 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) 2011 Kai Wang
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms