[Lazarus] GDB strangeness

Martin Frb lazarus at mfriebe.de
Tue Aug 25 17:57:43 CEST 2015


On 25/08/15 11:06, Michael Van Canneyt wrote:
>
> I'm debugging a program, and it just won't debug inside lazarus.
>
> When I look at the debug output in Lazarus, I see:
>
> <-exec-run>
> =thread-group-started,id="i1",pid="20658"
> =thread-created,id="1",group-id="i1"
> ^running
> *running,thread-id="all"
> (gdb) =thread-exited,id="1",group-id="i1"
> =thread-group-exited,id="i1"
> ^error,msg="During startup program exited with code 1."
>
> The strange thing is that if I use gdb on the command-line, it does 
> start and run the program,
> and I can debug as I would expect it (albeit very rudimentary).
lazarus tries to set a break at entrypoint, and once that is reached it 
will set user breaks.

the last line/error is from the IDE, because that entry point brk was 
not reached.

2 possible solutions:
- a library interfers with the name "main". there is an option 
(tools/options/ debugger) to skip loading dll info 
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#internal-error:_clear_dangling_display_expressions
- tools/options/ debugger  change the InternalStartBreak option




More information about the Lazarus mailing list