Sign in Join

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

Mailing lists / lazarus / 2008-03

Lazarus+GDB=app slow start

5 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Denis Golovan

Hi, all

I think everybody noticed slow application start under Lazarus and GDB as debugger. On my Athlon 1200, starting of 3 form application (15Mb size including gdb debug info) costs about 7-8 seconds. Without debugger, main form pops up almost immediately. Console output shows that debugger tries to load debug info for all units in project before letting program go. Some googling also shows the same problems with other languages.
So that's the question :) - is it possible to reduce gdb starting time by loading debug info on-demand? Maybe some FAQ already exists?

AFAIU, the more project - the more time it will take debugger to load all (obviously not needed) debug symbols.

Best regards, Denis Golovan aka MageSlayer

Reply by email

Marc Weustink
to Denis Golovan
Denis Golovan wrote 9 lines
Hi, all I think everybody noticed slow application start under Lazarus and GDB as debugger. On my Athlon 1200, starting of 3 form application (15Mb size including gdb debug info) costs about 7-8 seconds. Without debugger, main form pops up almost immediately. Console output shows that debugger tries to load debug info for all units in project before letting program go. Some googling also shows the same problems with other languages. So that's the question :) - is it possible to reduce gdb starting time by loading debug info on-demand? Maybe some FAQ already exists? AFAIU, the more project - the more time it will take debugger to load all (obviously not needed) debug symbols.

Unfortunately I think hat is how gdb works. Even if I look at my own debugger, it must load/parse all info before it knows what symbols are used.

This is one of the reasons why Lazarus keeps the debugger running. If you want to debug multiple sessions without compiling a new exe (see compiler options, last tab, uncheck compile on run), GDB doesn't have to load the exe again. So you get faster start times.

Marc

Reply by email

Bogusław Brandys
to Marc Weustink
Marc Weustink wrote 20 lines
Denis Golovan wrote: > Hi, all > > I think everybody noticed slow application start under Lazarus and GDB as debugger. On my Athlon 1200, starting of 3 form application (15Mb size > including gdb debug info) costs about 7-8 seconds. Without debugger, main form pops up almost immediately. > Console output shows that debugger tries to load debug info for all units in project before letting program go. Some googling also shows the same > problems with other languages. > So that's the question :) - is it possible to reduce gdb starting time by loading debug info on-demand? Maybe some FAQ already exists? > > AFAIU, the more project - the more time it will take debugger to load all (obviously not needed) debug symbols. Unfortunately I think hat is how gdb works. Even if I look at my own debugger, it must load/parse all info before it knows what symbols are used. This is one of the reasons why Lazarus keeps the debugger running. If you want to debug multiple sessions without compiling a new exe (see compiler options, last tab, uncheck compile on run), GDB doesn't have to load the exe again. So you get faster start times. Marc

Also I found KAsperky Antivirus slowing debbuging a lot.I have to temporarily turn off on access scan and it's going to be much more faster...

Boguslaw

Reply by email

Lee Jenkins
to Tobias Giesen
Tobias Giesen wrote 8 lines
> This is one of the reasons why Lazarus keeps the debugger running. Interesting! On Mac OS X i386, this apparently causes a second or third start of the program to fail occasionally ("Oops, the debugger..."). Can I turn off keeping the debugger running? Or where can I change this behavior in the source for myself?

Tobias,

I don't think you can as I asked this before on the list. I've just made it a habit to turn if off after every run or so.

Run > Reset Debugger.

Warm Regards, Lee "Everything I needed to learn in life, I learned selling encyclopedias door to door."

Reply by email