forked from qt-creator/qt-creator
debugger: rename a few functions
This commit is contained in:
@@ -776,27 +776,27 @@ bool CdbDebugEngine::step(unsigned long executionStatus)
|
|||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::stepExec()
|
void CdbDebugEngine::executeStep()
|
||||||
{
|
{
|
||||||
step(manager()->isReverseDebugging() ? DEBUG_STATUS_REVERSE_STEP_INTO : DEBUG_STATUS_STEP_INTO);
|
step(manager()->isReverseDebugging() ? DEBUG_STATUS_REVERSE_STEP_INTO : DEBUG_STATUS_STEP_INTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::nextExec()
|
void CdbDebugEngine::executeNext()
|
||||||
{
|
{
|
||||||
step(manager()->isReverseDebugging() ? DEBUG_STATUS_REVERSE_STEP_OVER : DEBUG_STATUS_STEP_OVER);
|
step(manager()->isReverseDebugging() ? DEBUG_STATUS_REVERSE_STEP_OVER : DEBUG_STATUS_STEP_OVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::stepIExec()
|
void CdbDebugEngine::executeStepI()
|
||||||
{
|
{
|
||||||
stepExec(); // Step into by instruction (figured out by step)
|
executeStep(); // Step into by instruction (figured out by step)
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::nextIExec()
|
void CdbDebugEngine::executeNextI()
|
||||||
{
|
{
|
||||||
nextExec(); // Step over by instruction (figured out by step)
|
executeNext(); // Step over by instruction (figured out by step)
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::stepOutExec()
|
void CdbDebugEngine::executeStepOut()
|
||||||
{
|
{
|
||||||
if (!manager()->isReverseDebugging())
|
if (!manager()->isReverseDebugging())
|
||||||
step(CdbExtendedExecutionStatusStepOut);
|
step(CdbExtendedExecutionStatusStepOut);
|
||||||
@@ -901,7 +901,7 @@ void CdbDebugEngine::interruptInferior()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::runToLineExec(const QString &fileName, int lineNumber)
|
void CdbDebugEngine::executeRunToLine(const QString &fileName, int lineNumber)
|
||||||
{
|
{
|
||||||
manager()->showDebuggerOutput(LogMisc, tr("Running up to %1:%2...").arg(fileName).arg(lineNumber));
|
manager()->showDebuggerOutput(LogMisc, tr("Running up to %1:%2...").arg(fileName).arg(lineNumber));
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
@@ -915,7 +915,7 @@ void CdbDebugEngine::runToLineExec(const QString &fileName, int lineNumber)
|
|||||||
warning(errorMessage);
|
warning(errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::runToFunctionExec(const QString &functionName)
|
void CdbDebugEngine::executeRunToFunction(const QString &functionName)
|
||||||
{
|
{
|
||||||
manager()->showDebuggerOutput(LogMisc, tr("Running up to function '%1()'...").arg(functionName));
|
manager()->showDebuggerOutput(LogMisc, tr("Running up to function '%1()'...").arg(functionName));
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
@@ -928,7 +928,7 @@ void CdbDebugEngine::runToFunctionExec(const QString &functionName)
|
|||||||
warning(errorMessage);
|
warning(errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CdbDebugEngine::jumpToLineExec(const QString & /* fileName */, int /*lineNumber*/)
|
void CdbDebugEngine::executeJumpToLine(const QString & /* fileName */, int /*lineNumber*/)
|
||||||
{
|
{
|
||||||
warning(tr("Jump to line is not implemented"));
|
warning(tr("Jump to line is not implemented"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,18 +69,18 @@ public:
|
|||||||
virtual void updateWatchData(const WatchData &data);
|
virtual void updateWatchData(const WatchData &data);
|
||||||
virtual unsigned debuggerCapabilities() const;
|
virtual unsigned debuggerCapabilities() const;
|
||||||
|
|
||||||
virtual void stepExec();
|
virtual void executeStep();
|
||||||
virtual void stepOutExec();
|
virtual void executeStepOut();
|
||||||
virtual void nextExec();
|
virtual void executeNext();
|
||||||
virtual void stepIExec();
|
virtual void executeStepI();
|
||||||
virtual void nextIExec();
|
virtual void executeNextI();
|
||||||
|
|
||||||
virtual void continueInferior();
|
virtual void continueInferior();
|
||||||
virtual void interruptInferior();
|
virtual void interruptInferior();
|
||||||
|
|
||||||
virtual void runToLineExec(const QString &fileName, int lineNumber);
|
virtual void executeRunToLine(const QString &fileName, int lineNumber);
|
||||||
virtual void runToFunctionExec(const QString &functionName);
|
virtual void executeRunToFunction(const QString &functionName);
|
||||||
virtual void jumpToLineExec(const QString &fileName, int lineNumber);
|
virtual void executeJumpToLine(const QString &fileName, int lineNumber);
|
||||||
virtual void assignValueInDebugger(const QString &expr, const QString &value);
|
virtual void assignValueInDebugger(const QString &expr, const QString &value);
|
||||||
virtual void executeDebuggerCommand(const QString &command);
|
virtual void executeDebuggerCommand(const QString &command);
|
||||||
|
|
||||||
|
|||||||
@@ -515,29 +515,29 @@ void DebuggerManager::init()
|
|||||||
d->m_actions.reverseDirectionAction->setChecked(false);
|
d->m_actions.reverseDirectionAction->setChecked(false);
|
||||||
|
|
||||||
connect(d->m_actions.continueAction, SIGNAL(triggered()),
|
connect(d->m_actions.continueAction, SIGNAL(triggered()),
|
||||||
this, SLOT(continueExec()));
|
this, SLOT(executeContinue()));
|
||||||
connect(d->m_actions.stopAction, SIGNAL(triggered()),
|
connect(d->m_actions.stopAction, SIGNAL(triggered()),
|
||||||
this, SLOT(interruptDebuggingRequest()));
|
this, SLOT(interruptDebuggingRequest()));
|
||||||
connect(d->m_actions.resetAction, SIGNAL(triggered()),
|
connect(d->m_actions.resetAction, SIGNAL(triggered()),
|
||||||
this, SLOT(exitDebugger()));
|
this, SLOT(exitDebugger()));
|
||||||
connect(d->m_actions.nextAction, SIGNAL(triggered()),
|
connect(d->m_actions.nextAction, SIGNAL(triggered()),
|
||||||
this, SLOT(nextExec()));
|
this, SLOT(executeStepNext()));
|
||||||
connect(d->m_actions.stepAction, SIGNAL(triggered()),
|
connect(d->m_actions.stepAction, SIGNAL(triggered()),
|
||||||
this, SLOT(stepExec()));
|
this, SLOT(executeStep()));
|
||||||
connect(d->m_actions.stepOutAction, SIGNAL(triggered()),
|
connect(d->m_actions.stepOutAction, SIGNAL(triggered()),
|
||||||
this, SLOT(stepOutExec()));
|
this, SLOT(executeStepOut()));
|
||||||
connect(d->m_actions.runToLineAction1, SIGNAL(triggered()),
|
connect(d->m_actions.runToLineAction1, SIGNAL(triggered()),
|
||||||
this, SLOT(runToLineExec()));
|
this, SLOT(executeRunToLine()));
|
||||||
connect(d->m_actions.runToLineAction2, SIGNAL(triggered()),
|
connect(d->m_actions.runToLineAction2, SIGNAL(triggered()),
|
||||||
this, SLOT(runToLineExec()));
|
this, SLOT(executeRunToLine()));
|
||||||
connect(d->m_actions.runToFunctionAction, SIGNAL(triggered()),
|
connect(d->m_actions.runToFunctionAction, SIGNAL(triggered()),
|
||||||
this, SLOT(runToFunctionExec()));
|
this, SLOT(executeRunToFunction()));
|
||||||
connect(d->m_actions.jumpToLineAction1, SIGNAL(triggered()),
|
connect(d->m_actions.jumpToLineAction1, SIGNAL(triggered()),
|
||||||
this, SLOT(jumpToLineExec()));
|
this, SLOT(executeJumpToLine()));
|
||||||
connect(d->m_actions.jumpToLineAction2, SIGNAL(triggered()),
|
connect(d->m_actions.jumpToLineAction2, SIGNAL(triggered()),
|
||||||
this, SLOT(jumpToLineExec()));
|
this, SLOT(executeJumpToLine()));
|
||||||
connect(d->m_actions.returnFromFunctionAction, SIGNAL(triggered()),
|
connect(d->m_actions.returnFromFunctionAction, SIGNAL(triggered()),
|
||||||
this, SLOT(returnExec()));
|
this, SLOT(executeReturn()));
|
||||||
connect(d->m_actions.watchAction1, SIGNAL(triggered()),
|
connect(d->m_actions.watchAction1, SIGNAL(triggered()),
|
||||||
this, SLOT(addToWatchWindow()));
|
this, SLOT(addToWatchWindow()));
|
||||||
connect(d->m_actions.watchAction2, SIGNAL(triggered()),
|
connect(d->m_actions.watchAction2, SIGNAL(triggered()),
|
||||||
@@ -1178,38 +1178,38 @@ QList<Symbol> DebuggerManager::moduleSymbols(const QString &moduleName)
|
|||||||
return d->m_engine->moduleSymbols(moduleName);
|
return d->m_engine->moduleSymbols(moduleName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::stepExec()
|
void DebuggerManager::executeStep()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->m_engine, return);
|
QTC_ASSERT(d->m_engine, return);
|
||||||
resetLocation();
|
resetLocation();
|
||||||
if (theDebuggerBoolSetting(OperateByInstruction))
|
if (theDebuggerBoolSetting(OperateByInstruction))
|
||||||
d->m_engine->stepIExec();
|
d->m_engine->executeStepI();
|
||||||
else
|
else
|
||||||
d->m_engine->stepExec();
|
d->m_engine->executeStep();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::stepOutExec()
|
void DebuggerManager::executeStepOut()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->m_engine, return);
|
QTC_ASSERT(d->m_engine, return);
|
||||||
resetLocation();
|
resetLocation();
|
||||||
d->m_engine->stepOutExec();
|
d->m_engine->executeStepOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::nextExec()
|
void DebuggerManager::executeStepNext()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->m_engine, return);
|
QTC_ASSERT(d->m_engine, return);
|
||||||
resetLocation();
|
resetLocation();
|
||||||
if (theDebuggerBoolSetting(OperateByInstruction))
|
if (theDebuggerBoolSetting(OperateByInstruction))
|
||||||
d->m_engine->nextIExec();
|
d->m_engine->executeNextI();
|
||||||
else
|
else
|
||||||
d->m_engine->nextExec();
|
d->m_engine->executeNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::returnExec()
|
void DebuggerManager::executeReturn()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->m_engine, return);
|
QTC_ASSERT(d->m_engine, return);
|
||||||
resetLocation();
|
resetLocation();
|
||||||
d->m_engine->returnExec();
|
d->m_engine->executeReturn();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::watchPoint()
|
void DebuggerManager::watchPoint()
|
||||||
@@ -1349,7 +1349,7 @@ void DebuggerManager::setBusyCursor(bool busy)
|
|||||||
d->m_watchersWindow->setCursor(cursor);
|
d->m_watchersWindow->setCursor(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::continueExec()
|
void DebuggerManager::executeContinue()
|
||||||
{
|
{
|
||||||
if (d->m_engine)
|
if (d->m_engine)
|
||||||
d->m_engine->continueInferior();
|
d->m_engine->continueInferior();
|
||||||
@@ -1374,7 +1374,7 @@ void DebuggerManager::interruptDebuggingRequest()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::runToLineExec()
|
void DebuggerManager::executeRunToLine()
|
||||||
{
|
{
|
||||||
ITextEditor *textEditor = d->m_plugin->currentTextEditor();
|
ITextEditor *textEditor = d->m_plugin->currentTextEditor();
|
||||||
QTC_ASSERT(textEditor, return);
|
QTC_ASSERT(textEditor, return);
|
||||||
@@ -1382,11 +1382,11 @@ void DebuggerManager::runToLineExec()
|
|||||||
int lineNumber = textEditor->currentLine();
|
int lineNumber = textEditor->currentLine();
|
||||||
if (d->m_engine && !fileName.isEmpty()) {
|
if (d->m_engine && !fileName.isEmpty()) {
|
||||||
STATE_DEBUG(fileName << lineNumber);
|
STATE_DEBUG(fileName << lineNumber);
|
||||||
d->m_engine->runToLineExec(fileName, lineNumber);
|
d->m_engine->executeRunToLine(fileName, lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::runToFunctionExec()
|
void DebuggerManager::executeRunToFunction()
|
||||||
{
|
{
|
||||||
ITextEditor *textEditor = d->m_plugin->currentTextEditor();
|
ITextEditor *textEditor = d->m_plugin->currentTextEditor();
|
||||||
QTC_ASSERT(textEditor, return);
|
QTC_ASSERT(textEditor, return);
|
||||||
@@ -1415,10 +1415,10 @@ void DebuggerManager::runToFunctionExec()
|
|||||||
STATE_DEBUG(functionName);
|
STATE_DEBUG(functionName);
|
||||||
|
|
||||||
if (d->m_engine && !functionName.isEmpty())
|
if (d->m_engine && !functionName.isEmpty())
|
||||||
d->m_engine->runToFunctionExec(functionName);
|
d->m_engine->executeRunToFunction(functionName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::jumpToLineExec()
|
void DebuggerManager::executeJumpToLine()
|
||||||
{
|
{
|
||||||
ITextEditor *textEditor = d->m_plugin->currentTextEditor();
|
ITextEditor *textEditor = d->m_plugin->currentTextEditor();
|
||||||
QTC_ASSERT(textEditor, return);
|
QTC_ASSERT(textEditor, return);
|
||||||
@@ -1426,7 +1426,7 @@ void DebuggerManager::jumpToLineExec()
|
|||||||
int lineNumber = textEditor->currentLine();
|
int lineNumber = textEditor->currentLine();
|
||||||
if (d->m_engine && !fileName.isEmpty()) {
|
if (d->m_engine && !fileName.isEmpty()) {
|
||||||
STATE_DEBUG(fileName << lineNumber);
|
STATE_DEBUG(fileName << lineNumber);
|
||||||
d->m_engine->jumpToLineExec(fileName, lineNumber);
|
d->m_engine->executeJumpToLine(fileName, lineNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -213,9 +213,9 @@ public slots:
|
|||||||
|
|
||||||
void interruptDebuggingRequest();
|
void interruptDebuggingRequest();
|
||||||
|
|
||||||
void jumpToLineExec();
|
void executeJumpToLine();
|
||||||
void runToLineExec();
|
void executeRunToLine();
|
||||||
void runToFunctionExec();
|
void executeRunToFunction();
|
||||||
void toggleBreakpoint();
|
void toggleBreakpoint();
|
||||||
void breakByFunction(const QString &functionName);
|
void breakByFunction(const QString &functionName);
|
||||||
void breakByFunctionMain();
|
void breakByFunctionMain();
|
||||||
@@ -225,11 +225,11 @@ public slots:
|
|||||||
void activateSnapshot(int index);
|
void activateSnapshot(int index);
|
||||||
void removeSnapshot(int index);
|
void removeSnapshot(int index);
|
||||||
|
|
||||||
void stepExec();
|
void executeStep();
|
||||||
void stepOutExec();
|
void executeStepOut();
|
||||||
void nextExec();
|
void executeStepNext();
|
||||||
void continueExec();
|
void executeContinue();
|
||||||
void returnExec();
|
void executeReturn();
|
||||||
void detachDebugger();
|
void detachDebugger();
|
||||||
void makeSnapshot();
|
void makeSnapshot();
|
||||||
|
|
||||||
|
|||||||
@@ -890,7 +890,7 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
|
|||||||
debugMessage(_("APPLYING WORKAROUND #3"));
|
debugMessage(_("APPLYING WORKAROUND #3"));
|
||||||
setState(InferiorStopping);
|
setState(InferiorStopping);
|
||||||
setState(InferiorStopped);
|
setState(InferiorStopped);
|
||||||
nextIExec();
|
executeNextI();
|
||||||
} else if (msg.startsWith("Couldn't get registers: No such process.")) {
|
} else if (msg.startsWith("Couldn't get registers: No such process.")) {
|
||||||
// Happens on archer-tromey-python 6.8.50.20090910-cvs
|
// Happens on archer-tromey-python 6.8.50.20090910-cvs
|
||||||
// There might to be a race between a process shutting down
|
// There might to be a race between a process shutting down
|
||||||
@@ -1268,14 +1268,13 @@ void GdbEngine::handleStopResponse(const GdbMi &data)
|
|||||||
if (isLeavableFunction(funcName, fileName)) {
|
if (isLeavableFunction(funcName, fileName)) {
|
||||||
//debugMessage(_("LEAVING ") + funcName);
|
//debugMessage(_("LEAVING ") + funcName);
|
||||||
++stepCounter;
|
++stepCounter;
|
||||||
m_manager->stepOutExec();
|
m_manager->executeStepOut();
|
||||||
//stepExec();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (isSkippableFunction(funcName, fileName)) {
|
if (isSkippableFunction(funcName, fileName)) {
|
||||||
//debugMessage(_("SKIPPING ") + funcName);
|
//debugMessage(_("SKIPPING ") + funcName);
|
||||||
++stepCounter;
|
++stepCounter;
|
||||||
m_manager->stepExec();
|
m_manager->executeStep();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//if (stepCounter)
|
//if (stepCounter)
|
||||||
@@ -1516,7 +1515,7 @@ void GdbEngine::handleHasPython(const GdbResponse &response)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleExecContinue(const GdbResponse &response)
|
void GdbEngine::handleExecuteContinue(const GdbResponse &response)
|
||||||
{
|
{
|
||||||
if (response.resultClass == GdbResultRunning) {
|
if (response.resultClass == GdbResultRunning) {
|
||||||
// The "running" state is picked up in handleResponse()
|
// The "running" state is picked up in handleResponse()
|
||||||
@@ -1536,7 +1535,7 @@ void GdbEngine::handleExecContinue(const GdbResponse &response)
|
|||||||
showStatusMessage(tr("Stopped."), 5000);
|
showStatusMessage(tr("Stopped."), 5000);
|
||||||
//showStatusMessage(tr("No debug information available. "
|
//showStatusMessage(tr("No debug information available. "
|
||||||
// "Leaving function..."));
|
// "Leaving function..."));
|
||||||
//stepOutExec();
|
//executeStepOut();
|
||||||
} else {
|
} else {
|
||||||
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
|
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
|
||||||
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
|
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
|
||||||
@@ -1756,7 +1755,7 @@ void GdbEngine::continueInferiorInternal()
|
|||||||
QTC_ASSERT(state() == InferiorStopped || state() == InferiorStarting,
|
QTC_ASSERT(state() == InferiorStopped || state() == InferiorStarting,
|
||||||
qDebug() << state());
|
qDebug() << state());
|
||||||
setState(InferiorRunningRequested);
|
setState(InferiorRunningRequested);
|
||||||
postCommand("-exec-continue", RunRequest, CB(handleExecContinue));
|
postCommand("-exec-continue", RunRequest, CB(handleExecuteContinue));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::autoContinueInferior()
|
void GdbEngine::autoContinueInferior()
|
||||||
@@ -1773,7 +1772,7 @@ void GdbEngine::continueInferior()
|
|||||||
showStatusMessage(tr("Running requested..."), 5000);
|
showStatusMessage(tr("Running requested..."), 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::stepExec()
|
void GdbEngine::executeStep()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
@@ -1783,12 +1782,12 @@ void GdbEngine::stepExec()
|
|||||||
if (m_gdbAdapter->isTrkAdapter() && stackHandler->stackSize() > 0)
|
if (m_gdbAdapter->isTrkAdapter() && stackHandler->stackSize() > 0)
|
||||||
postCommand("sal step," + stackHandler->topAddress().toLatin1());
|
postCommand("sal step," + stackHandler->topAddress().toLatin1());
|
||||||
if (manager()->isReverseDebugging())
|
if (manager()->isReverseDebugging())
|
||||||
postCommand("-reverse-step", RunRequest, CB(handleExecStep));
|
postCommand("-reverse-step", RunRequest, CB(handleExecuteStep));
|
||||||
else
|
else
|
||||||
postCommand("-exec-step", RunRequest, CB(handleExecStep));
|
postCommand("-exec-step", RunRequest, CB(handleExecuteStep));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleExecStep(const GdbResponse &response)
|
void GdbEngine::handleExecuteStep(const GdbResponse &response)
|
||||||
{
|
{
|
||||||
if (response.resultClass == GdbResultRunning) {
|
if (response.resultClass == GdbResultRunning) {
|
||||||
// The "running" state is picked up in handleResponse()
|
// The "running" state is picked up in handleResponse()
|
||||||
@@ -1805,7 +1804,7 @@ void GdbEngine::handleExecStep(const GdbResponse &response)
|
|||||||
if (msg.startsWith("Cannot find bounds of current function")) {
|
if (msg.startsWith("Cannot find bounds of current function")) {
|
||||||
if (!m_commandsToRunOnTemporaryBreak.isEmpty())
|
if (!m_commandsToRunOnTemporaryBreak.isEmpty())
|
||||||
flushQueuedCommands();
|
flushQueuedCommands();
|
||||||
stepIExec(); // Fall back to instruction-wise stepping.
|
executeStepI(); // Fall back to instruction-wise stepping.
|
||||||
} else {
|
} else {
|
||||||
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
|
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
|
||||||
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
|
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
|
||||||
@@ -1814,28 +1813,28 @@ void GdbEngine::handleExecStep(const GdbResponse &response)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::stepIExec()
|
void GdbEngine::executeStepI()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
setState(InferiorRunningRequested);
|
setState(InferiorRunningRequested);
|
||||||
showStatusMessage(tr("Step by instruction requested..."), 5000);
|
showStatusMessage(tr("Step by instruction requested..."), 5000);
|
||||||
if (manager()->isReverseDebugging())
|
if (manager()->isReverseDebugging())
|
||||||
postCommand("-reverse-stepi", RunRequest, CB(handleExecContinue));
|
postCommand("-reverse-stepi", RunRequest, CB(handleExecuteContinue));
|
||||||
else
|
else
|
||||||
postCommand("-exec-step-instruction", RunRequest, CB(handleExecContinue));
|
postCommand("-exec-step-instruction", RunRequest, CB(handleExecuteContinue));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::stepOutExec()
|
void GdbEngine::executeStepOut()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
setState(InferiorRunningRequested);
|
setState(InferiorRunningRequested);
|
||||||
showStatusMessage(tr("Finish function requested..."), 5000);
|
showStatusMessage(tr("Finish function requested..."), 5000);
|
||||||
postCommand("-exec-finish", RunRequest, CB(handleExecContinue));
|
postCommand("-exec-finish", RunRequest, CB(handleExecuteContinue));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::nextExec()
|
void GdbEngine::executeNext()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
@@ -1845,12 +1844,12 @@ void GdbEngine::nextExec()
|
|||||||
if (m_gdbAdapter->isTrkAdapter() && stackHandler->stackSize() > 0)
|
if (m_gdbAdapter->isTrkAdapter() && stackHandler->stackSize() > 0)
|
||||||
postCommand("sal next," + stackHandler->topAddress().toLatin1());
|
postCommand("sal next," + stackHandler->topAddress().toLatin1());
|
||||||
if (manager()->isReverseDebugging())
|
if (manager()->isReverseDebugging())
|
||||||
postCommand("-reverse-next", RunRequest, CB(handleExecNext));
|
postCommand("-reverse-next", RunRequest, CB(handleExecuteNext));
|
||||||
else
|
else
|
||||||
postCommand("-exec-next", RunRequest, CB(handleExecNext));
|
postCommand("-exec-next", RunRequest, CB(handleExecuteNext));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleExecNext(const GdbResponse &response)
|
void GdbEngine::handleExecuteNext(const GdbResponse &response)
|
||||||
{
|
{
|
||||||
if (response.resultClass == GdbResultRunning) {
|
if (response.resultClass == GdbResultRunning) {
|
||||||
// The "running" state is picked up in handleResponse()
|
// The "running" state is picked up in handleResponse()
|
||||||
@@ -1867,7 +1866,7 @@ void GdbEngine::handleExecNext(const GdbResponse &response)
|
|||||||
if (msg.startsWith("Cannot find bounds of current function")) {
|
if (msg.startsWith("Cannot find bounds of current function")) {
|
||||||
if (!m_commandsToRunOnTemporaryBreak.isEmpty())
|
if (!m_commandsToRunOnTemporaryBreak.isEmpty())
|
||||||
flushQueuedCommands();
|
flushQueuedCommands();
|
||||||
nextIExec(); // Fall back to instruction-wise stepping.
|
executeNextI(); // Fall back to instruction-wise stepping.
|
||||||
} else {
|
} else {
|
||||||
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
|
showMessageBox(QMessageBox::Critical, tr("Execution Error"),
|
||||||
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
|
tr("Cannot continue debugged process:\n") + QString::fromLocal8Bit(msg));
|
||||||
@@ -1876,19 +1875,19 @@ void GdbEngine::handleExecNext(const GdbResponse &response)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::nextIExec()
|
void GdbEngine::executeNextI()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
setState(InferiorRunningRequested);
|
setState(InferiorRunningRequested);
|
||||||
showStatusMessage(tr("Step next instruction requested..."), 5000);
|
showStatusMessage(tr("Step next instruction requested..."), 5000);
|
||||||
if (manager()->isReverseDebugging())
|
if (manager()->isReverseDebugging())
|
||||||
postCommand("-reverse-nexti", RunRequest, CB(handleExecContinue));
|
postCommand("-reverse-nexti", RunRequest, CB(handleExecuteContinue));
|
||||||
else
|
else
|
||||||
postCommand("-exec-next-instruction", RunRequest, CB(handleExecContinue));
|
postCommand("-exec-next-instruction", RunRequest, CB(handleExecuteContinue));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::runToLineExec(const QString &fileName, int lineNumber)
|
void GdbEngine::executeRunToLine(const QString &fileName, int lineNumber)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
@@ -1896,10 +1895,10 @@ void GdbEngine::runToLineExec(const QString &fileName, int lineNumber)
|
|||||||
showStatusMessage(tr("Run to line %1 requested...").arg(lineNumber), 5000);
|
showStatusMessage(tr("Run to line %1 requested...").arg(lineNumber), 5000);
|
||||||
QByteArray args = '"' + breakLocation(fileName).toLocal8Bit() + '"' + ':'
|
QByteArray args = '"' + breakLocation(fileName).toLocal8Bit() + '"' + ':'
|
||||||
+ QByteArray::number(lineNumber);
|
+ QByteArray::number(lineNumber);
|
||||||
postCommand("-exec-until " + args, RunRequest, CB(handleExecContinue));
|
postCommand("-exec-until " + args, RunRequest, CB(handleExecuteContinue));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::runToFunctionExec(const QString &functionName)
|
void GdbEngine::executeRunToFunction(const QString &functionName)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
@@ -1910,7 +1909,7 @@ void GdbEngine::runToFunctionExec(const QString &functionName)
|
|||||||
showStatusMessage(tr("Run to function %1 requested...").arg(functionName), 5000);
|
showStatusMessage(tr("Run to function %1 requested...").arg(functionName), 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::jumpToLineExec(const QString &fileName, int lineNumber)
|
void GdbEngine::executeJumpToLine(const QString &fileName, int lineNumber)
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
StackFrame frame;
|
StackFrame frame;
|
||||||
@@ -1939,16 +1938,16 @@ void GdbEngine::jumpToLineExec(const QString &fileName, int lineNumber)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::returnExec()
|
void GdbEngine::executeReturn()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
QTC_ASSERT(state() == InferiorStopped, qDebug() << state());
|
||||||
setTokenBarrier();
|
setTokenBarrier();
|
||||||
setState(InferiorRunningRequested);
|
setState(InferiorRunningRequested);
|
||||||
showStatusMessage(tr("Immediate return from function requested..."), 5000);
|
showStatusMessage(tr("Immediate return from function requested..."), 5000);
|
||||||
postCommand("-exec-finish", RunRequest, CB(handleExecReturn));
|
postCommand("-exec-finish", RunRequest, CB(handleExecuteReturn));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GdbEngine::handleExecReturn(const GdbResponse &response)
|
void GdbEngine::handleExecuteReturn(const GdbResponse &response)
|
||||||
{
|
{
|
||||||
if (response.resultClass == GdbResultDone) {
|
if (response.resultClass == GdbResultDone) {
|
||||||
updateAll();
|
updateAll();
|
||||||
|
|||||||
@@ -292,11 +292,11 @@ private: ////////// Inferior Management //////////
|
|||||||
// This should be always the last call in a function.
|
// This should be always the last call in a function.
|
||||||
Q_SLOT virtual void attemptBreakpointSynchronization();
|
Q_SLOT virtual void attemptBreakpointSynchronization();
|
||||||
|
|
||||||
virtual void stepExec();
|
virtual void executeStep();
|
||||||
virtual void stepOutExec();
|
virtual void executeStepOut();
|
||||||
virtual void nextExec();
|
virtual void executeNext();
|
||||||
virtual void stepIExec();
|
virtual void executeStepI();
|
||||||
virtual void nextIExec();
|
virtual void executeNextI();
|
||||||
|
|
||||||
void continueInferiorInternal();
|
void continueInferiorInternal();
|
||||||
void autoContinueInferior();
|
void autoContinueInferior();
|
||||||
@@ -304,16 +304,16 @@ private: ////////// Inferior Management //////////
|
|||||||
virtual void interruptInferior();
|
virtual void interruptInferior();
|
||||||
void interruptInferiorTemporarily();
|
void interruptInferiorTemporarily();
|
||||||
|
|
||||||
virtual void runToLineExec(const QString &fileName, int lineNumber);
|
virtual void executeRunToLine(const QString &fileName, int lineNumber);
|
||||||
virtual void runToFunctionExec(const QString &functionName);
|
virtual void executeRunToFunction(const QString &functionName);
|
||||||
// void handleExecRunToFunction(const GdbResponse &response);
|
// void handleExecRunToFunction(const GdbResponse &response);
|
||||||
virtual void jumpToLineExec(const QString &fileName, int lineNumber);
|
virtual void executeJumpToLine(const QString &fileName, int lineNumber);
|
||||||
virtual void returnExec();
|
virtual void executeReturn();
|
||||||
|
|
||||||
void handleExecContinue(const GdbResponse &response);
|
void handleExecuteContinue(const GdbResponse &response);
|
||||||
void handleExecStep(const GdbResponse &response);
|
void handleExecuteStep(const GdbResponse &response);
|
||||||
void handleExecNext(const GdbResponse &response);
|
void handleExecuteNext(const GdbResponse &response);
|
||||||
void handleExecReturn(const GdbResponse &response);
|
void handleExecuteReturn(const GdbResponse &response);
|
||||||
|
|
||||||
qint64 inferiorPid() const { return m_manager->inferiorPid(); }
|
qint64 inferiorPid() const { return m_manager->inferiorPid(); }
|
||||||
void handleInferiorPidChanged(qint64 pid) { manager()->notifyInferiorPidChanged(pid); }
|
void handleInferiorPidChanged(qint64 pid) { manager()->notifyInferiorPidChanged(pid); }
|
||||||
|
|||||||
@@ -77,19 +77,19 @@ public:
|
|||||||
virtual void detachDebugger() {}
|
virtual void detachDebugger() {}
|
||||||
virtual void updateWatchData(const WatchData &data) = 0;
|
virtual void updateWatchData(const WatchData &data) = 0;
|
||||||
|
|
||||||
virtual void stepExec() = 0;
|
virtual void executeStep() = 0;
|
||||||
virtual void stepOutExec() = 0;
|
virtual void executeStepOut() = 0;
|
||||||
virtual void nextExec() = 0;
|
virtual void executeNext() = 0;
|
||||||
virtual void stepIExec() = 0;
|
virtual void executeStepI() = 0;
|
||||||
virtual void nextIExec() = 0;
|
virtual void executeNextI() = 0;
|
||||||
virtual void returnExec() {}
|
virtual void executeReturn() {}
|
||||||
|
|
||||||
virtual void continueInferior() = 0;
|
virtual void continueInferior() = 0;
|
||||||
virtual void interruptInferior() = 0;
|
virtual void interruptInferior() = 0;
|
||||||
|
|
||||||
virtual void runToLineExec(const QString &fileName, int lineNumber) = 0;
|
virtual void executeRunToLine(const QString &fileName, int lineNumber) = 0;
|
||||||
virtual void runToFunctionExec(const QString &functionName) = 0;
|
virtual void executeRunToFunction(const QString &functionName) = 0;
|
||||||
virtual void jumpToLineExec(const QString &fileName, int lineNumber) = 0;
|
virtual void executeJumpToLine(const QString &fileName, int lineNumber) = 0;
|
||||||
virtual void assignValueInDebugger(const QString &expr, const QString &value) = 0;
|
virtual void assignValueInDebugger(const QString &expr, const QString &value) = 0;
|
||||||
virtual void executeDebuggerCommand(const QString &command) = 0;
|
virtual void executeDebuggerCommand(const QString &command) = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -346,55 +346,55 @@ void ScriptEngine::interruptInferior()
|
|||||||
XSDEBUG("ScriptEngine::interruptInferior()");
|
XSDEBUG("ScriptEngine::interruptInferior()");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::stepExec()
|
void ScriptEngine::executeStep()
|
||||||
{
|
{
|
||||||
//SDEBUG("ScriptEngine::stepExec()");
|
//SDEBUG("ScriptEngine::stepExec()");
|
||||||
m_stopped = false;
|
m_stopped = false;
|
||||||
m_stopOnNextLine = true;
|
m_stopOnNextLine = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::stepIExec()
|
void ScriptEngine::executeStepI()
|
||||||
{
|
{
|
||||||
//SDEBUG("ScriptEngine::stepIExec()");
|
//SDEBUG("ScriptEngine::stepIExec()");
|
||||||
m_stopped = false;
|
m_stopped = false;
|
||||||
m_stopOnNextLine = true;
|
m_stopOnNextLine = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::stepOutExec()
|
void ScriptEngine::executeStepOut()
|
||||||
{
|
{
|
||||||
//SDEBUG("ScriptEngine::stepOutExec()");
|
//SDEBUG("ScriptEngine::stepOutExec()");
|
||||||
m_stopped = false;
|
m_stopped = false;
|
||||||
m_stopOnNextLine = true;
|
m_stopOnNextLine = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::nextExec()
|
void ScriptEngine::executeNext()
|
||||||
{
|
{
|
||||||
//SDEBUG("ScriptEngine::nextExec()");
|
//SDEBUG("ScriptEngine::nextExec()");
|
||||||
m_stopped = false;
|
m_stopped = false;
|
||||||
m_stopOnNextLine = true;
|
m_stopOnNextLine = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::nextIExec()
|
void ScriptEngine::executeNextI()
|
||||||
{
|
{
|
||||||
//SDEBUG("ScriptEngine::nextIExec()");
|
//SDEBUG("ScriptEngine::nextIExec()");
|
||||||
m_stopped = false;
|
m_stopped = false;
|
||||||
m_stopOnNextLine = true;
|
m_stopOnNextLine = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::runToLineExec(const QString &fileName, int lineNumber)
|
void ScriptEngine::executeRunToLine(const QString &fileName, int lineNumber)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fileName)
|
Q_UNUSED(fileName)
|
||||||
Q_UNUSED(lineNumber)
|
Q_UNUSED(lineNumber)
|
||||||
SDEBUG("FIXME: ScriptEngine::runToLineExec()");
|
SDEBUG("FIXME: ScriptEngine::runToLineExec()");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::runToFunctionExec(const QString &functionName)
|
void ScriptEngine::executeRunToFunction(const QString &functionName)
|
||||||
{
|
{
|
||||||
Q_UNUSED(functionName)
|
Q_UNUSED(functionName)
|
||||||
XSDEBUG("FIXME: ScriptEngine::runToFunctionExec()");
|
XSDEBUG("FIXME: ScriptEngine::runToFunctionExec()");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptEngine::jumpToLineExec(const QString &fileName, int lineNumber)
|
void ScriptEngine::executeJumpToLine(const QString &fileName, int lineNumber)
|
||||||
{
|
{
|
||||||
Q_UNUSED(fileName)
|
Q_UNUSED(fileName)
|
||||||
Q_UNUSED(lineNumber)
|
Q_UNUSED(lineNumber)
|
||||||
|
|||||||
@@ -62,11 +62,11 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// IDebuggerEngine implementation
|
// IDebuggerEngine implementation
|
||||||
void stepExec();
|
void executeStep();
|
||||||
void stepOutExec();
|
void executeStepOut();
|
||||||
void nextExec();
|
void executeNext();
|
||||||
void stepIExec();
|
void executeStepI();
|
||||||
void nextIExec();
|
void executeNextI();
|
||||||
|
|
||||||
void shutdown();
|
void shutdown();
|
||||||
void setToolTipExpression(const QPoint &mousePos,
|
void setToolTipExpression(const QPoint &mousePos,
|
||||||
@@ -79,9 +79,9 @@ private:
|
|||||||
Q_SLOT void runInferior();
|
Q_SLOT void runInferior();
|
||||||
void interruptInferior();
|
void interruptInferior();
|
||||||
|
|
||||||
void runToLineExec(const QString &fileName, int lineNumber);
|
void executeRunToLine(const QString &fileName, int lineNumber);
|
||||||
void runToFunctionExec(const QString &functionName);
|
void executeRunToFunction(const QString &functionName);
|
||||||
void jumpToLineExec(const QString &fileName, int lineNumber);
|
void executeJumpToLine(const QString &fileName, int lineNumber);
|
||||||
|
|
||||||
void activateFrame(int index);
|
void activateFrame(int index);
|
||||||
void selectThread(int index);
|
void selectThread(int index);
|
||||||
|
|||||||
Reference in New Issue
Block a user