---
name: "dwarf_get_cie_index"
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_cie_index"
---

# dwarf\_get\_cie\_index(3)

retrieve the index of a CIE descriptor

## NAME

**dwarf\_get\_cie\_index** – retrieve the index of a CIE descriptor

## LIBRARY

library “libdwarf”

## SYNOPSIS

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

*int*\

**dwarf\_get\_cie\_index**(*Dwarf\_Cie cie*, *Dwarf\_Signed \*cie\_index*, *Dwarf\_Error \*err*);

## DESCRIPTION

Function **dwarf\_get\_cie\_index**() retrieves the zero-based index of a given CIE descriptor in the array of CIE descriptors returned by the functions [dwarf\_get\_fde\_list(3)](/dwarf_get_fde_list/3.md) and [dwarf\_get\_fde\_list\_eh(3)](/dwarf_get_fde_list_eh/3.md).

Argument *cie* should reference a valid DWARF CIE descriptor.

Argument *cie\_index* should point to a location that will hold the returned index.

## RETURN VALUES

Function **dwarf\_get\_cie\_index**() 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\_cie\_index**() can fail with:

- \[DW\_DLE\_ARGUMENT\]

  Either of arugments *cie* or *cie\_index* was NULL.

## SEE ALSO

[dwarf(3)](/dwarf/3.md), [dwarf\_get\_cie\_info(3)](/dwarf_get_cie_info/3.md), [dwarf\_get\_cie\_of\_fde(3)](/dwarf_get_cie_of_fde/3.md), [dwarf\_get\_fde\_list(3)](/dwarf_get_fde_list/3.md), [dwarf\_get\_fde\_list\_eh(3)](/dwarf_get_fde_list_eh/3.md)
