OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // A Disassembler object is used to disassemble a block of code instruction by | 5 // A Disassembler object is used to disassemble a block of code instruction by |
6 // instruction. The default implementation of the NameConverter object can be | 6 // instruction. The default implementation of the NameConverter object can be |
7 // overriden to modify register names or to do symbol lookup on addresses. | 7 // overriden to modify register names or to do symbol lookup on addresses. |
8 // | 8 // |
9 // The example below will disassemble a block of code and print it to stdout. | 9 // The example below will disassemble a block of code and print it to stdout. |
10 // | 10 // |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include <assert.h> | 26 #include <assert.h> |
27 #include <stdarg.h> | 27 #include <stdarg.h> |
28 #include <stdio.h> | 28 #include <stdio.h> |
29 #include <string.h> | 29 #include <string.h> |
30 | 30 |
31 #include "src/v8.h" | 31 #include "src/v8.h" |
32 | 32 |
33 #if V8_TARGET_ARCH_ARM | 33 #if V8_TARGET_ARCH_ARM |
34 | 34 |
35 #include "src/arm/constants-arm.h" | 35 #include "src/arm/constants-arm.h" |
| 36 #include "src/base/platform/platform.h" |
36 #include "src/disasm.h" | 37 #include "src/disasm.h" |
37 #include "src/macro-assembler.h" | 38 #include "src/macro-assembler.h" |
38 #include "src/platform.h" | |
39 | 39 |
40 | 40 |
41 namespace v8 { | 41 namespace v8 { |
42 namespace internal { | 42 namespace internal { |
43 | 43 |
44 | 44 |
45 //------------------------------------------------------------------------------ | 45 //------------------------------------------------------------------------------ |
46 | 46 |
47 // Decoder decodes and disassembles instructions into an output buffer. | 47 // Decoder decodes and disassembles instructions into an output buffer. |
48 // It uses the converter to convert register names and call destinations into | 48 // It uses the converter to convert register names and call destinations into |
(...skipping 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 v8::internal::PrintF( | 1778 v8::internal::PrintF( |
1779 f, "%p %08x %s\n", | 1779 f, "%p %08x %s\n", |
1780 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1780 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1781 } | 1781 } |
1782 } | 1782 } |
1783 | 1783 |
1784 | 1784 |
1785 } // namespace disasm | 1785 } // namespace disasm |
1786 | 1786 |
1787 #endif // V8_TARGET_ARCH_ARM | 1787 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |