| 1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
| 2 | |
| 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
| 4 | Copyright 1998, 1999, 2000, 2001 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-events.h" |
| 66 | |
| 67 | /* Static function declarations */ |
| 68 | |
| 69 | static void verify_gdbarch (struct gdbarch *gdbarch); |
| 70 | static void alloc_gdbarch_data (struct gdbarch *); |
| 71 | static void init_gdbarch_data (struct gdbarch *); |
| 72 | static void free_gdbarch_data (struct gdbarch *); |
| 73 | static void init_gdbarch_swap (struct gdbarch *); |
| 74 | static void swapout_gdbarch_swap (struct gdbarch *); |
| 75 | static void swapin_gdbarch_swap (struct gdbarch *); |
| 76 | |
| 77 | /* Convenience macro for allocting typesafe memory. */ |
| 78 | |
| 79 | #ifndef XMALLOC |
| 80 | #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE)) |
| 81 | #endif |
| 82 | |
| 83 | |
| 84 | /* Non-zero if we want to trace architecture code. */ |
| 85 | |
| 86 | #ifndef GDBARCH_DEBUG |
| 87 | #define GDBARCH_DEBUG 0 |
| 88 | #endif |
| 89 | int gdbarch_debug = GDBARCH_DEBUG; |
| 90 | |
| 91 | |
| 92 | /* Maintain the struct gdbarch object */ |
| 93 | |
| 94 | struct gdbarch |
| 95 | { |
| 96 | /* basic architectural information */ |
| 97 | const struct bfd_arch_info * bfd_arch_info; |
| 98 | int byte_order; |
| 99 | |
| 100 | /* target specific vector. */ |
| 101 | struct gdbarch_tdep *tdep; |
| 102 | gdbarch_dump_tdep_ftype *dump_tdep; |
| 103 | |
| 104 | /* per-architecture data-pointers */ |
| 105 | unsigned nr_data; |
| 106 | void **data; |
| 107 | |
| 108 | /* per-architecture swap-regions */ |
| 109 | struct gdbarch_swap *swap; |
| 110 | |
| 111 | /* Multi-arch values. |
| 112 | |
| 113 | When extending this structure you must: |
| 114 | |
| 115 | Add the field below. |
| 116 | |
| 117 | Declare set/get functions and define the corresponding |
| 118 | macro in gdbarch.h. |
| 119 | |
| 120 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
| 121 | initialize the new field. |
| 122 | |
| 123 | verify_gdbarch(): Confirm that the target updated the field |
| 124 | correctly. |
| 125 | |
| 126 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
| 127 | field is dumped out |
| 128 | |
| 129 | ``startup_gdbarch()'': Append an initial value to the static |
| 130 | variable (base values on the host's c-type system). |
| 131 | |
| 132 | get_gdbarch(): Implement the set/get functions (probably using |
| 133 | the macro's as shortcuts). |
| 134 | |
| 135 | */ |
| 136 | |
| 137 | int short_bit; |
| 138 | int int_bit; |
| 139 | int long_bit; |
| 140 | int long_long_bit; |
| 141 | int float_bit; |
| 142 | int double_bit; |
| 143 | int long_double_bit; |
| 144 | int ptr_bit; |
| 145 | int addr_bit; |
| 146 | int bfd_vma_bit; |
| 147 | int ieee_float; |
| 148 | gdbarch_read_pc_ftype *read_pc; |
| 149 | gdbarch_write_pc_ftype *write_pc; |
| 150 | gdbarch_read_fp_ftype *read_fp; |
| 151 | gdbarch_write_fp_ftype *write_fp; |
| 152 | gdbarch_read_sp_ftype *read_sp; |
| 153 | gdbarch_write_sp_ftype *write_sp; |
| 154 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
| 155 | gdbarch_register_read_ftype *register_read; |
| 156 | gdbarch_register_write_ftype *register_write; |
| 157 | int num_regs; |
| 158 | int num_pseudo_regs; |
| 159 | int sp_regnum; |
| 160 | int fp_regnum; |
| 161 | int pc_regnum; |
| 162 | int fp0_regnum; |
| 163 | int npc_regnum; |
| 164 | int nnpc_regnum; |
| 165 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
| 166 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; |
| 167 | gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum; |
| 168 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; |
| 169 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; |
| 170 | gdbarch_register_name_ftype *register_name; |
| 171 | int register_size; |
| 172 | int register_bytes; |
| 173 | gdbarch_register_byte_ftype *register_byte; |
| 174 | gdbarch_register_raw_size_ftype *register_raw_size; |
| 175 | int max_register_raw_size; |
| 176 | gdbarch_register_virtual_size_ftype *register_virtual_size; |
| 177 | int max_register_virtual_size; |
| 178 | gdbarch_register_virtual_type_ftype *register_virtual_type; |
| 179 | gdbarch_do_registers_info_ftype *do_registers_info; |
| 180 | gdbarch_register_sim_regno_ftype *register_sim_regno; |
| 181 | gdbarch_register_bytes_ok_ftype *register_bytes_ok; |
| 182 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; |
| 183 | gdbarch_cannot_store_register_ftype *cannot_store_register; |
| 184 | int 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_pc_in_call_dummy_ftype *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_init_frame_pc_first_ftype *init_frame_pc_first; |
| 199 | gdbarch_init_frame_pc_ftype *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_fetch_pseudo_register_ftype *fetch_pseudo_register; |
| 208 | gdbarch_store_pseudo_register_ftype *store_pseudo_register; |
| 209 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
| 210 | gdbarch_address_to_pointer_ftype *address_to_pointer; |
| 211 | gdbarch_integer_to_address_ftype *integer_to_address; |
| 212 | gdbarch_return_value_on_stack_ftype *return_value_on_stack; |
| 213 | gdbarch_extract_return_value_ftype *extract_return_value; |
| 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_store_return_value_ftype *store_return_value; |
| 220 | gdbarch_extract_struct_value_address_ftype *extract_struct_value_address; |
| 221 | gdbarch_use_struct_convention_ftype *use_struct_convention; |
| 222 | gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs; |
| 223 | gdbarch_init_extra_frame_info_ftype *init_extra_frame_info; |
| 224 | gdbarch_skip_prologue_ftype *skip_prologue; |
| 225 | gdbarch_prologue_frameless_p_ftype *prologue_frameless_p; |
| 226 | gdbarch_inner_than_ftype *inner_than; |
| 227 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; |
| 228 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
| 229 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; |
| 230 | CORE_ADDR decr_pc_after_break; |
| 231 | gdbarch_prepare_to_proceed_ftype *prepare_to_proceed; |
| 232 | CORE_ADDR function_start_offset; |
| 233 | gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; |
| 234 | CORE_ADDR frame_args_skip; |
| 235 | gdbarch_frameless_function_invocation_ftype *frameless_function_invocation; |
| 236 | gdbarch_frame_chain_ftype *frame_chain; |
| 237 | gdbarch_frame_chain_valid_ftype *frame_chain_valid; |
| 238 | gdbarch_frame_saved_pc_ftype *frame_saved_pc; |
| 239 | gdbarch_frame_args_address_ftype *frame_args_address; |
| 240 | gdbarch_frame_locals_address_ftype *frame_locals_address; |
| 241 | gdbarch_saved_pc_after_call_ftype *saved_pc_after_call; |
| 242 | gdbarch_frame_num_args_ftype *frame_num_args; |
| 243 | gdbarch_stack_align_ftype *stack_align; |
| 244 | int extra_stack_alignment_needed; |
| 245 | gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr; |
| 246 | gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos; |
| 247 | int parm_boundary; |
| 248 | const struct floatformat * float_format; |
| 249 | const struct floatformat * double_format; |
| 250 | const struct floatformat * long_double_format; |
| 251 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
| 252 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
| 253 | gdbarch_software_single_step_ftype *software_single_step; |
| 254 | gdbarch_print_insn_ftype *print_insn; |
| 255 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
| 256 | gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; |
| 257 | gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; |
| 258 | gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; |
| 259 | gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info; |
| 260 | }; |
| 261 | |
| 262 | |
| 263 | /* The default architecture uses host values (for want of a better |
| 264 | choice). */ |
| 265 | |
| 266 | extern const struct bfd_arch_info bfd_default_arch_struct; |
| 267 | |
| 268 | struct gdbarch startup_gdbarch = |
| 269 | { |
| 270 | /* basic architecture information */ |
| 271 | &bfd_default_arch_struct, |
| 272 | BIG_ENDIAN, |
| 273 | /* target specific vector and its dump routine */ |
| 274 | NULL, NULL, |
| 275 | /*per-architecture data-pointers and swap regions */ |
| 276 | 0, NULL, NULL, |
| 277 | /* Multi-arch values */ |
| 278 | 8 * sizeof (short), |
| 279 | 8 * sizeof (int), |
| 280 | 8 * sizeof (long), |
| 281 | 8 * sizeof (LONGEST), |
| 282 | 8 * sizeof (float), |
| 283 | 8 * sizeof (double), |
| 284 | 8 * sizeof (long double), |
| 285 | 8 * sizeof (void*), |
| 286 | 8 * sizeof (void*), |
| 287 | 8 * sizeof (void*), |
| 288 | 0, |
| 289 | 0, |
| 290 | 0, |
| 291 | 0, |
| 292 | 0, |
| 293 | 0, |
| 294 | 0, |
| 295 | 0, |
| 296 | 0, |
| 297 | 0, |
| 298 | 0, |
| 299 | 0, |
| 300 | 0, |
| 301 | 0, |
| 302 | 0, |
| 303 | 0, |
| 304 | 0, |
| 305 | 0, |
| 306 | 0, |
| 307 | 0, |
| 308 | 0, |
| 309 | 0, |
| 310 | 0, |
| 311 | 0, |
| 312 | 0, |
| 313 | 0, |
| 314 | 0, |
| 315 | generic_register_raw_size, |
| 316 | 0, |
| 317 | generic_register_virtual_size, |
| 318 | 0, |
| 319 | 0, |
| 320 | 0, |
| 321 | 0, |
| 322 | 0, |
| 323 | 0, |
| 324 | 0, |
| 325 | 0, |
| 326 | 0, |
| 327 | 0, |
| 328 | 0, |
| 329 | 0, |
| 330 | 0, |
| 331 | 0, |
| 332 | 0, |
| 333 | 0, |
| 334 | 0, |
| 335 | 0, |
| 336 | 0, |
| 337 | 0, |
| 338 | 0, |
| 339 | 0, |
| 340 | 0, |
| 341 | 0, |
| 342 | 0, |
| 343 | 0, |
| 344 | generic_get_saved_register, |
| 345 | 0, |
| 346 | 0, |
| 347 | 0, |
| 348 | 0, |
| 349 | 0, |
| 350 | 0, |
| 351 | 0, |
| 352 | 0, |
| 353 | 0, |
| 354 | 0, |
| 355 | 0, |
| 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 | generic_in_function_epilogue_p, |
| 399 | construct_inferior_arguments, |
| 400 | 0, |
| 401 | /* startup_gdbarch() */ |
| 402 | }; |
| 403 | |
| 404 | struct gdbarch *current_gdbarch = &startup_gdbarch; |
| 405 | |
| 406 | /* Do any initialization needed for a non-multiarch configuration |
| 407 | after the _initialize_MODULE functions have been run. */ |
| 408 | void |
| 409 | initialize_non_multiarch () |
| 410 | { |
| 411 | alloc_gdbarch_data (&startup_gdbarch); |
| 412 | init_gdbarch_data (&startup_gdbarch); |
| 413 | } |
| 414 | |
| 415 | |
| 416 | /* Create a new ``struct gdbarch'' based on information provided by |
| 417 | ``struct gdbarch_info''. */ |
| 418 | |
| 419 | struct gdbarch * |
| 420 | gdbarch_alloc (const struct gdbarch_info *info, |
| 421 | struct gdbarch_tdep *tdep) |
| 422 | { |
| 423 | /* NOTE: The new architecture variable is named ``current_gdbarch'' |
| 424 | so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to |
| 425 | the current local architecture and not the previous global |
| 426 | architecture. This ensures that the new architectures initial |
| 427 | values are not influenced by the previous architecture. Once |
| 428 | everything is parameterised with gdbarch, this will go away. */ |
| 429 | struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch); |
| 430 | memset (current_gdbarch, 0, sizeof (*current_gdbarch)); |
| 431 | |
| 432 | alloc_gdbarch_data (current_gdbarch); |
| 433 | |
| 434 | current_gdbarch->tdep = tdep; |
| 435 | |
| 436 | current_gdbarch->bfd_arch_info = info->bfd_arch_info; |
| 437 | current_gdbarch->byte_order = info->byte_order; |
| 438 | |
| 439 | /* Force the explicit initialization of these. */ |
| 440 | current_gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
| 441 | current_gdbarch->int_bit = 4*TARGET_CHAR_BIT; |
| 442 | current_gdbarch->long_bit = 4*TARGET_CHAR_BIT; |
| 443 | current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT; |
| 444 | current_gdbarch->float_bit = 4*TARGET_CHAR_BIT; |
| 445 | current_gdbarch->double_bit = 8*TARGET_CHAR_BIT; |
| 446 | current_gdbarch->long_double_bit = 2*TARGET_DOUBLE_BIT; |
| 447 | current_gdbarch->ptr_bit = TARGET_INT_BIT; |
| 448 | current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address; |
| 449 | current_gdbarch->read_pc = generic_target_read_pc; |
| 450 | current_gdbarch->write_pc = generic_target_write_pc; |
| 451 | current_gdbarch->read_fp = generic_target_read_fp; |
| 452 | current_gdbarch->write_fp = generic_target_write_fp; |
| 453 | current_gdbarch->read_sp = generic_target_read_sp; |
| 454 | current_gdbarch->write_sp = generic_target_write_sp; |
| 455 | current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; |
| 456 | current_gdbarch->num_regs = -1; |
| 457 | current_gdbarch->sp_regnum = -1; |
| 458 | current_gdbarch->fp_regnum = -1; |
| 459 | current_gdbarch->pc_regnum = -1; |
| 460 | current_gdbarch->fp0_regnum = -1; |
| 461 | current_gdbarch->npc_regnum = -1; |
| 462 | current_gdbarch->nnpc_regnum = -1; |
| 463 | current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; |
| 464 | current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; |
| 465 | current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum; |
| 466 | current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; |
| 467 | current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; |
| 468 | current_gdbarch->register_name = legacy_register_name; |
| 469 | current_gdbarch->register_size = -1; |
| 470 | current_gdbarch->register_bytes = -1; |
| 471 | current_gdbarch->max_register_raw_size = -1; |
| 472 | current_gdbarch->max_register_virtual_size = -1; |
| 473 | current_gdbarch->do_registers_info = do_registers_info; |
| 474 | current_gdbarch->register_sim_regno = default_register_sim_regno; |
| 475 | current_gdbarch->cannot_fetch_register = cannot_register_not; |
| 476 | current_gdbarch->cannot_store_register = cannot_register_not; |
| 477 | current_gdbarch->use_generic_dummy_frames = -1; |
| 478 | current_gdbarch->call_dummy_start_offset = -1; |
| 479 | current_gdbarch->call_dummy_breakpoint_offset = -1; |
| 480 | current_gdbarch->call_dummy_breakpoint_offset_p = -1; |
| 481 | current_gdbarch->call_dummy_length = -1; |
| 482 | current_gdbarch->call_dummy_p = -1; |
| 483 | current_gdbarch->call_dummy_words = legacy_call_dummy_words; |
| 484 | current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; |
| 485 | current_gdbarch->call_dummy_stack_adjust_p = -1; |
| 486 | current_gdbarch->init_frame_pc_first = init_frame_pc_noop; |
| 487 | current_gdbarch->init_frame_pc = init_frame_pc_default; |
| 488 | current_gdbarch->coerce_float_to_double = default_coerce_float_to_double; |
| 489 | current_gdbarch->register_convertible = generic_register_convertible_not; |
| 490 | current_gdbarch->pointer_to_address = unsigned_pointer_to_address; |
| 491 | current_gdbarch->address_to_pointer = unsigned_address_to_pointer; |
| 492 | current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not; |
| 493 | current_gdbarch->use_struct_convention = generic_use_struct_convention; |
| 494 | current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p; |
| 495 | current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc; |
| 496 | current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; |
| 497 | current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; |
| 498 | current_gdbarch->decr_pc_after_break = -1; |
| 499 | current_gdbarch->prepare_to_proceed = default_prepare_to_proceed; |
| 500 | current_gdbarch->function_start_offset = -1; |
| 501 | current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address; |
| 502 | current_gdbarch->frame_args_skip = -1; |
| 503 | current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not; |
| 504 | current_gdbarch->extra_stack_alignment_needed = 1; |
| 505 | current_gdbarch->convert_from_func_ptr_addr = core_addr_identity; |
| 506 | current_gdbarch->addr_bits_remove = core_addr_identity; |
| 507 | current_gdbarch->print_insn = legacy_print_insn; |
| 508 | current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code; |
| 509 | current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline; |
| 510 | current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; |
| 511 | current_gdbarch->construct_inferior_arguments = construct_inferior_arguments; |
| 512 | /* gdbarch_alloc() */ |
| 513 | |
| 514 | return current_gdbarch; |
| 515 | } |
| 516 | |
| 517 | |
| 518 | /* Free a gdbarch struct. This should never happen in normal |
| 519 | operation --- once you've created a gdbarch, you keep it around. |
| 520 | However, if an architecture's init function encounters an error |
| 521 | building the structure, it may need to clean up a partially |
| 522 | constructed gdbarch. */ |
| 523 | |
| 524 | void |
| 525 | gdbarch_free (struct gdbarch *arch) |
| 526 | { |
| 527 | gdb_assert (arch != NULL); |
| 528 | free_gdbarch_data (arch); |
| 529 | xfree (arch); |
| 530 | } |
| 531 | |
| 532 | |
| 533 | /* Ensure that all values in a GDBARCH are reasonable. */ |
| 534 | |
| 535 | static void |
| 536 | verify_gdbarch (struct gdbarch *gdbarch) |
| 537 | { |
| 538 | struct ui_file *log; |
| 539 | struct cleanup *cleanups; |
| 540 | long dummy; |
| 541 | char *buf; |
| 542 | /* Only perform sanity checks on a multi-arch target. */ |
| 543 | if (!GDB_MULTI_ARCH) |
| 544 | return; |
| 545 | log = mem_fileopen (); |
| 546 | cleanups = make_cleanup_ui_file_delete (log); |
| 547 | /* fundamental */ |
| 548 | if (gdbarch->byte_order == 0) |
| 549 | fprintf_unfiltered (log, "\n\tbyte-order"); |
| 550 | if (gdbarch->bfd_arch_info == NULL) |
| 551 | fprintf_unfiltered (log, "\n\tbfd_arch_info"); |
| 552 | /* Check those that need to be defined for the given multi-arch level. */ |
| 553 | /* Skip verify of short_bit, invalid_p == 0 */ |
| 554 | /* Skip verify of int_bit, invalid_p == 0 */ |
| 555 | /* Skip verify of long_bit, invalid_p == 0 */ |
| 556 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
| 557 | /* Skip verify of float_bit, invalid_p == 0 */ |
| 558 | /* Skip verify of double_bit, invalid_p == 0 */ |
| 559 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
| 560 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
| 561 | if (gdbarch->addr_bit == 0) |
| 562 | gdbarch->addr_bit = TARGET_PTR_BIT; |
| 563 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
| 564 | /* Skip verify of ieee_float, invalid_p == 0 */ |
| 565 | /* Skip verify of read_pc, invalid_p == 0 */ |
| 566 | /* Skip verify of write_pc, invalid_p == 0 */ |
| 567 | /* Skip verify of read_fp, invalid_p == 0 */ |
| 568 | /* Skip verify of write_fp, invalid_p == 0 */ |
| 569 | /* Skip verify of read_sp, invalid_p == 0 */ |
| 570 | /* Skip verify of write_sp, invalid_p == 0 */ |
| 571 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
| 572 | /* Skip verify of register_read, has predicate */ |
| 573 | /* Skip verify of register_write, has predicate */ |
| 574 | if ((GDB_MULTI_ARCH >= 2) |
| 575 | && (gdbarch->num_regs == -1)) |
| 576 | fprintf_unfiltered (log, "\n\tnum_regs"); |
| 577 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
| 578 | if ((GDB_MULTI_ARCH >= 2) |
| 579 | && (gdbarch->sp_regnum == -1)) |
| 580 | fprintf_unfiltered (log, "\n\tsp_regnum"); |
| 581 | if ((GDB_MULTI_ARCH >= 2) |
| 582 | && (gdbarch->fp_regnum == -1)) |
| 583 | fprintf_unfiltered (log, "\n\tfp_regnum"); |
| 584 | if ((GDB_MULTI_ARCH >= 2) |
| 585 | && (gdbarch->pc_regnum == -1)) |
| 586 | fprintf_unfiltered (log, "\n\tpc_regnum"); |
| 587 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
| 588 | /* Skip verify of npc_regnum, invalid_p == 0 */ |
| 589 | /* Skip verify of nnpc_regnum, invalid_p == 0 */ |
| 590 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
| 591 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ |
| 592 | /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */ |
| 593 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ |
| 594 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ |
| 595 | /* Skip verify of register_name, invalid_p == 0 */ |
| 596 | if ((GDB_MULTI_ARCH >= 2) |
| 597 | && (gdbarch->register_size == -1)) |
| 598 | fprintf_unfiltered (log, "\n\tregister_size"); |
| 599 | if ((GDB_MULTI_ARCH >= 2) |
| 600 | && (gdbarch->register_bytes == -1)) |
| 601 | fprintf_unfiltered (log, "\n\tregister_bytes"); |
| 602 | if ((GDB_MULTI_ARCH >= 2) |
| 603 | && (gdbarch->register_byte == 0)) |
| 604 | fprintf_unfiltered (log, "\n\tregister_byte"); |
| 605 | if ((GDB_MULTI_ARCH >= 2) |
| 606 | && (gdbarch->register_raw_size == 0)) |
| 607 | fprintf_unfiltered (log, "\n\tregister_raw_size"); |
| 608 | if ((GDB_MULTI_ARCH >= 2) |
| 609 | && (gdbarch->max_register_raw_size == -1)) |
| 610 | fprintf_unfiltered (log, "\n\tmax_register_raw_size"); |
| 611 | if ((GDB_MULTI_ARCH >= 2) |
| 612 | && (gdbarch->register_virtual_size == 0)) |
| 613 | fprintf_unfiltered (log, "\n\tregister_virtual_size"); |
| 614 | if ((GDB_MULTI_ARCH >= 2) |
| 615 | && (gdbarch->max_register_virtual_size == -1)) |
| 616 | fprintf_unfiltered (log, "\n\tmax_register_virtual_size"); |
| 617 | if ((GDB_MULTI_ARCH >= 2) |
| 618 | && (gdbarch->register_virtual_type == 0)) |
| 619 | fprintf_unfiltered (log, "\n\tregister_virtual_type"); |
| 620 | /* Skip verify of do_registers_info, invalid_p == 0 */ |
| 621 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
| 622 | /* Skip verify of register_bytes_ok, has predicate */ |
| 623 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
| 624 | /* Skip verify of cannot_store_register, invalid_p == 0 */ |
| 625 | if ((GDB_MULTI_ARCH >= 1) |
| 626 | && (gdbarch->use_generic_dummy_frames == -1)) |
| 627 | fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames"); |
| 628 | if ((GDB_MULTI_ARCH >= 1) |
| 629 | && (gdbarch->call_dummy_location == 0)) |
| 630 | fprintf_unfiltered (log, "\n\tcall_dummy_location"); |
| 631 | if ((GDB_MULTI_ARCH >= 2) |
| 632 | && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0)) |
| 633 | fprintf_unfiltered (log, "\n\tcall_dummy_address"); |
| 634 | if ((GDB_MULTI_ARCH >= 2) |
| 635 | && (gdbarch->call_dummy_start_offset == -1)) |
| 636 | fprintf_unfiltered (log, "\n\tcall_dummy_start_offset"); |
| 637 | if ((GDB_MULTI_ARCH >= 2) |
| 638 | && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)) |
| 639 | fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset"); |
| 640 | if ((GDB_MULTI_ARCH >= 1) |
| 641 | && (gdbarch->call_dummy_breakpoint_offset_p == -1)) |
| 642 | fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p"); |
| 643 | if ((GDB_MULTI_ARCH >= 2) |
| 644 | && (gdbarch->call_dummy_length == -1)) |
| 645 | fprintf_unfiltered (log, "\n\tcall_dummy_length"); |
| 646 | if ((GDB_MULTI_ARCH >= 1) |
| 647 | && (gdbarch->pc_in_call_dummy == 0)) |
| 648 | fprintf_unfiltered (log, "\n\tpc_in_call_dummy"); |
| 649 | if ((GDB_MULTI_ARCH >= 1) |
| 650 | && (gdbarch->call_dummy_p == -1)) |
| 651 | fprintf_unfiltered (log, "\n\tcall_dummy_p"); |
| 652 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
| 653 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ |
| 654 | if ((GDB_MULTI_ARCH >= 1) |
| 655 | && (gdbarch->call_dummy_stack_adjust_p == -1)) |
| 656 | fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p"); |
| 657 | if ((GDB_MULTI_ARCH >= 2) |
| 658 | && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)) |
| 659 | fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust"); |
| 660 | if ((GDB_MULTI_ARCH >= 2) |
| 661 | && (gdbarch->fix_call_dummy == 0)) |
| 662 | fprintf_unfiltered (log, "\n\tfix_call_dummy"); |
| 663 | /* Skip verify of init_frame_pc_first, invalid_p == 0 */ |
| 664 | /* Skip verify of init_frame_pc, invalid_p == 0 */ |
| 665 | /* Skip verify of coerce_float_to_double, invalid_p == 0 */ |
| 666 | if ((GDB_MULTI_ARCH >= 1) |
| 667 | && (gdbarch->get_saved_register == 0)) |
| 668 | fprintf_unfiltered (log, "\n\tget_saved_register"); |
| 669 | /* Skip verify of register_convertible, invalid_p == 0 */ |
| 670 | /* Skip verify of register_convert_to_virtual, invalid_p == 0 */ |
| 671 | /* Skip verify of register_convert_to_raw, invalid_p == 0 */ |
| 672 | /* Skip verify of fetch_pseudo_register, has predicate */ |
| 673 | /* Skip verify of store_pseudo_register, has predicate */ |
| 674 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
| 675 | /* Skip verify of address_to_pointer, invalid_p == 0 */ |
| 676 | /* Skip verify of integer_to_address, has predicate */ |
| 677 | /* Skip verify of return_value_on_stack, invalid_p == 0 */ |
| 678 | if ((GDB_MULTI_ARCH >= 2) |
| 679 | && (gdbarch->extract_return_value == 0)) |
| 680 | fprintf_unfiltered (log, "\n\textract_return_value"); |
| 681 | if ((GDB_MULTI_ARCH >= 1) |
| 682 | && (gdbarch->push_arguments == 0)) |
| 683 | fprintf_unfiltered (log, "\n\tpush_arguments"); |
| 684 | if ((GDB_MULTI_ARCH >= 2) |
| 685 | && (gdbarch->push_dummy_frame == 0)) |
| 686 | fprintf_unfiltered (log, "\n\tpush_dummy_frame"); |
| 687 | /* Skip verify of push_return_address, has predicate */ |
| 688 | if ((GDB_MULTI_ARCH >= 2) |
| 689 | && (gdbarch->pop_frame == 0)) |
| 690 | fprintf_unfiltered (log, "\n\tpop_frame"); |
| 691 | if ((GDB_MULTI_ARCH >= 2) |
| 692 | && (gdbarch->store_struct_return == 0)) |
| 693 | fprintf_unfiltered (log, "\n\tstore_struct_return"); |
| 694 | if ((GDB_MULTI_ARCH >= 2) |
| 695 | && (gdbarch->store_return_value == 0)) |
| 696 | fprintf_unfiltered (log, "\n\tstore_return_value"); |
| 697 | /* Skip verify of extract_struct_value_address, has predicate */ |
| 698 | /* Skip verify of use_struct_convention, invalid_p == 0 */ |
| 699 | if ((GDB_MULTI_ARCH >= 2) |
| 700 | && (gdbarch->frame_init_saved_regs == 0)) |
| 701 | fprintf_unfiltered (log, "\n\tframe_init_saved_regs"); |
| 702 | /* Skip verify of init_extra_frame_info, has predicate */ |
| 703 | if ((GDB_MULTI_ARCH >= 2) |
| 704 | && (gdbarch->skip_prologue == 0)) |
| 705 | fprintf_unfiltered (log, "\n\tskip_prologue"); |
| 706 | /* Skip verify of prologue_frameless_p, invalid_p == 0 */ |
| 707 | if ((GDB_MULTI_ARCH >= 2) |
| 708 | && (gdbarch->inner_than == 0)) |
| 709 | fprintf_unfiltered (log, "\n\tinner_than"); |
| 710 | /* Skip verify of breakpoint_from_pc, invalid_p == 0 */ |
| 711 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ |
| 712 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ |
| 713 | if ((GDB_MULTI_ARCH >= 2) |
| 714 | && (gdbarch->decr_pc_after_break == -1)) |
| 715 | fprintf_unfiltered (log, "\n\tdecr_pc_after_break"); |
| 716 | /* Skip verify of prepare_to_proceed, invalid_p == 0 */ |
| 717 | if ((GDB_MULTI_ARCH >= 2) |
| 718 | && (gdbarch->function_start_offset == -1)) |
| 719 | fprintf_unfiltered (log, "\n\tfunction_start_offset"); |
| 720 | /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */ |
| 721 | if ((GDB_MULTI_ARCH >= 2) |
| 722 | && (gdbarch->frame_args_skip == -1)) |
| 723 | fprintf_unfiltered (log, "\n\tframe_args_skip"); |
| 724 | /* Skip verify of frameless_function_invocation, invalid_p == 0 */ |
| 725 | if ((GDB_MULTI_ARCH >= 2) |
| 726 | && (gdbarch->frame_chain == 0)) |
| 727 | fprintf_unfiltered (log, "\n\tframe_chain"); |
| 728 | if ((GDB_MULTI_ARCH >= 1) |
| 729 | && (gdbarch->frame_chain_valid == 0)) |
| 730 | fprintf_unfiltered (log, "\n\tframe_chain_valid"); |
| 731 | if ((GDB_MULTI_ARCH >= 2) |
| 732 | && (gdbarch->frame_saved_pc == 0)) |
| 733 | fprintf_unfiltered (log, "\n\tframe_saved_pc"); |
| 734 | if ((GDB_MULTI_ARCH >= 2) |
| 735 | && (gdbarch->frame_args_address == 0)) |
| 736 | fprintf_unfiltered (log, "\n\tframe_args_address"); |
| 737 | if ((GDB_MULTI_ARCH >= 2) |
| 738 | && (gdbarch->frame_locals_address == 0)) |
| 739 | fprintf_unfiltered (log, "\n\tframe_locals_address"); |
| 740 | if ((GDB_MULTI_ARCH >= 2) |
| 741 | && (gdbarch->saved_pc_after_call == 0)) |
| 742 | fprintf_unfiltered (log, "\n\tsaved_pc_after_call"); |
| 743 | if ((GDB_MULTI_ARCH >= 2) |
| 744 | && (gdbarch->frame_num_args == 0)) |
| 745 | fprintf_unfiltered (log, "\n\tframe_num_args"); |
| 746 | /* Skip verify of stack_align, has predicate */ |
| 747 | /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ |
| 748 | /* Skip verify of reg_struct_has_addr, has predicate */ |
| 749 | /* Skip verify of save_dummy_frame_tos, has predicate */ |
| 750 | if (gdbarch->float_format == 0) |
| 751 | gdbarch->float_format = default_float_format (gdbarch); |
| 752 | if (gdbarch->double_format == 0) |
| 753 | gdbarch->double_format = default_double_format (gdbarch); |
| 754 | if (gdbarch->long_double_format == 0) |
| 755 | gdbarch->long_double_format = &floatformat_unknown; |
| 756 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
| 757 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
| 758 | /* Skip verify of software_single_step, has predicate */ |
| 759 | /* Skip verify of print_insn, invalid_p == 0 */ |
| 760 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
| 761 | /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */ |
| 762 | /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ |
| 763 | /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ |
| 764 | /* Skip verify of dwarf2_build_frame_info, has predicate */ |
| 765 | buf = ui_file_xstrdup (log, &dummy); |
| 766 | make_cleanup (xfree, buf); |
| 767 | if (strlen (buf) > 0) |
| 768 | internal_error (__FILE__, __LINE__, |
| 769 | "verify_gdbarch: the following are invalid ...%s", |
| 770 | buf); |
| 771 | do_cleanups (cleanups); |
| 772 | } |
| 773 | |
| 774 | |
| 775 | /* Print out the details of the current architecture. */ |
| 776 | |
| 777 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it |
| 778 | just happens to match the global variable ``current_gdbarch''. That |
| 779 | way macros refering to that variable get the local and not the global |
| 780 | version - ulgh. Once everything is parameterised with gdbarch, this |
| 781 | will go away. */ |
| 782 | |
| 783 | void |
| 784 | gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) |
| 785 | { |
| 786 | fprintf_unfiltered (file, |
| 787 | "gdbarch_dump: GDB_MULTI_ARCH = %d\n", |
| 788 | GDB_MULTI_ARCH); |
| 789 | if (GDB_MULTI_ARCH) |
| 790 | fprintf_unfiltered (file, |
| 791 | "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n", |
| 792 | (long) current_gdbarch->in_function_epilogue_p); |
| 793 | if (GDB_MULTI_ARCH) |
| 794 | fprintf_unfiltered (file, |
| 795 | "gdbarch_dump: register_read = 0x%08lx\n", |
| 796 | (long) current_gdbarch->register_read); |
| 797 | if (GDB_MULTI_ARCH) |
| 798 | fprintf_unfiltered (file, |
| 799 | "gdbarch_dump: register_write = 0x%08lx\n", |
| 800 | (long) current_gdbarch->register_write); |
| 801 | #ifdef ADDRESS_TO_POINTER |
| 802 | #if GDB_MULTI_ARCH |
| 803 | /* Macro might contain `[{}]' when not multi-arch */ |
| 804 | fprintf_unfiltered (file, |
| 805 | "gdbarch_dump: %s # %s\n", |
| 806 | "ADDRESS_TO_POINTER(type, buf, addr)", |
| 807 | XSTRING (ADDRESS_TO_POINTER (type, buf, addr))); |
| 808 | #endif |
| 809 | if (GDB_MULTI_ARCH) |
| 810 | fprintf_unfiltered (file, |
| 811 | "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n", |
| 812 | (long) current_gdbarch->address_to_pointer |
| 813 | /*ADDRESS_TO_POINTER ()*/); |
| 814 | #endif |
| 815 | #ifdef ADDR_BITS_REMOVE |
| 816 | fprintf_unfiltered (file, |
| 817 | "gdbarch_dump: %s # %s\n", |
| 818 | "ADDR_BITS_REMOVE(addr)", |
| 819 | XSTRING (ADDR_BITS_REMOVE (addr))); |
| 820 | if (GDB_MULTI_ARCH) |
| 821 | fprintf_unfiltered (file, |
| 822 | "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n", |
| 823 | (long) current_gdbarch->addr_bits_remove |
| 824 | /*ADDR_BITS_REMOVE ()*/); |
| 825 | #endif |
| 826 | #ifdef BELIEVE_PCC_PROMOTION |
| 827 | fprintf_unfiltered (file, |
| 828 | "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n", |
| 829 | XSTRING (BELIEVE_PCC_PROMOTION)); |
| 830 | fprintf_unfiltered (file, |
| 831 | "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n", |
| 832 | (long) BELIEVE_PCC_PROMOTION); |
| 833 | #endif |
| 834 | #ifdef BELIEVE_PCC_PROMOTION_TYPE |
| 835 | fprintf_unfiltered (file, |
| 836 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n", |
| 837 | XSTRING (BELIEVE_PCC_PROMOTION_TYPE)); |
| 838 | fprintf_unfiltered (file, |
| 839 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n", |
| 840 | (long) BELIEVE_PCC_PROMOTION_TYPE); |
| 841 | #endif |
| 842 | #ifdef BREAKPOINT_FROM_PC |
| 843 | fprintf_unfiltered (file, |
| 844 | "gdbarch_dump: %s # %s\n", |
| 845 | "BREAKPOINT_FROM_PC(pcptr, lenptr)", |
| 846 | XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr))); |
| 847 | if (GDB_MULTI_ARCH) |
| 848 | fprintf_unfiltered (file, |
| 849 | "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n", |
| 850 | (long) current_gdbarch->breakpoint_from_pc |
| 851 | /*BREAKPOINT_FROM_PC ()*/); |
| 852 | #endif |
| 853 | #ifdef CALL_DUMMY_ADDRESS |
| 854 | fprintf_unfiltered (file, |
| 855 | "gdbarch_dump: %s # %s\n", |
| 856 | "CALL_DUMMY_ADDRESS()", |
| 857 | XSTRING (CALL_DUMMY_ADDRESS ())); |
| 858 | if (GDB_MULTI_ARCH) |
| 859 | fprintf_unfiltered (file, |
| 860 | "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n", |
| 861 | (long) current_gdbarch->call_dummy_address |
| 862 | /*CALL_DUMMY_ADDRESS ()*/); |
| 863 | #endif |
| 864 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET |
| 865 | fprintf_unfiltered (file, |
| 866 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", |
| 867 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET)); |
| 868 | if (CALL_DUMMY_BREAKPOINT_OFFSET_P) |
| 869 | fprintf_unfiltered (file, |
| 870 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n", |
| 871 | (long) CALL_DUMMY_BREAKPOINT_OFFSET); |
| 872 | #endif |
| 873 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P |
| 874 | fprintf_unfiltered (file, |
| 875 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n", |
| 876 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P)); |
| 877 | fprintf_unfiltered (file, |
| 878 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n", |
| 879 | (long) CALL_DUMMY_BREAKPOINT_OFFSET_P); |
| 880 | #endif |
| 881 | #ifdef CALL_DUMMY_LENGTH |
| 882 | fprintf_unfiltered (file, |
| 883 | "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n", |
| 884 | XSTRING (CALL_DUMMY_LENGTH)); |
| 885 | if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END) |
| 886 | fprintf_unfiltered (file, |
| 887 | "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n", |
| 888 | (long) CALL_DUMMY_LENGTH); |
| 889 | #endif |
| 890 | #ifdef CALL_DUMMY_LOCATION |
| 891 | fprintf_unfiltered (file, |
| 892 | "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", |
| 893 | XSTRING (CALL_DUMMY_LOCATION)); |
| 894 | fprintf_unfiltered (file, |
| 895 | "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n", |
| 896 | (long) CALL_DUMMY_LOCATION); |
| 897 | #endif |
| 898 | #ifdef CALL_DUMMY_P |
| 899 | fprintf_unfiltered (file, |
| 900 | "gdbarch_dump: CALL_DUMMY_P # %s\n", |
| 901 | XSTRING (CALL_DUMMY_P)); |
| 902 | fprintf_unfiltered (file, |
| 903 | "gdbarch_dump: CALL_DUMMY_P = %ld\n", |
| 904 | (long) CALL_DUMMY_P); |
| 905 | #endif |
| 906 | #ifdef CALL_DUMMY_STACK_ADJUST |
| 907 | fprintf_unfiltered (file, |
| 908 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n", |
| 909 | XSTRING (CALL_DUMMY_STACK_ADJUST)); |
| 910 | if (CALL_DUMMY_STACK_ADJUST_P) |
| 911 | fprintf_unfiltered (file, |
| 912 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n", |
| 913 | (long) CALL_DUMMY_STACK_ADJUST); |
| 914 | #endif |
| 915 | #ifdef CALL_DUMMY_STACK_ADJUST_P |
| 916 | fprintf_unfiltered (file, |
| 917 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n", |
| 918 | XSTRING (CALL_DUMMY_STACK_ADJUST_P)); |
| 919 | fprintf_unfiltered (file, |
| 920 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n", |
| 921 | (long) CALL_DUMMY_STACK_ADJUST_P); |
| 922 | #endif |
| 923 | #ifdef CALL_DUMMY_START_OFFSET |
| 924 | fprintf_unfiltered (file, |
| 925 | "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n", |
| 926 | XSTRING (CALL_DUMMY_START_OFFSET)); |
| 927 | fprintf_unfiltered (file, |
| 928 | "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n", |
| 929 | (long) CALL_DUMMY_START_OFFSET); |
| 930 | #endif |
| 931 | #ifdef CALL_DUMMY_WORDS |
| 932 | fprintf_unfiltered (file, |
| 933 | "gdbarch_dump: CALL_DUMMY_WORDS # %s\n", |
| 934 | XSTRING (CALL_DUMMY_WORDS)); |
| 935 | fprintf_unfiltered (file, |
| 936 | "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n", |
| 937 | (long) CALL_DUMMY_WORDS); |
| 938 | #endif |
| 939 | #ifdef CANNOT_FETCH_REGISTER |
| 940 | fprintf_unfiltered (file, |
| 941 | "gdbarch_dump: %s # %s\n", |
| 942 | "CANNOT_FETCH_REGISTER(regnum)", |
| 943 | XSTRING (CANNOT_FETCH_REGISTER (regnum))); |
| 944 | if (GDB_MULTI_ARCH) |
| 945 | fprintf_unfiltered (file, |
| 946 | "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n", |
| 947 | (long) current_gdbarch->cannot_fetch_register |
| 948 | /*CANNOT_FETCH_REGISTER ()*/); |
| 949 | #endif |
| 950 | #ifdef CANNOT_STORE_REGISTER |
| 951 | fprintf_unfiltered (file, |
| 952 | "gdbarch_dump: %s # %s\n", |
| 953 | "CANNOT_STORE_REGISTER(regnum)", |
| 954 | XSTRING (CANNOT_STORE_REGISTER (regnum))); |
| 955 | if (GDB_MULTI_ARCH) |
| 956 | fprintf_unfiltered (file, |
| 957 | "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n", |
| 958 | (long) current_gdbarch->cannot_store_register |
| 959 | /*CANNOT_STORE_REGISTER ()*/); |
| 960 | #endif |
| 961 | #ifdef COERCE_FLOAT_TO_DOUBLE |
| 962 | fprintf_unfiltered (file, |
| 963 | "gdbarch_dump: %s # %s\n", |
| 964 | "COERCE_FLOAT_TO_DOUBLE(formal, actual)", |
| 965 | XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual))); |
| 966 | if (GDB_MULTI_ARCH) |
| 967 | fprintf_unfiltered (file, |
| 968 | "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n", |
| 969 | (long) current_gdbarch->coerce_float_to_double |
| 970 | /*COERCE_FLOAT_TO_DOUBLE ()*/); |
| 971 | #endif |
| 972 | if (GDB_MULTI_ARCH) |
| 973 | fprintf_unfiltered (file, |
| 974 | "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n", |
| 975 | (long) current_gdbarch->construct_inferior_arguments); |
| 976 | #ifdef CONVERT_FROM_FUNC_PTR_ADDR |
| 977 | fprintf_unfiltered (file, |
| 978 | "gdbarch_dump: %s # %s\n", |
| 979 | "CONVERT_FROM_FUNC_PTR_ADDR(addr)", |
| 980 | XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr))); |
| 981 | if (GDB_MULTI_ARCH) |
| 982 | fprintf_unfiltered (file, |
| 983 | "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n", |
| 984 | (long) current_gdbarch->convert_from_func_ptr_addr |
| 985 | /*CONVERT_FROM_FUNC_PTR_ADDR ()*/); |
| 986 | #endif |
| 987 | #ifdef DECR_PC_AFTER_BREAK |
| 988 | fprintf_unfiltered (file, |
| 989 | "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n", |
| 990 | XSTRING (DECR_PC_AFTER_BREAK)); |
| 991 | fprintf_unfiltered (file, |
| 992 | "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", |
| 993 | (long) DECR_PC_AFTER_BREAK); |
| 994 | #endif |
| 995 | #ifdef DO_REGISTERS_INFO |
| 996 | #if GDB_MULTI_ARCH |
| 997 | /* Macro might contain `[{}]' when not multi-arch */ |
| 998 | fprintf_unfiltered (file, |
| 999 | "gdbarch_dump: %s # %s\n", |
| 1000 | "DO_REGISTERS_INFO(reg_nr, fpregs)", |
| 1001 | XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs))); |
| 1002 | #endif |
| 1003 | if (GDB_MULTI_ARCH) |
| 1004 | fprintf_unfiltered (file, |
| 1005 | "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n", |
| 1006 | (long) current_gdbarch->do_registers_info |
| 1007 | /*DO_REGISTERS_INFO ()*/); |
| 1008 | #endif |
| 1009 | #ifdef DWARF2_BUILD_FRAME_INFO |
| 1010 | #if GDB_MULTI_ARCH |
| 1011 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1012 | fprintf_unfiltered (file, |
| 1013 | "gdbarch_dump: %s # %s\n", |
| 1014 | "DWARF2_BUILD_FRAME_INFO(objfile)", |
| 1015 | XSTRING (DWARF2_BUILD_FRAME_INFO (objfile))); |
| 1016 | #endif |
| 1017 | if (GDB_MULTI_ARCH) |
| 1018 | fprintf_unfiltered (file, |
| 1019 | "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n", |
| 1020 | (long) current_gdbarch->dwarf2_build_frame_info |
| 1021 | /*DWARF2_BUILD_FRAME_INFO ()*/); |
| 1022 | #endif |
| 1023 | #ifdef DWARF2_REG_TO_REGNUM |
| 1024 | fprintf_unfiltered (file, |
| 1025 | "gdbarch_dump: %s # %s\n", |
| 1026 | "DWARF2_REG_TO_REGNUM(dwarf2_regnr)", |
| 1027 | XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr))); |
| 1028 | if (GDB_MULTI_ARCH) |
| 1029 | fprintf_unfiltered (file, |
| 1030 | "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n", |
| 1031 | (long) current_gdbarch->dwarf2_reg_to_regnum |
| 1032 | /*DWARF2_REG_TO_REGNUM ()*/); |
| 1033 | #endif |
| 1034 | #ifdef DWARF_REG_TO_REGNUM |
| 1035 | fprintf_unfiltered (file, |
| 1036 | "gdbarch_dump: %s # %s\n", |
| 1037 | "DWARF_REG_TO_REGNUM(dwarf_regnr)", |
| 1038 | XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr))); |
| 1039 | if (GDB_MULTI_ARCH) |
| 1040 | fprintf_unfiltered (file, |
| 1041 | "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n", |
| 1042 | (long) current_gdbarch->dwarf_reg_to_regnum |
| 1043 | /*DWARF_REG_TO_REGNUM ()*/); |
| 1044 | #endif |
| 1045 | #ifdef ECOFF_REG_TO_REGNUM |
| 1046 | fprintf_unfiltered (file, |
| 1047 | "gdbarch_dump: %s # %s\n", |
| 1048 | "ECOFF_REG_TO_REGNUM(ecoff_regnr)", |
| 1049 | XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr))); |
| 1050 | if (GDB_MULTI_ARCH) |
| 1051 | fprintf_unfiltered (file, |
| 1052 | "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n", |
| 1053 | (long) current_gdbarch->ecoff_reg_to_regnum |
| 1054 | /*ECOFF_REG_TO_REGNUM ()*/); |
| 1055 | #endif |
| 1056 | #ifdef EXTRACT_RETURN_VALUE |
| 1057 | #if GDB_MULTI_ARCH |
| 1058 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1059 | fprintf_unfiltered (file, |
| 1060 | "gdbarch_dump: %s # %s\n", |
| 1061 | "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", |
| 1062 | XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); |
| 1063 | #endif |
| 1064 | if (GDB_MULTI_ARCH) |
| 1065 | fprintf_unfiltered (file, |
| 1066 | "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n", |
| 1067 | (long) current_gdbarch->extract_return_value |
| 1068 | /*EXTRACT_RETURN_VALUE ()*/); |
| 1069 | #endif |
| 1070 | #ifdef EXTRACT_STRUCT_VALUE_ADDRESS |
| 1071 | fprintf_unfiltered (file, |
| 1072 | "gdbarch_dump: %s # %s\n", |
| 1073 | "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)", |
| 1074 | XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf))); |
| 1075 | if (GDB_MULTI_ARCH) |
| 1076 | fprintf_unfiltered (file, |
| 1077 | "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n", |
| 1078 | (long) current_gdbarch->extract_struct_value_address |
| 1079 | /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/); |
| 1080 | #endif |
| 1081 | #ifdef EXTRA_STACK_ALIGNMENT_NEEDED |
| 1082 | fprintf_unfiltered (file, |
| 1083 | "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n", |
| 1084 | XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED)); |
| 1085 | fprintf_unfiltered (file, |
| 1086 | "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n", |
| 1087 | (long) EXTRA_STACK_ALIGNMENT_NEEDED); |
| 1088 | #endif |
| 1089 | #ifdef FETCH_PSEUDO_REGISTER |
| 1090 | #if GDB_MULTI_ARCH |
| 1091 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1092 | fprintf_unfiltered (file, |
| 1093 | "gdbarch_dump: %s # %s\n", |
| 1094 | "FETCH_PSEUDO_REGISTER(regnum)", |
| 1095 | XSTRING (FETCH_PSEUDO_REGISTER (regnum))); |
| 1096 | #endif |
| 1097 | if (GDB_MULTI_ARCH) |
| 1098 | fprintf_unfiltered (file, |
| 1099 | "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n", |
| 1100 | (long) current_gdbarch->fetch_pseudo_register |
| 1101 | /*FETCH_PSEUDO_REGISTER ()*/); |
| 1102 | #endif |
| 1103 | #ifdef FIX_CALL_DUMMY |
| 1104 | #if GDB_MULTI_ARCH |
| 1105 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1106 | fprintf_unfiltered (file, |
| 1107 | "gdbarch_dump: %s # %s\n", |
| 1108 | "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)", |
| 1109 | XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p))); |
| 1110 | #endif |
| 1111 | if (GDB_MULTI_ARCH) |
| 1112 | fprintf_unfiltered (file, |
| 1113 | "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n", |
| 1114 | (long) current_gdbarch->fix_call_dummy |
| 1115 | /*FIX_CALL_DUMMY ()*/); |
| 1116 | #endif |
| 1117 | #ifdef FP0_REGNUM |
| 1118 | fprintf_unfiltered (file, |
| 1119 | "gdbarch_dump: FP0_REGNUM # %s\n", |
| 1120 | XSTRING (FP0_REGNUM)); |
| 1121 | fprintf_unfiltered (file, |
| 1122 | "gdbarch_dump: FP0_REGNUM = %ld\n", |
| 1123 | (long) FP0_REGNUM); |
| 1124 | #endif |
| 1125 | #ifdef FP_REGNUM |
| 1126 | fprintf_unfiltered (file, |
| 1127 | "gdbarch_dump: FP_REGNUM # %s\n", |
| 1128 | XSTRING (FP_REGNUM)); |
| 1129 | fprintf_unfiltered (file, |
| 1130 | "gdbarch_dump: FP_REGNUM = %ld\n", |
| 1131 | (long) FP_REGNUM); |
| 1132 | #endif |
| 1133 | #ifdef FRAMELESS_FUNCTION_INVOCATION |
| 1134 | fprintf_unfiltered (file, |
| 1135 | "gdbarch_dump: %s # %s\n", |
| 1136 | "FRAMELESS_FUNCTION_INVOCATION(fi)", |
| 1137 | XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi))); |
| 1138 | if (GDB_MULTI_ARCH) |
| 1139 | fprintf_unfiltered (file, |
| 1140 | "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n", |
| 1141 | (long) current_gdbarch->frameless_function_invocation |
| 1142 | /*FRAMELESS_FUNCTION_INVOCATION ()*/); |
| 1143 | #endif |
| 1144 | #ifdef FRAME_ARGS_ADDRESS |
| 1145 | fprintf_unfiltered (file, |
| 1146 | "gdbarch_dump: %s # %s\n", |
| 1147 | "FRAME_ARGS_ADDRESS(fi)", |
| 1148 | XSTRING (FRAME_ARGS_ADDRESS (fi))); |
| 1149 | if (GDB_MULTI_ARCH) |
| 1150 | fprintf_unfiltered (file, |
| 1151 | "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n", |
| 1152 | (long) current_gdbarch->frame_args_address |
| 1153 | /*FRAME_ARGS_ADDRESS ()*/); |
| 1154 | #endif |
| 1155 | #ifdef FRAME_ARGS_SKIP |
| 1156 | fprintf_unfiltered (file, |
| 1157 | "gdbarch_dump: FRAME_ARGS_SKIP # %s\n", |
| 1158 | XSTRING (FRAME_ARGS_SKIP)); |
| 1159 | fprintf_unfiltered (file, |
| 1160 | "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n", |
| 1161 | (long) FRAME_ARGS_SKIP); |
| 1162 | #endif |
| 1163 | #ifdef FRAME_CHAIN |
| 1164 | fprintf_unfiltered (file, |
| 1165 | "gdbarch_dump: %s # %s\n", |
| 1166 | "FRAME_CHAIN(frame)", |
| 1167 | XSTRING (FRAME_CHAIN (frame))); |
| 1168 | if (GDB_MULTI_ARCH) |
| 1169 | fprintf_unfiltered (file, |
| 1170 | "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n", |
| 1171 | (long) current_gdbarch->frame_chain |
| 1172 | /*FRAME_CHAIN ()*/); |
| 1173 | #endif |
| 1174 | #ifdef FRAME_CHAIN_VALID |
| 1175 | fprintf_unfiltered (file, |
| 1176 | "gdbarch_dump: %s # %s\n", |
| 1177 | "FRAME_CHAIN_VALID(chain, thisframe)", |
| 1178 | XSTRING (FRAME_CHAIN_VALID (chain, thisframe))); |
| 1179 | if (GDB_MULTI_ARCH) |
| 1180 | fprintf_unfiltered (file, |
| 1181 | "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n", |
| 1182 | (long) current_gdbarch->frame_chain_valid |
| 1183 | /*FRAME_CHAIN_VALID ()*/); |
| 1184 | #endif |
| 1185 | #ifdef FRAME_INIT_SAVED_REGS |
| 1186 | #if GDB_MULTI_ARCH |
| 1187 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1188 | fprintf_unfiltered (file, |
| 1189 | "gdbarch_dump: %s # %s\n", |
| 1190 | "FRAME_INIT_SAVED_REGS(frame)", |
| 1191 | XSTRING (FRAME_INIT_SAVED_REGS (frame))); |
| 1192 | #endif |
| 1193 | if (GDB_MULTI_ARCH) |
| 1194 | fprintf_unfiltered (file, |
| 1195 | "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n", |
| 1196 | (long) current_gdbarch->frame_init_saved_regs |
| 1197 | /*FRAME_INIT_SAVED_REGS ()*/); |
| 1198 | #endif |
| 1199 | #ifdef FRAME_LOCALS_ADDRESS |
| 1200 | fprintf_unfiltered (file, |
| 1201 | "gdbarch_dump: %s # %s\n", |
| 1202 | "FRAME_LOCALS_ADDRESS(fi)", |
| 1203 | XSTRING (FRAME_LOCALS_ADDRESS (fi))); |
| 1204 | if (GDB_MULTI_ARCH) |
| 1205 | fprintf_unfiltered (file, |
| 1206 | "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n", |
| 1207 | (long) current_gdbarch->frame_locals_address |
| 1208 | /*FRAME_LOCALS_ADDRESS ()*/); |
| 1209 | #endif |
| 1210 | #ifdef FRAME_NUM_ARGS |
| 1211 | fprintf_unfiltered (file, |
| 1212 | "gdbarch_dump: %s # %s\n", |
| 1213 | "FRAME_NUM_ARGS(frame)", |
| 1214 | XSTRING (FRAME_NUM_ARGS (frame))); |
| 1215 | if (GDB_MULTI_ARCH) |
| 1216 | fprintf_unfiltered (file, |
| 1217 | "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n", |
| 1218 | (long) current_gdbarch->frame_num_args |
| 1219 | /*FRAME_NUM_ARGS ()*/); |
| 1220 | #endif |
| 1221 | #ifdef FRAME_SAVED_PC |
| 1222 | fprintf_unfiltered (file, |
| 1223 | "gdbarch_dump: %s # %s\n", |
| 1224 | "FRAME_SAVED_PC(fi)", |
| 1225 | XSTRING (FRAME_SAVED_PC (fi))); |
| 1226 | if (GDB_MULTI_ARCH) |
| 1227 | fprintf_unfiltered (file, |
| 1228 | "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n", |
| 1229 | (long) current_gdbarch->frame_saved_pc |
| 1230 | /*FRAME_SAVED_PC ()*/); |
| 1231 | #endif |
| 1232 | #ifdef FUNCTION_START_OFFSET |
| 1233 | fprintf_unfiltered (file, |
| 1234 | "gdbarch_dump: FUNCTION_START_OFFSET # %s\n", |
| 1235 | XSTRING (FUNCTION_START_OFFSET)); |
| 1236 | fprintf_unfiltered (file, |
| 1237 | "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", |
| 1238 | (long) FUNCTION_START_OFFSET); |
| 1239 | #endif |
| 1240 | #ifdef GET_SAVED_REGISTER |
| 1241 | #if GDB_MULTI_ARCH |
| 1242 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1243 | fprintf_unfiltered (file, |
| 1244 | "gdbarch_dump: %s # %s\n", |
| 1245 | "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)", |
| 1246 | XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval))); |
| 1247 | #endif |
| 1248 | if (GDB_MULTI_ARCH) |
| 1249 | fprintf_unfiltered (file, |
| 1250 | "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n", |
| 1251 | (long) current_gdbarch->get_saved_register |
| 1252 | /*GET_SAVED_REGISTER ()*/); |
| 1253 | #endif |
| 1254 | #ifdef IEEE_FLOAT |
| 1255 | fprintf_unfiltered (file, |
| 1256 | "gdbarch_dump: IEEE_FLOAT # %s\n", |
| 1257 | XSTRING (IEEE_FLOAT)); |
| 1258 | fprintf_unfiltered (file, |
| 1259 | "gdbarch_dump: IEEE_FLOAT = %ld\n", |
| 1260 | (long) IEEE_FLOAT); |
| 1261 | #endif |
| 1262 | #ifdef INIT_EXTRA_FRAME_INFO |
| 1263 | #if GDB_MULTI_ARCH |
| 1264 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1265 | fprintf_unfiltered (file, |
| 1266 | "gdbarch_dump: %s # %s\n", |
| 1267 | "INIT_EXTRA_FRAME_INFO(fromleaf, frame)", |
| 1268 | XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame))); |
| 1269 | #endif |
| 1270 | if (GDB_MULTI_ARCH) |
| 1271 | fprintf_unfiltered (file, |
| 1272 | "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n", |
| 1273 | (long) current_gdbarch->init_extra_frame_info |
| 1274 | /*INIT_EXTRA_FRAME_INFO ()*/); |
| 1275 | #endif |
| 1276 | #ifdef INIT_FRAME_PC |
| 1277 | #if GDB_MULTI_ARCH |
| 1278 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1279 | fprintf_unfiltered (file, |
| 1280 | "gdbarch_dump: %s # %s\n", |
| 1281 | "INIT_FRAME_PC(fromleaf, prev)", |
| 1282 | XSTRING (INIT_FRAME_PC (fromleaf, prev))); |
| 1283 | #endif |
| 1284 | if (GDB_MULTI_ARCH) |
| 1285 | fprintf_unfiltered (file, |
| 1286 | "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n", |
| 1287 | (long) current_gdbarch->init_frame_pc |
| 1288 | /*INIT_FRAME_PC ()*/); |
| 1289 | #endif |
| 1290 | #ifdef INIT_FRAME_PC_FIRST |
| 1291 | #if GDB_MULTI_ARCH |
| 1292 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1293 | fprintf_unfiltered (file, |
| 1294 | "gdbarch_dump: %s # %s\n", |
| 1295 | "INIT_FRAME_PC_FIRST(fromleaf, prev)", |
| 1296 | XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev))); |
| 1297 | #endif |
| 1298 | if (GDB_MULTI_ARCH) |
| 1299 | fprintf_unfiltered (file, |
| 1300 | "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n", |
| 1301 | (long) current_gdbarch->init_frame_pc_first |
| 1302 | /*INIT_FRAME_PC_FIRST ()*/); |
| 1303 | #endif |
| 1304 | #ifdef INNER_THAN |
| 1305 | fprintf_unfiltered (file, |
| 1306 | "gdbarch_dump: %s # %s\n", |
| 1307 | "INNER_THAN(lhs, rhs)", |
| 1308 | XSTRING (INNER_THAN (lhs, rhs))); |
| 1309 | if (GDB_MULTI_ARCH) |
| 1310 | fprintf_unfiltered (file, |
| 1311 | "gdbarch_dump: INNER_THAN = 0x%08lx\n", |
| 1312 | (long) current_gdbarch->inner_than |
| 1313 | /*INNER_THAN ()*/); |
| 1314 | #endif |
| 1315 | #ifdef INTEGER_TO_ADDRESS |
| 1316 | fprintf_unfiltered (file, |
| 1317 | "gdbarch_dump: %s # %s\n", |
| 1318 | "INTEGER_TO_ADDRESS(type, buf)", |
| 1319 | XSTRING (INTEGER_TO_ADDRESS (type, buf))); |
| 1320 | if (GDB_MULTI_ARCH) |
| 1321 | fprintf_unfiltered (file, |
| 1322 | "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n", |
| 1323 | (long) current_gdbarch->integer_to_address |
| 1324 | /*INTEGER_TO_ADDRESS ()*/); |
| 1325 | #endif |
| 1326 | #ifdef IN_SOLIB_CALL_TRAMPOLINE |
| 1327 | fprintf_unfiltered (file, |
| 1328 | "gdbarch_dump: %s # %s\n", |
| 1329 | "IN_SOLIB_CALL_TRAMPOLINE(pc, name)", |
| 1330 | XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name))); |
| 1331 | if (GDB_MULTI_ARCH) |
| 1332 | fprintf_unfiltered (file, |
| 1333 | "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n", |
| 1334 | (long) current_gdbarch->in_solib_call_trampoline |
| 1335 | /*IN_SOLIB_CALL_TRAMPOLINE ()*/); |
| 1336 | #endif |
| 1337 | #ifdef MAX_REGISTER_RAW_SIZE |
| 1338 | fprintf_unfiltered (file, |
| 1339 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n", |
| 1340 | XSTRING (MAX_REGISTER_RAW_SIZE)); |
| 1341 | fprintf_unfiltered (file, |
| 1342 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n", |
| 1343 | (long) MAX_REGISTER_RAW_SIZE); |
| 1344 | #endif |
| 1345 | #ifdef MAX_REGISTER_VIRTUAL_SIZE |
| 1346 | fprintf_unfiltered (file, |
| 1347 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n", |
| 1348 | XSTRING (MAX_REGISTER_VIRTUAL_SIZE)); |
| 1349 | fprintf_unfiltered (file, |
| 1350 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n", |
| 1351 | (long) MAX_REGISTER_VIRTUAL_SIZE); |
| 1352 | #endif |
| 1353 | #ifdef MEMORY_INSERT_BREAKPOINT |
| 1354 | fprintf_unfiltered (file, |
| 1355 | "gdbarch_dump: %s # %s\n", |
| 1356 | "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)", |
| 1357 | XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache))); |
| 1358 | if (GDB_MULTI_ARCH) |
| 1359 | fprintf_unfiltered (file, |
| 1360 | "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n", |
| 1361 | (long) current_gdbarch->memory_insert_breakpoint |
| 1362 | /*MEMORY_INSERT_BREAKPOINT ()*/); |
| 1363 | #endif |
| 1364 | #ifdef MEMORY_REMOVE_BREAKPOINT |
| 1365 | fprintf_unfiltered (file, |
| 1366 | "gdbarch_dump: %s # %s\n", |
| 1367 | "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)", |
| 1368 | XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache))); |
| 1369 | if (GDB_MULTI_ARCH) |
| 1370 | fprintf_unfiltered (file, |
| 1371 | "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n", |
| 1372 | (long) current_gdbarch->memory_remove_breakpoint |
| 1373 | /*MEMORY_REMOVE_BREAKPOINT ()*/); |
| 1374 | #endif |
| 1375 | #ifdef NNPC_REGNUM |
| 1376 | fprintf_unfiltered (file, |
| 1377 | "gdbarch_dump: NNPC_REGNUM # %s\n", |
| 1378 | XSTRING (NNPC_REGNUM)); |
| 1379 | fprintf_unfiltered (file, |
| 1380 | "gdbarch_dump: NNPC_REGNUM = %ld\n", |
| 1381 | (long) NNPC_REGNUM); |
| 1382 | #endif |
| 1383 | #ifdef NPC_REGNUM |
| 1384 | fprintf_unfiltered (file, |
| 1385 | "gdbarch_dump: NPC_REGNUM # %s\n", |
| 1386 | XSTRING (NPC_REGNUM)); |
| 1387 | fprintf_unfiltered (file, |
| 1388 | "gdbarch_dump: NPC_REGNUM = %ld\n", |
| 1389 | (long) NPC_REGNUM); |
| 1390 | #endif |
| 1391 | #ifdef NUM_PSEUDO_REGS |
| 1392 | fprintf_unfiltered (file, |
| 1393 | "gdbarch_dump: NUM_PSEUDO_REGS # %s\n", |
| 1394 | XSTRING (NUM_PSEUDO_REGS)); |
| 1395 | fprintf_unfiltered (file, |
| 1396 | "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n", |
| 1397 | (long) NUM_PSEUDO_REGS); |
| 1398 | #endif |
| 1399 | #ifdef NUM_REGS |
| 1400 | fprintf_unfiltered (file, |
| 1401 | "gdbarch_dump: NUM_REGS # %s\n", |
| 1402 | XSTRING (NUM_REGS)); |
| 1403 | fprintf_unfiltered (file, |
| 1404 | "gdbarch_dump: NUM_REGS = %ld\n", |
| 1405 | (long) NUM_REGS); |
| 1406 | #endif |
| 1407 | #ifdef PARM_BOUNDARY |
| 1408 | fprintf_unfiltered (file, |
| 1409 | "gdbarch_dump: PARM_BOUNDARY # %s\n", |
| 1410 | XSTRING (PARM_BOUNDARY)); |
| 1411 | fprintf_unfiltered (file, |
| 1412 | "gdbarch_dump: PARM_BOUNDARY = %ld\n", |
| 1413 | (long) PARM_BOUNDARY); |
| 1414 | #endif |
| 1415 | #ifdef PC_IN_CALL_DUMMY |
| 1416 | fprintf_unfiltered (file, |
| 1417 | "gdbarch_dump: %s # %s\n", |
| 1418 | "PC_IN_CALL_DUMMY(pc, sp, frame_address)", |
| 1419 | XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address))); |
| 1420 | if (GDB_MULTI_ARCH) |
| 1421 | fprintf_unfiltered (file, |
| 1422 | "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n", |
| 1423 | (long) current_gdbarch->pc_in_call_dummy |
| 1424 | /*PC_IN_CALL_DUMMY ()*/); |
| 1425 | #endif |
| 1426 | #ifdef PC_REGNUM |
| 1427 | fprintf_unfiltered (file, |
| 1428 | "gdbarch_dump: PC_REGNUM # %s\n", |
| 1429 | XSTRING (PC_REGNUM)); |
| 1430 | fprintf_unfiltered (file, |
| 1431 | "gdbarch_dump: PC_REGNUM = %ld\n", |
| 1432 | (long) PC_REGNUM); |
| 1433 | #endif |
| 1434 | #ifdef POINTER_TO_ADDRESS |
| 1435 | fprintf_unfiltered (file, |
| 1436 | "gdbarch_dump: %s # %s\n", |
| 1437 | "POINTER_TO_ADDRESS(type, buf)", |
| 1438 | XSTRING (POINTER_TO_ADDRESS (type, buf))); |
| 1439 | if (GDB_MULTI_ARCH) |
| 1440 | fprintf_unfiltered (file, |
| 1441 | "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n", |
| 1442 | (long) current_gdbarch->pointer_to_address |
| 1443 | /*POINTER_TO_ADDRESS ()*/); |
| 1444 | #endif |
| 1445 | #ifdef POP_FRAME |
| 1446 | #if GDB_MULTI_ARCH |
| 1447 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1448 | fprintf_unfiltered (file, |
| 1449 | "gdbarch_dump: %s # %s\n", |
| 1450 | "POP_FRAME(-)", |
| 1451 | XSTRING (POP_FRAME (-))); |
| 1452 | #endif |
| 1453 | if (GDB_MULTI_ARCH) |
| 1454 | fprintf_unfiltered (file, |
| 1455 | "gdbarch_dump: POP_FRAME = 0x%08lx\n", |
| 1456 | (long) current_gdbarch->pop_frame |
| 1457 | /*POP_FRAME ()*/); |
| 1458 | #endif |
| 1459 | #ifdef PREPARE_TO_PROCEED |
| 1460 | fprintf_unfiltered (file, |
| 1461 | "gdbarch_dump: %s # %s\n", |
| 1462 | "PREPARE_TO_PROCEED(select_it)", |
| 1463 | XSTRING (PREPARE_TO_PROCEED (select_it))); |
| 1464 | if (GDB_MULTI_ARCH) |
| 1465 | fprintf_unfiltered (file, |
| 1466 | "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n", |
| 1467 | (long) current_gdbarch->prepare_to_proceed |
| 1468 | /*PREPARE_TO_PROCEED ()*/); |
| 1469 | #endif |
| 1470 | #ifdef PROLOGUE_FRAMELESS_P |
| 1471 | fprintf_unfiltered (file, |
| 1472 | "gdbarch_dump: %s # %s\n", |
| 1473 | "PROLOGUE_FRAMELESS_P(ip)", |
| 1474 | XSTRING (PROLOGUE_FRAMELESS_P (ip))); |
| 1475 | if (GDB_MULTI_ARCH) |
| 1476 | fprintf_unfiltered (file, |
| 1477 | "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n", |
| 1478 | (long) current_gdbarch->prologue_frameless_p |
| 1479 | /*PROLOGUE_FRAMELESS_P ()*/); |
| 1480 | #endif |
| 1481 | #ifdef PUSH_ARGUMENTS |
| 1482 | fprintf_unfiltered (file, |
| 1483 | "gdbarch_dump: %s # %s\n", |
| 1484 | "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)", |
| 1485 | XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr))); |
| 1486 | if (GDB_MULTI_ARCH) |
| 1487 | fprintf_unfiltered (file, |
| 1488 | "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n", |
| 1489 | (long) current_gdbarch->push_arguments |
| 1490 | /*PUSH_ARGUMENTS ()*/); |
| 1491 | #endif |
| 1492 | #ifdef PUSH_DUMMY_FRAME |
| 1493 | #if GDB_MULTI_ARCH |
| 1494 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1495 | fprintf_unfiltered (file, |
| 1496 | "gdbarch_dump: %s # %s\n", |
| 1497 | "PUSH_DUMMY_FRAME(-)", |
| 1498 | XSTRING (PUSH_DUMMY_FRAME (-))); |
| 1499 | #endif |
| 1500 | if (GDB_MULTI_ARCH) |
| 1501 | fprintf_unfiltered (file, |
| 1502 | "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n", |
| 1503 | (long) current_gdbarch->push_dummy_frame |
| 1504 | /*PUSH_DUMMY_FRAME ()*/); |
| 1505 | #endif |
| 1506 | #ifdef PUSH_RETURN_ADDRESS |
| 1507 | fprintf_unfiltered (file, |
| 1508 | "gdbarch_dump: %s # %s\n", |
| 1509 | "PUSH_RETURN_ADDRESS(pc, sp)", |
| 1510 | XSTRING (PUSH_RETURN_ADDRESS (pc, sp))); |
| 1511 | if (GDB_MULTI_ARCH) |
| 1512 | fprintf_unfiltered (file, |
| 1513 | "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n", |
| 1514 | (long) current_gdbarch->push_return_address |
| 1515 | /*PUSH_RETURN_ADDRESS ()*/); |
| 1516 | #endif |
| 1517 | #ifdef REGISTER_BYTE |
| 1518 | fprintf_unfiltered (file, |
| 1519 | "gdbarch_dump: %s # %s\n", |
| 1520 | "REGISTER_BYTE(reg_nr)", |
| 1521 | XSTRING (REGISTER_BYTE (reg_nr))); |
| 1522 | if (GDB_MULTI_ARCH) |
| 1523 | fprintf_unfiltered (file, |
| 1524 | "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n", |
| 1525 | (long) current_gdbarch->register_byte |
| 1526 | /*REGISTER_BYTE ()*/); |
| 1527 | #endif |
| 1528 | #ifdef REGISTER_BYTES |
| 1529 | fprintf_unfiltered (file, |
| 1530 | "gdbarch_dump: REGISTER_BYTES # %s\n", |
| 1531 | XSTRING (REGISTER_BYTES)); |
| 1532 | fprintf_unfiltered (file, |
| 1533 | "gdbarch_dump: REGISTER_BYTES = %ld\n", |
| 1534 | (long) REGISTER_BYTES); |
| 1535 | #endif |
| 1536 | #ifdef REGISTER_BYTES_OK |
| 1537 | fprintf_unfiltered (file, |
| 1538 | "gdbarch_dump: %s # %s\n", |
| 1539 | "REGISTER_BYTES_OK(nr_bytes)", |
| 1540 | XSTRING (REGISTER_BYTES_OK (nr_bytes))); |
| 1541 | if (GDB_MULTI_ARCH) |
| 1542 | fprintf_unfiltered (file, |
| 1543 | "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n", |
| 1544 | (long) current_gdbarch->register_bytes_ok |
| 1545 | /*REGISTER_BYTES_OK ()*/); |
| 1546 | #endif |
| 1547 | #ifdef REGISTER_CONVERTIBLE |
| 1548 | fprintf_unfiltered (file, |
| 1549 | "gdbarch_dump: %s # %s\n", |
| 1550 | "REGISTER_CONVERTIBLE(nr)", |
| 1551 | XSTRING (REGISTER_CONVERTIBLE (nr))); |
| 1552 | if (GDB_MULTI_ARCH) |
| 1553 | fprintf_unfiltered (file, |
| 1554 | "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n", |
| 1555 | (long) current_gdbarch->register_convertible |
| 1556 | /*REGISTER_CONVERTIBLE ()*/); |
| 1557 | #endif |
| 1558 | #ifdef REGISTER_CONVERT_TO_RAW |
| 1559 | #if GDB_MULTI_ARCH |
| 1560 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1561 | fprintf_unfiltered (file, |
| 1562 | "gdbarch_dump: %s # %s\n", |
| 1563 | "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)", |
| 1564 | XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to))); |
| 1565 | #endif |
| 1566 | if (GDB_MULTI_ARCH) |
| 1567 | fprintf_unfiltered (file, |
| 1568 | "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n", |
| 1569 | (long) current_gdbarch->register_convert_to_raw |
| 1570 | /*REGISTER_CONVERT_TO_RAW ()*/); |
| 1571 | #endif |
| 1572 | #ifdef REGISTER_CONVERT_TO_VIRTUAL |
| 1573 | #if GDB_MULTI_ARCH |
| 1574 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1575 | fprintf_unfiltered (file, |
| 1576 | "gdbarch_dump: %s # %s\n", |
| 1577 | "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)", |
| 1578 | XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to))); |
| 1579 | #endif |
| 1580 | if (GDB_MULTI_ARCH) |
| 1581 | fprintf_unfiltered (file, |
| 1582 | "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n", |
| 1583 | (long) current_gdbarch->register_convert_to_virtual |
| 1584 | /*REGISTER_CONVERT_TO_VIRTUAL ()*/); |
| 1585 | #endif |
| 1586 | #ifdef REGISTER_NAME |
| 1587 | fprintf_unfiltered (file, |
| 1588 | "gdbarch_dump: %s # %s\n", |
| 1589 | "REGISTER_NAME(regnr)", |
| 1590 | XSTRING (REGISTER_NAME (regnr))); |
| 1591 | if (GDB_MULTI_ARCH) |
| 1592 | fprintf_unfiltered (file, |
| 1593 | "gdbarch_dump: REGISTER_NAME = 0x%08lx\n", |
| 1594 | (long) current_gdbarch->register_name |
| 1595 | /*REGISTER_NAME ()*/); |
| 1596 | #endif |
| 1597 | #ifdef REGISTER_RAW_SIZE |
| 1598 | fprintf_unfiltered (file, |
| 1599 | "gdbarch_dump: %s # %s\n", |
| 1600 | "REGISTER_RAW_SIZE(reg_nr)", |
| 1601 | XSTRING (REGISTER_RAW_SIZE (reg_nr))); |
| 1602 | if (GDB_MULTI_ARCH) |
| 1603 | fprintf_unfiltered (file, |
| 1604 | "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n", |
| 1605 | (long) current_gdbarch->register_raw_size |
| 1606 | /*REGISTER_RAW_SIZE ()*/); |
| 1607 | #endif |
| 1608 | #ifdef REGISTER_SIM_REGNO |
| 1609 | fprintf_unfiltered (file, |
| 1610 | "gdbarch_dump: %s # %s\n", |
| 1611 | "REGISTER_SIM_REGNO(reg_nr)", |
| 1612 | XSTRING (REGISTER_SIM_REGNO (reg_nr))); |
| 1613 | if (GDB_MULTI_ARCH) |
| 1614 | fprintf_unfiltered (file, |
| 1615 | "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n", |
| 1616 | (long) current_gdbarch->register_sim_regno |
| 1617 | /*REGISTER_SIM_REGNO ()*/); |
| 1618 | #endif |
| 1619 | #ifdef REGISTER_SIZE |
| 1620 | fprintf_unfiltered (file, |
| 1621 | "gdbarch_dump: REGISTER_SIZE # %s\n", |
| 1622 | XSTRING (REGISTER_SIZE)); |
| 1623 | fprintf_unfiltered (file, |
| 1624 | "gdbarch_dump: REGISTER_SIZE = %ld\n", |
| 1625 | (long) REGISTER_SIZE); |
| 1626 | #endif |
| 1627 | #ifdef REGISTER_VIRTUAL_SIZE |
| 1628 | fprintf_unfiltered (file, |
| 1629 | "gdbarch_dump: %s # %s\n", |
| 1630 | "REGISTER_VIRTUAL_SIZE(reg_nr)", |
| 1631 | XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr))); |
| 1632 | if (GDB_MULTI_ARCH) |
| 1633 | fprintf_unfiltered (file, |
| 1634 | "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n", |
| 1635 | (long) current_gdbarch->register_virtual_size |
| 1636 | /*REGISTER_VIRTUAL_SIZE ()*/); |
| 1637 | #endif |
| 1638 | #ifdef REGISTER_VIRTUAL_TYPE |
| 1639 | fprintf_unfiltered (file, |
| 1640 | "gdbarch_dump: %s # %s\n", |
| 1641 | "REGISTER_VIRTUAL_TYPE(reg_nr)", |
| 1642 | XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr))); |
| 1643 | if (GDB_MULTI_ARCH) |
| 1644 | fprintf_unfiltered (file, |
| 1645 | "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n", |
| 1646 | (long) current_gdbarch->register_virtual_type |
| 1647 | /*REGISTER_VIRTUAL_TYPE ()*/); |
| 1648 | #endif |
| 1649 | #ifdef REG_STRUCT_HAS_ADDR |
| 1650 | fprintf_unfiltered (file, |
| 1651 | "gdbarch_dump: %s # %s\n", |
| 1652 | "REG_STRUCT_HAS_ADDR(gcc_p, type)", |
| 1653 | XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type))); |
| 1654 | if (GDB_MULTI_ARCH) |
| 1655 | fprintf_unfiltered (file, |
| 1656 | "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n", |
| 1657 | (long) current_gdbarch->reg_struct_has_addr |
| 1658 | /*REG_STRUCT_HAS_ADDR ()*/); |
| 1659 | #endif |
| 1660 | #ifdef REMOTE_TRANSLATE_XFER_ADDRESS |
| 1661 | #if GDB_MULTI_ARCH |
| 1662 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1663 | fprintf_unfiltered (file, |
| 1664 | "gdbarch_dump: %s # %s\n", |
| 1665 | "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)", |
| 1666 | XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len))); |
| 1667 | #endif |
| 1668 | if (GDB_MULTI_ARCH) |
| 1669 | fprintf_unfiltered (file, |
| 1670 | "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n", |
| 1671 | (long) current_gdbarch->remote_translate_xfer_address |
| 1672 | /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/); |
| 1673 | #endif |
| 1674 | #ifdef RETURN_VALUE_ON_STACK |
| 1675 | fprintf_unfiltered (file, |
| 1676 | "gdbarch_dump: %s # %s\n", |
| 1677 | "RETURN_VALUE_ON_STACK(type)", |
| 1678 | XSTRING (RETURN_VALUE_ON_STACK (type))); |
| 1679 | if (GDB_MULTI_ARCH) |
| 1680 | fprintf_unfiltered (file, |
| 1681 | "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n", |
| 1682 | (long) current_gdbarch->return_value_on_stack |
| 1683 | /*RETURN_VALUE_ON_STACK ()*/); |
| 1684 | #endif |
| 1685 | #ifdef SAVED_PC_AFTER_CALL |
| 1686 | fprintf_unfiltered (file, |
| 1687 | "gdbarch_dump: %s # %s\n", |
| 1688 | "SAVED_PC_AFTER_CALL(frame)", |
| 1689 | XSTRING (SAVED_PC_AFTER_CALL (frame))); |
| 1690 | if (GDB_MULTI_ARCH) |
| 1691 | fprintf_unfiltered (file, |
| 1692 | "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n", |
| 1693 | (long) current_gdbarch->saved_pc_after_call |
| 1694 | /*SAVED_PC_AFTER_CALL ()*/); |
| 1695 | #endif |
| 1696 | #ifdef SAVE_DUMMY_FRAME_TOS |
| 1697 | #if GDB_MULTI_ARCH |
| 1698 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1699 | fprintf_unfiltered (file, |
| 1700 | "gdbarch_dump: %s # %s\n", |
| 1701 | "SAVE_DUMMY_FRAME_TOS(sp)", |
| 1702 | XSTRING (SAVE_DUMMY_FRAME_TOS (sp))); |
| 1703 | #endif |
| 1704 | if (GDB_MULTI_ARCH) |
| 1705 | fprintf_unfiltered (file, |
| 1706 | "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n", |
| 1707 | (long) current_gdbarch->save_dummy_frame_tos |
| 1708 | /*SAVE_DUMMY_FRAME_TOS ()*/); |
| 1709 | #endif |
| 1710 | #ifdef SDB_REG_TO_REGNUM |
| 1711 | fprintf_unfiltered (file, |
| 1712 | "gdbarch_dump: %s # %s\n", |
| 1713 | "SDB_REG_TO_REGNUM(sdb_regnr)", |
| 1714 | XSTRING (SDB_REG_TO_REGNUM (sdb_regnr))); |
| 1715 | if (GDB_MULTI_ARCH) |
| 1716 | fprintf_unfiltered (file, |
| 1717 | "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n", |
| 1718 | (long) current_gdbarch->sdb_reg_to_regnum |
| 1719 | /*SDB_REG_TO_REGNUM ()*/); |
| 1720 | #endif |
| 1721 | #ifdef SIZEOF_CALL_DUMMY_WORDS |
| 1722 | fprintf_unfiltered (file, |
| 1723 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n", |
| 1724 | XSTRING (SIZEOF_CALL_DUMMY_WORDS)); |
| 1725 | fprintf_unfiltered (file, |
| 1726 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n", |
| 1727 | (long) SIZEOF_CALL_DUMMY_WORDS); |
| 1728 | #endif |
| 1729 | #ifdef SKIP_PROLOGUE |
| 1730 | fprintf_unfiltered (file, |
| 1731 | "gdbarch_dump: %s # %s\n", |
| 1732 | "SKIP_PROLOGUE(ip)", |
| 1733 | XSTRING (SKIP_PROLOGUE (ip))); |
| 1734 | if (GDB_MULTI_ARCH) |
| 1735 | fprintf_unfiltered (file, |
| 1736 | "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n", |
| 1737 | (long) current_gdbarch->skip_prologue |
| 1738 | /*SKIP_PROLOGUE ()*/); |
| 1739 | #endif |
| 1740 | #ifdef SKIP_TRAMPOLINE_CODE |
| 1741 | fprintf_unfiltered (file, |
| 1742 | "gdbarch_dump: %s # %s\n", |
| 1743 | "SKIP_TRAMPOLINE_CODE(pc)", |
| 1744 | XSTRING (SKIP_TRAMPOLINE_CODE (pc))); |
| 1745 | if (GDB_MULTI_ARCH) |
| 1746 | fprintf_unfiltered (file, |
| 1747 | "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n", |
| 1748 | (long) current_gdbarch->skip_trampoline_code |
| 1749 | /*SKIP_TRAMPOLINE_CODE ()*/); |
| 1750 | #endif |
| 1751 | #ifdef SOFTWARE_SINGLE_STEP |
| 1752 | #if GDB_MULTI_ARCH |
| 1753 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1754 | fprintf_unfiltered (file, |
| 1755 | "gdbarch_dump: %s # %s\n", |
| 1756 | "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)", |
| 1757 | XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p))); |
| 1758 | #endif |
| 1759 | if (GDB_MULTI_ARCH) |
| 1760 | fprintf_unfiltered (file, |
| 1761 | "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n", |
| 1762 | (long) current_gdbarch->software_single_step |
| 1763 | /*SOFTWARE_SINGLE_STEP ()*/); |
| 1764 | #endif |
| 1765 | #ifdef SP_REGNUM |
| 1766 | fprintf_unfiltered (file, |
| 1767 | "gdbarch_dump: SP_REGNUM # %s\n", |
| 1768 | XSTRING (SP_REGNUM)); |
| 1769 | fprintf_unfiltered (file, |
| 1770 | "gdbarch_dump: SP_REGNUM = %ld\n", |
| 1771 | (long) SP_REGNUM); |
| 1772 | #endif |
| 1773 | #ifdef STAB_REG_TO_REGNUM |
| 1774 | fprintf_unfiltered (file, |
| 1775 | "gdbarch_dump: %s # %s\n", |
| 1776 | "STAB_REG_TO_REGNUM(stab_regnr)", |
| 1777 | XSTRING (STAB_REG_TO_REGNUM (stab_regnr))); |
| 1778 | if (GDB_MULTI_ARCH) |
| 1779 | fprintf_unfiltered (file, |
| 1780 | "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n", |
| 1781 | (long) current_gdbarch->stab_reg_to_regnum |
| 1782 | /*STAB_REG_TO_REGNUM ()*/); |
| 1783 | #endif |
| 1784 | #ifdef STACK_ALIGN |
| 1785 | fprintf_unfiltered (file, |
| 1786 | "gdbarch_dump: %s # %s\n", |
| 1787 | "STACK_ALIGN(sp)", |
| 1788 | XSTRING (STACK_ALIGN (sp))); |
| 1789 | if (GDB_MULTI_ARCH) |
| 1790 | fprintf_unfiltered (file, |
| 1791 | "gdbarch_dump: STACK_ALIGN = 0x%08lx\n", |
| 1792 | (long) current_gdbarch->stack_align |
| 1793 | /*STACK_ALIGN ()*/); |
| 1794 | #endif |
| 1795 | #ifdef STORE_PSEUDO_REGISTER |
| 1796 | #if GDB_MULTI_ARCH |
| 1797 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1798 | fprintf_unfiltered (file, |
| 1799 | "gdbarch_dump: %s # %s\n", |
| 1800 | "STORE_PSEUDO_REGISTER(regnum)", |
| 1801 | XSTRING (STORE_PSEUDO_REGISTER (regnum))); |
| 1802 | #endif |
| 1803 | if (GDB_MULTI_ARCH) |
| 1804 | fprintf_unfiltered (file, |
| 1805 | "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n", |
| 1806 | (long) current_gdbarch->store_pseudo_register |
| 1807 | /*STORE_PSEUDO_REGISTER ()*/); |
| 1808 | #endif |
| 1809 | #ifdef STORE_RETURN_VALUE |
| 1810 | #if GDB_MULTI_ARCH |
| 1811 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1812 | fprintf_unfiltered (file, |
| 1813 | "gdbarch_dump: %s # %s\n", |
| 1814 | "STORE_RETURN_VALUE(type, valbuf)", |
| 1815 | XSTRING (STORE_RETURN_VALUE (type, valbuf))); |
| 1816 | #endif |
| 1817 | if (GDB_MULTI_ARCH) |
| 1818 | fprintf_unfiltered (file, |
| 1819 | "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n", |
| 1820 | (long) current_gdbarch->store_return_value |
| 1821 | /*STORE_RETURN_VALUE ()*/); |
| 1822 | #endif |
| 1823 | #ifdef STORE_STRUCT_RETURN |
| 1824 | #if GDB_MULTI_ARCH |
| 1825 | /* Macro might contain `[{}]' when not multi-arch */ |
| 1826 | fprintf_unfiltered (file, |
| 1827 | "gdbarch_dump: %s # %s\n", |
| 1828 | "STORE_STRUCT_RETURN(addr, sp)", |
| 1829 | XSTRING (STORE_STRUCT_RETURN (addr, sp))); |
| 1830 | #endif |
| 1831 | if (GDB_MULTI_ARCH) |
| 1832 | fprintf_unfiltered (file, |
| 1833 | "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n", |
| 1834 | (long) current_gdbarch->store_struct_return |
| 1835 | /*STORE_STRUCT_RETURN ()*/); |
| 1836 | #endif |
| 1837 | #ifdef TARGET_ADDR_BIT |
| 1838 | fprintf_unfiltered (file, |
| 1839 | "gdbarch_dump: TARGET_ADDR_BIT # %s\n", |
| 1840 | XSTRING (TARGET_ADDR_BIT)); |
| 1841 | fprintf_unfiltered (file, |
| 1842 | "gdbarch_dump: TARGET_ADDR_BIT = %ld\n", |
| 1843 | (long) TARGET_ADDR_BIT); |
| 1844 | #endif |
| 1845 | #ifdef TARGET_ARCHITECTURE |
| 1846 | fprintf_unfiltered (file, |
| 1847 | "gdbarch_dump: TARGET_ARCHITECTURE # %s\n", |
| 1848 | XSTRING (TARGET_ARCHITECTURE)); |
| 1849 | if (TARGET_ARCHITECTURE != NULL) |
| 1850 | fprintf_unfiltered (file, |
| 1851 | "gdbarch_dump: TARGET_ARCHITECTURE = %s\n", |
| 1852 | TARGET_ARCHITECTURE->printable_name); |
| 1853 | #endif |
| 1854 | #ifdef TARGET_BFD_VMA_BIT |
| 1855 | fprintf_unfiltered (file, |
| 1856 | "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n", |
| 1857 | XSTRING (TARGET_BFD_VMA_BIT)); |
| 1858 | fprintf_unfiltered (file, |
| 1859 | "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n", |
| 1860 | (long) TARGET_BFD_VMA_BIT); |
| 1861 | #endif |
| 1862 | #ifdef TARGET_BYTE_ORDER |
| 1863 | fprintf_unfiltered (file, |
| 1864 | "gdbarch_dump: TARGET_BYTE_ORDER # %s\n", |
| 1865 | XSTRING (TARGET_BYTE_ORDER)); |
| 1866 | fprintf_unfiltered (file, |
| 1867 | "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n", |
| 1868 | (long) TARGET_BYTE_ORDER); |
| 1869 | #endif |
| 1870 | #ifdef TARGET_DOUBLE_BIT |
| 1871 | fprintf_unfiltered (file, |
| 1872 | "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n", |
| 1873 | XSTRING (TARGET_DOUBLE_BIT)); |
| 1874 | fprintf_unfiltered (file, |
| 1875 | "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n", |
| 1876 | (long) TARGET_DOUBLE_BIT); |
| 1877 | #endif |
| 1878 | #ifdef TARGET_DOUBLE_FORMAT |
| 1879 | fprintf_unfiltered (file, |
| 1880 | "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n", |
| 1881 | XSTRING (TARGET_DOUBLE_FORMAT)); |
| 1882 | fprintf_unfiltered (file, |
| 1883 | "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n", |
| 1884 | (long) TARGET_DOUBLE_FORMAT); |
| 1885 | #endif |
| 1886 | #ifdef TARGET_FLOAT_BIT |
| 1887 | fprintf_unfiltered (file, |
| 1888 | "gdbarch_dump: TARGET_FLOAT_BIT # %s\n", |
| 1889 | XSTRING (TARGET_FLOAT_BIT)); |
| 1890 | fprintf_unfiltered (file, |
| 1891 | "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n", |
| 1892 | (long) TARGET_FLOAT_BIT); |
| 1893 | #endif |
| 1894 | #ifdef TARGET_FLOAT_FORMAT |
| 1895 | fprintf_unfiltered (file, |
| 1896 | "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n", |
| 1897 | XSTRING (TARGET_FLOAT_FORMAT)); |
| 1898 | fprintf_unfiltered (file, |
| 1899 | "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n", |
| 1900 | (long) TARGET_FLOAT_FORMAT); |
| 1901 | #endif |
| 1902 | #ifdef TARGET_INT_BIT |
| 1903 | fprintf_unfiltered (file, |
| 1904 | "gdbarch_dump: TARGET_INT_BIT # %s\n", |
| 1905 | XSTRING (TARGET_INT_BIT)); |
| 1906 | fprintf_unfiltered (file, |
| 1907 | "gdbarch_dump: TARGET_INT_BIT = %ld\n", |
| 1908 | (long) TARGET_INT_BIT); |
| 1909 | #endif |
| 1910 | #ifdef TARGET_LONG_BIT |
| 1911 | fprintf_unfiltered (file, |
| 1912 | "gdbarch_dump: TARGET_LONG_BIT # %s\n", |
| 1913 | XSTRING (TARGET_LONG_BIT)); |
| 1914 | fprintf_unfiltered (file, |
| 1915 | "gdbarch_dump: TARGET_LONG_BIT = %ld\n", |
| 1916 | (long) TARGET_LONG_BIT); |
| 1917 | #endif |
| 1918 | #ifdef TARGET_LONG_DOUBLE_BIT |
| 1919 | fprintf_unfiltered (file, |
| 1920 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n", |
| 1921 | XSTRING (TARGET_LONG_DOUBLE_BIT)); |
| 1922 | fprintf_unfiltered (file, |
| 1923 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n", |
| 1924 | (long) TARGET_LONG_DOUBLE_BIT); |
| 1925 | #endif |
| 1926 | #ifdef TARGET_LONG_DOUBLE_FORMAT |
| 1927 | fprintf_unfiltered (file, |
| 1928 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n", |
| 1929 | XSTRING (TARGET_LONG_DOUBLE_FORMAT)); |
| 1930 | fprintf_unfiltered (file, |
| 1931 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n", |
| 1932 | (long) TARGET_LONG_DOUBLE_FORMAT); |
| 1933 | #endif |
| 1934 | #ifdef TARGET_LONG_LONG_BIT |
| 1935 | fprintf_unfiltered (file, |
| 1936 | "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n", |
| 1937 | XSTRING (TARGET_LONG_LONG_BIT)); |
| 1938 | fprintf_unfiltered (file, |
| 1939 | "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n", |
| 1940 | (long) TARGET_LONG_LONG_BIT); |
| 1941 | #endif |
| 1942 | #ifdef TARGET_PRINT_INSN |
| 1943 | fprintf_unfiltered (file, |
| 1944 | "gdbarch_dump: %s # %s\n", |
| 1945 | "TARGET_PRINT_INSN(vma, info)", |
| 1946 | XSTRING (TARGET_PRINT_INSN (vma, info))); |
| 1947 | if (GDB_MULTI_ARCH) |
| 1948 | fprintf_unfiltered (file, |
| 1949 | "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n", |
| 1950 | (long) current_gdbarch->print_insn |
| 1951 | /*TARGET_PRINT_INSN ()*/); |
| 1952 | #endif |
| 1953 | #ifdef TARGET_PTR_BIT |
| 1954 | fprintf_unfiltered (file, |
| 1955 | "gdbarch_dump: TARGET_PTR_BIT # %s\n", |
| 1956 | XSTRING (TARGET_PTR_BIT)); |
| 1957 | fprintf_unfiltered (file, |
| 1958 | "gdbarch_dump: TARGET_PTR_BIT = %ld\n", |
| 1959 | (long) TARGET_PTR_BIT); |
| 1960 | #endif |
| 1961 | #ifdef TARGET_READ_FP |
| 1962 | fprintf_unfiltered (file, |
| 1963 | "gdbarch_dump: %s # %s\n", |
| 1964 | "TARGET_READ_FP()", |
| 1965 | XSTRING (TARGET_READ_FP ())); |
| 1966 | if (GDB_MULTI_ARCH) |
| 1967 | fprintf_unfiltered (file, |
| 1968 | "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n", |
| 1969 | (long) current_gdbarch->read_fp |
| 1970 | /*TARGET_READ_FP ()*/); |
| 1971 | #endif |
| 1972 | #ifdef TARGET_READ_PC |
| 1973 | fprintf_unfiltered (file, |
| 1974 | "gdbarch_dump: %s # %s\n", |
| 1975 | "TARGET_READ_PC(ptid)", |
| 1976 | XSTRING (TARGET_READ_PC (ptid))); |
| 1977 | if (GDB_MULTI_ARCH) |
| 1978 | fprintf_unfiltered (file, |
| 1979 | "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n", |
| 1980 | (long) current_gdbarch->read_pc |
| 1981 | /*TARGET_READ_PC ()*/); |
| 1982 | #endif |
| 1983 | #ifdef TARGET_READ_SP |
| 1984 | fprintf_unfiltered (file, |
| 1985 | "gdbarch_dump: %s # %s\n", |
| 1986 | "TARGET_READ_SP()", |
| 1987 | XSTRING (TARGET_READ_SP ())); |
| 1988 | if (GDB_MULTI_ARCH) |
| 1989 | fprintf_unfiltered (file, |
| 1990 | "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n", |
| 1991 | (long) current_gdbarch->read_sp |
| 1992 | /*TARGET_READ_SP ()*/); |
| 1993 | #endif |
| 1994 | #ifdef TARGET_SHORT_BIT |
| 1995 | fprintf_unfiltered (file, |
| 1996 | "gdbarch_dump: TARGET_SHORT_BIT # %s\n", |
| 1997 | XSTRING (TARGET_SHORT_BIT)); |
| 1998 | fprintf_unfiltered (file, |
| 1999 | "gdbarch_dump: TARGET_SHORT_BIT = %ld\n", |
| 2000 | (long) TARGET_SHORT_BIT); |
| 2001 | #endif |
| 2002 | #ifdef TARGET_VIRTUAL_FRAME_POINTER |
| 2003 | #if GDB_MULTI_ARCH |
| 2004 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2005 | fprintf_unfiltered (file, |
| 2006 | "gdbarch_dump: %s # %s\n", |
| 2007 | "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)", |
| 2008 | XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset))); |
| 2009 | #endif |
| 2010 | if (GDB_MULTI_ARCH) |
| 2011 | fprintf_unfiltered (file, |
| 2012 | "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n", |
| 2013 | (long) current_gdbarch->virtual_frame_pointer |
| 2014 | /*TARGET_VIRTUAL_FRAME_POINTER ()*/); |
| 2015 | #endif |
| 2016 | #ifdef TARGET_WRITE_FP |
| 2017 | #if GDB_MULTI_ARCH |
| 2018 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2019 | fprintf_unfiltered (file, |
| 2020 | "gdbarch_dump: %s # %s\n", |
| 2021 | "TARGET_WRITE_FP(val)", |
| 2022 | XSTRING (TARGET_WRITE_FP (val))); |
| 2023 | #endif |
| 2024 | if (GDB_MULTI_ARCH) |
| 2025 | fprintf_unfiltered (file, |
| 2026 | "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n", |
| 2027 | (long) current_gdbarch->write_fp |
| 2028 | /*TARGET_WRITE_FP ()*/); |
| 2029 | #endif |
| 2030 | #ifdef TARGET_WRITE_PC |
| 2031 | #if GDB_MULTI_ARCH |
| 2032 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2033 | fprintf_unfiltered (file, |
| 2034 | "gdbarch_dump: %s # %s\n", |
| 2035 | "TARGET_WRITE_PC(val, ptid)", |
| 2036 | XSTRING (TARGET_WRITE_PC (val, ptid))); |
| 2037 | #endif |
| 2038 | if (GDB_MULTI_ARCH) |
| 2039 | fprintf_unfiltered (file, |
| 2040 | "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n", |
| 2041 | (long) current_gdbarch->write_pc |
| 2042 | /*TARGET_WRITE_PC ()*/); |
| 2043 | #endif |
| 2044 | #ifdef TARGET_WRITE_SP |
| 2045 | #if GDB_MULTI_ARCH |
| 2046 | /* Macro might contain `[{}]' when not multi-arch */ |
| 2047 | fprintf_unfiltered (file, |
| 2048 | "gdbarch_dump: %s # %s\n", |
| 2049 | "TARGET_WRITE_SP(val)", |
| 2050 | XSTRING (TARGET_WRITE_SP (val))); |
| 2051 | #endif |
| 2052 | if (GDB_MULTI_ARCH) |
| 2053 | fprintf_unfiltered (file, |
| 2054 | "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n", |
| 2055 | (long) current_gdbarch->write_sp |
| 2056 | /*TARGET_WRITE_SP ()*/); |
| 2057 | #endif |
| 2058 | #ifdef USE_GENERIC_DUMMY_FRAMES |
| 2059 | fprintf_unfiltered (file, |
| 2060 | "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n", |
| 2061 | XSTRING (USE_GENERIC_DUMMY_FRAMES)); |
| 2062 | fprintf_unfiltered (file, |
| 2063 | "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n", |
| 2064 | (long) USE_GENERIC_DUMMY_FRAMES); |
| 2065 | #endif |
| 2066 | #ifdef USE_STRUCT_CONVENTION |
| 2067 | fprintf_unfiltered (file, |
| 2068 | "gdbarch_dump: %s # %s\n", |
| 2069 | "USE_STRUCT_CONVENTION(gcc_p, value_type)", |
| 2070 | XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type))); |
| 2071 | if (GDB_MULTI_ARCH) |
| 2072 | fprintf_unfiltered (file, |
| 2073 | "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n", |
| 2074 | (long) current_gdbarch->use_struct_convention |
| 2075 | /*USE_STRUCT_CONVENTION ()*/); |
| 2076 | #endif |
| 2077 | if (current_gdbarch->dump_tdep != NULL) |
| 2078 | current_gdbarch->dump_tdep (current_gdbarch, file); |
| 2079 | } |
| 2080 | |
| 2081 | struct gdbarch_tdep * |
| 2082 | gdbarch_tdep (struct gdbarch *gdbarch) |
| 2083 | { |
| 2084 | if (gdbarch_debug >= 2) |
| 2085 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
| 2086 | return gdbarch->tdep; |
| 2087 | } |
| 2088 | |
| 2089 | |
| 2090 | const struct bfd_arch_info * |
| 2091 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
| 2092 | { |
| 2093 | if (gdbarch_debug >= 2) |
| 2094 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
| 2095 | return gdbarch->bfd_arch_info; |
| 2096 | } |
| 2097 | |
| 2098 | int |
| 2099 | gdbarch_byte_order (struct gdbarch *gdbarch) |
| 2100 | { |
| 2101 | if (gdbarch_debug >= 2) |
| 2102 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
| 2103 | return gdbarch->byte_order; |
| 2104 | } |
| 2105 | |
| 2106 | int |
| 2107 | gdbarch_short_bit (struct gdbarch *gdbarch) |
| 2108 | { |
| 2109 | /* Skip verify of short_bit, invalid_p == 0 */ |
| 2110 | if (gdbarch_debug >= 2) |
| 2111 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
| 2112 | return gdbarch->short_bit; |
| 2113 | } |
| 2114 | |
| 2115 | void |
| 2116 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
| 2117 | int short_bit) |
| 2118 | { |
| 2119 | gdbarch->short_bit = short_bit; |
| 2120 | } |
| 2121 | |
| 2122 | int |
| 2123 | gdbarch_int_bit (struct gdbarch *gdbarch) |
| 2124 | { |
| 2125 | /* Skip verify of int_bit, invalid_p == 0 */ |
| 2126 | if (gdbarch_debug >= 2) |
| 2127 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
| 2128 | return gdbarch->int_bit; |
| 2129 | } |
| 2130 | |
| 2131 | void |
| 2132 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
| 2133 | int int_bit) |
| 2134 | { |
| 2135 | gdbarch->int_bit = int_bit; |
| 2136 | } |
| 2137 | |
| 2138 | int |
| 2139 | gdbarch_long_bit (struct gdbarch *gdbarch) |
| 2140 | { |
| 2141 | /* Skip verify of long_bit, invalid_p == 0 */ |
| 2142 | if (gdbarch_debug >= 2) |
| 2143 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
| 2144 | return gdbarch->long_bit; |
| 2145 | } |
| 2146 | |
| 2147 | void |
| 2148 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
| 2149 | int long_bit) |
| 2150 | { |
| 2151 | gdbarch->long_bit = long_bit; |
| 2152 | } |
| 2153 | |
| 2154 | int |
| 2155 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
| 2156 | { |
| 2157 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
| 2158 | if (gdbarch_debug >= 2) |
| 2159 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
| 2160 | return gdbarch->long_long_bit; |
| 2161 | } |
| 2162 | |
| 2163 | void |
| 2164 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
| 2165 | int long_long_bit) |
| 2166 | { |
| 2167 | gdbarch->long_long_bit = long_long_bit; |
| 2168 | } |
| 2169 | |
| 2170 | int |
| 2171 | gdbarch_float_bit (struct gdbarch *gdbarch) |
| 2172 | { |
| 2173 | /* Skip verify of float_bit, invalid_p == 0 */ |
| 2174 | if (gdbarch_debug >= 2) |
| 2175 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
| 2176 | return gdbarch->float_bit; |
| 2177 | } |
| 2178 | |
| 2179 | void |
| 2180 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
| 2181 | int float_bit) |
| 2182 | { |
| 2183 | gdbarch->float_bit = float_bit; |
| 2184 | } |
| 2185 | |
| 2186 | int |
| 2187 | gdbarch_double_bit (struct gdbarch *gdbarch) |
| 2188 | { |
| 2189 | /* Skip verify of double_bit, invalid_p == 0 */ |
| 2190 | if (gdbarch_debug >= 2) |
| 2191 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
| 2192 | return gdbarch->double_bit; |
| 2193 | } |
| 2194 | |
| 2195 | void |
| 2196 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
| 2197 | int double_bit) |
| 2198 | { |
| 2199 | gdbarch->double_bit = double_bit; |
| 2200 | } |
| 2201 | |
| 2202 | int |
| 2203 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
| 2204 | { |
| 2205 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
| 2206 | if (gdbarch_debug >= 2) |
| 2207 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
| 2208 | return gdbarch->long_double_bit; |
| 2209 | } |
| 2210 | |
| 2211 | void |
| 2212 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
| 2213 | int long_double_bit) |
| 2214 | { |
| 2215 | gdbarch->long_double_bit = long_double_bit; |
| 2216 | } |
| 2217 | |
| 2218 | int |
| 2219 | gdbarch_ptr_bit (struct gdbarch *gdbarch) |
| 2220 | { |
| 2221 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
| 2222 | if (gdbarch_debug >= 2) |
| 2223 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); |
| 2224 | return gdbarch->ptr_bit; |
| 2225 | } |
| 2226 | |
| 2227 | void |
| 2228 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, |
| 2229 | int ptr_bit) |
| 2230 | { |
| 2231 | gdbarch->ptr_bit = ptr_bit; |
| 2232 | } |
| 2233 | |
| 2234 | int |
| 2235 | gdbarch_addr_bit (struct gdbarch *gdbarch) |
| 2236 | { |
| 2237 | if (gdbarch->addr_bit == 0) |
| 2238 | internal_error (__FILE__, __LINE__, |
| 2239 | "gdbarch: gdbarch_addr_bit invalid"); |
| 2240 | if (gdbarch_debug >= 2) |
| 2241 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); |
| 2242 | return gdbarch->addr_bit; |
| 2243 | } |
| 2244 | |
| 2245 | void |
| 2246 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, |
| 2247 | int addr_bit) |
| 2248 | { |
| 2249 | gdbarch->addr_bit = addr_bit; |
| 2250 | } |
| 2251 | |
| 2252 | int |
| 2253 | gdbarch_bfd_vma_bit (struct gdbarch *gdbarch) |
| 2254 | { |
| 2255 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
| 2256 | if (gdbarch_debug >= 2) |
| 2257 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n"); |
| 2258 | return gdbarch->bfd_vma_bit; |
| 2259 | } |
| 2260 | |
| 2261 | void |
| 2262 | set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, |
| 2263 | int bfd_vma_bit) |
| 2264 | { |
| 2265 | gdbarch->bfd_vma_bit = bfd_vma_bit; |
| 2266 | } |
| 2267 | |
| 2268 | int |
| 2269 | gdbarch_ieee_float (struct gdbarch *gdbarch) |
| 2270 | { |
| 2271 | /* Skip verify of ieee_float, invalid_p == 0 */ |
| 2272 | if (gdbarch_debug >= 2) |
| 2273 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n"); |
| 2274 | return gdbarch->ieee_float; |
| 2275 | } |
| 2276 | |
| 2277 | void |
| 2278 | set_gdbarch_ieee_float (struct gdbarch *gdbarch, |
| 2279 | int ieee_float) |
| 2280 | { |
| 2281 | gdbarch->ieee_float = ieee_float; |
| 2282 | } |
| 2283 | |
| 2284 | CORE_ADDR |
| 2285 | gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid) |
| 2286 | { |
| 2287 | if (gdbarch->read_pc == 0) |
| 2288 | internal_error (__FILE__, __LINE__, |
| 2289 | "gdbarch: gdbarch_read_pc invalid"); |
| 2290 | if (gdbarch_debug >= 2) |
| 2291 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
| 2292 | return gdbarch->read_pc (ptid); |
| 2293 | } |
| 2294 | |
| 2295 | void |
| 2296 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
| 2297 | gdbarch_read_pc_ftype read_pc) |
| 2298 | { |
| 2299 | gdbarch->read_pc = read_pc; |
| 2300 | } |
| 2301 | |
| 2302 | void |
| 2303 | gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid) |
| 2304 | { |
| 2305 | if (gdbarch->write_pc == 0) |
| 2306 | internal_error (__FILE__, __LINE__, |
| 2307 | "gdbarch: gdbarch_write_pc invalid"); |
| 2308 | if (gdbarch_debug >= 2) |
| 2309 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
| 2310 | gdbarch->write_pc (val, ptid); |
| 2311 | } |
| 2312 | |
| 2313 | void |
| 2314 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
| 2315 | gdbarch_write_pc_ftype write_pc) |
| 2316 | { |
| 2317 | gdbarch->write_pc = write_pc; |
| 2318 | } |
| 2319 | |
| 2320 | CORE_ADDR |
| 2321 | gdbarch_read_fp (struct gdbarch *gdbarch) |
| 2322 | { |
| 2323 | if (gdbarch->read_fp == 0) |
| 2324 | internal_error (__FILE__, __LINE__, |
| 2325 | "gdbarch: gdbarch_read_fp invalid"); |
| 2326 | if (gdbarch_debug >= 2) |
| 2327 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n"); |
| 2328 | return gdbarch->read_fp (); |
| 2329 | } |
| 2330 | |
| 2331 | void |
| 2332 | set_gdbarch_read_fp (struct gdbarch *gdbarch, |
| 2333 | gdbarch_read_fp_ftype read_fp) |
| 2334 | { |
| 2335 | gdbarch->read_fp = read_fp; |
| 2336 | } |
| 2337 | |
| 2338 | void |
| 2339 | gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val) |
| 2340 | { |
| 2341 | if (gdbarch->write_fp == 0) |
| 2342 | internal_error (__FILE__, __LINE__, |
| 2343 | "gdbarch: gdbarch_write_fp invalid"); |
| 2344 | if (gdbarch_debug >= 2) |
| 2345 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n"); |
| 2346 | gdbarch->write_fp (val); |
| 2347 | } |
| 2348 | |
| 2349 | void |
| 2350 | set_gdbarch_write_fp (struct gdbarch *gdbarch, |
| 2351 | gdbarch_write_fp_ftype write_fp) |
| 2352 | { |
| 2353 | gdbarch->write_fp = write_fp; |
| 2354 | } |
| 2355 | |
| 2356 | CORE_ADDR |
| 2357 | gdbarch_read_sp (struct gdbarch *gdbarch) |
| 2358 | { |
| 2359 | if (gdbarch->read_sp == 0) |
| 2360 | internal_error (__FILE__, __LINE__, |
| 2361 | "gdbarch: gdbarch_read_sp invalid"); |
| 2362 | if (gdbarch_debug >= 2) |
| 2363 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n"); |
| 2364 | return gdbarch->read_sp (); |
| 2365 | } |
| 2366 | |
| 2367 | void |
| 2368 | set_gdbarch_read_sp (struct gdbarch *gdbarch, |
| 2369 | gdbarch_read_sp_ftype read_sp) |
| 2370 | { |
| 2371 | gdbarch->read_sp = read_sp; |
| 2372 | } |
| 2373 | |
| 2374 | void |
| 2375 | gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val) |
| 2376 | { |
| 2377 | if (gdbarch->write_sp == 0) |
| 2378 | internal_error (__FILE__, __LINE__, |
| 2379 | "gdbarch: gdbarch_write_sp invalid"); |
| 2380 | if (gdbarch_debug >= 2) |
| 2381 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n"); |
| 2382 | gdbarch->write_sp (val); |
| 2383 | } |
| 2384 | |
| 2385 | void |
| 2386 | set_gdbarch_write_sp (struct gdbarch *gdbarch, |
| 2387 | gdbarch_write_sp_ftype write_sp) |
| 2388 | { |
| 2389 | gdbarch->write_sp = write_sp; |
| 2390 | } |
| 2391 | |
| 2392 | void |
| 2393 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) |
| 2394 | { |
| 2395 | if (gdbarch->virtual_frame_pointer == 0) |
| 2396 | internal_error (__FILE__, __LINE__, |
| 2397 | "gdbarch: gdbarch_virtual_frame_pointer invalid"); |
| 2398 | if (gdbarch_debug >= 2) |
| 2399 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); |
| 2400 | gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset); |
| 2401 | } |
| 2402 | |
| 2403 | void |
| 2404 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, |
| 2405 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) |
| 2406 | { |
| 2407 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; |
| 2408 | } |
| 2409 | |
| 2410 | int |
| 2411 | gdbarch_register_read_p (struct gdbarch *gdbarch) |
| 2412 | { |
| 2413 | return gdbarch->register_read != 0; |
| 2414 | } |
| 2415 | |
| 2416 | void |
| 2417 | gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf) |
| 2418 | { |
| 2419 | if (gdbarch->register_read == 0) |
| 2420 | internal_error (__FILE__, __LINE__, |
| 2421 | "gdbarch: gdbarch_register_read invalid"); |
| 2422 | if (gdbarch_debug >= 2) |
| 2423 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n"); |
| 2424 | gdbarch->register_read (gdbarch, regnum, buf); |
| 2425 | } |
| 2426 | |
| 2427 | void |
| 2428 | set_gdbarch_register_read (struct gdbarch *gdbarch, |
| 2429 | gdbarch_register_read_ftype register_read) |
| 2430 | { |
| 2431 | gdbarch->register_read = register_read; |
| 2432 | } |
| 2433 | |
| 2434 | int |
| 2435 | gdbarch_register_write_p (struct gdbarch *gdbarch) |
| 2436 | { |
| 2437 | return gdbarch->register_write != 0; |
| 2438 | } |
| 2439 | |
| 2440 | void |
| 2441 | gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf) |
| 2442 | { |
| 2443 | if (gdbarch->register_write == 0) |
| 2444 | internal_error (__FILE__, __LINE__, |
| 2445 | "gdbarch: gdbarch_register_write invalid"); |
| 2446 | if (gdbarch_debug >= 2) |
| 2447 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n"); |
| 2448 | gdbarch->register_write (gdbarch, regnum, buf); |
| 2449 | } |
| 2450 | |
| 2451 | void |
| 2452 | set_gdbarch_register_write (struct gdbarch *gdbarch, |
| 2453 | gdbarch_register_write_ftype register_write) |
| 2454 | { |
| 2455 | gdbarch->register_write = register_write; |
| 2456 | } |
| 2457 | |
| 2458 | int |
| 2459 | gdbarch_num_regs (struct gdbarch *gdbarch) |
| 2460 | { |
| 2461 | if (gdbarch->num_regs == -1) |
| 2462 | internal_error (__FILE__, __LINE__, |
| 2463 | "gdbarch: gdbarch_num_regs invalid"); |
| 2464 | if (gdbarch_debug >= 2) |
| 2465 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
| 2466 | return gdbarch->num_regs; |
| 2467 | } |
| 2468 | |
| 2469 | void |
| 2470 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
| 2471 | int num_regs) |
| 2472 | { |
| 2473 | gdbarch->num_regs = num_regs; |
| 2474 | } |
| 2475 | |
| 2476 | int |
| 2477 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) |
| 2478 | { |
| 2479 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
| 2480 | if (gdbarch_debug >= 2) |
| 2481 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); |
| 2482 | return gdbarch->num_pseudo_regs; |
| 2483 | } |
| 2484 | |
| 2485 | void |
| 2486 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, |
| 2487 | int num_pseudo_regs) |
| 2488 | { |
| 2489 | gdbarch->num_pseudo_regs = num_pseudo_regs; |
| 2490 | } |
| 2491 | |
| 2492 | int |
| 2493 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
| 2494 | { |
| 2495 | if (gdbarch->sp_regnum == -1) |
| 2496 | internal_error (__FILE__, __LINE__, |
| 2497 | "gdbarch: gdbarch_sp_regnum invalid"); |
| 2498 | if (gdbarch_debug >= 2) |
| 2499 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
| 2500 | return gdbarch->sp_regnum; |
| 2501 | } |
| 2502 | |
| 2503 | void |
| 2504 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
| 2505 | int sp_regnum) |
| 2506 | { |
| 2507 | gdbarch->sp_regnum = sp_regnum; |
| 2508 | } |
| 2509 | |
| 2510 | int |
| 2511 | gdbarch_fp_regnum (struct gdbarch *gdbarch) |
| 2512 | { |
| 2513 | if (gdbarch->fp_regnum == -1) |
| 2514 | internal_error (__FILE__, __LINE__, |
| 2515 | "gdbarch: gdbarch_fp_regnum invalid"); |
| 2516 | if (gdbarch_debug >= 2) |
| 2517 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n"); |
| 2518 | return gdbarch->fp_regnum; |
| 2519 | } |
| 2520 | |
| 2521 | void |
| 2522 | set_gdbarch_fp_regnum (struct gdbarch *gdbarch, |
| 2523 | int fp_regnum) |
| 2524 | { |
| 2525 | gdbarch->fp_regnum = fp_regnum; |
| 2526 | } |
| 2527 | |
| 2528 | int |
| 2529 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
| 2530 | { |
| 2531 | if (gdbarch->pc_regnum == -1) |
| 2532 | internal_error (__FILE__, __LINE__, |
| 2533 | "gdbarch: gdbarch_pc_regnum invalid"); |
| 2534 | if (gdbarch_debug >= 2) |
| 2535 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
| 2536 | return gdbarch->pc_regnum; |
| 2537 | } |
| 2538 | |
| 2539 | void |
| 2540 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
| 2541 | int pc_regnum) |
| 2542 | { |
| 2543 | gdbarch->pc_regnum = pc_regnum; |
| 2544 | } |
| 2545 | |
| 2546 | int |
| 2547 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) |
| 2548 | { |
| 2549 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
| 2550 | if (gdbarch_debug >= 2) |
| 2551 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); |
| 2552 | return gdbarch->fp0_regnum; |
| 2553 | } |
| 2554 | |
| 2555 | void |
| 2556 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, |
| 2557 | int fp0_regnum) |
| 2558 | { |
| 2559 | gdbarch->fp0_regnum = fp0_regnum; |
| 2560 | } |
| 2561 | |
| 2562 | int |
| 2563 | gdbarch_npc_regnum (struct gdbarch *gdbarch) |
| 2564 | { |
| 2565 | /* Skip verify of npc_regnum, invalid_p == 0 */ |
| 2566 | if (gdbarch_debug >= 2) |
| 2567 | fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n"); |
| 2568 | return gdbarch->npc_regnum; |
| 2569 | } |
| 2570 | |
| 2571 | void |
| 2572 | set_gdbarch_npc_regnum (struct gdbarch *gdbarch, |
| 2573 | int npc_regnum) |
| 2574 | { |
| 2575 | gdbarch->npc_regnum = npc_regnum; |
| 2576 | } |
| 2577 | |
| 2578 | int |
| 2579 | gdbarch_nnpc_regnum (struct gdbarch *gdbarch) |
| 2580 | { |
| 2581 | /* Skip verify of nnpc_regnum, invalid_p == 0 */ |
| 2582 | if (gdbarch_debug >= 2) |
| 2583 | fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n"); |
| 2584 | return gdbarch->nnpc_regnum; |
| 2585 | } |
| 2586 | |
| 2587 | void |
| 2588 | set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch, |
| 2589 | int nnpc_regnum) |
| 2590 | { |
| 2591 | gdbarch->nnpc_regnum = nnpc_regnum; |
| 2592 | } |
| 2593 | |
| 2594 | int |
| 2595 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) |
| 2596 | { |
| 2597 | if (gdbarch->stab_reg_to_regnum == 0) |
| 2598 | internal_error (__FILE__, __LINE__, |
| 2599 | "gdbarch: gdbarch_stab_reg_to_regnum invalid"); |
| 2600 | if (gdbarch_debug >= 2) |
| 2601 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); |
| 2602 | return gdbarch->stab_reg_to_regnum (stab_regnr); |
| 2603 | } |
| 2604 | |
| 2605 | void |
| 2606 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, |
| 2607 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) |
| 2608 | { |
| 2609 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; |
| 2610 | } |
| 2611 | |
| 2612 | int |
| 2613 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) |
| 2614 | { |
| 2615 | if (gdbarch->ecoff_reg_to_regnum == 0) |
| 2616 | internal_error (__FILE__, __LINE__, |
| 2617 | "gdbarch: gdbarch_ecoff_reg_to_regnum invalid"); |
| 2618 | if (gdbarch_debug >= 2) |
| 2619 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); |
| 2620 | return gdbarch->ecoff_reg_to_regnum (ecoff_regnr); |
| 2621 | } |
| 2622 | |
| 2623 | void |
| 2624 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, |
| 2625 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) |
| 2626 | { |
| 2627 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; |
| 2628 | } |
| 2629 | |
| 2630 | int |
| 2631 | gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr) |
| 2632 | { |
| 2633 | if (gdbarch->dwarf_reg_to_regnum == 0) |
| 2634 | internal_error (__FILE__, __LINE__, |
| 2635 | "gdbarch: gdbarch_dwarf_reg_to_regnum invalid"); |
| 2636 | if (gdbarch_debug >= 2) |
| 2637 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n"); |
| 2638 | return gdbarch->dwarf_reg_to_regnum (dwarf_regnr); |
| 2639 | } |
| 2640 | |
| 2641 | void |
| 2642 | set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, |
| 2643 | gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum) |
| 2644 | { |
| 2645 | gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum; |
| 2646 | } |
| 2647 | |
| 2648 | int |
| 2649 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) |
| 2650 | { |
| 2651 | if (gdbarch->sdb_reg_to_regnum == 0) |
| 2652 | internal_error (__FILE__, __LINE__, |
| 2653 | "gdbarch: gdbarch_sdb_reg_to_regnum invalid"); |
| 2654 | if (gdbarch_debug >= 2) |
| 2655 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); |
| 2656 | return gdbarch->sdb_reg_to_regnum (sdb_regnr); |
| 2657 | } |
| 2658 | |
| 2659 | void |
| 2660 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, |
| 2661 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) |
| 2662 | { |
| 2663 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; |
| 2664 | } |
| 2665 | |
| 2666 | int |
| 2667 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) |
| 2668 | { |
| 2669 | if (gdbarch->dwarf2_reg_to_regnum == 0) |
| 2670 | internal_error (__FILE__, __LINE__, |
| 2671 | "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid"); |
| 2672 | if (gdbarch_debug >= 2) |
| 2673 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); |
| 2674 | return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr); |
| 2675 | } |
| 2676 | |
| 2677 | void |
| 2678 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, |
| 2679 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) |
| 2680 | { |
| 2681 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; |
| 2682 | } |
| 2683 | |
| 2684 | char * |
| 2685 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) |
| 2686 | { |
| 2687 | if (gdbarch->register_name == 0) |
| 2688 | internal_error (__FILE__, __LINE__, |
| 2689 | "gdbarch: gdbarch_register_name invalid"); |
| 2690 | if (gdbarch_debug >= 2) |
| 2691 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
| 2692 | return gdbarch->register_name (regnr); |
| 2693 | } |
| 2694 | |
| 2695 | void |
| 2696 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
| 2697 | gdbarch_register_name_ftype register_name) |
| 2698 | { |
| 2699 | gdbarch->register_name = register_name; |
| 2700 | } |
| 2701 | |
| 2702 | int |
| 2703 | gdbarch_register_size (struct gdbarch *gdbarch) |
| 2704 | { |
| 2705 | if (gdbarch->register_size == -1) |
| 2706 | internal_error (__FILE__, __LINE__, |
| 2707 | "gdbarch: gdbarch_register_size invalid"); |
| 2708 | if (gdbarch_debug >= 2) |
| 2709 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n"); |
| 2710 | return gdbarch->register_size; |
| 2711 | } |
| 2712 | |
| 2713 | void |
| 2714 | set_gdbarch_register_size (struct gdbarch *gdbarch, |
| 2715 | int register_size) |
| 2716 | { |
| 2717 | gdbarch->register_size = register_size; |
| 2718 | } |
| 2719 | |
| 2720 | int |
| 2721 | gdbarch_register_bytes (struct gdbarch *gdbarch) |
| 2722 | { |
| 2723 | if (gdbarch->register_bytes == -1) |
| 2724 | internal_error (__FILE__, __LINE__, |
| 2725 | "gdbarch: gdbarch_register_bytes invalid"); |
| 2726 | if (gdbarch_debug >= 2) |
| 2727 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n"); |
| 2728 | return gdbarch->register_bytes; |
| 2729 | } |
| 2730 | |
| 2731 | void |
| 2732 | set_gdbarch_register_bytes (struct gdbarch *gdbarch, |
| 2733 | int register_bytes) |
| 2734 | { |
| 2735 | gdbarch->register_bytes = register_bytes; |
| 2736 | } |
| 2737 | |
| 2738 | int |
| 2739 | gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr) |
| 2740 | { |
| 2741 | if (gdbarch->register_byte == 0) |
| 2742 | internal_error (__FILE__, __LINE__, |
| 2743 | "gdbarch: gdbarch_register_byte invalid"); |
| 2744 | if (gdbarch_debug >= 2) |
| 2745 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n"); |
| 2746 | return gdbarch->register_byte (reg_nr); |
| 2747 | } |
| 2748 | |
| 2749 | void |
| 2750 | set_gdbarch_register_byte (struct gdbarch *gdbarch, |
| 2751 | gdbarch_register_byte_ftype register_byte) |
| 2752 | { |
| 2753 | gdbarch->register_byte = register_byte; |
| 2754 | } |
| 2755 | |
| 2756 | int |
| 2757 | gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr) |
| 2758 | { |
| 2759 | if (gdbarch->register_raw_size == 0) |
| 2760 | internal_error (__FILE__, __LINE__, |
| 2761 | "gdbarch: gdbarch_register_raw_size invalid"); |
| 2762 | if (gdbarch_debug >= 2) |
| 2763 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n"); |
| 2764 | return gdbarch->register_raw_size (reg_nr); |
| 2765 | } |
| 2766 | |
| 2767 | void |
| 2768 | set_gdbarch_register_raw_size (struct gdbarch *gdbarch, |
| 2769 | gdbarch_register_raw_size_ftype register_raw_size) |
| 2770 | { |
| 2771 | gdbarch->register_raw_size = register_raw_size; |
| 2772 | } |
| 2773 | |
| 2774 | int |
| 2775 | gdbarch_max_register_raw_size (struct gdbarch *gdbarch) |
| 2776 | { |
| 2777 | if (gdbarch->max_register_raw_size == -1) |
| 2778 | internal_error (__FILE__, __LINE__, |
| 2779 | "gdbarch: gdbarch_max_register_raw_size invalid"); |
| 2780 | if (gdbarch_debug >= 2) |
| 2781 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n"); |
| 2782 | return gdbarch->max_register_raw_size; |
| 2783 | } |
| 2784 | |
| 2785 | void |
| 2786 | set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, |
| 2787 | int max_register_raw_size) |
| 2788 | { |
| 2789 | gdbarch->max_register_raw_size = max_register_raw_size; |
| 2790 | } |
| 2791 | |
| 2792 | int |
| 2793 | gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr) |
| 2794 | { |
| 2795 | if (gdbarch->register_virtual_size == 0) |
| 2796 | internal_error (__FILE__, __LINE__, |
| 2797 | "gdbarch: gdbarch_register_virtual_size invalid"); |
| 2798 | if (gdbarch_debug >= 2) |
| 2799 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n"); |
| 2800 | return gdbarch->register_virtual_size (reg_nr); |
| 2801 | } |
| 2802 | |
| 2803 | void |
| 2804 | set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, |
| 2805 | gdbarch_register_virtual_size_ftype register_virtual_size) |
| 2806 | { |
| 2807 | gdbarch->register_virtual_size = register_virtual_size; |
| 2808 | } |
| 2809 | |
| 2810 | int |
| 2811 | gdbarch_max_register_virtual_size (struct gdbarch *gdbarch) |
| 2812 | { |
| 2813 | if (gdbarch->max_register_virtual_size == -1) |
| 2814 | internal_error (__FILE__, __LINE__, |
| 2815 | "gdbarch: gdbarch_max_register_virtual_size invalid"); |
| 2816 | if (gdbarch_debug >= 2) |
| 2817 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n"); |
| 2818 | return gdbarch->max_register_virtual_size; |
| 2819 | } |
| 2820 | |
| 2821 | void |
| 2822 | set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, |
| 2823 | int max_register_virtual_size) |
| 2824 | { |
| 2825 | gdbarch->max_register_virtual_size = max_register_virtual_size; |
| 2826 | } |
| 2827 | |
| 2828 | struct type * |
| 2829 | gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr) |
| 2830 | { |
| 2831 | if (gdbarch->register_virtual_type == 0) |
| 2832 | internal_error (__FILE__, __LINE__, |
| 2833 | "gdbarch: gdbarch_register_virtual_type invalid"); |
| 2834 | if (gdbarch_debug >= 2) |
| 2835 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n"); |
| 2836 | return gdbarch->register_virtual_type (reg_nr); |
| 2837 | } |
| 2838 | |
| 2839 | void |
| 2840 | set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, |
| 2841 | gdbarch_register_virtual_type_ftype register_virtual_type) |
| 2842 | { |
| 2843 | gdbarch->register_virtual_type = register_virtual_type; |
| 2844 | } |
| 2845 | |
| 2846 | void |
| 2847 | gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) |
| 2848 | { |
| 2849 | if (gdbarch->do_registers_info == 0) |
| 2850 | internal_error (__FILE__, __LINE__, |
| 2851 | "gdbarch: gdbarch_do_registers_info invalid"); |
| 2852 | if (gdbarch_debug >= 2) |
| 2853 | fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n"); |
| 2854 | gdbarch->do_registers_info (reg_nr, fpregs); |
| 2855 | } |
| 2856 | |
| 2857 | void |
| 2858 | set_gdbarch_do_registers_info (struct gdbarch *gdbarch, |
| 2859 | gdbarch_do_registers_info_ftype do_registers_info) |
| 2860 | { |
| 2861 | gdbarch->do_registers_info = do_registers_info; |
| 2862 | } |
| 2863 | |
| 2864 | int |
| 2865 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) |
| 2866 | { |
| 2867 | if (gdbarch->register_sim_regno == 0) |
| 2868 | internal_error (__FILE__, __LINE__, |
| 2869 | "gdbarch: gdbarch_register_sim_regno invalid"); |
| 2870 | if (gdbarch_debug >= 2) |
| 2871 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); |
| 2872 | return gdbarch->register_sim_regno (reg_nr); |
| 2873 | } |
| 2874 | |
| 2875 | void |
| 2876 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, |
| 2877 | gdbarch_register_sim_regno_ftype register_sim_regno) |
| 2878 | { |
| 2879 | gdbarch->register_sim_regno = register_sim_regno; |
| 2880 | } |
| 2881 | |
| 2882 | int |
| 2883 | gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch) |
| 2884 | { |
| 2885 | return gdbarch->register_bytes_ok != 0; |
| 2886 | } |
| 2887 | |
| 2888 | int |
| 2889 | gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes) |
| 2890 | { |
| 2891 | if (gdbarch->register_bytes_ok == 0) |
| 2892 | internal_error (__FILE__, __LINE__, |
| 2893 | "gdbarch: gdbarch_register_bytes_ok invalid"); |
| 2894 | if (gdbarch_debug >= 2) |
| 2895 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n"); |
| 2896 | return gdbarch->register_bytes_ok (nr_bytes); |
| 2897 | } |
| 2898 | |
| 2899 | void |
| 2900 | set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, |
| 2901 | gdbarch_register_bytes_ok_ftype register_bytes_ok) |
| 2902 | { |
| 2903 | gdbarch->register_bytes_ok = register_bytes_ok; |
| 2904 | } |
| 2905 | |
| 2906 | int |
| 2907 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
| 2908 | { |
| 2909 | if (gdbarch->cannot_fetch_register == 0) |
| 2910 | internal_error (__FILE__, __LINE__, |
| 2911 | "gdbarch: gdbarch_cannot_fetch_register invalid"); |
| 2912 | if (gdbarch_debug >= 2) |
| 2913 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); |
| 2914 | return gdbarch->cannot_fetch_register (regnum); |
| 2915 | } |
| 2916 | |
| 2917 | void |
| 2918 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, |
| 2919 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) |
| 2920 | { |
| 2921 | gdbarch->cannot_fetch_register = cannot_fetch_register; |
| 2922 | } |
| 2923 | |
| 2924 | int |
| 2925 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
| 2926 | { |
| 2927 | if (gdbarch->cannot_store_register == 0) |
| 2928 | internal_error (__FILE__, __LINE__, |
| 2929 | "gdbarch: gdbarch_cannot_store_register invalid"); |
| 2930 | if (gdbarch_debug >= 2) |
| 2931 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); |
| 2932 | return gdbarch->cannot_store_register (regnum); |
| 2933 | } |
| 2934 | |
| 2935 | void |
| 2936 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, |
| 2937 | gdbarch_cannot_store_register_ftype cannot_store_register) |
| 2938 | { |
| 2939 | gdbarch->cannot_store_register = cannot_store_register; |
| 2940 | } |
| 2941 | |
| 2942 | int |
| 2943 | gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch) |
| 2944 | { |
| 2945 | if (gdbarch->use_generic_dummy_frames == -1) |
| 2946 | internal_error (__FILE__, __LINE__, |
| 2947 | "gdbarch: gdbarch_use_generic_dummy_frames invalid"); |
| 2948 | if (gdbarch_debug >= 2) |
| 2949 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n"); |
| 2950 | return gdbarch->use_generic_dummy_frames; |
| 2951 | } |
| 2952 | |
| 2953 | void |
| 2954 | set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch, |
| 2955 | int use_generic_dummy_frames) |
| 2956 | { |
| 2957 | gdbarch->use_generic_dummy_frames = use_generic_dummy_frames; |
| 2958 | } |
| 2959 | |
| 2960 | int |
| 2961 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
| 2962 | { |
| 2963 | if (gdbarch->call_dummy_location == 0) |
| 2964 | internal_error (__FILE__, __LINE__, |
| 2965 | "gdbarch: gdbarch_call_dummy_location invalid"); |
| 2966 | if (gdbarch_debug >= 2) |
| 2967 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); |
| 2968 | return gdbarch->call_dummy_location; |
| 2969 | } |
| 2970 | |
| 2971 | void |
| 2972 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, |
| 2973 | int call_dummy_location) |
| 2974 | { |
| 2975 | gdbarch->call_dummy_location = call_dummy_location; |
| 2976 | } |
| 2977 | |
| 2978 | CORE_ADDR |
| 2979 | gdbarch_call_dummy_address (struct gdbarch *gdbarch) |
| 2980 | { |
| 2981 | if (gdbarch->call_dummy_address == 0) |
| 2982 | internal_error (__FILE__, __LINE__, |
| 2983 | "gdbarch: gdbarch_call_dummy_address invalid"); |
| 2984 | if (gdbarch_debug >= 2) |
| 2985 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n"); |
| 2986 | return gdbarch->call_dummy_address (); |
| 2987 | } |
| 2988 | |
| 2989 | void |
| 2990 | set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, |
| 2991 | gdbarch_call_dummy_address_ftype call_dummy_address) |
| 2992 | { |
| 2993 | gdbarch->call_dummy_address = call_dummy_address; |
| 2994 | } |
| 2995 | |
| 2996 | CORE_ADDR |
| 2997 | gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch) |
| 2998 | { |
| 2999 | if (gdbarch->call_dummy_start_offset == -1) |
| 3000 | internal_error (__FILE__, __LINE__, |
| 3001 | "gdbarch: gdbarch_call_dummy_start_offset invalid"); |
| 3002 | if (gdbarch_debug >= 2) |
| 3003 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n"); |
| 3004 | return gdbarch->call_dummy_start_offset; |
| 3005 | } |
| 3006 | |
| 3007 | void |
| 3008 | set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, |
| 3009 | CORE_ADDR call_dummy_start_offset) |
| 3010 | { |
| 3011 | gdbarch->call_dummy_start_offset = call_dummy_start_offset; |
| 3012 | } |
| 3013 | |
| 3014 | CORE_ADDR |
| 3015 | gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) |
| 3016 | { |
| 3017 | if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1) |
| 3018 | internal_error (__FILE__, __LINE__, |
| 3019 | "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid"); |
| 3020 | if (gdbarch_debug >= 2) |
| 3021 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n"); |
| 3022 | return gdbarch->call_dummy_breakpoint_offset; |
| 3023 | } |
| 3024 | |
| 3025 | void |
| 3026 | set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, |
| 3027 | CORE_ADDR call_dummy_breakpoint_offset) |
| 3028 | { |
| 3029 | gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset; |
| 3030 | } |
| 3031 | |
| 3032 | int |
| 3033 | gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch) |
| 3034 | { |
| 3035 | if (gdbarch->call_dummy_breakpoint_offset_p == -1) |
| 3036 | internal_error (__FILE__, __LINE__, |
| 3037 | "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid"); |
| 3038 | if (gdbarch_debug >= 2) |
| 3039 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n"); |
| 3040 | return gdbarch->call_dummy_breakpoint_offset_p; |
| 3041 | } |
| 3042 | |
| 3043 | void |
| 3044 | set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, |
| 3045 | int call_dummy_breakpoint_offset_p) |
| 3046 | { |
| 3047 | gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p; |
| 3048 | } |
| 3049 | |
| 3050 | int |
| 3051 | gdbarch_call_dummy_length (struct gdbarch *gdbarch) |
| 3052 | { |
| 3053 | if (gdbarch->call_dummy_length == -1) |
| 3054 | internal_error (__FILE__, __LINE__, |
| 3055 | "gdbarch: gdbarch_call_dummy_length invalid"); |
| 3056 | if (gdbarch_debug >= 2) |
| 3057 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n"); |
| 3058 | return gdbarch->call_dummy_length; |
| 3059 | } |
| 3060 | |
| 3061 | void |
| 3062 | set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, |
| 3063 | int call_dummy_length) |
| 3064 | { |
| 3065 | gdbarch->call_dummy_length = call_dummy_length; |
| 3066 | } |
| 3067 | |
| 3068 | int |
| 3069 | gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address) |
| 3070 | { |
| 3071 | if (gdbarch->pc_in_call_dummy == 0) |
| 3072 | internal_error (__FILE__, __LINE__, |
| 3073 | "gdbarch: gdbarch_pc_in_call_dummy invalid"); |
| 3074 | if (gdbarch_debug >= 2) |
| 3075 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n"); |
| 3076 | return gdbarch->pc_in_call_dummy (pc, sp, frame_address); |
| 3077 | } |
| 3078 | |
| 3079 | void |
| 3080 | set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, |
| 3081 | gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy) |
| 3082 | { |
| 3083 | gdbarch->pc_in_call_dummy = pc_in_call_dummy; |
| 3084 | } |
| 3085 | |
| 3086 | int |
| 3087 | gdbarch_call_dummy_p (struct gdbarch *gdbarch) |
| 3088 | { |
| 3089 | if (gdbarch->call_dummy_p == -1) |
| 3090 | internal_error (__FILE__, __LINE__, |
| 3091 | "gdbarch: gdbarch_call_dummy_p invalid"); |
| 3092 | if (gdbarch_debug >= 2) |
| 3093 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n"); |
| 3094 | return gdbarch->call_dummy_p; |
| 3095 | } |
| 3096 | |
| 3097 | void |
| 3098 | set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, |
| 3099 | int call_dummy_p) |
| 3100 | { |
| 3101 | gdbarch->call_dummy_p = call_dummy_p; |
| 3102 | } |
| 3103 | |
| 3104 | LONGEST * |
| 3105 | gdbarch_call_dummy_words (struct gdbarch *gdbarch) |
| 3106 | { |
| 3107 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
| 3108 | if (gdbarch_debug >= 2) |
| 3109 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n"); |
| 3110 | return gdbarch->call_dummy_words; |
| 3111 | } |
| 3112 | |
| 3113 | void |
| 3114 | set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, |
| 3115 | LONGEST * call_dummy_words) |
| 3116 | { |
| 3117 | gdbarch->call_dummy_words = call_dummy_words; |
| 3118 | } |
| 3119 | |
| 3120 | int |
| 3121 | gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch) |
| 3122 | { |
| 3123 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ |
| 3124 | if (gdbarch_debug >= 2) |
| 3125 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n"); |
| 3126 | return gdbarch->sizeof_call_dummy_words; |
| 3127 | } |
| 3128 | |
| 3129 | void |
| 3130 | set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, |
| 3131 | int sizeof_call_dummy_words) |
| 3132 | { |
| 3133 | gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words; |
| 3134 | } |
| 3135 | |
| 3136 | int |
| 3137 | gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch) |
| 3138 | { |
| 3139 | if (gdbarch->call_dummy_stack_adjust_p == -1) |
| 3140 | internal_error (__FILE__, __LINE__, |
| 3141 | "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid"); |
| 3142 | if (gdbarch_debug >= 2) |
| 3143 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n"); |
| 3144 | return gdbarch->call_dummy_stack_adjust_p; |
| 3145 | } |
| 3146 | |
| 3147 | void |
| 3148 | set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, |
| 3149 | int call_dummy_stack_adjust_p) |
| 3150 | { |
| 3151 | gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p; |
| 3152 | } |
| 3153 | |
| 3154 | int |
| 3155 | gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch) |
| 3156 | { |
| 3157 | if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0) |
| 3158 | internal_error (__FILE__, __LINE__, |
| 3159 | "gdbarch: gdbarch_call_dummy_stack_adjust invalid"); |
| 3160 | if (gdbarch_debug >= 2) |
| 3161 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n"); |
| 3162 | return gdbarch->call_dummy_stack_adjust; |
| 3163 | } |
| 3164 | |
| 3165 | void |
| 3166 | set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, |
| 3167 | int call_dummy_stack_adjust) |
| 3168 | { |
| 3169 | gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust; |
| 3170 | } |
| 3171 | |
| 3172 | void |
| 3173 | 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) |
| 3174 | { |
| 3175 | if (gdbarch->fix_call_dummy == 0) |
| 3176 | internal_error (__FILE__, __LINE__, |
| 3177 | "gdbarch: gdbarch_fix_call_dummy invalid"); |
| 3178 | if (gdbarch_debug >= 2) |
| 3179 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n"); |
| 3180 | gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p); |
| 3181 | } |
| 3182 | |
| 3183 | void |
| 3184 | set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, |
| 3185 | gdbarch_fix_call_dummy_ftype fix_call_dummy) |
| 3186 | { |
| 3187 | gdbarch->fix_call_dummy = fix_call_dummy; |
| 3188 | } |
| 3189 | |
| 3190 | void |
| 3191 | gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) |
| 3192 | { |
| 3193 | if (gdbarch->init_frame_pc_first == 0) |
| 3194 | internal_error (__FILE__, __LINE__, |
| 3195 | "gdbarch: gdbarch_init_frame_pc_first invalid"); |
| 3196 | if (gdbarch_debug >= 2) |
| 3197 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n"); |
| 3198 | gdbarch->init_frame_pc_first (fromleaf, prev); |
| 3199 | } |
| 3200 | |
| 3201 | void |
| 3202 | set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, |
| 3203 | gdbarch_init_frame_pc_first_ftype init_frame_pc_first) |
| 3204 | { |
| 3205 | gdbarch->init_frame_pc_first = init_frame_pc_first; |
| 3206 | } |
| 3207 | |
| 3208 | void |
| 3209 | gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) |
| 3210 | { |
| 3211 | if (gdbarch->init_frame_pc == 0) |
| 3212 | internal_error (__FILE__, __LINE__, |
| 3213 | "gdbarch: gdbarch_init_frame_pc invalid"); |
| 3214 | if (gdbarch_debug >= 2) |
| 3215 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n"); |
| 3216 | gdbarch->init_frame_pc (fromleaf, prev); |
| 3217 | } |
| 3218 | |
| 3219 | void |
| 3220 | set_gdbarch_init_frame_pc (struct gdbarch *gdbarch, |
| 3221 | gdbarch_init_frame_pc_ftype init_frame_pc) |
| 3222 | { |
| 3223 | gdbarch->init_frame_pc = init_frame_pc; |
| 3224 | } |
| 3225 | |
| 3226 | int |
| 3227 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
| 3228 | { |
| 3229 | if (gdbarch_debug >= 2) |
| 3230 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
| 3231 | return gdbarch->believe_pcc_promotion; |
| 3232 | } |
| 3233 | |
| 3234 | void |
| 3235 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
| 3236 | int believe_pcc_promotion) |
| 3237 | { |
| 3238 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; |
| 3239 | } |
| 3240 | |
| 3241 | int |
| 3242 | gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch) |
| 3243 | { |
| 3244 | if (gdbarch_debug >= 2) |
| 3245 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n"); |
| 3246 | return gdbarch->believe_pcc_promotion_type; |
| 3247 | } |
| 3248 | |
| 3249 | void |
| 3250 | set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, |
| 3251 | int believe_pcc_promotion_type) |
| 3252 | { |
| 3253 | gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type; |
| 3254 | } |
| 3255 | |
| 3256 | int |
| 3257 | gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual) |
| 3258 | { |
| 3259 | if (gdbarch->coerce_float_to_double == 0) |
| 3260 | internal_error (__FILE__, __LINE__, |
| 3261 | "gdbarch: gdbarch_coerce_float_to_double invalid"); |
| 3262 | if (gdbarch_debug >= 2) |
| 3263 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n"); |
| 3264 | return gdbarch->coerce_float_to_double (formal, actual); |
| 3265 | } |
| 3266 | |
| 3267 | void |
| 3268 | set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, |
| 3269 | gdbarch_coerce_float_to_double_ftype coerce_float_to_double) |
| 3270 | { |
| 3271 | gdbarch->coerce_float_to_double = coerce_float_to_double; |
| 3272 | } |
| 3273 | |
| 3274 | void |
| 3275 | 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) |
| 3276 | { |
| 3277 | if (gdbarch->get_saved_register == 0) |
| 3278 | internal_error (__FILE__, __LINE__, |
| 3279 | "gdbarch: gdbarch_get_saved_register invalid"); |
| 3280 | if (gdbarch_debug >= 2) |
| 3281 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n"); |
| 3282 | gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval); |
| 3283 | } |
| 3284 | |
| 3285 | void |
| 3286 | set_gdbarch_get_saved_register (struct gdbarch *gdbarch, |
| 3287 | gdbarch_get_saved_register_ftype get_saved_register) |
| 3288 | { |
| 3289 | gdbarch->get_saved_register = get_saved_register; |
| 3290 | } |
| 3291 | |
| 3292 | int |
| 3293 | gdbarch_register_convertible (struct gdbarch *gdbarch, int nr) |
| 3294 | { |
| 3295 | if (gdbarch->register_convertible == 0) |
| 3296 | internal_error (__FILE__, __LINE__, |
| 3297 | "gdbarch: gdbarch_register_convertible invalid"); |
| 3298 | if (gdbarch_debug >= 2) |
| 3299 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n"); |
| 3300 | return gdbarch->register_convertible (nr); |
| 3301 | } |
| 3302 | |
| 3303 | void |
| 3304 | set_gdbarch_register_convertible (struct gdbarch *gdbarch, |
| 3305 | gdbarch_register_convertible_ftype register_convertible) |
| 3306 | { |
| 3307 | gdbarch->register_convertible = register_convertible; |
| 3308 | } |
| 3309 | |
| 3310 | void |
| 3311 | gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) |
| 3312 | { |
| 3313 | if (gdbarch->register_convert_to_virtual == 0) |
| 3314 | internal_error (__FILE__, __LINE__, |
| 3315 | "gdbarch: gdbarch_register_convert_to_virtual invalid"); |
| 3316 | if (gdbarch_debug >= 2) |
| 3317 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n"); |
| 3318 | gdbarch->register_convert_to_virtual (regnum, type, from, to); |
| 3319 | } |
| 3320 | |
| 3321 | void |
| 3322 | set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, |
| 3323 | gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual) |
| 3324 | { |
| 3325 | gdbarch->register_convert_to_virtual = register_convert_to_virtual; |
| 3326 | } |
| 3327 | |
| 3328 | void |
| 3329 | gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to) |
| 3330 | { |
| 3331 | if (gdbarch->register_convert_to_raw == 0) |
| 3332 | internal_error (__FILE__, __LINE__, |
| 3333 | "gdbarch: gdbarch_register_convert_to_raw invalid"); |
| 3334 | if (gdbarch_debug >= 2) |
| 3335 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n"); |
| 3336 | gdbarch->register_convert_to_raw (type, regnum, from, to); |
| 3337 | } |
| 3338 | |
| 3339 | void |
| 3340 | set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, |
| 3341 | gdbarch_register_convert_to_raw_ftype register_convert_to_raw) |
| 3342 | { |
| 3343 | gdbarch->register_convert_to_raw = register_convert_to_raw; |
| 3344 | } |
| 3345 | |
| 3346 | int |
| 3347 | gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch) |
| 3348 | { |
| 3349 | return gdbarch->fetch_pseudo_register != 0; |
| 3350 | } |
| 3351 | |
| 3352 | void |
| 3353 | gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum) |
| 3354 | { |
| 3355 | if (gdbarch->fetch_pseudo_register == 0) |
| 3356 | internal_error (__FILE__, __LINE__, |
| 3357 | "gdbarch: gdbarch_fetch_pseudo_register invalid"); |
| 3358 | if (gdbarch_debug >= 2) |
| 3359 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n"); |
| 3360 | gdbarch->fetch_pseudo_register (regnum); |
| 3361 | } |
| 3362 | |
| 3363 | void |
| 3364 | set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, |
| 3365 | gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register) |
| 3366 | { |
| 3367 | gdbarch->fetch_pseudo_register = fetch_pseudo_register; |
| 3368 | } |
| 3369 | |
| 3370 | int |
| 3371 | gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch) |
| 3372 | { |
| 3373 | return gdbarch->store_pseudo_register != 0; |
| 3374 | } |
| 3375 | |
| 3376 | void |
| 3377 | gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum) |
| 3378 | { |
| 3379 | if (gdbarch->store_pseudo_register == 0) |
| 3380 | internal_error (__FILE__, __LINE__, |
| 3381 | "gdbarch: gdbarch_store_pseudo_register invalid"); |
| 3382 | if (gdbarch_debug >= 2) |
| 3383 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n"); |
| 3384 | gdbarch->store_pseudo_register (regnum); |
| 3385 | } |
| 3386 | |
| 3387 | void |
| 3388 | set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch, |
| 3389 | gdbarch_store_pseudo_register_ftype store_pseudo_register) |
| 3390 | { |
| 3391 | gdbarch->store_pseudo_register = store_pseudo_register; |
| 3392 | } |
| 3393 | |
| 3394 | CORE_ADDR |
| 3395 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) |
| 3396 | { |
| 3397 | if (gdbarch->pointer_to_address == 0) |
| 3398 | internal_error (__FILE__, __LINE__, |
| 3399 | "gdbarch: gdbarch_pointer_to_address invalid"); |
| 3400 | if (gdbarch_debug >= 2) |
| 3401 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); |
| 3402 | return gdbarch->pointer_to_address (type, buf); |
| 3403 | } |
| 3404 | |
| 3405 | void |
| 3406 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, |
| 3407 | gdbarch_pointer_to_address_ftype pointer_to_address) |
| 3408 | { |
| 3409 | gdbarch->pointer_to_address = pointer_to_address; |
| 3410 | } |
| 3411 | |
| 3412 | void |
| 3413 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr) |
| 3414 | { |
| 3415 | if (gdbarch->address_to_pointer == 0) |
| 3416 | internal_error (__FILE__, __LINE__, |
| 3417 | "gdbarch: gdbarch_address_to_pointer invalid"); |
| 3418 | if (gdbarch_debug >= 2) |
| 3419 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); |
| 3420 | gdbarch->address_to_pointer (type, buf, addr); |
| 3421 | } |
| 3422 | |
| 3423 | void |
| 3424 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, |
| 3425 | gdbarch_address_to_pointer_ftype address_to_pointer) |
| 3426 | { |
| 3427 | gdbarch->address_to_pointer = address_to_pointer; |
| 3428 | } |
| 3429 | |
| 3430 | int |
| 3431 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) |
| 3432 | { |
| 3433 | return gdbarch->integer_to_address != 0; |
| 3434 | } |
| 3435 | |
| 3436 | CORE_ADDR |
| 3437 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) |
| 3438 | { |
| 3439 | if (gdbarch->integer_to_address == 0) |
| 3440 | internal_error (__FILE__, __LINE__, |
| 3441 | "gdbarch: gdbarch_integer_to_address invalid"); |
| 3442 | if (gdbarch_debug >= 2) |
| 3443 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); |
| 3444 | return gdbarch->integer_to_address (type, buf); |
| 3445 | } |
| 3446 | |
| 3447 | void |
| 3448 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, |
| 3449 | gdbarch_integer_to_address_ftype integer_to_address) |
| 3450 | { |
| 3451 | gdbarch->integer_to_address = integer_to_address; |
| 3452 | } |
| 3453 | |
| 3454 | int |
| 3455 | gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type) |
| 3456 | { |
| 3457 | if (gdbarch->return_value_on_stack == 0) |
| 3458 | internal_error (__FILE__, __LINE__, |
| 3459 | "gdbarch: gdbarch_return_value_on_stack invalid"); |
| 3460 | if (gdbarch_debug >= 2) |
| 3461 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n"); |
| 3462 | return gdbarch->return_value_on_stack (type); |
| 3463 | } |
| 3464 | |
| 3465 | void |
| 3466 | set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, |
| 3467 | gdbarch_return_value_on_stack_ftype return_value_on_stack) |
| 3468 | { |
| 3469 | gdbarch->return_value_on_stack = return_value_on_stack; |
| 3470 | } |
| 3471 | |
| 3472 | void |
| 3473 | gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) |
| 3474 | { |
| 3475 | if (gdbarch->extract_return_value == 0) |
| 3476 | internal_error (__FILE__, __LINE__, |
| 3477 | "gdbarch: gdbarch_extract_return_value invalid"); |
| 3478 | if (gdbarch_debug >= 2) |
| 3479 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n"); |
| 3480 | gdbarch->extract_return_value (type, regbuf, valbuf); |
| 3481 | } |
| 3482 | |
| 3483 | void |
| 3484 | set_gdbarch_extract_return_value (struct gdbarch *gdbarch, |
| 3485 | gdbarch_extract_return_value_ftype extract_return_value) |
| 3486 | { |
| 3487 | gdbarch->extract_return_value = extract_return_value; |
| 3488 | } |
| 3489 | |
| 3490 | CORE_ADDR |
| 3491 | gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) |
| 3492 | { |
| 3493 | if (gdbarch->push_arguments == 0) |
| 3494 | internal_error (__FILE__, __LINE__, |
| 3495 | "gdbarch: gdbarch_push_arguments invalid"); |
| 3496 | if (gdbarch_debug >= 2) |
| 3497 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n"); |
| 3498 | return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr); |
| 3499 | } |
| 3500 | |
| 3501 | void |
| 3502 | set_gdbarch_push_arguments (struct gdbarch *gdbarch, |
| 3503 | gdbarch_push_arguments_ftype push_arguments) |
| 3504 | { |
| 3505 | gdbarch->push_arguments = push_arguments; |
| 3506 | } |
| 3507 | |
| 3508 | void |
| 3509 | gdbarch_push_dummy_frame (struct gdbarch *gdbarch) |
| 3510 | { |
| 3511 | if (gdbarch->push_dummy_frame == 0) |
| 3512 | internal_error (__FILE__, __LINE__, |
| 3513 | "gdbarch: gdbarch_push_dummy_frame invalid"); |
| 3514 | if (gdbarch_debug >= 2) |
| 3515 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n"); |
| 3516 | gdbarch->push_dummy_frame (); |
| 3517 | } |
| 3518 | |
| 3519 | void |
| 3520 | set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, |
| 3521 | gdbarch_push_dummy_frame_ftype push_dummy_frame) |
| 3522 | { |
| 3523 | gdbarch->push_dummy_frame = push_dummy_frame; |
| 3524 | } |
| 3525 | |
| 3526 | int |
| 3527 | gdbarch_push_return_address_p (struct gdbarch *gdbarch) |
| 3528 | { |
| 3529 | return gdbarch->push_return_address != 0; |
| 3530 | } |
| 3531 | |
| 3532 | CORE_ADDR |
| 3533 | gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp) |
| 3534 | { |
| 3535 | if (gdbarch->push_return_address == 0) |
| 3536 | internal_error (__FILE__, __LINE__, |
| 3537 | "gdbarch: gdbarch_push_return_address invalid"); |
| 3538 | if (gdbarch_debug >= 2) |
| 3539 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n"); |
| 3540 | return gdbarch->push_return_address (pc, sp); |
| 3541 | } |
| 3542 | |
| 3543 | void |
| 3544 | set_gdbarch_push_return_address (struct gdbarch *gdbarch, |
| 3545 | gdbarch_push_return_address_ftype push_return_address) |
| 3546 | { |
| 3547 | gdbarch->push_return_address = push_return_address; |
| 3548 | } |
| 3549 | |
| 3550 | void |
| 3551 | gdbarch_pop_frame (struct gdbarch *gdbarch) |
| 3552 | { |
| 3553 | if (gdbarch->pop_frame == 0) |
| 3554 | internal_error (__FILE__, __LINE__, |
| 3555 | "gdbarch: gdbarch_pop_frame invalid"); |
| 3556 | if (gdbarch_debug >= 2) |
| 3557 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n"); |
| 3558 | gdbarch->pop_frame (); |
| 3559 | } |
| 3560 | |
| 3561 | void |
| 3562 | set_gdbarch_pop_frame (struct gdbarch *gdbarch, |
| 3563 | gdbarch_pop_frame_ftype pop_frame) |
| 3564 | { |
| 3565 | gdbarch->pop_frame = pop_frame; |
| 3566 | } |
| 3567 | |
| 3568 | void |
| 3569 | gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp) |
| 3570 | { |
| 3571 | if (gdbarch->store_struct_return == 0) |
| 3572 | internal_error (__FILE__, __LINE__, |
| 3573 | "gdbarch: gdbarch_store_struct_return invalid"); |
| 3574 | if (gdbarch_debug >= 2) |
| 3575 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n"); |
| 3576 | gdbarch->store_struct_return (addr, sp); |
| 3577 | } |
| 3578 | |
| 3579 | void |
| 3580 | set_gdbarch_store_struct_return (struct gdbarch *gdbarch, |
| 3581 | gdbarch_store_struct_return_ftype store_struct_return) |
| 3582 | { |
| 3583 | gdbarch->store_struct_return = store_struct_return; |
| 3584 | } |
| 3585 | |
| 3586 | void |
| 3587 | gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf) |
| 3588 | { |
| 3589 | if (gdbarch->store_return_value == 0) |
| 3590 | internal_error (__FILE__, __LINE__, |
| 3591 | "gdbarch: gdbarch_store_return_value invalid"); |
| 3592 | if (gdbarch_debug >= 2) |
| 3593 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n"); |
| 3594 | gdbarch->store_return_value (type, valbuf); |
| 3595 | } |
| 3596 | |
| 3597 | void |
| 3598 | set_gdbarch_store_return_value (struct gdbarch *gdbarch, |
| 3599 | gdbarch_store_return_value_ftype store_return_value) |
| 3600 | { |
| 3601 | gdbarch->store_return_value = store_return_value; |
| 3602 | } |
| 3603 | |
| 3604 | int |
| 3605 | gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch) |
| 3606 | { |
| 3607 | return gdbarch->extract_struct_value_address != 0; |
| 3608 | } |
| 3609 | |
| 3610 | CORE_ADDR |
| 3611 | gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf) |
| 3612 | { |
| 3613 | if (gdbarch->extract_struct_value_address == 0) |
| 3614 | internal_error (__FILE__, __LINE__, |
| 3615 | "gdbarch: gdbarch_extract_struct_value_address invalid"); |
| 3616 | if (gdbarch_debug >= 2) |
| 3617 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n"); |
| 3618 | return gdbarch->extract_struct_value_address (regbuf); |
| 3619 | } |
| 3620 | |
| 3621 | void |
| 3622 | set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, |
| 3623 | gdbarch_extract_struct_value_address_ftype extract_struct_value_address) |
| 3624 | { |
| 3625 | gdbarch->extract_struct_value_address = extract_struct_value_address; |
| 3626 | } |
| 3627 | |
| 3628 | int |
| 3629 | gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type) |
| 3630 | { |
| 3631 | if (gdbarch->use_struct_convention == 0) |
| 3632 | internal_error (__FILE__, __LINE__, |
| 3633 | "gdbarch: gdbarch_use_struct_convention invalid"); |
| 3634 | if (gdbarch_debug >= 2) |
| 3635 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n"); |
| 3636 | return gdbarch->use_struct_convention (gcc_p, value_type); |
| 3637 | } |
| 3638 | |
| 3639 | void |
| 3640 | set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, |
| 3641 | gdbarch_use_struct_convention_ftype use_struct_convention) |
| 3642 | { |
| 3643 | gdbarch->use_struct_convention = use_struct_convention; |
| 3644 | } |
| 3645 | |
| 3646 | void |
| 3647 | gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame) |
| 3648 | { |
| 3649 | if (gdbarch->frame_init_saved_regs == 0) |
| 3650 | internal_error (__FILE__, __LINE__, |
| 3651 | "gdbarch: gdbarch_frame_init_saved_regs invalid"); |
| 3652 | if (gdbarch_debug >= 2) |
| 3653 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n"); |
| 3654 | gdbarch->frame_init_saved_regs (frame); |
| 3655 | } |
| 3656 | |
| 3657 | void |
| 3658 | set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, |
| 3659 | gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs) |
| 3660 | { |
| 3661 | gdbarch->frame_init_saved_regs = frame_init_saved_regs; |
| 3662 | } |
| 3663 | |
| 3664 | int |
| 3665 | gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch) |
| 3666 | { |
| 3667 | return gdbarch->init_extra_frame_info != 0; |
| 3668 | } |
| 3669 | |
| 3670 | void |
| 3671 | gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame) |
| 3672 | { |
| 3673 | if (gdbarch->init_extra_frame_info == 0) |
| 3674 | internal_error (__FILE__, __LINE__, |
| 3675 | "gdbarch: gdbarch_init_extra_frame_info invalid"); |
| 3676 | if (gdbarch_debug >= 2) |
| 3677 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n"); |
| 3678 | gdbarch->init_extra_frame_info (fromleaf, frame); |
| 3679 | } |
| 3680 | |
| 3681 | void |
| 3682 | set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, |
| 3683 | gdbarch_init_extra_frame_info_ftype init_extra_frame_info) |
| 3684 | { |
| 3685 | gdbarch->init_extra_frame_info = init_extra_frame_info; |
| 3686 | } |
| 3687 | |
| 3688 | CORE_ADDR |
| 3689 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) |
| 3690 | { |
| 3691 | if (gdbarch->skip_prologue == 0) |
| 3692 | internal_error (__FILE__, __LINE__, |
| 3693 | "gdbarch: gdbarch_skip_prologue invalid"); |
| 3694 | if (gdbarch_debug >= 2) |
| 3695 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
| 3696 | return gdbarch->skip_prologue (ip); |
| 3697 | } |
| 3698 | |
| 3699 | void |
| 3700 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
| 3701 | gdbarch_skip_prologue_ftype skip_prologue) |
| 3702 | { |
| 3703 | gdbarch->skip_prologue = skip_prologue; |
| 3704 | } |
| 3705 | |
| 3706 | int |
| 3707 | gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip) |
| 3708 | { |
| 3709 | if (gdbarch->prologue_frameless_p == 0) |
| 3710 | internal_error (__FILE__, __LINE__, |
| 3711 | "gdbarch: gdbarch_prologue_frameless_p invalid"); |
| 3712 | if (gdbarch_debug >= 2) |
| 3713 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n"); |
| 3714 | return gdbarch->prologue_frameless_p (ip); |
| 3715 | } |
| 3716 | |
| 3717 | void |
| 3718 | set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, |
| 3719 | gdbarch_prologue_frameless_p_ftype prologue_frameless_p) |
| 3720 | { |
| 3721 | gdbarch->prologue_frameless_p = prologue_frameless_p; |
| 3722 | } |
| 3723 | |
| 3724 | int |
| 3725 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) |
| 3726 | { |
| 3727 | if (gdbarch->inner_than == 0) |
| 3728 | internal_error (__FILE__, __LINE__, |
| 3729 | "gdbarch: gdbarch_inner_than invalid"); |
| 3730 | if (gdbarch_debug >= 2) |
| 3731 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
| 3732 | return gdbarch->inner_than (lhs, rhs); |
| 3733 | } |
| 3734 | |
| 3735 | void |
| 3736 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
| 3737 | gdbarch_inner_than_ftype inner_than) |
| 3738 | { |
| 3739 | gdbarch->inner_than = inner_than; |
| 3740 | } |
| 3741 | |
| 3742 | unsigned char * |
| 3743 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
| 3744 | { |
| 3745 | if (gdbarch->breakpoint_from_pc == 0) |
| 3746 | internal_error (__FILE__, __LINE__, |
| 3747 | "gdbarch: gdbarch_breakpoint_from_pc invalid"); |
| 3748 | if (gdbarch_debug >= 2) |
| 3749 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
| 3750 | return gdbarch->breakpoint_from_pc (pcptr, lenptr); |
| 3751 | } |
| 3752 | |
| 3753 | void |
| 3754 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
| 3755 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) |
| 3756 | { |
| 3757 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; |
| 3758 | } |
| 3759 | |
| 3760 | int |
| 3761 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) |
| 3762 | { |
| 3763 | if (gdbarch->memory_insert_breakpoint == 0) |
| 3764 | internal_error (__FILE__, __LINE__, |
| 3765 | "gdbarch: gdbarch_memory_insert_breakpoint invalid"); |
| 3766 | if (gdbarch_debug >= 2) |
| 3767 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
| 3768 | return gdbarch->memory_insert_breakpoint (addr, contents_cache); |
| 3769 | } |
| 3770 | |
| 3771 | void |
| 3772 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, |
| 3773 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) |
| 3774 | { |
| 3775 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; |
| 3776 | } |
| 3777 | |
| 3778 | int |
| 3779 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) |
| 3780 | { |
| 3781 | if (gdbarch->memory_remove_breakpoint == 0) |
| 3782 | internal_error (__FILE__, __LINE__, |
| 3783 | "gdbarch: gdbarch_memory_remove_breakpoint invalid"); |
| 3784 | if (gdbarch_debug >= 2) |
| 3785 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
| 3786 | return gdbarch->memory_remove_breakpoint (addr, contents_cache); |
| 3787 | } |
| 3788 | |
| 3789 | void |
| 3790 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, |
| 3791 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) |
| 3792 | { |
| 3793 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; |
| 3794 | } |
| 3795 | |
| 3796 | CORE_ADDR |
| 3797 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
| 3798 | { |
| 3799 | if (gdbarch->decr_pc_after_break == -1) |
| 3800 | internal_error (__FILE__, __LINE__, |
| 3801 | "gdbarch: gdbarch_decr_pc_after_break invalid"); |
| 3802 | if (gdbarch_debug >= 2) |
| 3803 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
| 3804 | return gdbarch->decr_pc_after_break; |
| 3805 | } |
| 3806 | |
| 3807 | void |
| 3808 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
| 3809 | CORE_ADDR decr_pc_after_break) |
| 3810 | { |
| 3811 | gdbarch->decr_pc_after_break = decr_pc_after_break; |
| 3812 | } |
| 3813 | |
| 3814 | int |
| 3815 | gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it) |
| 3816 | { |
| 3817 | if (gdbarch->prepare_to_proceed == 0) |
| 3818 | internal_error (__FILE__, __LINE__, |
| 3819 | "gdbarch: gdbarch_prepare_to_proceed invalid"); |
| 3820 | if (gdbarch_debug >= 2) |
| 3821 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n"); |
| 3822 | return gdbarch->prepare_to_proceed (select_it); |
| 3823 | } |
| 3824 | |
| 3825 | void |
| 3826 | set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, |
| 3827 | gdbarch_prepare_to_proceed_ftype prepare_to_proceed) |
| 3828 | { |
| 3829 | gdbarch->prepare_to_proceed = prepare_to_proceed; |
| 3830 | } |
| 3831 | |
| 3832 | CORE_ADDR |
| 3833 | gdbarch_function_start_offset (struct gdbarch *gdbarch) |
| 3834 | { |
| 3835 | if (gdbarch->function_start_offset == -1) |
| 3836 | internal_error (__FILE__, __LINE__, |
| 3837 | "gdbarch: gdbarch_function_start_offset invalid"); |
| 3838 | if (gdbarch_debug >= 2) |
| 3839 | fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n"); |
| 3840 | return gdbarch->function_start_offset; |
| 3841 | } |
| 3842 | |
| 3843 | void |
| 3844 | set_gdbarch_function_start_offset (struct gdbarch *gdbarch, |
| 3845 | CORE_ADDR function_start_offset) |
| 3846 | { |
| 3847 | gdbarch->function_start_offset = function_start_offset; |
| 3848 | } |
| 3849 | |
| 3850 | void |
| 3851 | gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len) |
| 3852 | { |
| 3853 | if (gdbarch->remote_translate_xfer_address == 0) |
| 3854 | internal_error (__FILE__, __LINE__, |
| 3855 | "gdbarch: gdbarch_remote_translate_xfer_address invalid"); |
| 3856 | if (gdbarch_debug >= 2) |
| 3857 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n"); |
| 3858 | gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len); |
| 3859 | } |
| 3860 | |
| 3861 | void |
| 3862 | set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, |
| 3863 | gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address) |
| 3864 | { |
| 3865 | gdbarch->remote_translate_xfer_address = remote_translate_xfer_address; |
| 3866 | } |
| 3867 | |
| 3868 | CORE_ADDR |
| 3869 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
| 3870 | { |
| 3871 | if (gdbarch->frame_args_skip == -1) |
| 3872 | internal_error (__FILE__, __LINE__, |
| 3873 | "gdbarch: gdbarch_frame_args_skip invalid"); |
| 3874 | if (gdbarch_debug >= 2) |
| 3875 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
| 3876 | return gdbarch->frame_args_skip; |
| 3877 | } |
| 3878 | |
| 3879 | void |
| 3880 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
| 3881 | CORE_ADDR frame_args_skip) |
| 3882 | { |
| 3883 | gdbarch->frame_args_skip = frame_args_skip; |
| 3884 | } |
| 3885 | |
| 3886 | int |
| 3887 | gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi) |
| 3888 | { |
| 3889 | if (gdbarch->frameless_function_invocation == 0) |
| 3890 | internal_error (__FILE__, __LINE__, |
| 3891 | "gdbarch: gdbarch_frameless_function_invocation invalid"); |
| 3892 | if (gdbarch_debug >= 2) |
| 3893 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n"); |
| 3894 | return gdbarch->frameless_function_invocation (fi); |
| 3895 | } |
| 3896 | |
| 3897 | void |
| 3898 | set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, |
| 3899 | gdbarch_frameless_function_invocation_ftype frameless_function_invocation) |
| 3900 | { |
| 3901 | gdbarch->frameless_function_invocation = frameless_function_invocation; |
| 3902 | } |
| 3903 | |
| 3904 | CORE_ADDR |
| 3905 | gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame) |
| 3906 | { |
| 3907 | if (gdbarch->frame_chain == 0) |
| 3908 | internal_error (__FILE__, __LINE__, |
| 3909 | "gdbarch: gdbarch_frame_chain invalid"); |
| 3910 | if (gdbarch_debug >= 2) |
| 3911 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n"); |
| 3912 | return gdbarch->frame_chain (frame); |
| 3913 | } |
| 3914 | |
| 3915 | void |
| 3916 | set_gdbarch_frame_chain (struct gdbarch *gdbarch, |
| 3917 | gdbarch_frame_chain_ftype frame_chain) |
| 3918 | { |
| 3919 | gdbarch->frame_chain = frame_chain; |
| 3920 | } |
| 3921 | |
| 3922 | int |
| 3923 | gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe) |
| 3924 | { |
| 3925 | if (gdbarch->frame_chain_valid == 0) |
| 3926 | internal_error (__FILE__, __LINE__, |
| 3927 | "gdbarch: gdbarch_frame_chain_valid invalid"); |
| 3928 | if (gdbarch_debug >= 2) |
| 3929 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n"); |
| 3930 | return gdbarch->frame_chain_valid (chain, thisframe); |
| 3931 | } |
| 3932 | |
| 3933 | void |
| 3934 | set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, |
| 3935 | gdbarch_frame_chain_valid_ftype frame_chain_valid) |
| 3936 | { |
| 3937 | gdbarch->frame_chain_valid = frame_chain_valid; |
| 3938 | } |
| 3939 | |
| 3940 | CORE_ADDR |
| 3941 | gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi) |
| 3942 | { |
| 3943 | if (gdbarch->frame_saved_pc == 0) |
| 3944 | internal_error (__FILE__, __LINE__, |
| 3945 | "gdbarch: gdbarch_frame_saved_pc invalid"); |
| 3946 | if (gdbarch_debug >= 2) |
| 3947 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n"); |
| 3948 | return gdbarch->frame_saved_pc (fi); |
| 3949 | } |
| 3950 | |
| 3951 | void |
| 3952 | set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, |
| 3953 | gdbarch_frame_saved_pc_ftype frame_saved_pc) |
| 3954 | { |
| 3955 | gdbarch->frame_saved_pc = frame_saved_pc; |
| 3956 | } |
| 3957 | |
| 3958 | CORE_ADDR |
| 3959 | gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi) |
| 3960 | { |
| 3961 | if (gdbarch->frame_args_address == 0) |
| 3962 | internal_error (__FILE__, __LINE__, |
| 3963 | "gdbarch: gdbarch_frame_args_address invalid"); |
| 3964 | if (gdbarch_debug >= 2) |
| 3965 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n"); |
| 3966 | return gdbarch->frame_args_address (fi); |
| 3967 | } |
| 3968 | |
| 3969 | void |
| 3970 | set_gdbarch_frame_args_address (struct gdbarch *gdbarch, |
| 3971 | gdbarch_frame_args_address_ftype frame_args_address) |
| 3972 | { |
| 3973 | gdbarch->frame_args_address = frame_args_address; |
| 3974 | } |
| 3975 | |
| 3976 | CORE_ADDR |
| 3977 | gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi) |
| 3978 | { |
| 3979 | if (gdbarch->frame_locals_address == 0) |
| 3980 | internal_error (__FILE__, __LINE__, |
| 3981 | "gdbarch: gdbarch_frame_locals_address invalid"); |
| 3982 | if (gdbarch_debug >= 2) |
| 3983 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n"); |
| 3984 | return gdbarch->frame_locals_address (fi); |
| 3985 | } |
| 3986 | |
| 3987 | void |
| 3988 | set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, |
| 3989 | gdbarch_frame_locals_address_ftype frame_locals_address) |
| 3990 | { |
| 3991 | gdbarch->frame_locals_address = frame_locals_address; |
| 3992 | } |
| 3993 | |
| 3994 | CORE_ADDR |
| 3995 | gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame) |
| 3996 | { |
| 3997 | if (gdbarch->saved_pc_after_call == 0) |
| 3998 | internal_error (__FILE__, __LINE__, |
| 3999 | "gdbarch: gdbarch_saved_pc_after_call invalid"); |
| 4000 | if (gdbarch_debug >= 2) |
| 4001 | fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n"); |
| 4002 | return gdbarch->saved_pc_after_call (frame); |
| 4003 | } |
| 4004 | |
| 4005 | void |
| 4006 | set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, |
| 4007 | gdbarch_saved_pc_after_call_ftype saved_pc_after_call) |
| 4008 | { |
| 4009 | gdbarch->saved_pc_after_call = saved_pc_after_call; |
| 4010 | } |
| 4011 | |
| 4012 | int |
| 4013 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) |
| 4014 | { |
| 4015 | if (gdbarch->frame_num_args == 0) |
| 4016 | internal_error (__FILE__, __LINE__, |
| 4017 | "gdbarch: gdbarch_frame_num_args invalid"); |
| 4018 | if (gdbarch_debug >= 2) |
| 4019 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
| 4020 | return gdbarch->frame_num_args (frame); |
| 4021 | } |
| 4022 | |
| 4023 | void |
| 4024 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
| 4025 | gdbarch_frame_num_args_ftype frame_num_args) |
| 4026 | { |
| 4027 | gdbarch->frame_num_args = frame_num_args; |
| 4028 | } |
| 4029 | |
| 4030 | int |
| 4031 | gdbarch_stack_align_p (struct gdbarch *gdbarch) |
| 4032 | { |
| 4033 | return gdbarch->stack_align != 0; |
| 4034 | } |
| 4035 | |
| 4036 | CORE_ADDR |
| 4037 | gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp) |
| 4038 | { |
| 4039 | if (gdbarch->stack_align == 0) |
| 4040 | internal_error (__FILE__, __LINE__, |
| 4041 | "gdbarch: gdbarch_stack_align invalid"); |
| 4042 | if (gdbarch_debug >= 2) |
| 4043 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n"); |
| 4044 | return gdbarch->stack_align (sp); |
| 4045 | } |
| 4046 | |
| 4047 | void |
| 4048 | set_gdbarch_stack_align (struct gdbarch *gdbarch, |
| 4049 | gdbarch_stack_align_ftype stack_align) |
| 4050 | { |
| 4051 | gdbarch->stack_align = stack_align; |
| 4052 | } |
| 4053 | |
| 4054 | int |
| 4055 | gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch) |
| 4056 | { |
| 4057 | /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ |
| 4058 | if (gdbarch_debug >= 2) |
| 4059 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n"); |
| 4060 | return gdbarch->extra_stack_alignment_needed; |
| 4061 | } |
| 4062 | |
| 4063 | void |
| 4064 | set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch, |
| 4065 | int extra_stack_alignment_needed) |
| 4066 | { |
| 4067 | gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed; |
| 4068 | } |
| 4069 | |
| 4070 | int |
| 4071 | gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch) |
| 4072 | { |
| 4073 | return gdbarch->reg_struct_has_addr != 0; |
| 4074 | } |
| 4075 | |
| 4076 | int |
| 4077 | gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type) |
| 4078 | { |
| 4079 | if (gdbarch->reg_struct_has_addr == 0) |
| 4080 | internal_error (__FILE__, __LINE__, |
| 4081 | "gdbarch: gdbarch_reg_struct_has_addr invalid"); |
| 4082 | if (gdbarch_debug >= 2) |
| 4083 | fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n"); |
| 4084 | return gdbarch->reg_struct_has_addr (gcc_p, type); |
| 4085 | } |
| 4086 | |
| 4087 | void |
| 4088 | set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, |
| 4089 | gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr) |
| 4090 | { |
| 4091 | gdbarch->reg_struct_has_addr = reg_struct_has_addr; |
| 4092 | } |
| 4093 | |
| 4094 | int |
| 4095 | gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch) |
| 4096 | { |
| 4097 | return gdbarch->save_dummy_frame_tos != 0; |
| 4098 | } |
| 4099 | |
| 4100 | void |
| 4101 | gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) |
| 4102 | { |
| 4103 | if (gdbarch->save_dummy_frame_tos == 0) |
| 4104 | internal_error (__FILE__, __LINE__, |
| 4105 | "gdbarch: gdbarch_save_dummy_frame_tos invalid"); |
| 4106 | if (gdbarch_debug >= 2) |
| 4107 | fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n"); |
| 4108 | gdbarch->save_dummy_frame_tos (sp); |
| 4109 | } |
| 4110 | |
| 4111 | void |
| 4112 | set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, |
| 4113 | gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos) |
| 4114 | { |
| 4115 | gdbarch->save_dummy_frame_tos = save_dummy_frame_tos; |
| 4116 | } |
| 4117 | |
| 4118 | int |
| 4119 | gdbarch_parm_boundary (struct gdbarch *gdbarch) |
| 4120 | { |
| 4121 | if (gdbarch_debug >= 2) |
| 4122 | fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n"); |
| 4123 | return gdbarch->parm_boundary; |
| 4124 | } |
| 4125 | |
| 4126 | void |
| 4127 | set_gdbarch_parm_boundary (struct gdbarch *gdbarch, |
| 4128 | int parm_boundary) |
| 4129 | { |
| 4130 | gdbarch->parm_boundary = parm_boundary; |
| 4131 | } |
| 4132 | |
| 4133 | const struct floatformat * |
| 4134 | gdbarch_float_format (struct gdbarch *gdbarch) |
| 4135 | { |
| 4136 | if (gdbarch_debug >= 2) |
| 4137 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); |
| 4138 | return gdbarch->float_format; |
| 4139 | } |
| 4140 | |
| 4141 | void |
| 4142 | set_gdbarch_float_format (struct gdbarch *gdbarch, |
| 4143 | const struct floatformat * float_format) |
| 4144 | { |
| 4145 | gdbarch->float_format = float_format; |
| 4146 | } |
| 4147 | |
| 4148 | const struct floatformat * |
| 4149 | gdbarch_double_format (struct gdbarch *gdbarch) |
| 4150 | { |
| 4151 | if (gdbarch_debug >= 2) |
| 4152 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); |
| 4153 | return gdbarch->double_format; |
| 4154 | } |
| 4155 | |
| 4156 | void |
| 4157 | set_gdbarch_double_format (struct gdbarch *gdbarch, |
| 4158 | const struct floatformat * double_format) |
| 4159 | { |
| 4160 | gdbarch->double_format = double_format; |
| 4161 | } |
| 4162 | |
| 4163 | const struct floatformat * |
| 4164 | gdbarch_long_double_format (struct gdbarch *gdbarch) |
| 4165 | { |
| 4166 | if (gdbarch_debug >= 2) |
| 4167 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); |
| 4168 | return gdbarch->long_double_format; |
| 4169 | } |
| 4170 | |
| 4171 | void |
| 4172 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, |
| 4173 | const struct floatformat * long_double_format) |
| 4174 | { |
| 4175 | gdbarch->long_double_format = long_double_format; |
| 4176 | } |
| 4177 | |
| 4178 | CORE_ADDR |
| 4179 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4180 | { |
| 4181 | if (gdbarch->convert_from_func_ptr_addr == 0) |
| 4182 | internal_error (__FILE__, __LINE__, |
| 4183 | "gdbarch: gdbarch_convert_from_func_ptr_addr invalid"); |
| 4184 | if (gdbarch_debug >= 2) |
| 4185 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); |
| 4186 | return gdbarch->convert_from_func_ptr_addr (addr); |
| 4187 | } |
| 4188 | |
| 4189 | void |
| 4190 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, |
| 4191 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) |
| 4192 | { |
| 4193 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; |
| 4194 | } |
| 4195 | |
| 4196 | CORE_ADDR |
| 4197 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4198 | { |
| 4199 | if (gdbarch->addr_bits_remove == 0) |
| 4200 | internal_error (__FILE__, __LINE__, |
| 4201 | "gdbarch: gdbarch_addr_bits_remove invalid"); |
| 4202 | if (gdbarch_debug >= 2) |
| 4203 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); |
| 4204 | return gdbarch->addr_bits_remove (addr); |
| 4205 | } |
| 4206 | |
| 4207 | void |
| 4208 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, |
| 4209 | gdbarch_addr_bits_remove_ftype addr_bits_remove) |
| 4210 | { |
| 4211 | gdbarch->addr_bits_remove = addr_bits_remove; |
| 4212 | } |
| 4213 | |
| 4214 | int |
| 4215 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) |
| 4216 | { |
| 4217 | return gdbarch->software_single_step != 0; |
| 4218 | } |
| 4219 | |
| 4220 | void |
| 4221 | gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) |
| 4222 | { |
| 4223 | if (gdbarch->software_single_step == 0) |
| 4224 | internal_error (__FILE__, __LINE__, |
| 4225 | "gdbarch: gdbarch_software_single_step invalid"); |
| 4226 | if (gdbarch_debug >= 2) |
| 4227 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); |
| 4228 | gdbarch->software_single_step (sig, insert_breakpoints_p); |
| 4229 | } |
| 4230 | |
| 4231 | void |
| 4232 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, |
| 4233 | gdbarch_software_single_step_ftype software_single_step) |
| 4234 | { |
| 4235 | gdbarch->software_single_step = software_single_step; |
| 4236 | } |
| 4237 | |
| 4238 | int |
| 4239 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info) |
| 4240 | { |
| 4241 | if (gdbarch->print_insn == 0) |
| 4242 | internal_error (__FILE__, __LINE__, |
| 4243 | "gdbarch: gdbarch_print_insn invalid"); |
| 4244 | if (gdbarch_debug >= 2) |
| 4245 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); |
| 4246 | return gdbarch->print_insn (vma, info); |
| 4247 | } |
| 4248 | |
| 4249 | void |
| 4250 | set_gdbarch_print_insn (struct gdbarch *gdbarch, |
| 4251 | gdbarch_print_insn_ftype print_insn) |
| 4252 | { |
| 4253 | gdbarch->print_insn = print_insn; |
| 4254 | } |
| 4255 | |
| 4256 | CORE_ADDR |
| 4257 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc) |
| 4258 | { |
| 4259 | if (gdbarch->skip_trampoline_code == 0) |
| 4260 | internal_error (__FILE__, __LINE__, |
| 4261 | "gdbarch: gdbarch_skip_trampoline_code invalid"); |
| 4262 | if (gdbarch_debug >= 2) |
| 4263 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); |
| 4264 | return gdbarch->skip_trampoline_code (pc); |
| 4265 | } |
| 4266 | |
| 4267 | void |
| 4268 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, |
| 4269 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) |
| 4270 | { |
| 4271 | gdbarch->skip_trampoline_code = skip_trampoline_code; |
| 4272 | } |
| 4273 | |
| 4274 | int |
| 4275 | gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) |
| 4276 | { |
| 4277 | if (gdbarch->in_solib_call_trampoline == 0) |
| 4278 | internal_error (__FILE__, __LINE__, |
| 4279 | "gdbarch: gdbarch_in_solib_call_trampoline invalid"); |
| 4280 | if (gdbarch_debug >= 2) |
| 4281 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n"); |
| 4282 | return gdbarch->in_solib_call_trampoline (pc, name); |
| 4283 | } |
| 4284 | |
| 4285 | void |
| 4286 | set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, |
| 4287 | gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline) |
| 4288 | { |
| 4289 | gdbarch->in_solib_call_trampoline = in_solib_call_trampoline; |
| 4290 | } |
| 4291 | |
| 4292 | int |
| 4293 | gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4294 | { |
| 4295 | if (gdbarch->in_function_epilogue_p == 0) |
| 4296 | internal_error (__FILE__, __LINE__, |
| 4297 | "gdbarch: gdbarch_in_function_epilogue_p invalid"); |
| 4298 | if (gdbarch_debug >= 2) |
| 4299 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); |
| 4300 | return gdbarch->in_function_epilogue_p (gdbarch, addr); |
| 4301 | } |
| 4302 | |
| 4303 | void |
| 4304 | set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, |
| 4305 | gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) |
| 4306 | { |
| 4307 | gdbarch->in_function_epilogue_p = in_function_epilogue_p; |
| 4308 | } |
| 4309 | |
| 4310 | char * |
| 4311 | gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv) |
| 4312 | { |
| 4313 | if (gdbarch->construct_inferior_arguments == 0) |
| 4314 | internal_error (__FILE__, __LINE__, |
| 4315 | "gdbarch: gdbarch_construct_inferior_arguments invalid"); |
| 4316 | if (gdbarch_debug >= 2) |
| 4317 | fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n"); |
| 4318 | return gdbarch->construct_inferior_arguments (gdbarch, argc, argv); |
| 4319 | } |
| 4320 | |
| 4321 | void |
| 4322 | set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, |
| 4323 | gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments) |
| 4324 | { |
| 4325 | gdbarch->construct_inferior_arguments = construct_inferior_arguments; |
| 4326 | } |
| 4327 | |
| 4328 | int |
| 4329 | gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch) |
| 4330 | { |
| 4331 | return gdbarch->dwarf2_build_frame_info != 0; |
| 4332 | } |
| 4333 | |
| 4334 | void |
| 4335 | gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile) |
| 4336 | { |
| 4337 | if (gdbarch->dwarf2_build_frame_info == 0) |
| 4338 | internal_error (__FILE__, __LINE__, |
| 4339 | "gdbarch: gdbarch_dwarf2_build_frame_info invalid"); |
| 4340 | if (gdbarch_debug >= 2) |
| 4341 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n"); |
| 4342 | gdbarch->dwarf2_build_frame_info (objfile); |
| 4343 | } |
| 4344 | |
| 4345 | void |
| 4346 | set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, |
| 4347 | gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info) |
| 4348 | { |
| 4349 | gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info; |
| 4350 | } |
| 4351 | |
| 4352 | |
| 4353 | /* Keep a registry of per-architecture data-pointers required by GDB |
| 4354 | modules. */ |
| 4355 | |
| 4356 | struct gdbarch_data |
| 4357 | { |
| 4358 | unsigned index; |
| 4359 | gdbarch_data_init_ftype *init; |
| 4360 | gdbarch_data_free_ftype *free; |
| 4361 | }; |
| 4362 | |
| 4363 | struct gdbarch_data_registration |
| 4364 | { |
| 4365 | struct gdbarch_data *data; |
| 4366 | struct gdbarch_data_registration *next; |
| 4367 | }; |
| 4368 | |
| 4369 | struct gdbarch_data_registry |
| 4370 | { |
| 4371 | unsigned nr; |
| 4372 | struct gdbarch_data_registration *registrations; |
| 4373 | }; |
| 4374 | |
| 4375 | struct gdbarch_data_registry gdbarch_data_registry = |
| 4376 | { |
| 4377 | 0, NULL, |
| 4378 | }; |
| 4379 | |
| 4380 | struct gdbarch_data * |
| 4381 | register_gdbarch_data (gdbarch_data_init_ftype *init, |
| 4382 | gdbarch_data_free_ftype *free) |
| 4383 | { |
| 4384 | struct gdbarch_data_registration **curr; |
| 4385 | for (curr = &gdbarch_data_registry.registrations; |
| 4386 | (*curr) != NULL; |
| 4387 | curr = &(*curr)->next); |
| 4388 | (*curr) = XMALLOC (struct gdbarch_data_registration); |
| 4389 | (*curr)->next = NULL; |
| 4390 | (*curr)->data = XMALLOC (struct gdbarch_data); |
| 4391 | (*curr)->data->index = gdbarch_data_registry.nr++; |
| 4392 | (*curr)->data->init = init; |
| 4393 | (*curr)->data->free = free; |
| 4394 | return (*curr)->data; |
| 4395 | } |
| 4396 | |
| 4397 | |
| 4398 | /* Walk through all the registered users initializing each in turn. */ |
| 4399 | |
| 4400 | static void |
| 4401 | init_gdbarch_data (struct gdbarch *gdbarch) |
| 4402 | { |
| 4403 | struct gdbarch_data_registration *rego; |
| 4404 | for (rego = gdbarch_data_registry.registrations; |
| 4405 | rego != NULL; |
| 4406 | rego = rego->next) |
| 4407 | { |
| 4408 | struct gdbarch_data *data = rego->data; |
| 4409 | gdb_assert (data->index < gdbarch->nr_data); |
| 4410 | if (data->init != NULL) |
| 4411 | { |
| 4412 | void *pointer = data->init (gdbarch); |
| 4413 | set_gdbarch_data (gdbarch, data, pointer); |
| 4414 | } |
| 4415 | } |
| 4416 | } |
| 4417 | |
| 4418 | /* Create/delete the gdbarch data vector. */ |
| 4419 | |
| 4420 | static void |
| 4421 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
| 4422 | { |
| 4423 | gdb_assert (gdbarch->data == NULL); |
| 4424 | gdbarch->nr_data = gdbarch_data_registry.nr; |
| 4425 | gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*)); |
| 4426 | } |
| 4427 | |
| 4428 | static void |
| 4429 | free_gdbarch_data (struct gdbarch *gdbarch) |
| 4430 | { |
| 4431 | struct gdbarch_data_registration *rego; |
| 4432 | gdb_assert (gdbarch->data != NULL); |
| 4433 | for (rego = gdbarch_data_registry.registrations; |
| 4434 | rego != NULL; |
| 4435 | rego = rego->next) |
| 4436 | { |
| 4437 | struct gdbarch_data *data = rego->data; |
| 4438 | gdb_assert (data->index < gdbarch->nr_data); |
| 4439 | if (data->free != NULL && gdbarch->data[data->index] != NULL) |
| 4440 | { |
| 4441 | data->free (gdbarch, gdbarch->data[data->index]); |
| 4442 | gdbarch->data[data->index] = NULL; |
| 4443 | } |
| 4444 | } |
| 4445 | xfree (gdbarch->data); |
| 4446 | gdbarch->data = NULL; |
| 4447 | } |
| 4448 | |
| 4449 | |
| 4450 | /* Initialize the current value of thee specified per-architecture |
| 4451 | data-pointer. */ |
| 4452 | |
| 4453 | void |
| 4454 | set_gdbarch_data (struct gdbarch *gdbarch, |
| 4455 | struct gdbarch_data *data, |
| 4456 | void *pointer) |
| 4457 | { |
| 4458 | gdb_assert (data->index < gdbarch->nr_data); |
| 4459 | if (data->free != NULL && gdbarch->data[data->index] != NULL) |
| 4460 | data->free (gdbarch, gdbarch->data[data->index]); |
| 4461 | gdbarch->data[data->index] = pointer; |
| 4462 | } |
| 4463 | |
| 4464 | /* Return the current value of the specified per-architecture |
| 4465 | data-pointer. */ |
| 4466 | |
| 4467 | void * |
| 4468 | gdbarch_data (struct gdbarch_data *data) |
| 4469 | { |
| 4470 | gdb_assert (data->index < current_gdbarch->nr_data); |
| 4471 | return current_gdbarch->data[data->index]; |
| 4472 | } |
| 4473 | |
| 4474 | |
| 4475 | |
| 4476 | /* Keep a registry of swapped data required by GDB modules. */ |
| 4477 | |
| 4478 | struct gdbarch_swap |
| 4479 | { |
| 4480 | void *swap; |
| 4481 | struct gdbarch_swap_registration *source; |
| 4482 | struct gdbarch_swap *next; |
| 4483 | }; |
| 4484 | |
| 4485 | struct gdbarch_swap_registration |
| 4486 | { |
| 4487 | void *data; |
| 4488 | unsigned long sizeof_data; |
| 4489 | gdbarch_swap_ftype *init; |
| 4490 | struct gdbarch_swap_registration *next; |
| 4491 | }; |
| 4492 | |
| 4493 | struct gdbarch_swap_registry |
| 4494 | { |
| 4495 | int nr; |
| 4496 | struct gdbarch_swap_registration *registrations; |
| 4497 | }; |
| 4498 | |
| 4499 | struct gdbarch_swap_registry gdbarch_swap_registry = |
| 4500 | { |
| 4501 | 0, NULL, |
| 4502 | }; |
| 4503 | |
| 4504 | void |
| 4505 | register_gdbarch_swap (void *data, |
| 4506 | unsigned long sizeof_data, |
| 4507 | gdbarch_swap_ftype *init) |
| 4508 | { |
| 4509 | struct gdbarch_swap_registration **rego; |
| 4510 | for (rego = &gdbarch_swap_registry.registrations; |
| 4511 | (*rego) != NULL; |
| 4512 | rego = &(*rego)->next); |
| 4513 | (*rego) = XMALLOC (struct gdbarch_swap_registration); |
| 4514 | (*rego)->next = NULL; |
| 4515 | (*rego)->init = init; |
| 4516 | (*rego)->data = data; |
| 4517 | (*rego)->sizeof_data = sizeof_data; |
| 4518 | } |
| 4519 | |
| 4520 | |
| 4521 | static void |
| 4522 | init_gdbarch_swap (struct gdbarch *gdbarch) |
| 4523 | { |
| 4524 | struct gdbarch_swap_registration *rego; |
| 4525 | struct gdbarch_swap **curr = &gdbarch->swap; |
| 4526 | for (rego = gdbarch_swap_registry.registrations; |
| 4527 | rego != NULL; |
| 4528 | rego = rego->next) |
| 4529 | { |
| 4530 | if (rego->data != NULL) |
| 4531 | { |
| 4532 | (*curr) = XMALLOC (struct gdbarch_swap); |
| 4533 | (*curr)->source = rego; |
| 4534 | (*curr)->swap = xmalloc (rego->sizeof_data); |
| 4535 | (*curr)->next = NULL; |
| 4536 | memset (rego->data, 0, rego->sizeof_data); |
| 4537 | curr = &(*curr)->next; |
| 4538 | } |
| 4539 | if (rego->init != NULL) |
| 4540 | rego->init (); |
| 4541 | } |
| 4542 | } |
| 4543 | |
| 4544 | static void |
| 4545 | swapout_gdbarch_swap (struct gdbarch *gdbarch) |
| 4546 | { |
| 4547 | struct gdbarch_swap *curr; |
| 4548 | for (curr = gdbarch->swap; |
| 4549 | curr != NULL; |
| 4550 | curr = curr->next) |
| 4551 | memcpy (curr->swap, curr->source->data, curr->source->sizeof_data); |
| 4552 | } |
| 4553 | |
| 4554 | static void |
| 4555 | swapin_gdbarch_swap (struct gdbarch *gdbarch) |
| 4556 | { |
| 4557 | struct gdbarch_swap *curr; |
| 4558 | for (curr = gdbarch->swap; |
| 4559 | curr != NULL; |
| 4560 | curr = curr->next) |
| 4561 | memcpy (curr->source->data, curr->swap, curr->source->sizeof_data); |
| 4562 | } |
| 4563 | |
| 4564 | |
| 4565 | /* Keep a registry of the architectures known by GDB. */ |
| 4566 | |
| 4567 | struct gdbarch_registration |
| 4568 | { |
| 4569 | enum bfd_architecture bfd_architecture; |
| 4570 | gdbarch_init_ftype *init; |
| 4571 | gdbarch_dump_tdep_ftype *dump_tdep; |
| 4572 | struct gdbarch_list *arches; |
| 4573 | struct gdbarch_registration *next; |
| 4574 | }; |
| 4575 | |
| 4576 | static struct gdbarch_registration *gdbarch_registry = NULL; |
| 4577 | |
| 4578 | static void |
| 4579 | append_name (const char ***buf, int *nr, const char *name) |
| 4580 | { |
| 4581 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); |
| 4582 | (*buf)[*nr] = name; |
| 4583 | *nr += 1; |
| 4584 | } |
| 4585 | |
| 4586 | const char ** |
| 4587 | gdbarch_printable_names (void) |
| 4588 | { |
| 4589 | if (GDB_MULTI_ARCH) |
| 4590 | { |
| 4591 | /* Accumulate a list of names based on the registed list of |
| 4592 | architectures. */ |
| 4593 | enum bfd_architecture a; |
| 4594 | int nr_arches = 0; |
| 4595 | const char **arches = NULL; |
| 4596 | struct gdbarch_registration *rego; |
| 4597 | for (rego = gdbarch_registry; |
| 4598 | rego != NULL; |
| 4599 | rego = rego->next) |
| 4600 | { |
| 4601 | const struct bfd_arch_info *ap; |
| 4602 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); |
| 4603 | if (ap == NULL) |
| 4604 | internal_error (__FILE__, __LINE__, |
| 4605 | "gdbarch_architecture_names: multi-arch unknown"); |
| 4606 | do |
| 4607 | { |
| 4608 | append_name (&arches, &nr_arches, ap->printable_name); |
| 4609 | ap = ap->next; |
| 4610 | } |
| 4611 | while (ap != NULL); |
| 4612 | } |
| 4613 | append_name (&arches, &nr_arches, NULL); |
| 4614 | return arches; |
| 4615 | } |
| 4616 | else |
| 4617 | /* Just return all the architectures that BFD knows. Assume that |
| 4618 | the legacy architecture framework supports them. */ |
| 4619 | return bfd_arch_list (); |
| 4620 | } |
| 4621 | |
| 4622 | |
| 4623 | void |
| 4624 | gdbarch_register (enum bfd_architecture bfd_architecture, |
| 4625 | gdbarch_init_ftype *init, |
| 4626 | gdbarch_dump_tdep_ftype *dump_tdep) |
| 4627 | { |
| 4628 | struct gdbarch_registration **curr; |
| 4629 | const struct bfd_arch_info *bfd_arch_info; |
| 4630 | /* Check that BFD recognizes this architecture */ |
| 4631 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
| 4632 | if (bfd_arch_info == NULL) |
| 4633 | { |
| 4634 | internal_error (__FILE__, __LINE__, |
| 4635 | "gdbarch: Attempt to register unknown architecture (%d)", |
| 4636 | bfd_architecture); |
| 4637 | } |
| 4638 | /* Check that we haven't seen this architecture before */ |
| 4639 | for (curr = &gdbarch_registry; |
| 4640 | (*curr) != NULL; |
| 4641 | curr = &(*curr)->next) |
| 4642 | { |
| 4643 | if (bfd_architecture == (*curr)->bfd_architecture) |
| 4644 | internal_error (__FILE__, __LINE__, |
| 4645 | "gdbarch: Duplicate registraration of architecture (%s)", |
| 4646 | bfd_arch_info->printable_name); |
| 4647 | } |
| 4648 | /* log it */ |
| 4649 | if (gdbarch_debug) |
| 4650 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n", |
| 4651 | bfd_arch_info->printable_name, |
| 4652 | (long) init); |
| 4653 | /* Append it */ |
| 4654 | (*curr) = XMALLOC (struct gdbarch_registration); |
| 4655 | (*curr)->bfd_architecture = bfd_architecture; |
| 4656 | (*curr)->init = init; |
| 4657 | (*curr)->dump_tdep = dump_tdep; |
| 4658 | (*curr)->arches = NULL; |
| 4659 | (*curr)->next = NULL; |
| 4660 | /* When non- multi-arch, install whatever target dump routine we've |
| 4661 | been provided - hopefully that routine has been written correctly |
| 4662 | and works regardless of multi-arch. */ |
| 4663 | if (!GDB_MULTI_ARCH && dump_tdep != NULL |
| 4664 | && startup_gdbarch.dump_tdep == NULL) |
| 4665 | startup_gdbarch.dump_tdep = dump_tdep; |
| 4666 | } |
| 4667 | |
| 4668 | void |
| 4669 | register_gdbarch_init (enum bfd_architecture bfd_architecture, |
| 4670 | gdbarch_init_ftype *init) |
| 4671 | { |
| 4672 | gdbarch_register (bfd_architecture, init, NULL); |
| 4673 | } |
| 4674 | |
| 4675 | |
| 4676 | /* Look for an architecture using gdbarch_info. Base search on only |
| 4677 | BFD_ARCH_INFO and BYTE_ORDER. */ |
| 4678 | |
| 4679 | struct gdbarch_list * |
| 4680 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
| 4681 | const struct gdbarch_info *info) |
| 4682 | { |
| 4683 | for (; arches != NULL; arches = arches->next) |
| 4684 | { |
| 4685 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) |
| 4686 | continue; |
| 4687 | if (info->byte_order != arches->gdbarch->byte_order) |
| 4688 | continue; |
| 4689 | return arches; |
| 4690 | } |
| 4691 | return NULL; |
| 4692 | } |
| 4693 | |
| 4694 | |
| 4695 | /* Update the current architecture. Return ZERO if the update request |
| 4696 | failed. */ |
| 4697 | |
| 4698 | int |
| 4699 | gdbarch_update_p (struct gdbarch_info info) |
| 4700 | { |
| 4701 | struct gdbarch *new_gdbarch; |
| 4702 | struct gdbarch_list **list; |
| 4703 | struct gdbarch_registration *rego; |
| 4704 | |
| 4705 | /* Fill in missing parts of the INFO struct using a number of |
| 4706 | sources: ``set ...''; INFOabfd supplied; existing target. */ |
| 4707 | |
| 4708 | /* ``(gdb) set architecture ...'' */ |
| 4709 | if (info.bfd_arch_info == NULL |
| 4710 | && !TARGET_ARCHITECTURE_AUTO) |
| 4711 | info.bfd_arch_info = TARGET_ARCHITECTURE; |
| 4712 | if (info.bfd_arch_info == NULL |
| 4713 | && info.abfd != NULL |
| 4714 | && bfd_get_arch (info.abfd) != bfd_arch_unknown |
| 4715 | && bfd_get_arch (info.abfd) != bfd_arch_obscure) |
| 4716 | info.bfd_arch_info = bfd_get_arch_info (info.abfd); |
| 4717 | if (info.bfd_arch_info == NULL) |
| 4718 | info.bfd_arch_info = TARGET_ARCHITECTURE; |
| 4719 | |
| 4720 | /* ``(gdb) set byte-order ...'' */ |
| 4721 | if (info.byte_order == 0 |
| 4722 | && !TARGET_BYTE_ORDER_AUTO) |
| 4723 | info.byte_order = TARGET_BYTE_ORDER; |
| 4724 | /* From the INFO struct. */ |
| 4725 | if (info.byte_order == 0 |
| 4726 | && info.abfd != NULL) |
| 4727 | info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN |
| 4728 | : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN |
| 4729 | : 0); |
| 4730 | /* From the current target. */ |
| 4731 | if (info.byte_order == 0) |
| 4732 | info.byte_order = TARGET_BYTE_ORDER; |
| 4733 | |
| 4734 | /* Must have found some sort of architecture. */ |
| 4735 | gdb_assert (info.bfd_arch_info != NULL); |
| 4736 | |
| 4737 | if (gdbarch_debug) |
| 4738 | { |
| 4739 | fprintf_unfiltered (gdb_stdlog, |
| 4740 | "gdbarch_update: info.bfd_arch_info %s\n", |
| 4741 | (info.bfd_arch_info != NULL |
| 4742 | ? info.bfd_arch_info->printable_name |
| 4743 | : "(null)")); |
| 4744 | fprintf_unfiltered (gdb_stdlog, |
| 4745 | "gdbarch_update: info.byte_order %d (%s)\n", |
| 4746 | info.byte_order, |
| 4747 | (info.byte_order == BIG_ENDIAN ? "big" |
| 4748 | : info.byte_order == LITTLE_ENDIAN ? "little" |
| 4749 | : "default")); |
| 4750 | fprintf_unfiltered (gdb_stdlog, |
| 4751 | "gdbarch_update: info.abfd 0x%lx\n", |
| 4752 | (long) info.abfd); |
| 4753 | fprintf_unfiltered (gdb_stdlog, |
| 4754 | "gdbarch_update: info.tdep_info 0x%lx\n", |
| 4755 | (long) info.tdep_info); |
| 4756 | } |
| 4757 | |
| 4758 | /* Find the target that knows about this architecture. */ |
| 4759 | for (rego = gdbarch_registry; |
| 4760 | rego != NULL; |
| 4761 | rego = rego->next) |
| 4762 | if (rego->bfd_architecture == info.bfd_arch_info->arch) |
| 4763 | break; |
| 4764 | if (rego == NULL) |
| 4765 | { |
| 4766 | if (gdbarch_debug) |
| 4767 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n"); |
| 4768 | return 0; |
| 4769 | } |
| 4770 | |
| 4771 | /* Ask the target for a replacement architecture. */ |
| 4772 | new_gdbarch = rego->init (info, rego->arches); |
| 4773 | |
| 4774 | /* Did the target like it? No. Reject the change. */ |
| 4775 | if (new_gdbarch == NULL) |
| 4776 | { |
| 4777 | if (gdbarch_debug) |
| 4778 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n"); |
| 4779 | return 0; |
| 4780 | } |
| 4781 | |
| 4782 | /* Did the architecture change? No. Do nothing. */ |
| 4783 | if (current_gdbarch == new_gdbarch) |
| 4784 | { |
| 4785 | if (gdbarch_debug) |
| 4786 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n", |
| 4787 | (long) new_gdbarch, |
| 4788 | new_gdbarch->bfd_arch_info->printable_name); |
| 4789 | return 1; |
| 4790 | } |
| 4791 | |
| 4792 | /* Swap all data belonging to the old target out */ |
| 4793 | swapout_gdbarch_swap (current_gdbarch); |
| 4794 | |
| 4795 | /* Is this a pre-existing architecture? Yes. Swap it in. */ |
| 4796 | for (list = ®o->arches; |
| 4797 | (*list) != NULL; |
| 4798 | list = &(*list)->next) |
| 4799 | { |
| 4800 | if ((*list)->gdbarch == new_gdbarch) |
| 4801 | { |
| 4802 | if (gdbarch_debug) |
| 4803 | fprintf_unfiltered (gdb_stdlog, |
| 4804 | "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n", |
| 4805 | (long) new_gdbarch, |
| 4806 | new_gdbarch->bfd_arch_info->printable_name); |
| 4807 | current_gdbarch = new_gdbarch; |
| 4808 | swapin_gdbarch_swap (new_gdbarch); |
| 4809 | architecture_changed_event (); |
| 4810 | return 1; |
| 4811 | } |
| 4812 | } |
| 4813 | |
| 4814 | /* Append this new architecture to this targets list. */ |
| 4815 | (*list) = XMALLOC (struct gdbarch_list); |
| 4816 | (*list)->next = NULL; |
| 4817 | (*list)->gdbarch = new_gdbarch; |
| 4818 | |
| 4819 | /* Switch to this new architecture. Dump it out. */ |
| 4820 | current_gdbarch = new_gdbarch; |
| 4821 | if (gdbarch_debug) |
| 4822 | { |
| 4823 | fprintf_unfiltered (gdb_stdlog, |
| 4824 | "gdbarch_update: New architecture 0x%08lx (%s) selected\n", |
| 4825 | (long) new_gdbarch, |
| 4826 | new_gdbarch->bfd_arch_info->printable_name); |
| 4827 | } |
| 4828 | |
| 4829 | /* Check that the newly installed architecture is valid. Plug in |
| 4830 | any post init values. */ |
| 4831 | new_gdbarch->dump_tdep = rego->dump_tdep; |
| 4832 | verify_gdbarch (new_gdbarch); |
| 4833 | |
| 4834 | /* Initialize the per-architecture memory (swap) areas. |
| 4835 | CURRENT_GDBARCH must be update before these modules are |
| 4836 | called. */ |
| 4837 | init_gdbarch_swap (new_gdbarch); |
| 4838 | |
| 4839 | /* Initialize the per-architecture data-pointer of all parties that |
| 4840 | registered an interest in this architecture. CURRENT_GDBARCH |
| 4841 | must be updated before these modules are called. */ |
| 4842 | init_gdbarch_data (new_gdbarch); |
| 4843 | architecture_changed_event (); |
| 4844 | |
| 4845 | if (gdbarch_debug) |
| 4846 | gdbarch_dump (current_gdbarch, gdb_stdlog); |
| 4847 | |
| 4848 | return 1; |
| 4849 | } |
| 4850 | |
| 4851 | |
| 4852 | /* Disassembler */ |
| 4853 | |
| 4854 | /* Pointer to the target-dependent disassembly function. */ |
| 4855 | int (*tm_print_insn) (bfd_vma, disassemble_info *); |
| 4856 | disassemble_info tm_print_insn_info; |
| 4857 | |
| 4858 | |
| 4859 | extern void _initialize_gdbarch (void); |
| 4860 | |
| 4861 | void |
| 4862 | _initialize_gdbarch (void) |
| 4863 | { |
| 4864 | struct cmd_list_element *c; |
| 4865 | |
| 4866 | INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered); |
| 4867 | tm_print_insn_info.flavour = bfd_target_unknown_flavour; |
| 4868 | tm_print_insn_info.read_memory_func = dis_asm_read_memory; |
| 4869 | tm_print_insn_info.memory_error_func = dis_asm_memory_error; |
| 4870 | tm_print_insn_info.print_address_func = dis_asm_print_address; |
| 4871 | |
| 4872 | add_show_from_set (add_set_cmd ("arch", |
| 4873 | class_maintenance, |
| 4874 | var_zinteger, |
| 4875 | (char *)&gdbarch_debug, |
| 4876 | "Set architecture debugging.\n\ |
| 4877 | When non-zero, architecture debugging is enabled.", &setdebuglist), |
| 4878 | &showdebuglist); |
| 4879 | c = add_set_cmd ("archdebug", |
| 4880 | class_maintenance, |
| 4881 | var_zinteger, |
| 4882 | (char *)&gdbarch_debug, |
| 4883 | "Set architecture debugging.\n\ |
| 4884 | When non-zero, architecture debugging is enabled.", &setlist); |
| 4885 | |
| 4886 | deprecate_cmd (c, "set debug arch"); |
| 4887 | deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch"); |
| 4888 | } |