| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium 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 /* | 5 /* |
| 6 * Definition of MiniDisassembler. | 6 * Definition of MiniDisassembler. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef GOOGLE_PERFTOOLS_MINI_DISASSEMBLER_H__ | 9 #ifndef GOOGLE_PERFTOOLS_MINI_DISASSEMBLER_H__ |
| 10 #define GOOGLE_PERFTOOLS_MINI_DISASSEMBLER_H__ | 10 #define GOOGLE_PERFTOOLS_MINI_DISASSEMBLER_H__ |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // to be preamble patched. | 37 // to be preamble patched. |
| 38 // -# The opcode length is always calculated, so that the patching utility | 38 // -# The opcode length is always calculated, so that the patching utility |
| 39 // can figure out where the next instruction starts, and whether it | 39 // can figure out where the next instruction starts, and whether it |
| 40 // already has enough instructions to replace with the absolute jump | 40 // already has enough instructions to replace with the absolute jump |
| 41 // to the patching code. | 41 // to the patching code. |
| 42 // | 42 // |
| 43 // The usage is quite simple; just create a MiniDisassembler and use its | 43 // The usage is quite simple; just create a MiniDisassembler and use its |
| 44 // Disassemble() method. | 44 // Disassemble() method. |
| 45 // | 45 // |
| 46 // If you would like to extend this disassembler, please refer to the | 46 // If you would like to extend this disassembler, please refer to the |
| 47 // IA-32 Intel Architecture Software Developers Manual Volume 2: | 47 // IA-32 Intel Architecture Software Developer's Manual Volume 2: |
| 48 // Instruction Set Reference for information about operand decoding | 48 // Instruction Set Reference for information about operand decoding |
| 49 // etc. | 49 // etc. |
| 50 class MiniDisassembler { | 50 class MiniDisassembler { |
| 51 public: | 51 public: |
| 52 | 52 |
| 53 // Creates a new instance and sets defaults. | 53 // Creates a new instance and sets defaults. |
| 54 // | 54 // |
| 55 // @param operand_default_32_bits If true, the default operand size is | 55 // @param operand_default_32_bits If true, the default operand size is |
| 56 // set to 32 bits, which is the default under Win32. Otherwise it is 16 bits. | 56 // set to 32 bits, which is the default under Win32. Otherwise it is 16 bits. |
| 57 // @param address_default_32_bits If true, the default address size is | 57 // @param address_default_32_bits If true, the default address size is |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 // Indicators of whether we got certain prefixes that certain | 155 // Indicators of whether we got certain prefixes that certain |
| 156 // silly Intel instructions depend on in nonstandard ways for | 156 // silly Intel instructions depend on in nonstandard ways for |
| 157 // their behaviors. | 157 // their behaviors. |
| 158 bool got_f2_prefix_, got_f3_prefix_, got_66_prefix_; | 158 bool got_f2_prefix_, got_f3_prefix_, got_66_prefix_; |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 }; // namespace sidestep | 161 }; // namespace sidestep |
| 162 | 162 |
| 163 #endif // GOOGLE_PERFTOOLS_MINI_DISASSEMBLER_H__ | 163 #endif // GOOGLE_PERFTOOLS_MINI_DISASSEMBLER_H__ |
| OLD | NEW |