---
name: "dwarf_get_fde_n"
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_fde_n"
---

# dwarf\_get\_fde\_n(3)

retrieve FDE descriptor

## NAME

**dwarf\_get\_fde\_n** – retrieve FDE descriptor

## LIBRARY

library “libdwarf”

## SYNOPSIS

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

*int*\

**dwarf\_get\_fde\_n**(*Dwarf\_Fde \*fdelist*, *Dwarf\_Unsigned fde\_index*, *Dwarf\_Fde \*ret\_fde*, *Dwarf\_Error \*err*);

## DESCRIPTION

Function **dwarf\_get\_fde\_n**() retrieves an FDE descriptor from an array of FDE descriptors.

Argument *fdelist* should point to an array of FDE descriptors, as returned by the functions [dwarf\_get\_fde\_list(3)](/dwarf_get_fde_list/3.md) or [dwarf\_get\_fde\_list\_eh(3)](/dwarf_get_fde_list_eh/3.md).

Argument *fde\_index* specifies the 0-based index of the desired FDE descriptor.

Argument *ret\_fde* should point to a location that will hold the returned FDE descriptor.

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

## RETURN VALUES

Function **dwarf\_get\_fde\_n**() returns DW\_DLV\_OK when it succeeds. It returns DW\_DLV\_NO\_ENTRY if the FDE descriptor index specified by argument *fde\_index* is out of range. In case of an error, it returns DW\_DLV\_ERROR and sets the argument *err*.

## ERRORS

Function **dwarf\_get\_fde\_n**() can fail with:

- \[DW\_DLE\_ARGUMENT\]

  Either of the arguments *fdelist* or *ret\_fde* was NULL.

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

  The FDE descriptor index specified by argument *fde\_index* was out of range.

## SEE ALSO

[dwarf(3)](/dwarf/3.md), [dwarf\_get\_cie\_of\_fde(3)](/dwarf_get_cie_of_fde/3.md), [dwarf\_get\_fde\_at\_pc(3)](/dwarf_get_fde_at_pc/3.md), [dwarf\_get\_fde\_info\_for\_all\_regs(3)](/dwarf_get_fde_info_for_all_regs/3.md), [dwarf\_get\_fde\_info\_for\_all\_regs3(3)](/dwarf_get_fde_info_for_all_regs3/3.md), [dwarf\_get\_fde\_info\_for\_cfa\_reg3(3)](/dwarf_get_fde_info_for_cfa_reg3/3.md), [dwarf\_get\_fde\_info\_for\_reg(3)](/dwarf_get_fde_info_for_reg/3.md), [dwarf\_get\_fde\_info\_for\_reg3(3)](/dwarf_get_fde_info_for_reg3/3.md), [dwarf\_get\_fde\_instr\_bytes(3)](/dwarf_get_fde_instr_bytes/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), [dwarf\_get\_fde\_range(3)](/dwarf_get_fde_range/3.md)
