[Lazarus] improved async handling for remote debug [Re: Remote debugger looses connection to target on Windows 7]

Martin Frb lazarus at mfriebe.de
Sat Apr 19 02:40:22 CEST 2014


On 09/04/2014 17:54, Martin Frb wrote:
> But it did not for stepping
>   >> TCmdLineDebugger.SendCmdLn "-exec-next &"
>   << TCmdLineDebugger.ReadLn "^error,msg="A syntax error in 
> expression, near `&&'.""
>
> Somehow strange, but that is what it did.
>
> So the IDE used none async to do the step. But that means it can not 
> interrupt (pause/stop) the remote, until the remote stops on its own 
> (breakpoint/end of step)
>
> The error might be bound to the "mi" made of gdb. That is "n &" might 
> work. But it will take some work to make the IDE deal with none "mi" 
> stepping

I have made changes (trunk revision 44763), so that both remote 
debuggers(gdbserver/ssh) will fallback to use none mi command, if mi 
commands fail with "&"
The target still needs to support the none mi "&".

There is a new option as well: UseNoneMiRunCommands
It can be
- Always:  the debugger will use none MI always (even if not in async): 
"next"
- Never: As it used to be. Only use MI commands: "-exec-next"
- FallBack (DEFAULT): In none Async mode will always use MI.
    In async mode the debugger will try MI, but then fallback to none MI

remote debugger always try to run in async (depends on the result of 
"set target async")
none remote debugger has an option (and by default does not try)




More information about the Lazarus mailing list