libdwarf: Names DW_TAG_member etc as strings

libdwarf

Loading...
Searching...
No Matches
Functions
Names DW_TAG_member etc as strings

## Functions
DW_API int | dwarf_get_ACCESS_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_ACCESS_name
DW_API int | dwarf_get_ADDR_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_ADDR_name
DW_API int | dwarf_get_AT_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_AT_name
DW_API int | dwarf_get_ATCF_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_AT_name
DW_API int | dwarf_get_ATE_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_ATE_name
DW_API int | dwarf_get_CC_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_CC_name
DW_API int | dwarf_get_CFA_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_CFA_name
DW_API int | dwarf_get_children_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_children_namea - historic misspelling.
DW_API int | dwarf_get_CHILDREN_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_CHILDREN_name
DW_API int | dwarf_get_DEFAULTED_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_DEFAULTED_name
DW_API int | dwarf_get_DS_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_DS_name
DW_API int | dwarf_get_DSC_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_DSC_name
DW_API int | dwarf_get_GNUIKIND_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_GNUIKIND_name - libdwarf invention
DW_API int | dwarf_get_EH_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_EH_name
DW_API int | dwarf_get_END_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_END_name
DW_API int | dwarf_get_FORM_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_FORM_name
DW_API int | dwarf_get_FRAME_name (unsigned int dw_val_in, const char **dw_s_out)
| This is a set of register names.
DW_API int | dwarf_get_GNUIVIS_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_GNUIVIS_name - a libdwarf invention
DW_API int | dwarf_get_ID_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_ID_name
DW_API int | dwarf_get_IDX_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_IDX_name
DW_API int | dwarf_get_INL_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_INL_name
DW_API int | dwarf_get_ISA_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_ISA_name
DW_API int | dwarf_get_LANG_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_LANG_name
DW_API int | dwarf_get_LLE_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_LLE_name
DW_API int | dwarf_get_LLEX_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_LLEX_name - a GNU extension.
DW_API int | dwarf_get_LNAME_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_LNAME
DW_API int | dwarf_get_LNCT_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_LNCT_name
DW_API int | dwarf_get_LNE_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_LNE_name
DW_API int | dwarf_get_LNS_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_LNS_name
DW_API int | dwarf_get_MACINFO_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_MACINFO_name
DW_API int | dwarf_get_MACRO_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_MACRO_name
DW_API int | dwarf_get_OP_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_OP_name
DW_API int | dwarf_get_ORD_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_ORD_name
DW_API int | dwarf_get_RLE_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_RLE_name
DW_API int | dwarf_get_SECT_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_SECT_name
DW_API int | dwarf_get_TAG_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_TAG_name
DW_API int | dwarf_get_UT_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_UT_name
DW_API int | dwarf_get_VIRTUALITY_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_VIRTUALITY_name
DW_API int | dwarf_get_VIS_name (unsigned int dw_val_in, const char **dw_s_out)
| dwarf_get_VIS_name
DW_API int | dwarf_get_FORM_CLASS_name (enum Dwarf_Form_Class dw_fc, const char **dw_s_out)
| dwarf_get_FORM_CLASS_name is for a libdwarf extension. Not defined by the DWARF standard though the concept is defined in the standard. It seemed essential to invent it for libdwarf to report correctly.

## Detailed Description

Given a value you know is one of a particular name category in DWARF2 or later, call the appropriate function and on finding the name it returns DW_DLV_OK and sets the identifier for the value through a pointer. On success these functions return the string corresponding to dw_val_in passed in through the pointer dw_s_out and the value returned is DW_DLV_OK.

The strings returned on sucess are in static storage and must not be freed.

These functions are generated from information in dwarf.h, not hand coded functions.

If DW_DLV_NO_ENTRY is returned the dw_val_in is not known and *s_out is not set. This is unusual.

DW_DLV_ERROR is never returned.

The example referred to offers the suggested way to use functions like these.

See also
  Retrieving tag,attribute,etc names

## Function Documentation

## ◆ dwarf_get_EH_name()

DW_API int dwarf_get_EH_name | ( | unsigned int | dw_val_in,
|  | const char ** | dw_s_out )

dwarf_get_EH_name

So we can report this GNU extension sensibly.

## ◆ dwarf_get_FORM_CLASS_name()

DW_API int dwarf_get_FORM_CLASS_name | ( | enum Dwarf_Form_Class | dw_fc,
|  | const char ** | dw_s_out )

dwarf_get_FORM_CLASS_name is for a libdwarf extension. Not defined by the DWARF standard though the concept is defined in the standard. It seemed essential to invent it for libdwarf to report correctly.

See DWARF5 Table 2.3, Classes of Attribute Value page 23. Earlier DWARF versions have a similar table.

## ◆ dwarf_get_FRAME_name()

DW_API int dwarf_get_FRAME_name | ( | unsigned int | dw_val_in,
|  | const char ** | dw_s_out )

This is a set of register names.

The set of register names is unlikely to match your register set, but perhaps this is better than no name.

## ◆ dwarf_get_GNUIKIND_name()

DW_API int dwarf_get_GNUIKIND_name | ( | unsigned int | dw_val_in,
|  | const char ** | dw_s_out )

dwarf_get_GNUIKIND_name - libdwarf invention

So we can report things GNU extensions sensibly.

## ◆ dwarf_get_GNUIVIS_name()

DW_API int dwarf_get_GNUIVIS_name | ( | unsigned int | dw_val_in,
|  | const char ** | dw_s_out )

dwarf_get_GNUIVIS_name - a libdwarf invention

So we report a GNU extension sensibly.

## ◆ dwarf_get_LLEX_name()

DW_API int dwarf_get_LLEX_name | ( | unsigned int | dw_val_in,
|  | const char ** | dw_s_out )

dwarf_get_LLEX_name - a GNU extension.

The name is a libdwarf invention for the GNU extension. So we report a GNU extension sensibly.

## ◆ dwarf_get_MACINFO_name()

DW_API int dwarf_get_MACINFO_name | ( | unsigned int | dw_val_in,
|  | const char ** | dw_s_out )

dwarf_get_MACINFO_name

Used in DWARF2-DWARF4

## ◆ dwarf_get_MACRO_name()

DW_API int dwarf_get_MACRO_name | ( | unsigned int | dw_val_in,
|  | const char ** | dw_s_out )

dwarf_get_MACRO_name

Used in DWARF5