DWARF_FORMFLAG(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

✨ NAME ✨

DWARF_FORMFLAG(3) comes to you from the Library Functions Manual, and the star of the show is dwarf_formflag β€” the function that returns the value of a BOOLEAN class attribute. No cap, it's a whole vibe πŸ’–.

πŸ“š LIBRARY πŸ“š

The DWARF Access Library (libdwarf, -ldwarf) is the library for this page, bestie. 🫢

πŸ› οΈ SYNOPSIS πŸ› οΈ

#include <libdwarf.h>

int
dwarf_formflag(Dwarf_Attribute attr, Dwarf_Bool *ret, Dwarf_Error *err);

πŸ’… DESCRIPTION πŸ’…

Okay so here's the tea: dwarf_formflag() writes 1 into the location that argument ret points to when the attribute referenced by argument attr has a non-zero value. If that attribute does not have a non-zero value, it writes 0 instead. Slay. ✨

The form of argument attr must be one of DW_FORM_flag or DW_FORM_flag_present. Those are the forms allowed here β€” no substitutions, iykyk. πŸ’€

If argument err is not NULL, it will be used to return an error descriptor in case of an error. That's the error-reporting hookup, bestie. πŸŽ€

🌈 RETURN VALUES 🌈

  • On success, dwarf_formflag() returns DW_DLV_OK. βœ…
  • In case of an error, it returns DW_DLV_ERROR and sets argument err. 😭

🚨 ERRORS 🚨

Function dwarf_formflag() may fail with the following errors, bestie β€” keep an eye out:

  • [DW_DLE_ARGUMENT] β€” either of arguments attr or ret was NULL. πŸ™ˆ
  • [DW_DLE_ATTR_FORM_BAD] β€” the attribute referenced by argument attr was not of a permitted kind. πŸ’€

πŸ‘€ SEE ALSO πŸ‘€

Go read these too, they're iconic πŸ‘‘:


Byeee bestie 🫢 This page is from Debian, dated June 21, 2010, and it's the DWARF_FORMFLAG(3) page. Periodt. πŸ’œ

πŸ“¦ where this page comes from