forked from qt-creator/qt-creator
Debugger: Fix passing addresses to read memory with LLDB
We need 64 bit on 64 bit machines. Change-Id: I7efed5ffdccc5ce0aa13b1e7296137396ca28efe Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -460,11 +460,10 @@ void LldbEngine::refreshDisassembly(const GdbMi &data)
|
|||||||
if (!agent.isNull()) {
|
if (!agent.isNull()) {
|
||||||
foreach (const GdbMi &line, data["lines"].children()) {
|
foreach (const GdbMi &line, data["lines"].children()) {
|
||||||
DisassemblerLine dl;
|
DisassemblerLine dl;
|
||||||
QByteArray address = line["address"].data();
|
dl.address = line["address"].toAddress();
|
||||||
dl.address = address.toULongLong(0, 0);
|
|
||||||
dl.data = _(line["inst"].data());
|
dl.data = _(line["inst"].data());
|
||||||
dl.function = _(line["func-name"].data());
|
dl.function = _(line["func-name"].data());
|
||||||
dl.offset = line["offset"].data().toUInt();
|
dl.offset = line["offset"].toInt();
|
||||||
result.appendLine(dl);
|
result.appendLine(dl);
|
||||||
}
|
}
|
||||||
agent->setContents(result);
|
agent->setContents(result);
|
||||||
@@ -474,7 +473,7 @@ void LldbEngine::refreshDisassembly(const GdbMi &data)
|
|||||||
void LldbEngine::refreshMemory(const GdbMi &data)
|
void LldbEngine::refreshMemory(const GdbMi &data)
|
||||||
{
|
{
|
||||||
int cookie = data["cookie"].toInt();
|
int cookie = data["cookie"].toInt();
|
||||||
qulonglong addr = data["address"].toInt();
|
qulonglong addr = data["address"].toAddress();
|
||||||
QPointer<MemoryAgent> agent = m_memoryAgents.key(cookie);
|
QPointer<MemoryAgent> agent = m_memoryAgents.key(cookie);
|
||||||
if (!agent.isNull()) {
|
if (!agent.isNull()) {
|
||||||
QPointer<QObject> token = m_memoryAgentTokens.value(cookie);
|
QPointer<QObject> token = m_memoryAgentTokens.value(cookie);
|
||||||
@@ -1038,16 +1037,31 @@ DebuggerEngine *createLldbEngine(const DebuggerStartParameters &startParameters)
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const LldbEngine::Command &LldbEngine::Command::arg(const char *name, int value) const
|
const LldbEngine::Command &LldbEngine::Command::argHelper(const char *name, const QByteArray &data) const
|
||||||
{
|
{
|
||||||
args.append('\'');
|
args.append('\'');
|
||||||
args.append(name);
|
args.append(name);
|
||||||
args.append("':");
|
args.append("':");
|
||||||
args.append(QByteArray::number(value));
|
args.append(data);
|
||||||
args.append(',');
|
args.append(",");
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const LldbEngine::Command &LldbEngine::Command::arg(const char *name, int value) const
|
||||||
|
{
|
||||||
|
return argHelper(name, QByteArray::number(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
const LldbEngine::Command &LldbEngine::Command::arg(const char *name, qlonglong value) const
|
||||||
|
{
|
||||||
|
return argHelper(name, QByteArray::number(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
const LldbEngine::Command &LldbEngine::Command::arg(const char *name, qulonglong value) const
|
||||||
|
{
|
||||||
|
return argHelper(name, QByteArray::number(value));
|
||||||
|
}
|
||||||
|
|
||||||
const LldbEngine::Command &LldbEngine::Command::arg(const char *name, const QString &value) const
|
const LldbEngine::Command &LldbEngine::Command::arg(const char *name, const QString &value) const
|
||||||
{
|
{
|
||||||
return arg(name, value.toUtf8().data());
|
return arg(name, value.toUtf8().data());
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ private:
|
|||||||
Command(const char *f) : function(f) {}
|
Command(const char *f) : function(f) {}
|
||||||
|
|
||||||
const Command &arg(const char *name, int value) const;
|
const Command &arg(const char *name, int value) const;
|
||||||
|
const Command &arg(const char *name, qlonglong value) const;
|
||||||
|
const Command &arg(const char *name, qulonglong value) const;
|
||||||
const Command &arg(const char *name, const QString &value) const;
|
const Command &arg(const char *name, const QString &value) const;
|
||||||
const Command &arg(const char *name, const QByteArray &value) const;
|
const Command &arg(const char *name, const QByteArray &value) const;
|
||||||
const Command &arg(const char *name, const char *value) const;
|
const Command &arg(const char *name, const char *value) const;
|
||||||
@@ -78,6 +80,8 @@ private:
|
|||||||
|
|
||||||
QByteArray function;
|
QByteArray function;
|
||||||
mutable QByteArray args;
|
mutable QByteArray args;
|
||||||
|
private:
|
||||||
|
const Command &argHelper(const char *name, const QByteArray &value) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// DebuggerEngine implementation
|
// DebuggerEngine implementation
|
||||||
|
|||||||
Reference in New Issue
Block a user