[Cell/B.E.] Make parse_spufs_run more robust
[deliverable/binutils-gdb.git] / gdb / target-delegates.c
CommitLineData
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 */
bebd3233
TT
6static void
7delegate_post_attach (struct target_ops *self, int arg1)
8{
9 self = self->beneath;
10 self->to_post_attach (self, arg1);
11}
12
13static void
14tdefault_post_attach (struct target_ops *self, int arg1)
15{
16}
17
a7068b60
TT
18static void
19debug_post_attach (struct target_ops *self, int arg1)
20{
21 fprintf_unfiltered (gdb_stdlog, "-> %s->to_post_attach (...)\n", debug_target.to_shortname);
22 debug_target.to_post_attach (&debug_target, arg1);
23 fprintf_unfiltered (gdb_stdlog, "<- %s->to_post_attach (", debug_target.to_shortname);
24 target_debug_print_struct_target_ops_p (&debug_target);
25 fputs_unfiltered (", ", gdb_stdlog);
26 target_debug_print_int (arg1);
27 fputs_unfiltered (")\n", gdb_stdlog);
28}
29
09da0d0a
TT
30static void
31delegate_detach (struct target_ops *self, const char *arg1, int arg2)
32{
33 self = self->beneath;
34 self->to_detach (self, arg1, arg2);
35}
36
37static void
38tdefault_detach (struct target_ops *self, const char *arg1, int arg2)
39{
40}
41
a7068b60
TT
42static void
43debug_detach (struct target_ops *self, const char *arg1, int arg2)
44{
45 fprintf_unfiltered (gdb_stdlog, "-> %s->to_detach (...)\n", debug_target.to_shortname);
46 debug_target.to_detach (&debug_target, arg1, arg2);
47 fprintf_unfiltered (gdb_stdlog, "<- %s->to_detach (", debug_target.to_shortname);
48 target_debug_print_struct_target_ops_p (&debug_target);
49 fputs_unfiltered (", ", gdb_stdlog);
50 target_debug_print_const_char_p (arg1);
51 fputs_unfiltered (", ", gdb_stdlog);
52 target_debug_print_int (arg2);
53 fputs_unfiltered (")\n", gdb_stdlog);
54}
55
86a0854a 56static void
fee354ee 57delegate_disconnect (struct target_ops *self, const char *arg1, int arg2)
86a0854a
TT
58{
59 self = self->beneath;
60 self->to_disconnect (self, arg1, arg2);
61}
62
63static void
fee354ee 64tdefault_disconnect (struct target_ops *self, const char *arg1, int arg2)
86a0854a
TT
65{
66 tcomplain ();
67}
68
a7068b60
TT
69static void
70debug_disconnect (struct target_ops *self, const char *arg1, int arg2)
71{
72 fprintf_unfiltered (gdb_stdlog, "-> %s->to_disconnect (...)\n", debug_target.to_shortname);
73 debug_target.to_disconnect (&debug_target, arg1, arg2);
74 fprintf_unfiltered (gdb_stdlog, "<- %s->to_disconnect (", debug_target.to_shortname);
75 target_debug_print_struct_target_ops_p (&debug_target);
76 fputs_unfiltered (", ", gdb_stdlog);
77 target_debug_print_const_char_p (arg1);
78 fputs_unfiltered (", ", gdb_stdlog);
79 target_debug_print_int (arg2);
80 fputs_unfiltered (")\n", gdb_stdlog);
81}
82
6b84065d
TT
83static void
84delegate_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3)
85{
86 self = self->beneath;
87 self->to_resume (self, arg1, arg2, arg3);
88}
89
90static void
91tdefault_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3)
92{
93 noprocess ();
94}
95
a7068b60
TT
96static void
97debug_resume (struct target_ops *self, ptid_t arg1, int arg2, enum gdb_signal arg3)
98{
99 fprintf_unfiltered (gdb_stdlog, "-> %s->to_resume (...)\n", debug_target.to_shortname);
100 debug_target.to_resume (&debug_target, arg1, arg2, arg3);
101 fprintf_unfiltered (gdb_stdlog, "<- %s->to_resume (", debug_target.to_shortname);
102 target_debug_print_struct_target_ops_p (&debug_target);
103 fputs_unfiltered (", ", gdb_stdlog);
104 target_debug_print_ptid_t (arg1);
105 fputs_unfiltered (", ", gdb_stdlog);
106 target_debug_print_step (arg2);
107 fputs_unfiltered (", ", gdb_stdlog);
108 target_debug_print_enum_gdb_signal (arg3);
109 fputs_unfiltered (")\n", gdb_stdlog);
110}
111
6b84065d
TT
112static ptid_t
113delegate_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3)
114{
115 self = self->beneath;
116 return self->to_wait (self, arg1, arg2, arg3);
117}
118
119static ptid_t
120tdefault_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3)
121{
122 noprocess ();
123}
124
a7068b60
TT
125static ptid_t
126debug_wait (struct target_ops *self, ptid_t arg1, struct target_waitstatus *arg2, int arg3)
127{
128 ptid_t result;
129 fprintf_unfiltered (gdb_stdlog, "-> %s->to_wait (...)\n", debug_target.to_shortname);
130 result = debug_target.to_wait (&debug_target, arg1, arg2, arg3);
131 fprintf_unfiltered (gdb_stdlog, "<- %s->to_wait (", debug_target.to_shortname);
132 target_debug_print_struct_target_ops_p (&debug_target);
133 fputs_unfiltered (", ", gdb_stdlog);
134 target_debug_print_ptid_t (arg1);
135 fputs_unfiltered (", ", gdb_stdlog);
136 target_debug_print_struct_target_waitstatus_p (arg2);
137 fputs_unfiltered (", ", gdb_stdlog);
138 target_debug_print_options (arg3);
139 fputs_unfiltered (") = ", gdb_stdlog);
140 target_debug_print_ptid_t (result);
141 fputs_unfiltered ("\n", gdb_stdlog);
142 return result;
143}
144
ad5989bd
TT
145static void
146delegate_fetch_registers (struct target_ops *self, struct regcache *arg1, int arg2)
147{
148 self = self->beneath;
149 self->to_fetch_registers (self, arg1, arg2);
150}
151
152static void
153tdefault_fetch_registers (struct target_ops *self, struct regcache *arg1, int arg2)
154{
155}
156
a7068b60
TT
157static void
158debug_fetch_registers (struct target_ops *self, struct regcache *arg1, int arg2)
159{
160 fprintf_unfiltered (gdb_stdlog, "-> %s->to_fetch_registers (...)\n", debug_target.to_shortname);
161 debug_target.to_fetch_registers (&debug_target, arg1, arg2);
162 fprintf_unfiltered (gdb_stdlog, "<- %s->to_fetch_registers (", debug_target.to_shortname);
163 target_debug_print_struct_target_ops_p (&debug_target);
164 fputs_unfiltered (", ", gdb_stdlog);
165 target_debug_print_struct_regcache_p (arg1);
166 fputs_unfiltered (", ", gdb_stdlog);
167 target_debug_print_int (arg2);
168 fputs_unfiltered (")\n", gdb_stdlog);
169}
170
6b84065d
TT
171static void
172delegate_store_registers (struct target_ops *self, struct regcache *arg1, int arg2)
173{
174 self = self->beneath;
175 self->to_store_registers (self, arg1, arg2);
176}
177
178static void
179tdefault_store_registers (struct target_ops *self, struct regcache *arg1, int arg2)
180{
181 noprocess ();
182}
183
a7068b60
TT
184static void
185debug_store_registers (struct target_ops *self, struct regcache *arg1, int arg2)
186{
187 fprintf_unfiltered (gdb_stdlog, "-> %s->to_store_registers (...)\n", debug_target.to_shortname);
188 debug_target.to_store_registers (&debug_target, arg1, arg2);
189 fprintf_unfiltered (gdb_stdlog, "<- %s->to_store_registers (", debug_target.to_shortname);
190 target_debug_print_struct_target_ops_p (&debug_target);
191 fputs_unfiltered (", ", gdb_stdlog);
192 target_debug_print_struct_regcache_p (arg1);
193 fputs_unfiltered (", ", gdb_stdlog);
194 target_debug_print_int (arg2);
195 fputs_unfiltered (")\n", gdb_stdlog);
196}
197
6c628163
TT
198static void
199delegate_prepare_to_store (struct target_ops *self, struct regcache *arg1)
200{
201 self = self->beneath;
202 self->to_prepare_to_store (self, arg1);
203}
204
205static void
206tdefault_prepare_to_store (struct target_ops *self, struct regcache *arg1)
207{
208 noprocess ();
209}
210
a7068b60
TT
211static void
212debug_prepare_to_store (struct target_ops *self, struct regcache *arg1)
213{
214 fprintf_unfiltered (gdb_stdlog, "-> %s->to_prepare_to_store (...)\n", debug_target.to_shortname);
215 debug_target.to_prepare_to_store (&debug_target, arg1);
216 fprintf_unfiltered (gdb_stdlog, "<- %s->to_prepare_to_store (", debug_target.to_shortname);
217 target_debug_print_struct_target_ops_p (&debug_target);
218 fputs_unfiltered (", ", gdb_stdlog);
219 target_debug_print_struct_regcache_p (arg1);
220 fputs_unfiltered (")\n", gdb_stdlog);
221}
222
f86e59b2
TT
223static void
224delegate_files_info (struct target_ops *self)
225{
226 self = self->beneath;
227 self->to_files_info (self);
228}
229
230static void
231tdefault_files_info (struct target_ops *self)
232{
233}
234
a7068b60
TT
235static void
236debug_files_info (struct target_ops *self)
237{
238 fprintf_unfiltered (gdb_stdlog, "-> %s->to_files_info (...)\n", debug_target.to_shortname);
239 debug_target.to_files_info (&debug_target);
240 fprintf_unfiltered (gdb_stdlog, "<- %s->to_files_info (", debug_target.to_shortname);
241 target_debug_print_struct_target_ops_p (&debug_target);
242 fputs_unfiltered (")\n", gdb_stdlog);
243}
244
6b84065d
TT
245static int
246delegate_insert_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
247{
248 self = self->beneath;
249 return self->to_insert_breakpoint (self, arg1, arg2);
250}
251
a7068b60
TT
252static int
253debug_insert_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
254{
255 int result;
256 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_breakpoint (...)\n", debug_target.to_shortname);
257 result = debug_target.to_insert_breakpoint (&debug_target, arg1, arg2);
258 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insert_breakpoint (", debug_target.to_shortname);
259 target_debug_print_struct_target_ops_p (&debug_target);
260 fputs_unfiltered (", ", gdb_stdlog);
261 target_debug_print_struct_gdbarch_p (arg1);
262 fputs_unfiltered (", ", gdb_stdlog);
263 target_debug_print_struct_bp_target_info_p (arg2);
264 fputs_unfiltered (") = ", gdb_stdlog);
265 target_debug_print_int (result);
266 fputs_unfiltered ("\n", gdb_stdlog);
267 return result;
268}
269
6b84065d
TT
270static int
271delegate_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
272{
273 self = self->beneath;
274 return self->to_remove_breakpoint (self, arg1, arg2);
275}
276
a7068b60
TT
277static int
278debug_remove_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
279{
280 int result;
281 fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_breakpoint (...)\n", debug_target.to_shortname);
282 result = debug_target.to_remove_breakpoint (&debug_target, arg1, arg2);
283 fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_breakpoint (", debug_target.to_shortname);
284 target_debug_print_struct_target_ops_p (&debug_target);
285 fputs_unfiltered (", ", gdb_stdlog);
286 target_debug_print_struct_gdbarch_p (arg1);
287 fputs_unfiltered (", ", gdb_stdlog);
288 target_debug_print_struct_bp_target_info_p (arg2);
289 fputs_unfiltered (") = ", gdb_stdlog);
290 target_debug_print_int (result);
291 fputs_unfiltered ("\n", gdb_stdlog);
292 return result;
293}
294
1cf4d951
PA
295static int
296delegate_stopped_by_sw_breakpoint (struct target_ops *self)
297{
298 self = self->beneath;
299 return self->to_stopped_by_sw_breakpoint (self);
300}
301
302static int
303tdefault_stopped_by_sw_breakpoint (struct target_ops *self)
304{
305 return 0;
306}
307
308static int
309debug_stopped_by_sw_breakpoint (struct target_ops *self)
310{
311 int result;
312 fprintf_unfiltered (gdb_stdlog, "-> %s->to_stopped_by_sw_breakpoint (...)\n", debug_target.to_shortname);
313 result = debug_target.to_stopped_by_sw_breakpoint (&debug_target);
314 fprintf_unfiltered (gdb_stdlog, "<- %s->to_stopped_by_sw_breakpoint (", debug_target.to_shortname);
315 target_debug_print_struct_target_ops_p (&debug_target);
316 fputs_unfiltered (") = ", gdb_stdlog);
317 target_debug_print_int (result);
318 fputs_unfiltered ("\n", gdb_stdlog);
319 return result;
320}
321
322static int
323delegate_supports_stopped_by_sw_breakpoint (struct target_ops *self)
324{
325 self = self->beneath;
326 return self->to_supports_stopped_by_sw_breakpoint (self);
327}
328
329static int
330tdefault_supports_stopped_by_sw_breakpoint (struct target_ops *self)
331{
332 return 0;
333}
334
335static int
336debug_supports_stopped_by_sw_breakpoint (struct target_ops *self)
337{
338 int result;
339 fprintf_unfiltered (gdb_stdlog, "-> %s->to_supports_stopped_by_sw_breakpoint (...)\n", debug_target.to_shortname);
340 result = debug_target.to_supports_stopped_by_sw_breakpoint (&debug_target);
341 fprintf_unfiltered (gdb_stdlog, "<- %s->to_supports_stopped_by_sw_breakpoint (", debug_target.to_shortname);
342 target_debug_print_struct_target_ops_p (&debug_target);
343 fputs_unfiltered (") = ", gdb_stdlog);
344 target_debug_print_int (result);
345 fputs_unfiltered ("\n", gdb_stdlog);
346 return result;
347}
348
349static int
350delegate_stopped_by_hw_breakpoint (struct target_ops *self)
351{
352 self = self->beneath;
353 return self->to_stopped_by_hw_breakpoint (self);
354}
355
356static int
357tdefault_stopped_by_hw_breakpoint (struct target_ops *self)
358{
359 return 0;
360}
361
362static int
363debug_stopped_by_hw_breakpoint (struct target_ops *self)
364{
365 int result;
366 fprintf_unfiltered (gdb_stdlog, "-> %s->to_stopped_by_hw_breakpoint (...)\n", debug_target.to_shortname);
367 result = debug_target.to_stopped_by_hw_breakpoint (&debug_target);
368 fprintf_unfiltered (gdb_stdlog, "<- %s->to_stopped_by_hw_breakpoint (", debug_target.to_shortname);
369 target_debug_print_struct_target_ops_p (&debug_target);
370 fputs_unfiltered (") = ", gdb_stdlog);
371 target_debug_print_int (result);
372 fputs_unfiltered ("\n", gdb_stdlog);
373 return result;
374}
375
376static int
377delegate_supports_stopped_by_hw_breakpoint (struct target_ops *self)
378{
379 self = self->beneath;
380 return self->to_supports_stopped_by_hw_breakpoint (self);
381}
382
383static int
384tdefault_supports_stopped_by_hw_breakpoint (struct target_ops *self)
385{
386 return 0;
387}
388
389static int
390debug_supports_stopped_by_hw_breakpoint (struct target_ops *self)
391{
392 int result;
393 fprintf_unfiltered (gdb_stdlog, "-> %s->to_supports_stopped_by_hw_breakpoint (...)\n", debug_target.to_shortname);
394 result = debug_target.to_supports_stopped_by_hw_breakpoint (&debug_target);
395 fprintf_unfiltered (gdb_stdlog, "<- %s->to_supports_stopped_by_hw_breakpoint (", debug_target.to_shortname);
396 target_debug_print_struct_target_ops_p (&debug_target);
397 fputs_unfiltered (") = ", gdb_stdlog);
398 target_debug_print_int (result);
399 fputs_unfiltered ("\n", gdb_stdlog);
400 return result;
401}
402
52b51d06 403static int
f486487f 404delegate_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
52b51d06
TT
405{
406 self = self->beneath;
407 return self->to_can_use_hw_breakpoint (self, arg1, arg2, arg3);
408}
409
410static int
f486487f 411tdefault_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
52b51d06
TT
412{
413 return 0;
414}
415
a7068b60 416static int
f486487f 417debug_can_use_hw_breakpoint (struct target_ops *self, enum bptype arg1, int arg2, int arg3)
a7068b60
TT
418{
419 int result;
420 fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_use_hw_breakpoint (...)\n", debug_target.to_shortname);
421 result = debug_target.to_can_use_hw_breakpoint (&debug_target, arg1, arg2, arg3);
422 fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_use_hw_breakpoint (", debug_target.to_shortname);
423 target_debug_print_struct_target_ops_p (&debug_target);
424 fputs_unfiltered (", ", gdb_stdlog);
f486487f 425 target_debug_print_enum_bptype (arg1);
a7068b60
TT
426 fputs_unfiltered (", ", gdb_stdlog);
427 target_debug_print_int (arg2);
428 fputs_unfiltered (", ", gdb_stdlog);
429 target_debug_print_int (arg3);
430 fputs_unfiltered (") = ", gdb_stdlog);
431 target_debug_print_int (result);
432 fputs_unfiltered ("\n", gdb_stdlog);
433 return result;
434}
435
a134316b
TT
436static int
437delegate_ranged_break_num_registers (struct target_ops *self)
438{
439 self = self->beneath;
440 return self->to_ranged_break_num_registers (self);
441}
442
443static int
444tdefault_ranged_break_num_registers (struct target_ops *self)
445{
446 return -1;
447}
448
a7068b60
TT
449static int
450debug_ranged_break_num_registers (struct target_ops *self)
451{
452 int result;
453 fprintf_unfiltered (gdb_stdlog, "-> %s->to_ranged_break_num_registers (...)\n", debug_target.to_shortname);
454 result = debug_target.to_ranged_break_num_registers (&debug_target);
455 fprintf_unfiltered (gdb_stdlog, "<- %s->to_ranged_break_num_registers (", debug_target.to_shortname);
456 target_debug_print_struct_target_ops_p (&debug_target);
457 fputs_unfiltered (") = ", gdb_stdlog);
458 target_debug_print_int (result);
459 fputs_unfiltered ("\n", gdb_stdlog);
460 return result;
461}
462
61b371f9
TT
463static int
464delegate_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
465{
466 self = self->beneath;
467 return self->to_insert_hw_breakpoint (self, arg1, arg2);
468}
469
470static int
471tdefault_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
472{
473 return -1;
474}
475
a7068b60
TT
476static int
477debug_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
478{
479 int result;
480 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_hw_breakpoint (...)\n", debug_target.to_shortname);
481 result = debug_target.to_insert_hw_breakpoint (&debug_target, arg1, arg2);
482 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insert_hw_breakpoint (", debug_target.to_shortname);
483 target_debug_print_struct_target_ops_p (&debug_target);
484 fputs_unfiltered (", ", gdb_stdlog);
485 target_debug_print_struct_gdbarch_p (arg1);
486 fputs_unfiltered (", ", gdb_stdlog);
487 target_debug_print_struct_bp_target_info_p (arg2);
488 fputs_unfiltered (") = ", gdb_stdlog);
489 target_debug_print_int (result);
490 fputs_unfiltered ("\n", gdb_stdlog);
491 return result;
492}
493
418dabac
TT
494static int
495delegate_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
496{
497 self = self->beneath;
498 return self->to_remove_hw_breakpoint (self, arg1, arg2);
499}
500
501static int
502tdefault_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
503{
504 return -1;
505}
506
a7068b60
TT
507static int
508debug_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *arg1, struct bp_target_info *arg2)
509{
510 int result;
511 fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_hw_breakpoint (...)\n", debug_target.to_shortname);
512 result = debug_target.to_remove_hw_breakpoint (&debug_target, arg1, arg2);
513 fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_hw_breakpoint (", debug_target.to_shortname);
514 target_debug_print_struct_target_ops_p (&debug_target);
515 fputs_unfiltered (", ", gdb_stdlog);
516 target_debug_print_struct_gdbarch_p (arg1);
517 fputs_unfiltered (", ", gdb_stdlog);
518 target_debug_print_struct_bp_target_info_p (arg2);
519 fputs_unfiltered (") = ", gdb_stdlog);
520 target_debug_print_int (result);
521 fputs_unfiltered ("\n", gdb_stdlog);
522 return result;
523}
524
61dd109f 525static int
f486487f 526delegate_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
61dd109f
TT
527{
528 self = self->beneath;
529 return self->to_remove_watchpoint (self, arg1, arg2, arg3, arg4);
530}
531
532static int
f486487f 533tdefault_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
61dd109f
TT
534{
535 return -1;
536}
537
a7068b60 538static int
f486487f 539debug_remove_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
a7068b60
TT
540{
541 int result;
542 fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_watchpoint (...)\n", debug_target.to_shortname);
543 result = debug_target.to_remove_watchpoint (&debug_target, arg1, arg2, arg3, arg4);
544 fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_watchpoint (", debug_target.to_shortname);
545 target_debug_print_struct_target_ops_p (&debug_target);
546 fputs_unfiltered (", ", gdb_stdlog);
547 target_debug_print_CORE_ADDR (arg1);
548 fputs_unfiltered (", ", gdb_stdlog);
549 target_debug_print_int (arg2);
550 fputs_unfiltered (", ", gdb_stdlog);
f486487f 551 target_debug_print_enum_target_hw_bp_type (arg3);
a7068b60
TT
552 fputs_unfiltered (", ", gdb_stdlog);
553 target_debug_print_struct_expression_p (arg4);
554 fputs_unfiltered (") = ", gdb_stdlog);
555 target_debug_print_int (result);
556 fputs_unfiltered ("\n", gdb_stdlog);
557 return result;
558}
559
016facd4 560static int
f486487f 561delegate_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
016facd4
TT
562{
563 self = self->beneath;
564 return self->to_insert_watchpoint (self, arg1, arg2, arg3, arg4);
565}
566
567static int
f486487f 568tdefault_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
016facd4
TT
569{
570 return -1;
571}
572
a7068b60 573static int
f486487f 574debug_insert_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2, enum target_hw_bp_type arg3, struct expression *arg4)
a7068b60
TT
575{
576 int result;
577 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_watchpoint (...)\n", debug_target.to_shortname);
578 result = debug_target.to_insert_watchpoint (&debug_target, arg1, arg2, arg3, arg4);
579 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insert_watchpoint (", debug_target.to_shortname);
580 target_debug_print_struct_target_ops_p (&debug_target);
581 fputs_unfiltered (", ", gdb_stdlog);
582 target_debug_print_CORE_ADDR (arg1);
583 fputs_unfiltered (", ", gdb_stdlog);
584 target_debug_print_int (arg2);
585 fputs_unfiltered (", ", gdb_stdlog);
f486487f 586 target_debug_print_enum_target_hw_bp_type (arg3);
a7068b60
TT
587 fputs_unfiltered (", ", gdb_stdlog);
588 target_debug_print_struct_expression_p (arg4);
589 fputs_unfiltered (") = ", gdb_stdlog);
590 target_debug_print_int (result);
591 fputs_unfiltered ("\n", gdb_stdlog);
592 return result;
593}
594
cd4ae029
TT
595static int
596delegate_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
597{
598 self = self->beneath;
599 return self->to_insert_mask_watchpoint (self, arg1, arg2, arg3);
600}
601
602static int
603tdefault_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
604{
605 return 1;
606}
607
a7068b60
TT
608static int
609debug_insert_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
610{
611 int result;
612 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_mask_watchpoint (...)\n", debug_target.to_shortname);
613 result = debug_target.to_insert_mask_watchpoint (&debug_target, arg1, arg2, arg3);
614 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insert_mask_watchpoint (", debug_target.to_shortname);
615 target_debug_print_struct_target_ops_p (&debug_target);
616 fputs_unfiltered (", ", gdb_stdlog);
617 target_debug_print_CORE_ADDR (arg1);
618 fputs_unfiltered (", ", gdb_stdlog);
619 target_debug_print_CORE_ADDR (arg2);
620 fputs_unfiltered (", ", gdb_stdlog);
621 target_debug_print_int (arg3);
622 fputs_unfiltered (") = ", gdb_stdlog);
623 target_debug_print_int (result);
624 fputs_unfiltered ("\n", gdb_stdlog);
625 return result;
626}
627
8b1c364c
TT
628static int
629delegate_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
630{
631 self = self->beneath;
632 return self->to_remove_mask_watchpoint (self, arg1, arg2, arg3);
633}
634
635static int
636tdefault_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
637{
638 return 1;
639}
640
a7068b60
TT
641static int
642debug_remove_mask_watchpoint (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
643{
644 int result;
645 fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_mask_watchpoint (...)\n", debug_target.to_shortname);
646 result = debug_target.to_remove_mask_watchpoint (&debug_target, arg1, arg2, arg3);
647 fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_mask_watchpoint (", debug_target.to_shortname);
648 target_debug_print_struct_target_ops_p (&debug_target);
649 fputs_unfiltered (", ", gdb_stdlog);
650 target_debug_print_CORE_ADDR (arg1);
651 fputs_unfiltered (", ", gdb_stdlog);
652 target_debug_print_CORE_ADDR (arg2);
653 fputs_unfiltered (", ", gdb_stdlog);
654 target_debug_print_int (arg3);
655 fputs_unfiltered (") = ", gdb_stdlog);
656 target_debug_print_int (result);
657 fputs_unfiltered ("\n", gdb_stdlog);
658 return result;
659}
660
6b84065d
TT
661static int
662delegate_stopped_by_watchpoint (struct target_ops *self)
663{
664 self = self->beneath;
665 return self->to_stopped_by_watchpoint (self);
666}
667
668static int
669tdefault_stopped_by_watchpoint (struct target_ops *self)
670{
671 return 0;
672}
673
a7068b60
TT
674static int
675debug_stopped_by_watchpoint (struct target_ops *self)
676{
677 int result;
678 fprintf_unfiltered (gdb_stdlog, "-> %s->to_stopped_by_watchpoint (...)\n", debug_target.to_shortname);
679 result = debug_target.to_stopped_by_watchpoint (&debug_target);
680 fprintf_unfiltered (gdb_stdlog, "<- %s->to_stopped_by_watchpoint (", debug_target.to_shortname);
681 target_debug_print_struct_target_ops_p (&debug_target);
682 fputs_unfiltered (") = ", gdb_stdlog);
683 target_debug_print_int (result);
684 fputs_unfiltered ("\n", gdb_stdlog);
685 return result;
686}
687
6b84065d
TT
688static int
689delegate_stopped_data_address (struct target_ops *self, CORE_ADDR *arg1)
690{
691 self = self->beneath;
692 return self->to_stopped_data_address (self, arg1);
693}
694
695static int
696tdefault_stopped_data_address (struct target_ops *self, CORE_ADDR *arg1)
697{
698 return 0;
699}
700
a7068b60
TT
701static int
702debug_stopped_data_address (struct target_ops *self, CORE_ADDR *arg1)
703{
704 int result;
705 fprintf_unfiltered (gdb_stdlog, "-> %s->to_stopped_data_address (...)\n", debug_target.to_shortname);
706 result = debug_target.to_stopped_data_address (&debug_target, arg1);
707 fprintf_unfiltered (gdb_stdlog, "<- %s->to_stopped_data_address (", debug_target.to_shortname);
708 target_debug_print_struct_target_ops_p (&debug_target);
709 fputs_unfiltered (", ", gdb_stdlog);
710 target_debug_print_CORE_ADDR_p (arg1);
711 fputs_unfiltered (") = ", gdb_stdlog);
712 target_debug_print_int (result);
713 fputs_unfiltered ("\n", gdb_stdlog);
714 return result;
715}
716
65f160a9
TT
717static int
718delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
719{
720 self = self->beneath;
721 return self->to_watchpoint_addr_within_range (self, arg1, arg2, arg3);
722}
723
a7068b60
TT
724static int
725debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
726{
727 int result;
728 fprintf_unfiltered (gdb_stdlog, "-> %s->to_watchpoint_addr_within_range (...)\n", debug_target.to_shortname);
729 result = debug_target.to_watchpoint_addr_within_range (&debug_target, arg1, arg2, arg3);
730 fprintf_unfiltered (gdb_stdlog, "<- %s->to_watchpoint_addr_within_range (", debug_target.to_shortname);
731 target_debug_print_struct_target_ops_p (&debug_target);
732 fputs_unfiltered (", ", gdb_stdlog);
733 target_debug_print_CORE_ADDR (arg1);
734 fputs_unfiltered (", ", gdb_stdlog);
735 target_debug_print_CORE_ADDR (arg2);
736 fputs_unfiltered (", ", gdb_stdlog);
737 target_debug_print_int (arg3);
738 fputs_unfiltered (") = ", gdb_stdlog);
739 target_debug_print_int (result);
740 fputs_unfiltered ("\n", gdb_stdlog);
741 return result;
742}
743
d03655e4
TT
744static int
745delegate_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2)
746{
747 self = self->beneath;
748 return self->to_region_ok_for_hw_watchpoint (self, arg1, arg2);
749}
750
a7068b60
TT
751static int
752debug_region_ok_for_hw_watchpoint (struct target_ops *self, CORE_ADDR arg1, int arg2)
753{
754 int result;
755 fprintf_unfiltered (gdb_stdlog, "-> %s->to_region_ok_for_hw_watchpoint (...)\n", debug_target.to_shortname);
756 result = debug_target.to_region_ok_for_hw_watchpoint (&debug_target, arg1, arg2);
757 fprintf_unfiltered (gdb_stdlog, "<- %s->to_region_ok_for_hw_watchpoint (", debug_target.to_shortname);
758 target_debug_print_struct_target_ops_p (&debug_target);
759 fputs_unfiltered (", ", gdb_stdlog);
760 target_debug_print_CORE_ADDR (arg1);
761 fputs_unfiltered (", ", gdb_stdlog);
762 target_debug_print_int (arg2);
763 fputs_unfiltered (") = ", gdb_stdlog);
764 target_debug_print_int (result);
765 fputs_unfiltered ("\n", gdb_stdlog);
766 return result;
767}
768
77cdffe9
TT
769static int
770delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
771{
772 self = self->beneath;
773 return self->to_can_accel_watchpoint_condition (self, arg1, arg2, arg3, arg4);
774}
775
776static int
777tdefault_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
778{
779 return 0;
780}
781
a7068b60
TT
782static int
783debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
784{
785 int result;
786 fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_accel_watchpoint_condition (...)\n", debug_target.to_shortname);
787 result = debug_target.to_can_accel_watchpoint_condition (&debug_target, arg1, arg2, arg3, arg4);
788 fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_accel_watchpoint_condition (", debug_target.to_shortname);
789 target_debug_print_struct_target_ops_p (&debug_target);
790 fputs_unfiltered (", ", gdb_stdlog);
791 target_debug_print_CORE_ADDR (arg1);
792 fputs_unfiltered (", ", gdb_stdlog);
793 target_debug_print_int (arg2);
794 fputs_unfiltered (", ", gdb_stdlog);
795 target_debug_print_int (arg3);
796 fputs_unfiltered (", ", gdb_stdlog);
797 target_debug_print_struct_expression_p (arg4);
798 fputs_unfiltered (") = ", gdb_stdlog);
799 target_debug_print_int (result);
800 fputs_unfiltered ("\n", gdb_stdlog);
801 return result;
802}
803
6c7e5e5c
TT
804static int
805delegate_masked_watch_num_registers (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2)
806{
807 self = self->beneath;
808 return self->to_masked_watch_num_registers (self, arg1, arg2);
809}
810
811static int
812tdefault_masked_watch_num_registers (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2)
813{
814 return -1;
815}
816
a7068b60
TT
817static int
818debug_masked_watch_num_registers (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2)
819{
820 int result;
821 fprintf_unfiltered (gdb_stdlog, "-> %s->to_masked_watch_num_registers (...)\n", debug_target.to_shortname);
822 result = debug_target.to_masked_watch_num_registers (&debug_target, arg1, arg2);
823 fprintf_unfiltered (gdb_stdlog, "<- %s->to_masked_watch_num_registers (", debug_target.to_shortname);
824 target_debug_print_struct_target_ops_p (&debug_target);
825 fputs_unfiltered (", ", gdb_stdlog);
826 target_debug_print_CORE_ADDR (arg1);
827 fputs_unfiltered (", ", gdb_stdlog);
828 target_debug_print_CORE_ADDR (arg2);
829 fputs_unfiltered (") = ", gdb_stdlog);
830 target_debug_print_int (result);
831 fputs_unfiltered ("\n", gdb_stdlog);
832 return result;
833}
834
0343661d
TT
835static void
836delegate_terminal_init (struct target_ops *self)
837{
838 self = self->beneath;
839 self->to_terminal_init (self);
840}
841
842static void
843tdefault_terminal_init (struct target_ops *self)
844{
845}
846
a7068b60
TT
847static void
848debug_terminal_init (struct target_ops *self)
849{
850 fprintf_unfiltered (gdb_stdlog, "-> %s->to_terminal_init (...)\n", debug_target.to_shortname);
851 debug_target.to_terminal_init (&debug_target);
852 fprintf_unfiltered (gdb_stdlog, "<- %s->to_terminal_init (", debug_target.to_shortname);
853 target_debug_print_struct_target_ops_p (&debug_target);
854 fputs_unfiltered (")\n", gdb_stdlog);
855}
856
ddeaacc9
TT
857static void
858delegate_terminal_inferior (struct target_ops *self)
859{
860 self = self->beneath;
861 self->to_terminal_inferior (self);
862}
863
864static void
865tdefault_terminal_inferior (struct target_ops *self)
866{
867}
868
a7068b60
TT
869static void
870debug_terminal_inferior (struct target_ops *self)
871{
872 fprintf_unfiltered (gdb_stdlog, "-> %s->to_terminal_inferior (...)\n", debug_target.to_shortname);
873 debug_target.to_terminal_inferior (&debug_target);
874 fprintf_unfiltered (gdb_stdlog, "<- %s->to_terminal_inferior (", debug_target.to_shortname);
875 target_debug_print_struct_target_ops_p (&debug_target);
876 fputs_unfiltered (")\n", gdb_stdlog);
877}
878
74fcbef9
TT
879static void
880delegate_terminal_ours_for_output (struct target_ops *self)
881{
882 self = self->beneath;
883 self->to_terminal_ours_for_output (self);
884}
885
886static void
887tdefault_terminal_ours_for_output (struct target_ops *self)
888{
889}
890
a7068b60
TT
891static void
892debug_terminal_ours_for_output (struct target_ops *self)
893{
894 fprintf_unfiltered (gdb_stdlog, "-> %s->to_terminal_ours_for_output (...)\n", debug_target.to_shortname);
895 debug_target.to_terminal_ours_for_output (&debug_target);
896 fprintf_unfiltered (gdb_stdlog, "<- %s->to_terminal_ours_for_output (", debug_target.to_shortname);
897 target_debug_print_struct_target_ops_p (&debug_target);
898 fputs_unfiltered (")\n", gdb_stdlog);
899}
900
e4a733f1
TT
901static void
902delegate_terminal_ours (struct target_ops *self)
903{
904 self = self->beneath;
905 self->to_terminal_ours (self);
906}
907
908static void
909tdefault_terminal_ours (struct target_ops *self)
910{
911}
912
a7068b60
TT
913static void
914debug_terminal_ours (struct target_ops *self)
915{
916 fprintf_unfiltered (gdb_stdlog, "-> %s->to_terminal_ours (...)\n", debug_target.to_shortname);
917 debug_target.to_terminal_ours (&debug_target);
918 fprintf_unfiltered (gdb_stdlog, "<- %s->to_terminal_ours (", debug_target.to_shortname);
919 target_debug_print_struct_target_ops_p (&debug_target);
920 fputs_unfiltered (")\n", gdb_stdlog);
921}
922
e19e919f
TT
923static void
924delegate_terminal_info (struct target_ops *self, const char *arg1, int arg2)
925{
926 self = self->beneath;
927 self->to_terminal_info (self, arg1, arg2);
928}
929
a7068b60
TT
930static void
931debug_terminal_info (struct target_ops *self, const char *arg1, int arg2)
932{
933 fprintf_unfiltered (gdb_stdlog, "-> %s->to_terminal_info (...)\n", debug_target.to_shortname);
934 debug_target.to_terminal_info (&debug_target, arg1, arg2);
935 fprintf_unfiltered (gdb_stdlog, "<- %s->to_terminal_info (", debug_target.to_shortname);
936 target_debug_print_struct_target_ops_p (&debug_target);
937 fputs_unfiltered (", ", gdb_stdlog);
938 target_debug_print_const_char_p (arg1);
939 fputs_unfiltered (", ", gdb_stdlog);
940 target_debug_print_int (arg2);
941 fputs_unfiltered (")\n", gdb_stdlog);
942}
943
423a4807
TT
944static void
945delegate_kill (struct target_ops *self)
946{
947 self = self->beneath;
948 self->to_kill (self);
949}
950
951static void
952tdefault_kill (struct target_ops *self)
953{
954 noprocess ();
955}
956
a7068b60
TT
957static void
958debug_kill (struct target_ops *self)
959{
960 fprintf_unfiltered (gdb_stdlog, "-> %s->to_kill (...)\n", debug_target.to_shortname);
961 debug_target.to_kill (&debug_target);
962 fprintf_unfiltered (gdb_stdlog, "<- %s->to_kill (", debug_target.to_shortname);
963 target_debug_print_struct_target_ops_p (&debug_target);
964 fputs_unfiltered (")\n", gdb_stdlog);
965}
966
7634da87 967static void
9cbe5fff 968delegate_load (struct target_ops *self, const char *arg1, int arg2)
7634da87
TT
969{
970 self = self->beneath;
971 self->to_load (self, arg1, arg2);
972}
973
974static void
9cbe5fff 975tdefault_load (struct target_ops *self, const char *arg1, int arg2)
7634da87
TT
976{
977 tcomplain ();
978}
979
a7068b60
TT
980static void
981debug_load (struct target_ops *self, const char *arg1, int arg2)
982{
983 fprintf_unfiltered (gdb_stdlog, "-> %s->to_load (...)\n", debug_target.to_shortname);
984 debug_target.to_load (&debug_target, arg1, arg2);
985 fprintf_unfiltered (gdb_stdlog, "<- %s->to_load (", debug_target.to_shortname);
986 target_debug_print_struct_target_ops_p (&debug_target);
987 fputs_unfiltered (", ", gdb_stdlog);
988 target_debug_print_const_char_p (arg1);
989 fputs_unfiltered (", ", gdb_stdlog);
990 target_debug_print_int (arg2);
991 fputs_unfiltered (")\n", gdb_stdlog);
992}
993
340ba4bf
TT
994static void
995delegate_post_startup_inferior (struct target_ops *self, ptid_t arg1)
996{
997 self = self->beneath;
998 self->to_post_startup_inferior (self, arg1);
999}
1000
1001static void
1002tdefault_post_startup_inferior (struct target_ops *self, ptid_t arg1)
1003{
1004}
1005
a7068b60
TT
1006static void
1007debug_post_startup_inferior (struct target_ops *self, ptid_t arg1)
1008{
1009 fprintf_unfiltered (gdb_stdlog, "-> %s->to_post_startup_inferior (...)\n", debug_target.to_shortname);
1010 debug_target.to_post_startup_inferior (&debug_target, arg1);
1011 fprintf_unfiltered (gdb_stdlog, "<- %s->to_post_startup_inferior (", debug_target.to_shortname);
1012 target_debug_print_struct_target_ops_p (&debug_target);
1013 fputs_unfiltered (", ", gdb_stdlog);
1014 target_debug_print_ptid_t (arg1);
1015 fputs_unfiltered (")\n", gdb_stdlog);
1016}
1017
5958ebeb
TT
1018static int
1019delegate_insert_fork_catchpoint (struct target_ops *self, int arg1)
1020{
1021 self = self->beneath;
1022 return self->to_insert_fork_catchpoint (self, arg1);
1023}
1024
1025static int
1026tdefault_insert_fork_catchpoint (struct target_ops *self, int arg1)
1027{
1028 return 1;
1029}
1030
a7068b60
TT
1031static int
1032debug_insert_fork_catchpoint (struct target_ops *self, int arg1)
1033{
1034 int result;
1035 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_fork_catchpoint (...)\n", debug_target.to_shortname);
1036 result = debug_target.to_insert_fork_catchpoint (&debug_target, arg1);
1037 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insert_fork_catchpoint (", debug_target.to_shortname);
1038 target_debug_print_struct_target_ops_p (&debug_target);
1039 fputs_unfiltered (", ", gdb_stdlog);
1040 target_debug_print_int (arg1);
1041 fputs_unfiltered (") = ", gdb_stdlog);
1042 target_debug_print_int (result);
1043 fputs_unfiltered ("\n", gdb_stdlog);
1044 return result;
1045}
1046
e1a21fb7
TT
1047static int
1048delegate_remove_fork_catchpoint (struct target_ops *self, int arg1)
1049{
1050 self = self->beneath;
1051 return self->to_remove_fork_catchpoint (self, arg1);
1052}
1053
1054static int
1055tdefault_remove_fork_catchpoint (struct target_ops *self, int arg1)
1056{
1057 return 1;
1058}
1059
a7068b60
TT
1060static int
1061debug_remove_fork_catchpoint (struct target_ops *self, int arg1)
1062{
1063 int result;
1064 fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_fork_catchpoint (...)\n", debug_target.to_shortname);
1065 result = debug_target.to_remove_fork_catchpoint (&debug_target, arg1);
1066 fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_fork_catchpoint (", debug_target.to_shortname);
1067 target_debug_print_struct_target_ops_p (&debug_target);
1068 fputs_unfiltered (", ", gdb_stdlog);
1069 target_debug_print_int (arg1);
1070 fputs_unfiltered (") = ", gdb_stdlog);
1071 target_debug_print_int (result);
1072 fputs_unfiltered ("\n", gdb_stdlog);
1073 return result;
1074}
1075
7e18a8dc
TT
1076static int
1077delegate_insert_vfork_catchpoint (struct target_ops *self, int arg1)
1078{
1079 self = self->beneath;
1080 return self->to_insert_vfork_catchpoint (self, arg1);
1081}
1082
1083static int
1084tdefault_insert_vfork_catchpoint (struct target_ops *self, int arg1)
1085{
1086 return 1;
1087}
1088
a7068b60
TT
1089static int
1090debug_insert_vfork_catchpoint (struct target_ops *self, int arg1)
1091{
1092 int result;
1093 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_vfork_catchpoint (...)\n", debug_target.to_shortname);
1094 result = debug_target.to_insert_vfork_catchpoint (&debug_target, arg1);
1095 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insert_vfork_catchpoint (", debug_target.to_shortname);
1096 target_debug_print_struct_target_ops_p (&debug_target);
1097 fputs_unfiltered (", ", gdb_stdlog);
1098 target_debug_print_int (arg1);
1099 fputs_unfiltered (") = ", gdb_stdlog);
1100 target_debug_print_int (result);
1101 fputs_unfiltered ("\n", gdb_stdlog);
1102 return result;
1103}
1104
95c3375e
TT
1105static int
1106delegate_remove_vfork_catchpoint (struct target_ops *self, int arg1)
1107{
1108 self = self->beneath;
1109 return self->to_remove_vfork_catchpoint (self, arg1);
1110}
1111
1112static int
1113tdefault_remove_vfork_catchpoint (struct target_ops *self, int arg1)
1114{
1115 return 1;
1116}
1117
a7068b60
TT
1118static int
1119debug_remove_vfork_catchpoint (struct target_ops *self, int arg1)
1120{
1121 int result;
1122 fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_vfork_catchpoint (...)\n", debug_target.to_shortname);
1123 result = debug_target.to_remove_vfork_catchpoint (&debug_target, arg1);
1124 fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_vfork_catchpoint (", debug_target.to_shortname);
1125 target_debug_print_struct_target_ops_p (&debug_target);
1126 fputs_unfiltered (", ", gdb_stdlog);
1127 target_debug_print_int (arg1);
1128 fputs_unfiltered (") = ", gdb_stdlog);
1129 target_debug_print_int (result);
1130 fputs_unfiltered ("\n", gdb_stdlog);
1131 return result;
1132}
1133
098dba18
TT
1134static int
1135delegate_follow_fork (struct target_ops *self, int arg1, int arg2)
1136{
1137 self = self->beneath;
1138 return self->to_follow_fork (self, arg1, arg2);
1139}
1140
a7068b60
TT
1141static int
1142debug_follow_fork (struct target_ops *self, int arg1, int arg2)
1143{
1144 int result;
1145 fprintf_unfiltered (gdb_stdlog, "-> %s->to_follow_fork (...)\n", debug_target.to_shortname);
1146 result = debug_target.to_follow_fork (&debug_target, arg1, arg2);
1147 fprintf_unfiltered (gdb_stdlog, "<- %s->to_follow_fork (", debug_target.to_shortname);
1148 target_debug_print_struct_target_ops_p (&debug_target);
1149 fputs_unfiltered (", ", gdb_stdlog);
1150 target_debug_print_int (arg1);
1151 fputs_unfiltered (", ", gdb_stdlog);
1152 target_debug_print_int (arg2);
1153 fputs_unfiltered (") = ", gdb_stdlog);
1154 target_debug_print_int (result);
1155 fputs_unfiltered ("\n", gdb_stdlog);
1156 return result;
1157}
1158
62f64d7a
TT
1159static int
1160delegate_insert_exec_catchpoint (struct target_ops *self, int arg1)
1161{
1162 self = self->beneath;
1163 return self->to_insert_exec_catchpoint (self, arg1);
1164}
1165
1166static int
1167tdefault_insert_exec_catchpoint (struct target_ops *self, int arg1)
1168{
1169 return 1;
1170}
1171
a7068b60
TT
1172static int
1173debug_insert_exec_catchpoint (struct target_ops *self, int arg1)
1174{
1175 int result;
1176 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insert_exec_catchpoint (...)\n", debug_target.to_shortname);
1177 result = debug_target.to_insert_exec_catchpoint (&debug_target, arg1);
1178 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insert_exec_catchpoint (", debug_target.to_shortname);
1179 target_debug_print_struct_target_ops_p (&debug_target);
1180 fputs_unfiltered (", ", gdb_stdlog);
1181 target_debug_print_int (arg1);
1182 fputs_unfiltered (") = ", gdb_stdlog);
1183 target_debug_print_int (result);
1184 fputs_unfiltered ("\n", gdb_stdlog);
1185 return result;
1186}
1187
cda0f38c
TT
1188static int
1189delegate_remove_exec_catchpoint (struct target_ops *self, int arg1)
1190{
1191 self = self->beneath;
1192 return self->to_remove_exec_catchpoint (self, arg1);
1193}
1194
1195static int
1196tdefault_remove_exec_catchpoint (struct target_ops *self, int arg1)
1197{
1198 return 1;
1199}
1200
a7068b60
TT
1201static int
1202debug_remove_exec_catchpoint (struct target_ops *self, int arg1)
1203{
1204 int result;
1205 fprintf_unfiltered (gdb_stdlog, "-> %s->to_remove_exec_catchpoint (...)\n", debug_target.to_shortname);
1206 result = debug_target.to_remove_exec_catchpoint (&debug_target, arg1);
1207 fprintf_unfiltered (gdb_stdlog, "<- %s->to_remove_exec_catchpoint (", debug_target.to_shortname);
1208 target_debug_print_struct_target_ops_p (&debug_target);
1209 fputs_unfiltered (", ", gdb_stdlog);
1210 target_debug_print_int (arg1);
1211 fputs_unfiltered (") = ", gdb_stdlog);
1212 target_debug_print_int (result);
1213 fputs_unfiltered ("\n", gdb_stdlog);
1214 return result;
1215}
1216
6a9fa051
TT
1217static int
1218delegate_set_syscall_catchpoint (struct target_ops *self, int arg1, int arg2, int arg3, int arg4, int *arg5)
1219{
1220 self = self->beneath;
1221 return self->to_set_syscall_catchpoint (self, arg1, arg2, arg3, arg4, arg5);
1222}
1223
1224static int
1225tdefault_set_syscall_catchpoint (struct target_ops *self, int arg1, int arg2, int arg3, int arg4, int *arg5)
1226{
1227 return 1;
1228}
1229
a7068b60
TT
1230static int
1231debug_set_syscall_catchpoint (struct target_ops *self, int arg1, int arg2, int arg3, int arg4, int *arg5)
1232{
1233 int result;
1234 fprintf_unfiltered (gdb_stdlog, "-> %s->to_set_syscall_catchpoint (...)\n", debug_target.to_shortname);
1235 result = debug_target.to_set_syscall_catchpoint (&debug_target, arg1, arg2, arg3, arg4, arg5);
1236 fprintf_unfiltered (gdb_stdlog, "<- %s->to_set_syscall_catchpoint (", debug_target.to_shortname);
1237 target_debug_print_struct_target_ops_p (&debug_target);
1238 fputs_unfiltered (", ", gdb_stdlog);
1239 target_debug_print_int (arg1);
1240 fputs_unfiltered (", ", gdb_stdlog);
1241 target_debug_print_int (arg2);
1242 fputs_unfiltered (", ", gdb_stdlog);
1243 target_debug_print_int (arg3);
1244 fputs_unfiltered (", ", gdb_stdlog);
1245 target_debug_print_int (arg4);
1246 fputs_unfiltered (", ", gdb_stdlog);
1247 target_debug_print_int_p (arg5);
1248 fputs_unfiltered (") = ", gdb_stdlog);
1249 target_debug_print_int (result);
1250 fputs_unfiltered ("\n", gdb_stdlog);
1251 return result;
1252}
1253
0db88c1d
TT
1254static int
1255delegate_has_exited (struct target_ops *self, int arg1, int arg2, int *arg3)
1256{
1257 self = self->beneath;
1258 return self->to_has_exited (self, arg1, arg2, arg3);
1259}
1260
1261static int
1262tdefault_has_exited (struct target_ops *self, int arg1, int arg2, int *arg3)
1263{
1264 return 0;
1265}
1266
a7068b60
TT
1267static int
1268debug_has_exited (struct target_ops *self, int arg1, int arg2, int *arg3)
1269{
1270 int result;
1271 fprintf_unfiltered (gdb_stdlog, "-> %s->to_has_exited (...)\n", debug_target.to_shortname);
1272 result = debug_target.to_has_exited (&debug_target, arg1, arg2, arg3);
1273 fprintf_unfiltered (gdb_stdlog, "<- %s->to_has_exited (", debug_target.to_shortname);
1274 target_debug_print_struct_target_ops_p (&debug_target);
1275 fputs_unfiltered (", ", gdb_stdlog);
1276 target_debug_print_int (arg1);
1277 fputs_unfiltered (", ", gdb_stdlog);
1278 target_debug_print_int (arg2);
1279 fputs_unfiltered (", ", gdb_stdlog);
1280 target_debug_print_int_p (arg3);
1281 fputs_unfiltered (") = ", gdb_stdlog);
1282 target_debug_print_int (result);
1283 fputs_unfiltered ("\n", gdb_stdlog);
1284 return result;
1285}
1286
8d657035
TT
1287static void
1288delegate_mourn_inferior (struct target_ops *self)
1289{
1290 self = self->beneath;
1291 self->to_mourn_inferior (self);
1292}
1293
a7068b60
TT
1294static void
1295debug_mourn_inferior (struct target_ops *self)
1296{
1297 fprintf_unfiltered (gdb_stdlog, "-> %s->to_mourn_inferior (...)\n", debug_target.to_shortname);
1298 debug_target.to_mourn_inferior (&debug_target);
1299 fprintf_unfiltered (gdb_stdlog, "<- %s->to_mourn_inferior (", debug_target.to_shortname);
1300 target_debug_print_struct_target_ops_p (&debug_target);
1301 fputs_unfiltered (")\n", gdb_stdlog);
1302}
1303
e88ef65c
TT
1304static int
1305delegate_can_run (struct target_ops *self)
1306{
1307 self = self->beneath;
1308 return self->to_can_run (self);
1309}
1310
1311static int
1312tdefault_can_run (struct target_ops *self)
1313{
1314 return 0;
1315}
1316
a7068b60
TT
1317static int
1318debug_can_run (struct target_ops *self)
1319{
1320 int result;
1321 fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_run (...)\n", debug_target.to_shortname);
1322 result = debug_target.to_can_run (&debug_target);
1323 fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_run (", debug_target.to_shortname);
1324 target_debug_print_struct_target_ops_p (&debug_target);
1325 fputs_unfiltered (") = ", gdb_stdlog);
1326 target_debug_print_int (result);
1327 fputs_unfiltered ("\n", gdb_stdlog);
1328 return result;
1329}
1330
035cad7f 1331static void
a7068b60 1332delegate_pass_signals (struct target_ops *self, int arg1, unsigned char * arg2)
035cad7f
TT
1333{
1334 self = self->beneath;
1335 self->to_pass_signals (self, arg1, arg2);
1336}
1337
1338static void
a7068b60
TT
1339tdefault_pass_signals (struct target_ops *self, int arg1, unsigned char * arg2)
1340{
1341}
1342
1343static void
1344debug_pass_signals (struct target_ops *self, int arg1, unsigned char * arg2)
035cad7f 1345{
a7068b60
TT
1346 fprintf_unfiltered (gdb_stdlog, "-> %s->to_pass_signals (...)\n", debug_target.to_shortname);
1347 debug_target.to_pass_signals (&debug_target, arg1, arg2);
1348 fprintf_unfiltered (gdb_stdlog, "<- %s->to_pass_signals (", debug_target.to_shortname);
1349 target_debug_print_struct_target_ops_p (&debug_target);
1350 fputs_unfiltered (", ", gdb_stdlog);
1351 target_debug_print_int (arg1);
1352 fputs_unfiltered (", ", gdb_stdlog);
1353 target_debug_print_signals (arg2);
1354 fputs_unfiltered (")\n", gdb_stdlog);
035cad7f
TT
1355}
1356
7d4f8efa 1357static void
a7068b60 1358delegate_program_signals (struct target_ops *self, int arg1, unsigned char * arg2)
7d4f8efa
TT
1359{
1360 self = self->beneath;
1361 self->to_program_signals (self, arg1, arg2);
1362}
1363
1364static void
a7068b60
TT
1365tdefault_program_signals (struct target_ops *self, int arg1, unsigned char * arg2)
1366{
1367}
1368
1369static void
1370debug_program_signals (struct target_ops *self, int arg1, unsigned char * arg2)
7d4f8efa 1371{
a7068b60
TT
1372 fprintf_unfiltered (gdb_stdlog, "-> %s->to_program_signals (...)\n", debug_target.to_shortname);
1373 debug_target.to_program_signals (&debug_target, arg1, arg2);
1374 fprintf_unfiltered (gdb_stdlog, "<- %s->to_program_signals (", debug_target.to_shortname);
1375 target_debug_print_struct_target_ops_p (&debug_target);
1376 fputs_unfiltered (", ", gdb_stdlog);
1377 target_debug_print_int (arg1);
1378 fputs_unfiltered (", ", gdb_stdlog);
1379 target_debug_print_signals (arg2);
1380 fputs_unfiltered (")\n", gdb_stdlog);
7d4f8efa
TT
1381}
1382
cbffc065
TT
1383static int
1384delegate_thread_alive (struct target_ops *self, ptid_t arg1)
1385{
1386 self = self->beneath;
1387 return self->to_thread_alive (self, arg1);
1388}
1389
1390static int
1391tdefault_thread_alive (struct target_ops *self, ptid_t arg1)
1392{
1393 return 0;
1394}
1395
a7068b60
TT
1396static int
1397debug_thread_alive (struct target_ops *self, ptid_t arg1)
1398{
1399 int result;
1400 fprintf_unfiltered (gdb_stdlog, "-> %s->to_thread_alive (...)\n", debug_target.to_shortname);
1401 result = debug_target.to_thread_alive (&debug_target, arg1);
1402 fprintf_unfiltered (gdb_stdlog, "<- %s->to_thread_alive (", debug_target.to_shortname);
1403 target_debug_print_struct_target_ops_p (&debug_target);
1404 fputs_unfiltered (", ", gdb_stdlog);
1405 target_debug_print_ptid_t (arg1);
1406 fputs_unfiltered (") = ", gdb_stdlog);
1407 target_debug_print_int (result);
1408 fputs_unfiltered ("\n", gdb_stdlog);
1409 return result;
1410}
1411
09b0dc2b 1412static void
e8032dde 1413delegate_update_thread_list (struct target_ops *self)
09b0dc2b
TT
1414{
1415 self = self->beneath;
e8032dde 1416 self->to_update_thread_list (self);
09b0dc2b
TT
1417}
1418
1419static void
e8032dde 1420tdefault_update_thread_list (struct target_ops *self)
09b0dc2b
TT
1421{
1422}
1423
a7068b60 1424static void
e8032dde 1425debug_update_thread_list (struct target_ops *self)
a7068b60 1426{
e8032dde
PA
1427 fprintf_unfiltered (gdb_stdlog, "-> %s->to_update_thread_list (...)\n", debug_target.to_shortname);
1428 debug_target.to_update_thread_list (&debug_target);
1429 fprintf_unfiltered (gdb_stdlog, "<- %s->to_update_thread_list (", debug_target.to_shortname);
a7068b60
TT
1430 target_debug_print_struct_target_ops_p (&debug_target);
1431 fputs_unfiltered (")\n", gdb_stdlog);
1432}
1433
770234d3
TT
1434static char *
1435delegate_pid_to_str (struct target_ops *self, ptid_t arg1)
1436{
1437 self = self->beneath;
1438 return self->to_pid_to_str (self, arg1);
1439}
1440
a7068b60
TT
1441static char *
1442debug_pid_to_str (struct target_ops *self, ptid_t arg1)
1443{
1444 char * result;
1445 fprintf_unfiltered (gdb_stdlog, "-> %s->to_pid_to_str (...)\n", debug_target.to_shortname);
1446 result = debug_target.to_pid_to_str (&debug_target, arg1);
1447 fprintf_unfiltered (gdb_stdlog, "<- %s->to_pid_to_str (", debug_target.to_shortname);
1448 target_debug_print_struct_target_ops_p (&debug_target);
1449 fputs_unfiltered (", ", gdb_stdlog);
1450 target_debug_print_ptid_t (arg1);
1451 fputs_unfiltered (") = ", gdb_stdlog);
1452 target_debug_print_char_p (result);
1453 fputs_unfiltered ("\n", gdb_stdlog);
1454 return result;
1455}
1456
4a7e6dda
TT
1457static char *
1458delegate_extra_thread_info (struct target_ops *self, struct thread_info *arg1)
1459{
1460 self = self->beneath;
1461 return self->to_extra_thread_info (self, arg1);
1462}
1463
1464static char *
1465tdefault_extra_thread_info (struct target_ops *self, struct thread_info *arg1)
1466{
9b144037 1467 return NULL;
4a7e6dda
TT
1468}
1469
a7068b60
TT
1470static char *
1471debug_extra_thread_info (struct target_ops *self, struct thread_info *arg1)
1472{
1473 char * result;
1474 fprintf_unfiltered (gdb_stdlog, "-> %s->to_extra_thread_info (...)\n", debug_target.to_shortname);
1475 result = debug_target.to_extra_thread_info (&debug_target, arg1);
1476 fprintf_unfiltered (gdb_stdlog, "<- %s->to_extra_thread_info (", debug_target.to_shortname);
1477 target_debug_print_struct_target_ops_p (&debug_target);
1478 fputs_unfiltered (", ", gdb_stdlog);
1479 target_debug_print_struct_thread_info_p (arg1);
1480 fputs_unfiltered (") = ", gdb_stdlog);
1481 target_debug_print_char_p (result);
1482 fputs_unfiltered ("\n", gdb_stdlog);
1483 return result;
1484}
1485
825828fc
TT
1486static char *
1487delegate_thread_name (struct target_ops *self, struct thread_info *arg1)
1488{
1489 self = self->beneath;
1490 return self->to_thread_name (self, arg1);
1491}
1492
1493static char *
1494tdefault_thread_name (struct target_ops *self, struct thread_info *arg1)
1495{
9b144037 1496 return NULL;
825828fc
TT
1497}
1498
a7068b60
TT
1499static char *
1500debug_thread_name (struct target_ops *self, struct thread_info *arg1)
1501{
1502 char * result;
1503 fprintf_unfiltered (gdb_stdlog, "-> %s->to_thread_name (...)\n", debug_target.to_shortname);
1504 result = debug_target.to_thread_name (&debug_target, arg1);
1505 fprintf_unfiltered (gdb_stdlog, "<- %s->to_thread_name (", debug_target.to_shortname);
1506 target_debug_print_struct_target_ops_p (&debug_target);
1507 fputs_unfiltered (", ", gdb_stdlog);
1508 target_debug_print_struct_thread_info_p (arg1);
1509 fputs_unfiltered (") = ", gdb_stdlog);
1510 target_debug_print_char_p (result);
1511 fputs_unfiltered ("\n", gdb_stdlog);
1512 return result;
1513}
1514
46ee7e8d
TT
1515static void
1516delegate_stop (struct target_ops *self, ptid_t arg1)
1517{
1518 self = self->beneath;
1519 self->to_stop (self, arg1);
1520}
1521
1522static void
1523tdefault_stop (struct target_ops *self, ptid_t arg1)
1524{
1525}
1526
a7068b60
TT
1527static void
1528debug_stop (struct target_ops *self, ptid_t arg1)
1529{
1530 fprintf_unfiltered (gdb_stdlog, "-> %s->to_stop (...)\n", debug_target.to_shortname);
1531 debug_target.to_stop (&debug_target, arg1);
1532 fprintf_unfiltered (gdb_stdlog, "<- %s->to_stop (", debug_target.to_shortname);
1533 target_debug_print_struct_target_ops_p (&debug_target);
1534 fputs_unfiltered (", ", gdb_stdlog);
1535 target_debug_print_ptid_t (arg1);
1536 fputs_unfiltered (")\n", gdb_stdlog);
1537}
1538
bfedc46a
PA
1539static void
1540delegate_interrupt (struct target_ops *self, ptid_t arg1)
1541{
1542 self = self->beneath;
1543 self->to_interrupt (self, arg1);
1544}
1545
1546static void
1547tdefault_interrupt (struct target_ops *self, ptid_t arg1)
1548{
1549}
1550
1551static void
1552debug_interrupt (struct target_ops *self, ptid_t arg1)
1553{
1554 fprintf_unfiltered (gdb_stdlog, "-> %s->to_interrupt (...)\n", debug_target.to_shortname);
1555 debug_target.to_interrupt (&debug_target, arg1);
1556 fprintf_unfiltered (gdb_stdlog, "<- %s->to_interrupt (", debug_target.to_shortname);
1557 target_debug_print_struct_target_ops_p (&debug_target);
1558 fputs_unfiltered (", ", gdb_stdlog);
1559 target_debug_print_ptid_t (arg1);
1560 fputs_unfiltered (")\n", gdb_stdlog);
1561}
1562
abc56d60
PA
1563static void
1564delegate_check_pending_interrupt (struct target_ops *self)
1565{
1566 self = self->beneath;
1567 self->to_check_pending_interrupt (self);
1568}
1569
1570static void
1571tdefault_check_pending_interrupt (struct target_ops *self)
1572{
1573}
1574
1575static void
1576debug_check_pending_interrupt (struct target_ops *self)
1577{
1578 fprintf_unfiltered (gdb_stdlog, "-> %s->to_check_pending_interrupt (...)\n", debug_target.to_shortname);
1579 debug_target.to_check_pending_interrupt (&debug_target);
1580 fprintf_unfiltered (gdb_stdlog, "<- %s->to_check_pending_interrupt (", debug_target.to_shortname);
1581 target_debug_print_struct_target_ops_p (&debug_target);
1582 fputs_unfiltered (")\n", gdb_stdlog);
1583}
1584
a53f3625 1585static void
a30bf1f1 1586delegate_rcmd (struct target_ops *self, const char *arg1, struct ui_file *arg2)
a53f3625
TT
1587{
1588 self = self->beneath;
1589 self->to_rcmd (self, arg1, arg2);
1590}
1591
a7068b60
TT
1592static void
1593debug_rcmd (struct target_ops *self, const char *arg1, struct ui_file *arg2)
1594{
1595 fprintf_unfiltered (gdb_stdlog, "-> %s->to_rcmd (...)\n", debug_target.to_shortname);
1596 debug_target.to_rcmd (&debug_target, arg1, arg2);
1597 fprintf_unfiltered (gdb_stdlog, "<- %s->to_rcmd (", debug_target.to_shortname);
1598 target_debug_print_struct_target_ops_p (&debug_target);
1599 fputs_unfiltered (", ", gdb_stdlog);
1600 target_debug_print_const_char_p (arg1);
1601 fputs_unfiltered (", ", gdb_stdlog);
1602 target_debug_print_struct_ui_file_p (arg2);
1603 fputs_unfiltered (")\n", gdb_stdlog);
1604}
1605
830ca330
TT
1606static char *
1607delegate_pid_to_exec_file (struct target_ops *self, int arg1)
1608{
1609 self = self->beneath;
1610 return self->to_pid_to_exec_file (self, arg1);
1611}
1612
1613static char *
1614tdefault_pid_to_exec_file (struct target_ops *self, int arg1)
1615{
9b144037 1616 return NULL;
830ca330
TT
1617}
1618
a7068b60
TT
1619static char *
1620debug_pid_to_exec_file (struct target_ops *self, int arg1)
1621{
1622 char * result;
1623 fprintf_unfiltered (gdb_stdlog, "-> %s->to_pid_to_exec_file (...)\n", debug_target.to_shortname);
1624 result = debug_target.to_pid_to_exec_file (&debug_target, arg1);
1625 fprintf_unfiltered (gdb_stdlog, "<- %s->to_pid_to_exec_file (", debug_target.to_shortname);
1626 target_debug_print_struct_target_ops_p (&debug_target);
1627 fputs_unfiltered (", ", gdb_stdlog);
1628 target_debug_print_int (arg1);
1629 fputs_unfiltered (") = ", gdb_stdlog);
1630 target_debug_print_char_p (result);
1631 fputs_unfiltered ("\n", gdb_stdlog);
1632 return result;
1633}
1634
d9cb0195
TT
1635static void
1636delegate_log_command (struct target_ops *self, const char *arg1)
1637{
1638 self = self->beneath;
1639 self->to_log_command (self, arg1);
1640}
1641
1642static void
1643tdefault_log_command (struct target_ops *self, const char *arg1)
1644{
1645}
1646
a7068b60
TT
1647static void
1648debug_log_command (struct target_ops *self, const char *arg1)
1649{
1650 fprintf_unfiltered (gdb_stdlog, "-> %s->to_log_command (...)\n", debug_target.to_shortname);
1651 debug_target.to_log_command (&debug_target, arg1);
1652 fprintf_unfiltered (gdb_stdlog, "<- %s->to_log_command (", debug_target.to_shortname);
1653 target_debug_print_struct_target_ops_p (&debug_target);
1654 fputs_unfiltered (", ", gdb_stdlog);
1655 target_debug_print_const_char_p (arg1);
1656 fputs_unfiltered (")\n", gdb_stdlog);
1657}
1658
7e35c012
TT
1659static struct target_section_table *
1660delegate_get_section_table (struct target_ops *self)
1661{
1662 self = self->beneath;
1663 return self->to_get_section_table (self);
1664}
1665
1666static struct target_section_table *
1667tdefault_get_section_table (struct target_ops *self)
1668{
9b144037 1669 return NULL;
7e35c012
TT
1670}
1671
a7068b60
TT
1672static struct target_section_table *
1673debug_get_section_table (struct target_ops *self)
1674{
1675 struct target_section_table * result;
1676 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_section_table (...)\n", debug_target.to_shortname);
1677 result = debug_target.to_get_section_table (&debug_target);
1678 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_section_table (", debug_target.to_shortname);
1679 target_debug_print_struct_target_ops_p (&debug_target);
1680 fputs_unfiltered (") = ", gdb_stdlog);
1681 target_debug_print_struct_target_section_table_p (result);
1682 fputs_unfiltered ("\n", gdb_stdlog);
1683 return result;
1684}
1685
6b84065d
TT
1686static int
1687delegate_can_async_p (struct target_ops *self)
1688{
1689 self = self->beneath;
1690 return self->to_can_async_p (self);
1691}
1692
b3ccfe11
TT
1693static int
1694tdefault_can_async_p (struct target_ops *self)
1695{
1696 return 0;
1697}
1698
a7068b60
TT
1699static int
1700debug_can_async_p (struct target_ops *self)
1701{
1702 int result;
1703 fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_async_p (...)\n", debug_target.to_shortname);
1704 result = debug_target.to_can_async_p (&debug_target);
1705 fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_async_p (", debug_target.to_shortname);
1706 target_debug_print_struct_target_ops_p (&debug_target);
1707 fputs_unfiltered (") = ", gdb_stdlog);
1708 target_debug_print_int (result);
1709 fputs_unfiltered ("\n", gdb_stdlog);
1710 return result;
1711}
1712
6b84065d
TT
1713static int
1714delegate_is_async_p (struct target_ops *self)
1715{
1716 self = self->beneath;
1717 return self->to_is_async_p (self);
1718}
1719
b3ccfe11
TT
1720static int
1721tdefault_is_async_p (struct target_ops *self)
1722{
1723 return 0;
1724}
1725
a7068b60
TT
1726static int
1727debug_is_async_p (struct target_ops *self)
1728{
1729 int result;
1730 fprintf_unfiltered (gdb_stdlog, "-> %s->to_is_async_p (...)\n", debug_target.to_shortname);
1731 result = debug_target.to_is_async_p (&debug_target);
1732 fprintf_unfiltered (gdb_stdlog, "<- %s->to_is_async_p (", debug_target.to_shortname);
1733 target_debug_print_struct_target_ops_p (&debug_target);
1734 fputs_unfiltered (") = ", gdb_stdlog);
1735 target_debug_print_int (result);
1736 fputs_unfiltered ("\n", gdb_stdlog);
1737 return result;
1738}
1739
6b84065d 1740static void
6a3753b3 1741delegate_async (struct target_ops *self, int arg1)
6b84065d
TT
1742{
1743 self = self->beneath;
6a3753b3 1744 self->to_async (self, arg1);
6b84065d
TT
1745}
1746
1747static void
6a3753b3 1748tdefault_async (struct target_ops *self, int arg1)
6b84065d
TT
1749{
1750 tcomplain ();
1751}
1752
a7068b60 1753static void
6a3753b3 1754debug_async (struct target_ops *self, int arg1)
a7068b60
TT
1755{
1756 fprintf_unfiltered (gdb_stdlog, "-> %s->to_async (...)\n", debug_target.to_shortname);
6a3753b3 1757 debug_target.to_async (&debug_target, arg1);
a7068b60
TT
1758 fprintf_unfiltered (gdb_stdlog, "<- %s->to_async (", debug_target.to_shortname);
1759 target_debug_print_struct_target_ops_p (&debug_target);
1760 fputs_unfiltered (", ", gdb_stdlog);
6a3753b3 1761 target_debug_print_int (arg1);
a7068b60
TT
1762 fputs_unfiltered (")\n", gdb_stdlog);
1763}
1764
b3ccfe11
TT
1765static int
1766delegate_supports_non_stop (struct target_ops *self)
1767{
1768 self = self->beneath;
1769 return self->to_supports_non_stop (self);
1770}
1771
1772static int
1773tdefault_supports_non_stop (struct target_ops *self)
1774{
1775 return 0;
1776}
1777
a7068b60
TT
1778static int
1779debug_supports_non_stop (struct target_ops *self)
1780{
1781 int result;
1782 fprintf_unfiltered (gdb_stdlog, "-> %s->to_supports_non_stop (...)\n", debug_target.to_shortname);
1783 result = debug_target.to_supports_non_stop (&debug_target);
1784 fprintf_unfiltered (gdb_stdlog, "<- %s->to_supports_non_stop (", debug_target.to_shortname);
1785 target_debug_print_struct_target_ops_p (&debug_target);
1786 fputs_unfiltered (") = ", gdb_stdlog);
1787 target_debug_print_int (result);
1788 fputs_unfiltered ("\n", gdb_stdlog);
1789 return result;
1790}
1791
fbea99ea
PA
1792static int
1793delegate_always_non_stop_p (struct target_ops *self)
1794{
1795 self = self->beneath;
1796 return self->to_always_non_stop_p (self);
1797}
1798
1799static int
1800tdefault_always_non_stop_p (struct target_ops *self)
1801{
1802 return 0;
1803}
1804
1805static int
1806debug_always_non_stop_p (struct target_ops *self)
1807{
1808 int result;
1809 fprintf_unfiltered (gdb_stdlog, "-> %s->to_always_non_stop_p (...)\n", debug_target.to_shortname);
1810 result = debug_target.to_always_non_stop_p (&debug_target);
1811 fprintf_unfiltered (gdb_stdlog, "<- %s->to_always_non_stop_p (", debug_target.to_shortname);
1812 target_debug_print_struct_target_ops_p (&debug_target);
1813 fputs_unfiltered (") = ", gdb_stdlog);
1814 target_debug_print_int (result);
1815 fputs_unfiltered ("\n", gdb_stdlog);
1816 return result;
1817}
1818
0b5a2719
TT
1819static int
1820delegate_find_memory_regions (struct target_ops *self, find_memory_region_ftype arg1, void *arg2)
1821{
1822 self = self->beneath;
1823 return self->to_find_memory_regions (self, arg1, arg2);
1824}
1825
a7068b60
TT
1826static int
1827debug_find_memory_regions (struct target_ops *self, find_memory_region_ftype arg1, void *arg2)
1828{
1829 int result;
1830 fprintf_unfiltered (gdb_stdlog, "-> %s->to_find_memory_regions (...)\n", debug_target.to_shortname);
1831 result = debug_target.to_find_memory_regions (&debug_target, arg1, arg2);
1832 fprintf_unfiltered (gdb_stdlog, "<- %s->to_find_memory_regions (", debug_target.to_shortname);
1833 target_debug_print_struct_target_ops_p (&debug_target);
1834 fputs_unfiltered (", ", gdb_stdlog);
1835 target_debug_print_find_memory_region_ftype (arg1);
1836 fputs_unfiltered (", ", gdb_stdlog);
1837 target_debug_print_void_p (arg2);
1838 fputs_unfiltered (") = ", gdb_stdlog);
1839 target_debug_print_int (result);
1840 fputs_unfiltered ("\n", gdb_stdlog);
1841 return result;
1842}
1843
a8bdc56b 1844static char *
16f796b1
TT
1845delegate_make_corefile_notes (struct target_ops *self, bfd *arg1, int *arg2)
1846{
1847 self = self->beneath;
1848 return self->to_make_corefile_notes (self, arg1, arg2);
1849}
1850
a7068b60
TT
1851static char *
1852debug_make_corefile_notes (struct target_ops *self, bfd *arg1, int *arg2)
1853{
1854 char * result;
1855 fprintf_unfiltered (gdb_stdlog, "-> %s->to_make_corefile_notes (...)\n", debug_target.to_shortname);
1856 result = debug_target.to_make_corefile_notes (&debug_target, arg1, arg2);
1857 fprintf_unfiltered (gdb_stdlog, "<- %s->to_make_corefile_notes (", debug_target.to_shortname);
1858 target_debug_print_struct_target_ops_p (&debug_target);
1859 fputs_unfiltered (", ", gdb_stdlog);
1860 target_debug_print_bfd_p (arg1);
1861 fputs_unfiltered (", ", gdb_stdlog);
1862 target_debug_print_int_p (arg2);
1863 fputs_unfiltered (") = ", gdb_stdlog);
1864 target_debug_print_char_p (result);
1865 fputs_unfiltered ("\n", gdb_stdlog);
1866 return result;
1867}
1868
a8bdc56b 1869static gdb_byte *
c2bcbb1d 1870delegate_get_bookmark (struct target_ops *self, const char *arg1, int arg2)
3dbafbbb
TT
1871{
1872 self = self->beneath;
1873 return self->to_get_bookmark (self, arg1, arg2);
1874}
1875
a8bdc56b 1876static gdb_byte *
c2bcbb1d 1877tdefault_get_bookmark (struct target_ops *self, const char *arg1, int arg2)
3dbafbbb
TT
1878{
1879 tcomplain ();
1880}
1881
a7068b60
TT
1882static gdb_byte *
1883debug_get_bookmark (struct target_ops *self, const char *arg1, int arg2)
1884{
1885 gdb_byte * result;
1886 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_bookmark (...)\n", debug_target.to_shortname);
1887 result = debug_target.to_get_bookmark (&debug_target, arg1, arg2);
1888 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_bookmark (", debug_target.to_shortname);
1889 target_debug_print_struct_target_ops_p (&debug_target);
1890 fputs_unfiltered (", ", gdb_stdlog);
1891 target_debug_print_const_char_p (arg1);
1892 fputs_unfiltered (", ", gdb_stdlog);
1893 target_debug_print_int (arg2);
1894 fputs_unfiltered (") = ", gdb_stdlog);
1895 target_debug_print_gdb_byte_p (result);
1896 fputs_unfiltered ("\n", gdb_stdlog);
1897 return result;
1898}
1899
9bb9d61d 1900static void
c2bcbb1d 1901delegate_goto_bookmark (struct target_ops *self, const gdb_byte *arg1, int arg2)
9bb9d61d
TT
1902{
1903 self = self->beneath;
1904 self->to_goto_bookmark (self, arg1, arg2);
1905}
1906
1907static void
c2bcbb1d 1908tdefault_goto_bookmark (struct target_ops *self, const gdb_byte *arg1, int arg2)
9bb9d61d
TT
1909{
1910 tcomplain ();
1911}
1912
a7068b60
TT
1913static void
1914debug_goto_bookmark (struct target_ops *self, const gdb_byte *arg1, int arg2)
1915{
1916 fprintf_unfiltered (gdb_stdlog, "-> %s->to_goto_bookmark (...)\n", debug_target.to_shortname);
1917 debug_target.to_goto_bookmark (&debug_target, arg1, arg2);
1918 fprintf_unfiltered (gdb_stdlog, "<- %s->to_goto_bookmark (", debug_target.to_shortname);
1919 target_debug_print_struct_target_ops_p (&debug_target);
1920 fputs_unfiltered (", ", gdb_stdlog);
1921 target_debug_print_const_gdb_byte_p (arg1);
1922 fputs_unfiltered (", ", gdb_stdlog);
1923 target_debug_print_int (arg2);
1924 fputs_unfiltered (")\n", gdb_stdlog);
1925}
1926
f0f9ff95
TT
1927static CORE_ADDR
1928delegate_get_thread_local_address (struct target_ops *self, ptid_t arg1, CORE_ADDR arg2, CORE_ADDR arg3)
1929{
1930 self = self->beneath;
1931 return self->to_get_thread_local_address (self, arg1, arg2, arg3);
1932}
1933
1934static CORE_ADDR
1935tdefault_get_thread_local_address (struct target_ops *self, ptid_t arg1, CORE_ADDR arg2, CORE_ADDR arg3)
1936{
1937 generic_tls_error ();
1938}
1939
a7068b60
TT
1940static CORE_ADDR
1941debug_get_thread_local_address (struct target_ops *self, ptid_t arg1, CORE_ADDR arg2, CORE_ADDR arg3)
1942{
1943 CORE_ADDR result;
1944 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_thread_local_address (...)\n", debug_target.to_shortname);
1945 result = debug_target.to_get_thread_local_address (&debug_target, arg1, arg2, arg3);
1946 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_thread_local_address (", debug_target.to_shortname);
1947 target_debug_print_struct_target_ops_p (&debug_target);
1948 fputs_unfiltered (", ", gdb_stdlog);
1949 target_debug_print_ptid_t (arg1);
1950 fputs_unfiltered (", ", gdb_stdlog);
1951 target_debug_print_CORE_ADDR (arg2);
1952 fputs_unfiltered (", ", gdb_stdlog);
1953 target_debug_print_CORE_ADDR (arg3);
1954 fputs_unfiltered (") = ", gdb_stdlog);
1955 target_debug_print_CORE_ADDR (result);
1956 fputs_unfiltered ("\n", gdb_stdlog);
1957 return result;
1958}
1959
a8bdc56b
TT
1960static enum target_xfer_status
1961delegate_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)
6b84065d
TT
1962{
1963 self = self->beneath;
1964 return self->to_xfer_partial (self, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1965}
1966
a8bdc56b
TT
1967static enum target_xfer_status
1968tdefault_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)
6b84065d
TT
1969{
1970 return TARGET_XFER_E_IO;
1971}
1972
a7068b60
TT
1973static enum target_xfer_status
1974debug_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)
1975{
1976 enum target_xfer_status result;
1977 fprintf_unfiltered (gdb_stdlog, "-> %s->to_xfer_partial (...)\n", debug_target.to_shortname);
1978 result = debug_target.to_xfer_partial (&debug_target, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
1979 fprintf_unfiltered (gdb_stdlog, "<- %s->to_xfer_partial (", debug_target.to_shortname);
1980 target_debug_print_struct_target_ops_p (&debug_target);
1981 fputs_unfiltered (", ", gdb_stdlog);
1982 target_debug_print_enum_target_object (arg1);
1983 fputs_unfiltered (", ", gdb_stdlog);
1984 target_debug_print_const_char_p (arg2);
1985 fputs_unfiltered (", ", gdb_stdlog);
1986 target_debug_print_gdb_byte_p (arg3);
1987 fputs_unfiltered (", ", gdb_stdlog);
1988 target_debug_print_const_gdb_byte_p (arg4);
1989 fputs_unfiltered (", ", gdb_stdlog);
1990 target_debug_print_ULONGEST (arg5);
1991 fputs_unfiltered (", ", gdb_stdlog);
1992 target_debug_print_ULONGEST (arg6);
1993 fputs_unfiltered (", ", gdb_stdlog);
1994 target_debug_print_ULONGEST_p (arg7);
1995 fputs_unfiltered (") = ", gdb_stdlog);
1996 target_debug_print_enum_target_xfer_status (result);
1997 fputs_unfiltered ("\n", gdb_stdlog);
1998 return result;
1999}
2000
6b2c5a57
TT
2001static VEC(mem_region_s) *
2002delegate_memory_map (struct target_ops *self)
2003{
2004 self = self->beneath;
2005 return self->to_memory_map (self);
2006}
2007
2008static VEC(mem_region_s) *
2009tdefault_memory_map (struct target_ops *self)
2010{
9b144037 2011 return NULL;
6b2c5a57
TT
2012}
2013
a7068b60
TT
2014static VEC(mem_region_s) *
2015debug_memory_map (struct target_ops *self)
2016{
2017 VEC(mem_region_s) * result;
2018 fprintf_unfiltered (gdb_stdlog, "-> %s->to_memory_map (...)\n", debug_target.to_shortname);
2019 result = debug_target.to_memory_map (&debug_target);
2020 fprintf_unfiltered (gdb_stdlog, "<- %s->to_memory_map (", debug_target.to_shortname);
2021 target_debug_print_struct_target_ops_p (&debug_target);
2022 fputs_unfiltered (") = ", gdb_stdlog);
2023 target_debug_print_VEC_mem_region_s__p (result);
2024 fputs_unfiltered ("\n", gdb_stdlog);
2025 return result;
2026}
2027
e8a6c6ac
TT
2028static void
2029delegate_flash_erase (struct target_ops *self, ULONGEST arg1, LONGEST arg2)
2030{
2031 self = self->beneath;
2032 self->to_flash_erase (self, arg1, arg2);
2033}
2034
2035static void
2036tdefault_flash_erase (struct target_ops *self, ULONGEST arg1, LONGEST arg2)
2037{
2038 tcomplain ();
2039}
2040
a7068b60
TT
2041static void
2042debug_flash_erase (struct target_ops *self, ULONGEST arg1, LONGEST arg2)
2043{
2044 fprintf_unfiltered (gdb_stdlog, "-> %s->to_flash_erase (...)\n", debug_target.to_shortname);
2045 debug_target.to_flash_erase (&debug_target, arg1, arg2);
2046 fprintf_unfiltered (gdb_stdlog, "<- %s->to_flash_erase (", debug_target.to_shortname);
2047 target_debug_print_struct_target_ops_p (&debug_target);
2048 fputs_unfiltered (", ", gdb_stdlog);
2049 target_debug_print_ULONGEST (arg1);
2050 fputs_unfiltered (", ", gdb_stdlog);
2051 target_debug_print_LONGEST (arg2);
2052 fputs_unfiltered (")\n", gdb_stdlog);
2053}
2054
f6fb2925
TT
2055static void
2056delegate_flash_done (struct target_ops *self)
2057{
2058 self = self->beneath;
2059 self->to_flash_done (self);
2060}
2061
2062static void
2063tdefault_flash_done (struct target_ops *self)
2064{
2065 tcomplain ();
2066}
2067
a7068b60
TT
2068static void
2069debug_flash_done (struct target_ops *self)
2070{
2071 fprintf_unfiltered (gdb_stdlog, "-> %s->to_flash_done (...)\n", debug_target.to_shortname);
2072 debug_target.to_flash_done (&debug_target);
2073 fprintf_unfiltered (gdb_stdlog, "<- %s->to_flash_done (", debug_target.to_shortname);
2074 target_debug_print_struct_target_ops_p (&debug_target);
2075 fputs_unfiltered (")\n", gdb_stdlog);
2076}
2077
2117c711
TT
2078static const struct target_desc *
2079delegate_read_description (struct target_ops *self)
2080{
2081 self = self->beneath;
2082 return self->to_read_description (self);
2083}
2084
2085static const struct target_desc *
2086tdefault_read_description (struct target_ops *self)
2087{
9b144037 2088 return NULL;
2117c711
TT
2089}
2090
a7068b60
TT
2091static const struct target_desc *
2092debug_read_description (struct target_ops *self)
2093{
2094 const struct target_desc * result;
2095 fprintf_unfiltered (gdb_stdlog, "-> %s->to_read_description (...)\n", debug_target.to_shortname);
2096 result = debug_target.to_read_description (&debug_target);
2097 fprintf_unfiltered (gdb_stdlog, "<- %s->to_read_description (", debug_target.to_shortname);
2098 target_debug_print_struct_target_ops_p (&debug_target);
2099 fputs_unfiltered (") = ", gdb_stdlog);
2100 target_debug_print_const_struct_target_desc_p (result);
2101 fputs_unfiltered ("\n", gdb_stdlog);
2102 return result;
2103}
2104
4229b31d
TT
2105static ptid_t
2106delegate_get_ada_task_ptid (struct target_ops *self, long arg1, long arg2)
2107{
2108 self = self->beneath;
2109 return self->to_get_ada_task_ptid (self, arg1, arg2);
2110}
2111
a7068b60
TT
2112static ptid_t
2113debug_get_ada_task_ptid (struct target_ops *self, long arg1, long arg2)
2114{
2115 ptid_t result;
2116 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_ada_task_ptid (...)\n", debug_target.to_shortname);
2117 result = debug_target.to_get_ada_task_ptid (&debug_target, arg1, arg2);
2118 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_ada_task_ptid (", debug_target.to_shortname);
2119 target_debug_print_struct_target_ops_p (&debug_target);
2120 fputs_unfiltered (", ", gdb_stdlog);
2121 target_debug_print_long (arg1);
2122 fputs_unfiltered (", ", gdb_stdlog);
2123 target_debug_print_long (arg2);
2124 fputs_unfiltered (") = ", gdb_stdlog);
2125 target_debug_print_ptid_t (result);
2126 fputs_unfiltered ("\n", gdb_stdlog);
2127 return result;
2128}
2129
8de71aab
TT
2130static int
2131delegate_auxv_parse (struct target_ops *self, gdb_byte **arg1, gdb_byte *arg2, CORE_ADDR *arg3, CORE_ADDR *arg4)
2132{
2133 self = self->beneath;
2134 return self->to_auxv_parse (self, arg1, arg2, arg3, arg4);
2135}
2136
a7068b60
TT
2137static int
2138debug_auxv_parse (struct target_ops *self, gdb_byte **arg1, gdb_byte *arg2, CORE_ADDR *arg3, CORE_ADDR *arg4)
2139{
2140 int result;
2141 fprintf_unfiltered (gdb_stdlog, "-> %s->to_auxv_parse (...)\n", debug_target.to_shortname);
2142 result = debug_target.to_auxv_parse (&debug_target, arg1, arg2, arg3, arg4);
2143 fprintf_unfiltered (gdb_stdlog, "<- %s->to_auxv_parse (", debug_target.to_shortname);
2144 target_debug_print_struct_target_ops_p (&debug_target);
2145 fputs_unfiltered (", ", gdb_stdlog);
2146 target_debug_print_gdb_byte_pp (arg1);
2147 fputs_unfiltered (", ", gdb_stdlog);
2148 target_debug_print_gdb_byte_p (arg2);
2149 fputs_unfiltered (", ", gdb_stdlog);
2150 target_debug_print_CORE_ADDR_p (arg3);
2151 fputs_unfiltered (", ", gdb_stdlog);
2152 target_debug_print_CORE_ADDR_p (arg4);
2153 fputs_unfiltered (") = ", gdb_stdlog);
2154 target_debug_print_int (result);
2155 fputs_unfiltered ("\n", gdb_stdlog);
2156 return result;
2157}
2158
58a5184e
TT
2159static int
2160delegate_search_memory (struct target_ops *self, CORE_ADDR arg1, ULONGEST arg2, const gdb_byte *arg3, ULONGEST arg4, CORE_ADDR *arg5)
2161{
2162 self = self->beneath;
2163 return self->to_search_memory (self, arg1, arg2, arg3, arg4, arg5);
2164}
2165
a7068b60
TT
2166static int
2167debug_search_memory (struct target_ops *self, CORE_ADDR arg1, ULONGEST arg2, const gdb_byte *arg3, ULONGEST arg4, CORE_ADDR *arg5)
2168{
2169 int result;
2170 fprintf_unfiltered (gdb_stdlog, "-> %s->to_search_memory (...)\n", debug_target.to_shortname);
2171 result = debug_target.to_search_memory (&debug_target, arg1, arg2, arg3, arg4, arg5);
2172 fprintf_unfiltered (gdb_stdlog, "<- %s->to_search_memory (", debug_target.to_shortname);
2173 target_debug_print_struct_target_ops_p (&debug_target);
2174 fputs_unfiltered (", ", gdb_stdlog);
2175 target_debug_print_CORE_ADDR (arg1);
2176 fputs_unfiltered (", ", gdb_stdlog);
2177 target_debug_print_ULONGEST (arg2);
2178 fputs_unfiltered (", ", gdb_stdlog);
2179 target_debug_print_const_gdb_byte_p (arg3);
2180 fputs_unfiltered (", ", gdb_stdlog);
2181 target_debug_print_ULONGEST (arg4);
2182 fputs_unfiltered (", ", gdb_stdlog);
2183 target_debug_print_CORE_ADDR_p (arg5);
2184 fputs_unfiltered (") = ", gdb_stdlog);
2185 target_debug_print_int (result);
2186 fputs_unfiltered ("\n", gdb_stdlog);
2187 return result;
2188}
2189
53e1cfc7
TT
2190static int
2191delegate_can_execute_reverse (struct target_ops *self)
2192{
2193 self = self->beneath;
2194 return self->to_can_execute_reverse (self);
2195}
2196
2197static int
2198tdefault_can_execute_reverse (struct target_ops *self)
2199{
2200 return 0;
2201}
2202
a7068b60
TT
2203static int
2204debug_can_execute_reverse (struct target_ops *self)
2205{
2206 int result;
2207 fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_execute_reverse (...)\n", debug_target.to_shortname);
2208 result = debug_target.to_can_execute_reverse (&debug_target);
2209 fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_execute_reverse (", debug_target.to_shortname);
2210 target_debug_print_struct_target_ops_p (&debug_target);
2211 fputs_unfiltered (") = ", gdb_stdlog);
2212 target_debug_print_int (result);
2213 fputs_unfiltered ("\n", gdb_stdlog);
2214 return result;
2215}
2216
a8bdc56b 2217static enum exec_direction_kind
fe31bf5b
TT
2218delegate_execution_direction (struct target_ops *self)
2219{
2220 self = self->beneath;
2221 return self->to_execution_direction (self);
2222}
2223
a7068b60
TT
2224static enum exec_direction_kind
2225debug_execution_direction (struct target_ops *self)
2226{
2227 enum exec_direction_kind result;
2228 fprintf_unfiltered (gdb_stdlog, "-> %s->to_execution_direction (...)\n", debug_target.to_shortname);
2229 result = debug_target.to_execution_direction (&debug_target);
2230 fprintf_unfiltered (gdb_stdlog, "<- %s->to_execution_direction (", debug_target.to_shortname);
2231 target_debug_print_struct_target_ops_p (&debug_target);
2232 fputs_unfiltered (") = ", gdb_stdlog);
2233 target_debug_print_enum_exec_direction_kind (result);
2234 fputs_unfiltered ("\n", gdb_stdlog);
2235 return result;
2236}
2237
a7304748
TT
2238static int
2239delegate_supports_multi_process (struct target_ops *self)
2240{
2241 self = self->beneath;
2242 return self->to_supports_multi_process (self);
2243}
2244
2245static int
2246tdefault_supports_multi_process (struct target_ops *self)
2247{
2248 return 0;
2249}
2250
a7068b60
TT
2251static int
2252debug_supports_multi_process (struct target_ops *self)
2253{
2254 int result;
2255 fprintf_unfiltered (gdb_stdlog, "-> %s->to_supports_multi_process (...)\n", debug_target.to_shortname);
2256 result = debug_target.to_supports_multi_process (&debug_target);
2257 fprintf_unfiltered (gdb_stdlog, "<- %s->to_supports_multi_process (", debug_target.to_shortname);
2258 target_debug_print_struct_target_ops_p (&debug_target);
2259 fputs_unfiltered (") = ", gdb_stdlog);
2260 target_debug_print_int (result);
2261 fputs_unfiltered ("\n", gdb_stdlog);
2262 return result;
2263}
2264
aab1b22d
TT
2265static int
2266delegate_supports_enable_disable_tracepoint (struct target_ops *self)
2267{
2268 self = self->beneath;
2269 return self->to_supports_enable_disable_tracepoint (self);
2270}
2271
2272static int
2273tdefault_supports_enable_disable_tracepoint (struct target_ops *self)
2274{
2275 return 0;
2276}
2277
a7068b60
TT
2278static int
2279debug_supports_enable_disable_tracepoint (struct target_ops *self)
2280{
2281 int result;
2282 fprintf_unfiltered (gdb_stdlog, "-> %s->to_supports_enable_disable_tracepoint (...)\n", debug_target.to_shortname);
2283 result = debug_target.to_supports_enable_disable_tracepoint (&debug_target);
2284 fprintf_unfiltered (gdb_stdlog, "<- %s->to_supports_enable_disable_tracepoint (", debug_target.to_shortname);
2285 target_debug_print_struct_target_ops_p (&debug_target);
2286 fputs_unfiltered (") = ", gdb_stdlog);
2287 target_debug_print_int (result);
2288 fputs_unfiltered ("\n", gdb_stdlog);
2289 return result;
2290}
2291
9409d39e
TT
2292static int
2293delegate_supports_string_tracing (struct target_ops *self)
2294{
2295 self = self->beneath;
2296 return self->to_supports_string_tracing (self);
2297}
2298
2299static int
2300tdefault_supports_string_tracing (struct target_ops *self)
2301{
2302 return 0;
2303}
2304
a7068b60
TT
2305static int
2306debug_supports_string_tracing (struct target_ops *self)
2307{
2308 int result;
2309 fprintf_unfiltered (gdb_stdlog, "-> %s->to_supports_string_tracing (...)\n", debug_target.to_shortname);
2310 result = debug_target.to_supports_string_tracing (&debug_target);
2311 fprintf_unfiltered (gdb_stdlog, "<- %s->to_supports_string_tracing (", debug_target.to_shortname);
2312 target_debug_print_struct_target_ops_p (&debug_target);
2313 fputs_unfiltered (") = ", gdb_stdlog);
2314 target_debug_print_int (result);
2315 fputs_unfiltered ("\n", gdb_stdlog);
2316 return result;
2317}
2318
ccfde2a0
TT
2319static int
2320delegate_supports_evaluation_of_breakpoint_conditions (struct target_ops *self)
2321{
2322 self = self->beneath;
2323 return self->to_supports_evaluation_of_breakpoint_conditions (self);
2324}
2325
2326static int
2327tdefault_supports_evaluation_of_breakpoint_conditions (struct target_ops *self)
2328{
2329 return 0;
2330}
2331
a7068b60
TT
2332static int
2333debug_supports_evaluation_of_breakpoint_conditions (struct target_ops *self)
2334{
2335 int result;
2336 fprintf_unfiltered (gdb_stdlog, "-> %s->to_supports_evaluation_of_breakpoint_conditions (...)\n", debug_target.to_shortname);
2337 result = debug_target.to_supports_evaluation_of_breakpoint_conditions (&debug_target);
2338 fprintf_unfiltered (gdb_stdlog, "<- %s->to_supports_evaluation_of_breakpoint_conditions (", debug_target.to_shortname);
2339 target_debug_print_struct_target_ops_p (&debug_target);
2340 fputs_unfiltered (") = ", gdb_stdlog);
2341 target_debug_print_int (result);
2342 fputs_unfiltered ("\n", gdb_stdlog);
2343 return result;
2344}
2345
843f59ed
TT
2346static int
2347delegate_can_run_breakpoint_commands (struct target_ops *self)
2348{
2349 self = self->beneath;
2350 return self->to_can_run_breakpoint_commands (self);
2351}
2352
2353static int
2354tdefault_can_run_breakpoint_commands (struct target_ops *self)
2355{
2356 return 0;
2357}
2358
a7068b60
TT
2359static int
2360debug_can_run_breakpoint_commands (struct target_ops *self)
2361{
2362 int result;
2363 fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_run_breakpoint_commands (...)\n", debug_target.to_shortname);
2364 result = debug_target.to_can_run_breakpoint_commands (&debug_target);
2365 fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_run_breakpoint_commands (", debug_target.to_shortname);
2366 target_debug_print_struct_target_ops_p (&debug_target);
2367 fputs_unfiltered (") = ", gdb_stdlog);
2368 target_debug_print_int (result);
2369 fputs_unfiltered ("\n", gdb_stdlog);
2370 return result;
2371}
2372
43eba180
TT
2373static struct gdbarch *
2374delegate_thread_architecture (struct target_ops *self, ptid_t arg1)
2375{
2376 self = self->beneath;
2377 return self->to_thread_architecture (self, arg1);
2378}
2379
a7068b60
TT
2380static struct gdbarch *
2381debug_thread_architecture (struct target_ops *self, ptid_t arg1)
2382{
2383 struct gdbarch * result;
2384 fprintf_unfiltered (gdb_stdlog, "-> %s->to_thread_architecture (...)\n", debug_target.to_shortname);
2385 result = debug_target.to_thread_architecture (&debug_target, arg1);
2386 fprintf_unfiltered (gdb_stdlog, "<- %s->to_thread_architecture (", debug_target.to_shortname);
2387 target_debug_print_struct_target_ops_p (&debug_target);
2388 fputs_unfiltered (", ", gdb_stdlog);
2389 target_debug_print_ptid_t (arg1);
2390 fputs_unfiltered (") = ", gdb_stdlog);
2391 target_debug_print_struct_gdbarch_p (result);
2392 fputs_unfiltered ("\n", gdb_stdlog);
2393 return result;
2394}
2395
8eaff7cd
TT
2396static struct address_space *
2397delegate_thread_address_space (struct target_ops *self, ptid_t arg1)
2398{
2399 self = self->beneath;
2400 return self->to_thread_address_space (self, arg1);
2401}
2402
a7068b60
TT
2403static struct address_space *
2404debug_thread_address_space (struct target_ops *self, ptid_t arg1)
2405{
2406 struct address_space * result;
2407 fprintf_unfiltered (gdb_stdlog, "-> %s->to_thread_address_space (...)\n", debug_target.to_shortname);
2408 result = debug_target.to_thread_address_space (&debug_target, arg1);
2409 fprintf_unfiltered (gdb_stdlog, "<- %s->to_thread_address_space (", debug_target.to_shortname);
2410 target_debug_print_struct_target_ops_p (&debug_target);
2411 fputs_unfiltered (", ", gdb_stdlog);
2412 target_debug_print_ptid_t (arg1);
2413 fputs_unfiltered (") = ", gdb_stdlog);
2414 target_debug_print_struct_address_space_p (result);
2415 fputs_unfiltered ("\n", gdb_stdlog);
2416 return result;
2417}
2418
4bd7dc42
GB
2419static int
2420delegate_filesystem_is_local (struct target_ops *self)
2421{
2422 self = self->beneath;
2423 return self->to_filesystem_is_local (self);
2424}
2425
2426static int
2427tdefault_filesystem_is_local (struct target_ops *self)
2428{
2429 return 1;
2430}
2431
2432static int
2433debug_filesystem_is_local (struct target_ops *self)
2434{
2435 int result;
2436 fprintf_unfiltered (gdb_stdlog, "-> %s->to_filesystem_is_local (...)\n", debug_target.to_shortname);
2437 result = debug_target.to_filesystem_is_local (&debug_target);
2438 fprintf_unfiltered (gdb_stdlog, "<- %s->to_filesystem_is_local (", debug_target.to_shortname);
2439 target_debug_print_struct_target_ops_p (&debug_target);
2440 fputs_unfiltered (") = ", gdb_stdlog);
2441 target_debug_print_int (result);
2442 fputs_unfiltered ("\n", gdb_stdlog);
2443 return result;
2444}
2445
5536135b
TT
2446static void
2447delegate_trace_init (struct target_ops *self)
2448{
2449 self = self->beneath;
2450 self->to_trace_init (self);
2451}
2452
2453static void
2454tdefault_trace_init (struct target_ops *self)
2455{
2456 tcomplain ();
2457}
2458
a7068b60
TT
2459static void
2460debug_trace_init (struct target_ops *self)
2461{
2462 fprintf_unfiltered (gdb_stdlog, "-> %s->to_trace_init (...)\n", debug_target.to_shortname);
2463 debug_target.to_trace_init (&debug_target);
2464 fprintf_unfiltered (gdb_stdlog, "<- %s->to_trace_init (", debug_target.to_shortname);
2465 target_debug_print_struct_target_ops_p (&debug_target);
2466 fputs_unfiltered (")\n", gdb_stdlog);
2467}
2468
9a980a22
TT
2469static void
2470delegate_download_tracepoint (struct target_ops *self, struct bp_location *arg1)
2471{
2472 self = self->beneath;
2473 self->to_download_tracepoint (self, arg1);
2474}
2475
2476static void
2477tdefault_download_tracepoint (struct target_ops *self, struct bp_location *arg1)
2478{
2479 tcomplain ();
2480}
2481
a7068b60
TT
2482static void
2483debug_download_tracepoint (struct target_ops *self, struct bp_location *arg1)
2484{
2485 fprintf_unfiltered (gdb_stdlog, "-> %s->to_download_tracepoint (...)\n", debug_target.to_shortname);
2486 debug_target.to_download_tracepoint (&debug_target, arg1);
2487 fprintf_unfiltered (gdb_stdlog, "<- %s->to_download_tracepoint (", debug_target.to_shortname);
2488 target_debug_print_struct_target_ops_p (&debug_target);
2489 fputs_unfiltered (", ", gdb_stdlog);
2490 target_debug_print_struct_bp_location_p (arg1);
2491 fputs_unfiltered (")\n", gdb_stdlog);
2492}
2493
719acc4a
TT
2494static int
2495delegate_can_download_tracepoint (struct target_ops *self)
2496{
2497 self = self->beneath;
2498 return self->to_can_download_tracepoint (self);
2499}
2500
2501static int
2502tdefault_can_download_tracepoint (struct target_ops *self)
2503{
2504 return 0;
2505}
2506
a7068b60
TT
2507static int
2508debug_can_download_tracepoint (struct target_ops *self)
2509{
2510 int result;
2511 fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_download_tracepoint (...)\n", debug_target.to_shortname);
2512 result = debug_target.to_can_download_tracepoint (&debug_target);
2513 fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_download_tracepoint (", debug_target.to_shortname);
2514 target_debug_print_struct_target_ops_p (&debug_target);
2515 fputs_unfiltered (") = ", gdb_stdlog);
2516 target_debug_print_int (result);
2517 fputs_unfiltered ("\n", gdb_stdlog);
2518 return result;
2519}
2520
94eb98b9
TT
2521static void
2522delegate_download_trace_state_variable (struct target_ops *self, struct trace_state_variable *arg1)
2523{
2524 self = self->beneath;
2525 self->to_download_trace_state_variable (self, arg1);
2526}
2527
2528static void
2529tdefault_download_trace_state_variable (struct target_ops *self, struct trace_state_variable *arg1)
2530{
2531 tcomplain ();
2532}
2533
a7068b60
TT
2534static void
2535debug_download_trace_state_variable (struct target_ops *self, struct trace_state_variable *arg1)
2536{
2537 fprintf_unfiltered (gdb_stdlog, "-> %s->to_download_trace_state_variable (...)\n", debug_target.to_shortname);
2538 debug_target.to_download_trace_state_variable (&debug_target, arg1);
2539 fprintf_unfiltered (gdb_stdlog, "<- %s->to_download_trace_state_variable (", debug_target.to_shortname);
2540 target_debug_print_struct_target_ops_p (&debug_target);
2541 fputs_unfiltered (", ", gdb_stdlog);
2542 target_debug_print_struct_trace_state_variable_p (arg1);
2543 fputs_unfiltered (")\n", gdb_stdlog);
2544}
2545
151f70f1
TT
2546static void
2547delegate_enable_tracepoint (struct target_ops *self, struct bp_location *arg1)
2548{
2549 self = self->beneath;
2550 self->to_enable_tracepoint (self, arg1);
2551}
2552
2553static void
2554tdefault_enable_tracepoint (struct target_ops *self, struct bp_location *arg1)
2555{
2556 tcomplain ();
2557}
2558
a7068b60
TT
2559static void
2560debug_enable_tracepoint (struct target_ops *self, struct bp_location *arg1)
2561{
2562 fprintf_unfiltered (gdb_stdlog, "-> %s->to_enable_tracepoint (...)\n", debug_target.to_shortname);
2563 debug_target.to_enable_tracepoint (&debug_target, arg1);
2564 fprintf_unfiltered (gdb_stdlog, "<- %s->to_enable_tracepoint (", debug_target.to_shortname);
2565 target_debug_print_struct_target_ops_p (&debug_target);
2566 fputs_unfiltered (", ", gdb_stdlog);
2567 target_debug_print_struct_bp_location_p (arg1);
2568 fputs_unfiltered (")\n", gdb_stdlog);
2569}
2570
05c41993
TT
2571static void
2572delegate_disable_tracepoint (struct target_ops *self, struct bp_location *arg1)
2573{
2574 self = self->beneath;
2575 self->to_disable_tracepoint (self, arg1);
2576}
2577
2578static void
2579tdefault_disable_tracepoint (struct target_ops *self, struct bp_location *arg1)
2580{
2581 tcomplain ();
2582}
2583
a7068b60
TT
2584static void
2585debug_disable_tracepoint (struct target_ops *self, struct bp_location *arg1)
2586{
2587 fprintf_unfiltered (gdb_stdlog, "-> %s->to_disable_tracepoint (...)\n", debug_target.to_shortname);
2588 debug_target.to_disable_tracepoint (&debug_target, arg1);
2589 fprintf_unfiltered (gdb_stdlog, "<- %s->to_disable_tracepoint (", debug_target.to_shortname);
2590 target_debug_print_struct_target_ops_p (&debug_target);
2591 fputs_unfiltered (", ", gdb_stdlog);
2592 target_debug_print_struct_bp_location_p (arg1);
2593 fputs_unfiltered (")\n", gdb_stdlog);
2594}
2595
86dd181d
TT
2596static void
2597delegate_trace_set_readonly_regions (struct target_ops *self)
2598{
2599 self = self->beneath;
2600 self->to_trace_set_readonly_regions (self);
2601}
2602
2603static void
2604tdefault_trace_set_readonly_regions (struct target_ops *self)
2605{
2606 tcomplain ();
2607}
2608
a7068b60
TT
2609static void
2610debug_trace_set_readonly_regions (struct target_ops *self)
2611{
2612 fprintf_unfiltered (gdb_stdlog, "-> %s->to_trace_set_readonly_regions (...)\n", debug_target.to_shortname);
2613 debug_target.to_trace_set_readonly_regions (&debug_target);
2614 fprintf_unfiltered (gdb_stdlog, "<- %s->to_trace_set_readonly_regions (", debug_target.to_shortname);
2615 target_debug_print_struct_target_ops_p (&debug_target);
2616 fputs_unfiltered (")\n", gdb_stdlog);
2617}
2618
25da2e80
TT
2619static void
2620delegate_trace_start (struct target_ops *self)
2621{
2622 self = self->beneath;
2623 self->to_trace_start (self);
2624}
2625
2626static void
2627tdefault_trace_start (struct target_ops *self)
2628{
2629 tcomplain ();
2630}
2631
a7068b60
TT
2632static void
2633debug_trace_start (struct target_ops *self)
2634{
2635 fprintf_unfiltered (gdb_stdlog, "-> %s->to_trace_start (...)\n", debug_target.to_shortname);
2636 debug_target.to_trace_start (&debug_target);
2637 fprintf_unfiltered (gdb_stdlog, "<- %s->to_trace_start (", debug_target.to_shortname);
2638 target_debug_print_struct_target_ops_p (&debug_target);
2639 fputs_unfiltered (")\n", gdb_stdlog);
2640}
2641
4072d4ff
TT
2642static int
2643delegate_get_trace_status (struct target_ops *self, struct trace_status *arg1)
2644{
2645 self = self->beneath;
2646 return self->to_get_trace_status (self, arg1);
2647}
2648
2649static int
2650tdefault_get_trace_status (struct target_ops *self, struct trace_status *arg1)
2651{
2652 return -1;
2653}
2654
a7068b60
TT
2655static int
2656debug_get_trace_status (struct target_ops *self, struct trace_status *arg1)
2657{
2658 int result;
2659 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_trace_status (...)\n", debug_target.to_shortname);
2660 result = debug_target.to_get_trace_status (&debug_target, arg1);
2661 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_trace_status (", debug_target.to_shortname);
2662 target_debug_print_struct_target_ops_p (&debug_target);
2663 fputs_unfiltered (", ", gdb_stdlog);
2664 target_debug_print_struct_trace_status_p (arg1);
2665 fputs_unfiltered (") = ", gdb_stdlog);
2666 target_debug_print_int (result);
2667 fputs_unfiltered ("\n", gdb_stdlog);
2668 return result;
2669}
2670
6fea14cd
TT
2671static void
2672delegate_get_tracepoint_status (struct target_ops *self, struct breakpoint *arg1, struct uploaded_tp *arg2)
2673{
2674 self = self->beneath;
2675 self->to_get_tracepoint_status (self, arg1, arg2);
2676}
2677
2678static void
2679tdefault_get_tracepoint_status (struct target_ops *self, struct breakpoint *arg1, struct uploaded_tp *arg2)
2680{
2681 tcomplain ();
2682}
2683
a7068b60
TT
2684static void
2685debug_get_tracepoint_status (struct target_ops *self, struct breakpoint *arg1, struct uploaded_tp *arg2)
2686{
2687 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_tracepoint_status (...)\n", debug_target.to_shortname);
2688 debug_target.to_get_tracepoint_status (&debug_target, arg1, arg2);
2689 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_tracepoint_status (", debug_target.to_shortname);
2690 target_debug_print_struct_target_ops_p (&debug_target);
2691 fputs_unfiltered (", ", gdb_stdlog);
2692 target_debug_print_struct_breakpoint_p (arg1);
2693 fputs_unfiltered (", ", gdb_stdlog);
2694 target_debug_print_struct_uploaded_tp_p (arg2);
2695 fputs_unfiltered (")\n", gdb_stdlog);
2696}
2697
e51c07ea
TT
2698static void
2699delegate_trace_stop (struct target_ops *self)
2700{
2701 self = self->beneath;
2702 self->to_trace_stop (self);
2703}
2704
2705static void
2706tdefault_trace_stop (struct target_ops *self)
2707{
2708 tcomplain ();
2709}
2710
a7068b60
TT
2711static void
2712debug_trace_stop (struct target_ops *self)
2713{
2714 fprintf_unfiltered (gdb_stdlog, "-> %s->to_trace_stop (...)\n", debug_target.to_shortname);
2715 debug_target.to_trace_stop (&debug_target);
2716 fprintf_unfiltered (gdb_stdlog, "<- %s->to_trace_stop (", debug_target.to_shortname);
2717 target_debug_print_struct_target_ops_p (&debug_target);
2718 fputs_unfiltered (")\n", gdb_stdlog);
2719}
2720
afc94e66 2721static int
a8bdc56b 2722delegate_trace_find (struct target_ops *self, enum trace_find_type arg1, int arg2, CORE_ADDR arg3, CORE_ADDR arg4, int *arg5)
afc94e66
TT
2723{
2724 self = self->beneath;
2725 return self->to_trace_find (self, arg1, arg2, arg3, arg4, arg5);
2726}
2727
2728static int
a8bdc56b 2729tdefault_trace_find (struct target_ops *self, enum trace_find_type arg1, int arg2, CORE_ADDR arg3, CORE_ADDR arg4, int *arg5)
afc94e66
TT
2730{
2731 return -1;
2732}
2733
a7068b60
TT
2734static int
2735debug_trace_find (struct target_ops *self, enum trace_find_type arg1, int arg2, CORE_ADDR arg3, CORE_ADDR arg4, int *arg5)
2736{
2737 int result;
2738 fprintf_unfiltered (gdb_stdlog, "-> %s->to_trace_find (...)\n", debug_target.to_shortname);
2739 result = debug_target.to_trace_find (&debug_target, arg1, arg2, arg3, arg4, arg5);
2740 fprintf_unfiltered (gdb_stdlog, "<- %s->to_trace_find (", debug_target.to_shortname);
2741 target_debug_print_struct_target_ops_p (&debug_target);
2742 fputs_unfiltered (", ", gdb_stdlog);
2743 target_debug_print_enum_trace_find_type (arg1);
2744 fputs_unfiltered (", ", gdb_stdlog);
2745 target_debug_print_int (arg2);
2746 fputs_unfiltered (", ", gdb_stdlog);
2747 target_debug_print_CORE_ADDR (arg3);
2748 fputs_unfiltered (", ", gdb_stdlog);
2749 target_debug_print_CORE_ADDR (arg4);
2750 fputs_unfiltered (", ", gdb_stdlog);
2751 target_debug_print_int_p (arg5);
2752 fputs_unfiltered (") = ", gdb_stdlog);
2753 target_debug_print_int (result);
2754 fputs_unfiltered ("\n", gdb_stdlog);
2755 return result;
2756}
2757
959bcd0b
TT
2758static int
2759delegate_get_trace_state_variable_value (struct target_ops *self, int arg1, LONGEST *arg2)
2760{
2761 self = self->beneath;
2762 return self->to_get_trace_state_variable_value (self, arg1, arg2);
2763}
2764
2765static int
2766tdefault_get_trace_state_variable_value (struct target_ops *self, int arg1, LONGEST *arg2)
2767{
2768 return 0;
2769}
2770
a7068b60
TT
2771static int
2772debug_get_trace_state_variable_value (struct target_ops *self, int arg1, LONGEST *arg2)
2773{
2774 int result;
2775 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_trace_state_variable_value (...)\n", debug_target.to_shortname);
2776 result = debug_target.to_get_trace_state_variable_value (&debug_target, arg1, arg2);
2777 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_trace_state_variable_value (", debug_target.to_shortname);
2778 target_debug_print_struct_target_ops_p (&debug_target);
2779 fputs_unfiltered (", ", gdb_stdlog);
2780 target_debug_print_int (arg1);
2781 fputs_unfiltered (", ", gdb_stdlog);
2782 target_debug_print_LONGEST_p (arg2);
2783 fputs_unfiltered (") = ", gdb_stdlog);
2784 target_debug_print_int (result);
2785 fputs_unfiltered ("\n", gdb_stdlog);
2786 return result;
2787}
2788
a2e6c147
TT
2789static int
2790delegate_save_trace_data (struct target_ops *self, const char *arg1)
2791{
2792 self = self->beneath;
2793 return self->to_save_trace_data (self, arg1);
2794}
2795
2796static int
2797tdefault_save_trace_data (struct target_ops *self, const char *arg1)
2798{
2799 tcomplain ();
2800}
2801
a7068b60
TT
2802static int
2803debug_save_trace_data (struct target_ops *self, const char *arg1)
2804{
2805 int result;
2806 fprintf_unfiltered (gdb_stdlog, "-> %s->to_save_trace_data (...)\n", debug_target.to_shortname);
2807 result = debug_target.to_save_trace_data (&debug_target, arg1);
2808 fprintf_unfiltered (gdb_stdlog, "<- %s->to_save_trace_data (", debug_target.to_shortname);
2809 target_debug_print_struct_target_ops_p (&debug_target);
2810 fputs_unfiltered (", ", gdb_stdlog);
2811 target_debug_print_const_char_p (arg1);
2812 fputs_unfiltered (") = ", gdb_stdlog);
2813 target_debug_print_int (result);
2814 fputs_unfiltered ("\n", gdb_stdlog);
2815 return result;
2816}
2817
1e949b00
TT
2818static int
2819delegate_upload_tracepoints (struct target_ops *self, struct uploaded_tp **arg1)
2820{
2821 self = self->beneath;
2822 return self->to_upload_tracepoints (self, arg1);
2823}
2824
2825static int
2826tdefault_upload_tracepoints (struct target_ops *self, struct uploaded_tp **arg1)
2827{
2828 return 0;
2829}
2830
a7068b60
TT
2831static int
2832debug_upload_tracepoints (struct target_ops *self, struct uploaded_tp **arg1)
2833{
2834 int result;
2835 fprintf_unfiltered (gdb_stdlog, "-> %s->to_upload_tracepoints (...)\n", debug_target.to_shortname);
2836 result = debug_target.to_upload_tracepoints (&debug_target, arg1);
2837 fprintf_unfiltered (gdb_stdlog, "<- %s->to_upload_tracepoints (", debug_target.to_shortname);
2838 target_debug_print_struct_target_ops_p (&debug_target);
2839 fputs_unfiltered (", ", gdb_stdlog);
2840 target_debug_print_struct_uploaded_tp_pp (arg1);
2841 fputs_unfiltered (") = ", gdb_stdlog);
2842 target_debug_print_int (result);
2843 fputs_unfiltered ("\n", gdb_stdlog);
2844 return result;
2845}
2846
08120467
TT
2847static int
2848delegate_upload_trace_state_variables (struct target_ops *self, struct uploaded_tsv **arg1)
2849{
2850 self = self->beneath;
2851 return self->to_upload_trace_state_variables (self, arg1);
2852}
2853
2854static int
2855tdefault_upload_trace_state_variables (struct target_ops *self, struct uploaded_tsv **arg1)
2856{
2857 return 0;
2858}
2859
a7068b60
TT
2860static int
2861debug_upload_trace_state_variables (struct target_ops *self, struct uploaded_tsv **arg1)
2862{
2863 int result;
2864 fprintf_unfiltered (gdb_stdlog, "-> %s->to_upload_trace_state_variables (...)\n", debug_target.to_shortname);
2865 result = debug_target.to_upload_trace_state_variables (&debug_target, arg1);
2866 fprintf_unfiltered (gdb_stdlog, "<- %s->to_upload_trace_state_variables (", debug_target.to_shortname);
2867 target_debug_print_struct_target_ops_p (&debug_target);
2868 fputs_unfiltered (", ", gdb_stdlog);
2869 target_debug_print_struct_uploaded_tsv_pp (arg1);
2870 fputs_unfiltered (") = ", gdb_stdlog);
2871 target_debug_print_int (result);
2872 fputs_unfiltered ("\n", gdb_stdlog);
2873 return result;
2874}
2875
ace92e7d
TT
2876static LONGEST
2877delegate_get_raw_trace_data (struct target_ops *self, gdb_byte *arg1, ULONGEST arg2, LONGEST arg3)
2878{
2879 self = self->beneath;
2880 return self->to_get_raw_trace_data (self, arg1, arg2, arg3);
2881}
2882
2883static LONGEST
2884tdefault_get_raw_trace_data (struct target_ops *self, gdb_byte *arg1, ULONGEST arg2, LONGEST arg3)
2885{
2886 tcomplain ();
2887}
2888
a7068b60
TT
2889static LONGEST
2890debug_get_raw_trace_data (struct target_ops *self, gdb_byte *arg1, ULONGEST arg2, LONGEST arg3)
2891{
2892 LONGEST result;
2893 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_raw_trace_data (...)\n", debug_target.to_shortname);
2894 result = debug_target.to_get_raw_trace_data (&debug_target, arg1, arg2, arg3);
2895 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_raw_trace_data (", debug_target.to_shortname);
2896 target_debug_print_struct_target_ops_p (&debug_target);
2897 fputs_unfiltered (", ", gdb_stdlog);
2898 target_debug_print_gdb_byte_p (arg1);
2899 fputs_unfiltered (", ", gdb_stdlog);
2900 target_debug_print_ULONGEST (arg2);
2901 fputs_unfiltered (", ", gdb_stdlog);
2902 target_debug_print_LONGEST (arg3);
2903 fputs_unfiltered (") = ", gdb_stdlog);
2904 target_debug_print_LONGEST (result);
2905 fputs_unfiltered ("\n", gdb_stdlog);
2906 return result;
2907}
2908
9249843f
TT
2909static int
2910delegate_get_min_fast_tracepoint_insn_len (struct target_ops *self)
2911{
2912 self = self->beneath;
2913 return self->to_get_min_fast_tracepoint_insn_len (self);
2914}
2915
2916static int
2917tdefault_get_min_fast_tracepoint_insn_len (struct target_ops *self)
2918{
2919 return -1;
2920}
2921
a7068b60
TT
2922static int
2923debug_get_min_fast_tracepoint_insn_len (struct target_ops *self)
2924{
2925 int result;
2926 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_min_fast_tracepoint_insn_len (...)\n", debug_target.to_shortname);
2927 result = debug_target.to_get_min_fast_tracepoint_insn_len (&debug_target);
2928 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_min_fast_tracepoint_insn_len (", debug_target.to_shortname);
2929 target_debug_print_struct_target_ops_p (&debug_target);
2930 fputs_unfiltered (") = ", gdb_stdlog);
2931 target_debug_print_int (result);
2932 fputs_unfiltered ("\n", gdb_stdlog);
2933 return result;
2934}
2935
0bcfeddf
TT
2936static void
2937delegate_set_disconnected_tracing (struct target_ops *self, int arg1)
2938{
2939 self = self->beneath;
2940 self->to_set_disconnected_tracing (self, arg1);
2941}
2942
2943static void
2944tdefault_set_disconnected_tracing (struct target_ops *self, int arg1)
2945{
2946}
2947
a7068b60
TT
2948static void
2949debug_set_disconnected_tracing (struct target_ops *self, int arg1)
2950{
2951 fprintf_unfiltered (gdb_stdlog, "-> %s->to_set_disconnected_tracing (...)\n", debug_target.to_shortname);
2952 debug_target.to_set_disconnected_tracing (&debug_target, arg1);
2953 fprintf_unfiltered (gdb_stdlog, "<- %s->to_set_disconnected_tracing (", debug_target.to_shortname);
2954 target_debug_print_struct_target_ops_p (&debug_target);
2955 fputs_unfiltered (", ", gdb_stdlog);
2956 target_debug_print_int (arg1);
2957 fputs_unfiltered (")\n", gdb_stdlog);
2958}
2959
8d526939
TT
2960static void
2961delegate_set_circular_trace_buffer (struct target_ops *self, int arg1)
2962{
2963 self = self->beneath;
2964 self->to_set_circular_trace_buffer (self, arg1);
2965}
2966
2967static void
2968tdefault_set_circular_trace_buffer (struct target_ops *self, int arg1)
2969{
2970}
2971
a7068b60
TT
2972static void
2973debug_set_circular_trace_buffer (struct target_ops *self, int arg1)
2974{
2975 fprintf_unfiltered (gdb_stdlog, "-> %s->to_set_circular_trace_buffer (...)\n", debug_target.to_shortname);
2976 debug_target.to_set_circular_trace_buffer (&debug_target, arg1);
2977 fprintf_unfiltered (gdb_stdlog, "<- %s->to_set_circular_trace_buffer (", debug_target.to_shortname);
2978 target_debug_print_struct_target_ops_p (&debug_target);
2979 fputs_unfiltered (", ", gdb_stdlog);
2980 target_debug_print_int (arg1);
2981 fputs_unfiltered (")\n", gdb_stdlog);
2982}
2983
91df8d1d
TT
2984static void
2985delegate_set_trace_buffer_size (struct target_ops *self, LONGEST arg1)
2986{
2987 self = self->beneath;
2988 self->to_set_trace_buffer_size (self, arg1);
2989}
2990
2991static void
2992tdefault_set_trace_buffer_size (struct target_ops *self, LONGEST arg1)
2993{
2994}
2995
a7068b60
TT
2996static void
2997debug_set_trace_buffer_size (struct target_ops *self, LONGEST arg1)
2998{
2999 fprintf_unfiltered (gdb_stdlog, "-> %s->to_set_trace_buffer_size (...)\n", debug_target.to_shortname);
3000 debug_target.to_set_trace_buffer_size (&debug_target, arg1);
3001 fprintf_unfiltered (gdb_stdlog, "<- %s->to_set_trace_buffer_size (", debug_target.to_shortname);
3002 target_debug_print_struct_target_ops_p (&debug_target);
3003 fputs_unfiltered (", ", gdb_stdlog);
3004 target_debug_print_LONGEST (arg1);
3005 fputs_unfiltered (")\n", gdb_stdlog);
3006}
3007
8586ccaa
TT
3008static int
3009delegate_set_trace_notes (struct target_ops *self, const char *arg1, const char *arg2, const char *arg3)
3010{
3011 self = self->beneath;
3012 return self->to_set_trace_notes (self, arg1, arg2, arg3);
3013}
3014
3015static int
3016tdefault_set_trace_notes (struct target_ops *self, const char *arg1, const char *arg2, const char *arg3)
3017{
3018 return 0;
3019}
3020
a7068b60
TT
3021static int
3022debug_set_trace_notes (struct target_ops *self, const char *arg1, const char *arg2, const char *arg3)
3023{
3024 int result;
3025 fprintf_unfiltered (gdb_stdlog, "-> %s->to_set_trace_notes (...)\n", debug_target.to_shortname);
3026 result = debug_target.to_set_trace_notes (&debug_target, arg1, arg2, arg3);
3027 fprintf_unfiltered (gdb_stdlog, "<- %s->to_set_trace_notes (", debug_target.to_shortname);
3028 target_debug_print_struct_target_ops_p (&debug_target);
3029 fputs_unfiltered (", ", gdb_stdlog);
3030 target_debug_print_const_char_p (arg1);
3031 fputs_unfiltered (", ", gdb_stdlog);
3032 target_debug_print_const_char_p (arg2);
3033 fputs_unfiltered (", ", gdb_stdlog);
3034 target_debug_print_const_char_p (arg3);
3035 fputs_unfiltered (") = ", gdb_stdlog);
3036 target_debug_print_int (result);
3037 fputs_unfiltered ("\n", gdb_stdlog);
3038 return result;
3039}
3040
9e538d0d
TT
3041static int
3042delegate_core_of_thread (struct target_ops *self, ptid_t arg1)
3043{
3044 self = self->beneath;
3045 return self->to_core_of_thread (self, arg1);
3046}
3047
3048static int
3049tdefault_core_of_thread (struct target_ops *self, ptid_t arg1)
3050{
3051 return -1;
3052}
3053
a7068b60
TT
3054static int
3055debug_core_of_thread (struct target_ops *self, ptid_t arg1)
3056{
3057 int result;
3058 fprintf_unfiltered (gdb_stdlog, "-> %s->to_core_of_thread (...)\n", debug_target.to_shortname);
3059 result = debug_target.to_core_of_thread (&debug_target, arg1);
3060 fprintf_unfiltered (gdb_stdlog, "<- %s->to_core_of_thread (", debug_target.to_shortname);
3061 target_debug_print_struct_target_ops_p (&debug_target);
3062 fputs_unfiltered (", ", gdb_stdlog);
3063 target_debug_print_ptid_t (arg1);
3064 fputs_unfiltered (") = ", gdb_stdlog);
3065 target_debug_print_int (result);
3066 fputs_unfiltered ("\n", gdb_stdlog);
3067 return result;
3068}
3069
eb276a6b
TT
3070static int
3071delegate_verify_memory (struct target_ops *self, const gdb_byte *arg1, CORE_ADDR arg2, ULONGEST arg3)
3072{
3073 self = self->beneath;
3074 return self->to_verify_memory (self, arg1, arg2, arg3);
3075}
3076
a7068b60
TT
3077static int
3078debug_verify_memory (struct target_ops *self, const gdb_byte *arg1, CORE_ADDR arg2, ULONGEST arg3)
3079{
3080 int result;
3081 fprintf_unfiltered (gdb_stdlog, "-> %s->to_verify_memory (...)\n", debug_target.to_shortname);
3082 result = debug_target.to_verify_memory (&debug_target, arg1, arg2, arg3);
3083 fprintf_unfiltered (gdb_stdlog, "<- %s->to_verify_memory (", debug_target.to_shortname);
3084 target_debug_print_struct_target_ops_p (&debug_target);
3085 fputs_unfiltered (", ", gdb_stdlog);
3086 target_debug_print_const_gdb_byte_p (arg1);
3087 fputs_unfiltered (", ", gdb_stdlog);
3088 target_debug_print_CORE_ADDR (arg2);
3089 fputs_unfiltered (", ", gdb_stdlog);
3090 target_debug_print_ULONGEST (arg3);
3091 fputs_unfiltered (") = ", gdb_stdlog);
3092 target_debug_print_int (result);
3093 fputs_unfiltered ("\n", gdb_stdlog);
3094 return result;
3095}
3096
22bcceee
TT
3097static int
3098delegate_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2)
3099{
3100 self = self->beneath;
3101 return self->to_get_tib_address (self, arg1, arg2);
3102}
3103
3104static int
3105tdefault_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2)
3106{
3107 tcomplain ();
3108}
3109
a7068b60
TT
3110static int
3111debug_get_tib_address (struct target_ops *self, ptid_t arg1, CORE_ADDR *arg2)
3112{
3113 int result;
3114 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_tib_address (...)\n", debug_target.to_shortname);
3115 result = debug_target.to_get_tib_address (&debug_target, arg1, arg2);
3116 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_tib_address (", debug_target.to_shortname);
3117 target_debug_print_struct_target_ops_p (&debug_target);
3118 fputs_unfiltered (", ", gdb_stdlog);
3119 target_debug_print_ptid_t (arg1);
3120 fputs_unfiltered (", ", gdb_stdlog);
3121 target_debug_print_CORE_ADDR_p (arg2);
3122 fputs_unfiltered (") = ", gdb_stdlog);
3123 target_debug_print_int (result);
3124 fputs_unfiltered ("\n", gdb_stdlog);
3125 return result;
3126}
3127
dcd6917f
TT
3128static void
3129delegate_set_permissions (struct target_ops *self)
3130{
3131 self = self->beneath;
3132 self->to_set_permissions (self);
3133}
3134
3135static void
3136tdefault_set_permissions (struct target_ops *self)
3137{
3138}
3139
a7068b60
TT
3140static void
3141debug_set_permissions (struct target_ops *self)
3142{
3143 fprintf_unfiltered (gdb_stdlog, "-> %s->to_set_permissions (...)\n", debug_target.to_shortname);
3144 debug_target.to_set_permissions (&debug_target);
3145 fprintf_unfiltered (gdb_stdlog, "<- %s->to_set_permissions (", debug_target.to_shortname);
3146 target_debug_print_struct_target_ops_p (&debug_target);
3147 fputs_unfiltered (")\n", gdb_stdlog);
3148}
3149
4c3e4425
TT
3150static int
3151delegate_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2)
3152{
3153 self = self->beneath;
3154 return self->to_static_tracepoint_marker_at (self, arg1, arg2);
3155}
3156
3157static int
3158tdefault_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2)
3159{
3160 return 0;
3161}
3162
a7068b60
TT
3163static int
3164debug_static_tracepoint_marker_at (struct target_ops *self, CORE_ADDR arg1, struct static_tracepoint_marker *arg2)
3165{
3166 int result;
3167 fprintf_unfiltered (gdb_stdlog, "-> %s->to_static_tracepoint_marker_at (...)\n", debug_target.to_shortname);
3168 result = debug_target.to_static_tracepoint_marker_at (&debug_target, arg1, arg2);
3169 fprintf_unfiltered (gdb_stdlog, "<- %s->to_static_tracepoint_marker_at (", debug_target.to_shortname);
3170 target_debug_print_struct_target_ops_p (&debug_target);
3171 fputs_unfiltered (", ", gdb_stdlog);
3172 target_debug_print_CORE_ADDR (arg1);
3173 fputs_unfiltered (", ", gdb_stdlog);
3174 target_debug_print_struct_static_tracepoint_marker_p (arg2);
3175 fputs_unfiltered (") = ", gdb_stdlog);
3176 target_debug_print_int (result);
3177 fputs_unfiltered ("\n", gdb_stdlog);
3178 return result;
3179}
3180
d6522a22
TT
3181static VEC(static_tracepoint_marker_p) *
3182delegate_static_tracepoint_markers_by_strid (struct target_ops *self, const char *arg1)
3183{
3184 self = self->beneath;
3185 return self->to_static_tracepoint_markers_by_strid (self, arg1);
3186}
3187
3188static VEC(static_tracepoint_marker_p) *
3189tdefault_static_tracepoint_markers_by_strid (struct target_ops *self, const char *arg1)
3190{
3191 tcomplain ();
3192}
3193
a7068b60
TT
3194static VEC(static_tracepoint_marker_p) *
3195debug_static_tracepoint_markers_by_strid (struct target_ops *self, const char *arg1)
3196{
3197 VEC(static_tracepoint_marker_p) * result;
3198 fprintf_unfiltered (gdb_stdlog, "-> %s->to_static_tracepoint_markers_by_strid (...)\n", debug_target.to_shortname);
3199 result = debug_target.to_static_tracepoint_markers_by_strid (&debug_target, arg1);
3200 fprintf_unfiltered (gdb_stdlog, "<- %s->to_static_tracepoint_markers_by_strid (", debug_target.to_shortname);
3201 target_debug_print_struct_target_ops_p (&debug_target);
3202 fputs_unfiltered (", ", gdb_stdlog);
3203 target_debug_print_const_char_p (arg1);
3204 fputs_unfiltered (") = ", gdb_stdlog);
3205 target_debug_print_VEC_static_tracepoint_marker_p__p (result);
3206 fputs_unfiltered ("\n", gdb_stdlog);
3207 return result;
3208}
3209
92155eeb
TT
3210static struct traceframe_info *
3211delegate_traceframe_info (struct target_ops *self)
3212{
3213 self = self->beneath;
3214 return self->to_traceframe_info (self);
3215}
3216
3217static struct traceframe_info *
3218tdefault_traceframe_info (struct target_ops *self)
3219{
6a5f844b 3220 tcomplain ();
92155eeb
TT
3221}
3222
a7068b60
TT
3223static struct traceframe_info *
3224debug_traceframe_info (struct target_ops *self)
3225{
3226 struct traceframe_info * result;
3227 fprintf_unfiltered (gdb_stdlog, "-> %s->to_traceframe_info (...)\n", debug_target.to_shortname);
3228 result = debug_target.to_traceframe_info (&debug_target);
3229 fprintf_unfiltered (gdb_stdlog, "<- %s->to_traceframe_info (", debug_target.to_shortname);
3230 target_debug_print_struct_target_ops_p (&debug_target);
3231 fputs_unfiltered (") = ", gdb_stdlog);
3232 target_debug_print_struct_traceframe_info_p (result);
3233 fputs_unfiltered ("\n", gdb_stdlog);
3234 return result;
3235}
3236
d9db5b21
TT
3237static int
3238delegate_use_agent (struct target_ops *self, int arg1)
3239{
3240 self = self->beneath;
3241 return self->to_use_agent (self, arg1);
3242}
3243
3244static int
3245tdefault_use_agent (struct target_ops *self, int arg1)
3246{
3247 tcomplain ();
3248}
3249
a7068b60
TT
3250static int
3251debug_use_agent (struct target_ops *self, int arg1)
3252{
3253 int result;
3254 fprintf_unfiltered (gdb_stdlog, "-> %s->to_use_agent (...)\n", debug_target.to_shortname);
3255 result = debug_target.to_use_agent (&debug_target, arg1);
3256 fprintf_unfiltered (gdb_stdlog, "<- %s->to_use_agent (", debug_target.to_shortname);
3257 target_debug_print_struct_target_ops_p (&debug_target);
3258 fputs_unfiltered (", ", gdb_stdlog);
3259 target_debug_print_int (arg1);
3260 fputs_unfiltered (") = ", gdb_stdlog);
3261 target_debug_print_int (result);
3262 fputs_unfiltered ("\n", gdb_stdlog);
3263 return result;
3264}
3265
9a7d8b48
TT
3266static int
3267delegate_can_use_agent (struct target_ops *self)
3268{
3269 self = self->beneath;
3270 return self->to_can_use_agent (self);
3271}
3272
3273static int
3274tdefault_can_use_agent (struct target_ops *self)
3275{
3276 return 0;
3277}
3278
a7068b60
TT
3279static int
3280debug_can_use_agent (struct target_ops *self)
3281{
3282 int result;
3283 fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_use_agent (...)\n", debug_target.to_shortname);
3284 result = debug_target.to_can_use_agent (&debug_target);
3285 fprintf_unfiltered (gdb_stdlog, "<- %s->to_can_use_agent (", debug_target.to_shortname);
3286 target_debug_print_struct_target_ops_p (&debug_target);
3287 fputs_unfiltered (") = ", gdb_stdlog);
3288 target_debug_print_int (result);
3289 fputs_unfiltered ("\n", gdb_stdlog);
3290 return result;
3291}
3292
46917d26 3293static int
043c3577 3294delegate_supports_btrace (struct target_ops *self, enum btrace_format arg1)
46917d26
TT
3295{
3296 self = self->beneath;
043c3577 3297 return self->to_supports_btrace (self, arg1);
46917d26
TT
3298}
3299
3300static int
043c3577 3301tdefault_supports_btrace (struct target_ops *self, enum btrace_format arg1)
46917d26
TT
3302{
3303 return 0;
3304}
3305
a7068b60 3306static int
043c3577 3307debug_supports_btrace (struct target_ops *self, enum btrace_format arg1)
a7068b60
TT
3308{
3309 int result;
3310 fprintf_unfiltered (gdb_stdlog, "-> %s->to_supports_btrace (...)\n", debug_target.to_shortname);
043c3577 3311 result = debug_target.to_supports_btrace (&debug_target, arg1);
a7068b60
TT
3312 fprintf_unfiltered (gdb_stdlog, "<- %s->to_supports_btrace (", debug_target.to_shortname);
3313 target_debug_print_struct_target_ops_p (&debug_target);
043c3577
MM
3314 fputs_unfiltered (", ", gdb_stdlog);
3315 target_debug_print_enum_btrace_format (arg1);
a7068b60
TT
3316 fputs_unfiltered (") = ", gdb_stdlog);
3317 target_debug_print_int (result);
3318 fputs_unfiltered ("\n", gdb_stdlog);
3319 return result;
3320}
3321
6dc7fcf4 3322static struct btrace_target_info *
f4abbc16 3323delegate_enable_btrace (struct target_ops *self, ptid_t arg1, const struct btrace_config *arg2)
6dc7fcf4
TT
3324{
3325 self = self->beneath;
f4abbc16 3326 return self->to_enable_btrace (self, arg1, arg2);
6dc7fcf4
TT
3327}
3328
3329static struct btrace_target_info *
f4abbc16 3330tdefault_enable_btrace (struct target_ops *self, ptid_t arg1, const struct btrace_config *arg2)
6dc7fcf4
TT
3331{
3332 tcomplain ();
3333}
3334
a7068b60 3335static struct btrace_target_info *
f4abbc16 3336debug_enable_btrace (struct target_ops *self, ptid_t arg1, const struct btrace_config *arg2)
a7068b60
TT
3337{
3338 struct btrace_target_info * result;
3339 fprintf_unfiltered (gdb_stdlog, "-> %s->to_enable_btrace (...)\n", debug_target.to_shortname);
f4abbc16 3340 result = debug_target.to_enable_btrace (&debug_target, arg1, arg2);
a7068b60
TT
3341 fprintf_unfiltered (gdb_stdlog, "<- %s->to_enable_btrace (", debug_target.to_shortname);
3342 target_debug_print_struct_target_ops_p (&debug_target);
3343 fputs_unfiltered (", ", gdb_stdlog);
3344 target_debug_print_ptid_t (arg1);
f4abbc16
MM
3345 fputs_unfiltered (", ", gdb_stdlog);
3346 target_debug_print_const_struct_btrace_config_p (arg2);
a7068b60
TT
3347 fputs_unfiltered (") = ", gdb_stdlog);
3348 target_debug_print_struct_btrace_target_info_p (result);
3349 fputs_unfiltered ("\n", gdb_stdlog);
3350 return result;
3351}
3352
8dc292d3
TT
3353static void
3354delegate_disable_btrace (struct target_ops *self, struct btrace_target_info *arg1)
3355{
3356 self = self->beneath;
3357 self->to_disable_btrace (self, arg1);
3358}
3359
3360static void
3361tdefault_disable_btrace (struct target_ops *self, struct btrace_target_info *arg1)
3362{
3363 tcomplain ();
3364}
3365
a7068b60
TT
3366static void
3367debug_disable_btrace (struct target_ops *self, struct btrace_target_info *arg1)
3368{
3369 fprintf_unfiltered (gdb_stdlog, "-> %s->to_disable_btrace (...)\n", debug_target.to_shortname);
3370 debug_target.to_disable_btrace (&debug_target, arg1);
3371 fprintf_unfiltered (gdb_stdlog, "<- %s->to_disable_btrace (", debug_target.to_shortname);
3372 target_debug_print_struct_target_ops_p (&debug_target);
3373 fputs_unfiltered (", ", gdb_stdlog);
3374 target_debug_print_struct_btrace_target_info_p (arg1);
3375 fputs_unfiltered (")\n", gdb_stdlog);
3376}
3377
9ace480d
TT
3378static void
3379delegate_teardown_btrace (struct target_ops *self, struct btrace_target_info *arg1)
3380{
3381 self = self->beneath;
3382 self->to_teardown_btrace (self, arg1);
3383}
3384
3385static void
3386tdefault_teardown_btrace (struct target_ops *self, struct btrace_target_info *arg1)
3387{
3388 tcomplain ();
3389}
3390
a7068b60
TT
3391static void
3392debug_teardown_btrace (struct target_ops *self, struct btrace_target_info *arg1)
3393{
3394 fprintf_unfiltered (gdb_stdlog, "-> %s->to_teardown_btrace (...)\n", debug_target.to_shortname);
3395 debug_target.to_teardown_btrace (&debug_target, arg1);
3396 fprintf_unfiltered (gdb_stdlog, "<- %s->to_teardown_btrace (", debug_target.to_shortname);
3397 target_debug_print_struct_target_ops_p (&debug_target);
3398 fputs_unfiltered (", ", gdb_stdlog);
3399 target_debug_print_struct_btrace_target_info_p (arg1);
3400 fputs_unfiltered (")\n", gdb_stdlog);
3401}
3402
a8bdc56b 3403static enum btrace_error
734b0e4b 3404delegate_read_btrace (struct target_ops *self, struct btrace_data *arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
eb5b20d4
TT
3405{
3406 self = self->beneath;
3407 return self->to_read_btrace (self, arg1, arg2, arg3);
3408}
3409
a8bdc56b 3410static enum btrace_error
734b0e4b 3411tdefault_read_btrace (struct target_ops *self, struct btrace_data *arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
eb5b20d4
TT
3412{
3413 tcomplain ();
3414}
3415
a7068b60 3416static enum btrace_error
734b0e4b 3417debug_read_btrace (struct target_ops *self, struct btrace_data *arg1, struct btrace_target_info *arg2, enum btrace_read_type arg3)
a7068b60
TT
3418{
3419 enum btrace_error result;
3420 fprintf_unfiltered (gdb_stdlog, "-> %s->to_read_btrace (...)\n", debug_target.to_shortname);
3421 result = debug_target.to_read_btrace (&debug_target, arg1, arg2, arg3);
3422 fprintf_unfiltered (gdb_stdlog, "<- %s->to_read_btrace (", debug_target.to_shortname);
3423 target_debug_print_struct_target_ops_p (&debug_target);
3424 fputs_unfiltered (", ", gdb_stdlog);
734b0e4b 3425 target_debug_print_struct_btrace_data_p (arg1);
a7068b60
TT
3426 fputs_unfiltered (", ", gdb_stdlog);
3427 target_debug_print_struct_btrace_target_info_p (arg2);
3428 fputs_unfiltered (", ", gdb_stdlog);
3429 target_debug_print_enum_btrace_read_type (arg3);
3430 fputs_unfiltered (") = ", gdb_stdlog);
3431 target_debug_print_enum_btrace_error (result);
3432 fputs_unfiltered ("\n", gdb_stdlog);
3433 return result;
3434}
3435
f4abbc16
MM
3436static const struct btrace_config *
3437delegate_btrace_conf (struct target_ops *self, const struct btrace_target_info *arg1)
3438{
3439 self = self->beneath;
3440 return self->to_btrace_conf (self, arg1);
3441}
3442
3443static const struct btrace_config *
3444tdefault_btrace_conf (struct target_ops *self, const struct btrace_target_info *arg1)
3445{
3446 return NULL;
3447}
3448
3449static const struct btrace_config *
3450debug_btrace_conf (struct target_ops *self, const struct btrace_target_info *arg1)
3451{
3452 const struct btrace_config * result;
3453 fprintf_unfiltered (gdb_stdlog, "-> %s->to_btrace_conf (...)\n", debug_target.to_shortname);
3454 result = debug_target.to_btrace_conf (&debug_target, arg1);
3455 fprintf_unfiltered (gdb_stdlog, "<- %s->to_btrace_conf (", debug_target.to_shortname);
3456 target_debug_print_struct_target_ops_p (&debug_target);
3457 fputs_unfiltered (", ", gdb_stdlog);
3458 target_debug_print_const_struct_btrace_target_info_p (arg1);
3459 fputs_unfiltered (") = ", gdb_stdlog);
3460 target_debug_print_const_struct_btrace_config_p (result);
3461 fputs_unfiltered ("\n", gdb_stdlog);
3462 return result;
3463}
3464
ee97f592
TT
3465static void
3466delegate_stop_recording (struct target_ops *self)
3467{
3468 self = self->beneath;
3469 self->to_stop_recording (self);
3470}
3471
3472static void
3473tdefault_stop_recording (struct target_ops *self)
3474{
3475}
3476
a7068b60
TT
3477static void
3478debug_stop_recording (struct target_ops *self)
3479{
3480 fprintf_unfiltered (gdb_stdlog, "-> %s->to_stop_recording (...)\n", debug_target.to_shortname);
3481 debug_target.to_stop_recording (&debug_target);
3482 fprintf_unfiltered (gdb_stdlog, "<- %s->to_stop_recording (", debug_target.to_shortname);
3483 target_debug_print_struct_target_ops_p (&debug_target);
3484 fputs_unfiltered (")\n", gdb_stdlog);
3485}
3486
a432721e
TT
3487static void
3488delegate_info_record (struct target_ops *self)
3489{
3490 self = self->beneath;
3491 self->to_info_record (self);
3492}
3493
3494static void
3495tdefault_info_record (struct target_ops *self)
3496{
3497}
3498
a7068b60
TT
3499static void
3500debug_info_record (struct target_ops *self)
3501{
3502 fprintf_unfiltered (gdb_stdlog, "-> %s->to_info_record (...)\n", debug_target.to_shortname);
3503 debug_target.to_info_record (&debug_target);
3504 fprintf_unfiltered (gdb_stdlog, "<- %s->to_info_record (", debug_target.to_shortname);
3505 target_debug_print_struct_target_ops_p (&debug_target);
3506 fputs_unfiltered (")\n", gdb_stdlog);
3507}
3508
f09e2107
TT
3509static void
3510delegate_save_record (struct target_ops *self, const char *arg1)
3511{
3512 self = self->beneath;
3513 self->to_save_record (self, arg1);
3514}
3515
3516static void
3517tdefault_save_record (struct target_ops *self, const char *arg1)
3518{
3519 tcomplain ();
3520}
3521
a7068b60
TT
3522static void
3523debug_save_record (struct target_ops *self, const char *arg1)
3524{
3525 fprintf_unfiltered (gdb_stdlog, "-> %s->to_save_record (...)\n", debug_target.to_shortname);
3526 debug_target.to_save_record (&debug_target, arg1);
3527 fprintf_unfiltered (gdb_stdlog, "<- %s->to_save_record (", debug_target.to_shortname);
3528 target_debug_print_struct_target_ops_p (&debug_target);
3529 fputs_unfiltered (", ", gdb_stdlog);
3530 target_debug_print_const_char_p (arg1);
3531 fputs_unfiltered (")\n", gdb_stdlog);
3532}
3533
07366925
TT
3534static void
3535delegate_delete_record (struct target_ops *self)
3536{
3537 self = self->beneath;
3538 self->to_delete_record (self);
3539}
3540
3541static void
3542tdefault_delete_record (struct target_ops *self)
3543{
3544 tcomplain ();
3545}
3546
a7068b60
TT
3547static void
3548debug_delete_record (struct target_ops *self)
3549{
3550 fprintf_unfiltered (gdb_stdlog, "-> %s->to_delete_record (...)\n", debug_target.to_shortname);
3551 debug_target.to_delete_record (&debug_target);
3552 fprintf_unfiltered (gdb_stdlog, "<- %s->to_delete_record (", debug_target.to_shortname);
3553 target_debug_print_struct_target_ops_p (&debug_target);
3554 fputs_unfiltered (")\n", gdb_stdlog);
3555}
3556
dd2e9d25
TT
3557static int
3558delegate_record_is_replaying (struct target_ops *self)
3559{
3560 self = self->beneath;
3561 return self->to_record_is_replaying (self);
3562}
3563
3564static int
3565tdefault_record_is_replaying (struct target_ops *self)
3566{
3567 return 0;
3568}
3569
a7068b60
TT
3570static int
3571debug_record_is_replaying (struct target_ops *self)
3572{
3573 int result;
3574 fprintf_unfiltered (gdb_stdlog, "-> %s->to_record_is_replaying (...)\n", debug_target.to_shortname);
3575 result = debug_target.to_record_is_replaying (&debug_target);
3576 fprintf_unfiltered (gdb_stdlog, "<- %s->to_record_is_replaying (", debug_target.to_shortname);
3577 target_debug_print_struct_target_ops_p (&debug_target);
3578 fputs_unfiltered (") = ", gdb_stdlog);
3579 target_debug_print_int (result);
3580 fputs_unfiltered ("\n", gdb_stdlog);
3581 return result;
3582}
3583
671e76cc
TT
3584static void
3585delegate_goto_record_begin (struct target_ops *self)
3586{
3587 self = self->beneath;
3588 self->to_goto_record_begin (self);
3589}
3590
3591static void
3592tdefault_goto_record_begin (struct target_ops *self)
3593{
3594 tcomplain ();
3595}
3596
a7068b60
TT
3597static void
3598debug_goto_record_begin (struct target_ops *self)
3599{
3600 fprintf_unfiltered (gdb_stdlog, "-> %s->to_goto_record_begin (...)\n", debug_target.to_shortname);
3601 debug_target.to_goto_record_begin (&debug_target);
3602 fprintf_unfiltered (gdb_stdlog, "<- %s->to_goto_record_begin (", debug_target.to_shortname);
3603 target_debug_print_struct_target_ops_p (&debug_target);
3604 fputs_unfiltered (")\n", gdb_stdlog);
3605}
3606
e9179bb3
TT
3607static void
3608delegate_goto_record_end (struct target_ops *self)
3609{
3610 self = self->beneath;
3611 self->to_goto_record_end (self);
3612}
3613
3614static void
3615tdefault_goto_record_end (struct target_ops *self)
3616{
3617 tcomplain ();
3618}
3619
a7068b60
TT
3620static void
3621debug_goto_record_end (struct target_ops *self)
3622{
3623 fprintf_unfiltered (gdb_stdlog, "-> %s->to_goto_record_end (...)\n", debug_target.to_shortname);
3624 debug_target.to_goto_record_end (&debug_target);
3625 fprintf_unfiltered (gdb_stdlog, "<- %s->to_goto_record_end (", debug_target.to_shortname);
3626 target_debug_print_struct_target_ops_p (&debug_target);
3627 fputs_unfiltered (")\n", gdb_stdlog);
3628}
3629
05969c84
TT
3630static void
3631delegate_goto_record (struct target_ops *self, ULONGEST arg1)
3632{
3633 self = self->beneath;
3634 self->to_goto_record (self, arg1);
3635}
3636
3637static void
3638tdefault_goto_record (struct target_ops *self, ULONGEST arg1)
3639{
3640 tcomplain ();
3641}
3642
a7068b60
TT
3643static void
3644debug_goto_record (struct target_ops *self, ULONGEST arg1)
3645{
3646 fprintf_unfiltered (gdb_stdlog, "-> %s->to_goto_record (...)\n", debug_target.to_shortname);
3647 debug_target.to_goto_record (&debug_target, arg1);
3648 fprintf_unfiltered (gdb_stdlog, "<- %s->to_goto_record (", debug_target.to_shortname);
3649 target_debug_print_struct_target_ops_p (&debug_target);
3650 fputs_unfiltered (", ", gdb_stdlog);
3651 target_debug_print_ULONGEST (arg1);
3652 fputs_unfiltered (")\n", gdb_stdlog);
3653}
3654
3679abfa
TT
3655static void
3656delegate_insn_history (struct target_ops *self, int arg1, int arg2)
3657{
3658 self = self->beneath;
3659 self->to_insn_history (self, arg1, arg2);
3660}
3661
3662static void
3663tdefault_insn_history (struct target_ops *self, int arg1, int arg2)
3664{
3665 tcomplain ();
3666}
3667
a7068b60
TT
3668static void
3669debug_insn_history (struct target_ops *self, int arg1, int arg2)
3670{
3671 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insn_history (...)\n", debug_target.to_shortname);
3672 debug_target.to_insn_history (&debug_target, arg1, arg2);
3673 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insn_history (", debug_target.to_shortname);
3674 target_debug_print_struct_target_ops_p (&debug_target);
3675 fputs_unfiltered (", ", gdb_stdlog);
3676 target_debug_print_int (arg1);
3677 fputs_unfiltered (", ", gdb_stdlog);
3678 target_debug_print_int (arg2);
3679 fputs_unfiltered (")\n", gdb_stdlog);
3680}
3681
8444ab58
TT
3682static void
3683delegate_insn_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3)
3684{
3685 self = self->beneath;
3686 self->to_insn_history_from (self, arg1, arg2, arg3);
3687}
3688
3689static void
3690tdefault_insn_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3)
3691{
3692 tcomplain ();
3693}
3694
a7068b60
TT
3695static void
3696debug_insn_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3)
3697{
3698 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insn_history_from (...)\n", debug_target.to_shortname);
3699 debug_target.to_insn_history_from (&debug_target, arg1, arg2, arg3);
3700 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insn_history_from (", debug_target.to_shortname);
3701 target_debug_print_struct_target_ops_p (&debug_target);
3702 fputs_unfiltered (", ", gdb_stdlog);
3703 target_debug_print_ULONGEST (arg1);
3704 fputs_unfiltered (", ", gdb_stdlog);
3705 target_debug_print_int (arg2);
3706 fputs_unfiltered (", ", gdb_stdlog);
3707 target_debug_print_int (arg3);
3708 fputs_unfiltered (")\n", gdb_stdlog);
3709}
3710
c29302cc
TT
3711static void
3712delegate_insn_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3)
3713{
3714 self = self->beneath;
3715 self->to_insn_history_range (self, arg1, arg2, arg3);
3716}
3717
3718static void
3719tdefault_insn_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3)
3720{
3721 tcomplain ();
3722}
3723
a7068b60
TT
3724static void
3725debug_insn_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3)
3726{
3727 fprintf_unfiltered (gdb_stdlog, "-> %s->to_insn_history_range (...)\n", debug_target.to_shortname);
3728 debug_target.to_insn_history_range (&debug_target, arg1, arg2, arg3);
3729 fprintf_unfiltered (gdb_stdlog, "<- %s->to_insn_history_range (", debug_target.to_shortname);
3730 target_debug_print_struct_target_ops_p (&debug_target);
3731 fputs_unfiltered (", ", gdb_stdlog);
3732 target_debug_print_ULONGEST (arg1);
3733 fputs_unfiltered (", ", gdb_stdlog);
3734 target_debug_print_ULONGEST (arg2);
3735 fputs_unfiltered (", ", gdb_stdlog);
3736 target_debug_print_int (arg3);
3737 fputs_unfiltered (")\n", gdb_stdlog);
3738}
3739
170049d4
TT
3740static void
3741delegate_call_history (struct target_ops *self, int arg1, int arg2)
3742{
3743 self = self->beneath;
3744 self->to_call_history (self, arg1, arg2);
3745}
3746
3747static void
3748tdefault_call_history (struct target_ops *self, int arg1, int arg2)
3749{
3750 tcomplain ();
3751}
3752
a7068b60
TT
3753static void
3754debug_call_history (struct target_ops *self, int arg1, int arg2)
3755{
3756 fprintf_unfiltered (gdb_stdlog, "-> %s->to_call_history (...)\n", debug_target.to_shortname);
3757 debug_target.to_call_history (&debug_target, arg1, arg2);
3758 fprintf_unfiltered (gdb_stdlog, "<- %s->to_call_history (", debug_target.to_shortname);
3759 target_debug_print_struct_target_ops_p (&debug_target);
3760 fputs_unfiltered (", ", gdb_stdlog);
3761 target_debug_print_int (arg1);
3762 fputs_unfiltered (", ", gdb_stdlog);
3763 target_debug_print_int (arg2);
3764 fputs_unfiltered (")\n", gdb_stdlog);
3765}
3766
16fc27d6
TT
3767static void
3768delegate_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3)
3769{
3770 self = self->beneath;
3771 self->to_call_history_from (self, arg1, arg2, arg3);
3772}
3773
3774static void
3775tdefault_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3)
3776{
3777 tcomplain ();
3778}
3779
a7068b60
TT
3780static void
3781debug_call_history_from (struct target_ops *self, ULONGEST arg1, int arg2, int arg3)
3782{
3783 fprintf_unfiltered (gdb_stdlog, "-> %s->to_call_history_from (...)\n", debug_target.to_shortname);
3784 debug_target.to_call_history_from (&debug_target, arg1, arg2, arg3);
3785 fprintf_unfiltered (gdb_stdlog, "<- %s->to_call_history_from (", debug_target.to_shortname);
3786 target_debug_print_struct_target_ops_p (&debug_target);
3787 fputs_unfiltered (", ", gdb_stdlog);
3788 target_debug_print_ULONGEST (arg1);
3789 fputs_unfiltered (", ", gdb_stdlog);
3790 target_debug_print_int (arg2);
3791 fputs_unfiltered (", ", gdb_stdlog);
3792 target_debug_print_int (arg3);
3793 fputs_unfiltered (")\n", gdb_stdlog);
3794}
3795
115d9817
TT
3796static void
3797delegate_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3)
3798{
3799 self = self->beneath;
3800 self->to_call_history_range (self, arg1, arg2, arg3);
3801}
3802
3803static void
3804tdefault_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3)
3805{
3806 tcomplain ();
3807}
3808
a7068b60
TT
3809static void
3810debug_call_history_range (struct target_ops *self, ULONGEST arg1, ULONGEST arg2, int arg3)
3811{
3812 fprintf_unfiltered (gdb_stdlog, "-> %s->to_call_history_range (...)\n", debug_target.to_shortname);
3813 debug_target.to_call_history_range (&debug_target, arg1, arg2, arg3);
3814 fprintf_unfiltered (gdb_stdlog, "<- %s->to_call_history_range (", debug_target.to_shortname);
3815 target_debug_print_struct_target_ops_p (&debug_target);
3816 fputs_unfiltered (", ", gdb_stdlog);
3817 target_debug_print_ULONGEST (arg1);
3818 fputs_unfiltered (", ", gdb_stdlog);
3819 target_debug_print_ULONGEST (arg2);
3820 fputs_unfiltered (", ", gdb_stdlog);
3821 target_debug_print_int (arg3);
3822 fputs_unfiltered (")\n", gdb_stdlog);
3823}
3824
0de91722
TT
3825static int
3826delegate_augmented_libraries_svr4_read (struct target_ops *self)
3827{
3828 self = self->beneath;
3829 return self->to_augmented_libraries_svr4_read (self);
3830}
3831
3832static int
3833tdefault_augmented_libraries_svr4_read (struct target_ops *self)
3834{
3835 return 0;
3836}
3837
a7068b60
TT
3838static int
3839debug_augmented_libraries_svr4_read (struct target_ops *self)
3840{
3841 int result;
3842 fprintf_unfiltered (gdb_stdlog, "-> %s->to_augmented_libraries_svr4_read (...)\n", debug_target.to_shortname);
3843 result = debug_target.to_augmented_libraries_svr4_read (&debug_target);
3844 fprintf_unfiltered (gdb_stdlog, "<- %s->to_augmented_libraries_svr4_read (", debug_target.to_shortname);
3845 target_debug_print_struct_target_ops_p (&debug_target);
3846 fputs_unfiltered (") = ", gdb_stdlog);
3847 target_debug_print_int (result);
3848 fputs_unfiltered ("\n", gdb_stdlog);
3849 return result;
3850}
3851
ac01945b
TT
3852static const struct frame_unwind *
3853delegate_get_unwinder (struct target_ops *self)
3854{
3855 self = self->beneath;
3856 return self->to_get_unwinder (self);
3857}
3858
3859static const struct frame_unwind *
3860tdefault_get_unwinder (struct target_ops *self)
3861{
3862 return NULL;
3863}
3864
a7068b60
TT
3865static const struct frame_unwind *
3866debug_get_unwinder (struct target_ops *self)
3867{
3868 const struct frame_unwind * result;
3869 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_unwinder (...)\n", debug_target.to_shortname);
3870 result = debug_target.to_get_unwinder (&debug_target);
3871 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_unwinder (", debug_target.to_shortname);
3872 target_debug_print_struct_target_ops_p (&debug_target);
3873 fputs_unfiltered (") = ", gdb_stdlog);
3874 target_debug_print_const_struct_frame_unwind_p (result);
3875 fputs_unfiltered ("\n", gdb_stdlog);
3876 return result;
3877}
3878
ac01945b
TT
3879static const struct frame_unwind *
3880delegate_get_tailcall_unwinder (struct target_ops *self)
3881{
3882 self = self->beneath;
3883 return self->to_get_tailcall_unwinder (self);
3884}
3885
3886static const struct frame_unwind *
3887tdefault_get_tailcall_unwinder (struct target_ops *self)
3888{
3889 return NULL;
3890}
3891
a7068b60
TT
3892static const struct frame_unwind *
3893debug_get_tailcall_unwinder (struct target_ops *self)
3894{
3895 const struct frame_unwind * result;
3896 fprintf_unfiltered (gdb_stdlog, "-> %s->to_get_tailcall_unwinder (...)\n", debug_target.to_shortname);
3897 result = debug_target.to_get_tailcall_unwinder (&debug_target);
3898 fprintf_unfiltered (gdb_stdlog, "<- %s->to_get_tailcall_unwinder (", debug_target.to_shortname);
3899 target_debug_print_struct_target_ops_p (&debug_target);
3900 fputs_unfiltered (") = ", gdb_stdlog);
3901 target_debug_print_const_struct_frame_unwind_p (result);
3902 fputs_unfiltered ("\n", gdb_stdlog);
3903 return result;
3904}
3905
5fff78c4
MM
3906static void
3907delegate_prepare_to_generate_core (struct target_ops *self)
3908{
3909 self = self->beneath;
3910 self->to_prepare_to_generate_core (self);
3911}
3912
3913static void
3914tdefault_prepare_to_generate_core (struct target_ops *self)
3915{
3916}
3917
a7068b60
TT
3918static void
3919debug_prepare_to_generate_core (struct target_ops *self)
3920{
3921 fprintf_unfiltered (gdb_stdlog, "-> %s->to_prepare_to_generate_core (...)\n", debug_target.to_shortname);
3922 debug_target.to_prepare_to_generate_core (&debug_target);
3923 fprintf_unfiltered (gdb_stdlog, "<- %s->to_prepare_to_generate_core (", debug_target.to_shortname);
3924 target_debug_print_struct_target_ops_p (&debug_target);
3925 fputs_unfiltered (")\n", gdb_stdlog);
3926}
3927
5fff78c4
MM
3928static void
3929delegate_done_generating_core (struct target_ops *self)
3930{
3931 self = self->beneath;
3932 self->to_done_generating_core (self);
3933}
3934
3935static void
3936tdefault_done_generating_core (struct target_ops *self)
3937{
3938}
3939
a7068b60
TT
3940static void
3941debug_done_generating_core (struct target_ops *self)
3942{
3943 fprintf_unfiltered (gdb_stdlog, "-> %s->to_done_generating_core (...)\n", debug_target.to_shortname);
3944 debug_target.to_done_generating_core (&debug_target);
3945 fprintf_unfiltered (gdb_stdlog, "<- %s->to_done_generating_core (", debug_target.to_shortname);
3946 target_debug_print_struct_target_ops_p (&debug_target);
3947 fputs_unfiltered (")\n", gdb_stdlog);
3948}
3949
1101cb7b
TT
3950static void
3951install_delegators (struct target_ops *ops)
3952{
bebd3233
TT
3953 if (ops->to_post_attach == NULL)
3954 ops->to_post_attach = delegate_post_attach;
09da0d0a
TT
3955 if (ops->to_detach == NULL)
3956 ops->to_detach = delegate_detach;
86a0854a
TT
3957 if (ops->to_disconnect == NULL)
3958 ops->to_disconnect = delegate_disconnect;
6b84065d
TT
3959 if (ops->to_resume == NULL)
3960 ops->to_resume = delegate_resume;
3961 if (ops->to_wait == NULL)
3962 ops->to_wait = delegate_wait;
ad5989bd
TT
3963 if (ops->to_fetch_registers == NULL)
3964 ops->to_fetch_registers = delegate_fetch_registers;
6b84065d
TT
3965 if (ops->to_store_registers == NULL)
3966 ops->to_store_registers = delegate_store_registers;
6c628163
TT
3967 if (ops->to_prepare_to_store == NULL)
3968 ops->to_prepare_to_store = delegate_prepare_to_store;
f86e59b2
TT
3969 if (ops->to_files_info == NULL)
3970 ops->to_files_info = delegate_files_info;
6b84065d
TT
3971 if (ops->to_insert_breakpoint == NULL)
3972 ops->to_insert_breakpoint = delegate_insert_breakpoint;
3973 if (ops->to_remove_breakpoint == NULL)
3974 ops->to_remove_breakpoint = delegate_remove_breakpoint;
1cf4d951
PA
3975 if (ops->to_stopped_by_sw_breakpoint == NULL)
3976 ops->to_stopped_by_sw_breakpoint = delegate_stopped_by_sw_breakpoint;
3977 if (ops->to_supports_stopped_by_sw_breakpoint == NULL)
3978 ops->to_supports_stopped_by_sw_breakpoint = delegate_supports_stopped_by_sw_breakpoint;
3979 if (ops->to_stopped_by_hw_breakpoint == NULL)
3980 ops->to_stopped_by_hw_breakpoint = delegate_stopped_by_hw_breakpoint;
3981 if (ops->to_supports_stopped_by_hw_breakpoint == NULL)
3982 ops->to_supports_stopped_by_hw_breakpoint = delegate_supports_stopped_by_hw_breakpoint;
52b51d06
TT
3983 if (ops->to_can_use_hw_breakpoint == NULL)
3984 ops->to_can_use_hw_breakpoint = delegate_can_use_hw_breakpoint;
a134316b
TT
3985 if (ops->to_ranged_break_num_registers == NULL)
3986 ops->to_ranged_break_num_registers = delegate_ranged_break_num_registers;
61b371f9
TT
3987 if (ops->to_insert_hw_breakpoint == NULL)
3988 ops->to_insert_hw_breakpoint = delegate_insert_hw_breakpoint;
418dabac
TT
3989 if (ops->to_remove_hw_breakpoint == NULL)
3990 ops->to_remove_hw_breakpoint = delegate_remove_hw_breakpoint;
61dd109f
TT
3991 if (ops->to_remove_watchpoint == NULL)
3992 ops->to_remove_watchpoint = delegate_remove_watchpoint;
016facd4
TT
3993 if (ops->to_insert_watchpoint == NULL)
3994 ops->to_insert_watchpoint = delegate_insert_watchpoint;
cd4ae029
TT
3995 if (ops->to_insert_mask_watchpoint == NULL)
3996 ops->to_insert_mask_watchpoint = delegate_insert_mask_watchpoint;
8b1c364c
TT
3997 if (ops->to_remove_mask_watchpoint == NULL)
3998 ops->to_remove_mask_watchpoint = delegate_remove_mask_watchpoint;
6b84065d
TT
3999 if (ops->to_stopped_by_watchpoint == NULL)
4000 ops->to_stopped_by_watchpoint = delegate_stopped_by_watchpoint;
4001 if (ops->to_stopped_data_address == NULL)
4002 ops->to_stopped_data_address = delegate_stopped_data_address;
65f160a9
TT
4003 if (ops->to_watchpoint_addr_within_range == NULL)
4004 ops->to_watchpoint_addr_within_range = delegate_watchpoint_addr_within_range;
d03655e4
TT
4005 if (ops->to_region_ok_for_hw_watchpoint == NULL)
4006 ops->to_region_ok_for_hw_watchpoint = delegate_region_ok_for_hw_watchpoint;
77cdffe9
TT
4007 if (ops->to_can_accel_watchpoint_condition == NULL)
4008 ops->to_can_accel_watchpoint_condition = delegate_can_accel_watchpoint_condition;
6c7e5e5c
TT
4009 if (ops->to_masked_watch_num_registers == NULL)
4010 ops->to_masked_watch_num_registers = delegate_masked_watch_num_registers;
0343661d
TT
4011 if (ops->to_terminal_init == NULL)
4012 ops->to_terminal_init = delegate_terminal_init;
ddeaacc9
TT
4013 if (ops->to_terminal_inferior == NULL)
4014 ops->to_terminal_inferior = delegate_terminal_inferior;
74fcbef9
TT
4015 if (ops->to_terminal_ours_for_output == NULL)
4016 ops->to_terminal_ours_for_output = delegate_terminal_ours_for_output;
e4a733f1
TT
4017 if (ops->to_terminal_ours == NULL)
4018 ops->to_terminal_ours = delegate_terminal_ours;
e19e919f
TT
4019 if (ops->to_terminal_info == NULL)
4020 ops->to_terminal_info = delegate_terminal_info;
423a4807
TT
4021 if (ops->to_kill == NULL)
4022 ops->to_kill = delegate_kill;
7634da87
TT
4023 if (ops->to_load == NULL)
4024 ops->to_load = delegate_load;
340ba4bf
TT
4025 if (ops->to_post_startup_inferior == NULL)
4026 ops->to_post_startup_inferior = delegate_post_startup_inferior;
5958ebeb
TT
4027 if (ops->to_insert_fork_catchpoint == NULL)
4028 ops->to_insert_fork_catchpoint = delegate_insert_fork_catchpoint;
e1a21fb7
TT
4029 if (ops->to_remove_fork_catchpoint == NULL)
4030 ops->to_remove_fork_catchpoint = delegate_remove_fork_catchpoint;
7e18a8dc
TT
4031 if (ops->to_insert_vfork_catchpoint == NULL)
4032 ops->to_insert_vfork_catchpoint = delegate_insert_vfork_catchpoint;
95c3375e
TT
4033 if (ops->to_remove_vfork_catchpoint == NULL)
4034 ops->to_remove_vfork_catchpoint = delegate_remove_vfork_catchpoint;
098dba18
TT
4035 if (ops->to_follow_fork == NULL)
4036 ops->to_follow_fork = delegate_follow_fork;
62f64d7a
TT
4037 if (ops->to_insert_exec_catchpoint == NULL)
4038 ops->to_insert_exec_catchpoint = delegate_insert_exec_catchpoint;
cda0f38c
TT
4039 if (ops->to_remove_exec_catchpoint == NULL)
4040 ops->to_remove_exec_catchpoint = delegate_remove_exec_catchpoint;
6a9fa051
TT
4041 if (ops->to_set_syscall_catchpoint == NULL)
4042 ops->to_set_syscall_catchpoint = delegate_set_syscall_catchpoint;
0db88c1d
TT
4043 if (ops->to_has_exited == NULL)
4044 ops->to_has_exited = delegate_has_exited;
8d657035
TT
4045 if (ops->to_mourn_inferior == NULL)
4046 ops->to_mourn_inferior = delegate_mourn_inferior;
e88ef65c
TT
4047 if (ops->to_can_run == NULL)
4048 ops->to_can_run = delegate_can_run;
035cad7f
TT
4049 if (ops->to_pass_signals == NULL)
4050 ops->to_pass_signals = delegate_pass_signals;
7d4f8efa
TT
4051 if (ops->to_program_signals == NULL)
4052 ops->to_program_signals = delegate_program_signals;
cbffc065
TT
4053 if (ops->to_thread_alive == NULL)
4054 ops->to_thread_alive = delegate_thread_alive;
e8032dde
PA
4055 if (ops->to_update_thread_list == NULL)
4056 ops->to_update_thread_list = delegate_update_thread_list;
770234d3
TT
4057 if (ops->to_pid_to_str == NULL)
4058 ops->to_pid_to_str = delegate_pid_to_str;
4a7e6dda
TT
4059 if (ops->to_extra_thread_info == NULL)
4060 ops->to_extra_thread_info = delegate_extra_thread_info;
825828fc
TT
4061 if (ops->to_thread_name == NULL)
4062 ops->to_thread_name = delegate_thread_name;
46ee7e8d
TT
4063 if (ops->to_stop == NULL)
4064 ops->to_stop = delegate_stop;
bfedc46a
PA
4065 if (ops->to_interrupt == NULL)
4066 ops->to_interrupt = delegate_interrupt;
abc56d60
PA
4067 if (ops->to_check_pending_interrupt == NULL)
4068 ops->to_check_pending_interrupt = delegate_check_pending_interrupt;
a53f3625
TT
4069 if (ops->to_rcmd == NULL)
4070 ops->to_rcmd = delegate_rcmd;
830ca330
TT
4071 if (ops->to_pid_to_exec_file == NULL)
4072 ops->to_pid_to_exec_file = delegate_pid_to_exec_file;
d9cb0195
TT
4073 if (ops->to_log_command == NULL)
4074 ops->to_log_command = delegate_log_command;
7e35c012
TT
4075 if (ops->to_get_section_table == NULL)
4076 ops->to_get_section_table = delegate_get_section_table;
6b84065d
TT
4077 if (ops->to_can_async_p == NULL)
4078 ops->to_can_async_p = delegate_can_async_p;
4079 if (ops->to_is_async_p == NULL)
4080 ops->to_is_async_p = delegate_is_async_p;
4081 if (ops->to_async == NULL)
4082 ops->to_async = delegate_async;
b3ccfe11
TT
4083 if (ops->to_supports_non_stop == NULL)
4084 ops->to_supports_non_stop = delegate_supports_non_stop;
fbea99ea
PA
4085 if (ops->to_always_non_stop_p == NULL)
4086 ops->to_always_non_stop_p = delegate_always_non_stop_p;
0b5a2719
TT
4087 if (ops->to_find_memory_regions == NULL)
4088 ops->to_find_memory_regions = delegate_find_memory_regions;
16f796b1
TT
4089 if (ops->to_make_corefile_notes == NULL)
4090 ops->to_make_corefile_notes = delegate_make_corefile_notes;
3dbafbbb
TT
4091 if (ops->to_get_bookmark == NULL)
4092 ops->to_get_bookmark = delegate_get_bookmark;
9bb9d61d
TT
4093 if (ops->to_goto_bookmark == NULL)
4094 ops->to_goto_bookmark = delegate_goto_bookmark;
f0f9ff95
TT
4095 if (ops->to_get_thread_local_address == NULL)
4096 ops->to_get_thread_local_address = delegate_get_thread_local_address;
6b84065d
TT
4097 if (ops->to_xfer_partial == NULL)
4098 ops->to_xfer_partial = delegate_xfer_partial;
6b2c5a57
TT
4099 if (ops->to_memory_map == NULL)
4100 ops->to_memory_map = delegate_memory_map;
e8a6c6ac
TT
4101 if (ops->to_flash_erase == NULL)
4102 ops->to_flash_erase = delegate_flash_erase;
f6fb2925
TT
4103 if (ops->to_flash_done == NULL)
4104 ops->to_flash_done = delegate_flash_done;
2117c711
TT
4105 if (ops->to_read_description == NULL)
4106 ops->to_read_description = delegate_read_description;
4229b31d
TT
4107 if (ops->to_get_ada_task_ptid == NULL)
4108 ops->to_get_ada_task_ptid = delegate_get_ada_task_ptid;
8de71aab
TT
4109 if (ops->to_auxv_parse == NULL)
4110 ops->to_auxv_parse = delegate_auxv_parse;
58a5184e
TT
4111 if (ops->to_search_memory == NULL)
4112 ops->to_search_memory = delegate_search_memory;
53e1cfc7
TT
4113 if (ops->to_can_execute_reverse == NULL)
4114 ops->to_can_execute_reverse = delegate_can_execute_reverse;
fe31bf5b
TT
4115 if (ops->to_execution_direction == NULL)
4116 ops->to_execution_direction = delegate_execution_direction;
a7304748
TT
4117 if (ops->to_supports_multi_process == NULL)
4118 ops->to_supports_multi_process = delegate_supports_multi_process;
aab1b22d
TT
4119 if (ops->to_supports_enable_disable_tracepoint == NULL)
4120 ops->to_supports_enable_disable_tracepoint = delegate_supports_enable_disable_tracepoint;
9409d39e
TT
4121 if (ops->to_supports_string_tracing == NULL)
4122 ops->to_supports_string_tracing = delegate_supports_string_tracing;
ccfde2a0
TT
4123 if (ops->to_supports_evaluation_of_breakpoint_conditions == NULL)
4124 ops->to_supports_evaluation_of_breakpoint_conditions = delegate_supports_evaluation_of_breakpoint_conditions;
843f59ed
TT
4125 if (ops->to_can_run_breakpoint_commands == NULL)
4126 ops->to_can_run_breakpoint_commands = delegate_can_run_breakpoint_commands;
43eba180
TT
4127 if (ops->to_thread_architecture == NULL)
4128 ops->to_thread_architecture = delegate_thread_architecture;
8eaff7cd
TT
4129 if (ops->to_thread_address_space == NULL)
4130 ops->to_thread_address_space = delegate_thread_address_space;
4bd7dc42
GB
4131 if (ops->to_filesystem_is_local == NULL)
4132 ops->to_filesystem_is_local = delegate_filesystem_is_local;
5536135b
TT
4133 if (ops->to_trace_init == NULL)
4134 ops->to_trace_init = delegate_trace_init;
9a980a22
TT
4135 if (ops->to_download_tracepoint == NULL)
4136 ops->to_download_tracepoint = delegate_download_tracepoint;
719acc4a
TT
4137 if (ops->to_can_download_tracepoint == NULL)
4138 ops->to_can_download_tracepoint = delegate_can_download_tracepoint;
94eb98b9
TT
4139 if (ops->to_download_trace_state_variable == NULL)
4140 ops->to_download_trace_state_variable = delegate_download_trace_state_variable;
151f70f1
TT
4141 if (ops->to_enable_tracepoint == NULL)
4142 ops->to_enable_tracepoint = delegate_enable_tracepoint;
05c41993
TT
4143 if (ops->to_disable_tracepoint == NULL)
4144 ops->to_disable_tracepoint = delegate_disable_tracepoint;
86dd181d
TT
4145 if (ops->to_trace_set_readonly_regions == NULL)
4146 ops->to_trace_set_readonly_regions = delegate_trace_set_readonly_regions;
25da2e80
TT
4147 if (ops->to_trace_start == NULL)
4148 ops->to_trace_start = delegate_trace_start;
4072d4ff
TT
4149 if (ops->to_get_trace_status == NULL)
4150 ops->to_get_trace_status = delegate_get_trace_status;
6fea14cd
TT
4151 if (ops->to_get_tracepoint_status == NULL)
4152 ops->to_get_tracepoint_status = delegate_get_tracepoint_status;
e51c07ea
TT
4153 if (ops->to_trace_stop == NULL)
4154 ops->to_trace_stop = delegate_trace_stop;
afc94e66
TT
4155 if (ops->to_trace_find == NULL)
4156 ops->to_trace_find = delegate_trace_find;
959bcd0b
TT
4157 if (ops->to_get_trace_state_variable_value == NULL)
4158 ops->to_get_trace_state_variable_value = delegate_get_trace_state_variable_value;
a2e6c147
TT
4159 if (ops->to_save_trace_data == NULL)
4160 ops->to_save_trace_data = delegate_save_trace_data;
1e949b00
TT
4161 if (ops->to_upload_tracepoints == NULL)
4162 ops->to_upload_tracepoints = delegate_upload_tracepoints;
08120467
TT
4163 if (ops->to_upload_trace_state_variables == NULL)
4164 ops->to_upload_trace_state_variables = delegate_upload_trace_state_variables;
ace92e7d
TT
4165 if (ops->to_get_raw_trace_data == NULL)
4166 ops->to_get_raw_trace_data = delegate_get_raw_trace_data;
9249843f
TT
4167 if (ops->to_get_min_fast_tracepoint_insn_len == NULL)
4168 ops->to_get_min_fast_tracepoint_insn_len = delegate_get_min_fast_tracepoint_insn_len;
0bcfeddf
TT
4169 if (ops->to_set_disconnected_tracing == NULL)
4170 ops->to_set_disconnected_tracing = delegate_set_disconnected_tracing;
8d526939
TT
4171 if (ops->to_set_circular_trace_buffer == NULL)
4172 ops->to_set_circular_trace_buffer = delegate_set_circular_trace_buffer;
91df8d1d
TT
4173 if (ops->to_set_trace_buffer_size == NULL)
4174 ops->to_set_trace_buffer_size = delegate_set_trace_buffer_size;
8586ccaa
TT
4175 if (ops->to_set_trace_notes == NULL)
4176 ops->to_set_trace_notes = delegate_set_trace_notes;
9e538d0d
TT
4177 if (ops->to_core_of_thread == NULL)
4178 ops->to_core_of_thread = delegate_core_of_thread;
eb276a6b
TT
4179 if (ops->to_verify_memory == NULL)
4180 ops->to_verify_memory = delegate_verify_memory;
22bcceee
TT
4181 if (ops->to_get_tib_address == NULL)
4182 ops->to_get_tib_address = delegate_get_tib_address;
dcd6917f
TT
4183 if (ops->to_set_permissions == NULL)
4184 ops->to_set_permissions = delegate_set_permissions;
4c3e4425
TT
4185 if (ops->to_static_tracepoint_marker_at == NULL)
4186 ops->to_static_tracepoint_marker_at = delegate_static_tracepoint_marker_at;
d6522a22
TT
4187 if (ops->to_static_tracepoint_markers_by_strid == NULL)
4188 ops->to_static_tracepoint_markers_by_strid = delegate_static_tracepoint_markers_by_strid;
92155eeb
TT
4189 if (ops->to_traceframe_info == NULL)
4190 ops->to_traceframe_info = delegate_traceframe_info;
d9db5b21
TT
4191 if (ops->to_use_agent == NULL)
4192 ops->to_use_agent = delegate_use_agent;
9a7d8b48
TT
4193 if (ops->to_can_use_agent == NULL)
4194 ops->to_can_use_agent = delegate_can_use_agent;
46917d26
TT
4195 if (ops->to_supports_btrace == NULL)
4196 ops->to_supports_btrace = delegate_supports_btrace;
6dc7fcf4
TT
4197 if (ops->to_enable_btrace == NULL)
4198 ops->to_enable_btrace = delegate_enable_btrace;
8dc292d3
TT
4199 if (ops->to_disable_btrace == NULL)
4200 ops->to_disable_btrace = delegate_disable_btrace;
9ace480d
TT
4201 if (ops->to_teardown_btrace == NULL)
4202 ops->to_teardown_btrace = delegate_teardown_btrace;
eb5b20d4
TT
4203 if (ops->to_read_btrace == NULL)
4204 ops->to_read_btrace = delegate_read_btrace;
f4abbc16
MM
4205 if (ops->to_btrace_conf == NULL)
4206 ops->to_btrace_conf = delegate_btrace_conf;
ee97f592
TT
4207 if (ops->to_stop_recording == NULL)
4208 ops->to_stop_recording = delegate_stop_recording;
a432721e
TT
4209 if (ops->to_info_record == NULL)
4210 ops->to_info_record = delegate_info_record;
f09e2107
TT
4211 if (ops->to_save_record == NULL)
4212 ops->to_save_record = delegate_save_record;
07366925
TT
4213 if (ops->to_delete_record == NULL)
4214 ops->to_delete_record = delegate_delete_record;
dd2e9d25
TT
4215 if (ops->to_record_is_replaying == NULL)
4216 ops->to_record_is_replaying = delegate_record_is_replaying;
671e76cc
TT
4217 if (ops->to_goto_record_begin == NULL)
4218 ops->to_goto_record_begin = delegate_goto_record_begin;
e9179bb3
TT
4219 if (ops->to_goto_record_end == NULL)
4220 ops->to_goto_record_end = delegate_goto_record_end;
05969c84
TT
4221 if (ops->to_goto_record == NULL)
4222 ops->to_goto_record = delegate_goto_record;
3679abfa
TT
4223 if (ops->to_insn_history == NULL)
4224 ops->to_insn_history = delegate_insn_history;
8444ab58
TT
4225 if (ops->to_insn_history_from == NULL)
4226 ops->to_insn_history_from = delegate_insn_history_from;
c29302cc
TT
4227 if (ops->to_insn_history_range == NULL)
4228 ops->to_insn_history_range = delegate_insn_history_range;
170049d4
TT
4229 if (ops->to_call_history == NULL)
4230 ops->to_call_history = delegate_call_history;
16fc27d6
TT
4231 if (ops->to_call_history_from == NULL)
4232 ops->to_call_history_from = delegate_call_history_from;
115d9817
TT
4233 if (ops->to_call_history_range == NULL)
4234 ops->to_call_history_range = delegate_call_history_range;
0de91722
TT
4235 if (ops->to_augmented_libraries_svr4_read == NULL)
4236 ops->to_augmented_libraries_svr4_read = delegate_augmented_libraries_svr4_read;
ac01945b
TT
4237 if (ops->to_get_unwinder == NULL)
4238 ops->to_get_unwinder = delegate_get_unwinder;
4239 if (ops->to_get_tailcall_unwinder == NULL)
4240 ops->to_get_tailcall_unwinder = delegate_get_tailcall_unwinder;
5fff78c4
MM
4241 if (ops->to_prepare_to_generate_core == NULL)
4242 ops->to_prepare_to_generate_core = delegate_prepare_to_generate_core;
4243 if (ops->to_done_generating_core == NULL)
4244 ops->to_done_generating_core = delegate_done_generating_core;
1101cb7b
TT
4245}
4246
4247static void
4248install_dummy_methods (struct target_ops *ops)
4249{
bebd3233 4250 ops->to_post_attach = tdefault_post_attach;
09da0d0a 4251 ops->to_detach = tdefault_detach;
86a0854a 4252 ops->to_disconnect = tdefault_disconnect;
6b84065d
TT
4253 ops->to_resume = tdefault_resume;
4254 ops->to_wait = tdefault_wait;
ad5989bd 4255 ops->to_fetch_registers = tdefault_fetch_registers;
6b84065d 4256 ops->to_store_registers = tdefault_store_registers;
6c628163 4257 ops->to_prepare_to_store = tdefault_prepare_to_store;
f86e59b2 4258 ops->to_files_info = tdefault_files_info;
6b84065d
TT
4259 ops->to_insert_breakpoint = memory_insert_breakpoint;
4260 ops->to_remove_breakpoint = memory_remove_breakpoint;
1cf4d951
PA
4261 ops->to_stopped_by_sw_breakpoint = tdefault_stopped_by_sw_breakpoint;
4262 ops->to_supports_stopped_by_sw_breakpoint = tdefault_supports_stopped_by_sw_breakpoint;
4263 ops->to_stopped_by_hw_breakpoint = tdefault_stopped_by_hw_breakpoint;
4264 ops->to_supports_stopped_by_hw_breakpoint = tdefault_supports_stopped_by_hw_breakpoint;
52b51d06 4265 ops->to_can_use_hw_breakpoint = tdefault_can_use_hw_breakpoint;
a134316b 4266 ops->to_ranged_break_num_registers = tdefault_ranged_break_num_registers;
61b371f9 4267 ops->to_insert_hw_breakpoint = tdefault_insert_hw_breakpoint;
418dabac 4268 ops->to_remove_hw_breakpoint = tdefault_remove_hw_breakpoint;
61dd109f 4269 ops->to_remove_watchpoint = tdefault_remove_watchpoint;
016facd4 4270 ops->to_insert_watchpoint = tdefault_insert_watchpoint;
cd4ae029 4271 ops->to_insert_mask_watchpoint = tdefault_insert_mask_watchpoint;
8b1c364c 4272 ops->to_remove_mask_watchpoint = tdefault_remove_mask_watchpoint;
6b84065d
TT
4273 ops->to_stopped_by_watchpoint = tdefault_stopped_by_watchpoint;
4274 ops->to_stopped_data_address = tdefault_stopped_data_address;
65f160a9 4275 ops->to_watchpoint_addr_within_range = default_watchpoint_addr_within_range;
d03655e4 4276 ops->to_region_ok_for_hw_watchpoint = default_region_ok_for_hw_watchpoint;
77cdffe9 4277 ops->to_can_accel_watchpoint_condition = tdefault_can_accel_watchpoint_condition;
6c7e5e5c 4278 ops->to_masked_watch_num_registers = tdefault_masked_watch_num_registers;
0343661d 4279 ops->to_terminal_init = tdefault_terminal_init;
ddeaacc9 4280 ops->to_terminal_inferior = tdefault_terminal_inferior;
74fcbef9 4281 ops->to_terminal_ours_for_output = tdefault_terminal_ours_for_output;
e4a733f1 4282 ops->to_terminal_ours = tdefault_terminal_ours;
e19e919f 4283 ops->to_terminal_info = default_terminal_info;
423a4807 4284 ops->to_kill = tdefault_kill;
7634da87 4285 ops->to_load = tdefault_load;
340ba4bf 4286 ops->to_post_startup_inferior = tdefault_post_startup_inferior;
5958ebeb 4287 ops->to_insert_fork_catchpoint = tdefault_insert_fork_catchpoint;
e1a21fb7 4288 ops->to_remove_fork_catchpoint = tdefault_remove_fork_catchpoint;
7e18a8dc 4289 ops->to_insert_vfork_catchpoint = tdefault_insert_vfork_catchpoint;
95c3375e 4290 ops->to_remove_vfork_catchpoint = tdefault_remove_vfork_catchpoint;
098dba18 4291 ops->to_follow_fork = default_follow_fork;
62f64d7a 4292 ops->to_insert_exec_catchpoint = tdefault_insert_exec_catchpoint;
cda0f38c 4293 ops->to_remove_exec_catchpoint = tdefault_remove_exec_catchpoint;
6a9fa051 4294 ops->to_set_syscall_catchpoint = tdefault_set_syscall_catchpoint;
0db88c1d 4295 ops->to_has_exited = tdefault_has_exited;
8d657035 4296 ops->to_mourn_inferior = default_mourn_inferior;
e88ef65c 4297 ops->to_can_run = tdefault_can_run;
035cad7f 4298 ops->to_pass_signals = tdefault_pass_signals;
7d4f8efa 4299 ops->to_program_signals = tdefault_program_signals;
cbffc065 4300 ops->to_thread_alive = tdefault_thread_alive;
e8032dde 4301 ops->to_update_thread_list = tdefault_update_thread_list;
770234d3 4302 ops->to_pid_to_str = default_pid_to_str;
4a7e6dda 4303 ops->to_extra_thread_info = tdefault_extra_thread_info;
825828fc 4304 ops->to_thread_name = tdefault_thread_name;
46ee7e8d 4305 ops->to_stop = tdefault_stop;
bfedc46a 4306 ops->to_interrupt = tdefault_interrupt;
abc56d60 4307 ops->to_check_pending_interrupt = tdefault_check_pending_interrupt;
a53f3625 4308 ops->to_rcmd = default_rcmd;
830ca330 4309 ops->to_pid_to_exec_file = tdefault_pid_to_exec_file;
d9cb0195 4310 ops->to_log_command = tdefault_log_command;
7e35c012 4311 ops->to_get_section_table = tdefault_get_section_table;
b3ccfe11
TT
4312 ops->to_can_async_p = tdefault_can_async_p;
4313 ops->to_is_async_p = tdefault_is_async_p;
6b84065d 4314 ops->to_async = tdefault_async;
b3ccfe11 4315 ops->to_supports_non_stop = tdefault_supports_non_stop;
fbea99ea 4316 ops->to_always_non_stop_p = tdefault_always_non_stop_p;
0b5a2719 4317 ops->to_find_memory_regions = dummy_find_memory_regions;
16f796b1 4318 ops->to_make_corefile_notes = dummy_make_corefile_notes;
3dbafbbb 4319 ops->to_get_bookmark = tdefault_get_bookmark;
9bb9d61d 4320 ops->to_goto_bookmark = tdefault_goto_bookmark;
f0f9ff95 4321 ops->to_get_thread_local_address = tdefault_get_thread_local_address;
6b84065d 4322 ops->to_xfer_partial = tdefault_xfer_partial;
6b2c5a57 4323 ops->to_memory_map = tdefault_memory_map;
e8a6c6ac 4324 ops->to_flash_erase = tdefault_flash_erase;
f6fb2925 4325 ops->to_flash_done = tdefault_flash_done;
2117c711 4326 ops->to_read_description = tdefault_read_description;
4229b31d 4327 ops->to_get_ada_task_ptid = default_get_ada_task_ptid;
8de71aab 4328 ops->to_auxv_parse = default_auxv_parse;
58a5184e 4329 ops->to_search_memory = default_search_memory;
53e1cfc7 4330 ops->to_can_execute_reverse = tdefault_can_execute_reverse;
fe31bf5b 4331 ops->to_execution_direction = default_execution_direction;
a7304748 4332 ops->to_supports_multi_process = tdefault_supports_multi_process;
aab1b22d 4333 ops->to_supports_enable_disable_tracepoint = tdefault_supports_enable_disable_tracepoint;
9409d39e 4334 ops->to_supports_string_tracing = tdefault_supports_string_tracing;
ccfde2a0 4335 ops->to_supports_evaluation_of_breakpoint_conditions = tdefault_supports_evaluation_of_breakpoint_conditions;
843f59ed 4336 ops->to_can_run_breakpoint_commands = tdefault_can_run_breakpoint_commands;
43eba180 4337 ops->to_thread_architecture = default_thread_architecture;
8eaff7cd 4338 ops->to_thread_address_space = default_thread_address_space;
4bd7dc42 4339 ops->to_filesystem_is_local = tdefault_filesystem_is_local;
5536135b 4340 ops->to_trace_init = tdefault_trace_init;
9a980a22 4341 ops->to_download_tracepoint = tdefault_download_tracepoint;
719acc4a 4342 ops->to_can_download_tracepoint = tdefault_can_download_tracepoint;
94eb98b9 4343 ops->to_download_trace_state_variable = tdefault_download_trace_state_variable;
151f70f1 4344 ops->to_enable_tracepoint = tdefault_enable_tracepoint;
05c41993 4345 ops->to_disable_tracepoint = tdefault_disable_tracepoint;
86dd181d 4346 ops->to_trace_set_readonly_regions = tdefault_trace_set_readonly_regions;
25da2e80 4347 ops->to_trace_start = tdefault_trace_start;
4072d4ff 4348 ops->to_get_trace_status = tdefault_get_trace_status;
6fea14cd 4349 ops->to_get_tracepoint_status = tdefault_get_tracepoint_status;
e51c07ea 4350 ops->to_trace_stop = tdefault_trace_stop;
afc94e66 4351 ops->to_trace_find = tdefault_trace_find;
959bcd0b 4352 ops->to_get_trace_state_variable_value = tdefault_get_trace_state_variable_value;
a2e6c147 4353 ops->to_save_trace_data = tdefault_save_trace_data;
1e949b00 4354 ops->to_upload_tracepoints = tdefault_upload_tracepoints;
08120467 4355 ops->to_upload_trace_state_variables = tdefault_upload_trace_state_variables;
ace92e7d 4356 ops->to_get_raw_trace_data = tdefault_get_raw_trace_data;
9249843f 4357 ops->to_get_min_fast_tracepoint_insn_len = tdefault_get_min_fast_tracepoint_insn_len;
0bcfeddf 4358 ops->to_set_disconnected_tracing = tdefault_set_disconnected_tracing;
8d526939 4359 ops->to_set_circular_trace_buffer = tdefault_set_circular_trace_buffer;
91df8d1d 4360 ops->to_set_trace_buffer_size = tdefault_set_trace_buffer_size;
8586ccaa 4361 ops->to_set_trace_notes = tdefault_set_trace_notes;
9e538d0d 4362 ops->to_core_of_thread = tdefault_core_of_thread;
936d2992 4363 ops->to_verify_memory = default_verify_memory;
22bcceee 4364 ops->to_get_tib_address = tdefault_get_tib_address;
dcd6917f 4365 ops->to_set_permissions = tdefault_set_permissions;
4c3e4425 4366 ops->to_static_tracepoint_marker_at = tdefault_static_tracepoint_marker_at;
d6522a22 4367 ops->to_static_tracepoint_markers_by_strid = tdefault_static_tracepoint_markers_by_strid;
92155eeb 4368 ops->to_traceframe_info = tdefault_traceframe_info;
d9db5b21 4369 ops->to_use_agent = tdefault_use_agent;
9a7d8b48 4370 ops->to_can_use_agent = tdefault_can_use_agent;
46917d26 4371 ops->to_supports_btrace = tdefault_supports_btrace;
6dc7fcf4 4372 ops->to_enable_btrace = tdefault_enable_btrace;
8dc292d3 4373 ops->to_disable_btrace = tdefault_disable_btrace;
9ace480d 4374 ops->to_teardown_btrace = tdefault_teardown_btrace;
eb5b20d4 4375 ops->to_read_btrace = tdefault_read_btrace;
f4abbc16 4376 ops->to_btrace_conf = tdefault_btrace_conf;
ee97f592 4377 ops->to_stop_recording = tdefault_stop_recording;
a432721e 4378 ops->to_info_record = tdefault_info_record;
f09e2107 4379 ops->to_save_record = tdefault_save_record;
07366925 4380 ops->to_delete_record = tdefault_delete_record;
dd2e9d25 4381 ops->to_record_is_replaying = tdefault_record_is_replaying;
671e76cc 4382 ops->to_goto_record_begin = tdefault_goto_record_begin;
e9179bb3 4383 ops->to_goto_record_end = tdefault_goto_record_end;
05969c84 4384 ops->to_goto_record = tdefault_goto_record;
3679abfa 4385 ops->to_insn_history = tdefault_insn_history;
8444ab58 4386 ops->to_insn_history_from = tdefault_insn_history_from;
c29302cc 4387 ops->to_insn_history_range = tdefault_insn_history_range;
170049d4 4388 ops->to_call_history = tdefault_call_history;
16fc27d6 4389 ops->to_call_history_from = tdefault_call_history_from;
115d9817 4390 ops->to_call_history_range = tdefault_call_history_range;
0de91722 4391 ops->to_augmented_libraries_svr4_read = tdefault_augmented_libraries_svr4_read;
ac01945b
TT
4392 ops->to_get_unwinder = tdefault_get_unwinder;
4393 ops->to_get_tailcall_unwinder = tdefault_get_tailcall_unwinder;
5fff78c4
MM
4394 ops->to_prepare_to_generate_core = tdefault_prepare_to_generate_core;
4395 ops->to_done_generating_core = tdefault_done_generating_core;
1101cb7b 4396}
a7068b60
TT
4397
4398static void
4399init_debug_target (struct target_ops *ops)
4400{
4401 ops->to_post_attach = debug_post_attach;
4402 ops->to_detach = debug_detach;
4403 ops->to_disconnect = debug_disconnect;
4404 ops->to_resume = debug_resume;
4405 ops->to_wait = debug_wait;
4406 ops->to_fetch_registers = debug_fetch_registers;
4407 ops->to_store_registers = debug_store_registers;
4408 ops->to_prepare_to_store = debug_prepare_to_store;
4409 ops->to_files_info = debug_files_info;
4410 ops->to_insert_breakpoint = debug_insert_breakpoint;
4411 ops->to_remove_breakpoint = debug_remove_breakpoint;
1cf4d951
PA
4412 ops->to_stopped_by_sw_breakpoint = debug_stopped_by_sw_breakpoint;
4413 ops->to_supports_stopped_by_sw_breakpoint = debug_supports_stopped_by_sw_breakpoint;
4414 ops->to_stopped_by_hw_breakpoint = debug_stopped_by_hw_breakpoint;
4415 ops->to_supports_stopped_by_hw_breakpoint = debug_supports_stopped_by_hw_breakpoint;
a7068b60
TT
4416 ops->to_can_use_hw_breakpoint = debug_can_use_hw_breakpoint;
4417 ops->to_ranged_break_num_registers = debug_ranged_break_num_registers;
4418 ops->to_insert_hw_breakpoint = debug_insert_hw_breakpoint;
4419 ops->to_remove_hw_breakpoint = debug_remove_hw_breakpoint;
4420 ops->to_remove_watchpoint = debug_remove_watchpoint;
4421 ops->to_insert_watchpoint = debug_insert_watchpoint;
4422 ops->to_insert_mask_watchpoint = debug_insert_mask_watchpoint;
4423 ops->to_remove_mask_watchpoint = debug_remove_mask_watchpoint;
4424 ops->to_stopped_by_watchpoint = debug_stopped_by_watchpoint;
4425 ops->to_stopped_data_address = debug_stopped_data_address;
4426 ops->to_watchpoint_addr_within_range = debug_watchpoint_addr_within_range;
4427 ops->to_region_ok_for_hw_watchpoint = debug_region_ok_for_hw_watchpoint;
4428 ops->to_can_accel_watchpoint_condition = debug_can_accel_watchpoint_condition;
4429 ops->to_masked_watch_num_registers = debug_masked_watch_num_registers;
4430 ops->to_terminal_init = debug_terminal_init;
4431 ops->to_terminal_inferior = debug_terminal_inferior;
4432 ops->to_terminal_ours_for_output = debug_terminal_ours_for_output;
4433 ops->to_terminal_ours = debug_terminal_ours;
a7068b60
TT
4434 ops->to_terminal_info = debug_terminal_info;
4435 ops->to_kill = debug_kill;
4436 ops->to_load = debug_load;
4437 ops->to_post_startup_inferior = debug_post_startup_inferior;
4438 ops->to_insert_fork_catchpoint = debug_insert_fork_catchpoint;
4439 ops->to_remove_fork_catchpoint = debug_remove_fork_catchpoint;
4440 ops->to_insert_vfork_catchpoint = debug_insert_vfork_catchpoint;
4441 ops->to_remove_vfork_catchpoint = debug_remove_vfork_catchpoint;
4442 ops->to_follow_fork = debug_follow_fork;
4443 ops->to_insert_exec_catchpoint = debug_insert_exec_catchpoint;
4444 ops->to_remove_exec_catchpoint = debug_remove_exec_catchpoint;
4445 ops->to_set_syscall_catchpoint = debug_set_syscall_catchpoint;
4446 ops->to_has_exited = debug_has_exited;
4447 ops->to_mourn_inferior = debug_mourn_inferior;
4448 ops->to_can_run = debug_can_run;
4449 ops->to_pass_signals = debug_pass_signals;
4450 ops->to_program_signals = debug_program_signals;
4451 ops->to_thread_alive = debug_thread_alive;
e8032dde 4452 ops->to_update_thread_list = debug_update_thread_list;
a7068b60
TT
4453 ops->to_pid_to_str = debug_pid_to_str;
4454 ops->to_extra_thread_info = debug_extra_thread_info;
4455 ops->to_thread_name = debug_thread_name;
4456 ops->to_stop = debug_stop;
bfedc46a 4457 ops->to_interrupt = debug_interrupt;
abc56d60 4458 ops->to_check_pending_interrupt = debug_check_pending_interrupt;
a7068b60
TT
4459 ops->to_rcmd = debug_rcmd;
4460 ops->to_pid_to_exec_file = debug_pid_to_exec_file;
4461 ops->to_log_command = debug_log_command;
4462 ops->to_get_section_table = debug_get_section_table;
4463 ops->to_can_async_p = debug_can_async_p;
4464 ops->to_is_async_p = debug_is_async_p;
4465 ops->to_async = debug_async;
4466 ops->to_supports_non_stop = debug_supports_non_stop;
fbea99ea 4467 ops->to_always_non_stop_p = debug_always_non_stop_p;
a7068b60
TT
4468 ops->to_find_memory_regions = debug_find_memory_regions;
4469 ops->to_make_corefile_notes = debug_make_corefile_notes;
4470 ops->to_get_bookmark = debug_get_bookmark;
4471 ops->to_goto_bookmark = debug_goto_bookmark;
4472 ops->to_get_thread_local_address = debug_get_thread_local_address;
4473 ops->to_xfer_partial = debug_xfer_partial;
4474 ops->to_memory_map = debug_memory_map;
4475 ops->to_flash_erase = debug_flash_erase;
4476 ops->to_flash_done = debug_flash_done;
4477 ops->to_read_description = debug_read_description;
4478 ops->to_get_ada_task_ptid = debug_get_ada_task_ptid;
4479 ops->to_auxv_parse = debug_auxv_parse;
4480 ops->to_search_memory = debug_search_memory;
4481 ops->to_can_execute_reverse = debug_can_execute_reverse;
4482 ops->to_execution_direction = debug_execution_direction;
4483 ops->to_supports_multi_process = debug_supports_multi_process;
4484 ops->to_supports_enable_disable_tracepoint = debug_supports_enable_disable_tracepoint;
4485 ops->to_supports_string_tracing = debug_supports_string_tracing;
4486 ops->to_supports_evaluation_of_breakpoint_conditions = debug_supports_evaluation_of_breakpoint_conditions;
4487 ops->to_can_run_breakpoint_commands = debug_can_run_breakpoint_commands;
4488 ops->to_thread_architecture = debug_thread_architecture;
4489 ops->to_thread_address_space = debug_thread_address_space;
4bd7dc42 4490 ops->to_filesystem_is_local = debug_filesystem_is_local;
a7068b60
TT
4491 ops->to_trace_init = debug_trace_init;
4492 ops->to_download_tracepoint = debug_download_tracepoint;
4493 ops->to_can_download_tracepoint = debug_can_download_tracepoint;
4494 ops->to_download_trace_state_variable = debug_download_trace_state_variable;
4495 ops->to_enable_tracepoint = debug_enable_tracepoint;
4496 ops->to_disable_tracepoint = debug_disable_tracepoint;
4497 ops->to_trace_set_readonly_regions = debug_trace_set_readonly_regions;
4498 ops->to_trace_start = debug_trace_start;
4499 ops->to_get_trace_status = debug_get_trace_status;
4500 ops->to_get_tracepoint_status = debug_get_tracepoint_status;
4501 ops->to_trace_stop = debug_trace_stop;
4502 ops->to_trace_find = debug_trace_find;
4503 ops->to_get_trace_state_variable_value = debug_get_trace_state_variable_value;
4504 ops->to_save_trace_data = debug_save_trace_data;
4505 ops->to_upload_tracepoints = debug_upload_tracepoints;
4506 ops->to_upload_trace_state_variables = debug_upload_trace_state_variables;
4507 ops->to_get_raw_trace_data = debug_get_raw_trace_data;
4508 ops->to_get_min_fast_tracepoint_insn_len = debug_get_min_fast_tracepoint_insn_len;
4509 ops->to_set_disconnected_tracing = debug_set_disconnected_tracing;
4510 ops->to_set_circular_trace_buffer = debug_set_circular_trace_buffer;
4511 ops->to_set_trace_buffer_size = debug_set_trace_buffer_size;
4512 ops->to_set_trace_notes = debug_set_trace_notes;
4513 ops->to_core_of_thread = debug_core_of_thread;
4514 ops->to_verify_memory = debug_verify_memory;
4515 ops->to_get_tib_address = debug_get_tib_address;
4516 ops->to_set_permissions = debug_set_permissions;
4517 ops->to_static_tracepoint_marker_at = debug_static_tracepoint_marker_at;
4518 ops->to_static_tracepoint_markers_by_strid = debug_static_tracepoint_markers_by_strid;
4519 ops->to_traceframe_info = debug_traceframe_info;
4520 ops->to_use_agent = debug_use_agent;
4521 ops->to_can_use_agent = debug_can_use_agent;
4522 ops->to_supports_btrace = debug_supports_btrace;
4523 ops->to_enable_btrace = debug_enable_btrace;
4524 ops->to_disable_btrace = debug_disable_btrace;
4525 ops->to_teardown_btrace = debug_teardown_btrace;
4526 ops->to_read_btrace = debug_read_btrace;
f4abbc16 4527 ops->to_btrace_conf = debug_btrace_conf;
a7068b60
TT
4528 ops->to_stop_recording = debug_stop_recording;
4529 ops->to_info_record = debug_info_record;
4530 ops->to_save_record = debug_save_record;
4531 ops->to_delete_record = debug_delete_record;
4532 ops->to_record_is_replaying = debug_record_is_replaying;
4533 ops->to_goto_record_begin = debug_goto_record_begin;
4534 ops->to_goto_record_end = debug_goto_record_end;
4535 ops->to_goto_record = debug_goto_record;
4536 ops->to_insn_history = debug_insn_history;
4537 ops->to_insn_history_from = debug_insn_history_from;
4538 ops->to_insn_history_range = debug_insn_history_range;
4539 ops->to_call_history = debug_call_history;
4540 ops->to_call_history_from = debug_call_history_from;
4541 ops->to_call_history_range = debug_call_history_range;
4542 ops->to_augmented_libraries_svr4_read = debug_augmented_libraries_svr4_read;
4543 ops->to_get_unwinder = debug_get_unwinder;
4544 ops->to_get_tailcall_unwinder = debug_get_tailcall_unwinder;
a7068b60
TT
4545 ops->to_prepare_to_generate_core = debug_prepare_to_generate_core;
4546 ops->to_done_generating_core = debug_done_generating_core;
4547}
This page took 0.430713 seconds and 4 git commands to generate.