On 10/04/2014 14:14, Michael Schnell wrote:
On 04/09/2014 06:27 PM, Bernd Mueller wrote:

I stepped through the program until the problem occurred and hit then pause. As far as I could see, nothing happened. Then I hit stop.

I once was told that with using gdbserver, "Pause" (while not hitting a breakpoint) is not possible.
That changed. But only where gdb supports async mode.
Back then the IDE did not support using gdb in async mode. Now it does.

But, as the logfile showed, the gdb/gdbserver used, supported async for run(f9), but not step(F8).

The latter, may be due to the use of the mi syntax. Which is why I wrote changing it to "n" instead of -exec-next


That is why I found that using ssh to remote-control "normal" gdb on the target (instead of locally controlling gdb and having it connect to gdbserver on the target) would be more appropriate.
That may work outside the IDE, if you can either send a "break" (ctrl-c) to gdb, or have a 2nd ssh connection, and can do "kill SIGINT pid_of_yourapp".

The IDE ssh debugger, can not pause the app either.


Moreover I found that, with an embedded target, finding or creating a normal gdb might be a lot easier that finding or creating the "cross gdb" (running on PC but understanding the Target's files) plus the gdbserver for the target.

I found that - at that time - the code for ssh'ing gdb was present in the Lazarus source but was commented out (supposedly because it's not yet ready for use).

See above. It does not pause the remote.

To pause an app in the debugger, the IDE sends a SigInt. But it can only do that for local targets.

The gdbserver debugger in the IDE, can tell gdb to interupt the target, (again) if gdb is in async mode. In async mode, gdb will accept commads while the target is running. So you can do

r &  // run async (background)
interrupt  // pause


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to