DWARF_HASFORM(3)
π query attribute forms π
okay so you're reading DWARF_HASFORM(3), a Library Functions Manual page from the DWARF Access Library (libdwarf, -ldwarf). It's giving βask questions about attribute formsβ energy, and honestly? iconic. π¦
πΈ NAME πΈ
dwarf_hasform, dwarf_whatform, dwarf_whatform_direct β the little trio for querying attribute forms. π
π LIBRARY π
DWARF Access Library (libdwarf, -ldwarf). π«Ά
β¨ SYNOPSIS β¨
#include <libdwarf.h>
int
dwarf_hasform(Dwarf_Attribute attr, Dwarf_Half form, Dwarf_Bool *ret,
Dwarf_Error *err);
int
dwarf_whatform(Dwarf_Attribute attr, Dwarf_Half *retform,
Dwarf_Error *err);
int
dwarf_whatform_direct(Dwarf_Attribute attr, Dwarf_Half *retform,
Dwarf_Error *err);
π DESCRIPTION π
bestie, here's the tea on each function ββ¨
dwarf_hasform()β this one tells you whether the DWARF attribute passed asattrhas the attribute form specified byform. If it does, the argumentretgets set to a non-zero value; if it doesn't,retgets set to zero. Iferris non-NULL, it'll be used to return an error descriptor in case of an error. πdwarf_whatform()β this sets the location specified byretformto the attribute form code for the DWARF attribute referenced byattr. crucial detail: if the attribute referenced byattrhas an indirect form attribute, this function returns the final form for the attribute. Iferris non-NULL, it'll be used to return an error descriptor in case of an error. πdwarf_whatform_direct()β this also sets the location specified byretformto the attribute form code for the DWARF attribute referenced byattr. but if the form is an indirect form, it sets the location specified byretformtoDW_FORM_indirectinstead. Iferris non-NULL, it'll be used to return an error descriptor in case of an error. π«
π₯ RETURN VALUES π₯
These functions return DW_DLV_OK on success. If something goes wrong, they return DW_DLV_ERR and set argument err. periodt. π
π ERRORS π
These functions may fail with the following errors:
[DW_DLE_ARGUMENT]β any of the argumentsattr,ret, orretformwasNULL. π
π SEE ALSO π
go read dwarf(3), dwarf_attr(3), and dwarf_hasattr(3) too, iykyk π
mwah π β source/version: Debian Β· date: May 22, 2010.
π¦ 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. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms