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