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