File indexing completed on 2024-04-28 04:36:29
0001 /* 0002 SPDX-FileCopyrightText: 2009 Niko Sams <niko.sams@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDEVPLATFORM_IDEBUGCONTROLLER_H 0008 #define KDEVPLATFORM_IDEBUGCONTROLLER_H 0009 0010 #include <QObject> 0011 #include "interfacesexport.h" 0012 0013 namespace KDevelop { 0014 0015 class VariableCollection; 0016 class BreakpointModel; 0017 class IDebugSession; 0018 0019 /** Top level debugger object. Exists as long as KDevelop exists 0020 and holds some global debugger state, like breakpoints. 0021 Also holds the IDebugSession for the specific application 0022 that is being debugged. 0023 */ 0024 class KDEVPLATFORMINTERFACES_EXPORT IDebugController : public QObject 0025 { 0026 Q_OBJECT 0027 public: 0028 explicit IDebugController(QObject *parent = nullptr); 0029 ~IDebugController() override; 0030 0031 /** Each plugin using the debugger actions needs to call this function to setup the gui */ 0032 virtual void initializeUi() = 0; 0033 0034 virtual void addSession(IDebugSession* session) = 0; 0035 0036 /** Return the current debug session. At present, only 0037 one session may be active at a time. */ 0038 virtual IDebugSession *currentSession() = 0; 0039 0040 virtual BreakpointModel *breakpointModel() = 0; 0041 virtual VariableCollection *variableCollection() = 0; 0042 0043 Q_SIGNALS: 0044 void currentSessionChanged(KDevelop::IDebugSession* session); 0045 }; 0046 0047 } 0048 0049 #endif