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();
|
|
|
|
|
|
|
|
|
|
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,
|
2022-07-22 18:54:04 +02:00
|
|
|
st
|
2022-07-21 11:10:34 +02:00
|
|
|
}
|
2021-03-25 15:45:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Column commands {
|
2022-07-21 11:10:34 +02:00
|
|
|
Group {
|
2022-07-21 12:10:56 +02:00
|
|
|
title(Tr::tr("Additional Startup Commands")),
|
2022-07-21 11:10:34 +02:00
|
|
|
Column { s.gdbStartupCommands }
|
|
|
|
|
},
|
|
|
|
|
Group {
|
2022-07-21 12:10:56 +02:00
|
|
|
title(Tr::tr("Additional Attach Commands")),
|
2022-07-21 11:10:34 +02:00
|
|
|
Column { s.gdbPostAttachCommands },
|
|
|
|
|
},
|
2022-07-22 18:54:04 +02:00
|
|
|
st
|
2021-03-25 15:45:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Row { general, commands }.attachTo(w);
|
|
|
|
|
});
|
|
|
|
|
}
|
2015-06-10 14:52:38 +02:00
|
|
|
};
|
|
|
|
|
|
2013-03-21 17:10:47 +01:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2021-03-25 15:45:58 +01:00
|
|
|
// GdbOptionsPage2 - dangerous options
|
2013-03-21 17:10:47 +01:00
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2015-06-10 14:52:38 +02:00
|
|
|
// The "Dangerous" options.
|
|
|
|
|
class GdbOptionsPage2 : public Core::IOptionsPage
|
|
|
|
|
{
|
|
|
|
|
public:
|
2017-01-17 18:47:58 +01:00
|
|
|
GdbOptionsPage2()
|
|
|
|
|
{
|
|
|
|
|
setId("M.Gdb2");
|
2022-07-05 15:37:08 +02:00
|
|
|
setDisplayName(Tr::tr("GDB Extended"));
|
2017-01-17 18:47:58 +01:00
|
|
|
setCategory(Constants::DEBUGGER_SETTINGS_CATEGORY);
|
2021-03-25 15:45:58 +01:00
|
|
|
setSettings(&debuggerSettings()->page3);
|
|
|
|
|
|
|
|
|
|
setLayouter([](QWidget *w) {
|
|
|
|
|
auto labelDangerous = new QLabel("<html><head/><body><i>" +
|
2022-07-05 15:37:08 +02:00
|
|
|
Tr::tr("The options below give access to advanced "
|
2021-03-25 15:45:58 +01:00
|
|
|
"or experimental functions of GDB.<br>Enabling them may negatively "
|
|
|
|
|
"impact your debugging experience.") + "</i></body></html>");
|
|
|
|
|
|
|
|
|
|
using namespace Layouting;
|
|
|
|
|
DebuggerSettings &s = *debuggerSettings();
|
|
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
}
|
2021-03-25 15:45:58 +01:00
|
|
|
};
|
|
|
|
|
|
2022-07-22 18:54:04 +02:00
|
|
|
Column { extended, st }.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);
|
|
|
|
|
opts->push_back(new GdbOptionsPage2);
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
} // Debugger::Internal
|