Patch from David Mosberger
authorDavid Mosberger <davidm@hpl.hp.com>
Thu, 20 Nov 2003 22:53:02 +0000 (22:53 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 20 Nov 2003 22:53:02 +0000 (14:53 -0800)
* config/t-libunwind: Mention unwind-c.c.
(SHLIB_LC): Overwrite the default-value from t-slibgcc-elf-ver
and mention -lunwind so that the resulting libgcc_s.so has
the necessary DT_NEEDED entry for libunwind.
* unwind-libunwind.c (_Unwind_GetCFA): Implement.
(_Unwind_GetBSP) [UNW_TARGET_IA64]: New function.

From-SVN: r73777

gcc/ChangeLog
gcc/config/t-libunwind
gcc/unwind-libunwind.c

index dbcdf3e26cc269b60734633e17018d2164877181..c9bea389ef51a6b046b35e925062a75a2b7d9fd3 100644 (file)
@@ -1,3 +1,13 @@
+2003-11-20 David Mosberger  <davidm@hpl.hp.com>
+
+       * config/t-libunwind: Mention unwind-c.c.
+       (SHLIB_LC): Overwrite the default-value from t-slibgcc-elf-ver
+       and mention -lunwind so that the resulting libgcc_s.so has
+       the necessary DT_NEEDED entry for libunwind.
+
+       * unwind-libunwind.c (_Unwind_GetCFA): Implement.
+       (_Unwind_GetBSP) [UNW_TARGET_IA64]: New function.
+
 2003-11-20  Fariborz Jahanian  <fjahanian@apple.com>
            David Edelsohn  <edelsohn@gnu.org>
 
index be50bc481c5f29ce339e2e40e1e91cf97b988fd6..a27c5e224f11d4fdbd3aec3109580ec3812f5518 100644 (file)
@@ -1 +1,3 @@
-LIB2ADDEH = $(srcdir)/unwind-libunwind.c $(srcdir)/unwind-sjlj.c
+SHLIB_LC = -lunwind -lc
+LIB2ADDEH = $(srcdir)/unwind-libunwind.c $(srcdir)/unwind-sjlj.c \
+           $(srcdir)/unwind-c.c
index 2e53a59eac7b83aada09abef4cd27252113aeff3..89e841759cf9013309f77e437c5bb290a62971ca 100644 (file)
@@ -110,9 +110,11 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index)
 _Unwind_Word
 _Unwind_GetCFA (struct _Unwind_Context *context)
 {
-  /* ??? Is there any way to get this information?  */
-  return NULL;
-} 
+  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.  */
 
@@ -167,6 +169,19 @@ _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__ */