dwarf_get_form_class(3)

dwarf_get_form_class3

Retrieve the form class of an attribute

Usage

#include <libdwarf.h>

enum Dwarf_Form_Class

dwarf_get_form_class(Dwarf_Half dwversion, Dwarf_Half attr, Dwarf_Half offset_size, Dwarf_Half form);

Library

library “libdwarf”

Overview

Function dwarf_get_form_class() returns the class of the form of a DWARF attribute.

Argument dwversion should specify the version number of DWARF specification to use: 2 for DWARF2, 3 for DWARF3 and 4 for DWARF4.

Argument attr should hold the attribute code of the attribute, i.e., one of the DW_AT_* values defined in ⟨libdwarf.h⟩.

Argument offset_size should hold the size of a DWARF offset for the relevant compilation unit.

Argument form should hold the form code of the attribute.

Return values

On success, function dwarf_get_form_class() returns the form class code, which is one of the DW_FORM_CLASS_* contants defined in header file ⟨libdwarf.h⟩. If the function was not able to determine the form class of the attribute, it returns the special form class code DW_FORM_CLASS_UNKNOWN.

Errors

Function dwarf_get_form_class() does not return an error.

Releases

25 releases since FreeBSD 11.0-RELEASE; the text changed 1 time.

  1. 11.0–12.0
  2. 12.1–16.0

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.