diff options
author | Cary Coutant <ccoutant@google.com> | 2009-09-25 20:51:40 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2009-09-25 20:51:40 +0000 |
commit | 90ff80ffce47736ab7319058a44a0704a7fdb31e (patch) | |
tree | 3de65ba61f89a48c0ec028672acb475ea3f1819b /libjava/sysdep/i386/backtrace.h | |
parent | ebd9739bcfd2dc4c6409fb0b96d95894191b2c28 (diff) |
Merged revisions 151950:152181 from trunk.dwarf4
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/dwarf4@152186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/sysdep/i386/backtrace.h')
-rw-r--r-- | libjava/sysdep/i386/backtrace.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libjava/sysdep/i386/backtrace.h b/libjava/sysdep/i386/backtrace.h index 63b32746137..ee793b22a0f 100644 --- a/libjava/sysdep/i386/backtrace.h +++ b/libjava/sysdep/i386/backtrace.h @@ -13,7 +13,14 @@ details. */ #include <java-stack.h> -extern int main (int, char **); +#ifdef __CYGWIN__ +/* To allow this to link as a DLL. */ +#define MAIN_FUNC dll_crt0__FP11per_process +extern "C" int MAIN_FUNC () __declspec(dllimport); +#else /* !__CYGWIN__ */ +#define MAIN_FUNC main +extern int MAIN_FUNC (int, char **); +#endif /* ?__CYGWIN__ */ /* The context used to keep track of our position while unwinding through the call stack. */ @@ -104,7 +111,7 @@ fallback_backtrace (_Unwind_Trace_Fn trace_fn, _Jv_UnwindState *state) const char **, bool))_Jv_RunMain; if (ctx.meth_addr == (_Jv_uintptr_t)jv_runmain || ctx.meth_addr == (_Jv_uintptr_t)_Jv_ThreadStart - || (ctx.meth_addr - (_Jv_uintptr_t)main) < 16) + || (ctx.meth_addr - (_Jv_uintptr_t)MAIN_FUNC) < 16) break; } |