forked from qt-creator/qt-creator
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: hjk <hjk@qt.io>
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user