File indexing completed on 2024-05-05 16:41:33
0001 /* 0002 SPDX-FileCopyrightText: 2012 Sven Brauch <svenbrauch@googlemail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef PDBFRAMESTACKMODEL_H 0008 #define PDBFRAMESTACKMODEL_H 0009 0010 #include <debugger/framestack/framestackmodel.h> 0011 0012 using namespace KDevelop; 0013 0014 namespace Python { 0015 0016 /** 0017 * @brief The Frame Stack Model, which contains and controls the frame stack ("backtrace"). 0018 **/ 0019 class PdbFrameStackModel : public KDevelop::FrameStackModel 0020 { 0021 Q_OBJECT 0022 public: 0023 PdbFrameStackModel(IDebugSession* session); 0024 void fetchFrames(int threadNumber, int from, int to) override; 0025 void fetchThreads() override; 0026 0027 /// pdb does not support "select-frame n", so we have to use "up" and "down" repeatedly 0028 /// to select frames. Those two functions tell at which frame the debugger is internally. 0029 int debuggerAtFrame() const; 0030 void setDebuggerAtFrame(int newFrame); 0031 public slots: 0032 void framesFetched(QByteArray frames); 0033 void threadsFetched(QByteArray threads); 0034 private: 0035 int m_debuggerAtFrame; 0036 }; 0037 0038 } 0039 0040 #endif // PDBFRAMESTACKMODEL_H