---
name: "dwarf_errmsg"
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_errmsg"
---

# dwarf\_errmsg(3)

retrieve a human-readable string corresponding to a Dwarf\_Error instance

## NAME

**dwarf\_errmsg** – retrieve a human-readable string corresponding to a *Dwarf\_Error* instance

## LIBRARY

library “libdwarf”

## SYNOPSIS

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

*const char \**\

**dwarf\_errmsg**(*Dwarf\_Error err*);

## DESCRIPTION

Function **dwarf\_errmsg**() returns aNUL- terminated string for the error denoted by argument *err*.

Argument *err* should be a valid handle to a *Dwarf\_Error* instance.

## Memory Management

The returned pointer should not be freed using [free(3)](/free/3.md) or [dwarf\_dealloc(3)](/dwarf_dealloc/3.md).

## RETURN VALUES

Function **dwarf\_errmsg**() returns a pointer to aNUL- terminated string.

## SEE ALSO

[dwarf(3)](/dwarf/3.md), [dwarf\_errno(3)](/dwarf_errno/3.md)
