Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-11

getting SigIll in w32 gdb

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

I tried the below, with various versions of gdb on w32 / vista

- gdb 6.8.3 / 7.0 / 7.0.50 / 7.1-2 / 7.2-1
- you can comment out the writeln => no change

set breakpoint on first call of "Test"
then step twice with F8

2nd time F8 cause sig-ill

disassembler window shows that either the pc is wrong, or some bad data was written there...

Can any one test, if they can reproduce? program project1; {$mode objfpc}{$H+} procedure Test; begin Writeln('Hello World'); // output isn't important end; begin Test; // breakpoint Test; Test; end.

Reply by email

Martin
to Martin
Martin wrote
I tried the below, with various versions of gdb on w32 / vista - gdb 6.8.3 / 7.0 / 7.0.50 / 7.1-2 / 7.2-1 - you can comment out the writeln => no change

forgot:
using dwarf -gw -godwarfset
and fpc trunk (today)

not tested with stabs or older fpc yet

Show quoted text 33 lines
set breakpoint on first call of "Test" then step twice with F8 2nd time F8 cause sig-ill disassembler window shows that either the pc is wrong, or some bad data was written there... -- Can any one test, if they can reproduce? program project1; {$mode objfpc}{$H+} procedure Test; begin Writeln('Hello World'); // output isn't important end; begin Test; // breakpoint Test; Test; end. -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Marc Weustink
to Martin: I tried the below, with various versions of gdb on w32 / vista - gdb 6.8.3 / 7.0 / …
Martin wrote 12 lines
I tried the below, with various versions of gdb on w32 / vista - gdb 6.8.3 / 7.0 / 7.0.50 / 7.1-2 / 7.2-1 - you can comment out the writeln => no change set breakpoint on first call of "Test" then step twice with F8 2nd time F8 cause sig-ill disassembler window shows that either the pc is wrong, or some bad data was written there...

Whats the output of the debuggeroutput window ?

Marc

Reply by email

Martin
to Marc Weustink
Marc Weustink wrote 5 lines
Martin wrote: > I tried the below, with various versions of gdb on w32 / vista > > - gdb 6.8.3 / 7.0 / 7.0.50 / 7.1-2 / 7.2-1 > - you can comment out the writeln => no change

tried wit and without external linker -Xe

Show quoted text 10 lines
> > set breakpoint on first call of "Test" > then step twice with F8 > > 2nd time F8 cause sig-ill > > disassembler window shows that either the pc is wrong, or some bad data > was written there... Whats the output of the debuggeroutput window ?

see below.
note the 2nd thread, no idea where that is from, but it seems the exec-continue goes to thread 2 ??

* first stop = breakpoint, that is correct.
* the first F8 is already suspicious. as it hits a signal => it should be:
*stopped,reason="end-stepping-range",.....

* 2nd F8 hit sigilll

*stopped,reason="signal-received",signal-name="SIGILL",signal-meaning="Illegal instruction",frame={addr="0x004016cf",func="main",args=[],file="project1.lpr",fullname="C:/data/lazarus/bug2/project1.lpr",line="38"},thread-id="1",stopped-threads="all"

note the address, according to the assembler view (opened after the exception) this is in the middle of the call command ?

----
Full log:

(gdb)
*stopped,reason="breakpoint-hit",disp="keep",bkptno="6",frame={addr="0x004016c8",func="main",args=[],file="project1.lpr",fullname="C:/data/lazarus/bug2/project1.lpr",line="37"},thread-id="1",stopped-threads="all" (gdb)
<info program>
&"info program\n"
~"\tUsing the running image of child Thread 4192.0xdf4.\n" ~"Program stopped at 0x4016c8.\n"
~"It stopped at breakpoint 6.\n"
~"Type \"info stack\" or \"info registers\" for more information.\n" ^done
(gdb)
<-symbol-list-lines C:\data\lazarus\bug2\project1.lpr> ^done,lines=[{pc="0x00401680",line="10"},{pc="0x00401689",line="11"},{pc="0x004016b2",line="12"},{pc="0x004016b7",line="0"},{pc="0x004016c0",line="36"},{pc="0x004016c8",line="37"},{pc="0x004016cd",line="38"},{pc="0x004016d2",line="39"},{pc="0x004016d7",line="47"},{pc="0x004016de",line="0"}] (gdb)
<-stack-list-frames 0 0>
^done,stack=[frame={level="0",addr="0x004016c8",func="main",file="project1.lpr",fullname="C:/data/lazarus/bug2/project1.lpr",line="37"}] (gdb)
<-exec-next>
^running
*running,thread-id="1"
(gdb)
=thread-created,id="2",group-id="4192"
~"[New Thread 4192.0xe08]\n"
*running,thread-id="all"
~"[Switching to Thread 4192.0xe08]\n"
*stopped,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",frame={addr="0x771d8b2f",func="??",args=[]},thread-id="2",stopped-threads="all" =thread-selected,id="2"
(gdb)
<-exec-continue>
^running
*running,thread-id="all"
(gdb)
~"[Switching to Thread 4192.0xdf4]\n"
*stopped,reason="signal-received",signal-name="SIGTRAP",signal-meaning="Trace/breakpoint trap",frame={addr="0x004016ce",func="main",args=[],file="project1.lpr",fullname="C:/data/lazarus/bug2/project1.lpr",line="38"},thread-id="1",stopped-threads="all" =thread-selected,id="1"
(gdb)
<-exec-next>
^running
*running,thread-id="all"
(gdb)
=thread-exited,id="2",group-id="4192"
*stopped,reason="signal-received",signal-name="SIGILL",signal-meaning="Illegal instruction",frame={addr="0x004016cf",func="main",args=[],file="project1.lpr",fullname="C:/data/lazarus/bug2/project1.lpr",line="38"},thread-id="1",stopped-threads="all" (gdb)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: assembler.png
Type: image/png
Size: 28960 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101108/586f6d11/attachment-0001.png>

Reply by email