File indexing completed on 2024-05-05 04:39:52

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 GDBDEBUGGERPLUGIN_H
0008 #define GDBDEBUGGERPLUGIN_H
0009 
0010 #include <config-kdevelop.h>
0011 
0012 #include <QVariantList>
0013 
0014 #include <KConfigGroup>
0015 
0016 #include <interfaces/iplugin.h>
0017 #include <interfaces/istatus.h>
0018 
0019 #include "midebuggerplugin.h"
0020 #include "debugsession.h"
0021 
0022 class GdbLauncher;
0023 
0024 namespace KDevMI {
0025 class DisassembleWidget;
0026 
0027 namespace GDB {
0028 class GDBOutputWidget;
0029 class MemoryViewerWidget;
0030 
0031 class CppDebuggerPlugin : public MIDebuggerPlugin
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036     friend class DebugSession;
0037 
0038     explicit CppDebuggerPlugin(QObject *parent, const QVariantList & = QVariantList());
0039     ~CppDebuggerPlugin() override;
0040 
0041     void unload() override;
0042 
0043     DebugSession *createSession() override;
0044     void unloadToolViews() override;
0045     void setupToolViews() override;
0046 
0047 private:
0048     void setupExecutePlugin(KDevelop::IPlugin* plugin, bool load);
0049 
0050     DebuggerToolFactory<DisassembleWidget>* disassemblefactory;
0051     DebuggerToolFactory<GDBOutputWidget, CppDebuggerPlugin>* gdbfactory;
0052     DebuggerToolFactory<MemoryViewerWidget, CppDebuggerPlugin>* memoryviewerfactory;
0053     QHash<KDevelop::IPlugin*, GdbLauncher*> m_launchers;
0054 };
0055 
0056 } // end of namespace GDB
0057 } // end of namespace KDevMI
0058 
0059 #endif