Mail Archives: djgpp/2004/05/17/09:32:48
> Date: Mon, 17 May 2004 12:07:42 +0200 (MEST)
> From: Gabriel Zoltan <gz331 AT hszk DOT bme DOT hu>
>
> I included the crash dumps in my letter.
Thanks.
All examples show bad EBP values. See below.
> I use WinXP and somehow symify doesn't seem to work.
Try `bfdsymify' instead. Recent versions of GCC use DWARF-2 debug
info format, which symify doesn't support.
> Exiting due to signal SIGSEGV
> Stack Fault at eip=0000b2d5
> eax=00000000 ebx=000e05d4 ecx=00000000 edx=00000125 esi=00000000 edi=000026e6
> ebp=00000000 esp=000e05d8 program=d:\diploma\progi\dynamos.exe
Here EBP is zero, which is clearly invalid.
> Exiting due to signal SIGSEGV
> General Protection Fault at eip=000011f1, error=012c
> eax=00010cb3 ebx=00000125 ecx=000e0604 edx=00000000 esi=00000000 edi=00000000
> ebp=000026d9 esp=000e05ec program=d:\diploma\progi\dynamos.exe
Here EBP is way far from ESP.
> Exiting due to signal SIGSEGV
> General Protection Fault at eip=00000007
> eax=0d9f9e25 ebx=00000000 ecx=000e05e8 edx=000e05f4 esi=000e05f4 edi=0005274c
> ebp=000026e6 esp=000e05dc program=d:\diploma\progi\dynamos.exe
Same here.
In sum, it sounds like your stack-changing code doesn't set up EBP.
I agree with the advice elsewhere in this thread to use setjmp/longjmp
for switching stacks, since they preserve and restore the entire
context of the thread (with the exception of the numerical coprocessor
registers).
- Raw text -