Debugger: Move bbsetup over to runCommand()

Change-Id: I0a19b28d24cb570651ea84bf7cdbc9a761f85a0b
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-02-11 16:38:33 +01:00
parent f65cb6ae4d
commit 875d889082
6 changed files with 11 additions and 15 deletions

View File

@@ -45,8 +45,12 @@ class DebuggerResponse;
class DebuggerCommand
{
public:
typedef std::function<void(const DebuggerResponse &)> Callback;
DebuggerCommand() : flags(0) {}
DebuggerCommand(const char *f) : function(f), flags(0) {}
DebuggerCommand(const char *f, int flags = 0, Callback cb = Callback())
: function(f), callback(cb), flags(flags)
{}
DebuggerCommand(const QByteArray &f) : function(f), flags(0) {}
void arg(const char *name);
@@ -64,8 +68,6 @@ public:
static QByteArray toData(const QList<QByteArray> &value);
static QByteArray toData(const QHash<QByteArray, QByteArray> &value);
typedef std::function<void(const DebuggerResponse &)> Callback;
QByteArray function;
QByteArray args;
Callback callback;

View File

@@ -4295,7 +4295,7 @@ void GdbEngine::startGdb(const QStringList &args)
if (!commands.isEmpty())
postCommand(commands.toLocal8Bit(), flags);
postCommand("bbsetup", flags, CB(handlePythonSetup));
runCommand(DebuggerCommand("setupDumper", flags, CB(handlePythonSetup)));
}
void GdbEngine::handleGdbStartFailed()