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