Commit b5706d77 authored by hjk's avatar hjk

debugger: save a few cycles when writing to the gdb process

parent 4503ed6b
......@@ -54,7 +54,7 @@ public:
virtual QByteArray readAllStandardError() = 0;
virtual QByteArray readAllStandardOutput() = 0;
virtual qint64 write(const char *data) = 0;
virtual void write(const QByteArray &data) = 0;
virtual void setWorkingDirectory(const QString &dir) = 0;
virtual void setEnvironment(const QStringList &env) = 0;
virtual bool isTrkAdapter() const = 0;
......
......@@ -55,7 +55,7 @@ public:
private:
QByteArray readAllStandardError() { return m_gdbProc.readAllStandardError(); }
QByteArray readAllStandardOutput() { return m_gdbProc.readAllStandardOutput(); }
qint64 write(const char *data) { return m_gdbProc.write(data); }
void write(const QByteArray &data) { m_gdbProc.write(data, data.size()); }
void setWorkingDirectory(const QString &dir) { m_gdbProc.setWorkingDirectory(dir); }
void setEnvironment(const QStringList &env) { m_gdbProc.setEnvironment(env); }
bool isTrkAdapter() const { return false; }
......
......@@ -55,7 +55,7 @@ public:
private:
QByteArray readAllStandardError() { return m_gdbProc.readAllStandardError(); }
QByteArray readAllStandardOutput() { return m_gdbProc.readAllStandardOutput(); }
qint64 write(const char *data) { return m_gdbProc.write(data); }
void write(const QByteArray &data) { m_gdbProc.write(data, data.size()); }
void setWorkingDirectory(const QString &dir) { m_gdbProc.setWorkingDirectory(dir); }
void setEnvironment(const QStringList &env) { m_gdbProc.setEnvironment(env); }
bool isTrkAdapter() const { return false; }
......
......@@ -56,7 +56,7 @@ public:
QByteArray readAllStandardError() { return m_gdbProc.readAllStandardError(); }
QByteArray readAllStandardOutput() { return m_gdbProc.readAllStandardOutput(); }
qint64 write(const char *data) { return m_gdbProc.write(data); }
void write(const QByteArray &data) { m_gdbProc.write(data, data.size()); }
void setWorkingDirectory(const QString &dir) { m_gdbProc.setWorkingDirectory(dir); }
void setEnvironment(const QStringList &env) { m_gdbProc.setEnvironment(env); }
bool isTrkAdapter() const { return false; }
......
......@@ -55,7 +55,7 @@ public:
private:
QByteArray readAllStandardError() { return m_gdbProc.readAllStandardError(); }
QByteArray readAllStandardOutput() { return m_gdbProc.readAllStandardOutput(); }
qint64 write(const char *data) { return m_gdbProc.write(data); }
void write(const QByteArray &data) { m_gdbProc.write(data, data.size()); }
void setWorkingDirectory(const QString &dir) { m_gdbProc.setWorkingDirectory(dir); }
void setEnvironment(const QStringList &env) { m_gdbProc.setEnvironment(env); }
bool isTrkAdapter() const { return false; }
......
......@@ -1623,9 +1623,9 @@ QByteArray TrkGdbAdapter::readAllStandardOutput()
return m_gdbProc.readAllStandardOutput();
}
qint64 TrkGdbAdapter::write(const char *data)
void TrkGdbAdapter::write(const QByteArray &data)
{
return m_gdbProc.write(data);
m_gdbProc.write(data, data.size());
}
void TrkGdbAdapter::setWorkingDirectory(const QString &dir)
......
......@@ -109,7 +109,7 @@ public:
QIODevice::OpenMode mode = QIODevice::ReadWrite);
QByteArray readAllStandardError();
QByteArray readAllStandardOutput();
qint64 write(const char *data);
void write(const QByteArray &data);
void setWorkingDirectory(const QString &dir);
void setEnvironment(const QStringList &env);
bool isTrkAdapter() const { return true; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment