Commit 70153d1c authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger[CDB]: Disable watchers.

As they work only in a very limited way and slow down debugging.
parent 6538ca63
......@@ -130,6 +130,7 @@ enum DebuggerCapabilities
BreakOnThrowAndCatchCapability = 0x200,
ReturnFromFunctionCapability = 0x400,
CreateFullBacktraceCapability = 0x800,
AddWatcherCapability = 0x1000
};
enum LogChannel
......
......@@ -1817,7 +1817,8 @@ unsigned GdbEngine::debuggerCapabilities() const
| JumpToLineCapability | ReloadModuleCapability
| ReloadModuleSymbolsCapability | BreakOnThrowAndCatchCapability
| ReturnFromFunctionCapability
| CreateFullBacktraceCapability;
| CreateFullBacktraceCapability
| AddWatcherCapability;
}
void GdbEngine::continueInferiorInternal()
......
......@@ -273,11 +273,15 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
QMenu menu;
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 bool actionsEnabled = m_manager->debuggerActionsEnabled();
const unsigned engineCapabilities = m_manager->debuggerCapabilities();
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.
......
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