OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_DISASSEMBLER_H_ | 5 #ifndef VM_DISASSEMBLER_H_ |
6 #define VM_DISASSEMBLER_H_ | 6 #define VM_DISASSEMBLER_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 static void Disassemble(uword start, | 92 static void Disassemble(uword start, |
93 uword end, | 93 uword end, |
94 DisassemblyFormatter* formatter) { | 94 DisassemblyFormatter* formatter) { |
95 Disassemble(start, end, formatter, Code::Handle()); | 95 Disassemble(start, end, formatter, Code::Handle()); |
96 } | 96 } |
97 | 97 |
98 static void Disassemble(uword start, | 98 static void Disassemble(uword start, |
99 uword end, | 99 uword end, |
100 const Code& code) { | 100 const Code& code) { |
101 DisassembleToStdout stdout_formatter; | 101 DisassembleToStdout stdout_formatter; |
102 LogBlock lb(Isolate::Current()); | 102 LogBlock lb; |
103 Disassemble(start, end, &stdout_formatter, code); | 103 Disassemble(start, end, &stdout_formatter, code); |
104 } | 104 } |
105 | 105 |
106 static void Disassemble(uword start, uword end) { | 106 static void Disassemble(uword start, uword end) { |
107 DisassembleToStdout stdout_formatter; | 107 DisassembleToStdout stdout_formatter; |
108 LogBlock lb(Isolate::Current()); | 108 LogBlock lb; |
109 Disassemble(start, end, &stdout_formatter); | 109 Disassemble(start, end, &stdout_formatter); |
110 } | 110 } |
111 | 111 |
112 // Disassemble instructions in a memory region. | 112 // Disassemble instructions in a memory region. |
113 static void DisassembleMemoryRegion(const MemoryRegion& instructions, | 113 static void DisassembleMemoryRegion(const MemoryRegion& instructions, |
114 DisassemblyFormatter* formatter) { | 114 DisassemblyFormatter* formatter) { |
115 uword start = instructions.start(); | 115 uword start = instructions.start(); |
116 uword end = instructions.end(); | 116 uword end = instructions.end(); |
117 Disassemble(start, end, formatter); | 117 Disassemble(start, end, formatter); |
118 } | 118 } |
(...skipping 15 matching lines...) Expand all Loading... |
134 static bool CanFindOldObject(uword addr); | 134 static bool CanFindOldObject(uword addr); |
135 | 135 |
136 private: | 136 private: |
137 static const int kHexadecimalBufferSize = 32; | 137 static const int kHexadecimalBufferSize = 32; |
138 static const int kUserReadableBufferSize = 256; | 138 static const int kUserReadableBufferSize = 256; |
139 }; | 139 }; |
140 | 140 |
141 } // namespace dart | 141 } // namespace dart |
142 | 142 |
143 #endif // VM_DISASSEMBLER_H_ | 143 #endif // VM_DISASSEMBLER_H_ |
OLD | NEW |