DWARF_ADD_AT_CONST_VALUE_SIGNEDINT(3)
DWARF_ADD_AT_CONST_VALUE(3) π§β¨
okay so this page is from the Library Functions Manual and it's serving DWARF Access Library realness β that's libdwarf, linked with -ldwarf. It's about three functions that create and attach a DW_AT_const_value attribute, and honestly? iconic. π
β¨ NAME β¨
dwarf_add_AT_const_value_signedintdwarf_add_AT_const_value_stringdwarf_add_AT_const_value_unsignedint
β all three create and attach a DW_AT_const_value attribute. periodt.
π LIBRARY π
DWARF Access Library (libdwarf, -ldwarf) π«Ά
π οΈ SYNOPSIS π οΈ
#include <libdwarf.h>
Dwarf_P_Attribute
dwarf_add_AT_const_value_signedint(Dwarf_P_Die die, Dwarf_Signed value,
Dwarf_Error *err);
Dwarf_P_Attribute
dwarf_add_AT_const_value_string(Dwarf_P_Die die, char *str,
Dwarf_Error *err);
Dwarf_P_Attribute
dwarf_add_AT_const_value_unsignedint(Dwarf_P_Die die,
Dwarf_Unsigned value, Dwarf_Error *err);
πΈ DESCRIPTION πΈ
These functions create a DW_AT_const_value attribute descriptor and attach it to the debugging information entry referenced by argument die.
Argument die should reference a debugging information entry allocated using dwarf_new_die(3). Yes bestie, allocate first, then attach β main character energy only.
Here's the sibling breakdown:
dwarf_add_AT_const_value_signedint()β creates aDW_AT_const_valueattribute descriptor containing the signed value specified by argumentvalue. The created attribute descriptor will have DWARF formDW_FORM_sdata. πdwarf_add_AT_const_value_unsignedint()β creates aDW_AT_const_valueattribute descriptor containing the unsigned value specified by argumentvalue. The created attribute descriptor will have DWARF formDW_FORM_udata. π₯dwarf_add_AT_const_value_string()β creates aDW_AT_const_valueattribute descriptor containing the string pointed to by the NUL-terminated argumentstr. The created attribute descriptor will have DWARF formDW_FORM_strp. π¦
If argument err is not NULL, it will be used by these functions to store error information in case of an error. So like, pass it if you want the tea on what went wrong. β
π«Ά RETURN VALUES π«Ά
On success, these functions return the created attribute descriptor. In case of an error, these functions return DW_DLV_BADADDR and set the argument err. no cap, that's the whole vibe.
π ERRORS π
These functions can fail with:
[DW_DLE_ARGUMENT]β Either of the argumentsdieorstrwasNULL.[DW_DLE_MEMORY]β An out of memory condition was encountered during execution.
π SEE ALSO π
dwarf(3)dwarf_add_AT_name(3)dwarf_add_AT_signed_const(3)dwarf_add_AT_string(3)dwarf_add_AT_unsigned_const(3)dwarf_new_die(3)
sign-off time π this page is from Debian, dated September 4, 2β¦ (the original footer literally cuts off mid-year, bestie π), and the footer name is DWARF_ADD_AT_CONST_VALUE_STRING(3). go off and attach those attributes, queen ππ
π¦ 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