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