Debugger: Do not abort debugger on "Engine Ill" for coredump

Even without the stack, the user can find interesting stuff by exploring
the memory, globals etc.

Change-Id: I867d26b09a45425d97c4f3ef6d0528074c25e75f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
hjk
2016-01-04 16:54:50 +01:00
parent c943ab2d30
commit 8b847bcf19

View File

@@ -244,18 +244,20 @@ void GdbCoreEngine::handleTargetCore(const DebuggerResponse &response)
{ {
CHECK_STATE(EngineRunRequested); CHECK_STATE(EngineRunRequested);
notifyEngineRunOkAndInferiorUnrunnable(); notifyEngineRunOkAndInferiorUnrunnable();
if (response.resultClass == ResultDone) { showMessage(tr("Attached to core."), StatusBar);
showMessage(tr("Attached to core."), StatusBar); if (response.resultClass == ResultError) {
// Due to the auto-solib-add off setting, we don't have any // We'll accept any kind of error e.g. &"Cannot access memory at address 0x2abc2a24\n"
// symbols yet. Load them in order of importance. // Even without the stack, the user can find interesting stuff by exploring
reloadStack(); // the memory, globals etc.
reloadModulesInternal(); showStatusMessage(tr("Attach to core \"%1\" failed:").arg(runParameters().coreFile)
runCommand({"p 5", NoFlags, CB(handleRoundTrip)}); + QLatin1Char('\n') + QString::fromLocal8Bit(response.data["msg"].data())
return; + QLatin1Char('\n') + tr("Continuing nevertheless."));
} }
showStatusMessage(tr("Attach to core \"%1\" failed:").arg(runParameters().coreFile) // Due to the auto-solib-add off setting, we don't have any
+ QLatin1Char('\n') + QString::fromLocal8Bit(response.data["msg"].data())); // symbols yet. Load them in order of importance.
notifyEngineIll(); reloadStack();
reloadModulesInternal();
runCommand({"p 5", NoFlags, CB(handleRoundTrip)});
} }
void GdbCoreEngine::handleRoundTrip(const DebuggerResponse &response) void GdbCoreEngine::handleRoundTrip(const DebuggerResponse &response)