libdwarf: DIE Attribute and Attribute-Form Details

libdwarf

Loading...
Searching...
No Matches
Functions
DIE Attribute and Attribute-Form Details

## Functions
DW_API int | dwarf_attrlist (Dwarf_Die dw_die, Dwarf_Attribute **dw_attrbuf, Dwarf_Signed *dw_attrcount, Dwarf_Error *dw_error)
| Gets the full list of attributes.
DW_API int | dwarf_hasform (Dwarf_Attribute dw_attr, Dwarf_Half dw_form, Dwarf_Bool *dw_returned_bool, Dwarf_Error *dw_error)
| Sets TRUE if a Dwarf_Attribute has the indicated FORM.
DW_API int | dwarf_whatform (Dwarf_Attribute dw_attr, Dwarf_Half *dw_returned_final_form, Dwarf_Error *dw_error)
| Return the form of the Dwarf_Attribute.
DW_API int | dwarf_whatform_direct (Dwarf_Attribute dw_attr, Dwarf_Half *dw_returned_initial_form, Dwarf_Error *dw_error)
| Return the initial form of the Dwarf_Attribute.
DW_API int | dwarf_whatattr (Dwarf_Attribute dw_attr, Dwarf_Half *dw_returned_attrnum, Dwarf_Error *dw_error)
| Return the attribute number of the Dwarf_Attribute.
DW_API int | dwarf_formref (Dwarf_Attribute dw_attr, Dwarf_Off *dw_return_offset, Dwarf_Bool *dw_is_info, Dwarf_Error *dw_error)
| Retrieve the CU-relative offset of a reference.
DW_API int | dwarf_global_formref_b (Dwarf_Attribute dw_attr, Dwarf_Off *dw_return_offset, Dwarf_Bool *dw_offset_is_info, Dwarf_Error *dw_error)
| Return the section-relative offset of a Dwarf_Attribute.
DW_API int | dwarf_global_formref (Dwarf_Attribute dw_attr, Dwarf_Off *dw_return_offset, Dwarf_Error *dw_error)
| Same as dwarf_global_formref_b except...
DW_API int | dwarf_formsig8 (Dwarf_Attribute dw_attr, Dwarf_Sig8 *dw_returned_sig_bytes, Dwarf_Error *dw_error)
| Return an 8 byte reference form for DW_FORM_ref_sig8.
DW_API int | dwarf_formsig8_const (Dwarf_Attribute dw_attr, Dwarf_Sig8 *dw_returned_sig_bytes, Dwarf_Error *dw_error)
| Return an 8 byte reference form for DW_FORM_data8.
DW_API int | dwarf_formaddr (Dwarf_Attribute dw_attr, Dwarf_Addr *dw_returned_addr, Dwarf_Error *dw_error)
| Return the address when the attribute has form address.
DW_API int | dwarf_get_debug_addr_index (Dwarf_Attribute dw_attr, Dwarf_Unsigned *dw_return_index, Dwarf_Error *dw_error)
| Get the addr index of a Dwarf_Attribute.
DW_API int | dwarf_formflag (Dwarf_Attribute dw_attr, Dwarf_Bool *dw_returned_bool, Dwarf_Error *dw_error)
| Return the flag value of a flag form.
DW_API int | dwarf_formudata (Dwarf_Attribute dw_attr, Dwarf_Unsigned *dw_returned_val, Dwarf_Error *dw_error)
| Return an unsigned value.
DW_API int | dwarf_formsdata (Dwarf_Attribute dw_attr, Dwarf_Signed *dw_returned_val, Dwarf_Error *dw_error)
| Return a signed value.
DW_API int | dwarf_formdata16 (Dwarf_Attribute dw_attr, Dwarf_Form_Data16 *dw_returned_val, Dwarf_Error *dw_error)
| Return a 16 byte Dwarf_Form_Data16 value.
DW_API int | dwarf_formblock (Dwarf_Attribute dw_attr, Dwarf_Block **dw_returned_block, Dwarf_Error *dw_error)
| Return an allocated filled-in Form_Block.
DW_API int | dwarf_formstring (Dwarf_Attribute dw_attr, char **dw_returned_string, Dwarf_Error *dw_error)
| Return a pointer to a string.
DW_API int | dwarf_get_debug_str_index (Dwarf_Attribute dw_attr, Dwarf_Unsigned *dw_return_index, Dwarf_Error *dw_error)
| Return a string index.
DW_API int | dwarf_formexprloc (Dwarf_Attribute dw_attr, Dwarf_Unsigned *dw_return_exprlen, Dwarf_Ptr *dw_block_ptr, Dwarf_Error *dw_error)
| Return a pointer-to and length-of a block of data.
DW_API enum Dwarf_Form_Class | dwarf_get_form_class (Dwarf_Half dw_version, Dwarf_Half dw_attrnum, Dwarf_Half dw_offset_size, Dwarf_Half dw_form)
| Return the FORM_CLASS applicable. Four pieces of information are necessary to get the correct FORM_CLASS.
DW_API int | dwarf_attr_offset (Dwarf_Die dw_die, Dwarf_Attribute dw_attr, Dwarf_Off *dw_return_offset, Dwarf_Error *dw_error)
| Return the offset of an attribute in its section.
DW_API int | dwarf_uncompress_integer_block_a (Dwarf_Debug dw_dbg, Dwarf_Unsigned dw_input_length_in_bytes, void *dw_input_block, Dwarf_Unsigned *dw_value_count, Dwarf_Signed **dw_value_array, Dwarf_Error *dw_error)
| Uncompress a block of sleb numbers It's not much of a compression so not much of an uncompression. Developed by Sun Microsystems and it is unclear if it was ever used.
DW_API void | dwarf_dealloc_uncompressed_block (Dwarf_Debug dw_dbg, void *dw_value_array)
| Dealloc what dwarf_uncompress_integer_block_a allocated.
DW_API int | dwarf_convert_to_global_offset (Dwarf_Attribute dw_attr, Dwarf_Off dw_offset, Dwarf_Off *dw_return_offset, Dwarf_Error *dw_error)
| Convert local offset to global offset.
DW_API void | dwarf_dealloc_attribute (Dwarf_Attribute dw_attr)
| Dealloc a Dwarf_Attribute When this call returns the dw_attr is a stale pointer.
DW_API int | dwarf_discr_list (Dwarf_Debug dw_dbg, Dwarf_Small *dw_blockpointer, Dwarf_Unsigned dw_blocklen, Dwarf_Dsc_Head *dw_dsc_head_out, Dwarf_Unsigned *dw_dsc_array_length_out, Dwarf_Error *dw_error)
| Return an array of discriminant values.
DW_API int | dwarf_discr_entry_u (Dwarf_Dsc_Head dw_dsc, Dwarf_Unsigned dw_entrynum, Dwarf_Half *dw_out_type, Dwarf_Unsigned *dw_out_discr_low, Dwarf_Unsigned *dw_out_discr_high, Dwarf_Error *dw_error)
| Access a single unsigned discriminant list entry.
DW_API int | dwarf_discr_entry_s (Dwarf_Dsc_Head dw_dsc, Dwarf_Unsigned dw_entrynum, Dwarf_Half *dw_out_type, Dwarf_Signed *dw_out_discr_low, Dwarf_Signed *dw_out_discr_high, Dwarf_Error *dw_error)
| Access to a single signed discriminant list entry.

