Commit bee04cf1 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger[CDBs 32bit]: Fix 'Jump to Line'.

PC register is 'rip' for 64bit and 'eip' for 32bit.

Task-number: QTCREATORBUG-3361
parent d17cd567
......@@ -1035,12 +1035,18 @@ void CdbEngine::executeJumpToLine(const QString &fileName, int lineNumber)
if (!setRegisterValueU64(m_d->interfaces().debugControl,
m_d->interfaces().debugRegisters,
QLatin1String("rip"), address, &errorMessage))
#ifdef Q_OS_WIN64
QLatin1String("rip"),
#else
QLatin1String("eip"),
#endif
address, &errorMessage))
break;
showMessage(QString::fromLatin1("Jumping to %1:%2 (0x%3)...").
arg(QDir::toNativeSeparators(fileName)).arg(lineNumber).arg(address, 0, 16));
StackFrame frame;
frame.usable = true;
frame.file = fileName;
frame.line = lineNumber;
gotoLocation(frame, true);
......
......@@ -815,7 +815,8 @@ void CdbEngine::handleJumpToLineAddressResolution(const CdbBuiltinCommandPtr &cm
QByteArray registerCmd;
ByteArrayInputStream str(registerCmd);
str << "r rip=0x" << answer;
// PC-register depending on 64/32bit.
str << "r " << (m_options->is64bit ? "rip" : "eip") << "=0x" << answer;
postCommand(registerCmd, 0);
gotoLocation(cookie.fileName, cookie.lineNumber, 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