---
name: "dwarf_get_fde_at_pc"
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_at_pc"
---

# dwarf\_get\_fde\_at\_pc(3)

retrieve the FDE descriptor for an address

## NAME

**dwarf\_get\_fde\_at\_pc** – retrieve the FDE descriptor for an address

## LIBRARY

library “libdwarf”

## SYNOPSIS

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

*int*\

**dwarf\_get\_fde\_at\_pc**(*Dwarf\_Fde \*fdelist*, *Dwarf\_Addr pc*, *Dwarf\_Fde \*ret\_fde*, *Dwarf\_Addr \*lopc*, *Dwarf\_Addr \*hipc*, *Dwarf\_Error \*err*);

## DESCRIPTION

Function **dwarf\_get\_fde\_at\_pc**() searches the provided array of DWARF FDE descriptors for a descriptor covering a given program counter address.

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 *pc* should contain the program counter address being looked up.

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

Argument *lopc* should point to a location that will be set to the lowest address covered by the returned FDE descriptor.

Argument *hipc* should point to a location that will be set to the highest address covered by 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\_at\_pc**() returns DW\_DLV\_OK when it succeeds. It returns DW\_DLV\_NO\_ENTRY if a FDE descriptor that covers the address specified by argument *pc* is not found. In case of an error, it returns DW\_DLV\_ERROR and sets the argument *err*.

## ERRORS

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

- \[DW\_DLE\_ARGUMENT\]

  One of the arguments *fdelist*, *ret\_fde*, *lopc*, or *hipc* was NULL.

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

  These was no FDE descriptor covering the address specified by argument *pc*.

## SEE ALSO

[dwarf(3)](/dwarf/3.md), [dwarf\_get\_cie\_of\_fde(3)](/dwarf_get_cie_of_fde/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\_n(3)](/dwarf_get_fde_n/3.md), [dwarf\_get\_fde\_range(3)](/dwarf_get_fde_range/3.md)
