| 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
|
|
|