OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2011 The Native Client Authors. All rights reserved. | |
3 * Use of this source code is governed by a BSD-style license that can | |
4 * be found in the LICENSE file. | |
5 */ | |
6 | |
7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_DEBUG_STUB_DEBUG_TARGET_H_ | |
8 #define NATIVE_CLIENT_SRC_TRUSTED_DEBUG_STUB_DEBUG_TARGET_H_ 1 | |
9 | |
10 #include "native_client/src/include/portability.h" | |
11 | |
12 namespace nacl_debug_conn { | |
13 | |
14 | |
15 const char *RegisterIndexToName(uint32_t regIndex); | |
16 | |
17 enum DebugTargetFlagsX86 { | |
18 DF_CARRY = 0x00000001, | |
19 DF_PARITY = 0x00000004, | |
20 DF_ADJUST = 0x00000010, | |
21 DF_ZERO = 0x00000040, | |
22 DF_SIGN = 0x00000080, | |
23 DF_TRAP = 0x00000100, | |
24 DF_INT = 0x00000200, | |
25 DF_DIR = 0x00000400, | |
26 DF_OVER = 0x00000800, | |
27 DF_IOPL = 0x00003000, | |
28 DF_NEST = 0x00004000, | |
29 DF_RESUME = 0x00010000, | |
30 DF_VIRT = 0x00020000, | |
31 DF_ALIGN = 0x00040000, | |
32 DF_VIF = 0x00080000, | |
33 DF_VIP = 0x00100000, | |
34 DF_ID = 0x00200000 | |
35 }; | |
36 | |
37 // Please keep this structure in sync with Registers.cs in the NaClVsx project. | |
38 // | |
39 typedef struct DebugTargetRegsX86_64_s { | |
40 union { | |
41 uint64_t IntRegs[16]; | |
42 struct { | |
43 uint64_t Rax; | |
44 uint64_t Rbx; | |
45 uint64_t Rcx; | |
46 uint64_t Rdx; | |
47 uint64_t Rsi; | |
48 uint64_t Rdi; | |
49 uint64_t Rbp; | |
50 uint64_t Rsp; | |
51 uint64_t R8; | |
52 uint64_t R9; | |
53 uint64_t R10; | |
54 uint64_t R11; | |
55 uint64_t R12; | |
56 uint64_t R13; | |
57 uint64_t R14; | |
58 uint64_t R15; | |
59 }; | |
60 }; | |
61 uint64_t Rip; | |
62 uint32_t EFlags; | |
63 uint32_t SegCs; | |
64 uint32_t SegSs; | |
65 uint32_t SegDs; | |
66 uint32_t SegEs; | |
67 uint32_t SegFs; | |
68 uint32_t SegGs; | |
69 uint32_t pad; | |
70 } DebugTargetRegsX86_64_t; | |
71 | |
72 | |
73 } // namespace nacl_debug_conn | |
74 | |
75 #endif | |
OLD | NEW |