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

Unified Diff: runtime/vm/disassembler_ia32.cc

Issue 12431016: Copies Simulator Debugger from ARM to MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
Index: runtime/vm/disassembler_ia32.cc
===================================================================
--- runtime/vm/disassembler_ia32.cc (revision 19939)
+++ runtime/vm/disassembler_ia32.cc (working copy)
@@ -1744,9 +1744,9 @@
}
-int Disassembler::DecodeInstruction(char* hex_buffer, intptr_t hex_size,
+bool Disassembler::DecodeInstruction(char* hex_buffer, intptr_t hex_size,
char* human_buffer, intptr_t human_size,
- uword pc) {
+ int* out_instr_len, uword pc) {
ASSERT(hex_size > 0);
ASSERT(human_size > 0);
X86Decoder decoder(human_buffer, human_size);
@@ -1760,11 +1760,14 @@
remaining_size -= 2;
}
hex_buffer[hex_index] = '\0';
- return instruction_length;
+ if (out_instr_len) {
+ *out_instr_len = instruction_length;
+ }
+ return true;
}
-void Disassembler::Disassemble(uword start,
+bool Disassembler::Disassemble(uword start,
uword end,
DisassemblyFormatter* formatter,
const Code::Comments& comments) {
@@ -1782,11 +1785,12 @@
String::Handle(comments.CommentAt(comment_finger)).ToCString());
comment_finger++;
}
- int instruction_length = DecodeInstruction(hex_buffer,
- sizeof(hex_buffer),
- human_buffer,
- sizeof(human_buffer),
- pc);
+ int instruction_length;
+ DecodeInstruction(hex_buffer,
+ sizeof(hex_buffer),
+ human_buffer,
+ sizeof(human_buffer),
+ &instruction_length, pc);
formatter->ConsumeInstruction(hex_buffer,
sizeof(hex_buffer),
human_buffer,
@@ -1794,6 +1798,8 @@
pc);
pc += instruction_length;
}
+
+ return true;
}
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698