Commit 573ca3ad authored by hjk's avatar hjk

debugger: rename StepByInstruction into OperateByInstruction

parent d42475fd
...@@ -152,11 +152,15 @@ DebuggerSettings *DebuggerSettings::instance() ...@@ -152,11 +152,15 @@ DebuggerSettings *DebuggerSettings::instance()
instance->insertItem(LogTimeStamps, item); instance->insertItem(LogTimeStamps, item);
item = new SavedAction(instance); item = new SavedAction(instance);
item->setText(tr("Step by instruction")); item->setText(tr("Operate by instruction"));
item->setCheckable(true); item->setCheckable(true);
item->setDefaultValue(false); item->setDefaultValue(false);
item->setIcon(QIcon(":/debugger/images/debugger_stepoverproc_small.png")); item->setIcon(QIcon(":/debugger/images/debugger_stepoverproc_small.png"));
instance->insertItem(StepByInstruction, item); item->setToolTip(tr("This switches the debugger to instruction-wise "
"operation mode. In this mode, stepping operates on single "
"instructions and the source location view also shows the "
"disassembled instructions."));
instance->insertItem(OperateByInstruction, item);
// //
// Locals & Watchers // Locals & Watchers
......
...@@ -77,7 +77,7 @@ enum DebuggerActionCode ...@@ -77,7 +77,7 @@ enum DebuggerActionCode
AutoQuit, AutoQuit,
LockView, LockView,
LogTimeStamps, LogTimeStamps,
StepByInstruction, OperateByInstruction,
RecheckDebuggingHelpers, RecheckDebuggingHelpers,
UseDebuggingHelpers, UseDebuggingHelpers,
...@@ -127,7 +127,8 @@ Core::Utils::SavedAction *theDebuggerAction(int code); ...@@ -127,7 +127,8 @@ Core::Utils::SavedAction *theDebuggerAction(int code);
bool theDebuggerBoolSetting(int code); bool theDebuggerBoolSetting(int code);
QString theDebuggerStringSetting(int code); QString theDebuggerStringSetting(int code);
struct DebuggerManagerActions { struct DebuggerManagerActions
{
QAction *continueAction; QAction *continueAction;
QAction *stopAction; QAction *stopAction;
QAction *resetAction; // FIXME: Should not be needed in a stable release QAction *resetAction; // FIXME: Should not be needed in a stable release
......
...@@ -511,8 +511,8 @@ void DebuggerManager::init() ...@@ -511,8 +511,8 @@ void DebuggerManager::init()
connect(theDebuggerAction(WatchPoint), SIGNAL(triggered()), connect(theDebuggerAction(WatchPoint), SIGNAL(triggered()),
this, SLOT(watchPoint())); this, SLOT(watchPoint()));
connect(theDebuggerAction(StepByInstruction), SIGNAL(triggered()), connect(theDebuggerAction(OperateByInstruction), SIGNAL(triggered()),
this, SLOT(stepByInstructionTriggered())); this, SLOT(operateByInstructionTriggered()));
d->m_breakDock = d->m_mainWindow->addDockForWidget(d->m_breakWindow); d->m_breakDock = d->m_mainWindow->addDockForWidget(d->m_breakWindow);
...@@ -1100,7 +1100,7 @@ void DebuggerManager::stepExec() ...@@ -1100,7 +1100,7 @@ void DebuggerManager::stepExec()
{ {
QTC_ASSERT(d->m_engine, return); QTC_ASSERT(d->m_engine, return);
resetLocation(); resetLocation();
if (theDebuggerBoolSetting(StepByInstruction)) if (theDebuggerBoolSetting(OperateByInstruction))
d->m_engine->stepIExec(); d->m_engine->stepIExec();
else else
d->m_engine->stepExec(); d->m_engine->stepExec();
...@@ -1117,7 +1117,7 @@ void DebuggerManager::nextExec() ...@@ -1117,7 +1117,7 @@ void DebuggerManager::nextExec()
{ {
QTC_ASSERT(d->m_engine, return); QTC_ASSERT(d->m_engine, return);
resetLocation(); resetLocation();
if (theDebuggerBoolSetting(StepByInstruction)) if (theDebuggerBoolSetting(OperateByInstruction))
d->m_engine->nextIExec(); d->m_engine->nextIExec();
else else
d->m_engine->nextExec(); d->m_engine->nextExec();
...@@ -1350,7 +1350,7 @@ void DebuggerManager::fileOpen(const QString &fileName) ...@@ -1350,7 +1350,7 @@ void DebuggerManager::fileOpen(const QString &fileName)
emit gotoLocationRequested(frame, false); emit gotoLocationRequested(frame, false);
} }
void DebuggerManager::stepByInstructionTriggered() void DebuggerManager::operateByInstructionTriggered()
{ {
QTC_ASSERT(d->m_stackHandler, return); QTC_ASSERT(d->m_stackHandler, return);
StackFrame frame = d->m_stackHandler->currentFrame(); StackFrame frame = d->m_stackHandler->currentFrame();
......
...@@ -248,7 +248,7 @@ private slots: ...@@ -248,7 +248,7 @@ private slots:
void clearStatusMessage(); void clearStatusMessage();
void attemptBreakpointSynchronization(); void attemptBreakpointSynchronization();
void reloadFullStack(); void reloadFullStack();
void stepByInstructionTriggered(); void operateByInstructionTriggered();
void startFailed(); void startFailed();
private: private:
......
...@@ -120,7 +120,7 @@ const char * const TOGGLE_BREAK = "Debugger.ToggleBreak"; ...@@ -120,7 +120,7 @@ const char * const TOGGLE_BREAK = "Debugger.ToggleBreak";
const char * const BREAK_BY_FUNCTION = "Debugger.BreakByFunction"; const char * const BREAK_BY_FUNCTION = "Debugger.BreakByFunction";
const char * const BREAK_AT_MAIN = "Debugger.BreakAtMain"; const char * const BREAK_AT_MAIN = "Debugger.BreakAtMain";
const char * const ADD_TO_WATCH = "Debugger.AddToWatch"; const char * const ADD_TO_WATCH = "Debugger.AddToWatch";
const char * const STEP_BY_INSTRUCTION = "Debugger.StepByInstruction"; const char * const OPERATE_BY_INSTRUCTION = "Debugger.OperateByInstruction";
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
const char * const INTERRUPT_KEY = "Shift+F5"; const char * const INTERRUPT_KEY = "Shift+F5";
...@@ -686,10 +686,6 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess ...@@ -686,10 +686,6 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY)); cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY));
mdebug->addAction(cmd); mdebug->addAction(cmd);
cmd = am->registerAction(theDebuggerAction(StepByInstruction),
Constants::STEP_BY_INSTRUCTION, debuggercontext);
mdebug->addAction(cmd);
cmd = am->registerAction(actions.runToLineAction, cmd = am->registerAction(actions.runToLineAction,
Constants::RUN_TO_LINE, debuggercontext); Constants::RUN_TO_LINE, debuggercontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY)); cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY));
...@@ -716,6 +712,10 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess ...@@ -716,6 +712,10 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Break"), globalcontext); cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Break"), globalcontext);
mdebug->addAction(cmd); mdebug->addAction(cmd);
cmd = am->registerAction(theDebuggerAction(OperateByInstruction),
Constants::OPERATE_BY_INSTRUCTION, debuggercontext);
mdebug->addAction(cmd);
cmd = am->registerAction(actions.breakAction, cmd = am->registerAction(actions.breakAction,
Constants::TOGGLE_BREAK, cppeditorcontext); Constants::TOGGLE_BREAK, cppeditorcontext);
cmd->setDefaultKeySequence(QKeySequence(Constants::TOGGLE_BREAK_KEY)); cmd->setDefaultKeySequence(QKeySequence(Constants::TOGGLE_BREAK_KEY));
...@@ -829,7 +829,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess ...@@ -829,7 +829,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
debugToolBarLayout->addWidget(toolButton(am->command(Constants::NEXT)->action())); debugToolBarLayout->addWidget(toolButton(am->command(Constants::NEXT)->action()));
debugToolBarLayout->addWidget(toolButton(am->command(Constants::STEP)->action())); debugToolBarLayout->addWidget(toolButton(am->command(Constants::STEP)->action()));
debugToolBarLayout->addWidget(toolButton(am->command(Constants::STEPOUT)->action())); debugToolBarLayout->addWidget(toolButton(am->command(Constants::STEPOUT)->action()));
debugToolBarLayout->addWidget(toolButton(am->command(Constants::STEP_BY_INSTRUCTION)->action())); debugToolBarLayout->addWidget(toolButton(am->command(Constants::OPERATE_BY_INSTRUCTION)->action()));
#ifdef USE_REVERSE_DEBUGGING #ifdef USE_REVERSE_DEBUGGING
debugToolBarLayout->addWidget(new Core::Utils::StyledSeparator); debugToolBarLayout->addWidget(new Core::Utils::StyledSeparator);
debugToolBarLayout->addWidget(toolButton(am->command(Constants::REVERSE)->action())); debugToolBarLayout->addWidget(toolButton(am->command(Constants::REVERSE)->action()));
...@@ -1093,7 +1093,7 @@ void DebuggerPlugin::resetLocation() ...@@ -1093,7 +1093,7 @@ void DebuggerPlugin::resetLocation()
void DebuggerPlugin::gotoLocation(const Debugger::Internal::StackFrame &frame, bool setMarker) void DebuggerPlugin::gotoLocation(const Debugger::Internal::StackFrame &frame, bool setMarker)
{ {
if (theDebuggerBoolSetting(StepByInstruction) || !frame.isUsable()) { if (theDebuggerBoolSetting(OperateByInstruction) || !frame.isUsable()) {
if (!m_disassemblerViewAgent) if (!m_disassemblerViewAgent)
m_disassemblerViewAgent = new DisassemblerViewAgent(m_manager); m_disassemblerViewAgent = new DisassemblerViewAgent(m_manager);
m_disassemblerViewAgent->setFrame(frame); m_disassemblerViewAgent->setFrame(frame);
......
...@@ -2360,7 +2360,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response) ...@@ -2360,7 +2360,7 @@ void GdbEngine::handleStackListFrames(const GdbResponse &response)
theDebuggerAction(ExpandStack)->setEnabled(canExpand); theDebuggerAction(ExpandStack)->setEnabled(canExpand);
manager()->stackHandler()->setFrames(stackFrames, canExpand); manager()->stackHandler()->setFrames(stackFrames, canExpand);
if (topFrame != -1 || theDebuggerBoolSetting(StepByInstruction)) { if (topFrame != -1 || theDebuggerBoolSetting(OperateByInstruction)) {
const StackFrame &frame = manager()->stackHandler()->currentFrame(); const StackFrame &frame = manager()->stackHandler()->currentFrame();
gotoLocation(frame, true); gotoLocation(frame, true);
} }
......
...@@ -173,7 +173,7 @@ Qt::ItemFlags StackHandler::flags(const QModelIndex &index) const ...@@ -173,7 +173,7 @@ Qt::ItemFlags StackHandler::flags(const QModelIndex &index) const
return QAbstractTableModel::flags(index); return QAbstractTableModel::flags(index);
const StackFrame &frame = m_stackFrames.at(index.row()); const StackFrame &frame = m_stackFrames.at(index.row());
const bool isValid = (!frame.file.isEmpty() && !frame.function.isEmpty()) const bool isValid = (!frame.file.isEmpty() && !frame.function.isEmpty())
|| theDebuggerBoolSetting(StepByInstruction); || theDebuggerBoolSetting(OperateByInstruction);
return isValid ? QAbstractTableModel::flags(index) : Qt::ItemFlags(0); return isValid ? QAbstractTableModel::flags(index) : Qt::ItemFlags(0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment