Index: runtime/vm/disassembler.cc |
diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc |
index 4d5a3509b60c2cabaed5f048beaca2bd1a850499..ac8356e95d649eabb02f0df980609ae825975857 100644 |
--- a/runtime/vm/disassembler.cc |
+++ b/runtime/vm/disassembler.cc |
@@ -6,9 +6,11 @@ |
#include "vm/assembler.h" |
#include "vm/globals.h" |
-#include "vm/os.h" |
-#include "vm/log.h" |
+#include "vm/il_printer.h" |
#include "vm/json_stream.h" |
+#include "vm/log.h" |
+#include "vm/os.h" |
+ |
namespace dart { |
@@ -130,6 +132,8 @@ void Disassembler::Disassemble(uword start, |
comment_finger++; |
} |
if (old_comment_finger != comment_finger) { |
+ char str[4000]; |
+ BufferFormatter f(str, sizeof(str)); |
// Comment emitted, emit inlining information. |
code.GetInlinedFunctionsAt(offset, &inlined_functions); |
// Skip top scope function printing (last entry in 'inlined_functions'). |
@@ -137,14 +141,15 @@ void Disassembler::Disassemble(uword start, |
for (intptr_t i = inlined_functions.length() - 2; i >= 0; i--) { |
const char* name = inlined_functions[i]->ToQualifiedCString(); |
if (first) { |
- formatter->Print(" ;; Inlined [%s", name); |
+ f.Print(" ;; Inlined [%s", name); |
first = false; |
} else { |
- formatter->Print(" -> %s", name); |
+ f.Print(" -> %s", name); |
} |
} |
if (!first) { |
- formatter->Print("]\n"); |
+ f.Print("]\n"); |
+ formatter->Print(str); |
} |
} |
int instruction_length; |