work save

This commit is contained in:
royqh1979@gmail.com 2021-07-24 08:12:51 +08:00
parent 4864d2fc54
commit cf4e7ae1c6
2 changed files with 29 additions and 2 deletions

View File

@ -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)
{

View File

@ -55,9 +55,10 @@ struct WatchVar {
using PWatchVar = std::shared_ptr<WatchVar>;
class Editor;
struct Breakpoint {
int line;
QString filename;
Editor * editor;
QString condition;
};
@ -115,6 +116,14 @@ class Debugger : public QObject
Q_OBJECT
public:
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:
private:
@ -123,6 +132,9 @@ private:
QList<PBreakpoint> mBreakpointList;
bool mUseUTF8;
QString getBreakpointFile();
BacktraceModel mBacktraceModel;
friend class DebugReader;
};
class DebugReader : public QThread
@ -180,7 +192,7 @@ private:
PDebugCommand mCurrentCmd;
QList<PRegister> mRegisters;
QStringList mDisassembly;
BacktraceModel mBacktraceModel;
QProcess mProcess;