Commit 60f5b5af authored by hjk's avatar hjk

Debugger: Fail more gracefully on "ill" LLDB engines

Less need to use the hard Debug->Abort

Change-Id: Ib019792063924549ace58a63ccef994dbfaa00dc
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 99271c23
......@@ -1195,6 +1195,9 @@ class Dumper(DumperBase):
else:
error = self.process.Continue()
self.reportError(error)
# Happens when attaching to GDBserver.
if not error.Success():
self.reportState("inferiorill")
def quitDebugger(self, _ = None):
self.reportState("inferiorshutdownrequested")
......@@ -1451,7 +1454,13 @@ class Dumper(DumperBase):
def shutdownInferior(self, _ = None):
self.isShuttingDown_ = True
self.process.Kill()
if self.process is None:
self.reportState("inferiorshutdownok")
else:
state = self.process.GetState()
if state == lldb.eStateStopped:
self.process.Kill()
self.reportState("inferiorshutdownok")
def quit(self, _ = None):
self.reportState("engineshutdownok")
......
......@@ -1216,6 +1216,8 @@ void LldbEngine::refreshState(const GdbMi &reportedState)
notifyInferiorStopOk();
else if (newState == "inferiorstopfailed")
notifyInferiorStopFailed();
else if (newState == "inferiorill")
notifyInferiorIll();
else if (newState == "enginesetupok")
notifyEngineSetupOk();
else if (newState == "enginesetupfailed")
......
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