[fpc-devel] gdb crashes with trunk
Martin Schreiber
fpmse at bluewin.ch
Sat Apr 5 10:25:45 CEST 2008
On Friday 04 April 2008 19.40:30 Jonas Maebe wrote:
>
> And this 6.6 also works fine with stabs.
>
I tried with gdb 6.8.50:
"
GNU gdb 6.8.50.20080306
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) break reader.inc:1260
Breakpoint 1 at 0x80d742e: file ../objpas/classes/reader.inc, line 1260.
(gdb) run
Starting program: /home/mse/packs/standard/svn/mse/trunk/apps/ide/mseidefp
[Thread debugging using libthread_db enabled]
[New Thread 0xb7b538d0 (LWP 5905)]
[Switching to Thread 0xb7b538d0 (LWP 5905)]
Breakpoint 1, READROOTCOMPONENT (READROOTCOMPONENT=0xb77a5020,
AROOT=0xb77a5020, this=0xb7795020) at ../objpas/classes/reader.inc:1260
1260 Result.FComponentState :=
(gdb) print result.fcomponentstate
$1 = []
(gdb) next
1264 i := 0;
(gdb) print result.fcomponentstate
$2 = []
(gdb)
"
BTW the set display is not always wrong.
This is with stabs (-O- -gl):
"
GNU gdb 6.8.50.20080306
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) break main.pas:1422
Breakpoint 1 at 0x80a7094: file main.pas, line 1422.
(gdb) run
Starting program: /home/mse/packs/standard/svn/mse/trunk/apps/ide/mseidefp
[Thread debugging using libthread_db enabled]
[New Thread 0xb7b5d8d0 (LWP 8469)]
[Switching to Thread 0xb7b5d8d0 (LWP 8469)]
Breakpoint 1, MAINONLOADED (SENDER=0xb7579870, this=0xb7579870) at
main.pas:1422
1422 mainstatfile.readstat;
(gdb) bt
#0 MAINONLOADED (SENDER=0xb7579870, this=0xb7579870) at main.pas:1422
#1 0x08189347 in DOEVENTLOOPSTART (this=0xb7579870)
at ../../lib/common/widgets/mseforms.pas:848
#2 0x08189393 in RECEIVEEVENT (EVENT=0xb7b54be0, this=0xb7579870)
at ../../lib/common/widgets/mseforms.pas:857
#3 0x080f88ea in DELIVER (this=0xb7b54be0)
at ../../lib/common/kernel/mseevent.pas:195
#4 0x08083080 in EVENTLOOP (EVENTLOOP=false, AMODALWINDOW=0x0, ONCE=false,
this=0xb79b4020) at ../../lib/common/kernel/msegui.pas:12320
#5 0x08083dcc in DOEVENTLOOP (ONCE=false, this=0xb79b4020)
at ../../lib/common/kernel/msegui.pas:12715
#6 0x080f6f38 in RUN (this=0xb79b4020)
at ../../lib/common/kernel/mseapplication.pas:1064
#7 0x0804c759 in main () at mseide.pas:57
(gdb)
"
Hurray!
Now MSEide and probably Lazarus too have a problem: debugging of FPC trunk
applications will not work with some distributions. OpenSuse 10.3 gdb crashes
with stabs and does not show set results correctly with dwarf.
The need of different debugger compiler switches for different compiler
versions is not ideal anyway.
Martin
More information about the fpc-devel
mailing list