va_end(argList);
dataLogF(":\n");
- dataLogF(" Code at [%p, %p):\n", result.code().executableAddress(), static_cast<char*>(result.code().executableAddress()) + result.size());
+ dataLogF(
+#if OS(WINDOWS)
+ " Code at [0x%p, 0x%p):\n",
+#else
+ " Code at [%p, %p):\n",
+#endif
+ result.code().executableAddress(), static_cast<char*>(result.code().executableAddress()) + result.size());
disassemble(result.code(), m_size, " ", WTF::dataFile());
return result;
uint64_t currentPC = disassembler.pc;
while (ud_disassemble(&disassembler)) {
char pcString[20];
- snprintf(pcString, sizeof(pcString), "0x%lx", static_cast<unsigned long>(currentPC));
+ snprintf(pcString, sizeof(pcString),
+#if OS(WINDOWS)
+ "0x%p",
+#else
+ "%p",
+#endif
+ currentPC);
out.printf("%s%16s: %s\n", prefix, pcString, ud_insn_asm(&disassembler));
currentPC = disassembler.pc;
}
processedOutput = processedOutput.replace(ptrString, it.value());
}
fprintf(stderr, "%s\n", processedOutput.constData());
+ fflush(stderr);
}
JSC::MacroAssemblerCodeRef Assembler::link(int *codeSize)