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