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

Unified Diff: runtime/vm/disassembler.cc

Issue 8758005: Disassembler for x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « runtime/vm/disassembler.h ('k') | runtime/vm/disassembler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler.cc
===================================================================
--- runtime/vm/disassembler.cc (revision 1951)
+++ runtime/vm/disassembler.cc (working copy)
@@ -29,57 +29,11 @@
}
-void Disassembler::Disassemble(uword start,
- uword end,
- DisassemblyFormatter* formatter) {
- ASSERT(formatter != NULL);
- char hex_buffer[kHexadecimalBufferSize]; // Instruction in hexadecimal form.
- char human_buffer[kUserReadableBufferSize]; // Human-readable instruction.
- uword pc = start;
- while (pc < end) {
- int instruction_length = DecodeInstruction(hex_buffer,
- sizeof(hex_buffer),
- human_buffer,
- sizeof(human_buffer),
- pc);
- formatter->ConsumeInstruction(hex_buffer,
- sizeof(hex_buffer),
- human_buffer,
- sizeof(human_buffer),
- pc);
- pc += instruction_length;
- }
+void DisassembleToStdout::Print(const char* format, ...) {
+ va_list args;
+ va_start(args, format);
+ OS::VFPrint(stdout, format, args);
+ va_end(args);
}
-
-void Disassembler::DisassembleMemoryRegionRange(
- const MemoryRegion& instructions,
- uword from,
- uword to,
- DisassemblyFormatter *formatter) {
- ASSERT(formatter != NULL);
- char hex_buffer[kHexadecimalBufferSize]; // Instruction in hexadecimal form.
- char human_buffer[kUserReadableBufferSize]; // Human-readable instruction.
- uword start = instructions.start();
- uword end = instructions.end();
- ASSERT((from >= start) && (to <= end) && (from <= to));
- uword pc = start;
- uword stop = Utils::Minimum(end, to);
- while (pc < stop) {
- int instruction_length = DecodeInstruction(hex_buffer,
- sizeof(hex_buffer),
- human_buffer,
- sizeof(human_buffer),
- pc);
- if (pc >= from) {
- formatter->ConsumeInstruction(hex_buffer,
- sizeof(hex_buffer),
- human_buffer,
- sizeof(human_buffer),
- pc);
- }
- pc += instruction_length;
- }
-}
-
} // namespace dart
« no previous file with comments | « runtime/vm/disassembler.h ('k') | runtime/vm/disassembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698