Sign in Join

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

Mailing lists / lazarus / 2009-04

Lazarus attach to 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.

Toan Pham

Hi,

I am a lazarus/freepascal user and I notice it is not possible to debug a console application (freevision), when both the console screen and keyboard are initialized. This is because a console application is executed in a terminal; hence when a debug session is launched from Lazarus, it will try to debug the xterm session instead of the application. One possible way to debug a console application is running the console app in one terminal and debug the application in another terminal by attaching to the running PID. However, gdb debuging output is nasty and cant easily be navigated as within a Lazarus debug session.

My question is, is it possible for lazarus to attach a debuger to a running process by PID? This would be very nice because it will allow debuging capability for console applications that required a x-terminal to run on. Thank you,

Toan

Reply by email

Toan Pham
to Paul Ishenin

I downloaded, applied and rebuilt lazarus; and it did not seem to work. has anyone tested this out?

Toan

Paul Ishenin wrote 16 lines
Toan Pham wrote: > My question is, is it possible for lazarus to attach a debuger to a > running process by PID? ?This would be very nice because it will allow > debuging capability for console applications that required a > x-terminal to run on. ?Thank you, > Seems we have a related patch: http://bugs.freepascal.org/view.php?id=12172 Best regards, Paul Ishenin. _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Toan Pham
to Toan Pham

Nevermind, it worked,

Just to remind re-everyone, you should re-compile lazarus in terminal (not under tools -> rebuild),
Also, we you start lazarus back up, make sure that you reference the new built binary, b/c
in my case, it reference the binary under /home/myusername/.lazarus/bin/lazarus.

Thank you Paul,

Toan

Toan Pham wrote 23 lines
I downloaded, applied and rebuilt lazarus; and it did not seem to work. has anyone tested this out? Toan On Fri, Apr 17, 2009 at 10:12 AM, Paul Ishenin wrote: > Toan Pham wrote: >> My question is, is it possible for lazarus to attach a debuger to a >> running process by PID? ?This would be very nice because it will allow >> debuging capability for console applications that required a >> x-terminal to run on. ?Thank you, >> > Seems we have a related patch: > http://bugs.freepascal.org/view.php?id=12172 > > Best regards, > Paul Ishenin. > _______________________________________________ > Lazarus mailing list > > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus >

Reply by email