aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/ia64/unwind-ia64.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/ia64/unwind-ia64.c')
-rw-r--r--gcc/config/ia64/unwind-ia64.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c
index 573a84a75ce..9b6023da58a 100644
--- a/gcc/config/ia64/unwind-ia64.c
+++ b/gcc/config/ia64/unwind-ia64.c
@@ -1647,7 +1647,24 @@ _Unwind_GetRegionStart (struct _Unwind_Context *context)
void *
_Unwind_FindEnclosingFunction (void *pc)
{
- return NULL;
+ struct unw_table_entry *ent;
+ unsigned long segment_base, gp;
+
+ ent = _Unwind_FindTableEntry (pc, &segment_base, &gp);
+ if (ent == NULL)
+ return NULL;
+ else
+ return (void *)(segment_base + ent->start_offset);
+}
+
+/* Get the value of the CFA as saved in CONTEXT. In GCC/Dwarf2 parlance,
+ the CFA is the value of the stack pointer on entry; In IA-64 unwind
+ parlance, this is the PSP. */
+
+_Unwind_Word
+_Unwind_GetCFA (struct _Unwind_Context *context)
+{
+ return (_Unwind_Ptr) context->psp;
}