Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-25 Thread Bob Breuer
Kai Tietz wrote: 2011/10/24 Bob Breuer breu...@mc.net: Kai Tietz wrote: Hi, For trunk-version I have a tentative patch for this issue. On 4.6.x and older branches this doesn't work, as here we can't differenciate that easy between ms- and sysv-abi. But could somebody give this patch a

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-25 Thread Kai Tietz
Applied a fix to trunk at rev. 180423 and to 4.6.x branch at rev. 180422. Regards, Kai

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-24 Thread Bob Breuer
Kai Tietz wrote: Hi, For trunk-version I have a tentative patch for this issue. On 4.6.x and older branches this doesn't work, as here we can't differenciate that easy between ms- and sysv-abi. But could somebody give this patch a try? Regards, Kai ChangeLog *

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-24 Thread Kai Tietz
2011/10/24 Bob Breuer breu...@mc.net: Kai Tietz wrote: Hi, For trunk-version I have a tentative patch for this issue.  On 4.6.x and older branches this doesn't work, as here we can't differenciate that easy between ms- and sysv-abi. But could somebody give this patch a try? Regards, Kai

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-24 Thread Richard Henderson
On 10/24/2011 09:18 AM, Kai Tietz wrote: A possible patch for 4.6 gcc versions I attached to this mail. ... +/* For 32-bit Windows we need valid frame-pointer for function using + setjmp. */ +#define SUBTARGET_SETJMP_NEED_FRAME_POINTER \ + (!TARGET_64BIT cfun-calls_setjmp) + Index:

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-24 Thread Kai Tietz
2011/10/24 Richard Henderson r...@twiddle.net: On 10/24/2011 09:18 AM, Kai Tietz wrote: A possible patch for 4.6 gcc versions I attached to this mail. ... +/* For 32-bit Windows we need valid frame-pointer for function using +   setjmp.  */ +#define SUBTARGET_SETJMP_NEED_FRAME_POINTER \ +

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-22 Thread Kai Tietz
2011/10/22 xunxun xunxun1...@gmail.com: 于 2011/10/22 13:13, xunxun 写道: Hi, all    It seems that gcc's auto-omit-frame-pointer has other problems.    The example is from mingw bug tracker: http://sourceforge.net/tracker/?func=detailaid=3426555group_id=2435atid=102435    g++ -O3 main.cpp  

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-22 Thread asmwarrior
On 2011-10-20 23:34, Kai Tietz wrote: Hi, For trunk-version I have a tentative patch for this issue. On 4.6.x and older branches this doesn't work, as here we can't differenciate that easy between ms- and sysv-abi. But could somebody give this patch a try? Regards, Kai ChangeLog

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-21 Thread jojelino
On 2011-10-21 AM 12:34, Kai Tietz wrote: Hi, For trunk-version I have a tentative patch for this issue. On 4.6.x and older branches this doesn't work, as here we can't differenciate that easy between ms- and sysv-abi. But could somebody give this patch a try? Regards, Kai ChangeLog

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-21 Thread xunxun
Hi, all It seems that gcc's auto-omit-frame-pointer has other problems. The example is from mingw bug tracker: http://sourceforge.net/tracker/?func=detailaid=3426555group_id=2435atid=102435 g++ -O3 main.cpp running will crash. g++ -O2 main.cpp running no crash.

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-21 Thread xunxun
于 2011/10/22 13:13, xunxun 写道: Hi, all It seems that gcc's auto-omit-frame-pointer has other problems. The example is from mingw bug tracker: http://sourceforge.net/tracker/?func=detailaid=3426555group_id=2435atid=102435 g++ -O3 main.cpp running will crash. g++ -O2

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-20 Thread jojelino
On 2011-10-20 AM 6:05, Bob Breuer wrote: We probably have a difference in build or run environment. I've double-checked with another machine and can get the same crash in longjmp when running the test executable on both WinXP and Win2k, but not on Win7. So it looks like Microsoft may have

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-20 Thread Kai Tietz
2011/10/20 xunxun xunxun1...@gmail.com: Hi, all I think this issue causes the gdb crash on XP. You can see the thread: http://sourceware.org/ml/gdb/2011-10/msg00056.html My many friends and I can reproduce this crash issue, but no problem on Win7. On Thu, Oct 20, 2011 at 5:05 AM, Bob

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-20 Thread Kai Tietz
Hi, For trunk-version I have a tentative patch for this issue. On 4.6.x and older branches this doesn't work, as here we can't differenciate that easy between ms- and sysv-abi. But could somebody give this patch a try? Regards, Kai ChangeLog * config/i386/i386.c

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-19 Thread Bob Breuer
Kai Tietz wrote: 2011/10/18 Bob Breuer breu...@mc.net: Kai Tietz wrote: 2011/10/17 Bob Breuer breu...@mc.net: Richard Henderson wrote: On 10/17/2011 07:09 AM, Bob Breuer wrote: Google finds a mention of longjmp failing with -fomit-frame-pointer:

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-19 Thread Richard Henderson
On 10/19/2011 02:05 PM, Bob Breuer wrote: Is it possible to force a stackframe by just adding a suitable attribute to either the setjmp function prototype, or the function which calls setjmp? The only thing I can think of that'll be portable to a large number of versions of GCC is { int

