OLD | NEW |
1 /* Copyright (C) 2007-2012 Free Software Foundation, Inc. | 1 /* Copyright (C) 2007-2013 Free Software Foundation, Inc. |
2 | 2 |
3 This file is part of GDB. | 3 This file is part of GDB. |
4 | 4 |
5 This program is free software; you can redistribute it and/or modify | 5 This program is free software; you can redistribute it and/or modify |
6 it under the terms of the GNU General Public License as published by | 6 it under the terms of the GNU General Public License as published by |
7 the Free Software Foundation; either version 3 of the License, or | 7 the Free Software Foundation; either version 3 of the License, or |
8 (at your option) any later version. | 8 (at your option) any later version. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, | 10 This program is distributed in the hope that it will be useful, |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 GNU General Public License for more details. | 13 GNU General Public License for more details. |
14 | 14 |
15 You should have received a copy of the GNU General Public License | 15 You should have received a copy of the GNU General Public License |
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 16 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
17 | 17 |
18 #include "server.h" | 18 #include "server.h" |
19 #include "win32-low.h" | 19 #include "win32-low.h" |
20 | 20 |
21 #ifndef CONTEXT_FLOATING_POINT | 21 #ifndef CONTEXT_FLOATING_POINT |
22 #define CONTEXT_FLOATING_POINT 0 | 22 #define CONTEXT_FLOATING_POINT 0 |
23 #endif | 23 #endif |
24 | 24 |
25 /* Defined in auto-generated file reg-arm.c. */ | 25 /* Defined in auto-generated file reg-arm.c. */ |
26 void init_registers_arm (void); | 26 void init_registers_arm (void); |
27 | 27 extern const struct target_desc *tdesc_arm; |
28 | 28 |
29 static void | 29 static void |
30 arm_get_thread_context (win32_thread_info *th, DEBUG_EVENT* current_event) | 30 arm_get_thread_context (win32_thread_info *th, DEBUG_EVENT* current_event) |
31 { | 31 { |
32 th->context.ContextFlags = \ | 32 th->context.ContextFlags = \ |
33 CONTEXT_FULL | \ | 33 CONTEXT_FULL | \ |
34 CONTEXT_FLOATING_POINT; | 34 CONTEXT_FLOATING_POINT; |
35 | 35 |
36 GetThreadContext (th->h, &th->context); | 36 GetThreadContext (th->h, &th->context); |
37 } | 37 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 } | 101 } |
102 | 102 |
103 /* Store a new register value into the thread context of TH. */ | 103 /* Store a new register value into the thread context of TH. */ |
104 static void | 104 static void |
105 arm_store_inferior_register (struct regcache *regcache, | 105 arm_store_inferior_register (struct regcache *regcache, |
106 win32_thread_info *th, int r) | 106 win32_thread_info *th, int r) |
107 { | 107 { |
108 collect_register (regcache, r, regptr (&th->context, r)); | 108 collect_register (regcache, r, regptr (&th->context, r)); |
109 } | 109 } |
110 | 110 |
| 111 static void |
| 112 arm_arch_setup (void) |
| 113 { |
| 114 init_registers_arm (); |
| 115 win32_tdesc = tdesc_arm; |
| 116 } |
| 117 |
111 /* Correct in either endianness. We do not support Thumb yet. */ | 118 /* Correct in either endianness. We do not support Thumb yet. */ |
112 static const unsigned long arm_wince_breakpoint = 0xe6000010; | 119 static const unsigned long arm_wince_breakpoint = 0xe6000010; |
113 #define arm_wince_breakpoint_len 4 | 120 #define arm_wince_breakpoint_len 4 |
114 | 121 |
115 struct win32_target_ops the_low_target = { | 122 struct win32_target_ops the_low_target = { |
116 init_registers_arm, | 123 arm_arch_setup, |
117 sizeof (mappings) / sizeof (mappings[0]), | 124 sizeof (mappings) / sizeof (mappings[0]), |
118 NULL, /* initial_stuff */ | 125 NULL, /* initial_stuff */ |
119 arm_get_thread_context, | 126 arm_get_thread_context, |
120 arm_set_thread_context, | 127 arm_set_thread_context, |
121 NULL, /* thread_added */ | 128 NULL, /* thread_added */ |
122 arm_fetch_inferior_register, | 129 arm_fetch_inferior_register, |
123 arm_store_inferior_register, | 130 arm_store_inferior_register, |
124 NULL, /* single_step */ | 131 NULL, /* single_step */ |
125 (const unsigned char *) &arm_wince_breakpoint, | 132 (const unsigned char *) &arm_wince_breakpoint, |
126 arm_wince_breakpoint_len, | 133 arm_wince_breakpoint_len, |
127 /* Watchpoint related functions. See target.h for comments. */ | 134 /* Watchpoint related functions. See target.h for comments. */ |
128 NULL, /* insert_point */ | 135 NULL, /* insert_point */ |
129 NULL, /* remove_point */ | 136 NULL, /* remove_point */ |
130 NULL, /* stopped_by_watchpoint */ | 137 NULL, /* stopped_by_watchpoint */ |
131 NULL /* stopped_data_address */ | 138 NULL /* stopped_data_address */ |
132 }; | 139 }; |
OLD | NEW |