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