debugger: add a context menu action to the stackview to create a full

backtrace in the main editor.

Useful for sending bug reports.
This commit is contained in:
hjk
2010-03-29 18:44:02 +02:00
parent 89196e5c6a
commit c3afba0f0d
10 changed files with 53 additions and 3 deletions

View File

@@ -188,6 +188,8 @@ GdbEngine::GdbEngine(DebuggerManager *manager) : IDebuggerEngine(manager)
connect(theDebuggerAction(AutoDerefPointers), SIGNAL(valueChanged(QVariant)),
this, SLOT(setAutoDerefPointers(QVariant)));
connect(theDebuggerAction(CreateFullBacktrace), SIGNAL(triggered()),
this, SLOT(createFullBacktrace()));
}
void GdbEngine::connectDebuggingHelperActions()
@@ -1795,7 +1797,8 @@ unsigned GdbEngine::debuggerCapabilities() const
| RegisterCapability | ShowMemoryCapability
| JumpToLineCapability | ReloadModuleCapability
| ReloadModuleSymbolsCapability | BreakOnThrowAndCatchCapability
| ReturnFromFunctionCapability;
| ReturnFromFunctionCapability
| CreateFullBacktraceCapability;
}
void GdbEngine::continueInferiorInternal()
@@ -4350,6 +4353,20 @@ bool GdbEngine::hasPython() const
return m_hasPython;
}
void GdbEngine::createFullBacktrace()
{
postCommand("thread apply all bt", NeedsStop, CB(handleCreateFullBacktrace));
}
void GdbEngine::handleCreateFullBacktrace(const GdbResponse &response)
{
if (response.resultClass == GdbResultDone) {
m_manager->openTextEditor(_("Backtrace $"),
_(response.data.findChild("consolestreamoutput").data()));
}
}
//
// Factory
//