Mail Archives: djgpp/2004/07/20/05:15:25
X-no archive = yes
thanks for the bfdsymify hint, but with -g
switch I get no error at all.
bfdsymify refers to crt1.c , but I couldn't find such a file
on my computer.
When compiled with -g , or when including the printf("");
(which basically is a no-operation command !)
then the program works correctly.
Can someone recompile and confirm this behaviour ? Maybe it's my OS or
environment.
I can't see, how this could happen, if it's just a bug in the program.
I vaguely remember to have seen a similar thing some time ago.
I changed my gc.bat now to
gcc %1.c -g -O2 -o %1.exe
strip %1.exe
echo ----------------------------------------- >>%1.exe
echo ----------------------------------------- >>%1.exe
echo ----------------------------------------- >>%1.exe
type %1.c >>%1.exe
can there be any disadvantage with -g ? If not, why isn't it
the default ?
--Guenter.
---------------------------------------------
C:\DJGPP>queensy4 20 1 7
480 solutions
General Protection Fault at eip=8; flags=3046
eax=00a30000 ebx=000000a7 ecx=00000000 edx=0001cc10 esi=00001000 edi=10000000
ebp=00000000 esp=00000400 cs=87 ds=0 es=8f fs=0 gs=0 ss=8f error=0000
---------------------------------------------
C:\DJGPP>gcc qser1.c -O2 -o qser1.exe
C:\DJGPP>qser1 16 2 3
Exiting due to signal SIGSEGV
General Protection Fault at eip=00001cdf
eax=0000d270 ebx=a00f0706 ecx=00000099 edx=5ff0f90b esi=ffffff78 edi=ffffff78
ebp=0009cca0 esp=0009cc50 program=C:\DJGPP\QSER1.EXE
cs: sel=00a7 base=10000000 limit=0009ffff
ds: sel=00af base=10000000 limit=0009ffff
es: sel=00af base=10000000 limit=0009ffff
fs: sel=008f base=00019710 limit=0000ffff
gs: sel=00bf base=00000000 limit=0010ffff
ss: sel=00af base=10000000 limit=0009ffff
App stack: [0009ccc0..0001ccc0] Exceptn stack: [0001cc20..0001ace0]
Call frame traceback EIPs:
0x00001cdf main+1631, file qser1.c
0x000037a8 __crt1_startup+176, file crt1.c
C:\DJGPP>bfdsymif qser1.exe
----------------------------------------------------
C:\DJGPP>gcc qser1.c -g -O2 -o qser1.exe
C:\DJGPP>qser1 16 2 3
0 solutions
------------------------------------------------------------
- Raw text -