---
name: "dwarf_get_abbrev_code"
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_get_abbrev_code"
---

# dwarf\_get\_abbrev\_code(3)

retrieve the abbreviation code for an abbreviation

## NAME

**dwarf\_get\_abbrev\_code** – retrieve the abbreviation code for an abbreviation

## LIBRARY

library “libdwarf”

## SYNOPSIS

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

*int*\

**dwarf\_get\_abbrev\_code**(*Dwarf\_Abbrev abbrev*, *Dwarf\_Unsigned \*ret*, *Dwarf\_Error \*err*);

## DESCRIPTION

Function **dwarf\_get\_abbrev\_code**() retrieves the abbreviation code for the abbreviation entry descriptor referenced by argument *abbrev*.

Argument *ret* should point to a location which will hold the returned abbreviation code.

If argument *err* is not NULL, it will be used to store error information in case of an error.

## RETURN VALUES

Function **dwarf\_get\_abbrev\_code**() returns DW\_DLV\_OK when it succeeds. In case of an error, it returns DW\_DLV\_ERROR and sets the argument *err*.

## ERRORS

Function **dwarf\_get\_abbrev\_code**() can fail with:

- \[DW\_DLE\_ARGUMENT\]

  Either of arguments *abbrev* or *ret* was NULL.

## SEE ALSO

[dwarf(3)](/dwarf/3.md), [dwarf\_get\_abbrev(3)](/dwarf_get_abbrev/3.md), [dwarf\_get\_abbrev\_children\_flag(3)](/dwarf_get_abbrev_children_flag/3.md), [dwarf\_get\_abbrev\_entry(3)](/dwarf_get_abbrev_entry/3.md), [dwarf\_get\_abbrev\_tag(3)](/dwarf_get_abbrev_tag/3.md)
