Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: runtime/vm/disassembler.cc

Issue 914463002: Fix disassembly comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler.cc
diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
index 859d9d077258c5a3299c5ce7c6523c375dfe6cf4..b4ba2a08266e91a14a452d79e687071a83415562 100644
--- a/runtime/vm/disassembler.cc
+++ b/runtime/vm/disassembler.cc
@@ -33,9 +33,18 @@ void DisassembleToStdout::ConsumeInstruction(char* hex_buffer,
void DisassembleToStdout::Print(const char* format, ...) {
va_list args;
+
+ va_start(args, format);
+ intptr_t len = OS::VSNPrint(NULL, 0, format, args);
+ va_end(args);
+
+ char* p = reinterpret_cast<char*>(malloc(len+1));
va_start(args, format);
- OS::VFPrint(stdout, format, args);
+ OS::VSNPrint(p, len, format, args);
va_end(args);
+
+ ISL_Print("%s", p);
+ free(p);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698