aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Mosberger <davidm@hpl.hp.com>2003-11-20 22:53:02 +0000
committerJim Wilson <wilson@gcc.gnu.org>2003-11-20 14:53:02 -0800
commit3e7869c6443a05a1fdbedd087eed14402df2875f (patch)
tree0b2f2a1d3b8d58631f3565571f4188a1240462df /gcc
parent146a1ecb877611526fcd141a6efc1e290e13e412 (diff)
downloadgcc-3e7869c6443a05a1fdbedd087eed14402df2875f.zip
gcc-3e7869c6443a05a1fdbedd087eed14402df2875f.tar.gz
gcc-3e7869c6443a05a1fdbedd087eed14402df2875f.tar.bz2
Patch from David Mosberger
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/t-libunwind4
-rw-r--r--gcc/unwind-libunwind.c21
3 files changed, 31 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dbcdf3e..c9bea38 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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>
diff --git a/gcc/config/t-libunwind b/gcc/config/t-libunwind
index be50bc4..a27c5e2 100644
--- a/gcc/config/t-libunwind
+++ b/gcc/config/t-libunwind
@@ -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
diff --git a/gcc/unwind-libunwind.c b/gcc/unwind-libunwind.c
index 2e53a59..89e8417 100644
--- a/gcc/unwind-libunwind.c
+++ b/gcc/unwind-libunwind.c
@@ -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__ */