| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #include <assert.h> | 7 #include <assert.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // a fault. INT3 leaves %eip/%rip pointing to the address after | 123 // a fault. INT3 leaves %eip/%rip pointing to the address after |
| 124 // the INT3 instruction, which makes it harder to tell | 124 // the INT3 instruction, which makes it harder to tell |
| 125 // unambiguously whether a fault was produced by an INT3 or the | 125 // unambiguously whether a fault was produced by an INT3 or the |
| 126 // instruction after it. | 126 // instruction after it. |
| 127 static uint8_t breakpoint_code_x86[] = { 0xf4 /* HLT */ }; | 127 static uint8_t breakpoint_code_x86[] = { 0xf4 /* HLT */ }; |
| 128 static Abi::BPDef breakpoint_x86 = { | 128 static Abi::BPDef breakpoint_x86 = { |
| 129 sizeof(breakpoint_code_x86), | 129 sizeof(breakpoint_code_x86), |
| 130 breakpoint_code_x86 | 130 breakpoint_code_x86 |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 static uint32_t breakpoint_code_arm[] = { NACL_INSTR_BREAKPOINT }; | 133 static uint32_t breakpoint_code_arm[] = { NACL_INSTR_ARM_BREAKPOINT }; |
| 134 static Abi::BPDef breakpoint_arm = { | 134 static Abi::BPDef breakpoint_arm = { |
| 135 sizeof(breakpoint_code_arm), | 135 sizeof(breakpoint_code_arm), |
| 136 (uint8_t *) breakpoint_code_arm | 136 (uint8_t *) breakpoint_code_arm |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 static AbiMap_t *GetAbis() { | 139 static AbiMap_t *GetAbis() { |
| 140 static AbiMap_t *_abis = new AbiMap_t(); | 140 static AbiMap_t *_abis = new AbiMap_t(); |
| 141 return _abis; | 141 return _abis; |
| 142 } | 142 } |
| 143 | 143 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 if (index >= regCnt_) return NULL; | 251 if (index >= regCnt_) return NULL; |
| 252 | 252 |
| 253 return ®Defs_[index]; | 253 return ®Defs_[index]; |
| 254 } | 254 } |
| 255 | 255 |
| 256 const Abi::RegDef *Abi::GetInstPtrDef() const { | 256 const Abi::RegDef *Abi::GetInstPtrDef() const { |
| 257 return GetRegisterDef(ipIndex_); | 257 return GetRegisterDef(ipIndex_); |
| 258 } | 258 } |
| 259 | 259 |
| 260 } // namespace gdb_rsp | 260 } // namespace gdb_rsp |
| OLD | NEW |