| 1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
| 2 | |
| 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
| 4 | Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
| 5 | |
| 6 | This file is part of GDB. |
| 7 | |
| 8 | This program is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by |
| 10 | the Free Software Foundation; either version 2 of the License, or |
| 11 | (at your option) any later version. |
| 12 | |
| 13 | This program is distributed in the hope that it will be useful, |
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | GNU General Public License for more details. |
| 17 | |
| 18 | You should have received a copy of the GNU General Public License |
| 19 | along with this program; if not, write to the Free Software |
| 20 | Foundation, Inc., 59 Temple Place - Suite 330, |
| 21 | Boston, MA 02111-1307, USA. */ |
| 22 | |
| 23 | /* This file was created with the aid of ``gdbarch.sh''. |
| 24 | |
| 25 | The Bourne shell script ``gdbarch.sh'' creates the files |
| 26 | ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them |
| 27 | against the existing ``gdbarch.[hc]''. Any differences found |
| 28 | being reported. |
| 29 | |
| 30 | If editing this file, please also run gdbarch.sh and merge any |
| 31 | changes into that script. Conversely, when making sweeping changes |
| 32 | to this file, modifying gdbarch.sh and using its output may prove |
| 33 | easier. */ |
| 34 | |
| 35 | |
| 36 | #include "defs.h" |
| 37 | #include "arch-utils.h" |
| 38 | |
| 39 | #if GDB_MULTI_ARCH |
| 40 | #include "gdbcmd.h" |
| 41 | #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */ |
| 42 | #else |
| 43 | /* Just include everything in sight so that the every old definition |
| 44 | of macro is visible. */ |
| 45 | #include "gdb_string.h" |
| 46 | #include <ctype.h> |
| 47 | #include "symtab.h" |
| 48 | #include "frame.h" |
| 49 | #include "inferior.h" |
| 50 | #include "breakpoint.h" |
| 51 | #include "gdb_wait.h" |
| 52 | #include "gdbcore.h" |
| 53 | #include "gdbcmd.h" |
| 54 | #include "target.h" |
| 55 | #include "gdbthread.h" |
| 56 | #include "annotate.h" |
| 57 | #include "symfile.h" /* for overlay functions */ |
| 58 | #include "value.h" /* For old tm.h/nm.h macros. */ |
| 59 | #endif |
| 60 | #include "symcat.h" |
| 61 | |
| 62 | #include "floatformat.h" |
| 63 | |
| 64 | #include "gdb_assert.h" |
| 65 | #include "gdb_string.h" |
| 66 | #include "gdb-events.h" |
| 67 | #include "reggroups.h" |
| 68 | |
| 69 | /* Static function declarations */ |
| 70 | |
| 71 | static void verify_gdbarch (struct gdbarch *gdbarch); |
| 72 | static void alloc_gdbarch_data (struct gdbarch *); |
| 73 | static void free_gdbarch_data (struct gdbarch *); |
| 74 | static void init_gdbarch_swap (struct gdbarch *); |
| 75 | static void clear_gdbarch_swap (struct gdbarch *); |
| 76 | static void swapout_gdbarch_swap (struct gdbarch *); |
| 77 | static void swapin_gdbarch_swap (struct gdbarch *); |
| 78 | |
| 79 | /* Non-zero if we want to trace architecture code. */ |
| 80 | |
| 81 | #ifndef GDBARCH_DEBUG |
| 82 | #define GDBARCH_DEBUG 0 |
| 83 | #endif |
| 84 | int gdbarch_debug = GDBARCH_DEBUG; |
| 85 | |
| 86 | |
| 87 | /* Maintain the struct gdbarch object */ |
| 88 | |
| 89 | struct gdbarch |
| 90 | { |
| 91 | /* Has this architecture been fully initialized? */ |
| 92 | int initialized_p; |
| 93 | /* basic architectural information */ |
| 94 | const struct bfd_arch_info * bfd_arch_info; |
| 95 | int byte_order; |
| 96 | |
| 97 | /* target specific vector. */ |
| 98 | struct gdbarch_tdep *tdep; |
| 99 | gdbarch_dump_tdep_ftype *dump_tdep; |
| 100 | |
| 101 | /* per-architecture data-pointers */ |
| 102 | unsigned nr_data; |
| 103 | void **data; |
| 104 | |
| 105 | /* per-architecture swap-regions */ |
| 106 | struct gdbarch_swap *swap; |
| 107 | |
| 108 | /* Multi-arch values. |
| 109 | |
| 110 | When extending this structure you must: |
| 111 | |
| 112 | Add the field below. |
| 113 | |
| 114 | Declare set/get functions and define the corresponding |
| 115 | macro in gdbarch.h. |
| 116 | |
| 117 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
| 118 | initialize the new field. |
| 119 | |
| 120 | verify_gdbarch(): Confirm that the target updated the field |
| 121 | correctly. |
| 122 | |
| 123 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
| 124 | field is dumped out |
| 125 | |
| 126 | ``startup_gdbarch()'': Append an initial value to the static |
| 127 | variable (base values on the host's c-type system). |
| 128 | |
| 129 | get_gdbarch(): Implement the set/get functions (probably using |
| 130 | the macro's as shortcuts). |
| 131 | |
| 132 | */ |
| 133 | |
| 134 | int short_bit; |
| 135 | int int_bit; |
| 136 | int long_bit; |
| 137 | int long_long_bit; |
| 138 | int float_bit; |
| 139 | int double_bit; |
| 140 | int long_double_bit; |
| 141 | int ptr_bit; |
| 142 | int addr_bit; |
| 143 | int bfd_vma_bit; |
| 144 | int char_signed; |
| 145 | gdbarch_read_pc_ftype *read_pc; |
| 146 | gdbarch_write_pc_ftype *write_pc; |
| 147 | gdbarch_read_fp_ftype *read_fp; |
| 148 | gdbarch_read_sp_ftype *read_sp; |
| 149 | gdbarch_write_sp_ftype *write_sp; |
| 150 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
| 151 | gdbarch_pseudo_register_read_ftype *pseudo_register_read; |
| 152 | gdbarch_pseudo_register_write_ftype *pseudo_register_write; |
| 153 | int num_regs; |
| 154 | int num_pseudo_regs; |
| 155 | int sp_regnum; |
| 156 | int fp_regnum; |
| 157 | int pc_regnum; |
| 158 | int ps_regnum; |
| 159 | int fp0_regnum; |
| 160 | int npc_regnum; |
| 161 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
| 162 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; |
| 163 | gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum; |
| 164 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; |
| 165 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; |
| 166 | gdbarch_register_name_ftype *register_name; |
| 167 | int register_size; |
| 168 | int register_bytes; |
| 169 | gdbarch_register_byte_ftype *register_byte; |
| 170 | gdbarch_register_raw_size_ftype *register_raw_size; |
| 171 | int max_register_raw_size; |
| 172 | gdbarch_register_virtual_size_ftype *register_virtual_size; |
| 173 | int max_register_virtual_size; |
| 174 | gdbarch_register_virtual_type_ftype *register_virtual_type; |
| 175 | gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info; |
| 176 | gdbarch_print_registers_info_ftype *print_registers_info; |
| 177 | gdbarch_print_float_info_ftype *print_float_info; |
| 178 | gdbarch_print_vector_info_ftype *print_vector_info; |
| 179 | gdbarch_register_sim_regno_ftype *register_sim_regno; |
| 180 | gdbarch_register_bytes_ok_ftype *register_bytes_ok; |
| 181 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; |
| 182 | gdbarch_cannot_store_register_ftype *cannot_store_register; |
| 183 | gdbarch_get_longjmp_target_ftype *get_longjmp_target; |
| 184 | int deprecated_use_generic_dummy_frames; |
| 185 | int call_dummy_location; |
| 186 | gdbarch_call_dummy_address_ftype *call_dummy_address; |
| 187 | CORE_ADDR call_dummy_start_offset; |
| 188 | CORE_ADDR call_dummy_breakpoint_offset; |
| 189 | int call_dummy_breakpoint_offset_p; |
| 190 | int call_dummy_length; |
| 191 | gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy; |
| 192 | int call_dummy_p; |
| 193 | LONGEST * call_dummy_words; |
| 194 | int sizeof_call_dummy_words; |
| 195 | int call_dummy_stack_adjust_p; |
| 196 | int call_dummy_stack_adjust; |
| 197 | gdbarch_fix_call_dummy_ftype *fix_call_dummy; |
| 198 | gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first; |
| 199 | gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc; |
| 200 | int believe_pcc_promotion; |
| 201 | int believe_pcc_promotion_type; |
| 202 | gdbarch_coerce_float_to_double_ftype *coerce_float_to_double; |
| 203 | gdbarch_get_saved_register_ftype *get_saved_register; |
| 204 | gdbarch_register_convertible_ftype *register_convertible; |
| 205 | gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual; |
| 206 | gdbarch_register_convert_to_raw_ftype *register_convert_to_raw; |
| 207 | gdbarch_convert_register_p_ftype *convert_register_p; |
| 208 | gdbarch_register_to_value_ftype *register_to_value; |
| 209 | gdbarch_value_to_register_ftype *value_to_register; |
| 210 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
| 211 | gdbarch_address_to_pointer_ftype *address_to_pointer; |
| 212 | gdbarch_integer_to_address_ftype *integer_to_address; |
| 213 | gdbarch_return_value_on_stack_ftype *return_value_on_stack; |
| 214 | gdbarch_push_arguments_ftype *push_arguments; |
| 215 | gdbarch_push_dummy_frame_ftype *push_dummy_frame; |
| 216 | gdbarch_push_return_address_ftype *push_return_address; |
| 217 | gdbarch_pop_frame_ftype *pop_frame; |
| 218 | gdbarch_store_struct_return_ftype *store_struct_return; |
| 219 | gdbarch_extract_return_value_ftype *extract_return_value; |
| 220 | gdbarch_store_return_value_ftype *store_return_value; |
| 221 | gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value; |
| 222 | gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value; |
| 223 | gdbarch_extract_struct_value_address_ftype *extract_struct_value_address; |
| 224 | gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address; |
| 225 | gdbarch_use_struct_convention_ftype *use_struct_convention; |
| 226 | gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs; |
| 227 | gdbarch_init_extra_frame_info_ftype *init_extra_frame_info; |
| 228 | gdbarch_skip_prologue_ftype *skip_prologue; |
| 229 | gdbarch_prologue_frameless_p_ftype *prologue_frameless_p; |
| 230 | gdbarch_inner_than_ftype *inner_than; |
| 231 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; |
| 232 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
| 233 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; |
| 234 | CORE_ADDR decr_pc_after_break; |
| 235 | gdbarch_prepare_to_proceed_ftype *prepare_to_proceed; |
| 236 | CORE_ADDR function_start_offset; |
| 237 | gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; |
| 238 | CORE_ADDR frame_args_skip; |
| 239 | gdbarch_frameless_function_invocation_ftype *frameless_function_invocation; |
| 240 | gdbarch_frame_chain_ftype *frame_chain; |
| 241 | gdbarch_frame_chain_valid_ftype *frame_chain_valid; |
| 242 | gdbarch_frame_saved_pc_ftype *frame_saved_pc; |
| 243 | gdbarch_frame_args_address_ftype *frame_args_address; |
| 244 | gdbarch_frame_locals_address_ftype *frame_locals_address; |
| 245 | gdbarch_saved_pc_after_call_ftype *saved_pc_after_call; |
| 246 | gdbarch_frame_num_args_ftype *frame_num_args; |
| 247 | gdbarch_stack_align_ftype *stack_align; |
| 248 | gdbarch_frame_align_ftype *frame_align; |
| 249 | int extra_stack_alignment_needed; |
| 250 | gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr; |
| 251 | gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos; |
| 252 | int parm_boundary; |
| 253 | const struct floatformat * float_format; |
| 254 | const struct floatformat * double_format; |
| 255 | const struct floatformat * long_double_format; |
| 256 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
| 257 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
| 258 | gdbarch_smash_text_address_ftype *smash_text_address; |
| 259 | gdbarch_software_single_step_ftype *software_single_step; |
| 260 | gdbarch_print_insn_ftype *print_insn; |
| 261 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
| 262 | gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; |
| 263 | gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; |
| 264 | gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp; |
| 265 | gdbarch_sigtramp_start_ftype *sigtramp_start; |
| 266 | gdbarch_sigtramp_end_ftype *sigtramp_end; |
| 267 | gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; |
| 268 | gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; |
| 269 | gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info; |
| 270 | gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; |
| 271 | gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; |
| 272 | const char * name_of_malloc; |
| 273 | int cannot_step_breakpoint; |
| 274 | int have_nonsteppable_watchpoint; |
| 275 | gdbarch_address_class_type_flags_ftype *address_class_type_flags; |
| 276 | gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name; |
| 277 | gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags; |
| 278 | gdbarch_register_reggroup_p_ftype *register_reggroup_p; |
| 279 | }; |
| 280 | |
| 281 | |
| 282 | /* The default architecture uses host values (for want of a better |
| 283 | choice). */ |
| 284 | |
| 285 | extern const struct bfd_arch_info bfd_default_arch_struct; |
| 286 | |
| 287 | struct gdbarch startup_gdbarch = |
| 288 | { |
| 289 | 1, /* Always initialized. */ |
| 290 | /* basic architecture information */ |
| 291 | &bfd_default_arch_struct, |
| 292 | BFD_ENDIAN_BIG, |
| 293 | /* target specific vector and its dump routine */ |
| 294 | NULL, NULL, |
| 295 | /*per-architecture data-pointers and swap regions */ |
| 296 | 0, NULL, NULL, |
| 297 | /* Multi-arch values */ |
| 298 | 8 * sizeof (short), |
| 299 | 8 * sizeof (int), |
| 300 | 8 * sizeof (long), |
| 301 | 8 * sizeof (LONGEST), |
| 302 | 8 * sizeof (float), |
| 303 | 8 * sizeof (double), |
| 304 | 8 * sizeof (long double), |
| 305 | 8 * sizeof (void*), |
| 306 | 8 * sizeof (void*), |
| 307 | 8 * sizeof (void*), |
| 308 | 1, |
| 309 | 0, |
| 310 | 0, |
| 311 | 0, |
| 312 | 0, |
| 313 | 0, |
| 314 | 0, |
| 315 | 0, |
| 316 | 0, |
| 317 | 0, |
| 318 | 0, |
| 319 | -1, |
| 320 | -1, |
| 321 | -1, |
| 322 | -1, |
| 323 | 0, |
| 324 | 0, |
| 325 | 0, |
| 326 | 0, |
| 327 | 0, |
| 328 | 0, |
| 329 | 0, |
| 330 | 0, |
| 331 | 0, |
| 332 | 0, |
| 333 | generic_register_byte, |
| 334 | generic_register_size, |
| 335 | 0, |
| 336 | generic_register_size, |
| 337 | 0, |
| 338 | 0, |
| 339 | 0, |
| 340 | default_print_registers_info, |
| 341 | 0, |
| 342 | 0, |
| 343 | 0, |
| 344 | 0, |
| 345 | 0, |
| 346 | 0, |
| 347 | 0, |
| 348 | 0, |
| 349 | 0, |
| 350 | 0, |
| 351 | 0, |
| 352 | 0, |
| 353 | 0, |
| 354 | 0, |
| 355 | generic_pc_in_call_dummy, |
| 356 | 0, |
| 357 | 0, |
| 358 | 0, |
| 359 | 0, |
| 360 | 0, |
| 361 | 0, |
| 362 | 0, |
| 363 | 0, |
| 364 | 0, |
| 365 | 0, |
| 366 | 0, |
| 367 | 0, |
| 368 | 0, |
| 369 | 0, |
| 370 | 0, |
| 371 | 0, |
| 372 | 0, |
| 373 | 0, |
| 374 | 0, |
| 375 | 0, |
| 376 | 0, |
| 377 | 0, |
| 378 | 0, |
| 379 | 0, |
| 380 | 0, |
| 381 | 0, |
| 382 | 0, |
| 383 | 0, |
| 384 | 0, |
| 385 | 0, |
| 386 | 0, |
| 387 | 0, |
| 388 | 0, |
| 389 | 0, |
| 390 | 0, |
| 391 | 0, |
| 392 | 0, |
| 393 | 0, |
| 394 | 0, |
| 395 | 0, |
| 396 | 0, |
| 397 | 0, |
| 398 | 0, |
| 399 | 0, |
| 400 | 0, |
| 401 | 0, |
| 402 | 0, |
| 403 | 0, |
| 404 | 0, |
| 405 | 0, |
| 406 | 0, |
| 407 | 0, |
| 408 | 0, |
| 409 | 0, |
| 410 | 0, |
| 411 | 0, |
| 412 | 0, |
| 413 | 0, |
| 414 | 0, |
| 415 | 0, |
| 416 | 0, |
| 417 | 0, |
| 418 | 0, |
| 419 | 0, |
| 420 | 0, |
| 421 | 0, |
| 422 | 0, |
| 423 | 0, |
| 424 | 0, |
| 425 | 0, |
| 426 | 0, |
| 427 | 0, |
| 428 | 0, |
| 429 | 0, |
| 430 | 0, |
| 431 | generic_in_function_epilogue_p, |
| 432 | construct_inferior_arguments, |
| 433 | 0, |
| 434 | 0, |
| 435 | 0, |
| 436 | "malloc", |
| 437 | 0, |
| 438 | 0, |
| 439 | 0, |
| 440 | 0, |
| 441 | 0, |
| 442 | default_register_reggroup_p, |
| 443 | /* startup_gdbarch() */ |
| 444 | }; |
| 445 | |
| 446 | struct gdbarch *current_gdbarch = &startup_gdbarch; |
| 447 | |
| 448 | /* Do any initialization needed for a non-multiarch configuration |
| 449 | after the _initialize_MODULE functions have been run. */ |
| 450 | void |
| 451 | initialize_non_multiarch (void) |
| 452 | { |
| 453 | alloc_gdbarch_data (&startup_gdbarch); |
| 454 | /* Ensure that all swap areas are zeroed so that they again think |
| 455 | they are starting from scratch. */ |
| 456 | clear_gdbarch_swap (&startup_gdbarch); |
| 457 | init_gdbarch_swap (&startup_gdbarch); |
| 458 | } |
| 459 | |
| 460 | |
| 461 | /* Create a new ``struct gdbarch'' based on information provided by |
| 462 | ``struct gdbarch_info''. */ |
| 463 | |
| 464 | struct gdbarch * |
| 465 | gdbarch_alloc (const struct gdbarch_info *info, |
| 466 | struct gdbarch_tdep *tdep) |
| 467 | { |
| 468 | /* NOTE: The new architecture variable is named ``current_gdbarch'' |
| 469 | so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to |
| 470 | the current local architecture and not the previous global |
| 471 | architecture. This ensures that the new architectures initial |
| 472 | values are not influenced by the previous architecture. Once |
| 473 | everything is parameterised with gdbarch, this will go away. */ |
| 474 | struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch); |
| 475 | memset (current_gdbarch, 0, sizeof (*current_gdbarch)); |
| 476 | |
| 477 | alloc_gdbarch_data (current_gdbarch); |
| 478 | |
| 479 | current_gdbarch->tdep = tdep; |
| 480 | |
| 481 | current_gdbarch->bfd_arch_info = info->bfd_arch_info; |
| 482 | current_gdbarch->byte_order = info->byte_order; |
| 483 | |
| 484 | /* Force the explicit initialization of these. */ |
| 485 | current_gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
| 486 | current_gdbarch->int_bit = 4*TARGET_CHAR_BIT; |
| 487 | current_gdbarch->long_bit = 4*TARGET_CHAR_BIT; |
| 488 | current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT; |
| 489 | current_gdbarch->float_bit = 4*TARGET_CHAR_BIT; |
| 490 | current_gdbarch->double_bit = 8*TARGET_CHAR_BIT; |
| 491 | current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT; |
| 492 | current_gdbarch->ptr_bit = TARGET_INT_BIT; |
| 493 | current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address; |
| 494 | current_gdbarch->char_signed = -1; |
| 495 | current_gdbarch->read_pc = generic_target_read_pc; |
| 496 | current_gdbarch->write_pc = generic_target_write_pc; |
| 497 | current_gdbarch->read_fp = generic_target_read_fp; |
| 498 | current_gdbarch->read_sp = generic_target_read_sp; |
| 499 | current_gdbarch->write_sp = generic_target_write_sp; |
| 500 | current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; |
| 501 | current_gdbarch->num_regs = -1; |
| 502 | current_gdbarch->sp_regnum = -1; |
| 503 | current_gdbarch->fp_regnum = -1; |
| 504 | current_gdbarch->pc_regnum = -1; |
| 505 | current_gdbarch->ps_regnum = -1; |
| 506 | current_gdbarch->fp0_regnum = -1; |
| 507 | current_gdbarch->npc_regnum = -1; |
| 508 | current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; |
| 509 | current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; |
| 510 | current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum; |
| 511 | current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; |
| 512 | current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; |
| 513 | current_gdbarch->register_name = legacy_register_name; |
| 514 | current_gdbarch->register_size = -1; |
| 515 | current_gdbarch->register_bytes = -1; |
| 516 | current_gdbarch->register_byte = generic_register_byte; |
| 517 | current_gdbarch->register_raw_size = generic_register_size; |
| 518 | current_gdbarch->max_register_raw_size = -1; |
| 519 | current_gdbarch->register_virtual_size = generic_register_size; |
| 520 | current_gdbarch->max_register_virtual_size = -1; |
| 521 | current_gdbarch->print_registers_info = default_print_registers_info; |
| 522 | current_gdbarch->register_sim_regno = legacy_register_sim_regno; |
| 523 | current_gdbarch->cannot_fetch_register = cannot_register_not; |
| 524 | current_gdbarch->cannot_store_register = cannot_register_not; |
| 525 | current_gdbarch->deprecated_use_generic_dummy_frames = 1; |
| 526 | current_gdbarch->call_dummy_location = AT_ENTRY_POINT; |
| 527 | current_gdbarch->call_dummy_start_offset = -1; |
| 528 | current_gdbarch->call_dummy_breakpoint_offset = -1; |
| 529 | current_gdbarch->call_dummy_breakpoint_offset_p = -1; |
| 530 | current_gdbarch->call_dummy_length = -1; |
| 531 | current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy; |
| 532 | current_gdbarch->call_dummy_p = -1; |
| 533 | current_gdbarch->call_dummy_words = legacy_call_dummy_words; |
| 534 | current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; |
| 535 | current_gdbarch->call_dummy_stack_adjust_p = -1; |
| 536 | current_gdbarch->coerce_float_to_double = default_coerce_float_to_double; |
| 537 | current_gdbarch->register_convertible = generic_register_convertible_not; |
| 538 | current_gdbarch->convert_register_p = legacy_convert_register_p; |
| 539 | current_gdbarch->register_to_value = legacy_register_to_value; |
| 540 | current_gdbarch->value_to_register = legacy_value_to_register; |
| 541 | current_gdbarch->pointer_to_address = unsigned_pointer_to_address; |
| 542 | current_gdbarch->address_to_pointer = unsigned_address_to_pointer; |
| 543 | current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not; |
| 544 | current_gdbarch->push_arguments = default_push_arguments; |
| 545 | current_gdbarch->extract_return_value = legacy_extract_return_value; |
| 546 | current_gdbarch->store_return_value = legacy_store_return_value; |
| 547 | current_gdbarch->use_struct_convention = generic_use_struct_convention; |
| 548 | current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p; |
| 549 | current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc; |
| 550 | current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; |
| 551 | current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; |
| 552 | current_gdbarch->decr_pc_after_break = -1; |
| 553 | current_gdbarch->prepare_to_proceed = default_prepare_to_proceed; |
| 554 | current_gdbarch->function_start_offset = -1; |
| 555 | current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address; |
| 556 | current_gdbarch->frame_args_skip = -1; |
| 557 | current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not; |
| 558 | current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid; |
| 559 | current_gdbarch->frame_args_address = get_frame_base; |
| 560 | current_gdbarch->frame_locals_address = get_frame_base; |
| 561 | current_gdbarch->extra_stack_alignment_needed = 1; |
| 562 | current_gdbarch->convert_from_func_ptr_addr = core_addr_identity; |
| 563 | current_gdbarch->addr_bits_remove = core_addr_identity; |
| 564 | current_gdbarch->smash_text_address = core_addr_identity; |
| 565 | current_gdbarch->print_insn = legacy_print_insn; |
| 566 | current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code; |
| 567 | current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline; |
| 568 | current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline; |
| 569 | current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp; |
| 570 | current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; |
| 571 | current_gdbarch->construct_inferior_arguments = construct_inferior_arguments; |
| 572 | current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special; |
| 573 | current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special; |
| 574 | current_gdbarch->name_of_malloc = "malloc"; |
| 575 | current_gdbarch->register_reggroup_p = default_register_reggroup_p; |
| 576 | /* gdbarch_alloc() */ |
| 577 | |
| 578 | return current_gdbarch; |
| 579 | } |
| 580 | |
| 581 | |
| 582 | /* Free a gdbarch struct. This should never happen in normal |
| 583 | operation --- once you've created a gdbarch, you keep it around. |
| 584 | However, if an architecture's init function encounters an error |
| 585 | building the structure, it may need to clean up a partially |
| 586 | constructed gdbarch. */ |
| 587 | |
| 588 | void |
| 589 | gdbarch_free (struct gdbarch *arch) |
| 590 | { |
| 591 | gdb_assert (arch != NULL); |
| 592 | free_gdbarch_data (arch); |
| 593 | xfree (arch); |
| 594 | } |
| 595 | |
| 596 | |
| 597 | /* Ensure that all values in a GDBARCH are reasonable. */ |
| 598 | |
| 599 | static void |
| 600 | verify_gdbarch (struct gdbarch *gdbarch) |
| 601 | { |
| 602 | struct ui_file *log; |
| 603 | struct cleanup *cleanups; |
| 604 | long dummy; |
| 605 | char *buf; |
| 606 | /* Only perform sanity checks on a multi-arch target. */ |
| 607 | if (!GDB_MULTI_ARCH) |
| 608 | return; |
| 609 | log = mem_fileopen (); |
| 610 | cleanups = make_cleanup_ui_file_delete (log); |
| 611 | /* fundamental */ |
| 612 | if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) |
| 613 | fprintf_unfiltered (log, "\n\tbyte-order"); |
| 614 | if (gdbarch->bfd_arch_info == NULL) |
| 615 | fprintf_unfiltered (log, "\n\tbfd_arch_info"); |
| 616 | /* Check those that need to be defined for the given multi-arch level. */ |
| 617 | /* Skip verify of short_bit, invalid_p == 0 */ |
| 618 | /* Skip verify of int_bit, invalid_p == 0 */ |
| 619 | /* Skip verify of long_bit, invalid_p == 0 */ |
| 620 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
| 621 | /* Skip verify of float_bit, invalid_p == 0 */ |
| 622 | /* Skip verify of double_bit, invalid_p == 0 */ |
| 623 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
| 624 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
| 625 | if (gdbarch->addr_bit == 0) |
| 626 | gdbarch->addr_bit = TARGET_PTR_BIT; |
| 627 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
| 628 | if (gdbarch->char_signed == -1) |
| 629 | gdbarch->char_signed = 1; |
| 630 | /* Skip verify of read_pc, invalid_p == 0 */ |
| 631 | /* Skip verify of write_pc, invalid_p == 0 */ |
| 632 | /* Skip verify of read_fp, invalid_p == 0 */ |
| 633 | /* Skip verify of read_sp, invalid_p == 0 */ |
| 634 | /* Skip verify of write_sp, invalid_p == 0 */ |
| 635 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
| 636 | /* Skip verify of pseudo_register_read, has predicate */ |
| 637 | /* Skip verify of pseudo_register_write, has predicate */ |
| 638 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 639 | && (gdbarch->num_regs == -1)) |
| 640 | fprintf_unfiltered (log, "\n\tnum_regs"); |
| 641 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
| 642 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
| 643 | /* Skip verify of fp_regnum, invalid_p == 0 */ |
| 644 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
| 645 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
| 646 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
| 647 | /* Skip verify of npc_regnum, invalid_p == 0 */ |
| 648 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
| 649 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ |
| 650 | /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */ |
| 651 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ |
| 652 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ |
| 653 | /* Skip verify of register_name, invalid_p == 0 */ |
| 654 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 655 | && (gdbarch->register_size == -1)) |
| 656 | fprintf_unfiltered (log, "\n\tregister_size"); |
| 657 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 658 | && (gdbarch->register_bytes == -1)) |
| 659 | fprintf_unfiltered (log, "\n\tregister_bytes"); |
| 660 | /* Skip verify of register_byte, invalid_p == 0 */ |
| 661 | /* Skip verify of register_raw_size, invalid_p == 0 */ |
| 662 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 663 | && (gdbarch->max_register_raw_size == -1)) |
| 664 | fprintf_unfiltered (log, "\n\tmax_register_raw_size"); |
| 665 | /* Skip verify of register_virtual_size, invalid_p == 0 */ |
| 666 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 667 | && (gdbarch->max_register_virtual_size == -1)) |
| 668 | fprintf_unfiltered (log, "\n\tmax_register_virtual_size"); |
| 669 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 670 | && (gdbarch->register_virtual_type == 0)) |
| 671 | fprintf_unfiltered (log, "\n\tregister_virtual_type"); |
| 672 | /* Skip verify of deprecated_do_registers_info, has predicate */ |
| 673 | /* Skip verify of print_registers_info, invalid_p == 0 */ |
| 674 | /* Skip verify of print_float_info, has predicate */ |
| 675 | /* Skip verify of print_vector_info, has predicate */ |
| 676 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
| 677 | /* Skip verify of register_bytes_ok, has predicate */ |
| 678 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
| 679 | /* Skip verify of cannot_store_register, invalid_p == 0 */ |
| 680 | /* Skip verify of get_longjmp_target, has predicate */ |
| 681 | /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */ |
| 682 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
| 683 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 684 | && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0)) |
| 685 | fprintf_unfiltered (log, "\n\tcall_dummy_address"); |
| 686 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 687 | && (gdbarch->call_dummy_start_offset == -1)) |
| 688 | fprintf_unfiltered (log, "\n\tcall_dummy_start_offset"); |
| 689 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 690 | && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)) |
| 691 | fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset"); |
| 692 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
| 693 | && (gdbarch->call_dummy_breakpoint_offset_p == -1)) |
| 694 | fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p"); |
| 695 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 696 | && (gdbarch->call_dummy_length == -1)) |
| 697 | fprintf_unfiltered (log, "\n\tcall_dummy_length"); |
| 698 | /* Skip verify of deprecated_pc_in_call_dummy, has predicate */ |
| 699 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
| 700 | && (gdbarch->call_dummy_p == -1)) |
| 701 | fprintf_unfiltered (log, "\n\tcall_dummy_p"); |
| 702 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
| 703 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ |
| 704 | if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) |
| 705 | && (gdbarch->call_dummy_stack_adjust_p == -1)) |
| 706 | fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p"); |
| 707 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 708 | && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)) |
| 709 | fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust"); |
| 710 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 711 | && (gdbarch->fix_call_dummy == 0)) |
| 712 | fprintf_unfiltered (log, "\n\tfix_call_dummy"); |
| 713 | /* Skip verify of deprecated_init_frame_pc_first, has predicate */ |
| 714 | /* Skip verify of deprecated_init_frame_pc, has predicate */ |
| 715 | /* Skip verify of coerce_float_to_double, invalid_p == 0 */ |
| 716 | /* Skip verify of get_saved_register, has predicate */ |
| 717 | /* Skip verify of register_convertible, invalid_p == 0 */ |
| 718 | /* Skip verify of register_convert_to_virtual, invalid_p == 0 */ |
| 719 | /* Skip verify of register_convert_to_raw, invalid_p == 0 */ |
| 720 | /* Skip verify of convert_register_p, invalid_p == 0 */ |
| 721 | /* Skip verify of register_to_value, invalid_p == 0 */ |
| 722 | /* Skip verify of value_to_register, invalid_p == 0 */ |
| 723 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
| 724 | /* Skip verify of address_to_pointer, invalid_p == 0 */ |
| 725 | /* Skip verify of integer_to_address, has predicate */ |
| 726 | /* Skip verify of return_value_on_stack, invalid_p == 0 */ |
| 727 | /* Skip verify of push_arguments, invalid_p == 0 */ |
| 728 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 729 | && (gdbarch->push_dummy_frame == 0)) |
| 730 | fprintf_unfiltered (log, "\n\tpush_dummy_frame"); |
| 731 | /* Skip verify of push_return_address, has predicate */ |
| 732 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 733 | && (gdbarch->pop_frame == 0)) |
| 734 | fprintf_unfiltered (log, "\n\tpop_frame"); |
| 735 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 736 | && (gdbarch->store_struct_return == 0)) |
| 737 | fprintf_unfiltered (log, "\n\tstore_struct_return"); |
| 738 | /* Skip verify of extract_return_value, invalid_p == 0 */ |
| 739 | /* Skip verify of store_return_value, invalid_p == 0 */ |
| 740 | /* Skip verify of extract_struct_value_address, has predicate */ |
| 741 | /* Skip verify of deprecated_extract_struct_value_address, has predicate */ |
| 742 | /* Skip verify of use_struct_convention, invalid_p == 0 */ |
| 743 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 744 | && (gdbarch->frame_init_saved_regs == 0)) |
| 745 | fprintf_unfiltered (log, "\n\tframe_init_saved_regs"); |
| 746 | /* Skip verify of init_extra_frame_info, has predicate */ |
| 747 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 748 | && (gdbarch->skip_prologue == 0)) |
| 749 | fprintf_unfiltered (log, "\n\tskip_prologue"); |
| 750 | /* Skip verify of prologue_frameless_p, invalid_p == 0 */ |
| 751 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 752 | && (gdbarch->inner_than == 0)) |
| 753 | fprintf_unfiltered (log, "\n\tinner_than"); |
| 754 | /* Skip verify of breakpoint_from_pc, invalid_p == 0 */ |
| 755 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ |
| 756 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ |
| 757 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 758 | && (gdbarch->decr_pc_after_break == -1)) |
| 759 | fprintf_unfiltered (log, "\n\tdecr_pc_after_break"); |
| 760 | /* Skip verify of prepare_to_proceed, invalid_p == 0 */ |
| 761 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 762 | && (gdbarch->function_start_offset == -1)) |
| 763 | fprintf_unfiltered (log, "\n\tfunction_start_offset"); |
| 764 | /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */ |
| 765 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 766 | && (gdbarch->frame_args_skip == -1)) |
| 767 | fprintf_unfiltered (log, "\n\tframe_args_skip"); |
| 768 | /* Skip verify of frameless_function_invocation, invalid_p == 0 */ |
| 769 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 770 | && (gdbarch->frame_chain == 0)) |
| 771 | fprintf_unfiltered (log, "\n\tframe_chain"); |
| 772 | /* Skip verify of frame_chain_valid, invalid_p == 0 */ |
| 773 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 774 | && (gdbarch->frame_saved_pc == 0)) |
| 775 | fprintf_unfiltered (log, "\n\tframe_saved_pc"); |
| 776 | /* Skip verify of frame_args_address, invalid_p == 0 */ |
| 777 | /* Skip verify of frame_locals_address, invalid_p == 0 */ |
| 778 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 779 | && (gdbarch->saved_pc_after_call == 0)) |
| 780 | fprintf_unfiltered (log, "\n\tsaved_pc_after_call"); |
| 781 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
| 782 | && (gdbarch->frame_num_args == 0)) |
| 783 | fprintf_unfiltered (log, "\n\tframe_num_args"); |
| 784 | /* Skip verify of stack_align, has predicate */ |
| 785 | /* Skip verify of frame_align, has predicate */ |
| 786 | /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ |
| 787 | /* Skip verify of reg_struct_has_addr, has predicate */ |
| 788 | /* Skip verify of save_dummy_frame_tos, has predicate */ |
| 789 | if (gdbarch->float_format == 0) |
| 790 | gdbarch->float_format = default_float_format (gdbarch); |
| 791 | if (gdbarch->double_format == 0) |
| 792 | gdbarch->double_format = default_double_format (gdbarch); |
| 793 | if (gdbarch->long_double_format == 0) |
| 794 | gdbarch->long_double_format = default_double_format (gdbarch); |
| 795 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
| 796 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
| 797 | /* Skip verify of smash_text_address, invalid_p == 0 */ |
| 798 | /* Skip verify of software_single_step, has predicate */ |
| 799 | /* Skip verify of print_insn, invalid_p == 0 */ |
| 800 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
| 801 | /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */ |
| 802 | /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ |
| 803 | /* Skip verify of pc_in_sigtramp, invalid_p == 0 */ |
| 804 | /* Skip verify of sigtramp_start, has predicate */ |
| 805 | /* Skip verify of sigtramp_end, has predicate */ |
| 806 | /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ |
| 807 | /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ |
| 808 | /* Skip verify of dwarf2_build_frame_info, has predicate */ |
| 809 | /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ |
| 810 | /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ |
| 811 | /* Skip verify of name_of_malloc, invalid_p == 0 */ |
| 812 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ |
| 813 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ |
| 814 | /* Skip verify of address_class_type_flags, has predicate */ |
| 815 | /* Skip verify of address_class_type_flags_to_name, has predicate */ |
| 816 | /* Skip verify of address_class_name_to_type_flags, has predicate */ |
| 817 | /* Skip verify of register_reggroup_p, invalid_p == 0 */ |
| 818 | buf = ui_file_xstrdup (log, &dummy); |
| 819 | make_cleanup (xfree, buf); |
| 820 | if (strlen (buf) > 0) |
| 821 | internal_error (__FILE__, __LINE__, |
| 822 | "verify_gdbarch: the following are invalid ...%s", |
| 823 | buf); |
| 824 | do_cleanups (cleanups); |
| 825 | } |
| 826 | |
| 827 | |
| 828 | /* Print out the details of the current architecture. */ |
| 829 | |
| 830 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it |
| 831 | just happens to match the global variable ``current_gdbarch''. That |
| 832 | way macros refering to that variable get the local and not the global |
| 833 | version - ulgh. Once everything is parameterised with gdbarch, this |
| 834 | will go away. */ |
| 835 | |
| 836 | void |
| 837 | gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) |
| 838 | { |
| 839 | fprintf_unfiltered (file, |
| 840 | "gdbarch_dump: GDB_MULTI_ARCH = %d\n", |
| 841 | GDB_MULTI_ARCH); |
| 842 | if (GDB_MULTI_ARCH) |
| 843 | fprintf_unfiltered (file, |
| 844 | "gdbarch_dump: gdbarch_frame_align_p() = %d\n", |
| 845 | gdbarch_frame_align_p (current_gdbarch)); |
| 846 | if (GDB_MULTI_ARCH) |
| 847 | fprintf_unfiltered (file, |
| 848 | "gdbarch_dump: frame_align = 0x%08lx\n", |
| 849 | (long) current_gdbarch->frame_align); |
| 850 | if (GDB_MULTI_ARCH) |
| 851 | fprintf_unfiltered (file, |
| 852 | "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n", |
| 853 | (long) current_gdbarch->in_function_epilogue_p); |
| 854 | if (GDB_MULTI_ARCH) |
| 855 | fprintf_unfiltered (file, |
| 856 | "gdbarch_dump: register_reggroup_p = 0x%08lx\n", |
| 857 | (long) current_gdbarch->register_reggroup_p); |
| 858 | if (GDB_MULTI_ARCH) |
| 859 | fprintf_unfiltered (file, |
| 860 | "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n", |
| 861 | gdbarch_pseudo_register_read_p (current_gdbarch)); |
| 862 | if (GDB_MULTI_ARCH) |
| 863 | fprintf_unfiltered (file, |
| 864 | "gdbarch_dump: pseudo_register_read = 0x%08lx\n", |
| 865 | (long) current_gdbarch->pseudo_register_read); |
| 866 | if (GDB_MULTI_ARCH) |
| 867 | fprintf_unfiltered (file, |
| 868 | "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", |
| 869 | gdbarch_pseudo_register_write_p (current_gdbarch)); |
| 870 | if (GDB_MULTI_ARCH) |
| 871 | fprintf_unfiltered (file, |
| 872 | "gdbarch_dump: pseudo_register_write = 0x%08lx\n", |
| 873 | (long) current_gdbarch->pseudo_register_write); |
| 874 | if (GDB_MULTI_ARCH) |
| 875 | fprintf_unfiltered (file, |
| 876 | "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n", |
| 877 | gdbarch_address_class_name_to_type_flags_p (current_gdbarch)); |
| 878 | if (GDB_MULTI_ARCH) |
| 879 | fprintf_unfiltered (file, |
| 880 | "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n", |
| 881 | (long) current_gdbarch->address_class_name_to_type_flags); |
| 882 | #ifdef ADDRESS_CLASS_TYPE_FLAGS_P |
| 883 | fprintf_unfiltered (file, |
| 884 | "gdbarch_dump: %s # %s\n", |
| 885 | "ADDRESS_CLASS_TYPE_FLAGS_P()", |
| 886 | XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ())); |
| 887 | fprintf_unfiltered (file, |
| 888 | "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n", |
| 889 | ADDRESS_CLASS_TYPE_FLAGS_P ()); |
| 890 | #endif |
| 891 | #ifdef ADDRESS_CLASS_TYPE_FLAGS |
| 892 | fprintf_unfiltered (file, |
| 893 | "gdbarch_dump: %s # %s\n", |
| 894 | "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)", |
| 895 | XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class))); |
| 896 | if (GDB_MULTI_ARCH) |
| 897 | fprintf_unfiltered (file, |
| 898 | "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n", |
| 899 | (long) current_gdbarch->address_class_type_flags |
| 900 | /*ADDRESS_CLASS_TYPE_FLAGS ()*/); |
| 901 | #endif |
| 902 | if (GDB_MULTI_ARCH) |
| 903 | fprintf_unfiltered (file, |
| 904 | "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n", |
| 905 | gdbarch_address_class_type_flags_to_name_p (current_gdbarch)); |
| 906 | if (GDB_MULTI_ARCH) |
| 907 | fprintf_unfiltered (file, |
| 908 | "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n", |
| 909 | (long) current_gdbarch->address_class_type_flags_to_name); |
| 910 | #ifdef ADDRESS_TO_POINTER |
| 911 | #if GDB_MULTI_ARCH |
| 912 | /* Macro might contain `[{}]' when not multi-arch */ |
| 913 | fprintf_unfiltered (file, |
| 914 | "gdbarch_dump: %s # %s\n", |
| 915 | "ADDRESS_TO_POINTER(type, buf, addr)", |
| 916 | XSTRING (ADDRESS_TO_POINTER (type, buf, addr))); |
| 917 | #endif |
| 918 | if (GDB_MULTI_ARCH) |
| 919 | fprintf_unfiltered (file, |
| 920 | "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n", |
| 921 | (long) current_gdbarch->address_to_pointer |
| 922 | /*ADDRESS_TO_POINTER ()*/); |
| 923 | #endif |
| 924 | #ifdef ADDR_BITS_REMOVE |
| 925 | fprintf_unfiltered (file, |
| 926 | "gdbarch_dump: %s # %s\n", |
| 927 | "ADDR_BITS_REMOVE(addr)", |
| 928 | XSTRING (ADDR_BITS_REMOVE (addr))); |
| 929 | if (GDB_MULTI_ARCH) |
| 930 | fprintf_unfiltered (file, |
| 931 | "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n", |
| 932 | (long) current_gdbarch->addr_bits_remove |
| 933 | /*ADDR_BITS_REMOVE ()*/); |
| 934 | #endif |
| 935 | #ifdef BELIEVE_PCC_PROMOTION |
| 936 | fprintf_unfiltered (file, |
| 937 | "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n", |
| 938 | XSTRING (BELIEVE_PCC_PROMOTION)); |
| 939 | fprintf_unfiltered (file, |
| 940 | "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n", |
| 941 | BELIEVE_PCC_PROMOTION); |
| 942 | #endif |
| 943 | #ifdef BELIEVE_PCC_PROMOTION_TYPE |
| 944 | fprintf_unfiltered (file, |
| 945 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n", |
| 946 | XSTRING (BELIEVE_PCC_PROMOTION_TYPE)); |
| 947 | fprintf_unfiltered (file, |
| 948 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n", |
| 949 | BELIEVE_PCC_PROMOTION_TYPE); |
| 950 | #endif |
| 951 | #ifdef BREAKPOINT_FROM_PC |
| 952 | fprintf_unfiltered (file, |
| 953 | "gdbarch_dump: %s # %s\n", |
| 954 | "BREAKPOINT_FROM_PC(pcptr, lenptr)", |
| 955 | XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr))); |
| 956 | if (GDB_MULTI_ARCH) |
| 957 | fprintf_unfiltered (file, |
| 958 | "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n", |
| 959 | (long) current_gdbarch->breakpoint_from_pc |
| 960 | /*BREAKPOINT_FROM_PC ()*/); |
| 961 | #endif |
| 962 | #ifdef CALL_DUMMY_ADDRESS |
| 963 | fprintf_unfiltered (file, |
| 964 | "gdbarch_dump: %s # %s\n", |
| 965 | "CALL_DUMMY_ADDRESS()", |
| 966 | XSTRING (CALL_DUMMY_ADDRESS ())); |
| 967 | if (GDB_MULTI_ARCH) |
| 968 | fprintf_unfiltered (file, |
| 969 | "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n", |
| 970 | (long) current_gdbarch->call_dummy_address |
| 971 | /*CALL_DUMMY_ADDRESS ()*/); |
| 972 | #endif |
| 973 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET |
| 974 | fprintf_unfiltered (file, |
| 975 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", |
| 976 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET)); |
| 977 | if (CALL_DUMMY_BREAKPOINT_OFFSET_P) |
| 978 | fprintf_unfiltered (file, |
| 979 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n", |
| 980 | (long) CALL_DUMMY_BREAKPOINT_OFFSET); |
| 981 | #endif |
| 982 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P |
| 983 | fprintf_unfiltered (file, |
| 984 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n", |
| 985 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P)); |
| 986 | fprintf_unfiltered (file, |
| 987 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n", |
| 988 | CALL_DUMMY_BREAKPOINT_OFFSET_P); |
| 989 | #endif |
| 990 | #ifdef CALL_DUMMY_LENGTH |
| 991 | fprintf_unfiltered (file, |
| 992 | "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n", |
| 993 | XSTRING (CALL_DUMMY_LENGTH)); |
| 994 | if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END) |
| 995 | fprintf_unfiltered (file, |
| 996 | "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n", |
| 997 | CALL_DUMMY_LENGTH); |
| 998 | #endif |
| 999 | #ifdef CALL_DUMMY_LOCATION |
| 1000 | fprintf_unfiltered (file, |
| 1001 | "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", |
| 1002 | XSTRING (CALL_DUMMY_LOCATION)); |
| 1003 | fprintf_unfiltered (file, |
| 1004 | "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n", |
| 1005 | CALL_DUMMY_LOCATION); |
| 1006 | #endif |
| 1007 | #ifdef CALL_DUMMY_P |
| 1008 | fprintf_unfiltered (file, |
| 1009 | "gdbarch_dump: CALL_DUMMY_P # %s\n", |
| 1010 | XSTRING (CALL_DUMMY_P)); |
| 1011 | fprintf_unfiltered (file, |
| 1012 | "gdbarch_dump: CALL_DUMMY_P = %d\n", |
| 1013 | CALL_DUMMY_P); |
| 1014 | #endif |
| 1015 | #ifdef CALL_DUMMY_STACK_ADJUST |
| 1016 | fprintf_unfiltered (file, |
| 1017 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n", |
| 1018 | XSTRING (CALL_DUMMY_STACK_ADJUST)); |
| 1019 | if (CALL_DUMMY_STACK_ADJUST_P) |
| 1020 | fprintf_unfiltered (file, |
| 1021 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n", |
| 1022 | (long) CALL_DUMMY_STACK_ADJUST); |
| 1023 | #endif |
| 1024 | #ifdef CALL_DUMMY_STACK_ADJUST_P |
| 1025 | fprintf_unfiltered (file, |
| 1026 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n", |
| 1027 | XSTRING (CALL_DUMMY_STACK_ADJUST_P)); |
| 1028 | fprintf_unfiltered (file, |
| 1029 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n", |
| 1030 | (long) CALL_DUMMY_STACK_ADJUST_P); |
| 1031 | #endif |
| 1032 | #ifdef CALL_DUMMY_START_OFFSET |
| 1033 | fprintf_unfiltered (file, |
| 1034 | "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n", |
| 1035 | XSTRING (CALL_DUMMY_START_OFFSET)); |
| 1036 | fprintf_unfiltered (file, |
| 1037 | "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n", |
| 1038 | (long) CALL_DUMMY_START_OFFSET); |
| 1039 | #endif |
| 1040 | #ifdef CALL_DUMMY_WORDS |
| 1041 | fprintf_unfiltered (file, |
| 1042 | "gdbarch_dump: CALL_DUMMY_WORDS # %s\n", |
| 1043 | XSTRING (CALL_DUMMY_WORDS)); |
| 1044 | fprintf_unfiltered (file, |
| 1045 | "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n", |
| 1046 | (long) CALL_DUMMY_WORDS); |
| 1047 | #endif |
| 1048 | #ifdef CANNOT_FETCH_REGISTER |
| 1049 | fprintf_unfiltered (file, |
| 1050 | "gdbarch_dump: %s # %s\n", |
| 1051 | "CANNOT_FETCH_REGISTER(regnum)", |
| 1052 | XSTRING (CANNOT_FETCH_REGISTER (regnum))); |
| 1053 | if (GDB_MULTI_ARCH) |
| 1054 | fprintf_unfiltered (file, |
| 1055 | "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n", |
| 1056 | (long) current_gdbarch->cannot_fetch_register |
| 1057 | /*CANNOT_FETCH_REGISTER ()*/); |
| 1058 | #endif |
| 1059 | #ifdef CANNOT_STEP_BREAKPOINT |
| 1060 | fprintf_unfiltered (file, |
| 1061 | "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n", |
| 1062 | XSTRING (CANNOT_STEP_BREAKPOINT)); |
| 1063 | fprintf_unfiltered (file, |
| 1064 | "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n", |
| 1065 | CANNOT_STEP_BREAKPOINT); |
| 1066 | #endif |
| 1067 | #ifdef CANNOT_STORE_REGISTER |
| 1068 | fprintf_unfiltered (file, |
| 1069 | "gdbarch_dump: %s # %s\n", |
| 1070 | "CANNOT_STORE_REGISTER(regnum)", |
| 1071 | XSTRING (CANNOT_STORE_REGISTER (regnum))); |
| 1072 | if (GDB_MULTI_ARCH) |
| 1073 | fprintf_unfiltered (file, |
| 1074 | "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n", |
| 1075 | (long) current_gdbarch->cannot_store_register |
| 1076 | /*CANNOT_STORE_REGISTER ()*/); |
| 1077 | #endif |
| 1078 | #ifdef COERCE_FLOAT_TO_DOUBLE |
| 1079 | fprintf_unfiltered (file, |
| 1080 | "gdbarch_dump: %s # %s\n", |
| 1081 | "COERCE_FLOAT_TO_DOUBLE(formal, actual)", |
| 1082 | XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual))); |
| 1083 | if (GDB_MULTI_ARCH) |
| 1084 | fprintf_unfiltered (file, |
| 1085 | "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = <0x%08lx>\n", |
| 1086 | (long) current_gdbarch->coerce_float_to_double |
| 1087 | /*COERCE_FLOAT_TO_DOUBLE ()*/); |
| 1088 | #endif |
| 1089 | #ifdef COFF_MAKE_MSYMBOL_SPECIAL |
| 1090 | #if GDB_MULTI_ARCH |
| 1091 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1092 | fprintf_unfiltered (file, |
| 1093 | "gdbarch_dump: %s # %s\n", |
| 1094 | "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)", |
| 1095 | XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym))); |
| 1096 | #endif |
| 1097 | if (GDB_MULTI_ARCH) |
| 1098 | fprintf_unfiltered (file, |
| 1099 | "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n", |
| 1100 | (long) current_gdbarch->coff_make_msymbol_special |
| 1101 | /*COFF_MAKE_MSYMBOL_SPECIAL ()*/); |
| 1102 | #endif |
| 1103 | if (GDB_MULTI_ARCH) |
| 1104 | fprintf_unfiltered (file, |
| 1105 | "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n", |
| 1106 | (long) current_gdbarch->construct_inferior_arguments); |
| 1107 | #ifdef CONVERT_FROM_FUNC_PTR_ADDR |
| 1108 | fprintf_unfiltered (file, |
| 1109 | "gdbarch_dump: %s # %s\n", |
| 1110 | "CONVERT_FROM_FUNC_PTR_ADDR(addr)", |
| 1111 | XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr))); |
| 1112 | if (GDB_MULTI_ARCH) |
| 1113 | fprintf_unfiltered (file, |
| 1114 | "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n", |
| 1115 | (long) current_gdbarch->convert_from_func_ptr_addr |
| 1116 | /*CONVERT_FROM_FUNC_PTR_ADDR ()*/); |
| 1117 | #endif |
| 1118 | #ifdef CONVERT_REGISTER_P |
| 1119 | fprintf_unfiltered (file, |
| 1120 | "gdbarch_dump: %s # %s\n", |
| 1121 | "CONVERT_REGISTER_P(regnum)", |
| 1122 | XSTRING (CONVERT_REGISTER_P (regnum))); |
| 1123 | if (GDB_MULTI_ARCH) |
| 1124 | fprintf_unfiltered (file, |
| 1125 | "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n", |
| 1126 | (long) current_gdbarch->convert_register_p |
| 1127 | /*CONVERT_REGISTER_P ()*/); |
| 1128 | #endif |
| 1129 | #ifdef DECR_PC_AFTER_BREAK |
| 1130 | fprintf_unfiltered (file, |
| 1131 | "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n", |
| 1132 | XSTRING (DECR_PC_AFTER_BREAK)); |
| 1133 | fprintf_unfiltered (file, |
| 1134 | "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", |
| 1135 | (long) DECR_PC_AFTER_BREAK); |
| 1136 | #endif |
| 1137 | #ifdef DEPRECATED_DO_REGISTERS_INFO_P |
| 1138 | fprintf_unfiltered (file, |
| 1139 | "gdbarch_dump: %s # %s\n", |
| 1140 | "DEPRECATED_DO_REGISTERS_INFO_P()", |
| 1141 | XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ())); |
| 1142 | fprintf_unfiltered (file, |
| 1143 | "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n", |
| 1144 | DEPRECATED_DO_REGISTERS_INFO_P ()); |
| 1145 | #endif |
| 1146 | #ifdef DEPRECATED_DO_REGISTERS_INFO |
| 1147 | #if GDB_MULTI_ARCH |
| 1148 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1149 | fprintf_unfiltered (file, |
| 1150 | "gdbarch_dump: %s # %s\n", |
| 1151 | "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)", |
| 1152 | XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs))); |
| 1153 | #endif |
| 1154 | if (GDB_MULTI_ARCH) |
| 1155 | fprintf_unfiltered (file, |
| 1156 | "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n", |
| 1157 | (long) current_gdbarch->deprecated_do_registers_info |
| 1158 | /*DEPRECATED_DO_REGISTERS_INFO ()*/); |
| 1159 | #endif |
| 1160 | #ifdef DEPRECATED_EXTRACT_RETURN_VALUE |
| 1161 | #if GDB_MULTI_ARCH |
| 1162 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1163 | fprintf_unfiltered (file, |
| 1164 | "gdbarch_dump: %s # %s\n", |
| 1165 | "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", |
| 1166 | XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); |
| 1167 | #endif |
| 1168 | if (GDB_MULTI_ARCH) |
| 1169 | fprintf_unfiltered (file, |
| 1170 | "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n", |
| 1171 | (long) current_gdbarch->deprecated_extract_return_value |
| 1172 | /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/); |
| 1173 | #endif |
| 1174 | #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P |
| 1175 | fprintf_unfiltered (file, |
| 1176 | "gdbarch_dump: %s # %s\n", |
| 1177 | "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()", |
| 1178 | XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())); |
| 1179 | fprintf_unfiltered (file, |
| 1180 | "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n", |
| 1181 | DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()); |
| 1182 | #endif |
| 1183 | #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS |
| 1184 | fprintf_unfiltered (file, |
| 1185 | "gdbarch_dump: %s # %s\n", |
| 1186 | "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)", |
| 1187 | XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf))); |
| 1188 | if (GDB_MULTI_ARCH) |
| 1189 | fprintf_unfiltered (file, |
| 1190 | "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n", |
| 1191 | (long) current_gdbarch->deprecated_extract_struct_value_address |
| 1192 | /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/); |
| 1193 | #endif |
| 1194 | #ifdef DEPRECATED_INIT_FRAME_PC_P |
| 1195 | fprintf_unfiltered (file, |
| 1196 | "gdbarch_dump: %s # %s\n", |
| 1197 | "DEPRECATED_INIT_FRAME_PC_P()", |
| 1198 | XSTRING (DEPRECATED_INIT_FRAME_PC_P ())); |
| 1199 | fprintf_unfiltered (file, |
| 1200 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n", |
| 1201 | DEPRECATED_INIT_FRAME_PC_P ()); |
| 1202 | #endif |
| 1203 | #ifdef DEPRECATED_INIT_FRAME_PC |
| 1204 | fprintf_unfiltered (file, |
| 1205 | "gdbarch_dump: %s # %s\n", |
| 1206 | "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)", |
| 1207 | XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev))); |
| 1208 | if (GDB_MULTI_ARCH) |
| 1209 | fprintf_unfiltered (file, |
| 1210 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n", |
| 1211 | (long) current_gdbarch->deprecated_init_frame_pc |
| 1212 | /*DEPRECATED_INIT_FRAME_PC ()*/); |
| 1213 | #endif |
| 1214 | #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P |
| 1215 | fprintf_unfiltered (file, |
| 1216 | "gdbarch_dump: %s # %s\n", |
| 1217 | "DEPRECATED_INIT_FRAME_PC_FIRST_P()", |
| 1218 | XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ())); |
| 1219 | fprintf_unfiltered (file, |
| 1220 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n", |
| 1221 | DEPRECATED_INIT_FRAME_PC_FIRST_P ()); |
| 1222 | #endif |
| 1223 | #ifdef DEPRECATED_INIT_FRAME_PC_FIRST |
| 1224 | fprintf_unfiltered (file, |
| 1225 | "gdbarch_dump: %s # %s\n", |
| 1226 | "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)", |
| 1227 | XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev))); |
| 1228 | if (GDB_MULTI_ARCH) |
| 1229 | fprintf_unfiltered (file, |
| 1230 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n", |
| 1231 | (long) current_gdbarch->deprecated_init_frame_pc_first |
| 1232 | /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/); |
| 1233 | #endif |
| 1234 | #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P |
| 1235 | fprintf_unfiltered (file, |
| 1236 | "gdbarch_dump: %s # %s\n", |
| 1237 | "DEPRECATED_PC_IN_CALL_DUMMY_P()", |
| 1238 | XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ())); |
| 1239 | fprintf_unfiltered (file, |
| 1240 | "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n", |
| 1241 | DEPRECATED_PC_IN_CALL_DUMMY_P ()); |
| 1242 | #endif |
| 1243 | #ifdef DEPRECATED_PC_IN_CALL_DUMMY |
| 1244 | fprintf_unfiltered (file, |
| 1245 | "gdbarch_dump: %s # %s\n", |
| 1246 | "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)", |
| 1247 | XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address))); |
| 1248 | if (GDB_MULTI_ARCH) |
| 1249 | fprintf_unfiltered (file, |
| 1250 | "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n", |
| 1251 | (long) current_gdbarch->deprecated_pc_in_call_dummy |
| 1252 | /*DEPRECATED_PC_IN_CALL_DUMMY ()*/); |
| 1253 | #endif |
| 1254 | #ifdef DEPRECATED_STORE_RETURN_VALUE |
| 1255 | #if GDB_MULTI_ARCH |
| 1256 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1257 | fprintf_unfiltered (file, |
| 1258 | "gdbarch_dump: %s # %s\n", |
| 1259 | "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)", |
| 1260 | XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf))); |
| 1261 | #endif |
| 1262 | if (GDB_MULTI_ARCH) |
| 1263 | fprintf_unfiltered (file, |
| 1264 | "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n", |
| 1265 | (long) current_gdbarch->deprecated_store_return_value |
| 1266 | /*DEPRECATED_STORE_RETURN_VALUE ()*/); |
| 1267 | #endif |
| 1268 | #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES |
| 1269 | fprintf_unfiltered (file, |
| 1270 | "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n", |
| 1271 | XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)); |
| 1272 | fprintf_unfiltered (file, |
| 1273 | "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n", |
| 1274 | DEPRECATED_USE_GENERIC_DUMMY_FRAMES); |
| 1275 | #endif |
| 1276 | #ifdef DWARF2_BUILD_FRAME_INFO_P |
| 1277 | fprintf_unfiltered (file, |
| 1278 | "gdbarch_dump: %s # %s\n", |
| 1279 | "DWARF2_BUILD_FRAME_INFO_P()", |
| 1280 | XSTRING (DWARF2_BUILD_FRAME_INFO_P ())); |
| 1281 | fprintf_unfiltered (file, |
| 1282 | "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n", |
| 1283 | DWARF2_BUILD_FRAME_INFO_P ()); |
| 1284 | #endif |
| 1285 | #ifdef DWARF2_BUILD_FRAME_INFO |
| 1286 | #if GDB_MULTI_ARCH |
| 1287 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1288 | fprintf_unfiltered (file, |
| 1289 | "gdbarch_dump: %s # %s\n", |
| 1290 | "DWARF2_BUILD_FRAME_INFO(objfile)", |
| 1291 | XSTRING (DWARF2_BUILD_FRAME_INFO (objfile))); |
| 1292 | #endif |
| 1293 | if (GDB_MULTI_ARCH) |
| 1294 | fprintf_unfiltered (file, |
| 1295 | "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n", |
| 1296 | (long) current_gdbarch->dwarf2_build_frame_info |
| 1297 | /*DWARF2_BUILD_FRAME_INFO ()*/); |
| 1298 | #endif |
| 1299 | #ifdef DWARF2_REG_TO_REGNUM |
| 1300 | fprintf_unfiltered (file, |
| 1301 | "gdbarch_dump: %s # %s\n", |
| 1302 | "DWARF2_REG_TO_REGNUM(dwarf2_regnr)", |
| 1303 | XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr))); |
| 1304 | if (GDB_MULTI_ARCH) |
| 1305 | fprintf_unfiltered (file, |
| 1306 | "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n", |
| 1307 | (long) current_gdbarch->dwarf2_reg_to_regnum |
| 1308 | /*DWARF2_REG_TO_REGNUM ()*/); |
| 1309 | #endif |
| 1310 | #ifdef DWARF_REG_TO_REGNUM |
| 1311 | fprintf_unfiltered (file, |
| 1312 | "gdbarch_dump: %s # %s\n", |
| 1313 | "DWARF_REG_TO_REGNUM(dwarf_regnr)", |
| 1314 | XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr))); |
| 1315 | if (GDB_MULTI_ARCH) |
| 1316 | fprintf_unfiltered (file, |
| 1317 | "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n", |
| 1318 | (long) current_gdbarch->dwarf_reg_to_regnum |
| 1319 | /*DWARF_REG_TO_REGNUM ()*/); |
| 1320 | #endif |
| 1321 | #ifdef ECOFF_REG_TO_REGNUM |
| 1322 | fprintf_unfiltered (file, |
| 1323 | "gdbarch_dump: %s # %s\n", |
| 1324 | "ECOFF_REG_TO_REGNUM(ecoff_regnr)", |
| 1325 | XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr))); |
| 1326 | if (GDB_MULTI_ARCH) |
| 1327 | fprintf_unfiltered (file, |
| 1328 | "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n", |
| 1329 | (long) current_gdbarch->ecoff_reg_to_regnum |
| 1330 | /*ECOFF_REG_TO_REGNUM ()*/); |
| 1331 | #endif |
| 1332 | #ifdef ELF_MAKE_MSYMBOL_SPECIAL |
| 1333 | #if GDB_MULTI_ARCH |
| 1334 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1335 | fprintf_unfiltered (file, |
| 1336 | "gdbarch_dump: %s # %s\n", |
| 1337 | "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)", |
| 1338 | XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym))); |
| 1339 | #endif |
| 1340 | if (GDB_MULTI_ARCH) |
| 1341 | fprintf_unfiltered (file, |
| 1342 | "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n", |
| 1343 | (long) current_gdbarch->elf_make_msymbol_special |
| 1344 | /*ELF_MAKE_MSYMBOL_SPECIAL ()*/); |
| 1345 | #endif |
| 1346 | #ifdef EXTRACT_RETURN_VALUE |
| 1347 | #if GDB_MULTI_ARCH |
| 1348 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1349 | fprintf_unfiltered (file, |
| 1350 | "gdbarch_dump: %s # %s\n", |
| 1351 | "EXTRACT_RETURN_VALUE(type, regcache, valbuf)", |
| 1352 | XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf))); |
| 1353 | #endif |
| 1354 | if (GDB_MULTI_ARCH) |
| 1355 | fprintf_unfiltered (file, |
| 1356 | "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n", |
| 1357 | (long) current_gdbarch->extract_return_value |
| 1358 | /*EXTRACT_RETURN_VALUE ()*/); |
| 1359 | #endif |
| 1360 | #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P |
| 1361 | fprintf_unfiltered (file, |
| 1362 | "gdbarch_dump: %s # %s\n", |
| 1363 | "EXTRACT_STRUCT_VALUE_ADDRESS_P()", |
| 1364 | XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ())); |
| 1365 | fprintf_unfiltered (file, |
| 1366 | "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n", |
| 1367 | EXTRACT_STRUCT_VALUE_ADDRESS_P ()); |
| 1368 | #endif |
| 1369 | #ifdef EXTRACT_STRUCT_VALUE_ADDRESS |
| 1370 | fprintf_unfiltered (file, |
| 1371 | "gdbarch_dump: %s # %s\n", |
| 1372 | "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)", |
| 1373 | XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache))); |
| 1374 | if (GDB_MULTI_ARCH) |
| 1375 | fprintf_unfiltered (file, |
| 1376 | "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n", |
| 1377 | (long) current_gdbarch->extract_struct_value_address |
| 1378 | /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/); |
| 1379 | #endif |
| 1380 | #ifdef EXTRA_STACK_ALIGNMENT_NEEDED |
| 1381 | fprintf_unfiltered (file, |
| 1382 | "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n", |
| 1383 | XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED)); |
| 1384 | fprintf_unfiltered (file, |
| 1385 | "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n", |
| 1386 | EXTRA_STACK_ALIGNMENT_NEEDED); |
| 1387 | #endif |
| 1388 | #ifdef FIX_CALL_DUMMY |
| 1389 | #if GDB_MULTI_ARCH |
| 1390 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1391 | fprintf_unfiltered (file, |
| 1392 | "gdbarch_dump: %s # %s\n", |
| 1393 | "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)", |
| 1394 | XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p))); |
| 1395 | #endif |
| 1396 | if (GDB_MULTI_ARCH) |
| 1397 | fprintf_unfiltered (file, |
| 1398 | "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n", |
| 1399 | (long) current_gdbarch->fix_call_dummy |
| 1400 | /*FIX_CALL_DUMMY ()*/); |
| 1401 | #endif |
| 1402 | #ifdef FP0_REGNUM |
| 1403 | fprintf_unfiltered (file, |
| 1404 | "gdbarch_dump: FP0_REGNUM # %s\n", |
| 1405 | XSTRING (FP0_REGNUM)); |
| 1406 | fprintf_unfiltered (file, |
| 1407 | "gdbarch_dump: FP0_REGNUM = %d\n", |
| 1408 | FP0_REGNUM); |
| 1409 | #endif |
| 1410 | #ifdef FP_REGNUM |
| 1411 | fprintf_unfiltered (file, |
| 1412 | "gdbarch_dump: FP_REGNUM # %s\n", |
| 1413 | XSTRING (FP_REGNUM)); |
| 1414 | fprintf_unfiltered (file, |
| 1415 | "gdbarch_dump: FP_REGNUM = %d\n", |
| 1416 | FP_REGNUM); |
| 1417 | #endif |
| 1418 | #ifdef FRAMELESS_FUNCTION_INVOCATION |
| 1419 | fprintf_unfiltered (file, |
| 1420 | "gdbarch_dump: %s # %s\n", |
| 1421 | "FRAMELESS_FUNCTION_INVOCATION(fi)", |
| 1422 | XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi))); |
| 1423 | if (GDB_MULTI_ARCH) |
| 1424 | fprintf_unfiltered (file, |
| 1425 | "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n", |
| 1426 | (long) current_gdbarch->frameless_function_invocation |
| 1427 | /*FRAMELESS_FUNCTION_INVOCATION ()*/); |
| 1428 | #endif |
| 1429 | #ifdef FRAME_ARGS_ADDRESS |
| 1430 | fprintf_unfiltered (file, |
| 1431 | "gdbarch_dump: %s # %s\n", |
| 1432 | "FRAME_ARGS_ADDRESS(fi)", |
| 1433 | XSTRING (FRAME_ARGS_ADDRESS (fi))); |
| 1434 | if (GDB_MULTI_ARCH) |
| 1435 | fprintf_unfiltered (file, |
| 1436 | "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n", |
| 1437 | (long) current_gdbarch->frame_args_address |
| 1438 | /*FRAME_ARGS_ADDRESS ()*/); |
| 1439 | #endif |
| 1440 | #ifdef FRAME_ARGS_SKIP |
| 1441 | fprintf_unfiltered (file, |
| 1442 | "gdbarch_dump: FRAME_ARGS_SKIP # %s\n", |
| 1443 | XSTRING (FRAME_ARGS_SKIP)); |
| 1444 | fprintf_unfiltered (file, |
| 1445 | "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n", |
| 1446 | (long) FRAME_ARGS_SKIP); |
| 1447 | #endif |
| 1448 | #ifdef FRAME_CHAIN |
| 1449 | fprintf_unfiltered (file, |
| 1450 | "gdbarch_dump: %s # %s\n", |
| 1451 | "FRAME_CHAIN(frame)", |
| 1452 | XSTRING (FRAME_CHAIN (frame))); |
| 1453 | if (GDB_MULTI_ARCH) |
| 1454 | fprintf_unfiltered (file, |
| 1455 | "gdbarch_dump: FRAME_CHAIN = <0x%08lx>\n", |
| 1456 | (long) current_gdbarch->frame_chain |
| 1457 | /*FRAME_CHAIN ()*/); |
| 1458 | #endif |
| 1459 | #ifdef FRAME_CHAIN_VALID |
| 1460 | fprintf_unfiltered (file, |
| 1461 | "gdbarch_dump: %s # %s\n", |
| 1462 | "FRAME_CHAIN_VALID(chain, thisframe)", |
| 1463 | XSTRING (FRAME_CHAIN_VALID (chain, thisframe))); |
| 1464 | if (GDB_MULTI_ARCH) |
| 1465 | fprintf_unfiltered (file, |
| 1466 | "gdbarch_dump: FRAME_CHAIN_VALID = <0x%08lx>\n", |
| 1467 | (long) current_gdbarch->frame_chain_valid |
| 1468 | /*FRAME_CHAIN_VALID ()*/); |
| 1469 | #endif |
| 1470 | #ifdef FRAME_INIT_SAVED_REGS |
| 1471 | #if GDB_MULTI_ARCH |
| 1472 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1473 | fprintf_unfiltered (file, |
| 1474 | "gdbarch_dump: %s # %s\n", |
| 1475 | "FRAME_INIT_SAVED_REGS(frame)", |
| 1476 | XSTRING (FRAME_INIT_SAVED_REGS (frame))); |
| 1477 | #endif |
| 1478 | if (GDB_MULTI_ARCH) |
| 1479 | fprintf_unfiltered (file, |
| 1480 | "gdbarch_dump: FRAME_INIT_SAVED_REGS = <0x%08lx>\n", |
| 1481 | (long) current_gdbarch->frame_init_saved_regs |
| 1482 | /*FRAME_INIT_SAVED_REGS ()*/); |
| 1483 | #endif |
| 1484 | #ifdef FRAME_LOCALS_ADDRESS |
| 1485 | fprintf_unfiltered (file, |
| 1486 | "gdbarch_dump: %s # %s\n", |
| 1487 | "FRAME_LOCALS_ADDRESS(fi)", |
| 1488 | XSTRING (FRAME_LOCALS_ADDRESS (fi))); |
| 1489 | if (GDB_MULTI_ARCH) |
| 1490 | fprintf_unfiltered (file, |
| 1491 | "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n", |
| 1492 | (long) current_gdbarch->frame_locals_address |
| 1493 | /*FRAME_LOCALS_ADDRESS ()*/); |
| 1494 | #endif |
| 1495 | #ifdef FRAME_NUM_ARGS |
| 1496 | fprintf_unfiltered (file, |
| 1497 | "gdbarch_dump: %s # %s\n", |
| 1498 | "FRAME_NUM_ARGS(frame)", |
| 1499 | XSTRING (FRAME_NUM_ARGS (frame))); |
| 1500 | if (GDB_MULTI_ARCH) |
| 1501 | fprintf_unfiltered (file, |
| 1502 | "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n", |
| 1503 | (long) current_gdbarch->frame_num_args |
| 1504 | /*FRAME_NUM_ARGS ()*/); |
| 1505 | #endif |
| 1506 | #ifdef FRAME_SAVED_PC |
| 1507 | fprintf_unfiltered (file, |
| 1508 | "gdbarch_dump: %s # %s\n", |
| 1509 | "FRAME_SAVED_PC(fi)", |
| 1510 | XSTRING (FRAME_SAVED_PC (fi))); |
| 1511 | if (GDB_MULTI_ARCH) |
| 1512 | fprintf_unfiltered (file, |
| 1513 | "gdbarch_dump: FRAME_SAVED_PC = <0x%08lx>\n", |
| 1514 | (long) current_gdbarch->frame_saved_pc |
| 1515 | /*FRAME_SAVED_PC ()*/); |
| 1516 | #endif |
| 1517 | #ifdef FUNCTION_START_OFFSET |
| 1518 | fprintf_unfiltered (file, |
| 1519 | "gdbarch_dump: FUNCTION_START_OFFSET # %s\n", |
| 1520 | XSTRING (FUNCTION_START_OFFSET)); |
| 1521 | fprintf_unfiltered (file, |
| 1522 | "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", |
| 1523 | (long) FUNCTION_START_OFFSET); |
| 1524 | #endif |
| 1525 | #ifdef GET_LONGJMP_TARGET_P |
| 1526 | fprintf_unfiltered (file, |
| 1527 | "gdbarch_dump: %s # %s\n", |
| 1528 | "GET_LONGJMP_TARGET_P()", |
| 1529 | XSTRING (GET_LONGJMP_TARGET_P ())); |
| 1530 | fprintf_unfiltered (file, |
| 1531 | "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n", |
| 1532 | GET_LONGJMP_TARGET_P ()); |
| 1533 | #endif |
| 1534 | #ifdef GET_LONGJMP_TARGET |
| 1535 | fprintf_unfiltered (file, |
| 1536 | "gdbarch_dump: %s # %s\n", |
| 1537 | "GET_LONGJMP_TARGET(pc)", |
| 1538 | XSTRING (GET_LONGJMP_TARGET (pc))); |
| 1539 | if (GDB_MULTI_ARCH) |
| 1540 | fprintf_unfiltered (file, |
| 1541 | "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n", |
| 1542 | (long) current_gdbarch->get_longjmp_target |
| 1543 | /*GET_LONGJMP_TARGET ()*/); |
| 1544 | #endif |
| 1545 | #ifdef GET_SAVED_REGISTER_P |
| 1546 | fprintf_unfiltered (file, |
| 1547 | "gdbarch_dump: %s # %s\n", |
| 1548 | "GET_SAVED_REGISTER_P()", |
| 1549 | XSTRING (GET_SAVED_REGISTER_P ())); |
| 1550 | fprintf_unfiltered (file, |
| 1551 | "gdbarch_dump: GET_SAVED_REGISTER_P() = %d\n", |
| 1552 | GET_SAVED_REGISTER_P ()); |
| 1553 | #endif |
| 1554 | #ifdef GET_SAVED_REGISTER |
| 1555 | #if GDB_MULTI_ARCH |
| 1556 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1557 | fprintf_unfiltered (file, |
| 1558 | "gdbarch_dump: %s # %s\n", |
| 1559 | "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)", |
| 1560 | XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval))); |
| 1561 | #endif |
| 1562 | if (GDB_MULTI_ARCH) |
| 1563 | fprintf_unfiltered (file, |
| 1564 | "gdbarch_dump: GET_SAVED_REGISTER = <0x%08lx>\n", |
| 1565 | (long) current_gdbarch->get_saved_register |
| 1566 | /*GET_SAVED_REGISTER ()*/); |
| 1567 | #endif |
| 1568 | #ifdef HAVE_NONSTEPPABLE_WATCHPOINT |
| 1569 | fprintf_unfiltered (file, |
| 1570 | "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n", |
| 1571 | XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT)); |
| 1572 | fprintf_unfiltered (file, |
| 1573 | "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n", |
| 1574 | HAVE_NONSTEPPABLE_WATCHPOINT); |
| 1575 | #endif |
| 1576 | #ifdef INIT_EXTRA_FRAME_INFO_P |
| 1577 | fprintf_unfiltered (file, |
| 1578 | "gdbarch_dump: %s # %s\n", |
| 1579 | "INIT_EXTRA_FRAME_INFO_P()", |
| 1580 | XSTRING (INIT_EXTRA_FRAME_INFO_P ())); |
| 1581 | fprintf_unfiltered (file, |
| 1582 | "gdbarch_dump: INIT_EXTRA_FRAME_INFO_P() = %d\n", |
| 1583 | INIT_EXTRA_FRAME_INFO_P ()); |
| 1584 | #endif |
| 1585 | #ifdef INIT_EXTRA_FRAME_INFO |
| 1586 | #if GDB_MULTI_ARCH |
| 1587 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1588 | fprintf_unfiltered (file, |
| 1589 | "gdbarch_dump: %s # %s\n", |
| 1590 | "INIT_EXTRA_FRAME_INFO(fromleaf, frame)", |
| 1591 | XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame))); |
| 1592 | #endif |
| 1593 | if (GDB_MULTI_ARCH) |
| 1594 | fprintf_unfiltered (file, |
| 1595 | "gdbarch_dump: INIT_EXTRA_FRAME_INFO = <0x%08lx>\n", |
| 1596 | (long) current_gdbarch->init_extra_frame_info |
| 1597 | /*INIT_EXTRA_FRAME_INFO ()*/); |
| 1598 | #endif |
| 1599 | #ifdef INNER_THAN |
| 1600 | fprintf_unfiltered (file, |
| 1601 | "gdbarch_dump: %s # %s\n", |
| 1602 | "INNER_THAN(lhs, rhs)", |
| 1603 | XSTRING (INNER_THAN (lhs, rhs))); |
| 1604 | if (GDB_MULTI_ARCH) |
| 1605 | fprintf_unfiltered (file, |
| 1606 | "gdbarch_dump: INNER_THAN = <0x%08lx>\n", |
| 1607 | (long) current_gdbarch->inner_than |
| 1608 | /*INNER_THAN ()*/); |
| 1609 | #endif |
| 1610 | #ifdef INTEGER_TO_ADDRESS_P |
| 1611 | fprintf_unfiltered (file, |
| 1612 | "gdbarch_dump: %s # %s\n", |
| 1613 | "INTEGER_TO_ADDRESS_P()", |
| 1614 | XSTRING (INTEGER_TO_ADDRESS_P ())); |
| 1615 | fprintf_unfiltered (file, |
| 1616 | "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n", |
| 1617 | INTEGER_TO_ADDRESS_P ()); |
| 1618 | #endif |
| 1619 | #ifdef INTEGER_TO_ADDRESS |
| 1620 | fprintf_unfiltered (file, |
| 1621 | "gdbarch_dump: %s # %s\n", |
| 1622 | "INTEGER_TO_ADDRESS(type, buf)", |
| 1623 | XSTRING (INTEGER_TO_ADDRESS (type, buf))); |
| 1624 | if (GDB_MULTI_ARCH) |
| 1625 | fprintf_unfiltered (file, |
| 1626 | "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n", |
| 1627 | (long) current_gdbarch->integer_to_address |
| 1628 | /*INTEGER_TO_ADDRESS ()*/); |
| 1629 | #endif |
| 1630 | #ifdef IN_SOLIB_CALL_TRAMPOLINE |
| 1631 | fprintf_unfiltered (file, |
| 1632 | "gdbarch_dump: %s # %s\n", |
| 1633 | "IN_SOLIB_CALL_TRAMPOLINE(pc, name)", |
| 1634 | XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name))); |
| 1635 | if (GDB_MULTI_ARCH) |
| 1636 | fprintf_unfiltered (file, |
| 1637 | "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n", |
| 1638 | (long) current_gdbarch->in_solib_call_trampoline |
| 1639 | /*IN_SOLIB_CALL_TRAMPOLINE ()*/); |
| 1640 | #endif |
| 1641 | #ifdef IN_SOLIB_RETURN_TRAMPOLINE |
| 1642 | fprintf_unfiltered (file, |
| 1643 | "gdbarch_dump: %s # %s\n", |
| 1644 | "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)", |
| 1645 | XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name))); |
| 1646 | if (GDB_MULTI_ARCH) |
| 1647 | fprintf_unfiltered (file, |
| 1648 | "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n", |
| 1649 | (long) current_gdbarch->in_solib_return_trampoline |
| 1650 | /*IN_SOLIB_RETURN_TRAMPOLINE ()*/); |
| 1651 | #endif |
| 1652 | #ifdef MAX_REGISTER_RAW_SIZE |
| 1653 | fprintf_unfiltered (file, |
| 1654 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n", |
| 1655 | XSTRING (MAX_REGISTER_RAW_SIZE)); |
| 1656 | fprintf_unfiltered (file, |
| 1657 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n", |
| 1658 | MAX_REGISTER_RAW_SIZE); |
| 1659 | #endif |
| 1660 | #ifdef MAX_REGISTER_VIRTUAL_SIZE |
| 1661 | fprintf_unfiltered (file, |
| 1662 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n", |
| 1663 | XSTRING (MAX_REGISTER_VIRTUAL_SIZE)); |
| 1664 | fprintf_unfiltered (file, |
| 1665 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n", |
| 1666 | MAX_REGISTER_VIRTUAL_SIZE); |
| 1667 | #endif |
| 1668 | #ifdef MEMORY_INSERT_BREAKPOINT |
| 1669 | fprintf_unfiltered (file, |
| 1670 | "gdbarch_dump: %s # %s\n", |
| 1671 | "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)", |
| 1672 | XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache))); |
| 1673 | if (GDB_MULTI_ARCH) |
| 1674 | fprintf_unfiltered (file, |
| 1675 | "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n", |
| 1676 | (long) current_gdbarch->memory_insert_breakpoint |
| 1677 | /*MEMORY_INSERT_BREAKPOINT ()*/); |
| 1678 | #endif |
| 1679 | #ifdef MEMORY_REMOVE_BREAKPOINT |
| 1680 | fprintf_unfiltered (file, |
| 1681 | "gdbarch_dump: %s # %s\n", |
| 1682 | "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)", |
| 1683 | XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache))); |
| 1684 | if (GDB_MULTI_ARCH) |
| 1685 | fprintf_unfiltered (file, |
| 1686 | "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n", |
| 1687 | (long) current_gdbarch->memory_remove_breakpoint |
| 1688 | /*MEMORY_REMOVE_BREAKPOINT ()*/); |
| 1689 | #endif |
| 1690 | #ifdef NAME_OF_MALLOC |
| 1691 | fprintf_unfiltered (file, |
| 1692 | "gdbarch_dump: NAME_OF_MALLOC # %s\n", |
| 1693 | XSTRING (NAME_OF_MALLOC)); |
| 1694 | fprintf_unfiltered (file, |
| 1695 | "gdbarch_dump: NAME_OF_MALLOC = %s\n", |
| 1696 | NAME_OF_MALLOC); |
| 1697 | #endif |
| 1698 | #ifdef NPC_REGNUM |
| 1699 | fprintf_unfiltered (file, |
| 1700 | "gdbarch_dump: NPC_REGNUM # %s\n", |
| 1701 | XSTRING (NPC_REGNUM)); |
| 1702 | fprintf_unfiltered (file, |
| 1703 | "gdbarch_dump: NPC_REGNUM = %d\n", |
| 1704 | NPC_REGNUM); |
| 1705 | #endif |
| 1706 | #ifdef NUM_PSEUDO_REGS |
| 1707 | fprintf_unfiltered (file, |
| 1708 | "gdbarch_dump: NUM_PSEUDO_REGS # %s\n", |
| 1709 | XSTRING (NUM_PSEUDO_REGS)); |
| 1710 | fprintf_unfiltered (file, |
| 1711 | "gdbarch_dump: NUM_PSEUDO_REGS = %d\n", |
| 1712 | NUM_PSEUDO_REGS); |
| 1713 | #endif |
| 1714 | #ifdef NUM_REGS |
| 1715 | fprintf_unfiltered (file, |
| 1716 | "gdbarch_dump: NUM_REGS # %s\n", |
| 1717 | XSTRING (NUM_REGS)); |
| 1718 | fprintf_unfiltered (file, |
| 1719 | "gdbarch_dump: NUM_REGS = %d\n", |
| 1720 | NUM_REGS); |
| 1721 | #endif |
| 1722 | #ifdef PARM_BOUNDARY |
| 1723 | fprintf_unfiltered (file, |
| 1724 | "gdbarch_dump: PARM_BOUNDARY # %s\n", |
| 1725 | XSTRING (PARM_BOUNDARY)); |
| 1726 | fprintf_unfiltered (file, |
| 1727 | "gdbarch_dump: PARM_BOUNDARY = %d\n", |
| 1728 | PARM_BOUNDARY); |
| 1729 | #endif |
| 1730 | #ifdef PC_IN_SIGTRAMP |
| 1731 | fprintf_unfiltered (file, |
| 1732 | "gdbarch_dump: %s # %s\n", |
| 1733 | "PC_IN_SIGTRAMP(pc, name)", |
| 1734 | XSTRING (PC_IN_SIGTRAMP (pc, name))); |
| 1735 | if (GDB_MULTI_ARCH) |
| 1736 | fprintf_unfiltered (file, |
| 1737 | "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n", |
| 1738 | (long) current_gdbarch->pc_in_sigtramp |
| 1739 | /*PC_IN_SIGTRAMP ()*/); |
| 1740 | #endif |
| 1741 | #ifdef PC_REGNUM |
| 1742 | fprintf_unfiltered (file, |
| 1743 | "gdbarch_dump: PC_REGNUM # %s\n", |
| 1744 | XSTRING (PC_REGNUM)); |
| 1745 | fprintf_unfiltered (file, |
| 1746 | "gdbarch_dump: PC_REGNUM = %d\n", |
| 1747 | PC_REGNUM); |
| 1748 | #endif |
| 1749 | #ifdef POINTER_TO_ADDRESS |
| 1750 | fprintf_unfiltered (file, |
| 1751 | "gdbarch_dump: %s # %s\n", |
| 1752 | "POINTER_TO_ADDRESS(type, buf)", |
| 1753 | XSTRING (POINTER_TO_ADDRESS (type, buf))); |
| 1754 | if (GDB_MULTI_ARCH) |
| 1755 | fprintf_unfiltered (file, |
| 1756 | "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n", |
| 1757 | (long) current_gdbarch->pointer_to_address |
| 1758 | /*POINTER_TO_ADDRESS ()*/); |
| 1759 | #endif |
| 1760 | #ifdef POP_FRAME |
| 1761 | #if GDB_MULTI_ARCH |
| 1762 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1763 | fprintf_unfiltered (file, |
| 1764 | "gdbarch_dump: %s # %s\n", |
| 1765 | "POP_FRAME(-)", |
| 1766 | XSTRING (POP_FRAME (-))); |
| 1767 | #endif |
| 1768 | if (GDB_MULTI_ARCH) |
| 1769 | fprintf_unfiltered (file, |
| 1770 | "gdbarch_dump: POP_FRAME = <0x%08lx>\n", |
| 1771 | (long) current_gdbarch->pop_frame |
| 1772 | /*POP_FRAME ()*/); |
| 1773 | #endif |
| 1774 | #ifdef PREPARE_TO_PROCEED |
| 1775 | fprintf_unfiltered (file, |
| 1776 | "gdbarch_dump: %s # %s\n", |
| 1777 | "PREPARE_TO_PROCEED(select_it)", |
| 1778 | XSTRING (PREPARE_TO_PROCEED (select_it))); |
| 1779 | if (GDB_MULTI_ARCH) |
| 1780 | fprintf_unfiltered (file, |
| 1781 | "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n", |
| 1782 | (long) current_gdbarch->prepare_to_proceed |
| 1783 | /*PREPARE_TO_PROCEED ()*/); |
| 1784 | #endif |
| 1785 | if (GDB_MULTI_ARCH) |
| 1786 | fprintf_unfiltered (file, |
| 1787 | "gdbarch_dump: gdbarch_print_float_info_p() = %d\n", |
| 1788 | gdbarch_print_float_info_p (current_gdbarch)); |
| 1789 | if (GDB_MULTI_ARCH) |
| 1790 | fprintf_unfiltered (file, |
| 1791 | "gdbarch_dump: print_float_info = 0x%08lx\n", |
| 1792 | (long) current_gdbarch->print_float_info); |
| 1793 | if (GDB_MULTI_ARCH) |
| 1794 | fprintf_unfiltered (file, |
| 1795 | "gdbarch_dump: print_registers_info = 0x%08lx\n", |
| 1796 | (long) current_gdbarch->print_registers_info); |
| 1797 | if (GDB_MULTI_ARCH) |
| 1798 | fprintf_unfiltered (file, |
| 1799 | "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", |
| 1800 | gdbarch_print_vector_info_p (current_gdbarch)); |
| 1801 | if (GDB_MULTI_ARCH) |
| 1802 | fprintf_unfiltered (file, |
| 1803 | "gdbarch_dump: print_vector_info = 0x%08lx\n", |
| 1804 | (long) current_gdbarch->print_vector_info); |
| 1805 | #ifdef PROLOGUE_FRAMELESS_P |
| 1806 | fprintf_unfiltered (file, |
| 1807 | "gdbarch_dump: %s # %s\n", |
| 1808 | "PROLOGUE_FRAMELESS_P(ip)", |
| 1809 | XSTRING (PROLOGUE_FRAMELESS_P (ip))); |
| 1810 | if (GDB_MULTI_ARCH) |
| 1811 | fprintf_unfiltered (file, |
| 1812 | "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n", |
| 1813 | (long) current_gdbarch->prologue_frameless_p |
| 1814 | /*PROLOGUE_FRAMELESS_P ()*/); |
| 1815 | #endif |
| 1816 | #ifdef PS_REGNUM |
| 1817 | fprintf_unfiltered (file, |
| 1818 | "gdbarch_dump: PS_REGNUM # %s\n", |
| 1819 | XSTRING (PS_REGNUM)); |
| 1820 | fprintf_unfiltered (file, |
| 1821 | "gdbarch_dump: PS_REGNUM = %d\n", |
| 1822 | PS_REGNUM); |
| 1823 | #endif |
| 1824 | #ifdef PUSH_ARGUMENTS |
| 1825 | fprintf_unfiltered (file, |
| 1826 | "gdbarch_dump: %s # %s\n", |
| 1827 | "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)", |
| 1828 | XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr))); |
| 1829 | if (GDB_MULTI_ARCH) |
| 1830 | fprintf_unfiltered (file, |
| 1831 | "gdbarch_dump: PUSH_ARGUMENTS = <0x%08lx>\n", |
| 1832 | (long) current_gdbarch->push_arguments |
| 1833 | /*PUSH_ARGUMENTS ()*/); |
| 1834 | #endif |
| 1835 | #ifdef PUSH_DUMMY_FRAME |
| 1836 | #if GDB_MULTI_ARCH |
| 1837 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1838 | fprintf_unfiltered (file, |
| 1839 | "gdbarch_dump: %s # %s\n", |
| 1840 | "PUSH_DUMMY_FRAME(-)", |
| 1841 | XSTRING (PUSH_DUMMY_FRAME (-))); |
| 1842 | #endif |
| 1843 | if (GDB_MULTI_ARCH) |
| 1844 | fprintf_unfiltered (file, |
| 1845 | "gdbarch_dump: PUSH_DUMMY_FRAME = <0x%08lx>\n", |
| 1846 | (long) current_gdbarch->push_dummy_frame |
| 1847 | /*PUSH_DUMMY_FRAME ()*/); |
| 1848 | #endif |
| 1849 | #ifdef PUSH_RETURN_ADDRESS_P |
| 1850 | fprintf_unfiltered (file, |
| 1851 | "gdbarch_dump: %s # %s\n", |
| 1852 | "PUSH_RETURN_ADDRESS_P()", |
| 1853 | XSTRING (PUSH_RETURN_ADDRESS_P ())); |
| 1854 | fprintf_unfiltered (file, |
| 1855 | "gdbarch_dump: PUSH_RETURN_ADDRESS_P() = %d\n", |
| 1856 | PUSH_RETURN_ADDRESS_P ()); |
| 1857 | #endif |
| 1858 | #ifdef PUSH_RETURN_ADDRESS |
| 1859 | fprintf_unfiltered (file, |
| 1860 | "gdbarch_dump: %s # %s\n", |
| 1861 | "PUSH_RETURN_ADDRESS(pc, sp)", |
| 1862 | XSTRING (PUSH_RETURN_ADDRESS (pc, sp))); |
| 1863 | if (GDB_MULTI_ARCH) |
| 1864 | fprintf_unfiltered (file, |
| 1865 | "gdbarch_dump: PUSH_RETURN_ADDRESS = <0x%08lx>\n", |
| 1866 | (long) current_gdbarch->push_return_address |
| 1867 | /*PUSH_RETURN_ADDRESS ()*/); |
| 1868 | #endif |
| 1869 | #ifdef REGISTER_BYTE |
| 1870 | fprintf_unfiltered (file, |
| 1871 | "gdbarch_dump: %s # %s\n", |
| 1872 | "REGISTER_BYTE(reg_nr)", |
| 1873 | XSTRING (REGISTER_BYTE (reg_nr))); |
| 1874 | if (GDB_MULTI_ARCH) |
| 1875 | fprintf_unfiltered (file, |
| 1876 | "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n", |
| 1877 | (long) current_gdbarch->register_byte |
| 1878 | /*REGISTER_BYTE ()*/); |
| 1879 | #endif |
| 1880 | #ifdef REGISTER_BYTES |
| 1881 | fprintf_unfiltered (file, |
| 1882 | "gdbarch_dump: REGISTER_BYTES # %s\n", |
| 1883 | XSTRING (REGISTER_BYTES)); |
| 1884 | fprintf_unfiltered (file, |
| 1885 | "gdbarch_dump: REGISTER_BYTES = %d\n", |
| 1886 | REGISTER_BYTES); |
| 1887 | #endif |
| 1888 | #ifdef REGISTER_BYTES_OK_P |
| 1889 | fprintf_unfiltered (file, |
| 1890 | "gdbarch_dump: %s # %s\n", |
| 1891 | "REGISTER_BYTES_OK_P()", |
| 1892 | XSTRING (REGISTER_BYTES_OK_P ())); |
| 1893 | fprintf_unfiltered (file, |
| 1894 | "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n", |
| 1895 | REGISTER_BYTES_OK_P ()); |
| 1896 | #endif |
| 1897 | #ifdef REGISTER_BYTES_OK |
| 1898 | fprintf_unfiltered (file, |
| 1899 | "gdbarch_dump: %s # %s\n", |
| 1900 | "REGISTER_BYTES_OK(nr_bytes)", |
| 1901 | XSTRING (REGISTER_BYTES_OK (nr_bytes))); |
| 1902 | if (GDB_MULTI_ARCH) |
| 1903 | fprintf_unfiltered (file, |
| 1904 | "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n", |
| 1905 | (long) current_gdbarch->register_bytes_ok |
| 1906 | /*REGISTER_BYTES_OK ()*/); |
| 1907 | #endif |
| 1908 | #ifdef REGISTER_CONVERTIBLE |
| 1909 | fprintf_unfiltered (file, |
| 1910 | "gdbarch_dump: %s # %s\n", |
| 1911 | "REGISTER_CONVERTIBLE(nr)", |
| 1912 | XSTRING (REGISTER_CONVERTIBLE (nr))); |
| 1913 | if (GDB_MULTI_ARCH) |
| 1914 | fprintf_unfiltered (file, |
| 1915 | "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n", |
| 1916 | (long) current_gdbarch->register_convertible |
| 1917 | /*REGISTER_CONVERTIBLE ()*/); |
| 1918 | #endif |
| 1919 | #ifdef REGISTER_CONVERT_TO_RAW |
| 1920 | #if GDB_MULTI_ARCH |
| 1921 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1922 | fprintf_unfiltered (file, |
| 1923 | "gdbarch_dump: %s # %s\n", |
| 1924 | "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)", |
| 1925 | XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to))); |
| 1926 | #endif |
| 1927 | if (GDB_MULTI_ARCH) |
| 1928 | fprintf_unfiltered (file, |
| 1929 | "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n", |
| 1930 | (long) current_gdbarch->register_convert_to_raw |
| 1931 | /*REGISTER_CONVERT_TO_RAW ()*/); |
| 1932 | #endif |
| 1933 | #ifdef REGISTER_CONVERT_TO_VIRTUAL |
| 1934 | #if GDB_MULTI_ARCH |
| 1935 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1936 | fprintf_unfiltered (file, |
| 1937 | "gdbarch_dump: %s # %s\n", |
| 1938 | "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)", |
| 1939 | XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to))); |
| 1940 | #endif |
| 1941 | if (GDB_MULTI_ARCH) |
| 1942 | fprintf_unfiltered (file, |
| 1943 | "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n", |
| 1944 | (long) current_gdbarch->register_convert_to_virtual |
| 1945 | /*REGISTER_CONVERT_TO_VIRTUAL ()*/); |
| 1946 | #endif |
| 1947 | #ifdef REGISTER_NAME |
| 1948 | fprintf_unfiltered (file, |
| 1949 | "gdbarch_dump: %s # %s\n", |
| 1950 | "REGISTER_NAME(regnr)", |
| 1951 | XSTRING (REGISTER_NAME (regnr))); |
| 1952 | if (GDB_MULTI_ARCH) |
| 1953 | fprintf_unfiltered (file, |
| 1954 | "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n", |
| 1955 | (long) current_gdbarch->register_name |
| 1956 | /*REGISTER_NAME ()*/); |
| 1957 | #endif |
| 1958 | #ifdef REGISTER_RAW_SIZE |
| 1959 | fprintf_unfiltered (file, |
| 1960 | "gdbarch_dump: %s # %s\n", |
| 1961 | "REGISTER_RAW_SIZE(reg_nr)", |
| 1962 | XSTRING (REGISTER_RAW_SIZE (reg_nr))); |
| 1963 | if (GDB_MULTI_ARCH) |
| 1964 | fprintf_unfiltered (file, |
| 1965 | "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n", |
| 1966 | (long) current_gdbarch->register_raw_size |
| 1967 | /*REGISTER_RAW_SIZE ()*/); |
| 1968 | #endif |
| 1969 | #ifdef REGISTER_SIM_REGNO |
| 1970 | fprintf_unfiltered (file, |
| 1971 | "gdbarch_dump: %s # %s\n", |
| 1972 | "REGISTER_SIM_REGNO(reg_nr)", |
| 1973 | XSTRING (REGISTER_SIM_REGNO (reg_nr))); |
| 1974 | if (GDB_MULTI_ARCH) |
| 1975 | fprintf_unfiltered (file, |
| 1976 | "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n", |
| 1977 | (long) current_gdbarch->register_sim_regno |
| 1978 | /*REGISTER_SIM_REGNO ()*/); |
| 1979 | #endif |
| 1980 | #ifdef REGISTER_SIZE |
| 1981 | fprintf_unfiltered (file, |
| 1982 | "gdbarch_dump: REGISTER_SIZE # %s\n", |
| 1983 | XSTRING (REGISTER_SIZE)); |
| 1984 | fprintf_unfiltered (file, |
| 1985 | "gdbarch_dump: REGISTER_SIZE = %d\n", |
| 1986 | REGISTER_SIZE); |
| 1987 | #endif |
| 1988 | #ifdef REGISTER_TO_VALUE |
| 1989 | #if GDB_MULTI_ARCH |
| 1990 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1991 | fprintf_unfiltered (file, |
| 1992 | "gdbarch_dump: %s # %s\n", |
| 1993 | "REGISTER_TO_VALUE(regnum, type, from, to)", |
| 1994 | XSTRING (REGISTER_TO_VALUE (regnum, type, from, to))); |
| 1995 | #endif |
| 1996 | if (GDB_MULTI_ARCH) |
| 1997 | fprintf_unfiltered (file, |
| 1998 | "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n", |
| 1999 | (long) current_gdbarch->register_to_value |
| 2000 | /*REGISTER_TO_VALUE ()*/); |
| 2001 | #endif |
| 2002 | #ifdef REGISTER_VIRTUAL_SIZE |
| 2003 | fprintf_unfiltered (file, |
| 2004 | "gdbarch_dump: %s # %s\n", |
| 2005 | "REGISTER_VIRTUAL_SIZE(reg_nr)", |
| 2006 | XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr))); |
| 2007 | if (GDB_MULTI_ARCH) |
| 2008 | fprintf_unfiltered (file, |
| 2009 | "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n", |
| 2010 | (long) current_gdbarch->register_virtual_size |
| 2011 | /*REGISTER_VIRTUAL_SIZE ()*/); |
| 2012 | #endif |
| 2013 | #ifdef REGISTER_VIRTUAL_TYPE |
| 2014 | fprintf_unfiltered (file, |
| 2015 | "gdbarch_dump: %s # %s\n", |
| 2016 | "REGISTER_VIRTUAL_TYPE(reg_nr)", |
| 2017 | XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr))); |
| 2018 | if (GDB_MULTI_ARCH) |
| 2019 | fprintf_unfiltered (file, |
| 2020 | "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n", |
| 2021 | (long) current_gdbarch->register_virtual_type |
| 2022 | /*REGISTER_VIRTUAL_TYPE ()*/); |
| 2023 | #endif |
| 2024 | #ifdef REG_STRUCT_HAS_ADDR_P |
| 2025 | fprintf_unfiltered (file, |
| 2026 | "gdbarch_dump: %s # %s\n", |
| 2027 | "REG_STRUCT_HAS_ADDR_P()", |
| 2028 | XSTRING (REG_STRUCT_HAS_ADDR_P ())); |
| 2029 | fprintf_unfiltered (file, |
| 2030 | "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n", |
| 2031 | REG_STRUCT_HAS_ADDR_P ()); |
| 2032 | #endif |
| 2033 | #ifdef REG_STRUCT_HAS_ADDR |
| 2034 | fprintf_unfiltered (file, |
| 2035 | "gdbarch_dump: %s # %s\n", |
| 2036 | "REG_STRUCT_HAS_ADDR(gcc_p, type)", |
| 2037 | XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type))); |
| 2038 | if (GDB_MULTI_ARCH) |
| 2039 | fprintf_unfiltered (file, |
| 2040 | "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n", |
| 2041 | (long) current_gdbarch->reg_struct_has_addr |
| 2042 | /*REG_STRUCT_HAS_ADDR ()*/); |
| 2043 | #endif |
| 2044 | #ifdef REMOTE_TRANSLATE_XFER_ADDRESS |
| 2045 | #if GDB_MULTI_ARCH |
| 2046 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2047 | fprintf_unfiltered (file, |
| 2048 | "gdbarch_dump: %s # %s\n", |
| 2049 | "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)", |
| 2050 | XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len))); |
| 2051 | #endif |
| 2052 | if (GDB_MULTI_ARCH) |
| 2053 | fprintf_unfiltered (file, |
| 2054 | "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n", |
| 2055 | (long) current_gdbarch->remote_translate_xfer_address |
| 2056 | /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/); |
| 2057 | #endif |
| 2058 | #ifdef RETURN_VALUE_ON_STACK |
| 2059 | fprintf_unfiltered (file, |
| 2060 | "gdbarch_dump: %s # %s\n", |
| 2061 | "RETURN_VALUE_ON_STACK(type)", |
| 2062 | XSTRING (RETURN_VALUE_ON_STACK (type))); |
| 2063 | if (GDB_MULTI_ARCH) |
| 2064 | fprintf_unfiltered (file, |
| 2065 | "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n", |
| 2066 | (long) current_gdbarch->return_value_on_stack |
| 2067 | /*RETURN_VALUE_ON_STACK ()*/); |
| 2068 | #endif |
| 2069 | #ifdef SAVED_PC_AFTER_CALL |
| 2070 | fprintf_unfiltered (file, |
| 2071 | "gdbarch_dump: %s # %s\n", |
| 2072 | "SAVED_PC_AFTER_CALL(frame)", |
| 2073 | XSTRING (SAVED_PC_AFTER_CALL (frame))); |
| 2074 | if (GDB_MULTI_ARCH) |
| 2075 | fprintf_unfiltered (file, |
| 2076 | "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n", |
| 2077 | (long) current_gdbarch->saved_pc_after_call |
| 2078 | /*SAVED_PC_AFTER_CALL ()*/); |
| 2079 | #endif |
| 2080 | #ifdef SAVE_DUMMY_FRAME_TOS_P |
| 2081 | fprintf_unfiltered (file, |
| 2082 | "gdbarch_dump: %s # %s\n", |
| 2083 | "SAVE_DUMMY_FRAME_TOS_P()", |
| 2084 | XSTRING (SAVE_DUMMY_FRAME_TOS_P ())); |
| 2085 | fprintf_unfiltered (file, |
| 2086 | "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n", |
| 2087 | SAVE_DUMMY_FRAME_TOS_P ()); |
| 2088 | #endif |
| 2089 | #ifdef SAVE_DUMMY_FRAME_TOS |
| 2090 | #if GDB_MULTI_ARCH |
| 2091 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2092 | fprintf_unfiltered (file, |
| 2093 | "gdbarch_dump: %s # %s\n", |
| 2094 | "SAVE_DUMMY_FRAME_TOS(sp)", |
| 2095 | XSTRING (SAVE_DUMMY_FRAME_TOS (sp))); |
| 2096 | #endif |
| 2097 | if (GDB_MULTI_ARCH) |
| 2098 | fprintf_unfiltered (file, |
| 2099 | "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n", |
| 2100 | (long) current_gdbarch->save_dummy_frame_tos |
| 2101 | /*SAVE_DUMMY_FRAME_TOS ()*/); |
| 2102 | #endif |
| 2103 | #ifdef SDB_REG_TO_REGNUM |
| 2104 | fprintf_unfiltered (file, |
| 2105 | "gdbarch_dump: %s # %s\n", |
| 2106 | "SDB_REG_TO_REGNUM(sdb_regnr)", |
| 2107 | XSTRING (SDB_REG_TO_REGNUM (sdb_regnr))); |
| 2108 | if (GDB_MULTI_ARCH) |
| 2109 | fprintf_unfiltered (file, |
| 2110 | "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n", |
| 2111 | (long) current_gdbarch->sdb_reg_to_regnum |
| 2112 | /*SDB_REG_TO_REGNUM ()*/); |
| 2113 | #endif |
| 2114 | #ifdef SIGTRAMP_END_P |
| 2115 | fprintf_unfiltered (file, |
| 2116 | "gdbarch_dump: %s # %s\n", |
| 2117 | "SIGTRAMP_END_P()", |
| 2118 | XSTRING (SIGTRAMP_END_P ())); |
| 2119 | fprintf_unfiltered (file, |
| 2120 | "gdbarch_dump: SIGTRAMP_END_P() = %d\n", |
| 2121 | SIGTRAMP_END_P ()); |
| 2122 | #endif |
| 2123 | #ifdef SIGTRAMP_END |
| 2124 | fprintf_unfiltered (file, |
| 2125 | "gdbarch_dump: %s # %s\n", |
| 2126 | "SIGTRAMP_END(pc)", |
| 2127 | XSTRING (SIGTRAMP_END (pc))); |
| 2128 | if (GDB_MULTI_ARCH) |
| 2129 | fprintf_unfiltered (file, |
| 2130 | "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n", |
| 2131 | (long) current_gdbarch->sigtramp_end |
| 2132 | /*SIGTRAMP_END ()*/); |
| 2133 | #endif |
| 2134 | #ifdef SIGTRAMP_START_P |
| 2135 | fprintf_unfiltered (file, |
| 2136 | "gdbarch_dump: %s # %s\n", |
| 2137 | "SIGTRAMP_START_P()", |
| 2138 | XSTRING (SIGTRAMP_START_P ())); |
| 2139 | fprintf_unfiltered (file, |
| 2140 | "gdbarch_dump: SIGTRAMP_START_P() = %d\n", |
| 2141 | SIGTRAMP_START_P ()); |
| 2142 | #endif |
| 2143 | #ifdef SIGTRAMP_START |
| 2144 | fprintf_unfiltered (file, |
| 2145 | "gdbarch_dump: %s # %s\n", |
| 2146 | "SIGTRAMP_START(pc)", |
| 2147 | XSTRING (SIGTRAMP_START (pc))); |
| 2148 | if (GDB_MULTI_ARCH) |
| 2149 | fprintf_unfiltered (file, |
| 2150 | "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n", |
| 2151 | (long) current_gdbarch->sigtramp_start |
| 2152 | /*SIGTRAMP_START ()*/); |
| 2153 | #endif |
| 2154 | #ifdef SIZEOF_CALL_DUMMY_WORDS |
| 2155 | fprintf_unfiltered (file, |
| 2156 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n", |
| 2157 | XSTRING (SIZEOF_CALL_DUMMY_WORDS)); |
| 2158 | fprintf_unfiltered (file, |
| 2159 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n", |
| 2160 | (long) SIZEOF_CALL_DUMMY_WORDS); |
| 2161 | #endif |
| 2162 | #ifdef SKIP_PROLOGUE |
| 2163 | fprintf_unfiltered (file, |
| 2164 | "gdbarch_dump: %s # %s\n", |
| 2165 | "SKIP_PROLOGUE(ip)", |
| 2166 | XSTRING (SKIP_PROLOGUE (ip))); |
| 2167 | if (GDB_MULTI_ARCH) |
| 2168 | fprintf_unfiltered (file, |
| 2169 | "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n", |
| 2170 | (long) current_gdbarch->skip_prologue |
| 2171 | /*SKIP_PROLOGUE ()*/); |
| 2172 | #endif |
| 2173 | #ifdef SKIP_TRAMPOLINE_CODE |
| 2174 | fprintf_unfiltered (file, |
| 2175 | "gdbarch_dump: %s # %s\n", |
| 2176 | "SKIP_TRAMPOLINE_CODE(pc)", |
| 2177 | XSTRING (SKIP_TRAMPOLINE_CODE (pc))); |
| 2178 | if (GDB_MULTI_ARCH) |
| 2179 | fprintf_unfiltered (file, |
| 2180 | "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n", |
| 2181 | (long) current_gdbarch->skip_trampoline_code |
| 2182 | /*SKIP_TRAMPOLINE_CODE ()*/); |
| 2183 | #endif |
| 2184 | #ifdef SMASH_TEXT_ADDRESS |
| 2185 | fprintf_unfiltered (file, |
| 2186 | "gdbarch_dump: %s # %s\n", |
| 2187 | "SMASH_TEXT_ADDRESS(addr)", |
| 2188 | XSTRING (SMASH_TEXT_ADDRESS (addr))); |
| 2189 | if (GDB_MULTI_ARCH) |
| 2190 | fprintf_unfiltered (file, |
| 2191 | "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n", |
| 2192 | (long) current_gdbarch->smash_text_address |
| 2193 | /*SMASH_TEXT_ADDRESS ()*/); |
| 2194 | #endif |
| 2195 | #ifdef SOFTWARE_SINGLE_STEP_P |
| 2196 | fprintf_unfiltered (file, |
| 2197 | "gdbarch_dump: %s # %s\n", |
| 2198 | "SOFTWARE_SINGLE_STEP_P()", |
| 2199 | XSTRING (SOFTWARE_SINGLE_STEP_P ())); |
| 2200 | fprintf_unfiltered (file, |
| 2201 | "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n", |
| 2202 | SOFTWARE_SINGLE_STEP_P ()); |
| 2203 | #endif |
| 2204 | #ifdef SOFTWARE_SINGLE_STEP |
| 2205 | #if GDB_MULTI_ARCH |
| 2206 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2207 | fprintf_unfiltered (file, |
| 2208 | "gdbarch_dump: %s # %s\n", |
| 2209 | "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)", |
| 2210 | XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p))); |
| 2211 | #endif |
| 2212 | if (GDB_MULTI_ARCH) |
| 2213 | fprintf_unfiltered (file, |
| 2214 | "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n", |
| 2215 | (long) current_gdbarch->software_single_step |
| 2216 | /*SOFTWARE_SINGLE_STEP ()*/); |
| 2217 | #endif |
| 2218 | #ifdef SP_REGNUM |
| 2219 | fprintf_unfiltered (file, |
| 2220 | "gdbarch_dump: SP_REGNUM # %s\n", |
| 2221 | XSTRING (SP_REGNUM)); |
| 2222 | fprintf_unfiltered (file, |
| 2223 | "gdbarch_dump: SP_REGNUM = %d\n", |
| 2224 | SP_REGNUM); |
| 2225 | #endif |
| 2226 | #ifdef STAB_REG_TO_REGNUM |
| 2227 | fprintf_unfiltered (file, |
| 2228 | "gdbarch_dump: %s # %s\n", |
| 2229 | "STAB_REG_TO_REGNUM(stab_regnr)", |
| 2230 | XSTRING (STAB_REG_TO_REGNUM (stab_regnr))); |
| 2231 | if (GDB_MULTI_ARCH) |
| 2232 | fprintf_unfiltered (file, |
| 2233 | "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n", |
| 2234 | (long) current_gdbarch->stab_reg_to_regnum |
| 2235 | /*STAB_REG_TO_REGNUM ()*/); |
| 2236 | #endif |
| 2237 | #ifdef STACK_ALIGN_P |
| 2238 | fprintf_unfiltered (file, |
| 2239 | "gdbarch_dump: %s # %s\n", |
| 2240 | "STACK_ALIGN_P()", |
| 2241 | XSTRING (STACK_ALIGN_P ())); |
| 2242 | fprintf_unfiltered (file, |
| 2243 | "gdbarch_dump: STACK_ALIGN_P() = %d\n", |
| 2244 | STACK_ALIGN_P ()); |
| 2245 | #endif |
| 2246 | #ifdef STACK_ALIGN |
| 2247 | fprintf_unfiltered (file, |
| 2248 | "gdbarch_dump: %s # %s\n", |
| 2249 | "STACK_ALIGN(sp)", |
| 2250 | XSTRING (STACK_ALIGN (sp))); |
| 2251 | if (GDB_MULTI_ARCH) |
| 2252 | fprintf_unfiltered (file, |
| 2253 | "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n", |
| 2254 | (long) current_gdbarch->stack_align |
| 2255 | /*STACK_ALIGN ()*/); |
| 2256 | #endif |
| 2257 | #ifdef STORE_RETURN_VALUE |
| 2258 | #if GDB_MULTI_ARCH |
| 2259 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2260 | fprintf_unfiltered (file, |
| 2261 | "gdbarch_dump: %s # %s\n", |
| 2262 | "STORE_RETURN_VALUE(type, regcache, valbuf)", |
| 2263 | XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf))); |
| 2264 | #endif |
| 2265 | if (GDB_MULTI_ARCH) |
| 2266 | fprintf_unfiltered (file, |
| 2267 | "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n", |
| 2268 | (long) current_gdbarch->store_return_value |
| 2269 | /*STORE_RETURN_VALUE ()*/); |
| 2270 | #endif |
| 2271 | #ifdef STORE_STRUCT_RETURN |
| 2272 | #if GDB_MULTI_ARCH |
| 2273 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2274 | fprintf_unfiltered (file, |
| 2275 | "gdbarch_dump: %s # %s\n", |
| 2276 | "STORE_STRUCT_RETURN(addr, sp)", |
| 2277 | XSTRING (STORE_STRUCT_RETURN (addr, sp))); |
| 2278 | #endif |
| 2279 | if (GDB_MULTI_ARCH) |
| 2280 | fprintf_unfiltered (file, |
| 2281 | "gdbarch_dump: STORE_STRUCT_RETURN = <0x%08lx>\n", |
| 2282 | (long) current_gdbarch->store_struct_return |
| 2283 | /*STORE_STRUCT_RETURN ()*/); |
| 2284 | #endif |
| 2285 | #ifdef TARGET_ADDR_BIT |
| 2286 | fprintf_unfiltered (file, |
| 2287 | "gdbarch_dump: TARGET_ADDR_BIT # %s\n", |
| 2288 | XSTRING (TARGET_ADDR_BIT)); |
| 2289 | fprintf_unfiltered (file, |
| 2290 | "gdbarch_dump: TARGET_ADDR_BIT = %d\n", |
| 2291 | TARGET_ADDR_BIT); |
| 2292 | #endif |
| 2293 | #ifdef TARGET_ARCHITECTURE |
| 2294 | fprintf_unfiltered (file, |
| 2295 | "gdbarch_dump: TARGET_ARCHITECTURE # %s\n", |
| 2296 | XSTRING (TARGET_ARCHITECTURE)); |
| 2297 | if (TARGET_ARCHITECTURE != NULL) |
| 2298 | fprintf_unfiltered (file, |
| 2299 | "gdbarch_dump: TARGET_ARCHITECTURE = %s\n", |
| 2300 | TARGET_ARCHITECTURE->printable_name); |
| 2301 | #endif |
| 2302 | #ifdef TARGET_BFD_VMA_BIT |
| 2303 | fprintf_unfiltered (file, |
| 2304 | "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n", |
| 2305 | XSTRING (TARGET_BFD_VMA_BIT)); |
| 2306 | fprintf_unfiltered (file, |
| 2307 | "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n", |
| 2308 | TARGET_BFD_VMA_BIT); |
| 2309 | #endif |
| 2310 | #ifdef TARGET_BYTE_ORDER |
| 2311 | fprintf_unfiltered (file, |
| 2312 | "gdbarch_dump: TARGET_BYTE_ORDER # %s\n", |
| 2313 | XSTRING (TARGET_BYTE_ORDER)); |
| 2314 | fprintf_unfiltered (file, |
| 2315 | "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n", |
| 2316 | (long) TARGET_BYTE_ORDER); |
| 2317 | #endif |
| 2318 | #ifdef TARGET_CHAR_SIGNED |
| 2319 | fprintf_unfiltered (file, |
| 2320 | "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n", |
| 2321 | XSTRING (TARGET_CHAR_SIGNED)); |
| 2322 | fprintf_unfiltered (file, |
| 2323 | "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n", |
| 2324 | TARGET_CHAR_SIGNED); |
| 2325 | #endif |
| 2326 | #ifdef TARGET_DOUBLE_BIT |
| 2327 | fprintf_unfiltered (file, |
| 2328 | "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n", |
| 2329 | XSTRING (TARGET_DOUBLE_BIT)); |
| 2330 | fprintf_unfiltered (file, |
| 2331 | "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n", |
| 2332 | TARGET_DOUBLE_BIT); |
| 2333 | #endif |
| 2334 | #ifdef TARGET_DOUBLE_FORMAT |
| 2335 | fprintf_unfiltered (file, |
| 2336 | "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n", |
| 2337 | XSTRING (TARGET_DOUBLE_FORMAT)); |
| 2338 | fprintf_unfiltered (file, |
| 2339 | "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n", |
| 2340 | (TARGET_DOUBLE_FORMAT)->name); |
| 2341 | #endif |
| 2342 | #ifdef TARGET_FLOAT_BIT |
| 2343 | fprintf_unfiltered (file, |
| 2344 | "gdbarch_dump: TARGET_FLOAT_BIT # %s\n", |
| 2345 | XSTRING (TARGET_FLOAT_BIT)); |
| 2346 | fprintf_unfiltered (file, |
| 2347 | "gdbarch_dump: TARGET_FLOAT_BIT = %d\n", |
| 2348 | TARGET_FLOAT_BIT); |
| 2349 | #endif |
| 2350 | #ifdef TARGET_FLOAT_FORMAT |
| 2351 | fprintf_unfiltered (file, |
| 2352 | "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n", |
| 2353 | XSTRING (TARGET_FLOAT_FORMAT)); |
| 2354 | fprintf_unfiltered (file, |
| 2355 | "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n", |
| 2356 | (TARGET_FLOAT_FORMAT)->name); |
| 2357 | #endif |
| 2358 | #ifdef TARGET_INT_BIT |
| 2359 | fprintf_unfiltered (file, |
| 2360 | "gdbarch_dump: TARGET_INT_BIT # %s\n", |
| 2361 | XSTRING (TARGET_INT_BIT)); |
| 2362 | fprintf_unfiltered (file, |
| 2363 | "gdbarch_dump: TARGET_INT_BIT = %d\n", |
| 2364 | TARGET_INT_BIT); |
| 2365 | #endif |
| 2366 | #ifdef TARGET_LONG_BIT |
| 2367 | fprintf_unfiltered (file, |
| 2368 | "gdbarch_dump: TARGET_LONG_BIT # %s\n", |
| 2369 | XSTRING (TARGET_LONG_BIT)); |
| 2370 | fprintf_unfiltered (file, |
| 2371 | "gdbarch_dump: TARGET_LONG_BIT = %d\n", |
| 2372 | TARGET_LONG_BIT); |
| 2373 | #endif |
| 2374 | #ifdef TARGET_LONG_DOUBLE_BIT |
| 2375 | fprintf_unfiltered (file, |
| 2376 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n", |
| 2377 | XSTRING (TARGET_LONG_DOUBLE_BIT)); |
| 2378 | fprintf_unfiltered (file, |
| 2379 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n", |
| 2380 | TARGET_LONG_DOUBLE_BIT); |
| 2381 | #endif |
| 2382 | #ifdef TARGET_LONG_DOUBLE_FORMAT |
| 2383 | fprintf_unfiltered (file, |
| 2384 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n", |
| 2385 | XSTRING (TARGET_LONG_DOUBLE_FORMAT)); |
| 2386 | fprintf_unfiltered (file, |
| 2387 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n", |
| 2388 | (TARGET_LONG_DOUBLE_FORMAT)->name); |
| 2389 | #endif |
| 2390 | #ifdef TARGET_LONG_LONG_BIT |
| 2391 | fprintf_unfiltered (file, |
| 2392 | "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n", |
| 2393 | XSTRING (TARGET_LONG_LONG_BIT)); |
| 2394 | fprintf_unfiltered (file, |
| 2395 | "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n", |
| 2396 | TARGET_LONG_LONG_BIT); |
| 2397 | #endif |
| 2398 | #ifdef TARGET_PRINT_INSN |
| 2399 | fprintf_unfiltered (file, |
| 2400 | "gdbarch_dump: %s # %s\n", |
| 2401 | "TARGET_PRINT_INSN(vma, info)", |
| 2402 | XSTRING (TARGET_PRINT_INSN (vma, info))); |
| 2403 | if (GDB_MULTI_ARCH) |
| 2404 | fprintf_unfiltered (file, |
| 2405 | "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n", |
| 2406 | (long) current_gdbarch->print_insn |
| 2407 | /*TARGET_PRINT_INSN ()*/); |
| 2408 | #endif |
| 2409 | #ifdef TARGET_PTR_BIT |
| 2410 | fprintf_unfiltered (file, |
| 2411 | "gdbarch_dump: TARGET_PTR_BIT # %s\n", |
| 2412 | XSTRING (TARGET_PTR_BIT)); |
| 2413 | fprintf_unfiltered (file, |
| 2414 | "gdbarch_dump: TARGET_PTR_BIT = %d\n", |
| 2415 | TARGET_PTR_BIT); |
| 2416 | #endif |
| 2417 | #ifdef TARGET_READ_FP |
| 2418 | fprintf_unfiltered (file, |
| 2419 | "gdbarch_dump: %s # %s\n", |
| 2420 | "TARGET_READ_FP()", |
| 2421 | XSTRING (TARGET_READ_FP ())); |
| 2422 | if (GDB_MULTI_ARCH) |
| 2423 | fprintf_unfiltered (file, |
| 2424 | "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n", |
| 2425 | (long) current_gdbarch->read_fp |
| 2426 | /*TARGET_READ_FP ()*/); |
| 2427 | #endif |
| 2428 | #ifdef TARGET_READ_PC |
| 2429 | fprintf_unfiltered (file, |
| 2430 | "gdbarch_dump: %s # %s\n", |
| 2431 | "TARGET_READ_PC(ptid)", |
| 2432 | XSTRING (TARGET_READ_PC (ptid))); |
| 2433 | if (GDB_MULTI_ARCH) |
| 2434 | fprintf_unfiltered (file, |
| 2435 | "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n", |
| 2436 | (long) current_gdbarch->read_pc |
| 2437 | /*TARGET_READ_PC ()*/); |
| 2438 | #endif |
| 2439 | #ifdef TARGET_READ_SP |
| 2440 | fprintf_unfiltered (file, |
| 2441 | "gdbarch_dump: %s # %s\n", |
| 2442 | "TARGET_READ_SP()", |
| 2443 | XSTRING (TARGET_READ_SP ())); |
| 2444 | if (GDB_MULTI_ARCH) |
| 2445 | fprintf_unfiltered (file, |
| 2446 | "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n", |
| 2447 | (long) current_gdbarch->read_sp |
| 2448 | /*TARGET_READ_SP ()*/); |
| 2449 | #endif |
| 2450 | #ifdef TARGET_SHORT_BIT |
| 2451 | fprintf_unfiltered (file, |
| 2452 | "gdbarch_dump: TARGET_SHORT_BIT # %s\n", |
| 2453 | XSTRING (TARGET_SHORT_BIT)); |
| 2454 | fprintf_unfiltered (file, |
| 2455 | "gdbarch_dump: TARGET_SHORT_BIT = %d\n", |
| 2456 | TARGET_SHORT_BIT); |
| 2457 | #endif |
| 2458 | #ifdef TARGET_VIRTUAL_FRAME_POINTER |
| 2459 | #if GDB_MULTI_ARCH |
| 2460 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2461 | fprintf_unfiltered (file, |
| 2462 | "gdbarch_dump: %s # %s\n", |
| 2463 | "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)", |
| 2464 | XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset))); |
| 2465 | #endif |
| 2466 | if (GDB_MULTI_ARCH) |
| 2467 | fprintf_unfiltered (file, |
| 2468 | "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n", |
| 2469 | (long) current_gdbarch->virtual_frame_pointer |
| 2470 | /*TARGET_VIRTUAL_FRAME_POINTER ()*/); |
| 2471 | #endif |
| 2472 | #ifdef TARGET_WRITE_PC |
| 2473 | #if GDB_MULTI_ARCH |
| 2474 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2475 | fprintf_unfiltered (file, |
| 2476 | "gdbarch_dump: %s # %s\n", |
| 2477 | "TARGET_WRITE_PC(val, ptid)", |
| 2478 | XSTRING (TARGET_WRITE_PC (val, ptid))); |
| 2479 | #endif |
| 2480 | if (GDB_MULTI_ARCH) |
| 2481 | fprintf_unfiltered (file, |
| 2482 | "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n", |
| 2483 | (long) current_gdbarch->write_pc |
| 2484 | /*TARGET_WRITE_PC ()*/); |
| 2485 | #endif |
| 2486 | #ifdef TARGET_WRITE_SP |
| 2487 | #if GDB_MULTI_ARCH |
| 2488 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2489 | fprintf_unfiltered (file, |
| 2490 | "gdbarch_dump: %s # %s\n", |
| 2491 | "TARGET_WRITE_SP(val)", |
| 2492 | XSTRING (TARGET_WRITE_SP (val))); |
| 2493 | #endif |
| 2494 | if (GDB_MULTI_ARCH) |
| 2495 | fprintf_unfiltered (file, |
| 2496 | "gdbarch_dump: TARGET_WRITE_SP = <0x%08lx>\n", |
| 2497 | (long) current_gdbarch->write_sp |
| 2498 | /*TARGET_WRITE_SP ()*/); |
| 2499 | #endif |
| 2500 | #ifdef USE_STRUCT_CONVENTION |
| 2501 | fprintf_unfiltered (file, |
| 2502 | "gdbarch_dump: %s # %s\n", |
| 2503 | "USE_STRUCT_CONVENTION(gcc_p, value_type)", |
| 2504 | XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type))); |
| 2505 | if (GDB_MULTI_ARCH) |
| 2506 | fprintf_unfiltered (file, |
| 2507 | "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n", |
| 2508 | (long) current_gdbarch->use_struct_convention |
| 2509 | /*USE_STRUCT_CONVENTION ()*/); |
| 2510 | #endif |
| 2511 | #ifdef VALUE_TO_REGISTER |
| 2512 | #if GDB_MULTI_ARCH |
| 2513 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2514 | fprintf_unfiltered (file, |
| 2515 | "gdbarch_dump: %s # %s\n", |
| 2516 | "VALUE_TO_REGISTER(type, regnum, from, to)", |
| 2517 | XSTRING (VALUE_TO_REGISTER (type, regnum, from, to))); |
| 2518 | #endif |
| 2519 | if (GDB_MULTI_ARCH) |
| 2520 | fprintf_unfiltered (file, |
| 2521 | "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n", |
| 2522 | (long) current_gdbarch->value_to_register |
| 2523 | /*VALUE_TO_REGISTER ()*/); |
| 2524 | #endif |
| 2525 | if (current_gdbarch->dump_tdep != NULL) |
| 2526 | current_gdbarch->dump_tdep (current_gdbarch, file); |
| 2527 | } |
| 2528 | |
| 2529 | struct gdbarch_tdep * |
| 2530 | gdbarch_tdep (struct gdbarch *gdbarch) |
| 2531 | { |
| 2532 | if (gdbarch_debug >= 2) |
| 2533 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
| 2534 | return gdbarch->tdep; |
| 2535 | } |
| 2536 | |
| 2537 | |
| 2538 | const struct bfd_arch_info * |
| 2539 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
| 2540 | { |
| 2541 | gdb_assert (gdbarch != NULL); |
| 2542 | if (gdbarch_debug >= 2) |
| 2543 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
| 2544 | return gdbarch->bfd_arch_info; |
| 2545 | } |
| 2546 | |
| 2547 | int |
| 2548 | gdbarch_byte_order (struct gdbarch *gdbarch) |
| 2549 | { |
| 2550 | gdb_assert (gdbarch != NULL); |
| 2551 | if (gdbarch_debug >= 2) |
| 2552 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
| 2553 | return gdbarch->byte_order; |
| 2554 | } |
| 2555 | |
| 2556 | int |
| 2557 | gdbarch_short_bit (struct gdbarch *gdbarch) |
| 2558 | { |
| 2559 | gdb_assert (gdbarch != NULL); |
| 2560 | /* Skip verify of short_bit, invalid_p == 0 */ |
| 2561 | if (gdbarch_debug >= 2) |
| 2562 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
| 2563 | return gdbarch->short_bit; |
| 2564 | } |
| 2565 | |
| 2566 | void |
| 2567 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
| 2568 | int short_bit) |
| 2569 | { |
| 2570 | gdbarch->short_bit = short_bit; |
| 2571 | } |
| 2572 | |
| 2573 | int |
| 2574 | gdbarch_int_bit (struct gdbarch *gdbarch) |
| 2575 | { |
| 2576 | gdb_assert (gdbarch != NULL); |
| 2577 | /* Skip verify of int_bit, invalid_p == 0 */ |
| 2578 | if (gdbarch_debug >= 2) |
| 2579 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
| 2580 | return gdbarch->int_bit; |
| 2581 | } |
| 2582 | |
| 2583 | void |
| 2584 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
| 2585 | int int_bit) |
| 2586 | { |
| 2587 | gdbarch->int_bit = int_bit; |
| 2588 | } |
| 2589 | |
| 2590 | int |
| 2591 | gdbarch_long_bit (struct gdbarch *gdbarch) |
| 2592 | { |
| 2593 | gdb_assert (gdbarch != NULL); |
| 2594 | /* Skip verify of long_bit, invalid_p == 0 */ |
| 2595 | if (gdbarch_debug >= 2) |
| 2596 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
| 2597 | return gdbarch->long_bit; |
| 2598 | } |
| 2599 | |
| 2600 | void |
| 2601 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
| 2602 | int long_bit) |
| 2603 | { |
| 2604 | gdbarch->long_bit = long_bit; |
| 2605 | } |
| 2606 | |
| 2607 | int |
| 2608 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
| 2609 | { |
| 2610 | gdb_assert (gdbarch != NULL); |
| 2611 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
| 2612 | if (gdbarch_debug >= 2) |
| 2613 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
| 2614 | return gdbarch->long_long_bit; |
| 2615 | } |
| 2616 | |
| 2617 | void |
| 2618 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
| 2619 | int long_long_bit) |
| 2620 | { |
| 2621 | gdbarch->long_long_bit = long_long_bit; |
| 2622 | } |
| 2623 | |
| 2624 | int |
| 2625 | gdbarch_float_bit (struct gdbarch *gdbarch) |
| 2626 | { |
| 2627 | gdb_assert (gdbarch != NULL); |
| 2628 | /* Skip verify of float_bit, invalid_p == 0 */ |
| 2629 | if (gdbarch_debug >= 2) |
| 2630 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
| 2631 | return gdbarch->float_bit; |
| 2632 | } |
| 2633 | |
| 2634 | void |
| 2635 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
| 2636 | int float_bit) |
| 2637 | { |
| 2638 | gdbarch->float_bit = float_bit; |
| 2639 | } |
| 2640 | |
| 2641 | int |
| 2642 | gdbarch_double_bit (struct gdbarch *gdbarch) |
| 2643 | { |
| 2644 | gdb_assert (gdbarch != NULL); |
| 2645 | /* Skip verify of double_bit, invalid_p == 0 */ |
| 2646 | if (gdbarch_debug >= 2) |
| 2647 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
| 2648 | return gdbarch->double_bit; |
| 2649 | } |
| 2650 | |
| 2651 | void |
| 2652 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
| 2653 | int double_bit) |
| 2654 | { |
| 2655 | gdbarch->double_bit = double_bit; |
| 2656 | } |
| 2657 | |
| 2658 | int |
| 2659 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
| 2660 | { |
| 2661 | gdb_assert (gdbarch != NULL); |
| 2662 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
| 2663 | if (gdbarch_debug >= 2) |
| 2664 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
| 2665 | return gdbarch->long_double_bit; |
| 2666 | } |
| 2667 | |
| 2668 | void |
| 2669 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
| 2670 | int long_double_bit) |
| 2671 | { |
| 2672 | gdbarch->long_double_bit = long_double_bit; |
| 2673 | } |
| 2674 | |
| 2675 | int |
| 2676 | gdbarch_ptr_bit (struct gdbarch *gdbarch) |
| 2677 | { |
| 2678 | gdb_assert (gdbarch != NULL); |
| 2679 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
| 2680 | if (gdbarch_debug >= 2) |
| 2681 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); |
| 2682 | return gdbarch->ptr_bit; |
| 2683 | } |
| 2684 | |
| 2685 | void |
| 2686 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, |
| 2687 | int ptr_bit) |
| 2688 | { |
| 2689 | gdbarch->ptr_bit = ptr_bit; |
| 2690 | } |
| 2691 | |
| 2692 | int |
| 2693 | gdbarch_addr_bit (struct gdbarch *gdbarch) |
| 2694 | { |
| 2695 | gdb_assert (gdbarch != NULL); |
| 2696 | if (gdbarch->addr_bit == 0) |
| 2697 | internal_error (__FILE__, __LINE__, |
| 2698 | "gdbarch: gdbarch_addr_bit invalid"); |
| 2699 | if (gdbarch_debug >= 2) |
| 2700 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); |
| 2701 | return gdbarch->addr_bit; |
| 2702 | } |
| 2703 | |
| 2704 | void |
| 2705 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, |
| 2706 | int addr_bit) |
| 2707 | { |
| 2708 | gdbarch->addr_bit = addr_bit; |
| 2709 | } |
| 2710 | |
| 2711 | int |
| 2712 | gdbarch_bfd_vma_bit (struct gdbarch *gdbarch) |
| 2713 | { |
| 2714 | gdb_assert (gdbarch != NULL); |
| 2715 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
| 2716 | if (gdbarch_debug >= 2) |
| 2717 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n"); |
| 2718 | return gdbarch->bfd_vma_bit; |
| 2719 | } |
| 2720 | |
| 2721 | void |
| 2722 | set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, |
| 2723 | int bfd_vma_bit) |
| 2724 | { |
| 2725 | gdbarch->bfd_vma_bit = bfd_vma_bit; |
| 2726 | } |
| 2727 | |
| 2728 | int |
| 2729 | gdbarch_char_signed (struct gdbarch *gdbarch) |
| 2730 | { |
| 2731 | gdb_assert (gdbarch != NULL); |
| 2732 | if (gdbarch->char_signed == -1) |
| 2733 | internal_error (__FILE__, __LINE__, |
| 2734 | "gdbarch: gdbarch_char_signed invalid"); |
| 2735 | if (gdbarch_debug >= 2) |
| 2736 | fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); |
| 2737 | return gdbarch->char_signed; |
| 2738 | } |
| 2739 | |
| 2740 | void |
| 2741 | set_gdbarch_char_signed (struct gdbarch *gdbarch, |
| 2742 | int char_signed) |
| 2743 | { |
| 2744 | gdbarch->char_signed = char_signed; |
| 2745 | } |
| 2746 | |
| 2747 | CORE_ADDR |
| 2748 | gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid) |
| 2749 | { |
| 2750 | gdb_assert (gdbarch != NULL); |
| 2751 | if (gdbarch->read_pc == 0) |
| 2752 | internal_error (__FILE__, __LINE__, |
| 2753 | "gdbarch: gdbarch_read_pc invalid"); |
| 2754 | if (gdbarch_debug >= 2) |
| 2755 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
| 2756 | return gdbarch->read_pc (ptid); |
| 2757 | } |
| 2758 | |
| 2759 | void |
| 2760 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
| 2761 | gdbarch_read_pc_ftype read_pc) |
| 2762 | { |
| 2763 | gdbarch->read_pc = read_pc; |
| 2764 | } |
| 2765 | |
| 2766 | void |
| 2767 | gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid) |
| 2768 | { |
| 2769 | gdb_assert (gdbarch != NULL); |
| 2770 | if (gdbarch->write_pc == 0) |
| 2771 | internal_error (__FILE__, __LINE__, |
| 2772 | "gdbarch: gdbarch_write_pc invalid"); |
| 2773 | if (gdbarch_debug >= 2) |
| 2774 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
| 2775 | gdbarch->write_pc (val, ptid); |
| 2776 | } |
| 2777 | |
| 2778 | void |
| 2779 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
| 2780 | gdbarch_write_pc_ftype write_pc) |
| 2781 | { |
| 2782 | gdbarch->write_pc = write_pc; |
| 2783 | } |
| 2784 | |
| 2785 | CORE_ADDR |
| 2786 | gdbarch_read_fp (struct gdbarch *gdbarch) |
| 2787 | { |
| 2788 | gdb_assert (gdbarch != NULL); |
| 2789 | if (gdbarch->read_fp == 0) |
| 2790 | internal_error (__FILE__, __LINE__, |
| 2791 | "gdbarch: gdbarch_read_fp invalid"); |
| 2792 | if (gdbarch_debug >= 2) |
| 2793 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n"); |
| 2794 | return gdbarch->read_fp (); |
| 2795 | } |
| 2796 | |
| 2797 | void |
| 2798 | set_gdbarch_read_fp (struct gdbarch *gdbarch, |
| 2799 | gdbarch_read_fp_ftype read_fp) |
| 2800 | { |
| 2801 | gdbarch->read_fp = read_fp; |
| 2802 | } |
| 2803 | |
| 2804 | CORE_ADDR |
| 2805 | gdbarch_read_sp (struct gdbarch *gdbarch) |
| 2806 | { |
| 2807 | gdb_assert (gdbarch != NULL); |
| 2808 | if (gdbarch->read_sp == 0) |
| 2809 | internal_error (__FILE__, __LINE__, |
| 2810 | "gdbarch: gdbarch_read_sp invalid"); |
| 2811 | if (gdbarch_debug >= 2) |
| 2812 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n"); |
| 2813 | return gdbarch->read_sp (); |
| 2814 | } |
| 2815 | |
| 2816 | void |
| 2817 | set_gdbarch_read_sp (struct gdbarch *gdbarch, |
| 2818 | gdbarch_read_sp_ftype read_sp) |
| 2819 | { |
| 2820 | gdbarch->read_sp = read_sp; |
| 2821 | } |
| 2822 | |
| 2823 | void |
| 2824 | gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val) |
| 2825 | { |
| 2826 | gdb_assert (gdbarch != NULL); |
| 2827 | if (gdbarch->write_sp == 0) |
| 2828 | internal_error (__FILE__, __LINE__, |
| 2829 | "gdbarch: gdbarch_write_sp invalid"); |
| 2830 | if (gdbarch_debug >= 2) |
| 2831 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n"); |
| 2832 | gdbarch->write_sp (val); |
| 2833 | } |
| 2834 | |
| 2835 | void |
| 2836 | set_gdbarch_write_sp (struct gdbarch *gdbarch, |
| 2837 | gdbarch_write_sp_ftype write_sp) |
| 2838 | { |
| 2839 | gdbarch->write_sp = write_sp; |
| 2840 | } |
| 2841 | |
| 2842 | void |
| 2843 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) |
| 2844 | { |
| 2845 | gdb_assert (gdbarch != NULL); |
| 2846 | if (gdbarch->virtual_frame_pointer == 0) |
| 2847 | internal_error (__FILE__, __LINE__, |
| 2848 | "gdbarch: gdbarch_virtual_frame_pointer invalid"); |
| 2849 | if (gdbarch_debug >= 2) |
| 2850 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); |
| 2851 | gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset); |
| 2852 | } |
| 2853 | |
| 2854 | void |
| 2855 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, |
| 2856 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) |
| 2857 | { |
| 2858 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; |
| 2859 | } |
| 2860 | |
| 2861 | int |
| 2862 | gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch) |
| 2863 | { |
| 2864 | gdb_assert (gdbarch != NULL); |
| 2865 | return gdbarch->pseudo_register_read != 0; |
| 2866 | } |
| 2867 | |
| 2868 | void |
| 2869 | gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf) |
| 2870 | { |
| 2871 | gdb_assert (gdbarch != NULL); |
| 2872 | if (gdbarch->pseudo_register_read == 0) |
| 2873 | internal_error (__FILE__, __LINE__, |
| 2874 | "gdbarch: gdbarch_pseudo_register_read invalid"); |
| 2875 | if (gdbarch_debug >= 2) |
| 2876 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); |
| 2877 | gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); |
| 2878 | } |
| 2879 | |
| 2880 | void |
| 2881 | set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, |
| 2882 | gdbarch_pseudo_register_read_ftype pseudo_register_read) |
| 2883 | { |
| 2884 | gdbarch->pseudo_register_read = pseudo_register_read; |
| 2885 | } |
| 2886 | |
| 2887 | int |
| 2888 | gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) |
| 2889 | { |
| 2890 | gdb_assert (gdbarch != NULL); |
| 2891 | return gdbarch->pseudo_register_write != 0; |
| 2892 | } |
| 2893 | |
| 2894 | void |
| 2895 | gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf) |
| 2896 | { |
| 2897 | gdb_assert (gdbarch != NULL); |
| 2898 | if (gdbarch->pseudo_register_write == 0) |
| 2899 | internal_error (__FILE__, __LINE__, |
| 2900 | "gdbarch: gdbarch_pseudo_register_write invalid"); |
| 2901 | if (gdbarch_debug >= 2) |
| 2902 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); |
| 2903 | gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); |
| 2904 | } |
| 2905 | |
| 2906 | void |
| 2907 | set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, |
| 2908 | gdbarch_pseudo_register_write_ftype pseudo_register_write) |
| 2909 | { |
| 2910 | gdbarch->pseudo_register_write = pseudo_register_write; |
| 2911 | } |
| 2912 | |
| 2913 | int |
| 2914 | gdbarch_num_regs (struct gdbarch *gdbarch) |
| 2915 | { |
| 2916 | gdb_assert (gdbarch != NULL); |
| 2917 | if (gdbarch->num_regs == -1) |
| 2918 | internal_error (__FILE__, __LINE__, |
| 2919 | "gdbarch: gdbarch_num_regs invalid"); |
| 2920 | if (gdbarch_debug >= 2) |
| 2921 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
| 2922 | return gdbarch->num_regs; |
| 2923 | } |
| 2924 | |
| 2925 | void |
| 2926 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
| 2927 | int num_regs) |
| 2928 | { |
| 2929 | gdbarch->num_regs = num_regs; |
| 2930 | } |
| 2931 | |
| 2932 | int |
| 2933 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) |
| 2934 | { |
| 2935 | gdb_assert (gdbarch != NULL); |
| 2936 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
| 2937 | if (gdbarch_debug >= 2) |
| 2938 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); |
| 2939 | return gdbarch->num_pseudo_regs; |
| 2940 | } |
| 2941 | |
| 2942 | void |
| 2943 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, |
| 2944 | int num_pseudo_regs) |
| 2945 | { |
| 2946 | gdbarch->num_pseudo_regs = num_pseudo_regs; |
| 2947 | } |
| 2948 | |
| 2949 | int |
| 2950 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
| 2951 | { |
| 2952 | gdb_assert (gdbarch != NULL); |
| 2953 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
| 2954 | if (gdbarch_debug >= 2) |
| 2955 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
| 2956 | return gdbarch->sp_regnum; |
| 2957 | } |
| 2958 | |
| 2959 | void |
| 2960 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
| 2961 | int sp_regnum) |
| 2962 | { |
| 2963 | gdbarch->sp_regnum = sp_regnum; |
| 2964 | } |
| 2965 | |
| 2966 | int |
| 2967 | gdbarch_fp_regnum (struct gdbarch *gdbarch) |
| 2968 | { |
| 2969 | gdb_assert (gdbarch != NULL); |
| 2970 | /* Skip verify of fp_regnum, invalid_p == 0 */ |
| 2971 | if (gdbarch_debug >= 2) |
| 2972 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n"); |
| 2973 | return gdbarch->fp_regnum; |
| 2974 | } |
| 2975 | |
| 2976 | void |
| 2977 | set_gdbarch_fp_regnum (struct gdbarch *gdbarch, |
| 2978 | int fp_regnum) |
| 2979 | { |
| 2980 | gdbarch->fp_regnum = fp_regnum; |
| 2981 | } |
| 2982 | |
| 2983 | int |
| 2984 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
| 2985 | { |
| 2986 | gdb_assert (gdbarch != NULL); |
| 2987 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
| 2988 | if (gdbarch_debug >= 2) |
| 2989 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
| 2990 | return gdbarch->pc_regnum; |
| 2991 | } |
| 2992 | |
| 2993 | void |
| 2994 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
| 2995 | int pc_regnum) |
| 2996 | { |
| 2997 | gdbarch->pc_regnum = pc_regnum; |
| 2998 | } |
| 2999 | |
| 3000 | int |
| 3001 | gdbarch_ps_regnum (struct gdbarch *gdbarch) |
| 3002 | { |
| 3003 | gdb_assert (gdbarch != NULL); |
| 3004 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
| 3005 | if (gdbarch_debug >= 2) |
| 3006 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); |
| 3007 | return gdbarch->ps_regnum; |
| 3008 | } |
| 3009 | |
| 3010 | void |
| 3011 | set_gdbarch_ps_regnum (struct gdbarch *gdbarch, |
| 3012 | int ps_regnum) |
| 3013 | { |
| 3014 | gdbarch->ps_regnum = ps_regnum; |
| 3015 | } |
| 3016 | |
| 3017 | int |
| 3018 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) |
| 3019 | { |
| 3020 | gdb_assert (gdbarch != NULL); |
| 3021 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
| 3022 | if (gdbarch_debug >= 2) |
| 3023 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); |
| 3024 | return gdbarch->fp0_regnum; |
| 3025 | } |
| 3026 | |
| 3027 | void |
| 3028 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, |
| 3029 | int fp0_regnum) |
| 3030 | { |
| 3031 | gdbarch->fp0_regnum = fp0_regnum; |
| 3032 | } |
| 3033 | |
| 3034 | int |
| 3035 | gdbarch_npc_regnum (struct gdbarch *gdbarch) |
| 3036 | { |
| 3037 | gdb_assert (gdbarch != NULL); |
| 3038 | /* Skip verify of npc_regnum, invalid_p == 0 */ |
| 3039 | if (gdbarch_debug >= 2) |
| 3040 | fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n"); |
| 3041 | return gdbarch->npc_regnum; |
| 3042 | } |
| 3043 | |
| 3044 | void |
| 3045 | set_gdbarch_npc_regnum (struct gdbarch *gdbarch, |
| 3046 | int npc_regnum) |
| 3047 | { |
| 3048 | gdbarch->npc_regnum = npc_regnum; |
| 3049 | } |
| 3050 | |
| 3051 | int |
| 3052 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) |
| 3053 | { |
| 3054 | gdb_assert (gdbarch != NULL); |
| 3055 | if (gdbarch->stab_reg_to_regnum == 0) |
| 3056 | internal_error (__FILE__, __LINE__, |
| 3057 | "gdbarch: gdbarch_stab_reg_to_regnum invalid"); |
| 3058 | if (gdbarch_debug >= 2) |
| 3059 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); |
| 3060 | return gdbarch->stab_reg_to_regnum (stab_regnr); |
| 3061 | } |
| 3062 | |
| 3063 | void |
| 3064 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, |
| 3065 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) |
| 3066 | { |
| 3067 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; |
| 3068 | } |
| 3069 | |
| 3070 | int |
| 3071 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) |
| 3072 | { |
| 3073 | gdb_assert (gdbarch != NULL); |
| 3074 | if (gdbarch->ecoff_reg_to_regnum == 0) |
| 3075 | internal_error (__FILE__, __LINE__, |
| 3076 | "gdbarch: gdbarch_ecoff_reg_to_regnum invalid"); |
| 3077 | if (gdbarch_debug >= 2) |
| 3078 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); |
| 3079 | return gdbarch->ecoff_reg_to_regnum (ecoff_regnr); |
| 3080 | } |
| 3081 | |
| 3082 | void |
| 3083 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, |
| 3084 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) |
| 3085 | { |
| 3086 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; |
| 3087 | } |
| 3088 | |
| 3089 | int |
| 3090 | gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr) |
| 3091 | { |
| 3092 | gdb_assert (gdbarch != NULL); |
| 3093 | if (gdbarch->dwarf_reg_to_regnum == 0) |
| 3094 | internal_error (__FILE__, __LINE__, |
| 3095 | "gdbarch: gdbarch_dwarf_reg_to_regnum invalid"); |
| 3096 | if (gdbarch_debug >= 2) |
| 3097 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n"); |
| 3098 | return gdbarch->dwarf_reg_to_regnum (dwarf_regnr); |
| 3099 | } |
| 3100 | |
| 3101 | void |
| 3102 | set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, |
| 3103 | gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum) |
| 3104 | { |
| 3105 | gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum; |
| 3106 | } |
| 3107 | |
| 3108 | int |
| 3109 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) |
| 3110 | { |
| 3111 | gdb_assert (gdbarch != NULL); |
| 3112 | if (gdbarch->sdb_reg_to_regnum == 0) |
| 3113 | internal_error (__FILE__, __LINE__, |
| 3114 | "gdbarch: gdbarch_sdb_reg_to_regnum invalid"); |
| 3115 | if (gdbarch_debug >= 2) |
| 3116 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); |
| 3117 | return gdbarch->sdb_reg_to_regnum (sdb_regnr); |
| 3118 | } |
| 3119 | |
| 3120 | void |
| 3121 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, |
| 3122 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) |
| 3123 | { |
| 3124 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; |
| 3125 | } |
| 3126 | |
| 3127 | int |
| 3128 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) |
| 3129 | { |
| 3130 | gdb_assert (gdbarch != NULL); |
| 3131 | if (gdbarch->dwarf2_reg_to_regnum == 0) |
| 3132 | internal_error (__FILE__, __LINE__, |
| 3133 | "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid"); |
| 3134 | if (gdbarch_debug >= 2) |
| 3135 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); |
| 3136 | return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr); |
| 3137 | } |
| 3138 | |
| 3139 | void |
| 3140 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, |
| 3141 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) |
| 3142 | { |
| 3143 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; |
| 3144 | } |
| 3145 | |
| 3146 | const char * |
| 3147 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) |
| 3148 | { |
| 3149 | gdb_assert (gdbarch != NULL); |
| 3150 | if (gdbarch->register_name == 0) |
| 3151 | internal_error (__FILE__, __LINE__, |
| 3152 | "gdbarch: gdbarch_register_name invalid"); |
| 3153 | if (gdbarch_debug >= 2) |
| 3154 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
| 3155 | return gdbarch->register_name (regnr); |
| 3156 | } |
| 3157 | |
| 3158 | void |
| 3159 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
| 3160 | gdbarch_register_name_ftype register_name) |
| 3161 | { |
| 3162 | gdbarch->register_name = register_name; |
| 3163 | } |
| 3164 | |
| 3165 | int |
| 3166 | gdbarch_register_size (struct gdbarch *gdbarch) |
| 3167 | { |
| 3168 | gdb_assert (gdbarch != NULL); |
| 3169 | if (gdbarch->register_size == -1) |
| 3170 | internal_error (__FILE__, __LINE__, |
| 3171 | "gdbarch: gdbarch_register_size invalid"); |
| 3172 | if (gdbarch_debug >= 2) |
| 3173 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n"); |
| 3174 | return gdbarch->register_size; |
| 3175 | } |
| 3176 | |
| 3177 | void |
| 3178 | set_gdbarch_register_size (struct gdbarch *gdbarch, |
| 3179 | int register_size) |
| 3180 | { |
| 3181 | gdbarch->register_size = register_size; |
| 3182 | } |
| 3183 | |
| 3184 | int |
| 3185 | gdbarch_register_bytes (struct gdbarch *gdbarch) |
| 3186 | { |
| 3187 | gdb_assert (gdbarch != NULL); |
| 3188 | if (gdbarch->register_bytes == -1) |
| 3189 | internal_error (__FILE__, __LINE__, |
| 3190 | "gdbarch: gdbarch_register_bytes invalid"); |
| 3191 | if (gdbarch_debug >= 2) |
| 3192 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n"); |
| 3193 | return gdbarch->register_bytes; |
| 3194 | } |
| 3195 | |
| 3196 | void |
| 3197 | set_gdbarch_register_bytes (struct gdbarch *gdbarch, |
| 3198 | int register_bytes) |
| 3199 | { |
| 3200 | gdbarch->register_bytes = register_bytes; |
| 3201 | } |
| 3202 | |
| 3203 | int |
| 3204 | gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr) |
| 3205 | { |
| 3206 | gdb_assert (gdbarch != NULL); |
| 3207 | if (gdbarch->register_byte == 0) |
| 3208 | internal_error (__FILE__, __LINE__, |
| 3209 | "gdbarch: gdbarch_register_byte invalid"); |
| 3210 | if (gdbarch_debug >= 2) |
| 3211 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n"); |
| 3212 | return gdbarch->register_byte (reg_nr); |
| 3213 | } |
| 3214 | |
| 3215 | void |
| 3216 | set_gdbarch_register_byte (struct gdbarch *gdbarch, |
| 3217 | gdbarch_register_byte_ftype register_byte) |
| 3218 | { |
| 3219 | gdbarch->register_byte = register_byte; |
| 3220 | } |
| 3221 | |
| 3222 | int |
| 3223 | gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr) |
| 3224 | { |
| 3225 | gdb_assert (gdbarch != NULL); |
| 3226 | if (gdbarch->register_raw_size == 0) |
| 3227 | internal_error (__FILE__, __LINE__, |
| 3228 | "gdbarch: gdbarch_register_raw_size invalid"); |
| 3229 | if (gdbarch_debug >= 2) |
| 3230 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n"); |
| 3231 | return gdbarch->register_raw_size (reg_nr); |
| 3232 | } |
| 3233 | |
| 3234 | void |
| 3235 | set_gdbarch_register_raw_size (struct gdbarch *gdbarch, |
| 3236 | gdbarch_register_raw_size_ftype register_raw_size) |
| 3237 | { |
| 3238 | gdbarch->register_raw_size = register_raw_size; |
| 3239 | } |
| 3240 | |
| 3241 | int |
| 3242 | gdbarch_max_register_raw_size (struct gdbarch *gdbarch) |
| 3243 | { |
| 3244 | gdb_assert (gdbarch != NULL); |
| 3245 | if (gdbarch->max_register_raw_size == -1) |
| 3246 | internal_error (__FILE__, __LINE__, |
| 3247 | "gdbarch: gdbarch_max_register_raw_size invalid"); |
| 3248 | if (gdbarch_debug >= 2) |
| 3249 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n"); |
| 3250 | return gdbarch->max_register_raw_size; |
| 3251 | } |
| 3252 | |
| 3253 | void |
| 3254 | set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, |
| 3255 | int max_register_raw_size) |
| 3256 | { |
| 3257 | gdbarch->max_register_raw_size = max_register_raw_size; |
| 3258 | } |
| 3259 | |
| 3260 | int |
| 3261 | gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr) |
| 3262 | { |
| 3263 | gdb_assert (gdbarch != NULL); |
| 3264 | if (gdbarch->register_virtual_size == 0) |
| 3265 | internal_error (__FILE__, __LINE__, |
| 3266 | "gdbarch: gdbarch_register_virtual_size invalid"); |
| 3267 | if (gdbarch_debug >= 2) |
| 3268 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n"); |
| 3269 | return gdbarch->register_virtual_size (reg_nr); |
| 3270 | } |
| 3271 | |
| 3272 | void |
| 3273 | set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, |
| 3274 | gdbarch_register_virtual_size_ftype register_virtual_size) |
| 3275 | { |
| 3276 | gdbarch->register_virtual_size = register_virtual_size; |
| 3277 | } |
| 3278 | |
| 3279 | int |
| 3280 | gdbarch_max_register_virtual_size (struct gdbarch *gdbarch) |
| 3281 | { |
| 3282 | gdb_assert (gdbarch != NULL); |
| 3283 | if (gdbarch->max_register_virtual_size == -1) |
| 3284 | internal_error (__FILE__, __LINE__, |
| 3285 | "gdbarch: gdbarch_max_register_virtual_size invalid"); |
| 3286 | if (gdbarch_debug >= 2) |
| 3287 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n"); |
| 3288 | return gdbarch->max_register_virtual_size; |
| 3289 | } |
| 3290 | |
| 3291 | void |
| 3292 | set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, |
| 3293 | int max_register_virtual_size) |
| 3294 | { |
| 3295 | gdbarch->max_register_virtual_size = max_register_virtual_size; |
| 3296 | } |
| 3297 | |
| 3298 | struct type * |
| 3299 | gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr) |
| 3300 | { |
| 3301 | gdb_assert (gdbarch != NULL); |
| 3302 | if (gdbarch->register_virtual_type == 0) |
| 3303 | internal_error (__FILE__, __LINE__, |
| 3304 | "gdbarch: gdbarch_register_virtual_type invalid"); |
| 3305 | if (gdbarch_debug >= 2) |
| 3306 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n"); |
| 3307 | return gdbarch->register_virtual_type (reg_nr); |
| 3308 | } |
| 3309 | |
| 3310 | void |
| 3311 | set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, |
| 3312 | gdbarch_register_virtual_type_ftype register_virtual_type) |
| 3313 | { |
| 3314 | gdbarch->register_virtual_type = register_virtual_type; |
| 3315 | } |
| 3316 | |
| 3317 | int |
| 3318 | gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch) |
| 3319 | { |
| 3320 | gdb_assert (gdbarch != NULL); |
| 3321 | return gdbarch->deprecated_do_registers_info != 0; |
| 3322 | } |
| 3323 | |
| 3324 | void |
| 3325 | gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) |
| 3326 | { |
| 3327 | gdb_assert (gdbarch != NULL); |
| 3328 | if (gdbarch->deprecated_do_registers_info == 0) |
| 3329 | internal_error (__FILE__, __LINE__, |
| 3330 | "gdbarch: gdbarch_deprecated_do_registers_info invalid"); |
| 3331 | if (gdbarch_debug >= 2) |
| 3332 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n"); |
| 3333 | gdbarch->deprecated_do_registers_info (reg_nr, fpregs); |
| 3334 | } |
| 3335 | |
| 3336 | void |
| 3337 | set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, |
| 3338 | gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info) |
| 3339 | { |
| 3340 | gdbarch->deprecated_do_registers_info = deprecated_do_registers_info; |
| 3341 | } |
| 3342 | |
| 3343 | void |
| 3344 | gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) |
| 3345 | { |
| 3346 | gdb_assert (gdbarch != NULL); |
| 3347 | if (gdbarch->print_registers_info == 0) |
| 3348 | internal_error (__FILE__, __LINE__, |
| 3349 | "gdbarch: gdbarch_print_registers_info invalid"); |
| 3350 | if (gdbarch_debug >= 2) |
| 3351 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); |
| 3352 | gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); |
| 3353 | } |
| 3354 | |
| 3355 | void |
| 3356 | set_gdbarch_print_registers_info (struct gdbarch *gdbarch, |
| 3357 | gdbarch_print_registers_info_ftype print_registers_info) |
| 3358 | { |
| 3359 | gdbarch->print_registers_info = print_registers_info; |
| 3360 | } |
| 3361 | |
| 3362 | int |
| 3363 | gdbarch_print_float_info_p (struct gdbarch *gdbarch) |
| 3364 | { |
| 3365 | gdb_assert (gdbarch != NULL); |
| 3366 | return gdbarch->print_float_info != 0; |
| 3367 | } |
| 3368 | |
| 3369 | void |
| 3370 | gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) |
| 3371 | { |
| 3372 | gdb_assert (gdbarch != NULL); |
| 3373 | if (gdbarch->print_float_info == 0) |
| 3374 | internal_error (__FILE__, __LINE__, |
| 3375 | "gdbarch: gdbarch_print_float_info invalid"); |
| 3376 | if (gdbarch_debug >= 2) |
| 3377 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); |
| 3378 | gdbarch->print_float_info (gdbarch, file, frame, args); |
| 3379 | } |
| 3380 | |
| 3381 | void |
| 3382 | set_gdbarch_print_float_info (struct gdbarch *gdbarch, |
| 3383 | gdbarch_print_float_info_ftype print_float_info) |
| 3384 | { |
| 3385 | gdbarch->print_float_info = print_float_info; |
| 3386 | } |
| 3387 | |
| 3388 | int |
| 3389 | gdbarch_print_vector_info_p (struct gdbarch *gdbarch) |
| 3390 | { |
| 3391 | gdb_assert (gdbarch != NULL); |
| 3392 | return gdbarch->print_vector_info != 0; |
| 3393 | } |
| 3394 | |
| 3395 | void |
| 3396 | gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) |
| 3397 | { |
| 3398 | gdb_assert (gdbarch != NULL); |
| 3399 | if (gdbarch->print_vector_info == 0) |
| 3400 | internal_error (__FILE__, __LINE__, |
| 3401 | "gdbarch: gdbarch_print_vector_info invalid"); |
| 3402 | if (gdbarch_debug >= 2) |
| 3403 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); |
| 3404 | gdbarch->print_vector_info (gdbarch, file, frame, args); |
| 3405 | } |
| 3406 | |
| 3407 | void |
| 3408 | set_gdbarch_print_vector_info (struct gdbarch *gdbarch, |
| 3409 | gdbarch_print_vector_info_ftype print_vector_info) |
| 3410 | { |
| 3411 | gdbarch->print_vector_info = print_vector_info; |
| 3412 | } |
| 3413 | |
| 3414 | int |
| 3415 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) |
| 3416 | { |
| 3417 | gdb_assert (gdbarch != NULL); |
| 3418 | if (gdbarch->register_sim_regno == 0) |
| 3419 | internal_error (__FILE__, __LINE__, |
| 3420 | "gdbarch: gdbarch_register_sim_regno invalid"); |
| 3421 | if (gdbarch_debug >= 2) |
| 3422 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); |
| 3423 | return gdbarch->register_sim_regno (reg_nr); |
| 3424 | } |
| 3425 | |
| 3426 | void |
| 3427 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, |
| 3428 | gdbarch_register_sim_regno_ftype register_sim_regno) |
| 3429 | { |
| 3430 | gdbarch->register_sim_regno = register_sim_regno; |
| 3431 | } |
| 3432 | |
| 3433 | int |
| 3434 | gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch) |
| 3435 | { |
| 3436 | gdb_assert (gdbarch != NULL); |
| 3437 | return gdbarch->register_bytes_ok != 0; |
| 3438 | } |
| 3439 | |
| 3440 | int |
| 3441 | gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes) |
| 3442 | { |
| 3443 | gdb_assert (gdbarch != NULL); |
| 3444 | if (gdbarch->register_bytes_ok == 0) |
| 3445 | internal_error (__FILE__, __LINE__, |
| 3446 | "gdbarch: gdbarch_register_bytes_ok invalid"); |
| 3447 | if (gdbarch_debug >= 2) |
| 3448 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n"); |
| 3449 | return gdbarch->register_bytes_ok (nr_bytes); |
| 3450 | } |
| 3451 | |
| 3452 | void |
| 3453 | set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, |
| 3454 | gdbarch_register_bytes_ok_ftype register_bytes_ok) |
| 3455 | { |
| 3456 | gdbarch->register_bytes_ok = register_bytes_ok; |
| 3457 | } |
| 3458 | |
| 3459 | int |
| 3460 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
| 3461 | { |
| 3462 | gdb_assert (gdbarch != NULL); |
| 3463 | if (gdbarch->cannot_fetch_register == 0) |
| 3464 | internal_error (__FILE__, __LINE__, |
| 3465 | "gdbarch: gdbarch_cannot_fetch_register invalid"); |
| 3466 | if (gdbarch_debug >= 2) |
| 3467 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); |
| 3468 | return gdbarch->cannot_fetch_register (regnum); |
| 3469 | } |
| 3470 | |
| 3471 | void |
| 3472 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, |
| 3473 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) |
| 3474 | { |
| 3475 | gdbarch->cannot_fetch_register = cannot_fetch_register; |
| 3476 | } |
| 3477 | |
| 3478 | int |
| 3479 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
| 3480 | { |
| 3481 | gdb_assert (gdbarch != NULL); |
| 3482 | if (gdbarch->cannot_store_register == 0) |
| 3483 | internal_error (__FILE__, __LINE__, |
| 3484 | "gdbarch: gdbarch_cannot_store_register invalid"); |
| 3485 | if (gdbarch_debug >= 2) |
| 3486 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); |
| 3487 | return gdbarch->cannot_store_register (regnum); |
| 3488 | } |
| 3489 | |
| 3490 | void |
| 3491 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, |
| 3492 | gdbarch_cannot_store_register_ftype cannot_store_register) |
| 3493 | { |
| 3494 | gdbarch->cannot_store_register = cannot_store_register; |
| 3495 | } |
| 3496 | |
| 3497 | int |
| 3498 | gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) |
| 3499 | { |
| 3500 | gdb_assert (gdbarch != NULL); |
| 3501 | return gdbarch->get_longjmp_target != 0; |
| 3502 | } |
| 3503 | |
| 3504 | int |
| 3505 | gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc) |
| 3506 | { |
| 3507 | gdb_assert (gdbarch != NULL); |
| 3508 | if (gdbarch->get_longjmp_target == 0) |
| 3509 | internal_error (__FILE__, __LINE__, |
| 3510 | "gdbarch: gdbarch_get_longjmp_target invalid"); |
| 3511 | if (gdbarch_debug >= 2) |
| 3512 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); |
| 3513 | return gdbarch->get_longjmp_target (pc); |
| 3514 | } |
| 3515 | |
| 3516 | void |
| 3517 | set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, |
| 3518 | gdbarch_get_longjmp_target_ftype get_longjmp_target) |
| 3519 | { |
| 3520 | gdbarch->get_longjmp_target = get_longjmp_target; |
| 3521 | } |
| 3522 | |
| 3523 | int |
| 3524 | gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch) |
| 3525 | { |
| 3526 | gdb_assert (gdbarch != NULL); |
| 3527 | /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */ |
| 3528 | if (gdbarch_debug >= 2) |
| 3529 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n"); |
| 3530 | return gdbarch->deprecated_use_generic_dummy_frames; |
| 3531 | } |
| 3532 | |
| 3533 | void |
| 3534 | set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, |
| 3535 | int deprecated_use_generic_dummy_frames) |
| 3536 | { |
| 3537 | gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames; |
| 3538 | } |
| 3539 | |
| 3540 | int |
| 3541 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
| 3542 | { |
| 3543 | gdb_assert (gdbarch != NULL); |
| 3544 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
| 3545 | if (gdbarch_debug >= 2) |
| 3546 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); |
| 3547 | return gdbarch->call_dummy_location; |
| 3548 | } |
| 3549 | |
| 3550 | void |
| 3551 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, |
| 3552 | int call_dummy_location) |
| 3553 | { |
| 3554 | gdbarch->call_dummy_location = call_dummy_location; |
| 3555 | } |
| 3556 | |
| 3557 | CORE_ADDR |
| 3558 | gdbarch_call_dummy_address (struct gdbarch *gdbarch) |
| 3559 | { |
| 3560 | gdb_assert (gdbarch != NULL); |
| 3561 | if (gdbarch->call_dummy_address == 0) |
| 3562 | internal_error (__FILE__, __LINE__, |
| 3563 | "gdbarch: gdbarch_call_dummy_address invalid"); |
| 3564 | if (gdbarch_debug >= 2) |
| 3565 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n"); |
| 3566 | return gdbarch->call_dummy_address (); |
| 3567 | } |
| 3568 | |
| 3569 | void |
| 3570 | set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, |
| 3571 | gdbarch_call_dummy_address_ftype call_dummy_address) |
| 3572 | { |
| 3573 | gdbarch->call_dummy_address = call_dummy_address; |
| 3574 | } |
| 3575 | |
| 3576 | CORE_ADDR |
| 3577 | gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch) |
| 3578 | { |
| 3579 | gdb_assert (gdbarch != NULL); |
| 3580 | if (gdbarch->call_dummy_start_offset == -1) |
| 3581 | internal_error (__FILE__, __LINE__, |
| 3582 | "gdbarch: gdbarch_call_dummy_start_offset invalid"); |
| 3583 | if (gdbarch_debug >= 2) |
| 3584 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n"); |
| 3585 | return gdbarch->call_dummy_start_offset; |
| 3586 | } |
| 3587 | |
| 3588 | void |
| 3589 | set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, |
| 3590 | CORE_ADDR call_dummy_start_offset) |
| 3591 | { |
| 3592 | gdbarch->call_dummy_start_offset = call_dummy_start_offset; |
| 3593 | } |
| 3594 | |
| 3595 | CORE_ADDR |
| 3596 | gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) |
| 3597 | { |
| 3598 | gdb_assert (gdbarch != NULL); |
| 3599 | if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1) |
| 3600 | internal_error (__FILE__, __LINE__, |
| 3601 | "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid"); |
| 3602 | if (gdbarch_debug >= 2) |
| 3603 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n"); |
| 3604 | return gdbarch->call_dummy_breakpoint_offset; |
| 3605 | } |
| 3606 | |
| 3607 | void |
| 3608 | set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, |
| 3609 | CORE_ADDR call_dummy_breakpoint_offset) |
| 3610 | { |
| 3611 | gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset; |
| 3612 | } |
| 3613 | |
| 3614 | int |
| 3615 | gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch) |
| 3616 | { |
| 3617 | gdb_assert (gdbarch != NULL); |
| 3618 | if (gdbarch->call_dummy_breakpoint_offset_p == -1) |
| 3619 | internal_error (__FILE__, __LINE__, |
| 3620 | "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid"); |
| 3621 | if (gdbarch_debug >= 2) |
| 3622 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n"); |
| 3623 | return gdbarch->call_dummy_breakpoint_offset_p; |
| 3624 | } |
| 3625 | |
| 3626 | void |
| 3627 | set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, |
| 3628 | int call_dummy_breakpoint_offset_p) |
| 3629 | { |
| 3630 | gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p; |
| 3631 | } |
| 3632 | |
| 3633 | int |
| 3634 | gdbarch_call_dummy_length (struct gdbarch *gdbarch) |
| 3635 | { |
| 3636 | gdb_assert (gdbarch != NULL); |
| 3637 | if (gdbarch->call_dummy_length == -1) |
| 3638 | internal_error (__FILE__, __LINE__, |
| 3639 | "gdbarch: gdbarch_call_dummy_length invalid"); |
| 3640 | if (gdbarch_debug >= 2) |
| 3641 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n"); |
| 3642 | return gdbarch->call_dummy_length; |
| 3643 | } |
| 3644 | |
| 3645 | void |
| 3646 | set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, |
| 3647 | int call_dummy_length) |
| 3648 | { |
| 3649 | gdbarch->call_dummy_length = call_dummy_length; |
| 3650 | } |
| 3651 | |
| 3652 | int |
| 3653 | gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch) |
| 3654 | { |
| 3655 | gdb_assert (gdbarch != NULL); |
| 3656 | return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy; |
| 3657 | } |
| 3658 | |
| 3659 | int |
| 3660 | gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address) |
| 3661 | { |
| 3662 | gdb_assert (gdbarch != NULL); |
| 3663 | if (gdbarch->deprecated_pc_in_call_dummy == 0) |
| 3664 | internal_error (__FILE__, __LINE__, |
| 3665 | "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid"); |
| 3666 | /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */ |
| 3667 | if (gdbarch_debug >= 2) |
| 3668 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n"); |
| 3669 | return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address); |
| 3670 | } |
| 3671 | |
| 3672 | void |
| 3673 | set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, |
| 3674 | gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy) |
| 3675 | { |
| 3676 | gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy; |
| 3677 | } |
| 3678 | |
| 3679 | int |
| 3680 | gdbarch_call_dummy_p (struct gdbarch *gdbarch) |
| 3681 | { |
| 3682 | gdb_assert (gdbarch != NULL); |
| 3683 | if (gdbarch->call_dummy_p == -1) |
| 3684 | internal_error (__FILE__, __LINE__, |
| 3685 | "gdbarch: gdbarch_call_dummy_p invalid"); |
| 3686 | if (gdbarch_debug >= 2) |
| 3687 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n"); |
| 3688 | return gdbarch->call_dummy_p; |
| 3689 | } |
| 3690 | |
| 3691 | void |
| 3692 | set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, |
| 3693 | int call_dummy_p) |
| 3694 | { |
| 3695 | gdbarch->call_dummy_p = call_dummy_p; |
| 3696 | } |
| 3697 | |
| 3698 | LONGEST * |
| 3699 | gdbarch_call_dummy_words (struct gdbarch *gdbarch) |
| 3700 | { |
| 3701 | gdb_assert (gdbarch != NULL); |
| 3702 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
| 3703 | if (gdbarch_debug >= 2) |
| 3704 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n"); |
| 3705 | return gdbarch->call_dummy_words; |
| 3706 | } |
| 3707 | |
| 3708 | void |
| 3709 | set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, |
| 3710 | LONGEST * call_dummy_words) |
| 3711 | { |
| 3712 | gdbarch->call_dummy_words = call_dummy_words; |
| 3713 | } |
| 3714 | |
| 3715 | int |
| 3716 | gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch) |
| 3717 | { |
| 3718 | gdb_assert (gdbarch != NULL); |
| 3719 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ |
| 3720 | if (gdbarch_debug >= 2) |
| 3721 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n"); |
| 3722 | return gdbarch->sizeof_call_dummy_words; |
| 3723 | } |
| 3724 | |
| 3725 | void |
| 3726 | set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, |
| 3727 | int sizeof_call_dummy_words) |
| 3728 | { |
| 3729 | gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words; |
| 3730 | } |
| 3731 | |
| 3732 | int |
| 3733 | gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch) |
| 3734 | { |
| 3735 | gdb_assert (gdbarch != NULL); |
| 3736 | if (gdbarch->call_dummy_stack_adjust_p == -1) |
| 3737 | internal_error (__FILE__, __LINE__, |
| 3738 | "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid"); |
| 3739 | if (gdbarch_debug >= 2) |
| 3740 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n"); |
| 3741 | return gdbarch->call_dummy_stack_adjust_p; |
| 3742 | } |
| 3743 | |
| 3744 | void |
| 3745 | set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, |
| 3746 | int call_dummy_stack_adjust_p) |
| 3747 | { |
| 3748 | gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p; |
| 3749 | } |
| 3750 | |
| 3751 | int |
| 3752 | gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch) |
| 3753 | { |
| 3754 | gdb_assert (gdbarch != NULL); |
| 3755 | if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0) |
| 3756 | internal_error (__FILE__, __LINE__, |
| 3757 | "gdbarch: gdbarch_call_dummy_stack_adjust invalid"); |
| 3758 | if (gdbarch_debug >= 2) |
| 3759 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n"); |
| 3760 | return gdbarch->call_dummy_stack_adjust; |
| 3761 | } |
| 3762 | |
| 3763 | void |
| 3764 | set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, |
| 3765 | int call_dummy_stack_adjust) |
| 3766 | { |
| 3767 | gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust; |
| 3768 | } |
| 3769 | |
| 3770 | void |
| 3771 | gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p) |
| 3772 | { |
| 3773 | gdb_assert (gdbarch != NULL); |
| 3774 | if (gdbarch->fix_call_dummy == 0) |
| 3775 | internal_error (__FILE__, __LINE__, |
| 3776 | "gdbarch: gdbarch_fix_call_dummy invalid"); |
| 3777 | if (gdbarch_debug >= 2) |
| 3778 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n"); |
| 3779 | gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p); |
| 3780 | } |
| 3781 | |
| 3782 | void |
| 3783 | set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, |
| 3784 | gdbarch_fix_call_dummy_ftype fix_call_dummy) |
| 3785 | { |
| 3786 | gdbarch->fix_call_dummy = fix_call_dummy; |
| 3787 | } |
| 3788 | |
| 3789 | int |
| 3790 | gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch) |
| 3791 | { |
| 3792 | gdb_assert (gdbarch != NULL); |
| 3793 | return gdbarch->deprecated_init_frame_pc_first != 0; |
| 3794 | } |
| 3795 | |
| 3796 | CORE_ADDR |
| 3797 | gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) |
| 3798 | { |
| 3799 | gdb_assert (gdbarch != NULL); |
| 3800 | if (gdbarch->deprecated_init_frame_pc_first == 0) |
| 3801 | internal_error (__FILE__, __LINE__, |
| 3802 | "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid"); |
| 3803 | if (gdbarch_debug >= 2) |
| 3804 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n"); |
| 3805 | return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev); |
| 3806 | } |
| 3807 | |
| 3808 | void |
| 3809 | set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, |
| 3810 | gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first) |
| 3811 | { |
| 3812 | gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first; |
| 3813 | } |
| 3814 | |
| 3815 | int |
| 3816 | gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch) |
| 3817 | { |
| 3818 | gdb_assert (gdbarch != NULL); |
| 3819 | return gdbarch->deprecated_init_frame_pc != 0; |
| 3820 | } |
| 3821 | |
| 3822 | CORE_ADDR |
| 3823 | gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) |
| 3824 | { |
| 3825 | gdb_assert (gdbarch != NULL); |
| 3826 | if (gdbarch->deprecated_init_frame_pc == 0) |
| 3827 | internal_error (__FILE__, __LINE__, |
| 3828 | "gdbarch: gdbarch_deprecated_init_frame_pc invalid"); |
| 3829 | if (gdbarch_debug >= 2) |
| 3830 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n"); |
| 3831 | return gdbarch->deprecated_init_frame_pc (fromleaf, prev); |
| 3832 | } |
| 3833 | |
| 3834 | void |
| 3835 | set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, |
| 3836 | gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc) |
| 3837 | { |
| 3838 | gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc; |
| 3839 | } |
| 3840 | |
| 3841 | int |
| 3842 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
| 3843 | { |
| 3844 | gdb_assert (gdbarch != NULL); |
| 3845 | if (gdbarch_debug >= 2) |
| 3846 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
| 3847 | return gdbarch->believe_pcc_promotion; |
| 3848 | } |
| 3849 | |
| 3850 | void |
| 3851 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
| 3852 | int believe_pcc_promotion) |
| 3853 | { |
| 3854 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; |
| 3855 | } |
| 3856 | |
| 3857 | int |
| 3858 | gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch) |
| 3859 | { |
| 3860 | gdb_assert (gdbarch != NULL); |
| 3861 | if (gdbarch_debug >= 2) |
| 3862 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n"); |
| 3863 | return gdbarch->believe_pcc_promotion_type; |
| 3864 | } |
| 3865 | |
| 3866 | void |
| 3867 | set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, |
| 3868 | int believe_pcc_promotion_type) |
| 3869 | { |
| 3870 | gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type; |
| 3871 | } |
| 3872 | |
| 3873 | int |
| 3874 | gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual) |
| 3875 | { |
| 3876 | gdb_assert (gdbarch != NULL); |
| 3877 | if (gdbarch->coerce_float_to_double == 0) |
| 3878 | internal_error (__FILE__, __LINE__, |
| 3879 | "gdbarch: gdbarch_coerce_float_to_double invalid"); |
| 3880 | if (gdbarch_debug >= 2) |
| 3881 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n"); |
| 3882 | return gdbarch->coerce_float_to_double (formal, actual); |
| 3883 | } |
| 3884 | |
| 3885 | void |
| 3886 | set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, |
| 3887 | gdbarch_coerce_float_to_double_ftype coerce_float_to_double) |
| 3888 | { |
| 3889 | gdbarch->coerce_float_to_double = coerce_float_to_double; |
| 3890 | } |
| 3891 | |
| 3892 | int |
| 3893 | gdbarch_get_saved_register_p (struct gdbarch *gdbarch) |
| 3894 | { |
| 3895 | gdb_assert (gdbarch != NULL); |
| 3896 | return gdbarch->get_saved_register != 0; |
| 3897 | } |
| 3898 | |
| 3899 | void |
| 3900 | gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval) |
| 3901 | { |
| 3902 | gdb_assert (gdbarch != NULL); |
| 3903 | if (gdbarch->get_saved_register == 0) |
| 3904 | internal_error (__FILE__, __LINE__, |
| 3905 | "gdbarch: gdbarch_get_saved_register invalid"); |
| 3906 | if (gdbarch_debug >= 2) |
| 3907 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n"); |
| 3908 | gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval); |
| 3909 | } |
| 3910 | |
| 3911 | void |
| 3912 | set_gdbarch_get_saved_register (struct gdbarch *gdbarch, |
| 3913 | gdbarch_get_saved_register_ftype get_saved_register) |
| 3914 | { |
| 3915 | gdbarch->get_saved_register = get_saved_register; |
| 3916 | } |
| 3917 | |
| 3918 | int |
| 3919 | gdbarch_register_convertible (struct gdbarch *gdbarch, int nr) |
| 3920 | { |
| 3921 | gdb_assert (gdbarch != NULL); |
| 3922 | if (gdbarch->register_convertible == 0) |
| 3923 | internal_error (__FILE__, __LINE__, |
| 3924 | "gdbarch: gdbarch_register_convertible invalid"); |
| 3925 | if (gdbarch_debug >= 2) |
| 3926 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n"); |
| 3927 | return gdbarch->register_convertible (nr); |
| 3928 | } |
| 3929 | |
| 3930 | void |
| 3931 | set_gdbarch_register_convertible (struct gdbarch *gdbarch, |
| 3932 | gdbarch_register_convertible_ftype register_convertible) |
| 3933 | { |
| 3934 | gdbarch->register_convertible = register_convertible; |
| 3935 | } |
| 3936 | |
| 3937 | void |
| 3938 | gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) |
| 3939 | { |
| 3940 | gdb_assert (gdbarch != NULL); |
| 3941 | if (gdbarch->register_convert_to_virtual == 0) |
| 3942 | internal_error (__FILE__, __LINE__, |
| 3943 | "gdbarch: gdbarch_register_convert_to_virtual invalid"); |
| 3944 | if (gdbarch_debug >= 2) |
| 3945 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n"); |
| 3946 | gdbarch->register_convert_to_virtual (regnum, type, from, to); |
| 3947 | } |
| 3948 | |
| 3949 | void |
| 3950 | set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, |
| 3951 | gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual) |
| 3952 | { |
| 3953 | gdbarch->register_convert_to_virtual = register_convert_to_virtual; |
| 3954 | } |
| 3955 | |
| 3956 | void |
| 3957 | gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to) |
| 3958 | { |
| 3959 | gdb_assert (gdbarch != NULL); |
| 3960 | if (gdbarch->register_convert_to_raw == 0) |
| 3961 | internal_error (__FILE__, __LINE__, |
| 3962 | "gdbarch: gdbarch_register_convert_to_raw invalid"); |
| 3963 | if (gdbarch_debug >= 2) |
| 3964 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n"); |
| 3965 | gdbarch->register_convert_to_raw (type, regnum, from, to); |
| 3966 | } |
| 3967 | |
| 3968 | void |
| 3969 | set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, |
| 3970 | gdbarch_register_convert_to_raw_ftype register_convert_to_raw) |
| 3971 | { |
| 3972 | gdbarch->register_convert_to_raw = register_convert_to_raw; |
| 3973 | } |
| 3974 | |
| 3975 | int |
| 3976 | gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum) |
| 3977 | { |
| 3978 | gdb_assert (gdbarch != NULL); |
| 3979 | if (gdbarch->convert_register_p == 0) |
| 3980 | internal_error (__FILE__, __LINE__, |
| 3981 | "gdbarch: gdbarch_convert_register_p invalid"); |
| 3982 | if (gdbarch_debug >= 2) |
| 3983 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); |
| 3984 | return gdbarch->convert_register_p (regnum); |
| 3985 | } |
| 3986 | |
| 3987 | void |
| 3988 | set_gdbarch_convert_register_p (struct gdbarch *gdbarch, |
| 3989 | gdbarch_convert_register_p_ftype convert_register_p) |
| 3990 | { |
| 3991 | gdbarch->convert_register_p = convert_register_p; |
| 3992 | } |
| 3993 | |
| 3994 | void |
| 3995 | gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) |
| 3996 | { |
| 3997 | gdb_assert (gdbarch != NULL); |
| 3998 | if (gdbarch->register_to_value == 0) |
| 3999 | internal_error (__FILE__, __LINE__, |
| 4000 | "gdbarch: gdbarch_register_to_value invalid"); |
| 4001 | if (gdbarch_debug >= 2) |
| 4002 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); |
| 4003 | gdbarch->register_to_value (regnum, type, from, to); |
| 4004 | } |
| 4005 | |
| 4006 | void |
| 4007 | set_gdbarch_register_to_value (struct gdbarch *gdbarch, |
| 4008 | gdbarch_register_to_value_ftype register_to_value) |
| 4009 | { |
| 4010 | gdbarch->register_to_value = register_to_value; |
| 4011 | } |
| 4012 | |
| 4013 | void |
| 4014 | gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to) |
| 4015 | { |
| 4016 | gdb_assert (gdbarch != NULL); |
| 4017 | if (gdbarch->value_to_register == 0) |
| 4018 | internal_error (__FILE__, __LINE__, |
| 4019 | "gdbarch: gdbarch_value_to_register invalid"); |
| 4020 | if (gdbarch_debug >= 2) |
| 4021 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); |
| 4022 | gdbarch->value_to_register (type, regnum, from, to); |
| 4023 | } |
| 4024 | |
| 4025 | void |
| 4026 | set_gdbarch_value_to_register (struct gdbarch *gdbarch, |
| 4027 | gdbarch_value_to_register_ftype value_to_register) |
| 4028 | { |
| 4029 | gdbarch->value_to_register = value_to_register; |
| 4030 | } |
| 4031 | |
| 4032 | CORE_ADDR |
| 4033 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) |
| 4034 | { |
| 4035 | gdb_assert (gdbarch != NULL); |
| 4036 | if (gdbarch->pointer_to_address == 0) |
| 4037 | internal_error (__FILE__, __LINE__, |
| 4038 | "gdbarch: gdbarch_pointer_to_address invalid"); |
| 4039 | if (gdbarch_debug >= 2) |
| 4040 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); |
| 4041 | return gdbarch->pointer_to_address (type, buf); |
| 4042 | } |
| 4043 | |
| 4044 | void |
| 4045 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, |
| 4046 | gdbarch_pointer_to_address_ftype pointer_to_address) |
| 4047 | { |
| 4048 | gdbarch->pointer_to_address = pointer_to_address; |
| 4049 | } |
| 4050 | |
| 4051 | void |
| 4052 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr) |
| 4053 | { |
| 4054 | gdb_assert (gdbarch != NULL); |
| 4055 | if (gdbarch->address_to_pointer == 0) |
| 4056 | internal_error (__FILE__, __LINE__, |
| 4057 | "gdbarch: gdbarch_address_to_pointer invalid"); |
| 4058 | if (gdbarch_debug >= 2) |
| 4059 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); |
| 4060 | gdbarch->address_to_pointer (type, buf, addr); |
| 4061 | } |
| 4062 | |
| 4063 | void |
| 4064 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, |
| 4065 | gdbarch_address_to_pointer_ftype address_to_pointer) |
| 4066 | { |
| 4067 | gdbarch->address_to_pointer = address_to_pointer; |
| 4068 | } |
| 4069 | |
| 4070 | int |
| 4071 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) |
| 4072 | { |
| 4073 | gdb_assert (gdbarch != NULL); |
| 4074 | return gdbarch->integer_to_address != 0; |
| 4075 | } |
| 4076 | |
| 4077 | CORE_ADDR |
| 4078 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) |
| 4079 | { |
| 4080 | gdb_assert (gdbarch != NULL); |
| 4081 | if (gdbarch->integer_to_address == 0) |
| 4082 | internal_error (__FILE__, __LINE__, |
| 4083 | "gdbarch: gdbarch_integer_to_address invalid"); |
| 4084 | if (gdbarch_debug >= 2) |
| 4085 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); |
| 4086 | return gdbarch->integer_to_address (type, buf); |
| 4087 | } |
| 4088 | |
| 4089 | void |
| 4090 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, |
| 4091 | gdbarch_integer_to_address_ftype integer_to_address) |
| 4092 | { |
| 4093 | gdbarch->integer_to_address = integer_to_address; |
| 4094 | } |
| 4095 | |
| 4096 | int |
| 4097 | gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type) |
| 4098 | { |
| 4099 | gdb_assert (gdbarch != NULL); |
| 4100 | if (gdbarch->return_value_on_stack == 0) |
| 4101 | internal_error (__FILE__, __LINE__, |
| 4102 | "gdbarch: gdbarch_return_value_on_stack invalid"); |
| 4103 | if (gdbarch_debug >= 2) |
| 4104 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n"); |
| 4105 | return gdbarch->return_value_on_stack (type); |
| 4106 | } |
| 4107 | |
| 4108 | void |
| 4109 | set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, |
| 4110 | gdbarch_return_value_on_stack_ftype return_value_on_stack) |
| 4111 | { |
| 4112 | gdbarch->return_value_on_stack = return_value_on_stack; |
| 4113 | } |
| 4114 | |
| 4115 | CORE_ADDR |
| 4116 | gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) |
| 4117 | { |
| 4118 | gdb_assert (gdbarch != NULL); |
| 4119 | if (gdbarch->push_arguments == 0) |
| 4120 | internal_error (__FILE__, __LINE__, |
| 4121 | "gdbarch: gdbarch_push_arguments invalid"); |
| 4122 | if (gdbarch_debug >= 2) |
| 4123 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n"); |
| 4124 | return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr); |
| 4125 | } |
| 4126 | |
| 4127 | void |
| 4128 | set_gdbarch_push_arguments (struct gdbarch *gdbarch, |
| 4129 | gdbarch_push_arguments_ftype push_arguments) |
| 4130 | { |
| 4131 | gdbarch->push_arguments = push_arguments; |
| 4132 | } |
| 4133 | |
| 4134 | void |
| 4135 | gdbarch_push_dummy_frame (struct gdbarch *gdbarch) |
| 4136 | { |
| 4137 | gdb_assert (gdbarch != NULL); |
| 4138 | if (gdbarch->push_dummy_frame == 0) |
| 4139 | internal_error (__FILE__, __LINE__, |
| 4140 | "gdbarch: gdbarch_push_dummy_frame invalid"); |
| 4141 | if (gdbarch_debug >= 2) |
| 4142 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n"); |
| 4143 | gdbarch->push_dummy_frame (); |
| 4144 | } |
| 4145 | |
| 4146 | void |
| 4147 | set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, |
| 4148 | gdbarch_push_dummy_frame_ftype push_dummy_frame) |
| 4149 | { |
| 4150 | gdbarch->push_dummy_frame = push_dummy_frame; |
| 4151 | } |
| 4152 | |
| 4153 | int |
| 4154 | gdbarch_push_return_address_p (struct gdbarch *gdbarch) |
| 4155 | { |
| 4156 | gdb_assert (gdbarch != NULL); |
| 4157 | return gdbarch->push_return_address != 0; |
| 4158 | } |
| 4159 | |
| 4160 | CORE_ADDR |
| 4161 | gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp) |
| 4162 | { |
| 4163 | gdb_assert (gdbarch != NULL); |
| 4164 | if (gdbarch->push_return_address == 0) |
| 4165 | internal_error (__FILE__, __LINE__, |
| 4166 | "gdbarch: gdbarch_push_return_address invalid"); |
| 4167 | if (gdbarch_debug >= 2) |
| 4168 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n"); |
| 4169 | return gdbarch->push_return_address (pc, sp); |
| 4170 | } |
| 4171 | |
| 4172 | void |
| 4173 | set_gdbarch_push_return_address (struct gdbarch *gdbarch, |
| 4174 | gdbarch_push_return_address_ftype push_return_address) |
| 4175 | { |
| 4176 | gdbarch->push_return_address = push_return_address; |
| 4177 | } |
| 4178 | |
| 4179 | void |
| 4180 | gdbarch_pop_frame (struct gdbarch *gdbarch) |
| 4181 | { |
| 4182 | gdb_assert (gdbarch != NULL); |
| 4183 | if (gdbarch->pop_frame == 0) |
| 4184 | internal_error (__FILE__, __LINE__, |
| 4185 | "gdbarch: gdbarch_pop_frame invalid"); |
| 4186 | if (gdbarch_debug >= 2) |
| 4187 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n"); |
| 4188 | gdbarch->pop_frame (); |
| 4189 | } |
| 4190 | |
| 4191 | void |
| 4192 | set_gdbarch_pop_frame (struct gdbarch *gdbarch, |
| 4193 | gdbarch_pop_frame_ftype pop_frame) |
| 4194 | { |
| 4195 | gdbarch->pop_frame = pop_frame; |
| 4196 | } |
| 4197 | |
| 4198 | void |
| 4199 | gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp) |
| 4200 | { |
| 4201 | gdb_assert (gdbarch != NULL); |
| 4202 | if (gdbarch->store_struct_return == 0) |
| 4203 | internal_error (__FILE__, __LINE__, |
| 4204 | "gdbarch: gdbarch_store_struct_return invalid"); |
| 4205 | if (gdbarch_debug >= 2) |
| 4206 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n"); |
| 4207 | gdbarch->store_struct_return (addr, sp); |
| 4208 | } |
| 4209 | |
| 4210 | void |
| 4211 | set_gdbarch_store_struct_return (struct gdbarch *gdbarch, |
| 4212 | gdbarch_store_struct_return_ftype store_struct_return) |
| 4213 | { |
| 4214 | gdbarch->store_struct_return = store_struct_return; |
| 4215 | } |
| 4216 | |
| 4217 | void |
| 4218 | gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf) |
| 4219 | { |
| 4220 | gdb_assert (gdbarch != NULL); |
| 4221 | if (gdbarch->extract_return_value == 0) |
| 4222 | internal_error (__FILE__, __LINE__, |
| 4223 | "gdbarch: gdbarch_extract_return_value invalid"); |
| 4224 | if (gdbarch_debug >= 2) |
| 4225 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n"); |
| 4226 | gdbarch->extract_return_value (type, regcache, valbuf); |
| 4227 | } |
| 4228 | |
| 4229 | void |
| 4230 | set_gdbarch_extract_return_value (struct gdbarch *gdbarch, |
| 4231 | gdbarch_extract_return_value_ftype extract_return_value) |
| 4232 | { |
| 4233 | gdbarch->extract_return_value = extract_return_value; |
| 4234 | } |
| 4235 | |
| 4236 | void |
| 4237 | gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf) |
| 4238 | { |
| 4239 | gdb_assert (gdbarch != NULL); |
| 4240 | if (gdbarch->store_return_value == 0) |
| 4241 | internal_error (__FILE__, __LINE__, |
| 4242 | "gdbarch: gdbarch_store_return_value invalid"); |
| 4243 | if (gdbarch_debug >= 2) |
| 4244 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n"); |
| 4245 | gdbarch->store_return_value (type, regcache, valbuf); |
| 4246 | } |
| 4247 | |
| 4248 | void |
| 4249 | set_gdbarch_store_return_value (struct gdbarch *gdbarch, |
| 4250 | gdbarch_store_return_value_ftype store_return_value) |
| 4251 | { |
| 4252 | gdbarch->store_return_value = store_return_value; |
| 4253 | } |
| 4254 | |
| 4255 | void |
| 4256 | gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) |
| 4257 | { |
| 4258 | gdb_assert (gdbarch != NULL); |
| 4259 | if (gdbarch->deprecated_extract_return_value == 0) |
| 4260 | internal_error (__FILE__, __LINE__, |
| 4261 | "gdbarch: gdbarch_deprecated_extract_return_value invalid"); |
| 4262 | if (gdbarch_debug >= 2) |
| 4263 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n"); |
| 4264 | gdbarch->deprecated_extract_return_value (type, regbuf, valbuf); |
| 4265 | } |
| 4266 | |
| 4267 | void |
| 4268 | set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, |
| 4269 | gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value) |
| 4270 | { |
| 4271 | gdbarch->deprecated_extract_return_value = deprecated_extract_return_value; |
| 4272 | } |
| 4273 | |
| 4274 | void |
| 4275 | gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf) |
| 4276 | { |
| 4277 | gdb_assert (gdbarch != NULL); |
| 4278 | if (gdbarch->deprecated_store_return_value == 0) |
| 4279 | internal_error (__FILE__, __LINE__, |
| 4280 | "gdbarch: gdbarch_deprecated_store_return_value invalid"); |
| 4281 | if (gdbarch_debug >= 2) |
| 4282 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n"); |
| 4283 | gdbarch->deprecated_store_return_value (type, valbuf); |
| 4284 | } |
| 4285 | |
| 4286 | void |
| 4287 | set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, |
| 4288 | gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value) |
| 4289 | { |
| 4290 | gdbarch->deprecated_store_return_value = deprecated_store_return_value; |
| 4291 | } |
| 4292 | |
| 4293 | int |
| 4294 | gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch) |
| 4295 | { |
| 4296 | gdb_assert (gdbarch != NULL); |
| 4297 | return gdbarch->extract_struct_value_address != 0; |
| 4298 | } |
| 4299 | |
| 4300 | CORE_ADDR |
| 4301 | gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache) |
| 4302 | { |
| 4303 | gdb_assert (gdbarch != NULL); |
| 4304 | if (gdbarch->extract_struct_value_address == 0) |
| 4305 | internal_error (__FILE__, __LINE__, |
| 4306 | "gdbarch: gdbarch_extract_struct_value_address invalid"); |
| 4307 | if (gdbarch_debug >= 2) |
| 4308 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n"); |
| 4309 | return gdbarch->extract_struct_value_address (regcache); |
| 4310 | } |
| 4311 | |
| 4312 | void |
| 4313 | set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, |
| 4314 | gdbarch_extract_struct_value_address_ftype extract_struct_value_address) |
| 4315 | { |
| 4316 | gdbarch->extract_struct_value_address = extract_struct_value_address; |
| 4317 | } |
| 4318 | |
| 4319 | int |
| 4320 | gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch) |
| 4321 | { |
| 4322 | gdb_assert (gdbarch != NULL); |
| 4323 | return gdbarch->deprecated_extract_struct_value_address != 0; |
| 4324 | } |
| 4325 | |
| 4326 | CORE_ADDR |
| 4327 | gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf) |
| 4328 | { |
| 4329 | gdb_assert (gdbarch != NULL); |
| 4330 | if (gdbarch->deprecated_extract_struct_value_address == 0) |
| 4331 | internal_error (__FILE__, __LINE__, |
| 4332 | "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid"); |
| 4333 | if (gdbarch_debug >= 2) |
| 4334 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n"); |
| 4335 | return gdbarch->deprecated_extract_struct_value_address (regbuf); |
| 4336 | } |
| 4337 | |
| 4338 | void |
| 4339 | set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, |
| 4340 | gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address) |
| 4341 | { |
| 4342 | gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address; |
| 4343 | } |
| 4344 | |
| 4345 | int |
| 4346 | gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type) |
| 4347 | { |
| 4348 | gdb_assert (gdbarch != NULL); |
| 4349 | if (gdbarch->use_struct_convention == 0) |
| 4350 | internal_error (__FILE__, __LINE__, |
| 4351 | "gdbarch: gdbarch_use_struct_convention invalid"); |
| 4352 | if (gdbarch_debug >= 2) |
| 4353 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n"); |
| 4354 | return gdbarch->use_struct_convention (gcc_p, value_type); |
| 4355 | } |
| 4356 | |
| 4357 | void |
| 4358 | set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, |
| 4359 | gdbarch_use_struct_convention_ftype use_struct_convention) |
| 4360 | { |
| 4361 | gdbarch->use_struct_convention = use_struct_convention; |
| 4362 | } |
| 4363 | |
| 4364 | void |
| 4365 | gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame) |
| 4366 | { |
| 4367 | gdb_assert (gdbarch != NULL); |
| 4368 | if (gdbarch->frame_init_saved_regs == 0) |
| 4369 | internal_error (__FILE__, __LINE__, |
| 4370 | "gdbarch: gdbarch_frame_init_saved_regs invalid"); |
| 4371 | if (gdbarch_debug >= 2) |
| 4372 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n"); |
| 4373 | gdbarch->frame_init_saved_regs (frame); |
| 4374 | } |
| 4375 | |
| 4376 | void |
| 4377 | set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, |
| 4378 | gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs) |
| 4379 | { |
| 4380 | gdbarch->frame_init_saved_regs = frame_init_saved_regs; |
| 4381 | } |
| 4382 | |
| 4383 | int |
| 4384 | gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch) |
| 4385 | { |
| 4386 | gdb_assert (gdbarch != NULL); |
| 4387 | return gdbarch->init_extra_frame_info != 0; |
| 4388 | } |
| 4389 | |
| 4390 | void |
| 4391 | gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame) |
| 4392 | { |
| 4393 | gdb_assert (gdbarch != NULL); |
| 4394 | if (gdbarch->init_extra_frame_info == 0) |
| 4395 | internal_error (__FILE__, __LINE__, |
| 4396 | "gdbarch: gdbarch_init_extra_frame_info invalid"); |
| 4397 | if (gdbarch_debug >= 2) |
| 4398 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n"); |
| 4399 | gdbarch->init_extra_frame_info (fromleaf, frame); |
| 4400 | } |
| 4401 | |
| 4402 | void |
| 4403 | set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, |
| 4404 | gdbarch_init_extra_frame_info_ftype init_extra_frame_info) |
| 4405 | { |
| 4406 | gdbarch->init_extra_frame_info = init_extra_frame_info; |
| 4407 | } |
| 4408 | |
| 4409 | CORE_ADDR |
| 4410 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) |
| 4411 | { |
| 4412 | gdb_assert (gdbarch != NULL); |
| 4413 | if (gdbarch->skip_prologue == 0) |
| 4414 | internal_error (__FILE__, __LINE__, |
| 4415 | "gdbarch: gdbarch_skip_prologue invalid"); |
| 4416 | if (gdbarch_debug >= 2) |
| 4417 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
| 4418 | return gdbarch->skip_prologue (ip); |
| 4419 | } |
| 4420 | |
| 4421 | void |
| 4422 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
| 4423 | gdbarch_skip_prologue_ftype skip_prologue) |
| 4424 | { |
| 4425 | gdbarch->skip_prologue = skip_prologue; |
| 4426 | } |
| 4427 | |
| 4428 | int |
| 4429 | gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip) |
| 4430 | { |
| 4431 | gdb_assert (gdbarch != NULL); |
| 4432 | if (gdbarch->prologue_frameless_p == 0) |
| 4433 | internal_error (__FILE__, __LINE__, |
| 4434 | "gdbarch: gdbarch_prologue_frameless_p invalid"); |
| 4435 | if (gdbarch_debug >= 2) |
| 4436 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n"); |
| 4437 | return gdbarch->prologue_frameless_p (ip); |
| 4438 | } |
| 4439 | |
| 4440 | void |
| 4441 | set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, |
| 4442 | gdbarch_prologue_frameless_p_ftype prologue_frameless_p) |
| 4443 | { |
| 4444 | gdbarch->prologue_frameless_p = prologue_frameless_p; |
| 4445 | } |
| 4446 | |
| 4447 | int |
| 4448 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) |
| 4449 | { |
| 4450 | gdb_assert (gdbarch != NULL); |
| 4451 | if (gdbarch->inner_than == 0) |
| 4452 | internal_error (__FILE__, __LINE__, |
| 4453 | "gdbarch: gdbarch_inner_than invalid"); |
| 4454 | if (gdbarch_debug >= 2) |
| 4455 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
| 4456 | return gdbarch->inner_than (lhs, rhs); |
| 4457 | } |
| 4458 | |
| 4459 | void |
| 4460 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
| 4461 | gdbarch_inner_than_ftype inner_than) |
| 4462 | { |
| 4463 | gdbarch->inner_than = inner_than; |
| 4464 | } |
| 4465 | |
| 4466 | const unsigned char * |
| 4467 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
| 4468 | { |
| 4469 | gdb_assert (gdbarch != NULL); |
| 4470 | if (gdbarch->breakpoint_from_pc == 0) |
| 4471 | internal_error (__FILE__, __LINE__, |
| 4472 | "gdbarch: gdbarch_breakpoint_from_pc invalid"); |
| 4473 | if (gdbarch_debug >= 2) |
| 4474 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
| 4475 | return gdbarch->breakpoint_from_pc (pcptr, lenptr); |
| 4476 | } |
| 4477 | |
| 4478 | void |
| 4479 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
| 4480 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) |
| 4481 | { |
| 4482 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; |
| 4483 | } |
| 4484 | |
| 4485 | int |
| 4486 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) |
| 4487 | { |
| 4488 | gdb_assert (gdbarch != NULL); |
| 4489 | if (gdbarch->memory_insert_breakpoint == 0) |
| 4490 | internal_error (__FILE__, __LINE__, |
| 4491 | "gdbarch: gdbarch_memory_insert_breakpoint invalid"); |
| 4492 | if (gdbarch_debug >= 2) |
| 4493 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
| 4494 | return gdbarch->memory_insert_breakpoint (addr, contents_cache); |
| 4495 | } |
| 4496 | |
| 4497 | void |
| 4498 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, |
| 4499 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) |
| 4500 | { |
| 4501 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; |
| 4502 | } |
| 4503 | |
| 4504 | int |
| 4505 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) |
| 4506 | { |
| 4507 | gdb_assert (gdbarch != NULL); |
| 4508 | if (gdbarch->memory_remove_breakpoint == 0) |
| 4509 | internal_error (__FILE__, __LINE__, |
| 4510 | "gdbarch: gdbarch_memory_remove_breakpoint invalid"); |
| 4511 | if (gdbarch_debug >= 2) |
| 4512 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
| 4513 | return gdbarch->memory_remove_breakpoint (addr, contents_cache); |
| 4514 | } |
| 4515 | |
| 4516 | void |
| 4517 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, |
| 4518 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) |
| 4519 | { |
| 4520 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; |
| 4521 | } |
| 4522 | |
| 4523 | CORE_ADDR |
| 4524 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
| 4525 | { |
| 4526 | gdb_assert (gdbarch != NULL); |
| 4527 | if (gdbarch->decr_pc_after_break == -1) |
| 4528 | internal_error (__FILE__, __LINE__, |
| 4529 | "gdbarch: gdbarch_decr_pc_after_break invalid"); |
| 4530 | if (gdbarch_debug >= 2) |
| 4531 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
| 4532 | return gdbarch->decr_pc_after_break; |
| 4533 | } |
| 4534 | |
| 4535 | void |
| 4536 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
| 4537 | CORE_ADDR decr_pc_after_break) |
| 4538 | { |
| 4539 | gdbarch->decr_pc_after_break = decr_pc_after_break; |
| 4540 | } |
| 4541 | |
| 4542 | int |
| 4543 | gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it) |
| 4544 | { |
| 4545 | gdb_assert (gdbarch != NULL); |
| 4546 | if (gdbarch->prepare_to_proceed == 0) |
| 4547 | internal_error (__FILE__, __LINE__, |
| 4548 | "gdbarch: gdbarch_prepare_to_proceed invalid"); |
| 4549 | if (gdbarch_debug >= 2) |
| 4550 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n"); |
| 4551 | return gdbarch->prepare_to_proceed (select_it); |
| 4552 | } |
| 4553 | |
| 4554 | void |
| 4555 | set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, |
| 4556 | gdbarch_prepare_to_proceed_ftype prepare_to_proceed) |
| 4557 | { |
| 4558 | gdbarch->prepare_to_proceed = prepare_to_proceed; |
| 4559 | } |
| 4560 | |
| 4561 | CORE_ADDR |
| 4562 | gdbarch_function_start_offset (struct gdbarch *gdbarch) |
| 4563 | { |
| 4564 | gdb_assert (gdbarch != NULL); |
| 4565 | if (gdbarch->function_start_offset == -1) |
| 4566 | internal_error (__FILE__, __LINE__, |
| 4567 | "gdbarch: gdbarch_function_start_offset invalid"); |
| 4568 | if (gdbarch_debug >= 2) |
| 4569 | fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n"); |
| 4570 | return gdbarch->function_start_offset; |
| 4571 | } |
| 4572 | |
| 4573 | void |
| 4574 | set_gdbarch_function_start_offset (struct gdbarch *gdbarch, |
| 4575 | CORE_ADDR function_start_offset) |
| 4576 | { |
| 4577 | gdbarch->function_start_offset = function_start_offset; |
| 4578 | } |
| 4579 | |
| 4580 | void |
| 4581 | gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len) |
| 4582 | { |
| 4583 | gdb_assert (gdbarch != NULL); |
| 4584 | if (gdbarch->remote_translate_xfer_address == 0) |
| 4585 | internal_error (__FILE__, __LINE__, |
| 4586 | "gdbarch: gdbarch_remote_translate_xfer_address invalid"); |
| 4587 | if (gdbarch_debug >= 2) |
| 4588 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n"); |
| 4589 | gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len); |
| 4590 | } |
| 4591 | |
| 4592 | void |
| 4593 | set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, |
| 4594 | gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address) |
| 4595 | { |
| 4596 | gdbarch->remote_translate_xfer_address = remote_translate_xfer_address; |
| 4597 | } |
| 4598 | |
| 4599 | CORE_ADDR |
| 4600 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
| 4601 | { |
| 4602 | gdb_assert (gdbarch != NULL); |
| 4603 | if (gdbarch->frame_args_skip == -1) |
| 4604 | internal_error (__FILE__, __LINE__, |
| 4605 | "gdbarch: gdbarch_frame_args_skip invalid"); |
| 4606 | if (gdbarch_debug >= 2) |
| 4607 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
| 4608 | return gdbarch->frame_args_skip; |
| 4609 | } |
| 4610 | |
| 4611 | void |
| 4612 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
| 4613 | CORE_ADDR frame_args_skip) |
| 4614 | { |
| 4615 | gdbarch->frame_args_skip = frame_args_skip; |
| 4616 | } |
| 4617 | |
| 4618 | int |
| 4619 | gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi) |
| 4620 | { |
| 4621 | gdb_assert (gdbarch != NULL); |
| 4622 | if (gdbarch->frameless_function_invocation == 0) |
| 4623 | internal_error (__FILE__, __LINE__, |
| 4624 | "gdbarch: gdbarch_frameless_function_invocation invalid"); |
| 4625 | if (gdbarch_debug >= 2) |
| 4626 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n"); |
| 4627 | return gdbarch->frameless_function_invocation (fi); |
| 4628 | } |
| 4629 | |
| 4630 | void |
| 4631 | set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, |
| 4632 | gdbarch_frameless_function_invocation_ftype frameless_function_invocation) |
| 4633 | { |
| 4634 | gdbarch->frameless_function_invocation = frameless_function_invocation; |
| 4635 | } |
| 4636 | |
| 4637 | CORE_ADDR |
| 4638 | gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame) |
| 4639 | { |
| 4640 | gdb_assert (gdbarch != NULL); |
| 4641 | if (gdbarch->frame_chain == 0) |
| 4642 | internal_error (__FILE__, __LINE__, |
| 4643 | "gdbarch: gdbarch_frame_chain invalid"); |
| 4644 | if (gdbarch_debug >= 2) |
| 4645 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n"); |
| 4646 | return gdbarch->frame_chain (frame); |
| 4647 | } |
| 4648 | |
| 4649 | void |
| 4650 | set_gdbarch_frame_chain (struct gdbarch *gdbarch, |
| 4651 | gdbarch_frame_chain_ftype frame_chain) |
| 4652 | { |
| 4653 | gdbarch->frame_chain = frame_chain; |
| 4654 | } |
| 4655 | |
| 4656 | int |
| 4657 | gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe) |
| 4658 | { |
| 4659 | gdb_assert (gdbarch != NULL); |
| 4660 | if (gdbarch->frame_chain_valid == 0) |
| 4661 | internal_error (__FILE__, __LINE__, |
| 4662 | "gdbarch: gdbarch_frame_chain_valid invalid"); |
| 4663 | if (gdbarch_debug >= 2) |
| 4664 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n"); |
| 4665 | return gdbarch->frame_chain_valid (chain, thisframe); |
| 4666 | } |
| 4667 | |
| 4668 | void |
| 4669 | set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, |
| 4670 | gdbarch_frame_chain_valid_ftype frame_chain_valid) |
| 4671 | { |
| 4672 | gdbarch->frame_chain_valid = frame_chain_valid; |
| 4673 | } |
| 4674 | |
| 4675 | CORE_ADDR |
| 4676 | gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi) |
| 4677 | { |
| 4678 | gdb_assert (gdbarch != NULL); |
| 4679 | if (gdbarch->frame_saved_pc == 0) |
| 4680 | internal_error (__FILE__, __LINE__, |
| 4681 | "gdbarch: gdbarch_frame_saved_pc invalid"); |
| 4682 | if (gdbarch_debug >= 2) |
| 4683 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n"); |
| 4684 | return gdbarch->frame_saved_pc (fi); |
| 4685 | } |
| 4686 | |
| 4687 | void |
| 4688 | set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, |
| 4689 | gdbarch_frame_saved_pc_ftype frame_saved_pc) |
| 4690 | { |
| 4691 | gdbarch->frame_saved_pc = frame_saved_pc; |
| 4692 | } |
| 4693 | |
| 4694 | CORE_ADDR |
| 4695 | gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi) |
| 4696 | { |
| 4697 | gdb_assert (gdbarch != NULL); |
| 4698 | if (gdbarch->frame_args_address == 0) |
| 4699 | internal_error (__FILE__, __LINE__, |
| 4700 | "gdbarch: gdbarch_frame_args_address invalid"); |
| 4701 | if (gdbarch_debug >= 2) |
| 4702 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n"); |
| 4703 | return gdbarch->frame_args_address (fi); |
| 4704 | } |
| 4705 | |
| 4706 | void |
| 4707 | set_gdbarch_frame_args_address (struct gdbarch *gdbarch, |
| 4708 | gdbarch_frame_args_address_ftype frame_args_address) |
| 4709 | { |
| 4710 | gdbarch->frame_args_address = frame_args_address; |
| 4711 | } |
| 4712 | |
| 4713 | CORE_ADDR |
| 4714 | gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi) |
| 4715 | { |
| 4716 | gdb_assert (gdbarch != NULL); |
| 4717 | if (gdbarch->frame_locals_address == 0) |
| 4718 | internal_error (__FILE__, __LINE__, |
| 4719 | "gdbarch: gdbarch_frame_locals_address invalid"); |
| 4720 | if (gdbarch_debug >= 2) |
| 4721 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n"); |
| 4722 | return gdbarch->frame_locals_address (fi); |
| 4723 | } |
| 4724 | |
| 4725 | void |
| 4726 | set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, |
| 4727 | gdbarch_frame_locals_address_ftype frame_locals_address) |
| 4728 | { |
| 4729 | gdbarch->frame_locals_address = frame_locals_address; |
| 4730 | } |
| 4731 | |
| 4732 | CORE_ADDR |
| 4733 | gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame) |
| 4734 | { |
| 4735 | gdb_assert (gdbarch != NULL); |
| 4736 | if (gdbarch->saved_pc_after_call == 0) |
| 4737 | internal_error (__FILE__, __LINE__, |
| 4738 | "gdbarch: gdbarch_saved_pc_after_call invalid"); |
| 4739 | if (gdbarch_debug >= 2) |
| 4740 | fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n"); |
| 4741 | return gdbarch->saved_pc_after_call (frame); |
| 4742 | } |
| 4743 | |
| 4744 | void |
| 4745 | set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, |
| 4746 | gdbarch_saved_pc_after_call_ftype saved_pc_after_call) |
| 4747 | { |
| 4748 | gdbarch->saved_pc_after_call = saved_pc_after_call; |
| 4749 | } |
| 4750 | |
| 4751 | int |
| 4752 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) |
| 4753 | { |
| 4754 | gdb_assert (gdbarch != NULL); |
| 4755 | if (gdbarch->frame_num_args == 0) |
| 4756 | internal_error (__FILE__, __LINE__, |
| 4757 | "gdbarch: gdbarch_frame_num_args invalid"); |
| 4758 | if (gdbarch_debug >= 2) |
| 4759 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
| 4760 | return gdbarch->frame_num_args (frame); |
| 4761 | } |
| 4762 | |
| 4763 | void |
| 4764 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
| 4765 | gdbarch_frame_num_args_ftype frame_num_args) |
| 4766 | { |
| 4767 | gdbarch->frame_num_args = frame_num_args; |
| 4768 | } |
| 4769 | |
| 4770 | int |
| 4771 | gdbarch_stack_align_p (struct gdbarch *gdbarch) |
| 4772 | { |
| 4773 | gdb_assert (gdbarch != NULL); |
| 4774 | return gdbarch->stack_align != 0; |
| 4775 | } |
| 4776 | |
| 4777 | CORE_ADDR |
| 4778 | gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp) |
| 4779 | { |
| 4780 | gdb_assert (gdbarch != NULL); |
| 4781 | if (gdbarch->stack_align == 0) |
| 4782 | internal_error (__FILE__, __LINE__, |
| 4783 | "gdbarch: gdbarch_stack_align invalid"); |
| 4784 | if (gdbarch_debug >= 2) |
| 4785 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n"); |
| 4786 | return gdbarch->stack_align (sp); |
| 4787 | } |
| 4788 | |
| 4789 | void |
| 4790 | set_gdbarch_stack_align (struct gdbarch *gdbarch, |
| 4791 | gdbarch_stack_align_ftype stack_align) |
| 4792 | { |
| 4793 | gdbarch->stack_align = stack_align; |
| 4794 | } |
| 4795 | |
| 4796 | int |
| 4797 | gdbarch_frame_align_p (struct gdbarch *gdbarch) |
| 4798 | { |
| 4799 | gdb_assert (gdbarch != NULL); |
| 4800 | return gdbarch->frame_align != 0; |
| 4801 | } |
| 4802 | |
| 4803 | CORE_ADDR |
| 4804 | gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) |
| 4805 | { |
| 4806 | gdb_assert (gdbarch != NULL); |
| 4807 | if (gdbarch->frame_align == 0) |
| 4808 | internal_error (__FILE__, __LINE__, |
| 4809 | "gdbarch: gdbarch_frame_align invalid"); |
| 4810 | if (gdbarch_debug >= 2) |
| 4811 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n"); |
| 4812 | return gdbarch->frame_align (gdbarch, address); |
| 4813 | } |
| 4814 | |
| 4815 | void |
| 4816 | set_gdbarch_frame_align (struct gdbarch *gdbarch, |
| 4817 | gdbarch_frame_align_ftype frame_align) |
| 4818 | { |
| 4819 | gdbarch->frame_align = frame_align; |
| 4820 | } |
| 4821 | |
| 4822 | int |
| 4823 | gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch) |
| 4824 | { |
| 4825 | gdb_assert (gdbarch != NULL); |
| 4826 | /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ |
| 4827 | if (gdbarch_debug >= 2) |
| 4828 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n"); |
| 4829 | return gdbarch->extra_stack_alignment_needed; |
| 4830 | } |
| 4831 | |
| 4832 | void |
| 4833 | set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch, |
| 4834 | int extra_stack_alignment_needed) |
| 4835 | { |
| 4836 | gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed; |
| 4837 | } |
| 4838 | |
| 4839 | int |
| 4840 | gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch) |
| 4841 | { |
| 4842 | gdb_assert (gdbarch != NULL); |
| 4843 | return gdbarch->reg_struct_has_addr != 0; |
| 4844 | } |
| 4845 | |
| 4846 | int |
| 4847 | gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type) |
| 4848 | { |
| 4849 | gdb_assert (gdbarch != NULL); |
| 4850 | if (gdbarch->reg_struct_has_addr == 0) |
| 4851 | internal_error (__FILE__, __LINE__, |
| 4852 | "gdbarch: gdbarch_reg_struct_has_addr invalid"); |
| 4853 | if (gdbarch_debug >= 2) |
| 4854 | fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n"); |
| 4855 | return gdbarch->reg_struct_has_addr (gcc_p, type); |
| 4856 | } |
| 4857 | |
| 4858 | void |
| 4859 | set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, |
| 4860 | gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr) |
| 4861 | { |
| 4862 | gdbarch->reg_struct_has_addr = reg_struct_has_addr; |
| 4863 | } |
| 4864 | |
| 4865 | int |
| 4866 | gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch) |
| 4867 | { |
| 4868 | gdb_assert (gdbarch != NULL); |
| 4869 | return gdbarch->save_dummy_frame_tos != 0; |
| 4870 | } |
| 4871 | |
| 4872 | void |
| 4873 | gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) |
| 4874 | { |
| 4875 | gdb_assert (gdbarch != NULL); |
| 4876 | if (gdbarch->save_dummy_frame_tos == 0) |
| 4877 | internal_error (__FILE__, __LINE__, |
| 4878 | "gdbarch: gdbarch_save_dummy_frame_tos invalid"); |
| 4879 | if (gdbarch_debug >= 2) |
| 4880 | fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n"); |
| 4881 | gdbarch->save_dummy_frame_tos (sp); |
| 4882 | } |
| 4883 | |
| 4884 | void |
| 4885 | set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, |
| 4886 | gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos) |
| 4887 | { |
| 4888 | gdbarch->save_dummy_frame_tos = save_dummy_frame_tos; |
| 4889 | } |
| 4890 | |
| 4891 | int |
| 4892 | gdbarch_parm_boundary (struct gdbarch *gdbarch) |
| 4893 | { |
| 4894 | gdb_assert (gdbarch != NULL); |
| 4895 | if (gdbarch_debug >= 2) |
| 4896 | fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n"); |
| 4897 | return gdbarch->parm_boundary; |
| 4898 | } |
| 4899 | |
| 4900 | void |
| 4901 | set_gdbarch_parm_boundary (struct gdbarch *gdbarch, |
| 4902 | int parm_boundary) |
| 4903 | { |
| 4904 | gdbarch->parm_boundary = parm_boundary; |
| 4905 | } |
| 4906 | |
| 4907 | const struct floatformat * |
| 4908 | gdbarch_float_format (struct gdbarch *gdbarch) |
| 4909 | { |
| 4910 | gdb_assert (gdbarch != NULL); |
| 4911 | if (gdbarch_debug >= 2) |
| 4912 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); |
| 4913 | return gdbarch->float_format; |
| 4914 | } |
| 4915 | |
| 4916 | void |
| 4917 | set_gdbarch_float_format (struct gdbarch *gdbarch, |
| 4918 | const struct floatformat * float_format) |
| 4919 | { |
| 4920 | gdbarch->float_format = float_format; |
| 4921 | } |
| 4922 | |
| 4923 | const struct floatformat * |
| 4924 | gdbarch_double_format (struct gdbarch *gdbarch) |
| 4925 | { |
| 4926 | gdb_assert (gdbarch != NULL); |
| 4927 | if (gdbarch_debug >= 2) |
| 4928 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); |
| 4929 | return gdbarch->double_format; |
| 4930 | } |
| 4931 | |
| 4932 | void |
| 4933 | set_gdbarch_double_format (struct gdbarch *gdbarch, |
| 4934 | const struct floatformat * double_format) |
| 4935 | { |
| 4936 | gdbarch->double_format = double_format; |
| 4937 | } |
| 4938 | |
| 4939 | const struct floatformat * |
| 4940 | gdbarch_long_double_format (struct gdbarch *gdbarch) |
| 4941 | { |
| 4942 | gdb_assert (gdbarch != NULL); |
| 4943 | if (gdbarch_debug >= 2) |
| 4944 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); |
| 4945 | return gdbarch->long_double_format; |
| 4946 | } |
| 4947 | |
| 4948 | void |
| 4949 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, |
| 4950 | const struct floatformat * long_double_format) |
| 4951 | { |
| 4952 | gdbarch->long_double_format = long_double_format; |
| 4953 | } |
| 4954 | |
| 4955 | CORE_ADDR |
| 4956 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4957 | { |
| 4958 | gdb_assert (gdbarch != NULL); |
| 4959 | if (gdbarch->convert_from_func_ptr_addr == 0) |
| 4960 | internal_error (__FILE__, __LINE__, |
| 4961 | "gdbarch: gdbarch_convert_from_func_ptr_addr invalid"); |
| 4962 | if (gdbarch_debug >= 2) |
| 4963 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); |
| 4964 | return gdbarch->convert_from_func_ptr_addr (addr); |
| 4965 | } |
| 4966 | |
| 4967 | void |
| 4968 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, |
| 4969 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) |
| 4970 | { |
| 4971 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; |
| 4972 | } |
| 4973 | |
| 4974 | CORE_ADDR |
| 4975 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4976 | { |
| 4977 | gdb_assert (gdbarch != NULL); |
| 4978 | if (gdbarch->addr_bits_remove == 0) |
| 4979 | internal_error (__FILE__, __LINE__, |
| 4980 | "gdbarch: gdbarch_addr_bits_remove invalid"); |
| 4981 | if (gdbarch_debug >= 2) |
| 4982 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); |
| 4983 | return gdbarch->addr_bits_remove (addr); |
| 4984 | } |
| 4985 | |
| 4986 | void |
| 4987 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, |
| 4988 | gdbarch_addr_bits_remove_ftype addr_bits_remove) |
| 4989 | { |
| 4990 | gdbarch->addr_bits_remove = addr_bits_remove; |
| 4991 | } |
| 4992 | |
| 4993 | CORE_ADDR |
| 4994 | gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4995 | { |
| 4996 | gdb_assert (gdbarch != NULL); |
| 4997 | if (gdbarch->smash_text_address == 0) |
| 4998 | internal_error (__FILE__, __LINE__, |
| 4999 | "gdbarch: gdbarch_smash_text_address invalid"); |
| 5000 | if (gdbarch_debug >= 2) |
| 5001 | fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n"); |
| 5002 | return gdbarch->smash_text_address (addr); |
| 5003 | } |
| 5004 | |
| 5005 | void |
| 5006 | set_gdbarch_smash_text_address (struct gdbarch *gdbarch, |
| 5007 | gdbarch_smash_text_address_ftype smash_text_address) |
| 5008 | { |
| 5009 | gdbarch->smash_text_address = smash_text_address; |
| 5010 | } |
| 5011 | |
| 5012 | int |
| 5013 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) |
| 5014 | { |
| 5015 | gdb_assert (gdbarch != NULL); |
| 5016 | return gdbarch->software_single_step != 0; |
| 5017 | } |
| 5018 | |
| 5019 | void |
| 5020 | gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) |
| 5021 | { |
| 5022 | gdb_assert (gdbarch != NULL); |
| 5023 | if (gdbarch->software_single_step == 0) |
| 5024 | internal_error (__FILE__, __LINE__, |
| 5025 | "gdbarch: gdbarch_software_single_step invalid"); |
| 5026 | if (gdbarch_debug >= 2) |
| 5027 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); |
| 5028 | gdbarch->software_single_step (sig, insert_breakpoints_p); |
| 5029 | } |
| 5030 | |
| 5031 | void |
| 5032 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, |
| 5033 | gdbarch_software_single_step_ftype software_single_step) |
| 5034 | { |
| 5035 | gdbarch->software_single_step = software_single_step; |
| 5036 | } |
| 5037 | |
| 5038 | int |
| 5039 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info) |
| 5040 | { |
| 5041 | gdb_assert (gdbarch != NULL); |
| 5042 | if (gdbarch->print_insn == 0) |
| 5043 | internal_error (__FILE__, __LINE__, |
| 5044 | "gdbarch: gdbarch_print_insn invalid"); |
| 5045 | if (gdbarch_debug >= 2) |
| 5046 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); |
| 5047 | return gdbarch->print_insn (vma, info); |
| 5048 | } |
| 5049 | |
| 5050 | void |
| 5051 | set_gdbarch_print_insn (struct gdbarch *gdbarch, |
| 5052 | gdbarch_print_insn_ftype print_insn) |
| 5053 | { |
| 5054 | gdbarch->print_insn = print_insn; |
| 5055 | } |
| 5056 | |
| 5057 | CORE_ADDR |
| 5058 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc) |
| 5059 | { |
| 5060 | gdb_assert (gdbarch != NULL); |
| 5061 | if (gdbarch->skip_trampoline_code == 0) |
| 5062 | internal_error (__FILE__, __LINE__, |
| 5063 | "gdbarch: gdbarch_skip_trampoline_code invalid"); |
| 5064 | if (gdbarch_debug >= 2) |
| 5065 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); |
| 5066 | return gdbarch->skip_trampoline_code (pc); |
| 5067 | } |
| 5068 | |
| 5069 | void |
| 5070 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, |
| 5071 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) |
| 5072 | { |
| 5073 | gdbarch->skip_trampoline_code = skip_trampoline_code; |
| 5074 | } |
| 5075 | |
| 5076 | int |
| 5077 | gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) |
| 5078 | { |
| 5079 | gdb_assert (gdbarch != NULL); |
| 5080 | if (gdbarch->in_solib_call_trampoline == 0) |
| 5081 | internal_error (__FILE__, __LINE__, |
| 5082 | "gdbarch: gdbarch_in_solib_call_trampoline invalid"); |
| 5083 | if (gdbarch_debug >= 2) |
| 5084 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n"); |
| 5085 | return gdbarch->in_solib_call_trampoline (pc, name); |
| 5086 | } |
| 5087 | |
| 5088 | void |
| 5089 | set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, |
| 5090 | gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline) |
| 5091 | { |
| 5092 | gdbarch->in_solib_call_trampoline = in_solib_call_trampoline; |
| 5093 | } |
| 5094 | |
| 5095 | int |
| 5096 | gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) |
| 5097 | { |
| 5098 | gdb_assert (gdbarch != NULL); |
| 5099 | if (gdbarch->in_solib_return_trampoline == 0) |
| 5100 | internal_error (__FILE__, __LINE__, |
| 5101 | "gdbarch: gdbarch_in_solib_return_trampoline invalid"); |
| 5102 | if (gdbarch_debug >= 2) |
| 5103 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); |
| 5104 | return gdbarch->in_solib_return_trampoline (pc, name); |
| 5105 | } |
| 5106 | |
| 5107 | void |
| 5108 | set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, |
| 5109 | gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline) |
| 5110 | { |
| 5111 | gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; |
| 5112 | } |
| 5113 | |
| 5114 | int |
| 5115 | gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) |
| 5116 | { |
| 5117 | gdb_assert (gdbarch != NULL); |
| 5118 | if (gdbarch->pc_in_sigtramp == 0) |
| 5119 | internal_error (__FILE__, __LINE__, |
| 5120 | "gdbarch: gdbarch_pc_in_sigtramp invalid"); |
| 5121 | if (gdbarch_debug >= 2) |
| 5122 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n"); |
| 5123 | return gdbarch->pc_in_sigtramp (pc, name); |
| 5124 | } |
| 5125 | |
| 5126 | void |
| 5127 | set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, |
| 5128 | gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp) |
| 5129 | { |
| 5130 | gdbarch->pc_in_sigtramp = pc_in_sigtramp; |
| 5131 | } |
| 5132 | |
| 5133 | int |
| 5134 | gdbarch_sigtramp_start_p (struct gdbarch *gdbarch) |
| 5135 | { |
| 5136 | gdb_assert (gdbarch != NULL); |
| 5137 | return gdbarch->sigtramp_start != 0; |
| 5138 | } |
| 5139 | |
| 5140 | CORE_ADDR |
| 5141 | gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc) |
| 5142 | { |
| 5143 | gdb_assert (gdbarch != NULL); |
| 5144 | if (gdbarch->sigtramp_start == 0) |
| 5145 | internal_error (__FILE__, __LINE__, |
| 5146 | "gdbarch: gdbarch_sigtramp_start invalid"); |
| 5147 | if (gdbarch_debug >= 2) |
| 5148 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n"); |
| 5149 | return gdbarch->sigtramp_start (pc); |
| 5150 | } |
| 5151 | |
| 5152 | void |
| 5153 | set_gdbarch_sigtramp_start (struct gdbarch *gdbarch, |
| 5154 | gdbarch_sigtramp_start_ftype sigtramp_start) |
| 5155 | { |
| 5156 | gdbarch->sigtramp_start = sigtramp_start; |
| 5157 | } |
| 5158 | |
| 5159 | int |
| 5160 | gdbarch_sigtramp_end_p (struct gdbarch *gdbarch) |
| 5161 | { |
| 5162 | gdb_assert (gdbarch != NULL); |
| 5163 | return gdbarch->sigtramp_end != 0; |
| 5164 | } |
| 5165 | |
| 5166 | CORE_ADDR |
| 5167 | gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc) |
| 5168 | { |
| 5169 | gdb_assert (gdbarch != NULL); |
| 5170 | if (gdbarch->sigtramp_end == 0) |
| 5171 | internal_error (__FILE__, __LINE__, |
| 5172 | "gdbarch: gdbarch_sigtramp_end invalid"); |
| 5173 | if (gdbarch_debug >= 2) |
| 5174 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n"); |
| 5175 | return gdbarch->sigtramp_end (pc); |
| 5176 | } |
| 5177 | |
| 5178 | void |
| 5179 | set_gdbarch_sigtramp_end (struct gdbarch *gdbarch, |
| 5180 | gdbarch_sigtramp_end_ftype sigtramp_end) |
| 5181 | { |
| 5182 | gdbarch->sigtramp_end = sigtramp_end; |
| 5183 | } |
| 5184 | |
| 5185 | int |
| 5186 | gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 5187 | { |
| 5188 | gdb_assert (gdbarch != NULL); |
| 5189 | if (gdbarch->in_function_epilogue_p == 0) |
| 5190 | internal_error (__FILE__, __LINE__, |
| 5191 | "gdbarch: gdbarch_in_function_epilogue_p invalid"); |
| 5192 | if (gdbarch_debug >= 2) |
| 5193 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); |
| 5194 | return gdbarch->in_function_epilogue_p (gdbarch, addr); |
| 5195 | } |
| 5196 | |
| 5197 | void |
| 5198 | set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, |
| 5199 | gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) |
| 5200 | { |
| 5201 | gdbarch->in_function_epilogue_p = in_function_epilogue_p; |
| 5202 | } |
| 5203 | |
| 5204 | char * |
| 5205 | gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv) |
| 5206 | { |
| 5207 | gdb_assert (gdbarch != NULL); |
| 5208 | if (gdbarch->construct_inferior_arguments == 0) |
| 5209 | internal_error (__FILE__, __LINE__, |
| 5210 | "gdbarch: gdbarch_construct_inferior_arguments invalid"); |
| 5211 | if (gdbarch_debug >= 2) |
| 5212 | fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n"); |
| 5213 | return gdbarch->construct_inferior_arguments (gdbarch, argc, argv); |
| 5214 | } |
| 5215 | |
| 5216 | void |
| 5217 | set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, |
| 5218 | gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments) |
| 5219 | { |
| 5220 | gdbarch->construct_inferior_arguments = construct_inferior_arguments; |
| 5221 | } |
| 5222 | |
| 5223 | int |
| 5224 | gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch) |
| 5225 | { |
| 5226 | gdb_assert (gdbarch != NULL); |
| 5227 | return gdbarch->dwarf2_build_frame_info != 0; |
| 5228 | } |
| 5229 | |
| 5230 | void |
| 5231 | gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile) |
| 5232 | { |
| 5233 | gdb_assert (gdbarch != NULL); |
| 5234 | if (gdbarch->dwarf2_build_frame_info == 0) |
| 5235 | internal_error (__FILE__, __LINE__, |
| 5236 | "gdbarch: gdbarch_dwarf2_build_frame_info invalid"); |
| 5237 | if (gdbarch_debug >= 2) |
| 5238 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n"); |
| 5239 | gdbarch->dwarf2_build_frame_info (objfile); |
| 5240 | } |
| 5241 | |
| 5242 | void |
| 5243 | set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, |
| 5244 | gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info) |
| 5245 | { |
| 5246 | gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info; |
| 5247 | } |
| 5248 | |
| 5249 | void |
| 5250 | gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym) |
| 5251 | { |
| 5252 | gdb_assert (gdbarch != NULL); |
| 5253 | if (gdbarch->elf_make_msymbol_special == 0) |
| 5254 | internal_error (__FILE__, __LINE__, |
| 5255 | "gdbarch: gdbarch_elf_make_msymbol_special invalid"); |
| 5256 | if (gdbarch_debug >= 2) |
| 5257 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); |
| 5258 | gdbarch->elf_make_msymbol_special (sym, msym); |
| 5259 | } |
| 5260 | |
| 5261 | void |
| 5262 | set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, |
| 5263 | gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special) |
| 5264 | { |
| 5265 | gdbarch->elf_make_msymbol_special = elf_make_msymbol_special; |
| 5266 | } |
| 5267 | |
| 5268 | void |
| 5269 | gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym) |
| 5270 | { |
| 5271 | gdb_assert (gdbarch != NULL); |
| 5272 | if (gdbarch->coff_make_msymbol_special == 0) |
| 5273 | internal_error (__FILE__, __LINE__, |
| 5274 | "gdbarch: gdbarch_coff_make_msymbol_special invalid"); |
| 5275 | if (gdbarch_debug >= 2) |
| 5276 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); |
| 5277 | gdbarch->coff_make_msymbol_special (val, msym); |
| 5278 | } |
| 5279 | |
| 5280 | void |
| 5281 | set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, |
| 5282 | gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special) |
| 5283 | { |
| 5284 | gdbarch->coff_make_msymbol_special = coff_make_msymbol_special; |
| 5285 | } |
| 5286 | |
| 5287 | const char * |
| 5288 | gdbarch_name_of_malloc (struct gdbarch *gdbarch) |
| 5289 | { |
| 5290 | gdb_assert (gdbarch != NULL); |
| 5291 | /* Skip verify of name_of_malloc, invalid_p == 0 */ |
| 5292 | if (gdbarch_debug >= 2) |
| 5293 | fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n"); |
| 5294 | return gdbarch->name_of_malloc; |
| 5295 | } |
| 5296 | |
| 5297 | void |
| 5298 | set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, |
| 5299 | const char * name_of_malloc) |
| 5300 | { |
| 5301 | gdbarch->name_of_malloc = name_of_malloc; |
| 5302 | } |
| 5303 | |
| 5304 | int |
| 5305 | gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) |
| 5306 | { |
| 5307 | gdb_assert (gdbarch != NULL); |
| 5308 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ |
| 5309 | if (gdbarch_debug >= 2) |
| 5310 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); |
| 5311 | return gdbarch->cannot_step_breakpoint; |
| 5312 | } |
| 5313 | |
| 5314 | void |
| 5315 | set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, |
| 5316 | int cannot_step_breakpoint) |
| 5317 | { |
| 5318 | gdbarch->cannot_step_breakpoint = cannot_step_breakpoint; |
| 5319 | } |
| 5320 | |
| 5321 | int |
| 5322 | gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) |
| 5323 | { |
| 5324 | gdb_assert (gdbarch != NULL); |
| 5325 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ |
| 5326 | if (gdbarch_debug >= 2) |
| 5327 | fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); |
| 5328 | return gdbarch->have_nonsteppable_watchpoint; |
| 5329 | } |
| 5330 | |
| 5331 | void |
| 5332 | set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, |
| 5333 | int have_nonsteppable_watchpoint) |
| 5334 | { |
| 5335 | gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint; |
| 5336 | } |
| 5337 | |
| 5338 | int |
| 5339 | gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch) |
| 5340 | { |
| 5341 | gdb_assert (gdbarch != NULL); |
| 5342 | return gdbarch->address_class_type_flags != 0; |
| 5343 | } |
| 5344 | |
| 5345 | int |
| 5346 | gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class) |
| 5347 | { |
| 5348 | gdb_assert (gdbarch != NULL); |
| 5349 | if (gdbarch->address_class_type_flags == 0) |
| 5350 | internal_error (__FILE__, __LINE__, |
| 5351 | "gdbarch: gdbarch_address_class_type_flags invalid"); |
| 5352 | if (gdbarch_debug >= 2) |
| 5353 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); |
| 5354 | return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class); |
| 5355 | } |
| 5356 | |
| 5357 | void |
| 5358 | set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, |
| 5359 | gdbarch_address_class_type_flags_ftype address_class_type_flags) |
| 5360 | { |
| 5361 | gdbarch->address_class_type_flags = address_class_type_flags; |
| 5362 | } |
| 5363 | |
| 5364 | int |
| 5365 | gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch) |
| 5366 | { |
| 5367 | gdb_assert (gdbarch != NULL); |
| 5368 | return gdbarch->address_class_type_flags_to_name != 0; |
| 5369 | } |
| 5370 | |
| 5371 | char * |
| 5372 | gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags) |
| 5373 | { |
| 5374 | gdb_assert (gdbarch != NULL); |
| 5375 | if (gdbarch->address_class_type_flags_to_name == 0) |
| 5376 | internal_error (__FILE__, __LINE__, |
| 5377 | "gdbarch: gdbarch_address_class_type_flags_to_name invalid"); |
| 5378 | if (gdbarch_debug >= 2) |
| 5379 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); |
| 5380 | return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags); |
| 5381 | } |
| 5382 | |
| 5383 | void |
| 5384 | set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, |
| 5385 | gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name) |
| 5386 | { |
| 5387 | gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name; |
| 5388 | } |
| 5389 | |
| 5390 | int |
| 5391 | gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch) |
| 5392 | { |
| 5393 | gdb_assert (gdbarch != NULL); |
| 5394 | return gdbarch->address_class_name_to_type_flags != 0; |
| 5395 | } |
| 5396 | |
| 5397 | int |
| 5398 | gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr) |
| 5399 | { |
| 5400 | gdb_assert (gdbarch != NULL); |
| 5401 | if (gdbarch->address_class_name_to_type_flags == 0) |
| 5402 | internal_error (__FILE__, __LINE__, |
| 5403 | "gdbarch: gdbarch_address_class_name_to_type_flags invalid"); |
| 5404 | if (gdbarch_debug >= 2) |
| 5405 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); |
| 5406 | return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr); |
| 5407 | } |
| 5408 | |
| 5409 | void |
| 5410 | set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, |
| 5411 | gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags) |
| 5412 | { |
| 5413 | gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags; |
| 5414 | } |
| 5415 | |
| 5416 | int |
| 5417 | gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup) |
| 5418 | { |
| 5419 | gdb_assert (gdbarch != NULL); |
| 5420 | if (gdbarch->register_reggroup_p == 0) |
| 5421 | internal_error (__FILE__, __LINE__, |
| 5422 | "gdbarch: gdbarch_register_reggroup_p invalid"); |
| 5423 | if (gdbarch_debug >= 2) |
| 5424 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); |
| 5425 | return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup); |
| 5426 | } |
| 5427 | |
| 5428 | void |
| 5429 | set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, |
| 5430 | gdbarch_register_reggroup_p_ftype register_reggroup_p) |
| 5431 | { |
| 5432 | gdbarch->register_reggroup_p = register_reggroup_p; |
| 5433 | } |
| 5434 | |
| 5435 | |
| 5436 | /* Keep a registry of per-architecture data-pointers required by GDB |
| 5437 | modules. */ |
| 5438 | |
| 5439 | struct gdbarch_data |
| 5440 | { |
| 5441 | unsigned index; |
| 5442 | int init_p; |
| 5443 | gdbarch_data_init_ftype *init; |
| 5444 | gdbarch_data_free_ftype *free; |
| 5445 | }; |
| 5446 | |
| 5447 | struct gdbarch_data_registration |
| 5448 | { |
| 5449 | struct gdbarch_data *data; |
| 5450 | struct gdbarch_data_registration *next; |
| 5451 | }; |
| 5452 | |
| 5453 | struct gdbarch_data_registry |
| 5454 | { |
| 5455 | unsigned nr; |
| 5456 | struct gdbarch_data_registration *registrations; |
| 5457 | }; |
| 5458 | |
| 5459 | struct gdbarch_data_registry gdbarch_data_registry = |
| 5460 | { |
| 5461 | 0, NULL, |
| 5462 | }; |
| 5463 | |
| 5464 | struct gdbarch_data * |
| 5465 | register_gdbarch_data (gdbarch_data_init_ftype *init, |
| 5466 | gdbarch_data_free_ftype *free) |
| 5467 | { |
| 5468 | struct gdbarch_data_registration **curr; |
| 5469 | /* Append the new registraration. */ |
| 5470 | for (curr = &gdbarch_data_registry.registrations; |
| 5471 | (*curr) != NULL; |
| 5472 | curr = &(*curr)->next); |
| 5473 | (*curr) = XMALLOC (struct gdbarch_data_registration); |
| 5474 | (*curr)->next = NULL; |
| 5475 | (*curr)->data = XMALLOC (struct gdbarch_data); |
| 5476 | (*curr)->data->index = gdbarch_data_registry.nr++; |
| 5477 | (*curr)->data->init = init; |
| 5478 | (*curr)->data->init_p = 1; |
| 5479 | (*curr)->data->free = free; |
| 5480 | return (*curr)->data; |
| 5481 | } |
| 5482 | |
| 5483 | |
| 5484 | /* Create/delete the gdbarch data vector. */ |
| 5485 | |
| 5486 | static void |
| 5487 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
| 5488 | { |
| 5489 | gdb_assert (gdbarch->data == NULL); |
| 5490 | gdbarch->nr_data = gdbarch_data_registry.nr; |
| 5491 | gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*)); |
| 5492 | } |
| 5493 | |
| 5494 | static void |
| 5495 | free_gdbarch_data (struct gdbarch *gdbarch) |
| 5496 | { |
| 5497 | struct gdbarch_data_registration *rego; |
| 5498 | gdb_assert (gdbarch->data != NULL); |
| 5499 | for (rego = gdbarch_data_registry.registrations; |
| 5500 | rego != NULL; |
| 5501 | rego = rego->next) |
| 5502 | { |
| 5503 | struct gdbarch_data *data = rego->data; |
| 5504 | gdb_assert (data->index < gdbarch->nr_data); |
| 5505 | if (data->free != NULL && gdbarch->data[data->index] != NULL) |
| 5506 | { |
| 5507 | data->free (gdbarch, gdbarch->data[data->index]); |
| 5508 | gdbarch->data[data->index] = NULL; |
| 5509 | } |
| 5510 | } |
| 5511 | xfree (gdbarch->data); |
| 5512 | gdbarch->data = NULL; |
| 5513 | } |
| 5514 | |
| 5515 | |
| 5516 | /* Initialize the current value of the specified per-architecture |
| 5517 | data-pointer. */ |
| 5518 | |
| 5519 | void |
| 5520 | set_gdbarch_data (struct gdbarch *gdbarch, |
| 5521 | struct gdbarch_data *data, |
| 5522 | void *pointer) |
| 5523 | { |
| 5524 | gdb_assert (data->index < gdbarch->nr_data); |
| 5525 | if (gdbarch->data[data->index] != NULL) |
| 5526 | { |
| 5527 | gdb_assert (data->free != NULL); |
| 5528 | data->free (gdbarch, gdbarch->data[data->index]); |
| 5529 | } |
| 5530 | gdbarch->data[data->index] = pointer; |
| 5531 | } |
| 5532 | |
| 5533 | /* Return the current value of the specified per-architecture |
| 5534 | data-pointer. */ |
| 5535 | |
| 5536 | void * |
| 5537 | gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data) |
| 5538 | { |
| 5539 | gdb_assert (data->index < gdbarch->nr_data); |
| 5540 | /* The data-pointer isn't initialized, call init() to get a value but |
| 5541 | only if the architecture initializaiton has completed. Otherwise |
| 5542 | punt - hope that the caller knows what they are doing. */ |
| 5543 | if (gdbarch->data[data->index] == NULL |
| 5544 | && gdbarch->initialized_p) |
| 5545 | { |
| 5546 | /* Be careful to detect an initialization cycle. */ |
| 5547 | gdb_assert (data->init_p); |
| 5548 | data->init_p = 0; |
| 5549 | gdb_assert (data->init != NULL); |
| 5550 | gdbarch->data[data->index] = data->init (gdbarch); |
| 5551 | data->init_p = 1; |
| 5552 | gdb_assert (gdbarch->data[data->index] != NULL); |
| 5553 | } |
| 5554 | return gdbarch->data[data->index]; |
| 5555 | } |
| 5556 | |
| 5557 | |
| 5558 | |
| 5559 | /* Keep a registry of swapped data required by GDB modules. */ |
| 5560 | |
| 5561 | struct gdbarch_swap |
| 5562 | { |
| 5563 | void *swap; |
| 5564 | struct gdbarch_swap_registration *source; |
| 5565 | struct gdbarch_swap *next; |
| 5566 | }; |
| 5567 | |
| 5568 | struct gdbarch_swap_registration |
| 5569 | { |
| 5570 | void *data; |
| 5571 | unsigned long sizeof_data; |
| 5572 | gdbarch_swap_ftype *init; |
| 5573 | struct gdbarch_swap_registration *next; |
| 5574 | }; |
| 5575 | |
| 5576 | struct gdbarch_swap_registry |
| 5577 | { |
| 5578 | int nr; |
| 5579 | struct gdbarch_swap_registration *registrations; |
| 5580 | }; |
| 5581 | |
| 5582 | struct gdbarch_swap_registry gdbarch_swap_registry = |
| 5583 | { |
| 5584 | 0, NULL, |
| 5585 | }; |
| 5586 | |
| 5587 | void |
| 5588 | register_gdbarch_swap (void *data, |
| 5589 | unsigned long sizeof_data, |
| 5590 | gdbarch_swap_ftype *init) |
| 5591 | { |
| 5592 | struct gdbarch_swap_registration **rego; |
| 5593 | for (rego = &gdbarch_swap_registry.registrations; |
| 5594 | (*rego) != NULL; |
| 5595 | rego = &(*rego)->next); |
| 5596 | (*rego) = XMALLOC (struct gdbarch_swap_registration); |
| 5597 | (*rego)->next = NULL; |
| 5598 | (*rego)->init = init; |
| 5599 | (*rego)->data = data; |
| 5600 | (*rego)->sizeof_data = sizeof_data; |
| 5601 | } |
| 5602 | |
| 5603 | static void |
| 5604 | clear_gdbarch_swap (struct gdbarch *gdbarch) |
| 5605 | { |
| 5606 | struct gdbarch_swap *curr; |
| 5607 | for (curr = gdbarch->swap; |
| 5608 | curr != NULL; |
| 5609 | curr = curr->next) |
| 5610 | { |
| 5611 | memset (curr->source->data, 0, curr->source->sizeof_data); |
| 5612 | } |
| 5613 | } |
| 5614 | |
| 5615 | static void |
| 5616 | init_gdbarch_swap (struct gdbarch *gdbarch) |
| 5617 | { |
| 5618 | struct gdbarch_swap_registration *rego; |
| 5619 | struct gdbarch_swap **curr = &gdbarch->swap; |
| 5620 | for (rego = gdbarch_swap_registry.registrations; |
| 5621 | rego != NULL; |
| 5622 | rego = rego->next) |
| 5623 | { |
| 5624 | if (rego->data != NULL) |
| 5625 | { |
| 5626 | (*curr) = XMALLOC (struct gdbarch_swap); |
| 5627 | (*curr)->source = rego; |
| 5628 | (*curr)->swap = xmalloc (rego->sizeof_data); |
| 5629 | (*curr)->next = NULL; |
| 5630 | curr = &(*curr)->next; |
| 5631 | } |
| 5632 | if (rego->init != NULL) |
| 5633 | rego->init (); |
| 5634 | } |
| 5635 | } |
| 5636 | |
| 5637 | static void |
| 5638 | swapout_gdbarch_swap (struct gdbarch *gdbarch) |
| 5639 | { |
| 5640 | struct gdbarch_swap *curr; |
| 5641 | for (curr = gdbarch->swap; |
| 5642 | curr != NULL; |
| 5643 | curr = curr->next) |
| 5644 | memcpy (curr->swap, curr->source->data, curr->source->sizeof_data); |
| 5645 | } |
| 5646 | |
| 5647 | static void |
| 5648 | swapin_gdbarch_swap (struct gdbarch *gdbarch) |
| 5649 | { |
| 5650 | struct gdbarch_swap *curr; |
| 5651 | for (curr = gdbarch->swap; |
| 5652 | curr != NULL; |
| 5653 | curr = curr->next) |
| 5654 | memcpy (curr->source->data, curr->swap, curr->source->sizeof_data); |
| 5655 | } |
| 5656 | |
| 5657 | |
| 5658 | /* Keep a registry of the architectures known by GDB. */ |
| 5659 | |
| 5660 | struct gdbarch_registration |
| 5661 | { |
| 5662 | enum bfd_architecture bfd_architecture; |
| 5663 | gdbarch_init_ftype *init; |
| 5664 | gdbarch_dump_tdep_ftype *dump_tdep; |
| 5665 | struct gdbarch_list *arches; |
| 5666 | struct gdbarch_registration *next; |
| 5667 | }; |
| 5668 | |
| 5669 | static struct gdbarch_registration *gdbarch_registry = NULL; |
| 5670 | |
| 5671 | static void |
| 5672 | append_name (const char ***buf, int *nr, const char *name) |
| 5673 | { |
| 5674 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); |
| 5675 | (*buf)[*nr] = name; |
| 5676 | *nr += 1; |
| 5677 | } |
| 5678 | |
| 5679 | const char ** |
| 5680 | gdbarch_printable_names (void) |
| 5681 | { |
| 5682 | if (GDB_MULTI_ARCH) |
| 5683 | { |
| 5684 | /* Accumulate a list of names based on the registed list of |
| 5685 | architectures. */ |
| 5686 | enum bfd_architecture a; |
| 5687 | int nr_arches = 0; |
| 5688 | const char **arches = NULL; |
| 5689 | struct gdbarch_registration *rego; |
| 5690 | for (rego = gdbarch_registry; |
| 5691 | rego != NULL; |
| 5692 | rego = rego->next) |
| 5693 | { |
| 5694 | const struct bfd_arch_info *ap; |
| 5695 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); |
| 5696 | if (ap == NULL) |
| 5697 | internal_error (__FILE__, __LINE__, |
| 5698 | "gdbarch_architecture_names: multi-arch unknown"); |
| 5699 | do |
| 5700 | { |
| 5701 | append_name (&arches, &nr_arches, ap->printable_name); |
| 5702 | ap = ap->next; |
| 5703 | } |
| 5704 | while (ap != NULL); |
| 5705 | } |
| 5706 | append_name (&arches, &nr_arches, NULL); |
| 5707 | return arches; |
| 5708 | } |
| 5709 | else |
| 5710 | /* Just return all the architectures that BFD knows. Assume that |
| 5711 | the legacy architecture framework supports them. */ |
| 5712 | return bfd_arch_list (); |
| 5713 | } |
| 5714 | |
| 5715 | |
| 5716 | void |
| 5717 | gdbarch_register (enum bfd_architecture bfd_architecture, |
| 5718 | gdbarch_init_ftype *init, |
| 5719 | gdbarch_dump_tdep_ftype *dump_tdep) |
| 5720 | { |
| 5721 | struct gdbarch_registration **curr; |
| 5722 | const struct bfd_arch_info *bfd_arch_info; |
| 5723 | /* Check that BFD recognizes this architecture */ |
| 5724 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
| 5725 | if (bfd_arch_info == NULL) |
| 5726 | { |
| 5727 | internal_error (__FILE__, __LINE__, |
| 5728 | "gdbarch: Attempt to register unknown architecture (%d)", |
| 5729 | bfd_architecture); |
| 5730 | } |
| 5731 | /* Check that we haven't seen this architecture before */ |
| 5732 | for (curr = &gdbarch_registry; |
| 5733 | (*curr) != NULL; |
| 5734 | curr = &(*curr)->next) |
| 5735 | { |
| 5736 | if (bfd_architecture == (*curr)->bfd_architecture) |
| 5737 | internal_error (__FILE__, __LINE__, |
| 5738 | "gdbarch: Duplicate registraration of architecture (%s)", |
| 5739 | bfd_arch_info->printable_name); |
| 5740 | } |
| 5741 | /* log it */ |
| 5742 | if (gdbarch_debug) |
| 5743 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n", |
| 5744 | bfd_arch_info->printable_name, |
| 5745 | (long) init); |
| 5746 | /* Append it */ |
| 5747 | (*curr) = XMALLOC (struct gdbarch_registration); |
| 5748 | (*curr)->bfd_architecture = bfd_architecture; |
| 5749 | (*curr)->init = init; |
| 5750 | (*curr)->dump_tdep = dump_tdep; |
| 5751 | (*curr)->arches = NULL; |
| 5752 | (*curr)->next = NULL; |
| 5753 | /* When non- multi-arch, install whatever target dump routine we've |
| 5754 | been provided - hopefully that routine has been written correctly |
| 5755 | and works regardless of multi-arch. */ |
| 5756 | if (!GDB_MULTI_ARCH && dump_tdep != NULL |
| 5757 | && startup_gdbarch.dump_tdep == NULL) |
| 5758 | startup_gdbarch.dump_tdep = dump_tdep; |
| 5759 | } |
| 5760 | |
| 5761 | void |
| 5762 | register_gdbarch_init (enum bfd_architecture bfd_architecture, |
| 5763 | gdbarch_init_ftype *init) |
| 5764 | { |
| 5765 | gdbarch_register (bfd_architecture, init, NULL); |
| 5766 | } |
| 5767 | |
| 5768 | |
| 5769 | /* Look for an architecture using gdbarch_info. Base search on only |
| 5770 | BFD_ARCH_INFO and BYTE_ORDER. */ |
| 5771 | |
| 5772 | struct gdbarch_list * |
| 5773 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
| 5774 | const struct gdbarch_info *info) |
| 5775 | { |
| 5776 | for (; arches != NULL; arches = arches->next) |
| 5777 | { |
| 5778 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) |
| 5779 | continue; |
| 5780 | if (info->byte_order != arches->gdbarch->byte_order) |
| 5781 | continue; |
| 5782 | return arches; |
| 5783 | } |
| 5784 | return NULL; |
| 5785 | } |
| 5786 | |
| 5787 | |
| 5788 | /* Update the current architecture. Return ZERO if the update request |
| 5789 | failed. */ |
| 5790 | |
| 5791 | int |
| 5792 | gdbarch_update_p (struct gdbarch_info info) |
| 5793 | { |
| 5794 | struct gdbarch *new_gdbarch; |
| 5795 | struct gdbarch *old_gdbarch; |
| 5796 | struct gdbarch_registration *rego; |
| 5797 | |
| 5798 | /* Fill in missing parts of the INFO struct using a number of |
| 5799 | sources: ``set ...''; INFOabfd supplied; existing target. */ |
| 5800 | |
| 5801 | /* ``(gdb) set architecture ...'' */ |
| 5802 | if (info.bfd_arch_info == NULL |
| 5803 | && !TARGET_ARCHITECTURE_AUTO) |
| 5804 | info.bfd_arch_info = TARGET_ARCHITECTURE; |
| 5805 | if (info.bfd_arch_info == NULL |
| 5806 | && info.abfd != NULL |
| 5807 | && bfd_get_arch (info.abfd) != bfd_arch_unknown |
| 5808 | && bfd_get_arch (info.abfd) != bfd_arch_obscure) |
| 5809 | info.bfd_arch_info = bfd_get_arch_info (info.abfd); |
| 5810 | if (info.bfd_arch_info == NULL) |
| 5811 | info.bfd_arch_info = TARGET_ARCHITECTURE; |
| 5812 | |
| 5813 | /* ``(gdb) set byte-order ...'' */ |
| 5814 | if (info.byte_order == BFD_ENDIAN_UNKNOWN |
| 5815 | && !TARGET_BYTE_ORDER_AUTO) |
| 5816 | info.byte_order = TARGET_BYTE_ORDER; |
| 5817 | /* From the INFO struct. */ |
| 5818 | if (info.byte_order == BFD_ENDIAN_UNKNOWN |
| 5819 | && info.abfd != NULL) |
| 5820 | info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG |
| 5821 | : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE |
| 5822 | : BFD_ENDIAN_UNKNOWN); |
| 5823 | /* From the current target. */ |
| 5824 | if (info.byte_order == BFD_ENDIAN_UNKNOWN) |
| 5825 | info.byte_order = TARGET_BYTE_ORDER; |
| 5826 | |
| 5827 | /* Must have found some sort of architecture. */ |
| 5828 | gdb_assert (info.bfd_arch_info != NULL); |
| 5829 | |
| 5830 | if (gdbarch_debug) |
| 5831 | { |
| 5832 | fprintf_unfiltered (gdb_stdlog, |
| 5833 | "gdbarch_update: info.bfd_arch_info %s\n", |
| 5834 | (info.bfd_arch_info != NULL |
| 5835 | ? info.bfd_arch_info->printable_name |
| 5836 | : "(null)")); |
| 5837 | fprintf_unfiltered (gdb_stdlog, |
| 5838 | "gdbarch_update: info.byte_order %d (%s)\n", |
| 5839 | info.byte_order, |
| 5840 | (info.byte_order == BFD_ENDIAN_BIG ? "big" |
| 5841 | : info.byte_order == BFD_ENDIAN_LITTLE ? "little" |
| 5842 | : "default")); |
| 5843 | fprintf_unfiltered (gdb_stdlog, |
| 5844 | "gdbarch_update: info.abfd 0x%lx\n", |
| 5845 | (long) info.abfd); |
| 5846 | fprintf_unfiltered (gdb_stdlog, |
| 5847 | "gdbarch_update: info.tdep_info 0x%lx\n", |
| 5848 | (long) info.tdep_info); |
| 5849 | } |
| 5850 | |
| 5851 | /* Find the target that knows about this architecture. */ |
| 5852 | for (rego = gdbarch_registry; |
| 5853 | rego != NULL; |
| 5854 | rego = rego->next) |
| 5855 | if (rego->bfd_architecture == info.bfd_arch_info->arch) |
| 5856 | break; |
| 5857 | if (rego == NULL) |
| 5858 | { |
| 5859 | if (gdbarch_debug) |
| 5860 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n"); |
| 5861 | return 0; |
| 5862 | } |
| 5863 | |
| 5864 | /* Swap the data belonging to the old target out setting the |
| 5865 | installed data to zero. This stops the ->init() function trying |
| 5866 | to refer to the previous architecture's global data structures. */ |
| 5867 | swapout_gdbarch_swap (current_gdbarch); |
| 5868 | clear_gdbarch_swap (current_gdbarch); |
| 5869 | |
| 5870 | /* Save the previously selected architecture, setting the global to |
| 5871 | NULL. This stops ->init() trying to use the previous |
| 5872 | architecture's configuration. The previous architecture may not |
| 5873 | even be of the same architecture family. The most recent |
| 5874 | architecture of the same family is found at the head of the |
| 5875 | rego->arches list. */ |
| 5876 | old_gdbarch = current_gdbarch; |
| 5877 | current_gdbarch = NULL; |
| 5878 | |
| 5879 | /* Ask the target for a replacement architecture. */ |
| 5880 | new_gdbarch = rego->init (info, rego->arches); |
| 5881 | |
| 5882 | /* Did the target like it? No. Reject the change and revert to the |
| 5883 | old architecture. */ |
| 5884 | if (new_gdbarch == NULL) |
| 5885 | { |
| 5886 | if (gdbarch_debug) |
| 5887 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n"); |
| 5888 | swapin_gdbarch_swap (old_gdbarch); |
| 5889 | current_gdbarch = old_gdbarch; |
| 5890 | return 0; |
| 5891 | } |
| 5892 | |
| 5893 | /* Did the architecture change? No. Oops, put the old architecture |
| 5894 | back. */ |
| 5895 | if (old_gdbarch == new_gdbarch) |
| 5896 | { |
| 5897 | if (gdbarch_debug) |
| 5898 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n", |
| 5899 | (long) new_gdbarch, |
| 5900 | new_gdbarch->bfd_arch_info->printable_name); |
| 5901 | swapin_gdbarch_swap (old_gdbarch); |
| 5902 | current_gdbarch = old_gdbarch; |
| 5903 | return 1; |
| 5904 | } |
| 5905 | |
| 5906 | /* Is this a pre-existing architecture? Yes. Move it to the front |
| 5907 | of the list of architectures (keeping the list sorted Most |
| 5908 | Recently Used) and then copy it in. */ |
| 5909 | { |
| 5910 | struct gdbarch_list **list; |
| 5911 | for (list = ®o->arches; |
| 5912 | (*list) != NULL; |
| 5913 | list = &(*list)->next) |
| 5914 | { |
| 5915 | if ((*list)->gdbarch == new_gdbarch) |
| 5916 | { |
| 5917 | struct gdbarch_list *this; |
| 5918 | if (gdbarch_debug) |
| 5919 | fprintf_unfiltered (gdb_stdlog, |
| 5920 | "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n", |
| 5921 | (long) new_gdbarch, |
| 5922 | new_gdbarch->bfd_arch_info->printable_name); |
| 5923 | /* Unlink this. */ |
| 5924 | this = (*list); |
| 5925 | (*list) = this->next; |
| 5926 | /* Insert in the front. */ |
| 5927 | this->next = rego->arches; |
| 5928 | rego->arches = this; |
| 5929 | /* Copy the new architecture in. */ |
| 5930 | current_gdbarch = new_gdbarch; |
| 5931 | swapin_gdbarch_swap (new_gdbarch); |
| 5932 | architecture_changed_event (); |
| 5933 | return 1; |
| 5934 | } |
| 5935 | } |
| 5936 | } |
| 5937 | |
| 5938 | /* Prepend this new architecture to the architecture list (keep the |
| 5939 | list sorted Most Recently Used). */ |
| 5940 | { |
| 5941 | struct gdbarch_list *this = XMALLOC (struct gdbarch_list); |
| 5942 | this->next = rego->arches; |
| 5943 | this->gdbarch = new_gdbarch; |
| 5944 | rego->arches = this; |
| 5945 | } |
| 5946 | |
| 5947 | /* Switch to this new architecture marking it initialized. */ |
| 5948 | current_gdbarch = new_gdbarch; |
| 5949 | current_gdbarch->initialized_p = 1; |
| 5950 | if (gdbarch_debug) |
| 5951 | { |
| 5952 | fprintf_unfiltered (gdb_stdlog, |
| 5953 | "gdbarch_update: New architecture 0x%08lx (%s) selected\n", |
| 5954 | (long) new_gdbarch, |
| 5955 | new_gdbarch->bfd_arch_info->printable_name); |
| 5956 | } |
| 5957 | |
| 5958 | /* Check that the newly installed architecture is valid. Plug in |
| 5959 | any post init values. */ |
| 5960 | new_gdbarch->dump_tdep = rego->dump_tdep; |
| 5961 | verify_gdbarch (new_gdbarch); |
| 5962 | |
| 5963 | /* Initialize the per-architecture memory (swap) areas. |
| 5964 | CURRENT_GDBARCH must be update before these modules are |
| 5965 | called. */ |
| 5966 | init_gdbarch_swap (new_gdbarch); |
| 5967 | |
| 5968 | /* Initialize the per-architecture data. CURRENT_GDBARCH |
| 5969 | must be updated before these modules are called. */ |
| 5970 | architecture_changed_event (); |
| 5971 | |
| 5972 | if (gdbarch_debug) |
| 5973 | gdbarch_dump (current_gdbarch, gdb_stdlog); |
| 5974 | |
| 5975 | return 1; |
| 5976 | } |
| 5977 | |
| 5978 | |
| 5979 | /* Disassembler */ |
| 5980 | |
| 5981 | /* Pointer to the target-dependent disassembly function. */ |
| 5982 | int (*tm_print_insn) (bfd_vma, disassemble_info *); |
| 5983 | disassemble_info tm_print_insn_info; |
| 5984 | |
| 5985 | |
| 5986 | extern void _initialize_gdbarch (void); |
| 5987 | |
| 5988 | void |
| 5989 | _initialize_gdbarch (void) |
| 5990 | { |
| 5991 | struct cmd_list_element *c; |
| 5992 | |
| 5993 | INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered); |
| 5994 | tm_print_insn_info.flavour = bfd_target_unknown_flavour; |
| 5995 | tm_print_insn_info.read_memory_func = dis_asm_read_memory; |
| 5996 | tm_print_insn_info.memory_error_func = dis_asm_memory_error; |
| 5997 | tm_print_insn_info.print_address_func = dis_asm_print_address; |
| 5998 | |
| 5999 | add_show_from_set (add_set_cmd ("arch", |
| 6000 | class_maintenance, |
| 6001 | var_zinteger, |
| 6002 | (char *)&gdbarch_debug, |
| 6003 | "Set architecture debugging.\n\ |
| 6004 | When non-zero, architecture debugging is enabled.", &setdebuglist), |
| 6005 | &showdebuglist); |
| 6006 | c = add_set_cmd ("archdebug", |
| 6007 | class_maintenance, |
| 6008 | var_zinteger, |
| 6009 | (char *)&gdbarch_debug, |
| 6010 | "Set architecture debugging.\n\ |
| 6011 | When non-zero, architecture debugging is enabled.", &setlist); |
| 6012 | |
| 6013 | deprecate_cmd (c, "set debug arch"); |
| 6014 | deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch"); |
| 6015 | } |