## Detailed Description

Access to the details of DIEs

## Function Documentation

## ◆ dwarf_attr_offset()

DW_API int dwarf_attr_offset | ( | Dwarf_Die | dw_die,
|  | Dwarf_Attribute | dw_attr,
|  | Dwarf_Off * | dw_return_offset,
|  | Dwarf_Error * | dw_error )

Return the offset of an attribute in its section.

Parameters

  dw_die | The DIE of interest.
  dw_attr | A Dwarf_Attribute of interest in this DIE
  dw_return_offset | The offset is in .debug_info if the DIE is there. The offset is in .debug_types if the DIE is there.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. DW_DLV_NO_ENTRY is impossible.

## ◆ dwarf_attrlist()

DW_API int dwarf_attrlist | ( | Dwarf_Die | dw_die,
|  | Dwarf_Attribute ** | dw_attrbuf,
|  | Dwarf_Signed * | dw_attrcount,
|  | Dwarf_Error * | dw_error )

Gets the full list of attributes.

Parameters

  dw_die | The DIE from which to pull attributes.
  dw_attrbuf | The pointer is set to point to an array of Dwarf_Attribute (pointers to attribute data). This array must eventually be deallocated.
  dw_attrcount | The number of entries in the array of pointers. There is no null-pointer to terminate the list, use this count.
  dw_error | A place to return error details.

