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