File indexing completed on 2024-04-28 04:38:57
0001 /* 0002 SPDX-FileCopyrightText: 2016 Aetf <aetf@unlimitedcodeworks.xyz> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef LLDB_DEBUGGERPLUGIN_H 0008 #define LLDB_DEBUGGERPLUGIN_H 0009 0010 #include "midebuggerplugin.h" 0011 0012 #include "debugsession.h" 0013 #include "widgets/debuggerconsoleview.h" 0014 #include "widgets/disassemblewidget.h" 0015 0016 namespace KDevMI { namespace LLDB { 0017 0018 class LldbLauncher; 0019 0020 class NonInterruptDebuggerConsoleView : public DebuggerConsoleView 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 explicit NonInterruptDebuggerConsoleView(MIDebuggerPlugin *plugin, QWidget *parent = nullptr) 0026 : DebuggerConsoleView(plugin, parent) 0027 { 0028 setShowInterrupt(false); 0029 setReplacePrompt(QStringLiteral("(lldb)")); 0030 } 0031 }; 0032 0033 class LldbDebuggerPlugin : public MIDebuggerPlugin 0034 { 0035 Q_OBJECT 0036 0037 public: 0038 friend class KDevMI::LLDB::DebugSession; 0039 0040 explicit LldbDebuggerPlugin(QObject *parent, const QVariantList & = QVariantList()); 0041 ~LldbDebuggerPlugin() override; 0042 0043 void unload() override; 0044 0045 DebugSession *createSession() override; 0046 void unloadToolViews() override; 0047 void setupToolViews() override; 0048 0049 private: 0050 void setupExecutePlugin(KDevelop::IPlugin* plugin, bool load); 0051 0052 DebuggerToolFactory<NonInterruptDebuggerConsoleView> *m_consoleFactory; 0053 DebuggerToolFactory<DisassembleWidget> *m_disassembleFactory; 0054 QHash<KDevelop::IPlugin*, LldbLauncher*> m_launchers; 0055 }; 0056 0057 } // end of namespace LLDB 0058 } // end of namespace KDevMI 0059 0060 #endif // LLDB_DEBUGGERPLUGIN_H