Returns
  If it returns DW_DLV_ERROR and dw_error is non-null it creates an Dwarf_Error and places it in this argument. Usually returns DW_DLV_OK.

See also
  Using dwarf_attrlist()
  Using dwarf_attrlist()

## ◆ dwarf_convert_to_global_offset()

DW_API int dwarf_convert_to_global_offset | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Off | dw_offset,
|  | Dwarf_Off * | dw_return_offset,
|  | Dwarf_Error * | dw_error )

Convert local offset to global offset.

Uses the DW_FORM of the attribute to determine if the dw_offset is local, and if so, adds the CU base offset to adjust dw_offset.

Parameters

  dw_attr | The attribute the local offset was extracted from.
  dw_offset | The global offset of the attribute.
  dw_return_offset | The returned section (global) offset.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. Returns DW_DLV_ERROR if the dw_attr form is not an offset form (for example, DW_FORM_ref_udata).

## ◆ dwarf_dealloc_attribute()

DW_API void dwarf_dealloc_attribute | ( | Dwarf_Attribute | dw_attr | ) |

Dealloc a Dwarf_Attribute When this call returns the dw_attr is a stale pointer.

Parameters

  dw_attr | The attribute to dealloc.

## ◆ dwarf_dealloc_uncompressed_block()

DW_API void dwarf_dealloc_uncompressed_block | ( | Dwarf_Debug | dw_dbg,
|  | void * | dw_value_array )

Dealloc what dwarf_uncompress_integer_block_a allocated.

Parameters

  dw_dbg | The Dwarf_Debug of interest
  dw_value_array | The array was called an array of Dwarf_Signed. We dealloc all of it without needing dw_value_count.

## ◆ dwarf_discr_entry_s()

DW_API int dwarf_discr_entry_s | ( | Dwarf_Dsc_Head | dw_dsc,
|  | Dwarf_Unsigned | dw_entrynum,
|  | Dwarf_Half * | dw_out_type,
|  | Dwarf_Signed * | dw_out_discr_low,
|  | Dwarf_Signed * | dw_out_discr_high,
|  | Dwarf_Error * | dw_error )

Access to a single signed discriminant list entry.

The same as dwarf_discr_entry_u except here the values are signed.

## ◆ dwarf_discr_entry_u()

DW_API int dwarf_discr_entry_u | ( | Dwarf_Dsc_Head | dw_dsc,
|  | Dwarf_Unsigned | dw_entrynum,
|  | Dwarf_Half * | dw_out_type,
|  | Dwarf_Unsigned * | dw_out_discr_low,
|  | Dwarf_Unsigned * | dw_out_discr_high,
|  | Dwarf_Error * | dw_error )

Access a single unsigned discriminant list entry.

It is up to the caller to know whether the discriminant values are signed or unsigned (therefore to know whether this or dwarf_discr_entry_s. should be called)

Parameters

  dw_dsc | The Dwarf_Dsc_Head applicable.
  dw_entrynum | Valid values are zero to dw_dsc_array_length_out-1
  dw_out_type | On success is set to either DW_DSC_label or DW_DSC_range through the pointer.
  dw_out_discr_low | On success set to the lowest in this discriminant range
  dw_out_discr_high | On success set to the highest in this discriminant range
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds.

## ◆ dwarf_discr_list()

DW_API int dwarf_discr_list | ( | Dwarf_Debug | dw_dbg,
|  | Dwarf_Small * | dw_blockpointer,
|  | Dwarf_Unsigned | dw_blocklen,
|  | Dwarf_Dsc_Head * | dw_dsc_head_out,
|  | Dwarf_Unsigned * | dw_dsc_array_length_out,
|  | Dwarf_Error * | dw_error )

Return an array of discriminant values.

This applies if a DW_TAG_variant has one of the DW_FORM_block forms.

See also
  dwarf_formblock

For an example of use and dealloc:

See also
  Using dwarf_discr_list()

Parameters

  dw_dbg | The applicable Dwarf_Debug
  dw_blockpointer | The bl_data value from a Dwarf_Block.
  dw_blocklen | The bl_len value from a Dwarf_Block.
  dw_dsc_head_out | On success returns a pointer to an array of discriminant values in an opaque struct.
  dw_dsc_array_length_out | On success returns the number of entries in the dw_dsc_head_out array.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds.

