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

Unified Diff: runtime/vm/disassembler.h

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.h
===================================================================
--- runtime/vm/disassembler.h (revision 19939)
+++ runtime/vm/disassembler.h (working copy)
@@ -59,50 +59,52 @@
public:
// Disassemble instructions between start and end.
// (The assumption is that start is at a valid instruction).
- static void Disassemble(uword start,
+ // Return true if all instructions were successfully decoded, false otherwise.
+ static bool Disassemble(uword start,
uword end,
DisassemblyFormatter* formatter,
const Code::Comments& comments);
- static void Disassemble(uword start,
+ static bool Disassemble(uword start,
uword end,
DisassemblyFormatter* formatter) {
- Disassemble(start, end, formatter, Code::Comments::New(0));
+ return Disassemble(start, end, formatter, Code::Comments::New(0));
}
- static void Disassemble(uword start,
+ static bool Disassemble(uword start,
uword end,
const Code::Comments& comments) {
DisassembleToStdout stdout_formatter;
- Disassemble(start, end, &stdout_formatter, comments);
+ return Disassemble(start, end, &stdout_formatter, comments);
}
- static void Disassemble(uword start, uword end) {
+ static bool Disassemble(uword start, uword end) {
DisassembleToStdout stdout_formatter;
- Disassemble(start, end, &stdout_formatter);
+ return Disassemble(start, end, &stdout_formatter);
}
// Disassemble instructions in a memory region.
- static void DisassembleMemoryRegion(const MemoryRegion& instructions,
+ static bool DisassembleMemoryRegion(const MemoryRegion& instructions,
DisassemblyFormatter* formatter) {
uword start = instructions.start();
uword end = instructions.end();
- Disassemble(start, end, formatter);
+ return Disassemble(start, end, formatter);
}
- static void DisassembleMemoryRegion(const MemoryRegion& instructions) {
+ static bool DisassembleMemoryRegion(const MemoryRegion& instructions) {
uword start = instructions.start();
uword end = instructions.end();
- Disassemble(start, end);
+ return Disassemble(start, end);
}
// Decodes one instruction.
// Writes a hexadecimal representation into the hex_buffer and a
// human-readable representation into the human_buffer.
- // Returns the length of the decoded instruction in bytes.
- static int DecodeInstruction(char* hex_buffer, intptr_t hex_size,
- char* human_buffer, intptr_t human_size,
- uword pc);
+ // Writes the length of the decoded instruction in bytes in out_instr_len.
+ // Returns false if the instruction could not be decoded.
+ static bool DecodeInstruction(char* hex_buffer, intptr_t hex_size,
+ char* human_buffer, intptr_t human_size,
+ int *out_instr_len, uword pc);
private:
static const int kHexadecimalBufferSize = 32;

Powered by Google App Engine
This is Rietveld 408576698