aboutsummaryrefslogtreecommitdiff
path: root/libgcc/config/darwin10-unwind-find-enc-func.c
blob: 882ec3a2372fad23b92900915d29914c553cfc74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "tconfig.h"
#include "tsystem.h"
#include "unwind-dw2-fde.h"
#include "libgcc_tm.h"

void *
_darwin10_Unwind_FindEnclosingFunction (void *pc)
{
  struct dwarf_eh_bases bases;
  const struct dwarf_fde *fde = _Unwind_Find_FDE (pc-1, &bases);
  if (fde)
    return bases.func;
  return NULL;
}