## ◆ dwarf_formaddr()

DW_API int dwarf_formaddr | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Addr * | dw_returned_addr,
|  | Dwarf_Error * | dw_error )

Return the address when the attribute has form address.

There are several address forms, some of them indexed.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_addr | On success this set through the pointer to the address in the attribute.
  dw_error | A place to return error details.

Returns
  On success returns DW_DLV_OK sets dw_returned_addr . If attribute is passed in NULL or the attribute is badly broken or the address cannot be retrieved the call returns DW_DLV_ERROR. Never returns DW_DLV_NO_ENTRY.

## ◆ dwarf_formblock()

DW_API int dwarf_formblock | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Block ** | dw_returned_block,
|  | Dwarf_Error * | dw_error )

Return an allocated filled-in Form_Block.

It is an error if the DW_FORM in the attribute is not a block form. DW_FORM_block2 is an example of a block form.

See also
  Dwarf_Block
  Using dwarf_discr_list()

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_block | Allocates a Dwarf_Block and returns a pointer to the filled-in block.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. Never returns DW_DLV_NO_ENTRY.

## ◆ dwarf_formdata16()

DW_API int dwarf_formdata16 | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Form_Data16 * | dw_returned_val,
|  | Dwarf_Error * | dw_error )

Return a 16 byte Dwarf_Form_Data16 value.

We just store the bytes in a struct, we have no 16 byte integer type. It is an error if the FORM is not DW_FORM_data16

See also
  Dwarf_Form_Data16

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_val | Copies the 16 byte value into the pointed to area.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. Never returns DW_DLV_NO_ENTRY.

## ◆ dwarf_formexprloc()

DW_API int dwarf_formexprloc | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Unsigned * | dw_return_exprlen,
|  | Dwarf_Ptr * | dw_block_ptr,
|  | Dwarf_Error * | dw_error )

Return a pointer-to and length-of a block of data.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_return_exprlen | Returns the length in bytes of the block if it succeeds.
  dw_block_ptr | Returns a pointer to the first byte of the block of data if it succeeds.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. If the attribute form is not DW_FORM_exprloc it returns DW_DLV_ERROR and sets dw_error to point to the error details.

## ◆ dwarf_formflag()

DW_API int dwarf_formflag | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Bool * | dw_returned_bool,
|  | Dwarf_Error * | dw_error )

Return the flag value of a flag form.

It is an error if the FORM is not a flag form.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_bool | Returns either TRUE or FALSE through the pointer.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. Never returns DW_DLV_NO_ENTRY.

## ◆ dwarf_formref()

DW_API int dwarf_formref | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Off * | dw_return_offset,
|  | Dwarf_Bool * | dw_is_info,
|  | Dwarf_Error * | dw_error )

Retrieve the CU-relative offset of a reference.

The DW_FORM of the attribute must be one of a small set of local reference forms: DW_FORM_ref<n> or DW_FORM_udata.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_return_offset | Returns the CU-relative offset through the pointer.
  dw_is_info | Returns a flag through the pointer. TRUE if the offset is in .debug_info, FALSE if it is in .debug_types
  dw_error | A place to return error details.

Returns
  Returns DW_DLV_OK and sets dw_returned_attrnum If attribute is passed in NULL or the attribute is badly broken or the FORM of this attribute is not one of the small set of local references the call returns DW_DLV_ERROR. Never returns DW_DLV_NO_ENTRY;

## ◆ dwarf_formsdata()

DW_API int dwarf_formsdata | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Signed * | dw_returned_val,
|  | Dwarf_Error * | dw_error )

Return a signed value.

The form must be a signed integral type. It is an error otherwise.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_val | On success returns the signed value through the pointer.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. Never returns DW_DLV_NO_ENTRY.

## ◆ dwarf_formsig8()

DW_API int dwarf_formsig8 | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Sig8 * | dw_returned_sig_bytes,
|  | Dwarf_Error * | dw_error )

Return an 8 byte reference form for DW_FORM_ref_sig8.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_sig_bytes | On success returns DW_DLV_OK and copies the 8 bytes into dw_returned_sig_bytes.
  dw_error | A place to return error details.

