DWARF_FORMUDATA(3)
okay bestie, welcome to DWARF_FORMUDATA(3) from the Library Functions Manual β this one is all about pulling a constant value out of a DWARF attribute, and it's lowkey iconic. π
β¨ NAME β¨
dwarf_formudata, dwarf_formsdata β return the value of a CONSTANT class attribute
π LIBRARY π
DWARF Access Library (libdwarf, -ldwarf)
π¦ SYNOPSIS π¦
#include <libdwarf.h>
int
dwarf_formudata(Dwarf_Attribute attr, Dwarf_Unsigned *ret,
Dwarf_Error *err);
int
dwarf_formsdata(Dwarf_Attribute attr, Dwarf_Signed *ret,
Dwarf_Error *err);
π DESCRIPTION π
So, these functions return the value associated with a DWARF attribute that describes a constant. Main character behavior, honestly. β¨
dwarf_formudata() sets the location pointed to by argument ret to the value of the attribute referenced by argument attr, treating that value as an unsigned quantity. Argument attr must have one of these forms, no cap:
DW_FORM_data1DW_FORM_data2DW_FORM_data4DW_FORM_data8DW_FORM_udata
dwarf_formsdata() sets the location pointed to by argument ret to the value of the attribute referenced by argument attr, appropriately sign extended. Argument attr must have one of these forms:
DW_FORM_data1DW_FORM_data2DW_FORM_data4DW_FORM_data8DW_FORM_sdata
If argument err is not NULL, it will be used to return an error descriptor in case of an error. Very "keep your receipts" of it all. π§Ύ
π RETURN VALUES π
These functions return DW_DLV_OK on success. In case of an error, they return DW_DLV_ERROR and set argument err. That's the whole vibe check. π«
π ERRORS π
These functions may fail with the following errors:
[DW_DLE_ARGUMENT]β Either of argumentsattrorretwasNULL.[DW_DLE_ATTR_FORM_BAD]β The attribute referenced by argumentattrwas not of a permitted kind.
π SEE ALSO π
dwarf(3), dwarf_attr(3), dwarf_formblock(3), dwarf_formflag(3), dwarf_formref(3), dwarf_formsig8(3), dwarf_formstring(3), dwarf_hasattr(3)
mwah π this lil masterpiece is from Debian, dated June 21, 2010, and its iconic header/footer name is DWARF_FORMUDATA(3) β periodt. π«Ά
π¦ 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) 2010 Joseph Koshy
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms