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 #include <string> | |
8 | |
9 | |
10 #include "debug_conn/debug_packet.h" | |
11 #include "debug_conn/debug_pipe.h" | |
12 #include "debug_conn/debug_socket.h" | |
13 #include "debug_conn/debug_stream.h" | |
14 #include "debug_conn/debug_target.h" | |
15 #include "debug_conn/debug_util.h" | |
16 #include "native_client/src/trusted/debug_stub/debug_stub.h" | |
17 | |
18 using namespace nacl_debug_conn; | |
19 using std::string; | |
20 | |
21 | |
22 const char *nacl_debug_conn::RegisterIndexToName(uint32_t regIndex) { | |
23 switch (regIndex) { | |
24 case 0: return "Rax"; | |
25 case 1: return "Rbx"; | |
26 case 2: return "Rcx"; | |
27 case 3: return "Rdx"; | |
28 case 4: return "Rsi"; | |
29 case 5: return "Rdi"; | |
30 case 6: return "Rbp"; | |
31 case 7: return "Rsp"; | |
32 case 8: return "R8"; | |
33 case 9: return "R9"; | |
34 case 10:return "R10"; | |
35 case 11:return "R11"; | |
36 case 12:return "R12"; | |
37 case 13:return "R13"; | |
38 case 14:return "R14"; | |
39 case 15:return "R15"; | |
40 case 16:return "Rip"; | |
41 case 17:return "EFlags"; | |
42 case 18:return "SegCs"; | |
43 case 19:return "SegSs"; | |
44 case 20:return "SegDs"; | |
45 case 21:return "SegEs"; | |
46 case 22:return "SegFs"; | |
47 case 23:return "SegGs"; | |
48 default: return "UNKN"; | |
49 } | |
50 } | |
OLD | NEW |