Chromium Code Reviews| Index: src/disassembler.cc |
| diff --git a/src/disassembler.cc b/src/disassembler.cc |
| index a838a08ffba1c4c92fcf87b7269dc4a827e1c8af..c658c95f6cf6a61d50aa710f1c51e6d3890d4ddd 100644 |
| --- a/src/disassembler.cc |
| +++ b/src/disassembler.cc |
| @@ -43,9 +43,10 @@ namespace v8 { namespace internal { |
| void Disassembler::Dump(FILE* f, byte* begin, byte* end) { |
| for (byte* pc = begin; pc < end; pc++) { |
| if (f == NULL) { |
| - PrintF("%p %4d %02x\n", pc, pc - begin, *pc); |
| + PrintF("%"V8PRIp" %4"V8PRId" %02x\n", pc, pc - begin, *pc); |
|
Dean McNamee
2009/05/12 08:22:40
should we put space around these? It looks weird,
Erik Corry
2009/05/12 09:24:50
I think the names are way too cryptic considering
Lasse Reichstein
2009/05/12 10:32:51
A quick look at what people do with PRId64 and lik
Lasse Reichstein
2009/05/12 10:32:51
It shouldn't say "print a pointer difference". It
|
| } else { |
| - fprintf(f, "%p %4d %02x\n", pc, pc - begin, *pc); |
| + fprintf(f, "%"V8PRIp" %4"V8PRId" %02x\n", |
| + reinterpret_cast<uintptr_t>(pc), pc - begin, *pc); |
| } |
| } |
| } |
| @@ -144,8 +145,8 @@ static int DecodeIt(FILE* f, |
| // raw pointer embedded in code stream, e.g., jump table |
| byte* ptr = *reinterpret_cast<byte**>(pc); |
| OS::SNPrintF(decode_buffer, |
| - "%08x jump table entry %4d", |
| - reinterpret_cast<int32_t>(ptr), |
| + "%08"V8PRIp" jump table entry %4"V8PRId, |
| + ptr, |
| ptr - begin); |
| pc += 4; |
| } else { |