Commit 846d8981 authored by Filipe Azevedo's avatar Filipe Azevedo Committed by hjk

Fix unstoppable debugger

For some reason sometimes a user stop request with lldb can trigger
a spontaneous stop, avoiding the debugger to stop correctly.
This change fix the issue by emitting the correct states from
lldbbridge.py.

Change-Id: Ib8a2f4875824f4fff426b2d5e0fc4a79ce48c68e
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 76006a13
......@@ -1240,9 +1240,7 @@ class Dumper(DumperBase):
if not skipEventReporting:
self.eventState = state
if state == lldb.eStateExited:
if self.isShuttingDown_:
self.reportState("inferiorshutdownok")
else:
if not self.isShuttingDown_:
self.reportState("inferiorexited")
self.report('exited={status="%s",desc="%s"}'
% (self.process.GetExitStatus(), self.process.GetExitDescription()))
......@@ -1272,7 +1270,7 @@ class Dumper(DumperBase):
return
if self.isInterrupting_:
self.isInterrupting_ = False
self.reportState("stopped")
self.reportState("inferiorstopok")
elif self.ignoreStops > 0:
self.ignoreStops -= 1
self.process.Continue()
......
......@@ -910,6 +910,8 @@ void LldbEngine::handleStateNotification(const GdbMi &reportedState)
}
} else if (newState == "inferiorstopok") {
notifyInferiorStopOk();
if (!isDying())
updateAll();
} else if (newState == "inferiorstopfailed")
notifyInferiorStopFailed();
else if (newState == "inferiorill")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment