X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Funwind-sjlj.c;h=c541bd5f8f9a1a1fd2f84402137858ffba70cfde;hb=9ec0fbe12f5d88044672d79ff164eff1d2ec3f94;hp=9ea6d06c9a75c17bcb3d43ec3f4508d2d2213005;hpb=3b975150186b30c6f78f6e0abbaec8c375c02e71;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/unwind-sjlj.c b/gcc/unwind-sjlj.c index 9ea6d06c9a7..c541bd5f8f9 100644 --- a/gcc/unwind-sjlj.c +++ b/gcc/unwind-sjlj.c @@ -1,5 +1,5 @@ /* SJLJ exception handling and frame unwind runtime interface routines. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. This file is part of GCC. @@ -45,10 +45,14 @@ typedef void *jmp_buf[JMP_BUF_SIZE]; extern void longjmp(jmp_buf, int) __attribute__((noreturn)); #endif #else -#define setjmp __builtin_setjmp #define longjmp __builtin_longjmp #endif +/* The setjmp side is dealt with in the except.c file. */ +#undef setjmp +#define setjmp setjmp_should_not_be_used_in_this_file + + /* This structure is allocated on the stack of the target function. This must match the definition created in except.c:init_eh. */ struct SjLj_Function_Context @@ -214,6 +218,16 @@ _Unwind_GetIP (struct _Unwind_Context *context) return context->fc->call_site + 1; } +_Unwind_Ptr +_Unwind_GetIPInfo (struct _Unwind_Context *context, int *ip_before_insn) +{ + *ip_before_insn = 0; + if (context->fc != NULL) + return context->fc->call_site + 1; + else + return 0; +} + /* Set the return landing pad index in CONTEXT. */ void @@ -276,6 +290,13 @@ uw_update_context (struct _Unwind_Context *context, context->fc = context->fc->prev; } +static void +uw_advance_context (struct _Unwind_Context *context, _Unwind_FrameState *fs) +{ + _Unwind_SjLj_Unregister (context->fc); + uw_update_context (context, fs); +} + static inline void uw_init_context (struct _Unwind_Context *context) {