I did some more investigation, and initially I can set a breakpoint on the project code. Stepping through the code sometimes works, sometimes crashes somewhere in application.inc. I have a feeling that it has to do with some kind of timing issue. as if I hit run it always fails. The errors of GDB are also a bit obscure, because when I terminate the program:
While executing the command:
"TGDBMIDebuggerInstruction: "-file-exec-and-symbols ", "
gdb reported:
"&"../../gdb-7.2/gdb/printcmd.c:1916: internal-error: clear_dangling_display_expressions: Assertion `objfile->pspace == solib->pspace' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove unreliable.""
I tried to do a fresh full recompile of the full setup but that doesn't seem to help. If I just keep on trying to hit the runbutton then some times, the applications fires and I can debug.... The most basic error I get is :
The GDB command:
"-thread-info"
did not return any result.
The GDB process is no longer running.
Just to make sure that I'm running the latest version I did a full uninstall/install of the latest lazarus (1.4.2) but the problem persists. The statement things are crashsing:
if not InitResourceComponent(Self, TForm) then
(line 1964 customform.inc).
Traced further to
NotifyGlobalLoading
line 3159 in LResources.inc
I tried some options from the wiki on
http://wiki.freepascal.org/GDB_Debugger_Tipsand that solved the issue (well, more or less).