[fpc-devel] win32 debugging broken in fixes_2_2?

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Jul 10 17:04:29 CEST 2007


On 10 Jul 2007, at 16:39, Martin Schreiber wrote:

> Program received signal SIGILL, Illegal instruction.
> 0x00402091 in SYSTEM_FPC_CPUCODEINIT ()
> (gdb) c
> Continuing.
>
> Program exited with code 0200.
> (gdb)
> "
> And now what to do?

It seems that either your specific gdb is broken, or that gdb for  
win32 is broken in this regard. By default, gdb's setting for SIGILL  
should be:

(gdb) info handle SIGILL
Signal        Stop      Print   Pass to program Description
SIGILL        Yes       Yes     Yes             Illegal instruction

This means that when a SIGILL occurs, gdb will stop the program and  
print the fact that a SIGILL occurred, but that if you continue it  
should be passed on to the program. The program's exception handler  
will then catch it. E.g., under Linux/i386 on a cpu which does not  
support SSE instructions:

(gdb) r
Starting program: /home/jmaebe/lnxhome/fpc/test/tt2
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xb53000

Program received signal SIGILL, Illegal instruction.
FPC_CPUCODEINIT () at i386.inc:1244
1244    i386.inc: No such file or directory.
         in i386.inc
(gdb) c
Continuing.
0.01
0.01

You can also disable gdb catching SIGILL from the start of the  
program using "handle SIGILL nostop noprint" (in case gdb for win32  
is broken in this respect), but then you should re-enable it later on  
(unless you don't want the debugger to break when an illegal  
instruction is executed).


Jonas



More information about the fpc-devel mailing list