DWARF_ADD_AT_DATAREF(3)
π DWARF_ADD_AT_DATAREF(3) π
okay so welcome to the DWARF_ADD_AT_DATAREF(3) page β yes bestie, itβs a section 3 page from the Library Functions Manual, and weβre about to make a relocatable-address attribute descriptor together. no cap, itβs giving very specific DWARF producer energy. π
πΈ NAME πΈ
dwarf_add_AT_dataref β create an attribute descriptor for a relocatable address
β¨ LIBRARY β¨
DWARF Access Library (libdwarf, -ldwarf)
π¦ SYNOPSIS π¦
#include <libdwarf.h>
Dwarf_P_Attribute
dwarf_add_AT_dataref(Dwarf_P_Debug dbg, Dwarf_P_Die die,
Dwarf_Half attr, Dwarf_Unsigned pc_value, Dwarf_Unsigned sym_index,
Dwarf_Error *err);
π DESCRIPTION π
Function dwarf_add_AT_dataref() creates an attribute descriptor for a relocatable address and attaches it to the debugging information entry referenced by argument die. literally its whole main character moment. β¨
If flag DW_DLC_SIZE_64 is set, the address value will be 8 bytes in size and of the DWARF form DW_FORM_data8. Otherwise, the address value will be 4 bytes in size and of the DWARF form DW_FORM_data4. so cute, so size-dependent. π
dbgβ this argument should reference a DWARF producer instance allocated usingdwarf_producer_init(3)ordwarf_producer_init_b(3). π«Άdieβ this argument should reference a debugging information entry allocated usingdwarf_new_die(3). π§attrβ specifies the attribute code of the created attribute descriptor. iconic little code moment. πpc_valueβ specifies the value of the relocatable address. πsym_indexβ specifies the ELF symbol index of the 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. π
π RETURN VALUES π
On success, function dwarf_add_AT_dataref() returns the created attribute descriptor. In case of an error, function dwarf_add_AT_dataref() returns DW_DLV_BADADDR and sets the argument err. periodt. π
π ERRORS π
Function dwarf_add_AT_dataref() can fail with:
[DW_DLE_ARGUMENT]β Either of the argumentsdbgordiewasNULL.[DW_DLE_MEMORY]β An out of memory condition was encountered during the execution of the function.
π SEE ALSO π
dwarf(3)dwarf_add_AT_ref_address(3)dwarf_add_AT_reference(3)dwarf_add_AT_signed_const(3)dwarf_add_AT_unsigned_const(3)dwarf_new_die(3)dwarf_producer_init(3)dwarf_producer_init_b(3)
mwah π this page comes from Debian, dated September 4, 2011, and itβs the DWARF_ADD_AT_DATAREF(3) manual page β bye 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