Debugger[CDB]: Disable watchers.

As they work only in a very limited way and slow down debugging.
This commit is contained in:
Friedemann Kleint
2010-04-16 16:36:00 +02:00
parent 6538ca63bc
commit 70153d1c73
3 changed files with 11 additions and 4 deletions

View File

@@ -130,6 +130,7 @@ enum DebuggerCapabilities
BreakOnThrowAndCatchCapability = 0x200,
ReturnFromFunctionCapability = 0x400,
CreateFullBacktraceCapability = 0x800,
AddWatcherCapability = 0x1000
};
enum LogChannel

View File

@@ -1817,7 +1817,8 @@ unsigned GdbEngine::debuggerCapabilities() const
| JumpToLineCapability | ReloadModuleCapability
| ReloadModuleSymbolsCapability | BreakOnThrowAndCatchCapability
| ReturnFromFunctionCapability
| CreateFullBacktraceCapability;
| CreateFullBacktraceCapability
| AddWatcherCapability;
}
void GdbEngine::continueInferiorInternal()

View File

@@ -273,11 +273,15 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
QMenu menu;
QAction *actInsertNewWatchItem = menu.addAction(tr("Insert New Watch Item"));
QAction *actSelectWidgetToWatch = menu.addAction(tr("Select Widget to Watch"));
const bool actionsEnabled = m_manager->debuggerActionsEnabled();
const unsigned engineCapabilities = m_manager->debuggerCapabilities();
const bool canHandleWatches = actionsEnabled && (engineCapabilities & AddWatcherCapability);
QAction *actInsertNewWatchItem = menu.addAction(tr("Insert New Watch Item"));
actInsertNewWatchItem->setEnabled(canHandleWatches);
QAction *actSelectWidgetToWatch = menu.addAction(tr("Select Widget to Watch"));
actSelectWidgetToWatch->setEnabled(canHandleWatches);
const QString address = model()->data(mi0, AddressRole).toString();
QAction *actWatchKnownMemory = 0;
QAction *actWatchUnknownMemory = new QAction(tr("Open Memory Editor..."), &menu);
@@ -292,6 +296,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
QAction *actWatchOrRemove;
if (m_type == LocalsType) {
actWatchOrRemove = theDebuggerAction(WatchExpression)->updatedAction(exp);
actWatchOrRemove->setEnabled(canHandleWatches);
} else {
actWatchOrRemove = theDebuggerAction(RemoveWatchExpression)->updatedAction(exp);
// Also for the case where the user cleared the expression.