---
name: "dwarf_highpc_b"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/dwarf_arrayorder"
---

# dwarf\_highpc\_b(3)

retrieve the value of a DWARF attribute

Part of [dwarf\_arrayorder(3)](/dwarf_arrayorder/3.md).

## NAME

**dwarf\_arrayorder**, **dwarf\_bitoffset**, **dwarf\_bitsize**, **dwarf\_bytesize**, **dwarf\_highpc**, **dwarf\_highpc\_b**, **dwarf\_lowpc**, **dwarf\_srclang** – retrieve the value of a DWARF attribute

## LIBRARY

library “libdwarf”

## SYNOPSIS

**#include \<libdwarf.h\>**

*int*\

**dwarf\_arrayorder**(*Dwarf\_Die die*, *Dwarf\_Unsigned \*ret\_order*, *Dwarf\_Error \*err*);

*int*\

**dwarf\_bitoffset**(*Dwarf\_Die die*, *Dwarf\_Unsigned \*ret\_size*, *Dwarf\_Error \*err*);

*int*\

**dwarf\_bitsize**(*Dwarf\_Die die*, *Dwarf\_Unsigned \*ret\_size*, *Dwarf\_Error \*err*);

*int*\

**dwarf\_bytesize**(*Dwarf\_Die die*, *Dwarf\_Unsigned \*ret\_size*, *Dwarf\_Error \*err*);

*int*\

**dwarf\_highpc**(*Dwarf\_Die die*, *Dwarf\_Addr \*ret\_highpc*, *Dwarf\_Error \*err*);

*int*\

**dwarf\_highpc\_b**(*Dwarf\_Die die*, *Dwarf\_Addr \*ret\_highpc*, *Dwarf\_Half \*ret\_form*, *enum Dwarf\_Form\_Class \*ret\_class*, *Dwarf\_Error \*err*);

*int*\

**dwarf\_lowpc**(*Dwarf\_Die die*, *Dwarf\_Addr \*ret\_lowpc*, *Dwarf\_Error \*err*);

*int*\

**dwarf\_srclang**(*Dwarf\_Die die*, *Dwarf\_Unsigned \*ret\_lang*, *Dwarf\_Error \*err*);

## DESCRIPTION

These convenience functions are used to retrieve DWARF attribute values associated with a Debugging Information Entry (DIE) descriptor denoted by argument *die*. These functions store the value of the requested attribute into the location pointed to by their second argument, provided that the requested attribute exists in the debugging information entry.

The list of functions and the DWARF attribute that they retrieve are:

- **dwarf\_arrayorder**()

  Retrieve the DW\_AT\_ordering attribute value.

- **dwarf\_bitoffset**()

  Retrieve the DW\_AT\_bit\_offset attribute value.

- **dwarf\_bitsize**()

  Retrieve the DW\_AT\_bit\_size attribute value.

- **dwarf\_bytesize**()

  Retrieve the DW\_AT\_byte\_size attribute value.

- **dwarf\_highpc**()

  Retrieve the DW\_AT\_high\_pc attribute value.

- **dwarf\_highpc\_b**()

  Retrieve the DW\_AT\_high\_pc attribute value.

- **dwarf\_lowpc**()

  Retrieve the DW\_AT\_low\_pc attribute value.

- **dwarf\_srclang**()

  Retrieve the DW\_AT\_language attribute value.

Function **dwarf\_highpc\_b**() is an enhanced version of function **dwarf\_highpc**(). It sets the location specified by argument *ret\_form* to the form code of the attribute DW\_AT\_high\_pc, and sets the location specified by argument *ret\_class* to the class of that form. A value of NULL may be used for either of the arguments *ret\_form* or *ret\_class* if the caller is not interested in the respective value.

## RETURN VALUES

These functions return DW\_DLV\_OK on success.

If the debugging information entry descriptor denoted by argument *die* does not contain the requested attribute, these functions return DW\_DLV\_NO\_ENTRY and set argument *err*. For other errors, they return DW\_DLV\_ERROR and set argument *err*.

## ERRORS

These functions can fail with the following errors:

- \[DW\_DLE\_ARGUMENT\]

  Arguments *die*, *ret\_highpc*, *ret\_lowpc*, *ret\_size*, *ret\_lang* or *ret\_order* were NULL.

- \[DW\_DLE\_NO\_ENTRY\]

  Argument *die* had no requested attribute.

## SEE ALSO

[dwarf(3)](/dwarf/3.md), [dwarf\_attr(3)](/dwarf_attr/3.md), [dwarf\_attrlist(3)](/dwarf_attrlist/3.md), [dwarf\_get\_form\_class(3)](/dwarf_get_form_class/3.md), [dwarf\_hasattr(3)](/dwarf_hasattr/3.md)
