[Lldb-commits] [PATCH] Fix handling of hijacked events in synchronous mode
jingham at apple.com
jingham at apple.com
Fri May 8 10:48:36 PDT 2015
Why do you ever need to run the MI in sync mode? If you want to get events when the process changes state, use async mode, that's what it is for. Changing the nature of "sync" so it starts producing events is also the wrong solution.
Jim
> On May 8, 2015, at 10:43 AM, Ilia K <ki.stfu at gmail.com> wrote:
>
> In http://reviews.llvm.org/D9371#169145, @jingham wrote:
>
>> *stopped has nothing to do with lldb events. It just means that you issues a command to the MI that ran the target and stopped. If you are running in async mode, you start the target going, then wait for a stopped event, then print *stopped and the stop reason. If you are running in sync mode, you issue the SB API call that continues the target, and that call won't return till the process has either stopped or exited. At that point you can generate the *stopped reply to the original MI request. You don't need to change how LLDB's sync mode works to achieve this so far as I can see.
>
>
> The problem is lldb-mi actually doesn't know what the commands do. There are specific set of commands that can cause that event, but I don't want do something like this:
>
> if (IsSync() && (
> command == "-exec-run" ||
> command == "-exec-step" ||
> command == "-exec-next" ||
> command == "-exec-..."
> )) {
> <print a fake *stopped notification>
> }
>
> The lldb-mi has event subsystem and in such case I should generate a fake *stopped message and put it into listener's queue instead of printing it after execution of command. In addition lldb-mi can execute CL commands using the -interpreter-exec and therefore I'll need to looking for r/ru/run/process la/proce launch and so on to generate my fake *stopped. It's too big set of commands (including their reduction) and I sure that it's wrong solution.
>
>
> http://reviews.llvm.org/D9371
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
More information about the lldb-commits
mailing list