forked from qt-creator/qt-creator
Debugger: Let LldbEngine pass current token to dumper
Change-Id: Ifea751354f637f67e640d36ba1baa95678c86ee9 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -75,6 +75,12 @@ using namespace Utils;
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
static int ¤tToken()
|
||||
{
|
||||
static int token = 0;
|
||||
return token;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// LldbEngine
|
||||
@@ -85,7 +91,6 @@ LldbEngine::LldbEngine(const DebuggerStartParameters &startParameters)
|
||||
: DebuggerEngine(startParameters), m_continueAtNextSpontaneousStop(false)
|
||||
{
|
||||
m_lastAgentId = 0;
|
||||
m_lastToken = 0;
|
||||
setObjectName(QLatin1String("LldbEngine"));
|
||||
|
||||
if (startParameters.useTerminal) {
|
||||
@@ -126,11 +131,13 @@ void LldbEngine::executeDebuggerCommand(const QString &command, DebuggerLanguage
|
||||
runCommand(cmd);
|
||||
}
|
||||
|
||||
void LldbEngine::runCommand(const DebuggerCommand &command)
|
||||
void LldbEngine::runCommand(const DebuggerCommand &command_)
|
||||
{
|
||||
QTC_ASSERT(m_lldbProc.state() == QProcess::Running, notifyEngineIll());
|
||||
++m_lastToken;
|
||||
QByteArray token = QByteArray::number(m_lastToken);
|
||||
const int tok = ++currentToken();
|
||||
DebuggerCommand command = command_;
|
||||
command.arg("token", tok);
|
||||
QByteArray token = QByteArray::number(tok);
|
||||
QByteArray cmd = command.function + "({" + command.args + "})";
|
||||
showMessage(_(token + cmd + '\n'), LogInput);
|
||||
m_lldbProc.write("script theDumper." + cmd + "\n");
|
||||
|
||||
Reference in New Issue
Block a user