[masm] Fix function name replacement in disassembly on ia32
authorSimon Hausmann <simon.hausmann@digia.com>
Sun, 17 Feb 2013 21:12:22 +0000 (22:12 +0100)
committerErik Verbruggen <erik.verbruggen@digia.com>
Tue, 19 Feb 2013 10:12:57 +0000 (11:12 +0100)
Cast the void* to a quintptr, to make sure we call the right
QByteArray::number overload depending on the size of a pointer
on the archicture. Otherwise we generate 0x1324 strings that
we can't successfully replace with the function names in the
disassembler output.

Change-Id: Iddc82534487d93547b597d39286b92ffdff6da6c
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
src/v4/qv4isel_masm.cpp

index bf1d129..0d8d2ae 100644 (file)
@@ -360,7 +360,7 @@ static void printDisassembledOutputWithCalls(const char* output, const QHash<voi
     QByteArray processedOutput(output);
     for (QHash<void*, const char*>::ConstIterator it = functions.begin(), end = functions.end();
          it != end; ++it) {
-        QByteArray ptrString = QByteArray::number(qlonglong(it.key()), 16);
+        QByteArray ptrString = QByteArray::number(quintptr(it.key()), 16);
         ptrString.prepend("0x");
         processedOutput = processedOutput.replace(ptrString, it.value());
     }