| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // a fault. INT3 leaves %eip/%rip pointing to the address after | 122 // a fault. INT3 leaves %eip/%rip pointing to the address after |
| 123 // the INT3 instruction, which makes it harder to tell | 123 // the INT3 instruction, which makes it harder to tell |
| 124 // unambiguously whether a fault was produced by an INT3 or the | 124 // unambiguously whether a fault was produced by an INT3 or the |
| 125 // instruction after it. | 125 // instruction after it. |
| 126 static uint8_t breakpoint_code_x86[] = { 0xf4 /* HLT */ }; | 126 static uint8_t breakpoint_code_x86[] = { 0xf4 /* HLT */ }; |
| 127 static Abi::BPDef breakpoint_x86 = { | 127 static Abi::BPDef breakpoint_x86 = { |
| 128 sizeof(breakpoint_code_x86), | 128 sizeof(breakpoint_code_x86), |
| 129 breakpoint_code_x86 | 129 breakpoint_code_x86 |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 static uint32_t breakpoint_code_arm[] = { 0xe1277777 /* bkpt 0x7777 */ }; | 132 // Breakpoint on ARM is defined in the validator's model.h. |
| 133 static uint32_t breakpoint_code_arm[] = { 0xE125BE7F /* BKPT 0x5BEF */ }; |
| 133 static Abi::BPDef breakpoint_arm = { | 134 static Abi::BPDef breakpoint_arm = { |
| 134 sizeof(breakpoint_code_arm), | 135 sizeof(breakpoint_code_arm), |
| 135 (uint8_t *) breakpoint_code_arm | 136 (uint8_t *) breakpoint_code_arm |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 static AbiMap_t *GetAbis() { | 139 static AbiMap_t *GetAbis() { |
| 139 static AbiMap_t *_abis = new AbiMap_t(); | 140 static AbiMap_t *_abis = new AbiMap_t(); |
| 140 return _abis; | 141 return _abis; |
| 141 } | 142 } |
| 142 | 143 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 if (index >= regCnt_) return NULL; | 251 if (index >= regCnt_) return NULL; |
| 251 | 252 |
| 252 return ®Defs_[index]; | 253 return ®Defs_[index]; |
| 253 } | 254 } |
| 254 | 255 |
| 255 const Abi::RegDef *Abi::GetInstPtrDef() const { | 256 const Abi::RegDef *Abi::GetInstPtrDef() const { |
| 256 return GetRegisterDef(ipIndex_); | 257 return GetRegisterDef(ipIndex_); |
| 257 } | 258 } |
| 258 | 259 |
| 259 } // namespace gdb_rsp | 260 } // namespace gdb_rsp |
| OLD | NEW |