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