OSDN Git Service

Patch from David Mosberger
[pf3gnuchains/gcc-fork.git] / gcc / unwind-libunwind.c
index 8ed0524..89e8417 100644 (file)
@@ -1,5 +1,5 @@
 /* Subroutines needed for unwinding stack frames via the libunwind API.
-   Copyright (C) 2002
+   Copyright (C) 2002, 2003
    Free Software Foundation, Inc.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
 
@@ -105,6 +105,17 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
   return ret;
 }
 
+/* Get the value of the CFA as saved in CONTEXT.  */
+
+_Unwind_Word
+_Unwind_GetCFA (struct _Unwind_Context *context)
+{
+  unw_word_t ret;
+
+  unw_get_reg (&context->cursor, UNW_IA64_SP, &ret);
+  return ret;
+}
+
 /* Overwrite the saved value for register REG in CONTEXT with VAL.  */
 
 void
@@ -152,6 +163,25 @@ _Unwind_GetRegionStart (struct _Unwind_Context *context)
   return (_Unwind_Ptr) pi.start_ip;
 }
 
+void *
+_Unwind_FindEnclosingFunction (void *pc)
+{
+  return NULL;
+}
+
+#ifdef UNW_TARGET_IA64
+
+_Unwind_Word
+_Unwind_GetBSP (struct _Unwind_Context *context)
+{
+  unw_word_t ret;
+
+  unw_get_reg (&context->cursor, UNW_IA64_BSP, &ret);
+  return ret;
+}
+
+#endif
+
 #include "unwind.inc"
 
 #endif /* !__USING_SJLJ_EXCEPTIONS__ */