Returns
  On success returns DW_DLV_OK and copies the 8 bytes into dw_returned_sig_bytes. If attribute is passed in NULL or the attribute is badly broken the call returns DW_DLV_ERROR. If the dw_attr has a form other than DW_FORM_ref_sig8 the function returns DW_DLV_NO_ENTRY

## ◆ dwarf_formsig8_const()

DW_API int dwarf_formsig8_const | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Sig8 * | dw_returned_sig_bytes,
|  | Dwarf_Error * | dw_error )

Return an 8 byte reference form for DW_FORM_data8.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_sig_bytes | On success Returns DW_DLV_OK and copies the 8 bytes into dw_returned_sig_bytes.
  dw_error | A place to return error details.

Returns
  On success returns DW_DLV_OK and copies the 8 bytes into dw_returned_sig_bytes. If attribute is passed in NULL or the attribute is badly broken the call returns DW_DLV_ERROR. If the dw_attr has a form other than DW_FORM_data8 the function returns DW_DLV_NO_ENTRY

## ◆ dwarf_formstring()

DW_API int dwarf_formstring | ( | Dwarf_Attribute | dw_attr,
|  | char ** | dw_returned_string,
|  | Dwarf_Error * | dw_error )

Return a pointer to a string.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_string | On success puts a pointer to a string existing in an appropriate DWARF section into dw_returned_string. Never free() or dealloc the returned string.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds.

## ◆ dwarf_formudata()

DW_API int dwarf_formudata | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Unsigned * | dw_returned_val,
|  | Dwarf_Error * | dw_error )

Return an unsigned value.

The form can be an unsigned or signed integral type but if it is a signed type the value must be non-negative. It is an error otherwise.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_val | On success returns the unsigned value through the pointer.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. Never returns DW_DLV_NO_ENTRY.

## ◆ dwarf_get_debug_addr_index()

DW_API int dwarf_get_debug_addr_index | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Unsigned * | dw_return_index,
|  | Dwarf_Error * | dw_error )

Get the addr index of a Dwarf_Attribute.

So a consumer can get the index when the object with the actual .debug_addr section is elsewhere (Debug Fission). Or if the caller just wants the index. Only call it when you know it should does have an index address FORM such as DW_FORM_addrx1 or one of the GNU address index forms.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_return_index | If successful it returns the index through the pointer.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. Never returns DW_DLV_NO_ENTRY.

## ◆ dwarf_get_debug_str_index()

DW_API int dwarf_get_debug_str_index | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Unsigned * | dw_return_index,
|  | Dwarf_Error * | dw_error )

Return a string index.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_return_index | If the form is a string index form (for example DW_FORM_strx) the string index value is returned via the pointer.
  dw_error | The usual error pointer.

Returns
  DW_DLV_OK if it succeeds. If the attribute form is not one of the string index forms it returns DW_DLV_ERROR and sets dw_error to point to the error details.

## ◆ dwarf_get_form_class()

DW_API enum Dwarf_Form_Class dwarf_get_form_class | ( | Dwarf_Half | dw_version,
|  | Dwarf_Half | dw_attrnum,
|  | Dwarf_Half | dw_offset_size,
|  | Dwarf_Half | dw_form )

Return the FORM_CLASS applicable. Four pieces of information are necessary to get the correct FORM_CLASS.

Parameters

  dw_version | The CU's DWARF version. Standard numbers are 2,3,4, or 5.
  dw_attrnum | For example DW_AT_name
  dw_offset_size | The offset size applicable to the compilation unit relevant to the attribute and form.
  dw_form | The FORM number, for example DW_FORM_data4

Returns
  Returns a form class, for example DW_FORM_CLASS_CONSTANT. The FORM_CLASS names are mentioned (for example as 'address' in Table 2.3 of DWARF5) but are not assigned formal names & numbers in the standard.

## ◆ dwarf_global_formref()

DW_API int dwarf_global_formref | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Off * | dw_return_offset,
|  | Dwarf_Error * | dw_error )

Same as dwarf_global_formref_b except...

See also
  dwarf_global_formref_b

This is the same, except there is no dw_offset_is_info pointer so in the case of DWARF4 and DW_FORM_ref_sig8 it is not possible to determine which section the offset applies to!

## ◆ dwarf_global_formref_b()

DW_API int dwarf_global_formref_b | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Off * | dw_return_offset,
|  | Dwarf_Bool * | dw_offset_is_info,
|  | Dwarf_Error * | dw_error )

