[lldb-dev] [Bug 50269] [Python API] Process state "unloaded" even after successfully connecting to debugserver.

via lldb-dev lldb-dev at lists.llvm.org
Mon May 10 22:43:28 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50269

Nisarg Jhaveri <nisargjhaveri at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Nisarg Jhaveri <nisargjhaveri at gmail.com> ---
#1 worked. If I handle the events just after running `process connect ...` and
before `process launch`, it successfully updates the process state to connected
and launches correctly.

#2 still didn't work. Even with `debugger.SetAsync(False)`, it was showing the
same behaviour.

I remember looking at SBDebugger.HandleCommand source code and looks like it is
the one that handles events when async mode is off. So, I tried the following
and it worked.

>    debugger.SetAsync(False);
>    for command in commands: debugger.HandleCommand(command)
>    debugger.SetAsync(True);

Looks like there is some difference in behaviour between
`SBDebugger.HandleCommand` and `SBCommandInterpreter.HandleCommand`.

Though, thanks a lot for pointing out that we need to consume the events for it
to work. This solves my issue for now.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20210511/976751ed/attachment.html>


More information about the lldb-dev mailing list