forked from qt-creator/qt-creator
Debugger: Adding functionality to create full backtrace with cdb.
Task-number: QTCREATORBUG-10916 Change-Id: Ie2675f1bdc1f31679aefac32053cd1c8dd76d2d5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
@@ -365,6 +365,8 @@ CdbEngine::CdbEngine(const DebuggerStartParameters &sp) :
|
|||||||
this, SLOT(operateByInstructionTriggered(bool)));
|
this, SLOT(operateByInstructionTriggered(bool)));
|
||||||
connect(debuggerCore()->action(VerboseLog), SIGNAL(triggered(bool)),
|
connect(debuggerCore()->action(VerboseLog), SIGNAL(triggered(bool)),
|
||||||
this, SLOT(verboseLogTriggered(bool)));
|
this, SLOT(verboseLogTriggered(bool)));
|
||||||
|
connect(debuggerCore()->action(CreateFullBacktrace), SIGNAL(triggered()),
|
||||||
|
this, SLOT(createFullBacktrace()));
|
||||||
setObjectName(QLatin1String("CdbEngine"));
|
setObjectName(QLatin1String("CdbEngine"));
|
||||||
connect(&m_process, SIGNAL(finished(int)), this, SLOT(processFinished()));
|
connect(&m_process, SIGNAL(finished(int)), this, SLOT(processFinished()));
|
||||||
connect(&m_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError()));
|
connect(&m_process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(processError()));
|
||||||
@@ -597,6 +599,16 @@ void CdbEngine::consoleStubExited()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CdbEngine::createFullBacktrace()
|
||||||
|
{
|
||||||
|
postBuiltinCommand("~*kp", 0, &CdbEngine::handleCreateFullBackTrace);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CdbEngine::handleCreateFullBackTrace(const CdbEngine::CdbBuiltinCommandPtr &cmd)
|
||||||
|
{
|
||||||
|
debuggerCore()->openTextEditor(QLatin1String("Backtrace $"), QLatin1String(cmd->joinedReply()));
|
||||||
|
}
|
||||||
|
|
||||||
void CdbEngine::setupEngine()
|
void CdbEngine::setupEngine()
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
@@ -1101,6 +1113,7 @@ bool CdbEngine::hasCapability(unsigned cap) const
|
|||||||
|BreakOnThrowAndCatchCapability // Sort-of: Can break on throw().
|
|BreakOnThrowAndCatchCapability // Sort-of: Can break on throw().
|
||||||
|BreakConditionCapability|TracePointCapability
|
|BreakConditionCapability|TracePointCapability
|
||||||
|BreakModuleCapability
|
|BreakModuleCapability
|
||||||
|
|CreateFullBacktraceCapability
|
||||||
|OperateByInstructionCapability
|
|OperateByInstructionCapability
|
||||||
|RunToLineCapability
|
|RunToLineCapability
|
||||||
|MemoryAddressCapability);
|
|MemoryAddressCapability);
|
||||||
|
|||||||
@@ -156,6 +156,8 @@ private slots:
|
|||||||
void consoleStubProcessStarted();
|
void consoleStubProcessStarted();
|
||||||
void consoleStubExited();
|
void consoleStubExited();
|
||||||
|
|
||||||
|
void createFullBacktrace();
|
||||||
|
|
||||||
void handleDoInterruptInferior(const QString &errorMessage);
|
void handleDoInterruptInferior(const QString &errorMessage);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -227,6 +229,7 @@ private:
|
|||||||
void ensureUsing32BitStackInWow64(const CdbBuiltinCommandPtr &cmd);
|
void ensureUsing32BitStackInWow64(const CdbBuiltinCommandPtr &cmd);
|
||||||
void handleSwitchWow64Stack(const CdbBuiltinCommandPtr &cmd);
|
void handleSwitchWow64Stack(const CdbBuiltinCommandPtr &cmd);
|
||||||
void jumpToAddress(quint64 address);
|
void jumpToAddress(quint64 address);
|
||||||
|
void handleCreateFullBackTrace(const CdbBuiltinCommandPtr &cmd);
|
||||||
|
|
||||||
// Extension commands
|
// Extension commands
|
||||||
void handleThreads(const CdbExtensionCommandPtr &);
|
void handleThreads(const CdbExtensionCommandPtr &);
|
||||||
|
|||||||
Reference in New Issue
Block a user