forked from qt-creator/qt-creator
Debugger: Fail more gracefully on "ill" LLDB engines
Less need to use the hard Debug->Abort Change-Id: Ib019792063924549ace58a63ccef994dbfaa00dc Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user