diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1847505ca960a2e9a6026230da68b89501a177cc..dd51dfd8b3c93304622a0156a37ebce55177fca2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2002-11-25  Andrew Haley  <aph@redhat.com>
+
+        * libgcc-std.ver (_Unwind_Find_Enclosing_Function): Add.
+        * config/ia64/unwind-ia64.c (_Unwind_Find_Enclosing_Function): New.
+        * unwind-sjlj.c (_Unwind_Find_Enclosing_Function): Likewise.
+        * unwind-dw2.c (_Unwind_Find_Enclosing_Function): Likewise.
+
 2002-11-24  Kazu Hirata  <kazu@cs.umass.edu>
 
 	* config/h8300/h8300.c (h8300_init_once): Fix a typo in the
diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c
index e55f1f8c363969f40bbecb6178fd1b011b2f4cbf..eba9df0b66d4af56515bfca4607c535d9bd10148 100644
--- a/gcc/config/ia64/unwind-ia64.c
+++ b/gcc/config/ia64/unwind-ia64.c
@@ -1642,6 +1642,12 @@ _Unwind_GetRegionStart (struct _Unwind_Context *context)
   return context->region_start;
 }
 
+void *
+_Unwind_Find_Enclosing_Function (void *pc)
+{
+  return NULL;
+}
+
 
 static _Unwind_Reason_Code
 uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs)
diff --git a/gcc/libgcc-std.ver b/gcc/libgcc-std.ver
index 6bc4221329131126f1586365bf43c93c254d0763..d448567f822d41bfe70034674b28d2594d524357 100644
--- a/gcc/libgcc-std.ver
+++ b/gcc/libgcc-std.ver
@@ -158,6 +158,7 @@ GCC_3.0 {
   _Unwind_Resume
   _Unwind_SetGR
   _Unwind_SetIP
+  _Unwind_Find_Enclosing_Function
   __deregister_frame
   __deregister_frame_info
   __deregister_frame_info_bases
diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c
index fd7db6adc6722e062945981d080199ec88e33f88..41db09248a712c61db1e8a8526d4f4c3d783f4a4 100644
--- a/gcc/unwind-dw2.c
+++ b/gcc/unwind-dw2.c
@@ -202,6 +202,17 @@ _Unwind_GetRegionStart (struct _Unwind_Context *context)
   return (_Unwind_Ptr) context->bases.func;
 }
 
+void *
+_Unwind_Find_Enclosing_Function (void *pc)
+{
+  struct dwarf_eh_bases bases;
+  struct dwarf_fde *fde = _Unwind_Find_FDE (pc-1, &bases);
+  if (fde)
+    return bases.func;
+  else
+    return NULL;
+}
+
 #ifndef __ia64__
 _Unwind_Ptr
 _Unwind_GetDataRelBase (struct _Unwind_Context *context)
diff --git a/gcc/unwind-sjlj.c b/gcc/unwind-sjlj.c
index 2293075e86e2096d9b3355a41f6d851f3a33b655..59b54154ea326ef19d2dba1674f180a154db62a6 100644
--- a/gcc/unwind-sjlj.c
+++ b/gcc/unwind-sjlj.c
@@ -208,6 +208,12 @@ _Unwind_GetRegionStart (struct _Unwind_Context *context __attribute__((unused))
   return 0;
 }
 
+void *
+_Unwind_Find_Enclosing_Function (void *pc)
+{
+  return NULL;
+}
+
 #ifndef __ia64__
 _Unwind_Ptr
 _Unwind_GetDataRelBase (struct _Unwind_Context *context __attribute__((unused)) )