work save
This commit is contained in:
parent
4864d2fc54
commit
cf4e7ae1c6
|
@ -7,6 +7,21 @@ Debugger::Debugger(QObject *parent) : QObject(parent)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Debugger::useUTF8() const
|
||||||
|
{
|
||||||
|
return mUseUTF8;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Debugger::setUseUTF8(bool useUTF8)
|
||||||
|
{
|
||||||
|
mUseUTF8 = useUTF8;
|
||||||
|
}
|
||||||
|
|
||||||
|
const BacktraceModel* Debugger::getBacktraceModel() const
|
||||||
|
{
|
||||||
|
return mBacktraceModel;
|
||||||
|
}
|
||||||
|
|
||||||
DebugReader::DebugReader(QObject *parent) : QObject(parent)
|
DebugReader::DebugReader(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -55,9 +55,10 @@ struct WatchVar {
|
||||||
|
|
||||||
using PWatchVar = std::shared_ptr<WatchVar>;
|
using PWatchVar = std::shared_ptr<WatchVar>;
|
||||||
|
|
||||||
|
class Editor;
|
||||||
struct Breakpoint {
|
struct Breakpoint {
|
||||||
int line;
|
int line;
|
||||||
QString filename;
|
Editor * editor;
|
||||||
QString condition;
|
QString condition;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -115,6 +116,14 @@ class Debugger : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit Debugger(QObject *parent = nullptr);
|
explicit Debugger(QObject *parent = nullptr);
|
||||||
|
void addBreakpoint(int line);
|
||||||
|
void sendBreakpointToDebugger(int index);
|
||||||
|
|
||||||
|
bool useUTF8() const;
|
||||||
|
void setUseUTF8(bool useUTF8);
|
||||||
|
|
||||||
|
const BacktraceModel* getBacktraceModel() const;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
private:
|
private:
|
||||||
|
@ -123,6 +132,9 @@ private:
|
||||||
QList<PBreakpoint> mBreakpointList;
|
QList<PBreakpoint> mBreakpointList;
|
||||||
bool mUseUTF8;
|
bool mUseUTF8;
|
||||||
QString getBreakpointFile();
|
QString getBreakpointFile();
|
||||||
|
BacktraceModel mBacktraceModel;
|
||||||
|
|
||||||
|
friend class DebugReader;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebugReader : public QThread
|
class DebugReader : public QThread
|
||||||
|
@ -180,7 +192,7 @@ private:
|
||||||
PDebugCommand mCurrentCmd;
|
PDebugCommand mCurrentCmd;
|
||||||
QList<PRegister> mRegisters;
|
QList<PRegister> mRegisters;
|
||||||
QStringList mDisassembly;
|
QStringList mDisassembly;
|
||||||
BacktraceModel mBacktraceModel;
|
|
||||||
|
|
||||||
QProcess mProcess;
|
QProcess mProcess;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue