Debugger: Simplify code

isReverseDebuggingEnabled() always returns true for GDB nowadays.

Change-Id: Ic5500a9b191dafc2e9893d75f584a6b304c43a8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-11-09 13:58:23 +01:00
parent 03447f1734
commit e3cc0ce694
3 changed files with 7 additions and 20 deletions

View File

@@ -86,8 +86,6 @@ QStringList stringListSetting(int code);
QMessageBox *showMessageBox(int icon, const QString &title,
const QString &text, int buttons = 0);
bool isReverseDebuggingEnabled();
QAction *addAction(QMenu *menu, const QString &display, bool on,
const std::function<void()> &onTriggered = {});
QAction *addAction(QMenu *menu, const QString &d1, const QString &d2, bool on,

View File

@@ -2021,14 +2021,6 @@ void addDebugInfoTask(unsigned id, const QString &cmd)
dd->m_debugInfoTaskHandler.addTask(id, cmd);
}
bool isReverseDebuggingEnabled()
{
return true;
static bool enabled = qEnvironmentVariableIsSet("QTC_DEBUGGER_ENABLE_REVERSE");
return enabled;
}
void DebuggerPluginPrivate::extensionsInitialized()
{
// If the CppEditor or QmlJS editor plugin is there, we want to add something to

View File

@@ -347,16 +347,13 @@ GdbOptionsPageWidget2::GdbOptionsPageWidget2()
checkBoxBreakOnAbort->setText(CommonOptionsPage::msgSetBreakpointAtFunction("abort"));
checkBoxBreakOnAbort->setToolTip(CommonOptionsPage::msgSetBreakpointAtFunctionToolTip("abort"));
QCheckBox *checkBoxEnableReverseDebugging = nullptr;
if (isReverseDebuggingEnabled()) {
checkBoxEnableReverseDebugging = new QCheckBox(groupBoxDangerous);
checkBoxEnableReverseDebugging->setText(GdbOptionsPage::tr("Enable reverse debugging"));
checkBoxEnableReverseDebugging->setToolTip(GdbOptionsPage::tr(
"<html><head/><body><p>Enables stepping backwards.</p><p>"
"<b>Note:</b> This feature is very slow and unstable on the GDB side. "
"It exhibits unpredictable behavior when going backwards over system "
"calls and is very likely to destroy your debugging session.</p></body></html>"));
}
auto checkBoxEnableReverseDebugging = new QCheckBox(groupBoxDangerous);
checkBoxEnableReverseDebugging->setText(GdbOptionsPage::tr("Enable reverse debugging"));
checkBoxEnableReverseDebugging->setToolTip(GdbOptionsPage::tr(
"<html><head/><body><p>Enables stepping backwards.</p><p>"
"<b>Note:</b> This feature is very slow and unstable on the GDB side. "
"It exhibits unpredictable behavior when going backwards over system "
"calls and is very likely to destroy your debugging session.</p></body></html>"));
auto checkBoxMultiInferior = new QCheckBox(groupBoxDangerous);
checkBoxMultiInferior->setText(GdbOptionsPage::tr("Debug all child processes"));