[Lazarus] Can Lazarus IDE debugger attach to already running process?
Martin
lazarus at mfriebe.de
Thu Sep 19 12:08:10 CEST 2013
On 19/09/2013 09:07, Michael Schnell wrote:
>
> In fact I preferred to try to make working to have Lazarus remotely
> attach to a "full" gdb on the target via SSH. (When I last looked at
> it there ware some disabled lines of code for this in the Lazarus
> sources.
look at http://bugs.freepascal.org/view.php?id=21834
In some config it might work.
It does best work in asyncronous mode(see below). It will try this, but
should fall back.
Note: in none asyncronous mode, some things are not possible, and can
never be possible.
In none async, the debugger can not interrupt the running process., It
has to wait until a breakpoint is reached.
That also means, that once the process is running, no breakpoints can be
added, or removed, until the process does hit an existing breakpoint.
GDB requires the process to be paused in order to change breakpoints (or
in order to do anything).
>
>>
>> and while running
>> interrupt
>> ?
>
> AFAIK, gdbserver does not support interrupting a running program.
Depends on target (e.g gdbserver on intel/windows or intel/linux can do
this.
The issue is that originally the IDE itself did sent a signal to the
debuggee. That is not possible if the debuggee is on a remate system.
But it works, if gdb or gdb server for that platform support asyncronous
mode. (it is possible to start gdb, and ask it, but I need to lookup the
command)
IIRC gdbserver supports thi for i386 win and linux (probably intel 64
bit too).
gdb does NOT support it for windows, but iirc for linux (intel)
When using gdbserver, it is enough if gdbserver supports it.
> That is one of the causes why I prefer the SSH way of remote
> debugging. The other is that for all targets you can easily get a
> native gdb out of the box, while it might be rather tedious to install
> all the tools to create the appropriate gdbserver on the target and
> the cross-gdb executable on the PC you need to attach to it.
Try it, send a log, if not working
>
>>
>> You can always send me a log file.
> Thanks a lot. I'll try to re-open the dialog with my pal from the
> German forum...
Was he the one who created the above bug?
If not, please create a new one. The old one contains a lot of solved
issues (and some unsolved). So it is time consuming to go through it.
More information about the Lazarus
mailing list