Re: gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-19 Thread xunxun
Hi, all I think this issue causes the gdb crash on XP. You can see the thread: http://sourceware.org/ml/gdb/2011-10/msg00056.html My many friends and I can reproduce this crash issue, but no problem on Win7. On Thu, Oct 20, 2011 at 5:05 AM, Bob Breuer breu...@mc.net wrote: Kai Tietz wrote:

gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-17 Thread Richard Henderson
On 10/17/2011 07:09 AM, Bob Breuer wrote: I don't think this is a free/g_free issue. If I use the following patch, then I at least get the openbios messages: diff --git a/cpu-exec.c b/cpu-exec.c index a9fa608..dfbd6ea 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -180,6 +180,7 @@ static

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-17 Thread Blue Swirl
On Mon, Oct 17, 2011 at 5:22 PM, Richard Henderson r...@twiddle.net wrote: On 10/17/2011 07:09 AM, Bob Breuer wrote: I don't think this is a free/g_free issue.  If I use the following patch, then I at least get the openbios messages: diff --git a/cpu-exec.c b/cpu-exec.c index

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-17 Thread Richard Henderson
On 10/17/2011 12:14 PM, Blue Swirl wrote: IIRC buggy versions of alloca() could also fail without a frame pointer. (1) GCC always uses a frame pointer for alloca, (2) Unless you do -fno-builtin-alloca, we always implement it inline. r~

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-17 Thread Bob Breuer
Richard Henderson wrote: On 10/17/2011 07:09 AM, Bob Breuer wrote: I don't think this is a free/g_free issue. If I use the following patch, then I at least get the openbios messages: diff --git a/cpu-exec.c b/cpu-exec.c index a9fa608..dfbd6ea 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-17 Thread Bob Breuer
Kai Tietz wrote: 2011/10/17 Bob Breuer breu...@mc.net: Richard Henderson wrote: On 10/17/2011 07:09 AM, Bob Breuer wrote: I don't think this is a free/g_free issue. If I use the following patch, then I at least get the openbios messages: diff --git a/cpu-exec.c b/cpu-exec.c index

Re: [Qemu-devel] gcc auto-omit-frame-pointer vs msvc longjmp

2011-10-17 Thread Kai Tietz
2011/10/18 Bob Breuer breu...@mc.net: Kai Tietz wrote: 2011/10/17 Bob Breuer breu...@mc.net: Richard Henderson wrote: On 10/17/2011 07:09 AM, Bob Breuer wrote: I don't think this is a free/g_free issue.  If I use the following patch, then I at least get the openbios messages: diff --git