Commit 60f5b5af authored by hjk's avatar hjk
Browse files

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): ...@@ -1195,6 +1195,9 @@ class Dumper(DumperBase):
else: else:
error = self.process.Continue() error = self.process.Continue()
self.reportError(error) self.reportError(error)
# Happens when attaching to GDBserver.
if not error.Success():
self.reportState("inferiorill")
def quitDebugger(self, _ = None): def quitDebugger(self, _ = None):
self.reportState("inferiorshutdownrequested") self.reportState("inferiorshutdownrequested")
...@@ -1451,7 +1454,13 @@ class Dumper(DumperBase): ...@@ -1451,7 +1454,13 @@ class Dumper(DumperBase):
def shutdownInferior(self, _ = None): def shutdownInferior(self, _ = None):
self.isShuttingDown_ = True 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): def quit(self, _ = None):
self.reportState("engineshutdownok") self.reportState("engineshutdownok")
......
...@@ -1216,6 +1216,8 @@ void LldbEngine::refreshState(const GdbMi &reportedState) ...@@ -1216,6 +1216,8 @@ void LldbEngine::refreshState(const GdbMi &reportedState)
notifyInferiorStopOk(); notifyInferiorStopOk();
else if (newState == "inferiorstopfailed") else if (newState == "inferiorstopfailed")
notifyInferiorStopFailed(); notifyInferiorStopFailed();
else if (newState == "inferiorill")
notifyInferiorIll();
else if (newState == "enginesetupok") else if (newState == "enginesetupok")
notifyEngineSetupOk(); notifyEngineSetupOk();
else if (newState == "enginesetupfailed") 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