---
name: "dwarf_diename"
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_diename"
---

# dwarf\_diename(3)

retrieve the name associated with a debugging information entry

## NAME

**dwarf\_diename** – retrieve the name associated with a debugging information entry

## LIBRARY

library “libdwarf”

## SYNOPSIS

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

*int*\

**dwarf\_diename**(*Dwarf\_Die die*, *char \*\*ret\_name*, *Dwarf\_Error \*err*);

## DESCRIPTION

Function **dwarf\_diename**() retrieves a pointer to the NUL-terminated string associated with the DW\_AT\_name attribute of the debugging information entry descriptor referenced by argument *die*. If the pointer was successfully retrieved, it is stored in the location pointed to by argument *ret\_name*.

## RETURN VALUES

Function **dwarf\_diename**() returns DW\_DLV\_OK on success.

If the debugging information entry descriptor denoted by argument *die* does not contain a DW\_AT\_name attribute, the function returns DW\_DLV\_NO\_ENTRY and sets argument *err*. For other errors, it returns DW\_DLV\_ERROR and sets argument *err*.

## ERRORS

Function **dwarf\_diename**() can fail with the following errors:

- \[DW\_DLE\_ARGUMENT\]

  Either of arguments *die* or *ret\_name* was NULL.

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

  Argument *die* had no DW\_AT\_name attribute.

## SEE ALSO

[dwarf(3)](/dwarf/3.md), [dwarf\_die\_abbrev\_code(3)](/dwarf_die_abbrev_code/3.md), [dwarf\_dieoffset(3)](/dwarf_dieoffset/3.md), [dwarf\_tag(3)](/dwarf_tag/3.md)
