2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2010-01-04 11:36:55 +01:00
|
|
|
|
2013-08-29 16:36:42 +02:00
|
|
|
#include <debugger/debuggeractions.h>
|
2022-07-05 15:37:08 +02:00
|
|
|
#include <debugger/debuggerconstants.h>
|
2013-08-29 16:36:42 +02:00
|
|
|
#include <debugger/debuggercore.h>
|
|
|
|
|
#include <debugger/debuggerinternalconstants.h>
|
2022-07-05 15:37:08 +02:00
|
|
|
#include <debugger/debuggertr.h>
|
2009-04-17 09:03:32 +02:00
|
|
|
|
2015-06-10 14:52:38 +02:00
|
|
|
#include <coreplugin/dialogs/ioptionspage.h>
|
2010-11-10 16:33:11 +01:00
|
|
|
|
2021-03-01 08:59:44 +01:00
|
|
|
#include <utils/layoutbuilder.h>
|
2011-02-22 11:35:03 +01:00
|
|
|
|
2014-06-05 17:49:51 +02:00
|
|
|
using namespace Core;
|
2017-01-17 18:47:58 +01:00
|
|
|
using namespace Utils;
|
2014-06-05 17:49:51 +02:00
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
namespace Debugger::Internal {
|
2009-04-17 09:03:32 +02:00
|
|
|
|
2013-03-21 17:10:47 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2021-03-25 15:45:58 +01:00
|
|
|
// GdbOptionsPage - harmless options
|
2013-03-21 17:10:47 +01:00
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2017-01-17 18:47:58 +01:00
|
|
|
class GdbOptionsPage : public Core::IOptionsPage
|
2011-11-29 13:30:09 +01:00
|
|
|
{
|
|
|
|
|
public:
|
2021-03-25 15:45:58 +01:00
|
|
|
GdbOptionsPage()
|
|
|
|
|
{
|
|
|
|
|
setId("M.Gdb");
|
2022-07-05 15:37:08 +02:00
|
|
|
setDisplayName(Tr::tr("GDB"));
|
2021-03-25 15:45:58 +01:00
|
|
|
setCategory(Constants::DEBUGGER_SETTINGS_CATEGORY);
|
|
|
|
|
setSettings(&debuggerSettings()->page2);
|
|
|
|
|
|
|
|
|
|
setLayouter([](QWidget *w) {
|
|
|
|
|
using namespace Layouting;
|
|
|
|
|
DebuggerSettings &s = *debuggerSettings();
|
|
|
|
|
|
2022-12-20 11:17:36 +01:00
|
|
|
auto labelDangerous = new QLabel("<html><head/><body><i>" +
|
|
|
|
|
Tr::tr("The options below give access to advanced<br>"
|
|
|
|
|
"or experimental functions of GDB.<p>"
|
|
|
|
|
"Enabling them may negatively impact<br>"
|
|
|
|
|
"your debugging experience.") + "</i></body></html>");
|
|
|
|
|
|
2021-03-25 15:45:58 +01:00
|
|
|
Group general {
|
2022-07-21 12:10:56 +02:00
|
|
|
title(Tr::tr("General")),
|
2022-07-21 11:10:34 +02:00
|
|
|
Column {
|
2022-07-22 18:54:04 +02:00
|
|
|
Row { s.gdbWatchdogTimeout, st },
|
2022-07-21 11:10:34 +02:00
|
|
|
s.skipKnownFrames,
|
|
|
|
|
s.useMessageBoxForSignals,
|
|
|
|
|
s.adjustBreakpointLocations,
|
|
|
|
|
s.useDynamicType,
|
|
|
|
|
s.loadGdbInit,
|
|
|
|
|
s.loadGdbDumpers,
|
|
|
|
|
s.intelFlavor,
|
|
|
|
|
s.usePseudoTracepoints,
|
|
|
|
|
s.useIndexCache,
|
|
|
|
|
}
|
2021-03-25 15:45:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Group extended {
|
2022-07-26 13:46:27 +02:00
|
|
|
title(Tr::tr("Extended")),
|
2022-07-21 11:10:34 +02:00
|
|
|
Column {
|
|
|
|
|
labelDangerous,
|
|
|
|
|
s.targetAsync,
|
|
|
|
|
s.autoEnrichParameters,
|
|
|
|
|
s.breakOnWarning,
|
|
|
|
|
s.breakOnFatal,
|
|
|
|
|
s.breakOnAbort,
|
|
|
|
|
s.enableReverseDebugging,
|
|
|
|
|
s.multiInferior,
|
2022-12-20 11:17:36 +01:00
|
|
|
st
|
2022-07-21 11:10:34 +02:00
|
|
|
}
|
2021-03-25 15:45:58 +01:00
|
|
|
};
|
|
|
|
|
|
2022-12-20 11:17:36 +01:00
|
|
|
Group startup {
|
|
|
|
|
title(Tr::tr("Additional Startup Commands")),
|
|
|
|
|
Column { s.gdbStartupCommands }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Group attach {
|
|
|
|
|
title(Tr::tr("Additional Attach Commands")),
|
|
|
|
|
Column { s.gdbPostAttachCommands },
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Grid { general, extended, br, startup, attach }.attachTo(w);
|
2021-03-25 15:45:58 +01:00
|
|
|
});
|
2013-12-03 14:17:03 +01:00
|
|
|
}
|
2017-01-17 18:47:58 +01:00
|
|
|
};
|
2013-03-21 17:10:47 +01:00
|
|
|
|
2015-06-10 14:52:38 +02:00
|
|
|
// Registration
|
|
|
|
|
|
|
|
|
|
void addGdbOptionPages(QList<IOptionsPage *> *opts)
|
|
|
|
|
{
|
|
|
|
|
opts->push_back(new GdbOptionsPage);
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
} // Debugger::Internal
|