forked from qt-creator/qt-creator
Debugger[CDB]: Disable watchers.
As they work only in a very limited way and slow down debugging.
This commit is contained in:
@@ -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;
|
||||
|
||||
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.
|
||||
|
Reference in New Issue
Block a user