Return the section-relative offset of a Dwarf_Attribute.

The target section of the returned offset can be in various sections depending on the FORM. Only a DW_FORM_ref_sig8 can change the returned offset of a .debug_info DIE via a lookup into .debug_types by changing dw_offset_is_info to FALSE (DWARF4).

The caller must determine the target section from the FORM.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_return_offset | Returns the CU-relative offset through the pointer.
  dw_offset_is_info | For references to DIEs this informs whether the target DIE (the target the offset refers to) is in .debug_info or .debug_types. For non-DIE targets this field is not meaningful. Refer to the attribute FORM to determine the target section of the offset.
  dw_error | A place to return error details.

Returns
  Returns DW_DLV_OK and sets dw_return_offset and dw_offset_is_info. If attribute is passed in NULL or the attribute is badly broken or the FORM of this attribute is not one of the many reference types the call returns DW_DLV_ERROR. Never returns DW_DLV_NO_ENTRY;

## ◆ dwarf_hasform()

DW_API int dwarf_hasform | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Half | dw_form,
|  | Dwarf_Bool * | dw_returned_bool,
|  | Dwarf_Error * | dw_error )

Sets TRUE if a Dwarf_Attribute has the indicated FORM.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_form | The DW_FORM you are asking about, DW_FORM_strp for example.
  dw_returned_bool | The pointer passed in must be a valid non-null pointer to a Dwarf_Bool. On success, sets the value to TRUE or FALSE.
  dw_error | A place to return error details.

Returns
  Returns DW_DLV_OK and sets dw_returned_bool. If attribute is passed in NULL or the attribute is badly broken the call returns DW_DLV_ERROR. Never returns DW_DLV_NO_ENTRY;

## ◆ dwarf_uncompress_integer_block_a()

DW_API int dwarf_uncompress_integer_block_a | ( | Dwarf_Debug | dw_dbg,
|  | Dwarf_Unsigned | dw_input_length_in_bytes,
|  | void * | dw_input_block,
|  | Dwarf_Unsigned * | dw_value_count,
|  | Dwarf_Signed ** | dw_value_array,
|  | Dwarf_Error * | dw_error )

Uncompress a block of sleb numbers It's not much of a compression so not much of an uncompression. Developed by Sun Microsystems and it is unclear if it was ever used.

See also
  dwarf_dealloc_uncompressed_block

## ◆ dwarf_whatattr()

DW_API int dwarf_whatattr | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Half * | dw_returned_attrnum,
|  | Dwarf_Error * | dw_error )

Return the attribute number of the Dwarf_Attribute.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_attrnum | The attribute number of the attribute is returned through the pointer. For example, DW_AT_name
  dw_error | A place to return error details.

Returns
  Returns DW_DLV_OK and sets dw_returned_attrnum If attribute is passed in NULL or the attribute is badly broken the call returns DW_DLV_ERROR. Never returns DW_DLV_NO_ENTRY;

## ◆ dwarf_whatform()

DW_API int dwarf_whatform | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Half * | dw_returned_final_form,
|  | Dwarf_Error * | dw_error )

Return the form of the Dwarf_Attribute.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_final_form | The form of the item is returned through the pointer. If the base form is DW_FORM_indirect the function resolves the final form and returns that final form.
  dw_error | A place to return error details.

Returns
  Returns DW_DLV_OK and sets dw_returned_final_form If attribute is passed in NULL or the attribute is badly broken the call returns DW_DLV_ERROR. Never returns DW_DLV_NO_ENTRY;

## ◆ dwarf_whatform_direct()

DW_API int dwarf_whatform_direct | ( | Dwarf_Attribute | dw_attr,
|  | Dwarf_Half * | dw_returned_initial_form,
|  | Dwarf_Error * | dw_error )

Return the initial form of the Dwarf_Attribute.

Parameters

  dw_attr | The Dwarf_Attribute of interest.
  dw_returned_initial_form | The form of the item is returned through the pointer. If the base form is DW_FORM_indirect the value set is DW_FORM_indirect.
  dw_error | A place to return error details.

Returns
  Returns DW_DLV_OK and sets dw_returned_initial_form. If attribute is passed in NULL or the attribute is badly broken the call returns DW_DLV_ERROR. Never returns DW_DLV_NO_ENTRY;