Commit | Line | Data |
---|---|---|
1101cb7b TT |
1 | /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */ |
2 | /* vi:set ro: */ | |
3 | ||
4 | /* To regenerate this file, run:*/ | |
5 | /* make-target-delegates target.h > target-delegates.c */ | |
09da0d0a TT |
6 | static void |
7 | delegate_detach (struct target_ops *self, const char *arg1, int arg2) | |
8 | { | |
9 | self = self->beneath; | |
10 | self->to_detach (self, arg1, arg2); | |
11 | } | |
12 | ||
13 | static void | |
14 | tdefault_detach (struct target_ops *self, const char *arg1, int arg2) | |
15 | { | |
16 | } | |
17 | ||
6b84065d TT |
18 | static void |
19 | delegate_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3) | |
20 | { | |
21 | self = self->beneath; | |
22 | self->to_resume (self, arg1, arg2, arg3); | |
23 | } | |
24 | ||
25 | static void | |
26 | tdefault_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3) | |
27 | { | |
28 | noprocess (); | |
29 | } | |
30 | ||
31 | static ptid_t | |
32 | delegate_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3) | |
33 | { | |
34 | self = self->beneath; | |
35 | return self->to_wait (self, arg1, arg2, arg3); | |
36 | } | |
37 | ||
38 | static ptid_t | |
39 | tdefault_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3) | |
40 | { | |
41 | noprocess (); | |
42 | } | |
43 | ||
44 | static void | |
45 | delegate_store_registers (struct target_ops *self, struct regcache *arg1, int arg2) | |
46 | { | |
47 | self = self->beneath; | |
48 | self->to_store_registers (self, arg1, arg2); | |
49 | } | |
50 | ||
51 | static void | |
52 | tdefault_store_registers (struct target_ops *self, struct regcache *arg1, int arg2) | |
53 | { | |
54 | noprocess (); | |
55 | } | |
56 | ||
57 | static int | |
58 | delegate_insert_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2) | |
59 | { | |
60 | self = self->beneath; | |
61 | return self->to_insert_breakpoint (self, arg1, arg2); | |
62 | } | |
63 | ||
64 | static int | |
65 | delegate_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2) | |
66 | { | |
67 | self = self->beneath; | |
68 | return self->to_remove_breakpoint (self, arg1, arg2); | |
69 | } | |
70 | ||
71 | static int | |
72 | delegate_stopped_by_watchpoint (struct target_ops *self) | |
73 | { | |
74 | self = self->beneath; | |
75 | return self->to_stopped_by_watchpoint (self); | |
76 | } | |
77 | ||
78 | static int | |
79 | tdefault_stopped_by_watchpoint (struct target_ops *self) | |
80 | { | |
81 | return 0; | |
82 | } | |
83 | ||
84 | static int | |
85 | delegate_stopped_data_address (struct target_ops *self, CORE_ADDR *arg1) | |
86 | { | |
87 | self = self->beneath; | |
88 | return self->to_stopped_data_address (self, arg1); | |
89 | } | |
90 | ||
91 | static int | |
92 | tdefault_stopped_data_address (struct target_ops *self, CORE_ADDR *arg1) | |
93 | { | |
94 | return 0; | |
95 | } | |
96 | ||
97 | static int | |
98 | delegate_can_async_p (struct target_ops *self) | |
99 | { | |
100 | self = self->beneath; | |
101 | return self->to_can_async_p (self); | |
102 | } | |
103 | ||
104 | static int | |
105 | delegate_is_async_p (struct target_ops *self) | |
106 | { | |
107 | self = self->beneath; | |
108 | return self->to_is_async_p (self); | |
109 | } | |
110 | ||
111 | static void | |
112 | delegate_async (struct target_ops *self, async_callback_ftype *arg1, void *arg2) | |
113 | { | |
114 | self = self->beneath; | |
115 | self->to_async (self, arg1, arg2); | |
116 | } | |
117 | ||
118 | static void | |
119 | tdefault_async (struct target_ops *self, async_callback_ftype *arg1, void *arg2) | |
120 | { | |
121 | tcomplain (); | |
122 | } | |
123 | ||
124 | static enum target_xfer_status | |
125 | delegate_xfer_partial (struct target_ops *self, enum target_object arg1, const char *arg2, gdb_byte *arg3, const gdb_byte *arg4, ULONGEST arg5, ULONGEST arg6, ULONGEST *arg7) | |
126 | { | |
127 | self = self->beneath; | |
128 | return self->to_xfer_partial (self, arg1, arg2, arg3, arg4, arg5, arg6, arg7); | |
129 | } | |
130 | ||
131 | static enum target_xfer_status | |
132 | tdefault_xfer_partial (struct target_ops *self, enum target_object arg1, const char *arg2, gdb_byte *arg3, const gdb_byte *arg4, ULONGEST arg5, ULONGEST arg6, ULONGEST *arg7) | |
133 | { | |
134 | return TARGET_XFER_E_IO; | |
135 | } | |
136 | ||
46917d26 TT |
137 | static int |
138 | delegate_supports_btrace (struct target_ops *self) | |
139 | { | |
140 | self = self->beneath; | |
141 | return self->to_supports_btrace (self); | |
142 | } | |
143 | ||
144 | static int | |
145 | tdefault_supports_btrace (struct target_ops *self) | |
146 | { | |
147 | return 0; | |
148 | } | |
149 | ||
1101cb7b TT |
150 | static void |
151 | install_delegators (struct target_ops *ops) | |
152 | { | |
09da0d0a TT |
153 | if (ops->to_detach == NULL) |
154 | ops->to_detach = delegate_detach; | |
6b84065d TT |
155 | if (ops->to_resume == NULL) |
156 | ops->to_resume = delegate_resume; | |
157 | if (ops->to_wait == NULL) | |
158 | ops->to_wait = delegate_wait; | |
159 | if (ops->to_store_registers == NULL) | |
160 | ops->to_store_registers = delegate_store_registers; | |
161 | if (ops->to_insert_breakpoint == NULL) | |
162 | ops->to_insert_breakpoint = delegate_insert_breakpoint; | |
163 | if (ops->to_remove_breakpoint == NULL) | |
164 | ops->to_remove_breakpoint = delegate_remove_breakpoint; | |
165 | if (ops->to_stopped_by_watchpoint == NULL) | |
166 | ops->to_stopped_by_watchpoint = delegate_stopped_by_watchpoint; | |
167 | if (ops->to_stopped_data_address == NULL) | |
168 | ops->to_stopped_data_address = delegate_stopped_data_address; | |
169 | if (ops->to_can_async_p == NULL) | |
170 | ops->to_can_async_p = delegate_can_async_p; | |
171 | if (ops->to_is_async_p == NULL) | |
172 | ops->to_is_async_p = delegate_is_async_p; | |
173 | if (ops->to_async == NULL) | |
174 | ops->to_async = delegate_async; | |
175 | if (ops->to_xfer_partial == NULL) | |
176 | ops->to_xfer_partial = delegate_xfer_partial; | |
46917d26 TT |
177 | if (ops->to_supports_btrace == NULL) |
178 | ops->to_supports_btrace = delegate_supports_btrace; | |
1101cb7b TT |
179 | } |
180 | ||
181 | static void | |
182 | install_dummy_methods (struct target_ops *ops) | |
183 | { | |
09da0d0a | 184 | ops->to_detach = tdefault_detach; |
6b84065d TT |
185 | ops->to_resume = tdefault_resume; |
186 | ops->to_wait = tdefault_wait; | |
187 | ops->to_store_registers = tdefault_store_registers; | |
188 | ops->to_insert_breakpoint = memory_insert_breakpoint; | |
189 | ops->to_remove_breakpoint = memory_remove_breakpoint; | |
190 | ops->to_stopped_by_watchpoint = tdefault_stopped_by_watchpoint; | |
191 | ops->to_stopped_data_address = tdefault_stopped_data_address; | |
192 | ops->to_can_async_p = find_default_can_async_p; | |
193 | ops->to_is_async_p = find_default_is_async_p; | |
194 | ops->to_async = tdefault_async; | |
195 | ops->to_xfer_partial = tdefault_xfer_partial; | |
46917d26 | 196 | ops->to_supports_btrace = tdefault_supports_btrace; |
1101cb7b | 197 | } |