| 1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */ |
| 2 | /* vi:set ro: */ |
| 3 | |
| 4 | /* Dynamic architecture support for GDB, the GNU debugger. |
| 5 | |
| 6 | Copyright (C) 1998-2014 Free Software Foundation, Inc. |
| 7 | |
| 8 | This file is part of GDB. |
| 9 | |
| 10 | This program is free software; you can redistribute it and/or modify |
| 11 | it under the terms of the GNU General Public License as published by |
| 12 | the Free Software Foundation; either version 3 of the License, or |
| 13 | (at your option) any later version. |
| 14 | |
| 15 | This program is distributed in the hope that it will be useful, |
| 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | GNU General Public License for more details. |
| 19 | |
| 20 | You should have received a copy of the GNU General Public License |
| 21 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 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" |
| 41 | #include "symcat.h" |
| 42 | |
| 43 | #include "floatformat.h" |
| 44 | |
| 45 | #include "gdb_assert.h" |
| 46 | #include <string.h> |
| 47 | #include "reggroups.h" |
| 48 | #include "osabi.h" |
| 49 | #include "gdb_obstack.h" |
| 50 | #include "observer.h" |
| 51 | #include "regcache.h" |
| 52 | #include "objfiles.h" |
| 53 | |
| 54 | /* Static function declarations */ |
| 55 | |
| 56 | static void alloc_gdbarch_data (struct gdbarch *); |
| 57 | |
| 58 | /* Non-zero if we want to trace architecture code. */ |
| 59 | |
| 60 | #ifndef GDBARCH_DEBUG |
| 61 | #define GDBARCH_DEBUG 0 |
| 62 | #endif |
| 63 | unsigned int gdbarch_debug = GDBARCH_DEBUG; |
| 64 | static void |
| 65 | show_gdbarch_debug (struct ui_file *file, int from_tty, |
| 66 | struct cmd_list_element *c, const char *value) |
| 67 | { |
| 68 | fprintf_filtered (file, _("Architecture debugging is %s.\n"), value); |
| 69 | } |
| 70 | |
| 71 | static const char * |
| 72 | pformat (const struct floatformat **format) |
| 73 | { |
| 74 | if (format == NULL) |
| 75 | return "(null)"; |
| 76 | else |
| 77 | /* Just print out one of them - this is only for diagnostics. */ |
| 78 | return format[0]->name; |
| 79 | } |
| 80 | |
| 81 | static const char * |
| 82 | pstring (const char *string) |
| 83 | { |
| 84 | if (string == NULL) |
| 85 | return "(null)"; |
| 86 | return string; |
| 87 | } |
| 88 | |
| 89 | /* Helper function to print a list of strings, represented as "const |
| 90 | char *const *". The list is printed comma-separated. */ |
| 91 | |
| 92 | static char * |
| 93 | pstring_list (const char *const *list) |
| 94 | { |
| 95 | static char ret[100]; |
| 96 | const char *const *p; |
| 97 | size_t offset = 0; |
| 98 | |
| 99 | if (list == NULL) |
| 100 | return "(null)"; |
| 101 | |
| 102 | ret[0] = '\0'; |
| 103 | for (p = list; *p != NULL && offset < sizeof (ret); ++p) |
| 104 | { |
| 105 | size_t s = xsnprintf (ret + offset, sizeof (ret) - offset, "%s, ", *p); |
| 106 | offset += 2 + s; |
| 107 | } |
| 108 | |
| 109 | if (offset > 0) |
| 110 | { |
| 111 | gdb_assert (offset - 2 < sizeof (ret)); |
| 112 | ret[offset - 2] = '\0'; |
| 113 | } |
| 114 | |
| 115 | return ret; |
| 116 | } |
| 117 | |
| 118 | |
| 119 | /* Maintain the struct gdbarch object. */ |
| 120 | |
| 121 | struct gdbarch |
| 122 | { |
| 123 | /* Has this architecture been fully initialized? */ |
| 124 | int initialized_p; |
| 125 | |
| 126 | /* An obstack bound to the lifetime of the architecture. */ |
| 127 | struct obstack *obstack; |
| 128 | |
| 129 | /* basic architectural information. */ |
| 130 | const struct bfd_arch_info * bfd_arch_info; |
| 131 | enum bfd_endian byte_order; |
| 132 | enum bfd_endian byte_order_for_code; |
| 133 | enum gdb_osabi osabi; |
| 134 | const struct target_desc * target_desc; |
| 135 | |
| 136 | /* target specific vector. */ |
| 137 | struct gdbarch_tdep *tdep; |
| 138 | gdbarch_dump_tdep_ftype *dump_tdep; |
| 139 | |
| 140 | /* per-architecture data-pointers. */ |
| 141 | unsigned nr_data; |
| 142 | void **data; |
| 143 | |
| 144 | /* Multi-arch values. |
| 145 | |
| 146 | When extending this structure you must: |
| 147 | |
| 148 | Add the field below. |
| 149 | |
| 150 | Declare set/get functions and define the corresponding |
| 151 | macro in gdbarch.h. |
| 152 | |
| 153 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
| 154 | initialize the new field. |
| 155 | |
| 156 | verify_gdbarch(): Confirm that the target updated the field |
| 157 | correctly. |
| 158 | |
| 159 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
| 160 | field is dumped out |
| 161 | |
| 162 | get_gdbarch(): Implement the set/get functions (probably using |
| 163 | the macro's as shortcuts). |
| 164 | |
| 165 | */ |
| 166 | |
| 167 | int bits_big_endian; |
| 168 | int short_bit; |
| 169 | int int_bit; |
| 170 | int long_bit; |
| 171 | int long_long_bit; |
| 172 | int long_long_align_bit; |
| 173 | int half_bit; |
| 174 | const struct floatformat ** half_format; |
| 175 | int float_bit; |
| 176 | const struct floatformat ** float_format; |
| 177 | int double_bit; |
| 178 | const struct floatformat ** double_format; |
| 179 | int long_double_bit; |
| 180 | const struct floatformat ** long_double_format; |
| 181 | int ptr_bit; |
| 182 | int addr_bit; |
| 183 | int dwarf2_addr_size; |
| 184 | int char_signed; |
| 185 | gdbarch_read_pc_ftype *read_pc; |
| 186 | gdbarch_write_pc_ftype *write_pc; |
| 187 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
| 188 | gdbarch_pseudo_register_read_ftype *pseudo_register_read; |
| 189 | gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value; |
| 190 | gdbarch_pseudo_register_write_ftype *pseudo_register_write; |
| 191 | int num_regs; |
| 192 | int num_pseudo_regs; |
| 193 | gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect; |
| 194 | gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack; |
| 195 | int sp_regnum; |
| 196 | int pc_regnum; |
| 197 | int ps_regnum; |
| 198 | int fp0_regnum; |
| 199 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
| 200 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; |
| 201 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; |
| 202 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; |
| 203 | gdbarch_register_name_ftype *register_name; |
| 204 | gdbarch_register_type_ftype *register_type; |
| 205 | gdbarch_dummy_id_ftype *dummy_id; |
| 206 | int deprecated_fp_regnum; |
| 207 | gdbarch_push_dummy_call_ftype *push_dummy_call; |
| 208 | int call_dummy_location; |
| 209 | gdbarch_push_dummy_code_ftype *push_dummy_code; |
| 210 | gdbarch_print_registers_info_ftype *print_registers_info; |
| 211 | gdbarch_print_float_info_ftype *print_float_info; |
| 212 | gdbarch_print_vector_info_ftype *print_vector_info; |
| 213 | gdbarch_register_sim_regno_ftype *register_sim_regno; |
| 214 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; |
| 215 | gdbarch_cannot_store_register_ftype *cannot_store_register; |
| 216 | gdbarch_get_longjmp_target_ftype *get_longjmp_target; |
| 217 | int believe_pcc_promotion; |
| 218 | gdbarch_convert_register_p_ftype *convert_register_p; |
| 219 | gdbarch_register_to_value_ftype *register_to_value; |
| 220 | gdbarch_value_to_register_ftype *value_to_register; |
| 221 | gdbarch_value_from_register_ftype *value_from_register; |
| 222 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
| 223 | gdbarch_address_to_pointer_ftype *address_to_pointer; |
| 224 | gdbarch_integer_to_address_ftype *integer_to_address; |
| 225 | gdbarch_return_value_ftype *return_value; |
| 226 | gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p; |
| 227 | gdbarch_skip_prologue_ftype *skip_prologue; |
| 228 | gdbarch_skip_main_prologue_ftype *skip_main_prologue; |
| 229 | gdbarch_skip_entrypoint_ftype *skip_entrypoint; |
| 230 | gdbarch_inner_than_ftype *inner_than; |
| 231 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; |
| 232 | gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc; |
| 233 | gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address; |
| 234 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
| 235 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; |
| 236 | CORE_ADDR decr_pc_after_break; |
| 237 | CORE_ADDR deprecated_function_start_offset; |
| 238 | gdbarch_remote_register_number_ftype *remote_register_number; |
| 239 | gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address; |
| 240 | CORE_ADDR frame_args_skip; |
| 241 | gdbarch_unwind_pc_ftype *unwind_pc; |
| 242 | gdbarch_unwind_sp_ftype *unwind_sp; |
| 243 | gdbarch_frame_num_args_ftype *frame_num_args; |
| 244 | gdbarch_frame_align_ftype *frame_align; |
| 245 | gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr; |
| 246 | int frame_red_zone_size; |
| 247 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
| 248 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
| 249 | gdbarch_software_single_step_ftype *software_single_step; |
| 250 | gdbarch_single_step_through_delay_ftype *single_step_through_delay; |
| 251 | gdbarch_print_insn_ftype *print_insn; |
| 252 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
| 253 | gdbarch_skip_solib_resolver_ftype *skip_solib_resolver; |
| 254 | gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; |
| 255 | gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; |
| 256 | gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; |
| 257 | gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; |
| 258 | int cannot_step_breakpoint; |
| 259 | int have_nonsteppable_watchpoint; |
| 260 | gdbarch_address_class_type_flags_ftype *address_class_type_flags; |
| 261 | gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name; |
| 262 | gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags; |
| 263 | gdbarch_register_reggroup_p_ftype *register_reggroup_p; |
| 264 | gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument; |
| 265 | gdbarch_regset_from_core_section_ftype *regset_from_core_section; |
| 266 | struct core_regset_section * core_regset_sections; |
| 267 | gdbarch_make_corefile_notes_ftype *make_corefile_notes; |
| 268 | gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo; |
| 269 | gdbarch_find_memory_regions_ftype *find_memory_regions; |
| 270 | gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries; |
| 271 | gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix; |
| 272 | gdbarch_core_pid_to_str_ftype *core_pid_to_str; |
| 273 | const char * gcore_bfd_target; |
| 274 | int vtable_function_descriptors; |
| 275 | int vbit_in_delta; |
| 276 | gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint; |
| 277 | ULONGEST max_insn_length; |
| 278 | gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn; |
| 279 | gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep; |
| 280 | gdbarch_displaced_step_fixup_ftype *displaced_step_fixup; |
| 281 | gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure; |
| 282 | gdbarch_displaced_step_location_ftype *displaced_step_location; |
| 283 | gdbarch_relocate_instruction_ftype *relocate_instruction; |
| 284 | gdbarch_overlay_update_ftype *overlay_update; |
| 285 | gdbarch_core_read_description_ftype *core_read_description; |
| 286 | gdbarch_static_transform_name_ftype *static_transform_name; |
| 287 | int sofun_address_maybe_missing; |
| 288 | gdbarch_process_record_ftype *process_record; |
| 289 | gdbarch_process_record_signal_ftype *process_record_signal; |
| 290 | gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target; |
| 291 | gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target; |
| 292 | gdbarch_get_siginfo_type_ftype *get_siginfo_type; |
| 293 | gdbarch_record_special_symbol_ftype *record_special_symbol; |
| 294 | gdbarch_get_syscall_number_ftype *get_syscall_number; |
| 295 | const char *const * stap_integer_prefixes; |
| 296 | const char *const * stap_integer_suffixes; |
| 297 | const char *const * stap_register_prefixes; |
| 298 | const char *const * stap_register_suffixes; |
| 299 | const char *const * stap_register_indirection_prefixes; |
| 300 | const char *const * stap_register_indirection_suffixes; |
| 301 | const char * stap_gdb_register_prefix; |
| 302 | const char * stap_gdb_register_suffix; |
| 303 | gdbarch_stap_is_single_operand_ftype *stap_is_single_operand; |
| 304 | gdbarch_stap_parse_special_token_ftype *stap_parse_special_token; |
| 305 | int has_global_solist; |
| 306 | int has_global_breakpoints; |
| 307 | gdbarch_has_shared_address_space_ftype *has_shared_address_space; |
| 308 | gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at; |
| 309 | gdbarch_auto_charset_ftype *auto_charset; |
| 310 | gdbarch_auto_wide_charset_ftype *auto_wide_charset; |
| 311 | const char * solib_symbols_extension; |
| 312 | int has_dos_based_file_system; |
| 313 | gdbarch_gen_return_address_ftype *gen_return_address; |
| 314 | gdbarch_info_proc_ftype *info_proc; |
| 315 | gdbarch_core_info_proc_ftype *core_info_proc; |
| 316 | gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order; |
| 317 | struct ravenscar_arch_ops * ravenscar_ops; |
| 318 | gdbarch_insn_is_call_ftype *insn_is_call; |
| 319 | gdbarch_insn_is_ret_ftype *insn_is_ret; |
| 320 | gdbarch_insn_is_jump_ftype *insn_is_jump; |
| 321 | gdbarch_auxv_parse_ftype *auxv_parse; |
| 322 | }; |
| 323 | |
| 324 | /* Create a new ``struct gdbarch'' based on information provided by |
| 325 | ``struct gdbarch_info''. */ |
| 326 | |
| 327 | struct gdbarch * |
| 328 | gdbarch_alloc (const struct gdbarch_info *info, |
| 329 | struct gdbarch_tdep *tdep) |
| 330 | { |
| 331 | struct gdbarch *gdbarch; |
| 332 | |
| 333 | /* Create an obstack for allocating all the per-architecture memory, |
| 334 | then use that to allocate the architecture vector. */ |
| 335 | struct obstack *obstack = XNEW (struct obstack); |
| 336 | obstack_init (obstack); |
| 337 | gdbarch = obstack_alloc (obstack, sizeof (*gdbarch)); |
| 338 | memset (gdbarch, 0, sizeof (*gdbarch)); |
| 339 | gdbarch->obstack = obstack; |
| 340 | |
| 341 | alloc_gdbarch_data (gdbarch); |
| 342 | |
| 343 | gdbarch->tdep = tdep; |
| 344 | |
| 345 | gdbarch->bfd_arch_info = info->bfd_arch_info; |
| 346 | gdbarch->byte_order = info->byte_order; |
| 347 | gdbarch->byte_order_for_code = info->byte_order_for_code; |
| 348 | gdbarch->osabi = info->osabi; |
| 349 | gdbarch->target_desc = info->target_desc; |
| 350 | |
| 351 | /* Force the explicit initialization of these. */ |
| 352 | gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG); |
| 353 | gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
| 354 | gdbarch->int_bit = 4*TARGET_CHAR_BIT; |
| 355 | gdbarch->long_bit = 4*TARGET_CHAR_BIT; |
| 356 | gdbarch->long_long_bit = 2*gdbarch->long_bit; |
| 357 | gdbarch->long_long_align_bit = 2*gdbarch->long_bit; |
| 358 | gdbarch->half_bit = 2*TARGET_CHAR_BIT; |
| 359 | gdbarch->float_bit = 4*TARGET_CHAR_BIT; |
| 360 | gdbarch->double_bit = 8*TARGET_CHAR_BIT; |
| 361 | gdbarch->long_double_bit = 8*TARGET_CHAR_BIT; |
| 362 | gdbarch->ptr_bit = gdbarch->int_bit; |
| 363 | gdbarch->char_signed = -1; |
| 364 | gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; |
| 365 | gdbarch->num_regs = -1; |
| 366 | gdbarch->sp_regnum = -1; |
| 367 | gdbarch->pc_regnum = -1; |
| 368 | gdbarch->ps_regnum = -1; |
| 369 | gdbarch->fp0_regnum = -1; |
| 370 | gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; |
| 371 | gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; |
| 372 | gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; |
| 373 | gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; |
| 374 | gdbarch->deprecated_fp_regnum = -1; |
| 375 | gdbarch->call_dummy_location = AT_ENTRY_POINT; |
| 376 | gdbarch->print_registers_info = default_print_registers_info; |
| 377 | gdbarch->register_sim_regno = legacy_register_sim_regno; |
| 378 | gdbarch->cannot_fetch_register = cannot_register_not; |
| 379 | gdbarch->cannot_store_register = cannot_register_not; |
| 380 | gdbarch->convert_register_p = generic_convert_register_p; |
| 381 | gdbarch->value_from_register = default_value_from_register; |
| 382 | gdbarch->pointer_to_address = unsigned_pointer_to_address; |
| 383 | gdbarch->address_to_pointer = unsigned_address_to_pointer; |
| 384 | gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p; |
| 385 | gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc; |
| 386 | gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; |
| 387 | gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; |
| 388 | gdbarch->remote_register_number = default_remote_register_number; |
| 389 | gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr; |
| 390 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity; |
| 391 | gdbarch->addr_bits_remove = core_addr_identity; |
| 392 | gdbarch->skip_trampoline_code = generic_skip_trampoline_code; |
| 393 | gdbarch->skip_solib_resolver = generic_skip_solib_resolver; |
| 394 | gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline; |
| 395 | gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; |
| 396 | gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special; |
| 397 | gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special; |
| 398 | gdbarch->register_reggroup_p = default_register_reggroup_p; |
| 399 | gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep; |
| 400 | gdbarch->displaced_step_fixup = NULL; |
| 401 | gdbarch->displaced_step_free_closure = NULL; |
| 402 | gdbarch->displaced_step_location = NULL; |
| 403 | gdbarch->relocate_instruction = NULL; |
| 404 | gdbarch->has_shared_address_space = default_has_shared_address_space; |
| 405 | gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at; |
| 406 | gdbarch->auto_charset = default_auto_charset; |
| 407 | gdbarch->auto_wide_charset = default_auto_wide_charset; |
| 408 | gdbarch->gen_return_address = default_gen_return_address; |
| 409 | gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order; |
| 410 | gdbarch->ravenscar_ops = NULL; |
| 411 | gdbarch->insn_is_call = default_insn_is_call; |
| 412 | gdbarch->insn_is_ret = default_insn_is_ret; |
| 413 | gdbarch->insn_is_jump = default_insn_is_jump; |
| 414 | /* gdbarch_alloc() */ |
| 415 | |
| 416 | return gdbarch; |
| 417 | } |
| 418 | |
| 419 | |
| 420 | /* Allocate extra space using the per-architecture obstack. */ |
| 421 | |
| 422 | void * |
| 423 | gdbarch_obstack_zalloc (struct gdbarch *arch, long size) |
| 424 | { |
| 425 | void *data = obstack_alloc (arch->obstack, size); |
| 426 | |
| 427 | memset (data, 0, size); |
| 428 | return data; |
| 429 | } |
| 430 | |
| 431 | |
| 432 | /* Free a gdbarch struct. This should never happen in normal |
| 433 | operation --- once you've created a gdbarch, you keep it around. |
| 434 | However, if an architecture's init function encounters an error |
| 435 | building the structure, it may need to clean up a partially |
| 436 | constructed gdbarch. */ |
| 437 | |
| 438 | void |
| 439 | gdbarch_free (struct gdbarch *arch) |
| 440 | { |
| 441 | struct obstack *obstack; |
| 442 | |
| 443 | gdb_assert (arch != NULL); |
| 444 | gdb_assert (!arch->initialized_p); |
| 445 | obstack = arch->obstack; |
| 446 | obstack_free (obstack, 0); /* Includes the ARCH. */ |
| 447 | xfree (obstack); |
| 448 | } |
| 449 | |
| 450 | |
| 451 | /* Ensure that all values in a GDBARCH are reasonable. */ |
| 452 | |
| 453 | static void |
| 454 | verify_gdbarch (struct gdbarch *gdbarch) |
| 455 | { |
| 456 | struct ui_file *log; |
| 457 | struct cleanup *cleanups; |
| 458 | long length; |
| 459 | char *buf; |
| 460 | |
| 461 | log = mem_fileopen (); |
| 462 | cleanups = make_cleanup_ui_file_delete (log); |
| 463 | /* fundamental */ |
| 464 | if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) |
| 465 | fprintf_unfiltered (log, "\n\tbyte-order"); |
| 466 | if (gdbarch->bfd_arch_info == NULL) |
| 467 | fprintf_unfiltered (log, "\n\tbfd_arch_info"); |
| 468 | /* Check those that need to be defined for the given multi-arch level. */ |
| 469 | /* Skip verify of bits_big_endian, invalid_p == 0 */ |
| 470 | /* Skip verify of short_bit, invalid_p == 0 */ |
| 471 | /* Skip verify of int_bit, invalid_p == 0 */ |
| 472 | /* Skip verify of long_bit, invalid_p == 0 */ |
| 473 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
| 474 | /* Skip verify of long_long_align_bit, invalid_p == 0 */ |
| 475 | /* Skip verify of half_bit, invalid_p == 0 */ |
| 476 | if (gdbarch->half_format == 0) |
| 477 | gdbarch->half_format = floatformats_ieee_half; |
| 478 | /* Skip verify of float_bit, invalid_p == 0 */ |
| 479 | if (gdbarch->float_format == 0) |
| 480 | gdbarch->float_format = floatformats_ieee_single; |
| 481 | /* Skip verify of double_bit, invalid_p == 0 */ |
| 482 | if (gdbarch->double_format == 0) |
| 483 | gdbarch->double_format = floatformats_ieee_double; |
| 484 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
| 485 | if (gdbarch->long_double_format == 0) |
| 486 | gdbarch->long_double_format = floatformats_ieee_double; |
| 487 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
| 488 | if (gdbarch->addr_bit == 0) |
| 489 | gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch); |
| 490 | if (gdbarch->dwarf2_addr_size == 0) |
| 491 | gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT; |
| 492 | if (gdbarch->char_signed == -1) |
| 493 | gdbarch->char_signed = 1; |
| 494 | /* Skip verify of read_pc, has predicate. */ |
| 495 | /* Skip verify of write_pc, has predicate. */ |
| 496 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
| 497 | /* Skip verify of pseudo_register_read, has predicate. */ |
| 498 | /* Skip verify of pseudo_register_read_value, has predicate. */ |
| 499 | /* Skip verify of pseudo_register_write, has predicate. */ |
| 500 | if (gdbarch->num_regs == -1) |
| 501 | fprintf_unfiltered (log, "\n\tnum_regs"); |
| 502 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
| 503 | /* Skip verify of ax_pseudo_register_collect, has predicate. */ |
| 504 | /* Skip verify of ax_pseudo_register_push_stack, has predicate. */ |
| 505 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
| 506 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
| 507 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
| 508 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
| 509 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
| 510 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ |
| 511 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ |
| 512 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ |
| 513 | if (gdbarch->register_name == 0) |
| 514 | fprintf_unfiltered (log, "\n\tregister_name"); |
| 515 | /* Skip verify of register_type, has predicate. */ |
| 516 | /* Skip verify of dummy_id, has predicate. */ |
| 517 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ |
| 518 | /* Skip verify of push_dummy_call, has predicate. */ |
| 519 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
| 520 | /* Skip verify of push_dummy_code, has predicate. */ |
| 521 | /* Skip verify of print_registers_info, invalid_p == 0 */ |
| 522 | /* Skip verify of print_float_info, has predicate. */ |
| 523 | /* Skip verify of print_vector_info, has predicate. */ |
| 524 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
| 525 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
| 526 | /* Skip verify of cannot_store_register, invalid_p == 0 */ |
| 527 | /* Skip verify of get_longjmp_target, has predicate. */ |
| 528 | /* Skip verify of convert_register_p, invalid_p == 0 */ |
| 529 | /* Skip verify of value_from_register, invalid_p == 0 */ |
| 530 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
| 531 | /* Skip verify of address_to_pointer, invalid_p == 0 */ |
| 532 | /* Skip verify of integer_to_address, has predicate. */ |
| 533 | /* Skip verify of return_value, has predicate. */ |
| 534 | /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */ |
| 535 | if (gdbarch->skip_prologue == 0) |
| 536 | fprintf_unfiltered (log, "\n\tskip_prologue"); |
| 537 | /* Skip verify of skip_main_prologue, has predicate. */ |
| 538 | /* Skip verify of skip_entrypoint, has predicate. */ |
| 539 | if (gdbarch->inner_than == 0) |
| 540 | fprintf_unfiltered (log, "\n\tinner_than"); |
| 541 | if (gdbarch->breakpoint_from_pc == 0) |
| 542 | fprintf_unfiltered (log, "\n\tbreakpoint_from_pc"); |
| 543 | /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */ |
| 544 | /* Skip verify of adjust_breakpoint_address, has predicate. */ |
| 545 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ |
| 546 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ |
| 547 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
| 548 | /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ |
| 549 | /* Skip verify of remote_register_number, invalid_p == 0 */ |
| 550 | /* Skip verify of fetch_tls_load_module_address, has predicate. */ |
| 551 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
| 552 | /* Skip verify of unwind_pc, has predicate. */ |
| 553 | /* Skip verify of unwind_sp, has predicate. */ |
| 554 | /* Skip verify of frame_num_args, has predicate. */ |
| 555 | /* Skip verify of frame_align, has predicate. */ |
| 556 | /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */ |
| 557 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
| 558 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
| 559 | /* Skip verify of software_single_step, has predicate. */ |
| 560 | /* Skip verify of single_step_through_delay, has predicate. */ |
| 561 | if (gdbarch->print_insn == 0) |
| 562 | fprintf_unfiltered (log, "\n\tprint_insn"); |
| 563 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
| 564 | /* Skip verify of skip_solib_resolver, invalid_p == 0 */ |
| 565 | /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ |
| 566 | /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ |
| 567 | /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ |
| 568 | /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ |
| 569 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ |
| 570 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ |
| 571 | /* Skip verify of address_class_type_flags, has predicate. */ |
| 572 | /* Skip verify of address_class_type_flags_to_name, has predicate. */ |
| 573 | /* Skip verify of address_class_name_to_type_flags, has predicate. */ |
| 574 | /* Skip verify of register_reggroup_p, invalid_p == 0 */ |
| 575 | /* Skip verify of fetch_pointer_argument, has predicate. */ |
| 576 | /* Skip verify of regset_from_core_section, has predicate. */ |
| 577 | /* Skip verify of make_corefile_notes, has predicate. */ |
| 578 | /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */ |
| 579 | /* Skip verify of find_memory_regions, has predicate. */ |
| 580 | /* Skip verify of core_xfer_shared_libraries, has predicate. */ |
| 581 | /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */ |
| 582 | /* Skip verify of core_pid_to_str, has predicate. */ |
| 583 | /* Skip verify of gcore_bfd_target, has predicate. */ |
| 584 | /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ |
| 585 | /* Skip verify of vbit_in_delta, invalid_p == 0 */ |
| 586 | /* Skip verify of skip_permanent_breakpoint, has predicate. */ |
| 587 | /* Skip verify of max_insn_length, has predicate. */ |
| 588 | /* Skip verify of displaced_step_copy_insn, has predicate. */ |
| 589 | /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */ |
| 590 | /* Skip verify of displaced_step_fixup, has predicate. */ |
| 591 | if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn)) |
| 592 | fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure"); |
| 593 | if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn)) |
| 594 | fprintf_unfiltered (log, "\n\tdisplaced_step_location"); |
| 595 | /* Skip verify of relocate_instruction, has predicate. */ |
| 596 | /* Skip verify of overlay_update, has predicate. */ |
| 597 | /* Skip verify of core_read_description, has predicate. */ |
| 598 | /* Skip verify of static_transform_name, has predicate. */ |
| 599 | /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ |
| 600 | /* Skip verify of process_record, has predicate. */ |
| 601 | /* Skip verify of process_record_signal, has predicate. */ |
| 602 | /* Skip verify of gdb_signal_from_target, has predicate. */ |
| 603 | /* Skip verify of gdb_signal_to_target, has predicate. */ |
| 604 | /* Skip verify of get_siginfo_type, has predicate. */ |
| 605 | /* Skip verify of record_special_symbol, has predicate. */ |
| 606 | /* Skip verify of get_syscall_number, has predicate. */ |
| 607 | /* Skip verify of stap_integer_prefixes, invalid_p == 0 */ |
| 608 | /* Skip verify of stap_integer_suffixes, invalid_p == 0 */ |
| 609 | /* Skip verify of stap_register_prefixes, invalid_p == 0 */ |
| 610 | /* Skip verify of stap_register_suffixes, invalid_p == 0 */ |
| 611 | /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */ |
| 612 | /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */ |
| 613 | /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ |
| 614 | /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ |
| 615 | /* Skip verify of stap_is_single_operand, has predicate. */ |
| 616 | /* Skip verify of stap_parse_special_token, has predicate. */ |
| 617 | /* Skip verify of has_global_solist, invalid_p == 0 */ |
| 618 | /* Skip verify of has_global_breakpoints, invalid_p == 0 */ |
| 619 | /* Skip verify of has_shared_address_space, invalid_p == 0 */ |
| 620 | /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */ |
| 621 | /* Skip verify of auto_charset, invalid_p == 0 */ |
| 622 | /* Skip verify of auto_wide_charset, invalid_p == 0 */ |
| 623 | /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ |
| 624 | /* Skip verify of gen_return_address, invalid_p == 0 */ |
| 625 | /* Skip verify of info_proc, has predicate. */ |
| 626 | /* Skip verify of core_info_proc, has predicate. */ |
| 627 | /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */ |
| 628 | /* Skip verify of ravenscar_ops, invalid_p == 0 */ |
| 629 | /* Skip verify of insn_is_call, invalid_p == 0 */ |
| 630 | /* Skip verify of insn_is_ret, invalid_p == 0 */ |
| 631 | /* Skip verify of insn_is_jump, invalid_p == 0 */ |
| 632 | /* Skip verify of auxv_parse, has predicate. */ |
| 633 | buf = ui_file_xstrdup (log, &length); |
| 634 | make_cleanup (xfree, buf); |
| 635 | if (length > 0) |
| 636 | internal_error (__FILE__, __LINE__, |
| 637 | _("verify_gdbarch: the following are invalid ...%s"), |
| 638 | buf); |
| 639 | do_cleanups (cleanups); |
| 640 | } |
| 641 | |
| 642 | |
| 643 | /* Print out the details of the current architecture. */ |
| 644 | |
| 645 | void |
| 646 | gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) |
| 647 | { |
| 648 | const char *gdb_nm_file = "<not-defined>"; |
| 649 | |
| 650 | #if defined (GDB_NM_FILE) |
| 651 | gdb_nm_file = GDB_NM_FILE; |
| 652 | #endif |
| 653 | fprintf_unfiltered (file, |
| 654 | "gdbarch_dump: GDB_NM_FILE = %s\n", |
| 655 | gdb_nm_file); |
| 656 | fprintf_unfiltered (file, |
| 657 | "gdbarch_dump: addr_bit = %s\n", |
| 658 | plongest (gdbarch->addr_bit)); |
| 659 | fprintf_unfiltered (file, |
| 660 | "gdbarch_dump: addr_bits_remove = <%s>\n", |
| 661 | host_address_to_string (gdbarch->addr_bits_remove)); |
| 662 | fprintf_unfiltered (file, |
| 663 | "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n", |
| 664 | gdbarch_address_class_name_to_type_flags_p (gdbarch)); |
| 665 | fprintf_unfiltered (file, |
| 666 | "gdbarch_dump: address_class_name_to_type_flags = <%s>\n", |
| 667 | host_address_to_string (gdbarch->address_class_name_to_type_flags)); |
| 668 | fprintf_unfiltered (file, |
| 669 | "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n", |
| 670 | gdbarch_address_class_type_flags_p (gdbarch)); |
| 671 | fprintf_unfiltered (file, |
| 672 | "gdbarch_dump: address_class_type_flags = <%s>\n", |
| 673 | host_address_to_string (gdbarch->address_class_type_flags)); |
| 674 | fprintf_unfiltered (file, |
| 675 | "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n", |
| 676 | gdbarch_address_class_type_flags_to_name_p (gdbarch)); |
| 677 | fprintf_unfiltered (file, |
| 678 | "gdbarch_dump: address_class_type_flags_to_name = <%s>\n", |
| 679 | host_address_to_string (gdbarch->address_class_type_flags_to_name)); |
| 680 | fprintf_unfiltered (file, |
| 681 | "gdbarch_dump: address_to_pointer = <%s>\n", |
| 682 | host_address_to_string (gdbarch->address_to_pointer)); |
| 683 | fprintf_unfiltered (file, |
| 684 | "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n", |
| 685 | gdbarch_adjust_breakpoint_address_p (gdbarch)); |
| 686 | fprintf_unfiltered (file, |
| 687 | "gdbarch_dump: adjust_breakpoint_address = <%s>\n", |
| 688 | host_address_to_string (gdbarch->adjust_breakpoint_address)); |
| 689 | fprintf_unfiltered (file, |
| 690 | "gdbarch_dump: auto_charset = <%s>\n", |
| 691 | host_address_to_string (gdbarch->auto_charset)); |
| 692 | fprintf_unfiltered (file, |
| 693 | "gdbarch_dump: auto_wide_charset = <%s>\n", |
| 694 | host_address_to_string (gdbarch->auto_wide_charset)); |
| 695 | fprintf_unfiltered (file, |
| 696 | "gdbarch_dump: gdbarch_auxv_parse_p() = %d\n", |
| 697 | gdbarch_auxv_parse_p (gdbarch)); |
| 698 | fprintf_unfiltered (file, |
| 699 | "gdbarch_dump: auxv_parse = <%s>\n", |
| 700 | host_address_to_string (gdbarch->auxv_parse)); |
| 701 | fprintf_unfiltered (file, |
| 702 | "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n", |
| 703 | gdbarch_ax_pseudo_register_collect_p (gdbarch)); |
| 704 | fprintf_unfiltered (file, |
| 705 | "gdbarch_dump: ax_pseudo_register_collect = <%s>\n", |
| 706 | host_address_to_string (gdbarch->ax_pseudo_register_collect)); |
| 707 | fprintf_unfiltered (file, |
| 708 | "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n", |
| 709 | gdbarch_ax_pseudo_register_push_stack_p (gdbarch)); |
| 710 | fprintf_unfiltered (file, |
| 711 | "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n", |
| 712 | host_address_to_string (gdbarch->ax_pseudo_register_push_stack)); |
| 713 | fprintf_unfiltered (file, |
| 714 | "gdbarch_dump: believe_pcc_promotion = %s\n", |
| 715 | plongest (gdbarch->believe_pcc_promotion)); |
| 716 | fprintf_unfiltered (file, |
| 717 | "gdbarch_dump: bfd_arch_info = %s\n", |
| 718 | gdbarch_bfd_arch_info (gdbarch)->printable_name); |
| 719 | fprintf_unfiltered (file, |
| 720 | "gdbarch_dump: bits_big_endian = %s\n", |
| 721 | plongest (gdbarch->bits_big_endian)); |
| 722 | fprintf_unfiltered (file, |
| 723 | "gdbarch_dump: breakpoint_from_pc = <%s>\n", |
| 724 | host_address_to_string (gdbarch->breakpoint_from_pc)); |
| 725 | fprintf_unfiltered (file, |
| 726 | "gdbarch_dump: byte_order = %s\n", |
| 727 | plongest (gdbarch->byte_order)); |
| 728 | fprintf_unfiltered (file, |
| 729 | "gdbarch_dump: byte_order_for_code = %s\n", |
| 730 | plongest (gdbarch->byte_order_for_code)); |
| 731 | fprintf_unfiltered (file, |
| 732 | "gdbarch_dump: call_dummy_location = %s\n", |
| 733 | plongest (gdbarch->call_dummy_location)); |
| 734 | fprintf_unfiltered (file, |
| 735 | "gdbarch_dump: cannot_fetch_register = <%s>\n", |
| 736 | host_address_to_string (gdbarch->cannot_fetch_register)); |
| 737 | fprintf_unfiltered (file, |
| 738 | "gdbarch_dump: cannot_step_breakpoint = %s\n", |
| 739 | plongest (gdbarch->cannot_step_breakpoint)); |
| 740 | fprintf_unfiltered (file, |
| 741 | "gdbarch_dump: cannot_store_register = <%s>\n", |
| 742 | host_address_to_string (gdbarch->cannot_store_register)); |
| 743 | fprintf_unfiltered (file, |
| 744 | "gdbarch_dump: char_signed = %s\n", |
| 745 | plongest (gdbarch->char_signed)); |
| 746 | fprintf_unfiltered (file, |
| 747 | "gdbarch_dump: coff_make_msymbol_special = <%s>\n", |
| 748 | host_address_to_string (gdbarch->coff_make_msymbol_special)); |
| 749 | fprintf_unfiltered (file, |
| 750 | "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n", |
| 751 | host_address_to_string (gdbarch->convert_from_func_ptr_addr)); |
| 752 | fprintf_unfiltered (file, |
| 753 | "gdbarch_dump: convert_register_p = <%s>\n", |
| 754 | host_address_to_string (gdbarch->convert_register_p)); |
| 755 | fprintf_unfiltered (file, |
| 756 | "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n", |
| 757 | gdbarch_core_info_proc_p (gdbarch)); |
| 758 | fprintf_unfiltered (file, |
| 759 | "gdbarch_dump: core_info_proc = <%s>\n", |
| 760 | host_address_to_string (gdbarch->core_info_proc)); |
| 761 | fprintf_unfiltered (file, |
| 762 | "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n", |
| 763 | gdbarch_core_pid_to_str_p (gdbarch)); |
| 764 | fprintf_unfiltered (file, |
| 765 | "gdbarch_dump: core_pid_to_str = <%s>\n", |
| 766 | host_address_to_string (gdbarch->core_pid_to_str)); |
| 767 | fprintf_unfiltered (file, |
| 768 | "gdbarch_dump: gdbarch_core_read_description_p() = %d\n", |
| 769 | gdbarch_core_read_description_p (gdbarch)); |
| 770 | fprintf_unfiltered (file, |
| 771 | "gdbarch_dump: core_read_description = <%s>\n", |
| 772 | host_address_to_string (gdbarch->core_read_description)); |
| 773 | fprintf_unfiltered (file, |
| 774 | "gdbarch_dump: core_regset_sections = %s\n", |
| 775 | host_address_to_string (gdbarch->core_regset_sections)); |
| 776 | fprintf_unfiltered (file, |
| 777 | "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n", |
| 778 | gdbarch_core_xfer_shared_libraries_p (gdbarch)); |
| 779 | fprintf_unfiltered (file, |
| 780 | "gdbarch_dump: core_xfer_shared_libraries = <%s>\n", |
| 781 | host_address_to_string (gdbarch->core_xfer_shared_libraries)); |
| 782 | fprintf_unfiltered (file, |
| 783 | "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n", |
| 784 | gdbarch_core_xfer_shared_libraries_aix_p (gdbarch)); |
| 785 | fprintf_unfiltered (file, |
| 786 | "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n", |
| 787 | host_address_to_string (gdbarch->core_xfer_shared_libraries_aix)); |
| 788 | fprintf_unfiltered (file, |
| 789 | "gdbarch_dump: decr_pc_after_break = %s\n", |
| 790 | core_addr_to_string_nz (gdbarch->decr_pc_after_break)); |
| 791 | fprintf_unfiltered (file, |
| 792 | "gdbarch_dump: deprecated_fp_regnum = %s\n", |
| 793 | plongest (gdbarch->deprecated_fp_regnum)); |
| 794 | fprintf_unfiltered (file, |
| 795 | "gdbarch_dump: deprecated_function_start_offset = %s\n", |
| 796 | core_addr_to_string_nz (gdbarch->deprecated_function_start_offset)); |
| 797 | fprintf_unfiltered (file, |
| 798 | "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n", |
| 799 | gdbarch_displaced_step_copy_insn_p (gdbarch)); |
| 800 | fprintf_unfiltered (file, |
| 801 | "gdbarch_dump: displaced_step_copy_insn = <%s>\n", |
| 802 | host_address_to_string (gdbarch->displaced_step_copy_insn)); |
| 803 | fprintf_unfiltered (file, |
| 804 | "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n", |
| 805 | gdbarch_displaced_step_fixup_p (gdbarch)); |
| 806 | fprintf_unfiltered (file, |
| 807 | "gdbarch_dump: displaced_step_fixup = <%s>\n", |
| 808 | host_address_to_string (gdbarch->displaced_step_fixup)); |
| 809 | fprintf_unfiltered (file, |
| 810 | "gdbarch_dump: displaced_step_free_closure = <%s>\n", |
| 811 | host_address_to_string (gdbarch->displaced_step_free_closure)); |
| 812 | fprintf_unfiltered (file, |
| 813 | "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n", |
| 814 | host_address_to_string (gdbarch->displaced_step_hw_singlestep)); |
| 815 | fprintf_unfiltered (file, |
| 816 | "gdbarch_dump: displaced_step_location = <%s>\n", |
| 817 | host_address_to_string (gdbarch->displaced_step_location)); |
| 818 | fprintf_unfiltered (file, |
| 819 | "gdbarch_dump: double_bit = %s\n", |
| 820 | plongest (gdbarch->double_bit)); |
| 821 | fprintf_unfiltered (file, |
| 822 | "gdbarch_dump: double_format = %s\n", |
| 823 | pformat (gdbarch->double_format)); |
| 824 | fprintf_unfiltered (file, |
| 825 | "gdbarch_dump: gdbarch_dummy_id_p() = %d\n", |
| 826 | gdbarch_dummy_id_p (gdbarch)); |
| 827 | fprintf_unfiltered (file, |
| 828 | "gdbarch_dump: dummy_id = <%s>\n", |
| 829 | host_address_to_string (gdbarch->dummy_id)); |
| 830 | fprintf_unfiltered (file, |
| 831 | "gdbarch_dump: dwarf2_addr_size = %s\n", |
| 832 | plongest (gdbarch->dwarf2_addr_size)); |
| 833 | fprintf_unfiltered (file, |
| 834 | "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n", |
| 835 | host_address_to_string (gdbarch->dwarf2_reg_to_regnum)); |
| 836 | fprintf_unfiltered (file, |
| 837 | "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n", |
| 838 | host_address_to_string (gdbarch->ecoff_reg_to_regnum)); |
| 839 | fprintf_unfiltered (file, |
| 840 | "gdbarch_dump: elf_make_msymbol_special = <%s>\n", |
| 841 | host_address_to_string (gdbarch->elf_make_msymbol_special)); |
| 842 | fprintf_unfiltered (file, |
| 843 | "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n", |
| 844 | gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch)); |
| 845 | fprintf_unfiltered (file, |
| 846 | "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n", |
| 847 | host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo)); |
| 848 | fprintf_unfiltered (file, |
| 849 | "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n", |
| 850 | host_address_to_string (gdbarch->fast_tracepoint_valid_at)); |
| 851 | fprintf_unfiltered (file, |
| 852 | "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n", |
| 853 | gdbarch_fetch_pointer_argument_p (gdbarch)); |
| 854 | fprintf_unfiltered (file, |
| 855 | "gdbarch_dump: fetch_pointer_argument = <%s>\n", |
| 856 | host_address_to_string (gdbarch->fetch_pointer_argument)); |
| 857 | fprintf_unfiltered (file, |
| 858 | "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n", |
| 859 | gdbarch_fetch_tls_load_module_address_p (gdbarch)); |
| 860 | fprintf_unfiltered (file, |
| 861 | "gdbarch_dump: fetch_tls_load_module_address = <%s>\n", |
| 862 | host_address_to_string (gdbarch->fetch_tls_load_module_address)); |
| 863 | fprintf_unfiltered (file, |
| 864 | "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n", |
| 865 | gdbarch_find_memory_regions_p (gdbarch)); |
| 866 | fprintf_unfiltered (file, |
| 867 | "gdbarch_dump: find_memory_regions = <%s>\n", |
| 868 | host_address_to_string (gdbarch->find_memory_regions)); |
| 869 | fprintf_unfiltered (file, |
| 870 | "gdbarch_dump: float_bit = %s\n", |
| 871 | plongest (gdbarch->float_bit)); |
| 872 | fprintf_unfiltered (file, |
| 873 | "gdbarch_dump: float_format = %s\n", |
| 874 | pformat (gdbarch->float_format)); |
| 875 | fprintf_unfiltered (file, |
| 876 | "gdbarch_dump: fp0_regnum = %s\n", |
| 877 | plongest (gdbarch->fp0_regnum)); |
| 878 | fprintf_unfiltered (file, |
| 879 | "gdbarch_dump: gdbarch_frame_align_p() = %d\n", |
| 880 | gdbarch_frame_align_p (gdbarch)); |
| 881 | fprintf_unfiltered (file, |
| 882 | "gdbarch_dump: frame_align = <%s>\n", |
| 883 | host_address_to_string (gdbarch->frame_align)); |
| 884 | fprintf_unfiltered (file, |
| 885 | "gdbarch_dump: frame_args_skip = %s\n", |
| 886 | core_addr_to_string_nz (gdbarch->frame_args_skip)); |
| 887 | fprintf_unfiltered (file, |
| 888 | "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n", |
| 889 | gdbarch_frame_num_args_p (gdbarch)); |
| 890 | fprintf_unfiltered (file, |
| 891 | "gdbarch_dump: frame_num_args = <%s>\n", |
| 892 | host_address_to_string (gdbarch->frame_num_args)); |
| 893 | fprintf_unfiltered (file, |
| 894 | "gdbarch_dump: frame_red_zone_size = %s\n", |
| 895 | plongest (gdbarch->frame_red_zone_size)); |
| 896 | fprintf_unfiltered (file, |
| 897 | "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n", |
| 898 | gdbarch_gcore_bfd_target_p (gdbarch)); |
| 899 | fprintf_unfiltered (file, |
| 900 | "gdbarch_dump: gcore_bfd_target = %s\n", |
| 901 | pstring (gdbarch->gcore_bfd_target)); |
| 902 | fprintf_unfiltered (file, |
| 903 | "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n", |
| 904 | gdbarch_gdb_signal_from_target_p (gdbarch)); |
| 905 | fprintf_unfiltered (file, |
| 906 | "gdbarch_dump: gdb_signal_from_target = <%s>\n", |
| 907 | host_address_to_string (gdbarch->gdb_signal_from_target)); |
| 908 | fprintf_unfiltered (file, |
| 909 | "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n", |
| 910 | gdbarch_gdb_signal_to_target_p (gdbarch)); |
| 911 | fprintf_unfiltered (file, |
| 912 | "gdbarch_dump: gdb_signal_to_target = <%s>\n", |
| 913 | host_address_to_string (gdbarch->gdb_signal_to_target)); |
| 914 | fprintf_unfiltered (file, |
| 915 | "gdbarch_dump: gen_return_address = <%s>\n", |
| 916 | host_address_to_string (gdbarch->gen_return_address)); |
| 917 | fprintf_unfiltered (file, |
| 918 | "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n", |
| 919 | gdbarch_get_longjmp_target_p (gdbarch)); |
| 920 | fprintf_unfiltered (file, |
| 921 | "gdbarch_dump: get_longjmp_target = <%s>\n", |
| 922 | host_address_to_string (gdbarch->get_longjmp_target)); |
| 923 | fprintf_unfiltered (file, |
| 924 | "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n", |
| 925 | gdbarch_get_siginfo_type_p (gdbarch)); |
| 926 | fprintf_unfiltered (file, |
| 927 | "gdbarch_dump: get_siginfo_type = <%s>\n", |
| 928 | host_address_to_string (gdbarch->get_siginfo_type)); |
| 929 | fprintf_unfiltered (file, |
| 930 | "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n", |
| 931 | gdbarch_get_syscall_number_p (gdbarch)); |
| 932 | fprintf_unfiltered (file, |
| 933 | "gdbarch_dump: get_syscall_number = <%s>\n", |
| 934 | host_address_to_string (gdbarch->get_syscall_number)); |
| 935 | fprintf_unfiltered (file, |
| 936 | "gdbarch_dump: half_bit = %s\n", |
| 937 | plongest (gdbarch->half_bit)); |
| 938 | fprintf_unfiltered (file, |
| 939 | "gdbarch_dump: half_format = %s\n", |
| 940 | pformat (gdbarch->half_format)); |
| 941 | fprintf_unfiltered (file, |
| 942 | "gdbarch_dump: has_dos_based_file_system = %s\n", |
| 943 | plongest (gdbarch->has_dos_based_file_system)); |
| 944 | fprintf_unfiltered (file, |
| 945 | "gdbarch_dump: has_global_breakpoints = %s\n", |
| 946 | plongest (gdbarch->has_global_breakpoints)); |
| 947 | fprintf_unfiltered (file, |
| 948 | "gdbarch_dump: has_global_solist = %s\n", |
| 949 | plongest (gdbarch->has_global_solist)); |
| 950 | fprintf_unfiltered (file, |
| 951 | "gdbarch_dump: has_shared_address_space = <%s>\n", |
| 952 | host_address_to_string (gdbarch->has_shared_address_space)); |
| 953 | fprintf_unfiltered (file, |
| 954 | "gdbarch_dump: have_nonsteppable_watchpoint = %s\n", |
| 955 | plongest (gdbarch->have_nonsteppable_watchpoint)); |
| 956 | fprintf_unfiltered (file, |
| 957 | "gdbarch_dump: in_function_epilogue_p = <%s>\n", |
| 958 | host_address_to_string (gdbarch->in_function_epilogue_p)); |
| 959 | fprintf_unfiltered (file, |
| 960 | "gdbarch_dump: in_solib_return_trampoline = <%s>\n", |
| 961 | host_address_to_string (gdbarch->in_solib_return_trampoline)); |
| 962 | fprintf_unfiltered (file, |
| 963 | "gdbarch_dump: gdbarch_info_proc_p() = %d\n", |
| 964 | gdbarch_info_proc_p (gdbarch)); |
| 965 | fprintf_unfiltered (file, |
| 966 | "gdbarch_dump: info_proc = <%s>\n", |
| 967 | host_address_to_string (gdbarch->info_proc)); |
| 968 | fprintf_unfiltered (file, |
| 969 | "gdbarch_dump: inner_than = <%s>\n", |
| 970 | host_address_to_string (gdbarch->inner_than)); |
| 971 | fprintf_unfiltered (file, |
| 972 | "gdbarch_dump: insn_is_call = <%s>\n", |
| 973 | host_address_to_string (gdbarch->insn_is_call)); |
| 974 | fprintf_unfiltered (file, |
| 975 | "gdbarch_dump: insn_is_jump = <%s>\n", |
| 976 | host_address_to_string (gdbarch->insn_is_jump)); |
| 977 | fprintf_unfiltered (file, |
| 978 | "gdbarch_dump: insn_is_ret = <%s>\n", |
| 979 | host_address_to_string (gdbarch->insn_is_ret)); |
| 980 | fprintf_unfiltered (file, |
| 981 | "gdbarch_dump: int_bit = %s\n", |
| 982 | plongest (gdbarch->int_bit)); |
| 983 | fprintf_unfiltered (file, |
| 984 | "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n", |
| 985 | gdbarch_integer_to_address_p (gdbarch)); |
| 986 | fprintf_unfiltered (file, |
| 987 | "gdbarch_dump: integer_to_address = <%s>\n", |
| 988 | host_address_to_string (gdbarch->integer_to_address)); |
| 989 | fprintf_unfiltered (file, |
| 990 | "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n", |
| 991 | host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order)); |
| 992 | fprintf_unfiltered (file, |
| 993 | "gdbarch_dump: long_bit = %s\n", |
| 994 | plongest (gdbarch->long_bit)); |
| 995 | fprintf_unfiltered (file, |
| 996 | "gdbarch_dump: long_double_bit = %s\n", |
| 997 | plongest (gdbarch->long_double_bit)); |
| 998 | fprintf_unfiltered (file, |
| 999 | "gdbarch_dump: long_double_format = %s\n", |
| 1000 | pformat (gdbarch->long_double_format)); |
| 1001 | fprintf_unfiltered (file, |
| 1002 | "gdbarch_dump: long_long_align_bit = %s\n", |
| 1003 | plongest (gdbarch->long_long_align_bit)); |
| 1004 | fprintf_unfiltered (file, |
| 1005 | "gdbarch_dump: long_long_bit = %s\n", |
| 1006 | plongest (gdbarch->long_long_bit)); |
| 1007 | fprintf_unfiltered (file, |
| 1008 | "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n", |
| 1009 | gdbarch_make_corefile_notes_p (gdbarch)); |
| 1010 | fprintf_unfiltered (file, |
| 1011 | "gdbarch_dump: make_corefile_notes = <%s>\n", |
| 1012 | host_address_to_string (gdbarch->make_corefile_notes)); |
| 1013 | fprintf_unfiltered (file, |
| 1014 | "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n", |
| 1015 | gdbarch_max_insn_length_p (gdbarch)); |
| 1016 | fprintf_unfiltered (file, |
| 1017 | "gdbarch_dump: max_insn_length = %s\n", |
| 1018 | plongest (gdbarch->max_insn_length)); |
| 1019 | fprintf_unfiltered (file, |
| 1020 | "gdbarch_dump: memory_insert_breakpoint = <%s>\n", |
| 1021 | host_address_to_string (gdbarch->memory_insert_breakpoint)); |
| 1022 | fprintf_unfiltered (file, |
| 1023 | "gdbarch_dump: memory_remove_breakpoint = <%s>\n", |
| 1024 | host_address_to_string (gdbarch->memory_remove_breakpoint)); |
| 1025 | fprintf_unfiltered (file, |
| 1026 | "gdbarch_dump: num_pseudo_regs = %s\n", |
| 1027 | plongest (gdbarch->num_pseudo_regs)); |
| 1028 | fprintf_unfiltered (file, |
| 1029 | "gdbarch_dump: num_regs = %s\n", |
| 1030 | plongest (gdbarch->num_regs)); |
| 1031 | fprintf_unfiltered (file, |
| 1032 | "gdbarch_dump: osabi = %s\n", |
| 1033 | plongest (gdbarch->osabi)); |
| 1034 | fprintf_unfiltered (file, |
| 1035 | "gdbarch_dump: gdbarch_overlay_update_p() = %d\n", |
| 1036 | gdbarch_overlay_update_p (gdbarch)); |
| 1037 | fprintf_unfiltered (file, |
| 1038 | "gdbarch_dump: overlay_update = <%s>\n", |
| 1039 | host_address_to_string (gdbarch->overlay_update)); |
| 1040 | fprintf_unfiltered (file, |
| 1041 | "gdbarch_dump: pc_regnum = %s\n", |
| 1042 | plongest (gdbarch->pc_regnum)); |
| 1043 | fprintf_unfiltered (file, |
| 1044 | "gdbarch_dump: pointer_to_address = <%s>\n", |
| 1045 | host_address_to_string (gdbarch->pointer_to_address)); |
| 1046 | fprintf_unfiltered (file, |
| 1047 | "gdbarch_dump: gdbarch_print_float_info_p() = %d\n", |
| 1048 | gdbarch_print_float_info_p (gdbarch)); |
| 1049 | fprintf_unfiltered (file, |
| 1050 | "gdbarch_dump: print_float_info = <%s>\n", |
| 1051 | host_address_to_string (gdbarch->print_float_info)); |
| 1052 | fprintf_unfiltered (file, |
| 1053 | "gdbarch_dump: print_insn = <%s>\n", |
| 1054 | host_address_to_string (gdbarch->print_insn)); |
| 1055 | fprintf_unfiltered (file, |
| 1056 | "gdbarch_dump: print_registers_info = <%s>\n", |
| 1057 | host_address_to_string (gdbarch->print_registers_info)); |
| 1058 | fprintf_unfiltered (file, |
| 1059 | "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", |
| 1060 | gdbarch_print_vector_info_p (gdbarch)); |
| 1061 | fprintf_unfiltered (file, |
| 1062 | "gdbarch_dump: print_vector_info = <%s>\n", |
| 1063 | host_address_to_string (gdbarch->print_vector_info)); |
| 1064 | fprintf_unfiltered (file, |
| 1065 | "gdbarch_dump: gdbarch_process_record_p() = %d\n", |
| 1066 | gdbarch_process_record_p (gdbarch)); |
| 1067 | fprintf_unfiltered (file, |
| 1068 | "gdbarch_dump: process_record = <%s>\n", |
| 1069 | host_address_to_string (gdbarch->process_record)); |
| 1070 | fprintf_unfiltered (file, |
| 1071 | "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n", |
| 1072 | gdbarch_process_record_signal_p (gdbarch)); |
| 1073 | fprintf_unfiltered (file, |
| 1074 | "gdbarch_dump: process_record_signal = <%s>\n", |
| 1075 | host_address_to_string (gdbarch->process_record_signal)); |
| 1076 | fprintf_unfiltered (file, |
| 1077 | "gdbarch_dump: ps_regnum = %s\n", |
| 1078 | plongest (gdbarch->ps_regnum)); |
| 1079 | fprintf_unfiltered (file, |
| 1080 | "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n", |
| 1081 | gdbarch_pseudo_register_read_p (gdbarch)); |
| 1082 | fprintf_unfiltered (file, |
| 1083 | "gdbarch_dump: pseudo_register_read = <%s>\n", |
| 1084 | host_address_to_string (gdbarch->pseudo_register_read)); |
| 1085 | fprintf_unfiltered (file, |
| 1086 | "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n", |
| 1087 | gdbarch_pseudo_register_read_value_p (gdbarch)); |
| 1088 | fprintf_unfiltered (file, |
| 1089 | "gdbarch_dump: pseudo_register_read_value = <%s>\n", |
| 1090 | host_address_to_string (gdbarch->pseudo_register_read_value)); |
| 1091 | fprintf_unfiltered (file, |
| 1092 | "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", |
| 1093 | gdbarch_pseudo_register_write_p (gdbarch)); |
| 1094 | fprintf_unfiltered (file, |
| 1095 | "gdbarch_dump: pseudo_register_write = <%s>\n", |
| 1096 | host_address_to_string (gdbarch->pseudo_register_write)); |
| 1097 | fprintf_unfiltered (file, |
| 1098 | "gdbarch_dump: ptr_bit = %s\n", |
| 1099 | plongest (gdbarch->ptr_bit)); |
| 1100 | fprintf_unfiltered (file, |
| 1101 | "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n", |
| 1102 | gdbarch_push_dummy_call_p (gdbarch)); |
| 1103 | fprintf_unfiltered (file, |
| 1104 | "gdbarch_dump: push_dummy_call = <%s>\n", |
| 1105 | host_address_to_string (gdbarch->push_dummy_call)); |
| 1106 | fprintf_unfiltered (file, |
| 1107 | "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n", |
| 1108 | gdbarch_push_dummy_code_p (gdbarch)); |
| 1109 | fprintf_unfiltered (file, |
| 1110 | "gdbarch_dump: push_dummy_code = <%s>\n", |
| 1111 | host_address_to_string (gdbarch->push_dummy_code)); |
| 1112 | fprintf_unfiltered (file, |
| 1113 | "gdbarch_dump: ravenscar_ops = %s\n", |
| 1114 | host_address_to_string (gdbarch->ravenscar_ops)); |
| 1115 | fprintf_unfiltered (file, |
| 1116 | "gdbarch_dump: gdbarch_read_pc_p() = %d\n", |
| 1117 | gdbarch_read_pc_p (gdbarch)); |
| 1118 | fprintf_unfiltered (file, |
| 1119 | "gdbarch_dump: read_pc = <%s>\n", |
| 1120 | host_address_to_string (gdbarch->read_pc)); |
| 1121 | fprintf_unfiltered (file, |
| 1122 | "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n", |
| 1123 | gdbarch_record_special_symbol_p (gdbarch)); |
| 1124 | fprintf_unfiltered (file, |
| 1125 | "gdbarch_dump: record_special_symbol = <%s>\n", |
| 1126 | host_address_to_string (gdbarch->record_special_symbol)); |
| 1127 | fprintf_unfiltered (file, |
| 1128 | "gdbarch_dump: register_name = <%s>\n", |
| 1129 | host_address_to_string (gdbarch->register_name)); |
| 1130 | fprintf_unfiltered (file, |
| 1131 | "gdbarch_dump: register_reggroup_p = <%s>\n", |
| 1132 | host_address_to_string (gdbarch->register_reggroup_p)); |
| 1133 | fprintf_unfiltered (file, |
| 1134 | "gdbarch_dump: register_sim_regno = <%s>\n", |
| 1135 | host_address_to_string (gdbarch->register_sim_regno)); |
| 1136 | fprintf_unfiltered (file, |
| 1137 | "gdbarch_dump: register_to_value = <%s>\n", |
| 1138 | host_address_to_string (gdbarch->register_to_value)); |
| 1139 | fprintf_unfiltered (file, |
| 1140 | "gdbarch_dump: gdbarch_register_type_p() = %d\n", |
| 1141 | gdbarch_register_type_p (gdbarch)); |
| 1142 | fprintf_unfiltered (file, |
| 1143 | "gdbarch_dump: register_type = <%s>\n", |
| 1144 | host_address_to_string (gdbarch->register_type)); |
| 1145 | fprintf_unfiltered (file, |
| 1146 | "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n", |
| 1147 | gdbarch_regset_from_core_section_p (gdbarch)); |
| 1148 | fprintf_unfiltered (file, |
| 1149 | "gdbarch_dump: regset_from_core_section = <%s>\n", |
| 1150 | host_address_to_string (gdbarch->regset_from_core_section)); |
| 1151 | fprintf_unfiltered (file, |
| 1152 | "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n", |
| 1153 | gdbarch_relocate_instruction_p (gdbarch)); |
| 1154 | fprintf_unfiltered (file, |
| 1155 | "gdbarch_dump: relocate_instruction = <%s>\n", |
| 1156 | host_address_to_string (gdbarch->relocate_instruction)); |
| 1157 | fprintf_unfiltered (file, |
| 1158 | "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n", |
| 1159 | host_address_to_string (gdbarch->remote_breakpoint_from_pc)); |
| 1160 | fprintf_unfiltered (file, |
| 1161 | "gdbarch_dump: remote_register_number = <%s>\n", |
| 1162 | host_address_to_string (gdbarch->remote_register_number)); |
| 1163 | fprintf_unfiltered (file, |
| 1164 | "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n", |
| 1165 | host_address_to_string (gdbarch->return_in_first_hidden_param_p)); |
| 1166 | fprintf_unfiltered (file, |
| 1167 | "gdbarch_dump: gdbarch_return_value_p() = %d\n", |
| 1168 | gdbarch_return_value_p (gdbarch)); |
| 1169 | fprintf_unfiltered (file, |
| 1170 | "gdbarch_dump: return_value = <%s>\n", |
| 1171 | host_address_to_string (gdbarch->return_value)); |
| 1172 | fprintf_unfiltered (file, |
| 1173 | "gdbarch_dump: sdb_reg_to_regnum = <%s>\n", |
| 1174 | host_address_to_string (gdbarch->sdb_reg_to_regnum)); |
| 1175 | fprintf_unfiltered (file, |
| 1176 | "gdbarch_dump: short_bit = %s\n", |
| 1177 | plongest (gdbarch->short_bit)); |
| 1178 | fprintf_unfiltered (file, |
| 1179 | "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n", |
| 1180 | gdbarch_single_step_through_delay_p (gdbarch)); |
| 1181 | fprintf_unfiltered (file, |
| 1182 | "gdbarch_dump: single_step_through_delay = <%s>\n", |
| 1183 | host_address_to_string (gdbarch->single_step_through_delay)); |
| 1184 | fprintf_unfiltered (file, |
| 1185 | "gdbarch_dump: gdbarch_skip_entrypoint_p() = %d\n", |
| 1186 | gdbarch_skip_entrypoint_p (gdbarch)); |
| 1187 | fprintf_unfiltered (file, |
| 1188 | "gdbarch_dump: skip_entrypoint = <%s>\n", |
| 1189 | host_address_to_string (gdbarch->skip_entrypoint)); |
| 1190 | fprintf_unfiltered (file, |
| 1191 | "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n", |
| 1192 | gdbarch_skip_main_prologue_p (gdbarch)); |
| 1193 | fprintf_unfiltered (file, |
| 1194 | "gdbarch_dump: skip_main_prologue = <%s>\n", |
| 1195 | host_address_to_string (gdbarch->skip_main_prologue)); |
| 1196 | fprintf_unfiltered (file, |
| 1197 | "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n", |
| 1198 | gdbarch_skip_permanent_breakpoint_p (gdbarch)); |
| 1199 | fprintf_unfiltered (file, |
| 1200 | "gdbarch_dump: skip_permanent_breakpoint = <%s>\n", |
| 1201 | host_address_to_string (gdbarch->skip_permanent_breakpoint)); |
| 1202 | fprintf_unfiltered (file, |
| 1203 | "gdbarch_dump: skip_prologue = <%s>\n", |
| 1204 | host_address_to_string (gdbarch->skip_prologue)); |
| 1205 | fprintf_unfiltered (file, |
| 1206 | "gdbarch_dump: skip_solib_resolver = <%s>\n", |
| 1207 | host_address_to_string (gdbarch->skip_solib_resolver)); |
| 1208 | fprintf_unfiltered (file, |
| 1209 | "gdbarch_dump: skip_trampoline_code = <%s>\n", |
| 1210 | host_address_to_string (gdbarch->skip_trampoline_code)); |
| 1211 | fprintf_unfiltered (file, |
| 1212 | "gdbarch_dump: gdbarch_software_single_step_p() = %d\n", |
| 1213 | gdbarch_software_single_step_p (gdbarch)); |
| 1214 | fprintf_unfiltered (file, |
| 1215 | "gdbarch_dump: software_single_step = <%s>\n", |
| 1216 | host_address_to_string (gdbarch->software_single_step)); |
| 1217 | fprintf_unfiltered (file, |
| 1218 | "gdbarch_dump: sofun_address_maybe_missing = %s\n", |
| 1219 | plongest (gdbarch->sofun_address_maybe_missing)); |
| 1220 | fprintf_unfiltered (file, |
| 1221 | "gdbarch_dump: solib_symbols_extension = %s\n", |
| 1222 | pstring (gdbarch->solib_symbols_extension)); |
| 1223 | fprintf_unfiltered (file, |
| 1224 | "gdbarch_dump: sp_regnum = %s\n", |
| 1225 | plongest (gdbarch->sp_regnum)); |
| 1226 | fprintf_unfiltered (file, |
| 1227 | "gdbarch_dump: stab_reg_to_regnum = <%s>\n", |
| 1228 | host_address_to_string (gdbarch->stab_reg_to_regnum)); |
| 1229 | fprintf_unfiltered (file, |
| 1230 | "gdbarch_dump: stabs_argument_has_addr = <%s>\n", |
| 1231 | host_address_to_string (gdbarch->stabs_argument_has_addr)); |
| 1232 | fprintf_unfiltered (file, |
| 1233 | "gdbarch_dump: stap_gdb_register_prefix = %s\n", |
| 1234 | pstring (gdbarch->stap_gdb_register_prefix)); |
| 1235 | fprintf_unfiltered (file, |
| 1236 | "gdbarch_dump: stap_gdb_register_suffix = %s\n", |
| 1237 | pstring (gdbarch->stap_gdb_register_suffix)); |
| 1238 | fprintf_unfiltered (file, |
| 1239 | "gdbarch_dump: stap_integer_prefixes = %s\n", |
| 1240 | pstring_list (gdbarch->stap_integer_prefixes)); |
| 1241 | fprintf_unfiltered (file, |
| 1242 | "gdbarch_dump: stap_integer_suffixes = %s\n", |
| 1243 | pstring_list (gdbarch->stap_integer_suffixes)); |
| 1244 | fprintf_unfiltered (file, |
| 1245 | "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n", |
| 1246 | gdbarch_stap_is_single_operand_p (gdbarch)); |
| 1247 | fprintf_unfiltered (file, |
| 1248 | "gdbarch_dump: stap_is_single_operand = <%s>\n", |
| 1249 | host_address_to_string (gdbarch->stap_is_single_operand)); |
| 1250 | fprintf_unfiltered (file, |
| 1251 | "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n", |
| 1252 | gdbarch_stap_parse_special_token_p (gdbarch)); |
| 1253 | fprintf_unfiltered (file, |
| 1254 | "gdbarch_dump: stap_parse_special_token = <%s>\n", |
| 1255 | host_address_to_string (gdbarch->stap_parse_special_token)); |
| 1256 | fprintf_unfiltered (file, |
| 1257 | "gdbarch_dump: stap_register_indirection_prefixes = %s\n", |
| 1258 | pstring_list (gdbarch->stap_register_indirection_prefixes)); |
| 1259 | fprintf_unfiltered (file, |
| 1260 | "gdbarch_dump: stap_register_indirection_suffixes = %s\n", |
| 1261 | pstring_list (gdbarch->stap_register_indirection_suffixes)); |
| 1262 | fprintf_unfiltered (file, |
| 1263 | "gdbarch_dump: stap_register_prefixes = %s\n", |
| 1264 | pstring_list (gdbarch->stap_register_prefixes)); |
| 1265 | fprintf_unfiltered (file, |
| 1266 | "gdbarch_dump: stap_register_suffixes = %s\n", |
| 1267 | pstring_list (gdbarch->stap_register_suffixes)); |
| 1268 | fprintf_unfiltered (file, |
| 1269 | "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n", |
| 1270 | gdbarch_static_transform_name_p (gdbarch)); |
| 1271 | fprintf_unfiltered (file, |
| 1272 | "gdbarch_dump: static_transform_name = <%s>\n", |
| 1273 | host_address_to_string (gdbarch->static_transform_name)); |
| 1274 | fprintf_unfiltered (file, |
| 1275 | "gdbarch_dump: target_desc = %s\n", |
| 1276 | host_address_to_string (gdbarch->target_desc)); |
| 1277 | fprintf_unfiltered (file, |
| 1278 | "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n", |
| 1279 | gdbarch_unwind_pc_p (gdbarch)); |
| 1280 | fprintf_unfiltered (file, |
| 1281 | "gdbarch_dump: unwind_pc = <%s>\n", |
| 1282 | host_address_to_string (gdbarch->unwind_pc)); |
| 1283 | fprintf_unfiltered (file, |
| 1284 | "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n", |
| 1285 | gdbarch_unwind_sp_p (gdbarch)); |
| 1286 | fprintf_unfiltered (file, |
| 1287 | "gdbarch_dump: unwind_sp = <%s>\n", |
| 1288 | host_address_to_string (gdbarch->unwind_sp)); |
| 1289 | fprintf_unfiltered (file, |
| 1290 | "gdbarch_dump: value_from_register = <%s>\n", |
| 1291 | host_address_to_string (gdbarch->value_from_register)); |
| 1292 | fprintf_unfiltered (file, |
| 1293 | "gdbarch_dump: value_to_register = <%s>\n", |
| 1294 | host_address_to_string (gdbarch->value_to_register)); |
| 1295 | fprintf_unfiltered (file, |
| 1296 | "gdbarch_dump: vbit_in_delta = %s\n", |
| 1297 | plongest (gdbarch->vbit_in_delta)); |
| 1298 | fprintf_unfiltered (file, |
| 1299 | "gdbarch_dump: virtual_frame_pointer = <%s>\n", |
| 1300 | host_address_to_string (gdbarch->virtual_frame_pointer)); |
| 1301 | fprintf_unfiltered (file, |
| 1302 | "gdbarch_dump: vtable_function_descriptors = %s\n", |
| 1303 | plongest (gdbarch->vtable_function_descriptors)); |
| 1304 | fprintf_unfiltered (file, |
| 1305 | "gdbarch_dump: gdbarch_write_pc_p() = %d\n", |
| 1306 | gdbarch_write_pc_p (gdbarch)); |
| 1307 | fprintf_unfiltered (file, |
| 1308 | "gdbarch_dump: write_pc = <%s>\n", |
| 1309 | host_address_to_string (gdbarch->write_pc)); |
| 1310 | if (gdbarch->dump_tdep != NULL) |
| 1311 | gdbarch->dump_tdep (gdbarch, file); |
| 1312 | } |
| 1313 | |
| 1314 | struct gdbarch_tdep * |
| 1315 | gdbarch_tdep (struct gdbarch *gdbarch) |
| 1316 | { |
| 1317 | if (gdbarch_debug >= 2) |
| 1318 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
| 1319 | return gdbarch->tdep; |
| 1320 | } |
| 1321 | |
| 1322 | |
| 1323 | const struct bfd_arch_info * |
| 1324 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
| 1325 | { |
| 1326 | gdb_assert (gdbarch != NULL); |
| 1327 | if (gdbarch_debug >= 2) |
| 1328 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
| 1329 | return gdbarch->bfd_arch_info; |
| 1330 | } |
| 1331 | |
| 1332 | enum bfd_endian |
| 1333 | gdbarch_byte_order (struct gdbarch *gdbarch) |
| 1334 | { |
| 1335 | gdb_assert (gdbarch != NULL); |
| 1336 | if (gdbarch_debug >= 2) |
| 1337 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
| 1338 | return gdbarch->byte_order; |
| 1339 | } |
| 1340 | |
| 1341 | enum bfd_endian |
| 1342 | gdbarch_byte_order_for_code (struct gdbarch *gdbarch) |
| 1343 | { |
| 1344 | gdb_assert (gdbarch != NULL); |
| 1345 | if (gdbarch_debug >= 2) |
| 1346 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n"); |
| 1347 | return gdbarch->byte_order_for_code; |
| 1348 | } |
| 1349 | |
| 1350 | enum gdb_osabi |
| 1351 | gdbarch_osabi (struct gdbarch *gdbarch) |
| 1352 | { |
| 1353 | gdb_assert (gdbarch != NULL); |
| 1354 | if (gdbarch_debug >= 2) |
| 1355 | fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n"); |
| 1356 | return gdbarch->osabi; |
| 1357 | } |
| 1358 | |
| 1359 | const struct target_desc * |
| 1360 | gdbarch_target_desc (struct gdbarch *gdbarch) |
| 1361 | { |
| 1362 | gdb_assert (gdbarch != NULL); |
| 1363 | if (gdbarch_debug >= 2) |
| 1364 | fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n"); |
| 1365 | return gdbarch->target_desc; |
| 1366 | } |
| 1367 | |
| 1368 | int |
| 1369 | gdbarch_bits_big_endian (struct gdbarch *gdbarch) |
| 1370 | { |
| 1371 | gdb_assert (gdbarch != NULL); |
| 1372 | /* Skip verify of bits_big_endian, invalid_p == 0 */ |
| 1373 | if (gdbarch_debug >= 2) |
| 1374 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n"); |
| 1375 | return gdbarch->bits_big_endian; |
| 1376 | } |
| 1377 | |
| 1378 | void |
| 1379 | set_gdbarch_bits_big_endian (struct gdbarch *gdbarch, |
| 1380 | int bits_big_endian) |
| 1381 | { |
| 1382 | gdbarch->bits_big_endian = bits_big_endian; |
| 1383 | } |
| 1384 | |
| 1385 | int |
| 1386 | gdbarch_short_bit (struct gdbarch *gdbarch) |
| 1387 | { |
| 1388 | gdb_assert (gdbarch != NULL); |
| 1389 | /* Skip verify of short_bit, invalid_p == 0 */ |
| 1390 | if (gdbarch_debug >= 2) |
| 1391 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
| 1392 | return gdbarch->short_bit; |
| 1393 | } |
| 1394 | |
| 1395 | void |
| 1396 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
| 1397 | int short_bit) |
| 1398 | { |
| 1399 | gdbarch->short_bit = short_bit; |
| 1400 | } |
| 1401 | |
| 1402 | int |
| 1403 | gdbarch_int_bit (struct gdbarch *gdbarch) |
| 1404 | { |
| 1405 | gdb_assert (gdbarch != NULL); |
| 1406 | /* Skip verify of int_bit, invalid_p == 0 */ |
| 1407 | if (gdbarch_debug >= 2) |
| 1408 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
| 1409 | return gdbarch->int_bit; |
| 1410 | } |
| 1411 | |
| 1412 | void |
| 1413 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
| 1414 | int int_bit) |
| 1415 | { |
| 1416 | gdbarch->int_bit = int_bit; |
| 1417 | } |
| 1418 | |
| 1419 | int |
| 1420 | gdbarch_long_bit (struct gdbarch *gdbarch) |
| 1421 | { |
| 1422 | gdb_assert (gdbarch != NULL); |
| 1423 | /* Skip verify of long_bit, invalid_p == 0 */ |
| 1424 | if (gdbarch_debug >= 2) |
| 1425 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
| 1426 | return gdbarch->long_bit; |
| 1427 | } |
| 1428 | |
| 1429 | void |
| 1430 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
| 1431 | int long_bit) |
| 1432 | { |
| 1433 | gdbarch->long_bit = long_bit; |
| 1434 | } |
| 1435 | |
| 1436 | int |
| 1437 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
| 1438 | { |
| 1439 | gdb_assert (gdbarch != NULL); |
| 1440 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
| 1441 | if (gdbarch_debug >= 2) |
| 1442 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
| 1443 | return gdbarch->long_long_bit; |
| 1444 | } |
| 1445 | |
| 1446 | void |
| 1447 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
| 1448 | int long_long_bit) |
| 1449 | { |
| 1450 | gdbarch->long_long_bit = long_long_bit; |
| 1451 | } |
| 1452 | |
| 1453 | int |
| 1454 | gdbarch_long_long_align_bit (struct gdbarch *gdbarch) |
| 1455 | { |
| 1456 | gdb_assert (gdbarch != NULL); |
| 1457 | /* Skip verify of long_long_align_bit, invalid_p == 0 */ |
| 1458 | if (gdbarch_debug >= 2) |
| 1459 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n"); |
| 1460 | return gdbarch->long_long_align_bit; |
| 1461 | } |
| 1462 | |
| 1463 | void |
| 1464 | set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch, |
| 1465 | int long_long_align_bit) |
| 1466 | { |
| 1467 | gdbarch->long_long_align_bit = long_long_align_bit; |
| 1468 | } |
| 1469 | |
| 1470 | int |
| 1471 | gdbarch_half_bit (struct gdbarch *gdbarch) |
| 1472 | { |
| 1473 | gdb_assert (gdbarch != NULL); |
| 1474 | /* Skip verify of half_bit, invalid_p == 0 */ |
| 1475 | if (gdbarch_debug >= 2) |
| 1476 | fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n"); |
| 1477 | return gdbarch->half_bit; |
| 1478 | } |
| 1479 | |
| 1480 | void |
| 1481 | set_gdbarch_half_bit (struct gdbarch *gdbarch, |
| 1482 | int half_bit) |
| 1483 | { |
| 1484 | gdbarch->half_bit = half_bit; |
| 1485 | } |
| 1486 | |
| 1487 | const struct floatformat ** |
| 1488 | gdbarch_half_format (struct gdbarch *gdbarch) |
| 1489 | { |
| 1490 | gdb_assert (gdbarch != NULL); |
| 1491 | if (gdbarch_debug >= 2) |
| 1492 | fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n"); |
| 1493 | return gdbarch->half_format; |
| 1494 | } |
| 1495 | |
| 1496 | void |
| 1497 | set_gdbarch_half_format (struct gdbarch *gdbarch, |
| 1498 | const struct floatformat ** half_format) |
| 1499 | { |
| 1500 | gdbarch->half_format = half_format; |
| 1501 | } |
| 1502 | |
| 1503 | int |
| 1504 | gdbarch_float_bit (struct gdbarch *gdbarch) |
| 1505 | { |
| 1506 | gdb_assert (gdbarch != NULL); |
| 1507 | /* Skip verify of float_bit, invalid_p == 0 */ |
| 1508 | if (gdbarch_debug >= 2) |
| 1509 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
| 1510 | return gdbarch->float_bit; |
| 1511 | } |
| 1512 | |
| 1513 | void |
| 1514 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
| 1515 | int float_bit) |
| 1516 | { |
| 1517 | gdbarch->float_bit = float_bit; |
| 1518 | } |
| 1519 | |
| 1520 | const struct floatformat ** |
| 1521 | gdbarch_float_format (struct gdbarch *gdbarch) |
| 1522 | { |
| 1523 | gdb_assert (gdbarch != NULL); |
| 1524 | if (gdbarch_debug >= 2) |
| 1525 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); |
| 1526 | return gdbarch->float_format; |
| 1527 | } |
| 1528 | |
| 1529 | void |
| 1530 | set_gdbarch_float_format (struct gdbarch *gdbarch, |
| 1531 | const struct floatformat ** float_format) |
| 1532 | { |
| 1533 | gdbarch->float_format = float_format; |
| 1534 | } |
| 1535 | |
| 1536 | int |
| 1537 | gdbarch_double_bit (struct gdbarch *gdbarch) |
| 1538 | { |
| 1539 | gdb_assert (gdbarch != NULL); |
| 1540 | /* Skip verify of double_bit, invalid_p == 0 */ |
| 1541 | if (gdbarch_debug >= 2) |
| 1542 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
| 1543 | return gdbarch->double_bit; |
| 1544 | } |
| 1545 | |
| 1546 | void |
| 1547 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
| 1548 | int double_bit) |
| 1549 | { |
| 1550 | gdbarch->double_bit = double_bit; |
| 1551 | } |
| 1552 | |
| 1553 | const struct floatformat ** |
| 1554 | gdbarch_double_format (struct gdbarch *gdbarch) |
| 1555 | { |
| 1556 | gdb_assert (gdbarch != NULL); |
| 1557 | if (gdbarch_debug >= 2) |
| 1558 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); |
| 1559 | return gdbarch->double_format; |
| 1560 | } |
| 1561 | |
| 1562 | void |
| 1563 | set_gdbarch_double_format (struct gdbarch *gdbarch, |
| 1564 | const struct floatformat ** double_format) |
| 1565 | { |
| 1566 | gdbarch->double_format = double_format; |
| 1567 | } |
| 1568 | |
| 1569 | int |
| 1570 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
| 1571 | { |
| 1572 | gdb_assert (gdbarch != NULL); |
| 1573 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
| 1574 | if (gdbarch_debug >= 2) |
| 1575 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
| 1576 | return gdbarch->long_double_bit; |
| 1577 | } |
| 1578 | |
| 1579 | void |
| 1580 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
| 1581 | int long_double_bit) |
| 1582 | { |
| 1583 | gdbarch->long_double_bit = long_double_bit; |
| 1584 | } |
| 1585 | |
| 1586 | const struct floatformat ** |
| 1587 | gdbarch_long_double_format (struct gdbarch *gdbarch) |
| 1588 | { |
| 1589 | gdb_assert (gdbarch != NULL); |
| 1590 | if (gdbarch_debug >= 2) |
| 1591 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); |
| 1592 | return gdbarch->long_double_format; |
| 1593 | } |
| 1594 | |
| 1595 | void |
| 1596 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, |
| 1597 | const struct floatformat ** long_double_format) |
| 1598 | { |
| 1599 | gdbarch->long_double_format = long_double_format; |
| 1600 | } |
| 1601 | |
| 1602 | int |
| 1603 | gdbarch_ptr_bit (struct gdbarch *gdbarch) |
| 1604 | { |
| 1605 | gdb_assert (gdbarch != NULL); |
| 1606 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
| 1607 | if (gdbarch_debug >= 2) |
| 1608 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); |
| 1609 | return gdbarch->ptr_bit; |
| 1610 | } |
| 1611 | |
| 1612 | void |
| 1613 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, |
| 1614 | int ptr_bit) |
| 1615 | { |
| 1616 | gdbarch->ptr_bit = ptr_bit; |
| 1617 | } |
| 1618 | |
| 1619 | int |
| 1620 | gdbarch_addr_bit (struct gdbarch *gdbarch) |
| 1621 | { |
| 1622 | gdb_assert (gdbarch != NULL); |
| 1623 | /* Check variable changed from pre-default. */ |
| 1624 | gdb_assert (gdbarch->addr_bit != 0); |
| 1625 | if (gdbarch_debug >= 2) |
| 1626 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); |
| 1627 | return gdbarch->addr_bit; |
| 1628 | } |
| 1629 | |
| 1630 | void |
| 1631 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, |
| 1632 | int addr_bit) |
| 1633 | { |
| 1634 | gdbarch->addr_bit = addr_bit; |
| 1635 | } |
| 1636 | |
| 1637 | int |
| 1638 | gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch) |
| 1639 | { |
| 1640 | gdb_assert (gdbarch != NULL); |
| 1641 | /* Check variable changed from pre-default. */ |
| 1642 | gdb_assert (gdbarch->dwarf2_addr_size != 0); |
| 1643 | if (gdbarch_debug >= 2) |
| 1644 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n"); |
| 1645 | return gdbarch->dwarf2_addr_size; |
| 1646 | } |
| 1647 | |
| 1648 | void |
| 1649 | set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch, |
| 1650 | int dwarf2_addr_size) |
| 1651 | { |
| 1652 | gdbarch->dwarf2_addr_size = dwarf2_addr_size; |
| 1653 | } |
| 1654 | |
| 1655 | int |
| 1656 | gdbarch_char_signed (struct gdbarch *gdbarch) |
| 1657 | { |
| 1658 | gdb_assert (gdbarch != NULL); |
| 1659 | /* Check variable changed from pre-default. */ |
| 1660 | gdb_assert (gdbarch->char_signed != -1); |
| 1661 | if (gdbarch_debug >= 2) |
| 1662 | fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); |
| 1663 | return gdbarch->char_signed; |
| 1664 | } |
| 1665 | |
| 1666 | void |
| 1667 | set_gdbarch_char_signed (struct gdbarch *gdbarch, |
| 1668 | int char_signed) |
| 1669 | { |
| 1670 | gdbarch->char_signed = char_signed; |
| 1671 | } |
| 1672 | |
| 1673 | int |
| 1674 | gdbarch_read_pc_p (struct gdbarch *gdbarch) |
| 1675 | { |
| 1676 | gdb_assert (gdbarch != NULL); |
| 1677 | return gdbarch->read_pc != NULL; |
| 1678 | } |
| 1679 | |
| 1680 | CORE_ADDR |
| 1681 | gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache) |
| 1682 | { |
| 1683 | gdb_assert (gdbarch != NULL); |
| 1684 | gdb_assert (gdbarch->read_pc != NULL); |
| 1685 | if (gdbarch_debug >= 2) |
| 1686 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
| 1687 | return gdbarch->read_pc (regcache); |
| 1688 | } |
| 1689 | |
| 1690 | void |
| 1691 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
| 1692 | gdbarch_read_pc_ftype read_pc) |
| 1693 | { |
| 1694 | gdbarch->read_pc = read_pc; |
| 1695 | } |
| 1696 | |
| 1697 | int |
| 1698 | gdbarch_write_pc_p (struct gdbarch *gdbarch) |
| 1699 | { |
| 1700 | gdb_assert (gdbarch != NULL); |
| 1701 | return gdbarch->write_pc != NULL; |
| 1702 | } |
| 1703 | |
| 1704 | void |
| 1705 | gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val) |
| 1706 | { |
| 1707 | gdb_assert (gdbarch != NULL); |
| 1708 | gdb_assert (gdbarch->write_pc != NULL); |
| 1709 | if (gdbarch_debug >= 2) |
| 1710 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
| 1711 | gdbarch->write_pc (regcache, val); |
| 1712 | } |
| 1713 | |
| 1714 | void |
| 1715 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
| 1716 | gdbarch_write_pc_ftype write_pc) |
| 1717 | { |
| 1718 | gdbarch->write_pc = write_pc; |
| 1719 | } |
| 1720 | |
| 1721 | void |
| 1722 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) |
| 1723 | { |
| 1724 | gdb_assert (gdbarch != NULL); |
| 1725 | gdb_assert (gdbarch->virtual_frame_pointer != NULL); |
| 1726 | if (gdbarch_debug >= 2) |
| 1727 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); |
| 1728 | gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset); |
| 1729 | } |
| 1730 | |
| 1731 | void |
| 1732 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, |
| 1733 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) |
| 1734 | { |
| 1735 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; |
| 1736 | } |
| 1737 | |
| 1738 | int |
| 1739 | gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch) |
| 1740 | { |
| 1741 | gdb_assert (gdbarch != NULL); |
| 1742 | return gdbarch->pseudo_register_read != NULL; |
| 1743 | } |
| 1744 | |
| 1745 | enum register_status |
| 1746 | gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf) |
| 1747 | { |
| 1748 | gdb_assert (gdbarch != NULL); |
| 1749 | gdb_assert (gdbarch->pseudo_register_read != NULL); |
| 1750 | if (gdbarch_debug >= 2) |
| 1751 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); |
| 1752 | return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); |
| 1753 | } |
| 1754 | |
| 1755 | void |
| 1756 | set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, |
| 1757 | gdbarch_pseudo_register_read_ftype pseudo_register_read) |
| 1758 | { |
| 1759 | gdbarch->pseudo_register_read = pseudo_register_read; |
| 1760 | } |
| 1761 | |
| 1762 | int |
| 1763 | gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch) |
| 1764 | { |
| 1765 | gdb_assert (gdbarch != NULL); |
| 1766 | return gdbarch->pseudo_register_read_value != NULL; |
| 1767 | } |
| 1768 | |
| 1769 | struct value * |
| 1770 | gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum) |
| 1771 | { |
| 1772 | gdb_assert (gdbarch != NULL); |
| 1773 | gdb_assert (gdbarch->pseudo_register_read_value != NULL); |
| 1774 | if (gdbarch_debug >= 2) |
| 1775 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n"); |
| 1776 | return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum); |
| 1777 | } |
| 1778 | |
| 1779 | void |
| 1780 | set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, |
| 1781 | gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value) |
| 1782 | { |
| 1783 | gdbarch->pseudo_register_read_value = pseudo_register_read_value; |
| 1784 | } |
| 1785 | |
| 1786 | int |
| 1787 | gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) |
| 1788 | { |
| 1789 | gdb_assert (gdbarch != NULL); |
| 1790 | return gdbarch->pseudo_register_write != NULL; |
| 1791 | } |
| 1792 | |
| 1793 | void |
| 1794 | gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf) |
| 1795 | { |
| 1796 | gdb_assert (gdbarch != NULL); |
| 1797 | gdb_assert (gdbarch->pseudo_register_write != NULL); |
| 1798 | if (gdbarch_debug >= 2) |
| 1799 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); |
| 1800 | gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); |
| 1801 | } |
| 1802 | |
| 1803 | void |
| 1804 | set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, |
| 1805 | gdbarch_pseudo_register_write_ftype pseudo_register_write) |
| 1806 | { |
| 1807 | gdbarch->pseudo_register_write = pseudo_register_write; |
| 1808 | } |
| 1809 | |
| 1810 | int |
| 1811 | gdbarch_num_regs (struct gdbarch *gdbarch) |
| 1812 | { |
| 1813 | gdb_assert (gdbarch != NULL); |
| 1814 | /* Check variable changed from pre-default. */ |
| 1815 | gdb_assert (gdbarch->num_regs != -1); |
| 1816 | if (gdbarch_debug >= 2) |
| 1817 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
| 1818 | return gdbarch->num_regs; |
| 1819 | } |
| 1820 | |
| 1821 | void |
| 1822 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
| 1823 | int num_regs) |
| 1824 | { |
| 1825 | gdbarch->num_regs = num_regs; |
| 1826 | } |
| 1827 | |
| 1828 | int |
| 1829 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) |
| 1830 | { |
| 1831 | gdb_assert (gdbarch != NULL); |
| 1832 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
| 1833 | if (gdbarch_debug >= 2) |
| 1834 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); |
| 1835 | return gdbarch->num_pseudo_regs; |
| 1836 | } |
| 1837 | |
| 1838 | void |
| 1839 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, |
| 1840 | int num_pseudo_regs) |
| 1841 | { |
| 1842 | gdbarch->num_pseudo_regs = num_pseudo_regs; |
| 1843 | } |
| 1844 | |
| 1845 | int |
| 1846 | gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch) |
| 1847 | { |
| 1848 | gdb_assert (gdbarch != NULL); |
| 1849 | return gdbarch->ax_pseudo_register_collect != NULL; |
| 1850 | } |
| 1851 | |
| 1852 | int |
| 1853 | gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg) |
| 1854 | { |
| 1855 | gdb_assert (gdbarch != NULL); |
| 1856 | gdb_assert (gdbarch->ax_pseudo_register_collect != NULL); |
| 1857 | if (gdbarch_debug >= 2) |
| 1858 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n"); |
| 1859 | return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg); |
| 1860 | } |
| 1861 | |
| 1862 | void |
| 1863 | set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, |
| 1864 | gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect) |
| 1865 | { |
| 1866 | gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect; |
| 1867 | } |
| 1868 | |
| 1869 | int |
| 1870 | gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch) |
| 1871 | { |
| 1872 | gdb_assert (gdbarch != NULL); |
| 1873 | return gdbarch->ax_pseudo_register_push_stack != NULL; |
| 1874 | } |
| 1875 | |
| 1876 | int |
| 1877 | gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg) |
| 1878 | { |
| 1879 | gdb_assert (gdbarch != NULL); |
| 1880 | gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL); |
| 1881 | if (gdbarch_debug >= 2) |
| 1882 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n"); |
| 1883 | return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg); |
| 1884 | } |
| 1885 | |
| 1886 | void |
| 1887 | set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, |
| 1888 | gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack) |
| 1889 | { |
| 1890 | gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack; |
| 1891 | } |
| 1892 | |
| 1893 | int |
| 1894 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
| 1895 | { |
| 1896 | gdb_assert (gdbarch != NULL); |
| 1897 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
| 1898 | if (gdbarch_debug >= 2) |
| 1899 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
| 1900 | return gdbarch->sp_regnum; |
| 1901 | } |
| 1902 | |
| 1903 | void |
| 1904 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
| 1905 | int sp_regnum) |
| 1906 | { |
| 1907 | gdbarch->sp_regnum = sp_regnum; |
| 1908 | } |
| 1909 | |
| 1910 | int |
| 1911 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
| 1912 | { |
| 1913 | gdb_assert (gdbarch != NULL); |
| 1914 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
| 1915 | if (gdbarch_debug >= 2) |
| 1916 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
| 1917 | return gdbarch->pc_regnum; |
| 1918 | } |
| 1919 | |
| 1920 | void |
| 1921 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
| 1922 | int pc_regnum) |
| 1923 | { |
| 1924 | gdbarch->pc_regnum = pc_regnum; |
| 1925 | } |
| 1926 | |
| 1927 | int |
| 1928 | gdbarch_ps_regnum (struct gdbarch *gdbarch) |
| 1929 | { |
| 1930 | gdb_assert (gdbarch != NULL); |
| 1931 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
| 1932 | if (gdbarch_debug >= 2) |
| 1933 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); |
| 1934 | return gdbarch->ps_regnum; |
| 1935 | } |
| 1936 | |
| 1937 | void |
| 1938 | set_gdbarch_ps_regnum (struct gdbarch *gdbarch, |
| 1939 | int ps_regnum) |
| 1940 | { |
| 1941 | gdbarch->ps_regnum = ps_regnum; |
| 1942 | } |
| 1943 | |
| 1944 | int |
| 1945 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) |
| 1946 | { |
| 1947 | gdb_assert (gdbarch != NULL); |
| 1948 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
| 1949 | if (gdbarch_debug >= 2) |
| 1950 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); |
| 1951 | return gdbarch->fp0_regnum; |
| 1952 | } |
| 1953 | |
| 1954 | void |
| 1955 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, |
| 1956 | int fp0_regnum) |
| 1957 | { |
| 1958 | gdbarch->fp0_regnum = fp0_regnum; |
| 1959 | } |
| 1960 | |
| 1961 | int |
| 1962 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) |
| 1963 | { |
| 1964 | gdb_assert (gdbarch != NULL); |
| 1965 | gdb_assert (gdbarch->stab_reg_to_regnum != NULL); |
| 1966 | if (gdbarch_debug >= 2) |
| 1967 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); |
| 1968 | return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr); |
| 1969 | } |
| 1970 | |
| 1971 | void |
| 1972 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, |
| 1973 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) |
| 1974 | { |
| 1975 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; |
| 1976 | } |
| 1977 | |
| 1978 | int |
| 1979 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) |
| 1980 | { |
| 1981 | gdb_assert (gdbarch != NULL); |
| 1982 | gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); |
| 1983 | if (gdbarch_debug >= 2) |
| 1984 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); |
| 1985 | return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr); |
| 1986 | } |
| 1987 | |
| 1988 | void |
| 1989 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, |
| 1990 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) |
| 1991 | { |
| 1992 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; |
| 1993 | } |
| 1994 | |
| 1995 | int |
| 1996 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) |
| 1997 | { |
| 1998 | gdb_assert (gdbarch != NULL); |
| 1999 | gdb_assert (gdbarch->sdb_reg_to_regnum != NULL); |
| 2000 | if (gdbarch_debug >= 2) |
| 2001 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); |
| 2002 | return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr); |
| 2003 | } |
| 2004 | |
| 2005 | void |
| 2006 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, |
| 2007 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) |
| 2008 | { |
| 2009 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; |
| 2010 | } |
| 2011 | |
| 2012 | int |
| 2013 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) |
| 2014 | { |
| 2015 | gdb_assert (gdbarch != NULL); |
| 2016 | gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL); |
| 2017 | if (gdbarch_debug >= 2) |
| 2018 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); |
| 2019 | return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr); |
| 2020 | } |
| 2021 | |
| 2022 | void |
| 2023 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, |
| 2024 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) |
| 2025 | { |
| 2026 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; |
| 2027 | } |
| 2028 | |
| 2029 | const char * |
| 2030 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) |
| 2031 | { |
| 2032 | gdb_assert (gdbarch != NULL); |
| 2033 | gdb_assert (gdbarch->register_name != NULL); |
| 2034 | if (gdbarch_debug >= 2) |
| 2035 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
| 2036 | return gdbarch->register_name (gdbarch, regnr); |
| 2037 | } |
| 2038 | |
| 2039 | void |
| 2040 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
| 2041 | gdbarch_register_name_ftype register_name) |
| 2042 | { |
| 2043 | gdbarch->register_name = register_name; |
| 2044 | } |
| 2045 | |
| 2046 | int |
| 2047 | gdbarch_register_type_p (struct gdbarch *gdbarch) |
| 2048 | { |
| 2049 | gdb_assert (gdbarch != NULL); |
| 2050 | return gdbarch->register_type != NULL; |
| 2051 | } |
| 2052 | |
| 2053 | struct type * |
| 2054 | gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr) |
| 2055 | { |
| 2056 | gdb_assert (gdbarch != NULL); |
| 2057 | gdb_assert (gdbarch->register_type != NULL); |
| 2058 | if (gdbarch_debug >= 2) |
| 2059 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n"); |
| 2060 | return gdbarch->register_type (gdbarch, reg_nr); |
| 2061 | } |
| 2062 | |
| 2063 | void |
| 2064 | set_gdbarch_register_type (struct gdbarch *gdbarch, |
| 2065 | gdbarch_register_type_ftype register_type) |
| 2066 | { |
| 2067 | gdbarch->register_type = register_type; |
| 2068 | } |
| 2069 | |
| 2070 | int |
| 2071 | gdbarch_dummy_id_p (struct gdbarch *gdbarch) |
| 2072 | { |
| 2073 | gdb_assert (gdbarch != NULL); |
| 2074 | return gdbarch->dummy_id != NULL; |
| 2075 | } |
| 2076 | |
| 2077 | struct frame_id |
| 2078 | gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) |
| 2079 | { |
| 2080 | gdb_assert (gdbarch != NULL); |
| 2081 | gdb_assert (gdbarch->dummy_id != NULL); |
| 2082 | if (gdbarch_debug >= 2) |
| 2083 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n"); |
| 2084 | return gdbarch->dummy_id (gdbarch, this_frame); |
| 2085 | } |
| 2086 | |
| 2087 | void |
| 2088 | set_gdbarch_dummy_id (struct gdbarch *gdbarch, |
| 2089 | gdbarch_dummy_id_ftype dummy_id) |
| 2090 | { |
| 2091 | gdbarch->dummy_id = dummy_id; |
| 2092 | } |
| 2093 | |
| 2094 | int |
| 2095 | gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch) |
| 2096 | { |
| 2097 | gdb_assert (gdbarch != NULL); |
| 2098 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ |
| 2099 | if (gdbarch_debug >= 2) |
| 2100 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); |
| 2101 | return gdbarch->deprecated_fp_regnum; |
| 2102 | } |
| 2103 | |
| 2104 | void |
| 2105 | set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, |
| 2106 | int deprecated_fp_regnum) |
| 2107 | { |
| 2108 | gdbarch->deprecated_fp_regnum = deprecated_fp_regnum; |
| 2109 | } |
| 2110 | |
| 2111 | int |
| 2112 | gdbarch_push_dummy_call_p (struct gdbarch *gdbarch) |
| 2113 | { |
| 2114 | gdb_assert (gdbarch != NULL); |
| 2115 | return gdbarch->push_dummy_call != NULL; |
| 2116 | } |
| 2117 | |
| 2118 | CORE_ADDR |
| 2119 | gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) |
| 2120 | { |
| 2121 | gdb_assert (gdbarch != NULL); |
| 2122 | gdb_assert (gdbarch->push_dummy_call != NULL); |
| 2123 | if (gdbarch_debug >= 2) |
| 2124 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n"); |
| 2125 | return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr); |
| 2126 | } |
| 2127 | |
| 2128 | void |
| 2129 | set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, |
| 2130 | gdbarch_push_dummy_call_ftype push_dummy_call) |
| 2131 | { |
| 2132 | gdbarch->push_dummy_call = push_dummy_call; |
| 2133 | } |
| 2134 | |
| 2135 | int |
| 2136 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
| 2137 | { |
| 2138 | gdb_assert (gdbarch != NULL); |
| 2139 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
| 2140 | if (gdbarch_debug >= 2) |
| 2141 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); |
| 2142 | return gdbarch->call_dummy_location; |
| 2143 | } |
| 2144 | |
| 2145 | void |
| 2146 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, |
| 2147 | int call_dummy_location) |
| 2148 | { |
| 2149 | gdbarch->call_dummy_location = call_dummy_location; |
| 2150 | } |
| 2151 | |
| 2152 | int |
| 2153 | gdbarch_push_dummy_code_p (struct gdbarch *gdbarch) |
| 2154 | { |
| 2155 | gdb_assert (gdbarch != NULL); |
| 2156 | return gdbarch->push_dummy_code != NULL; |
| 2157 | } |
| 2158 | |
| 2159 | CORE_ADDR |
| 2160 | gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache) |
| 2161 | { |
| 2162 | gdb_assert (gdbarch != NULL); |
| 2163 | gdb_assert (gdbarch->push_dummy_code != NULL); |
| 2164 | if (gdbarch_debug >= 2) |
| 2165 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n"); |
| 2166 | return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache); |
| 2167 | } |
| 2168 | |
| 2169 | void |
| 2170 | set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, |
| 2171 | gdbarch_push_dummy_code_ftype push_dummy_code) |
| 2172 | { |
| 2173 | gdbarch->push_dummy_code = push_dummy_code; |
| 2174 | } |
| 2175 | |
| 2176 | void |
| 2177 | gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) |
| 2178 | { |
| 2179 | gdb_assert (gdbarch != NULL); |
| 2180 | gdb_assert (gdbarch->print_registers_info != NULL); |
| 2181 | if (gdbarch_debug >= 2) |
| 2182 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); |
| 2183 | gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); |
| 2184 | } |
| 2185 | |
| 2186 | void |
| 2187 | set_gdbarch_print_registers_info (struct gdbarch *gdbarch, |
| 2188 | gdbarch_print_registers_info_ftype print_registers_info) |
| 2189 | { |
| 2190 | gdbarch->print_registers_info = print_registers_info; |
| 2191 | } |
| 2192 | |
| 2193 | int |
| 2194 | gdbarch_print_float_info_p (struct gdbarch *gdbarch) |
| 2195 | { |
| 2196 | gdb_assert (gdbarch != NULL); |
| 2197 | return gdbarch->print_float_info != NULL; |
| 2198 | } |
| 2199 | |
| 2200 | void |
| 2201 | gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) |
| 2202 | { |
| 2203 | gdb_assert (gdbarch != NULL); |
| 2204 | gdb_assert (gdbarch->print_float_info != NULL); |
| 2205 | if (gdbarch_debug >= 2) |
| 2206 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); |
| 2207 | gdbarch->print_float_info (gdbarch, file, frame, args); |
| 2208 | } |
| 2209 | |
| 2210 | void |
| 2211 | set_gdbarch_print_float_info (struct gdbarch *gdbarch, |
| 2212 | gdbarch_print_float_info_ftype print_float_info) |
| 2213 | { |
| 2214 | gdbarch->print_float_info = print_float_info; |
| 2215 | } |
| 2216 | |
| 2217 | int |
| 2218 | gdbarch_print_vector_info_p (struct gdbarch *gdbarch) |
| 2219 | { |
| 2220 | gdb_assert (gdbarch != NULL); |
| 2221 | return gdbarch->print_vector_info != NULL; |
| 2222 | } |
| 2223 | |
| 2224 | void |
| 2225 | gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) |
| 2226 | { |
| 2227 | gdb_assert (gdbarch != NULL); |
| 2228 | gdb_assert (gdbarch->print_vector_info != NULL); |
| 2229 | if (gdbarch_debug >= 2) |
| 2230 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); |
| 2231 | gdbarch->print_vector_info (gdbarch, file, frame, args); |
| 2232 | } |
| 2233 | |
| 2234 | void |
| 2235 | set_gdbarch_print_vector_info (struct gdbarch *gdbarch, |
| 2236 | gdbarch_print_vector_info_ftype print_vector_info) |
| 2237 | { |
| 2238 | gdbarch->print_vector_info = print_vector_info; |
| 2239 | } |
| 2240 | |
| 2241 | int |
| 2242 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) |
| 2243 | { |
| 2244 | gdb_assert (gdbarch != NULL); |
| 2245 | gdb_assert (gdbarch->register_sim_regno != NULL); |
| 2246 | if (gdbarch_debug >= 2) |
| 2247 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); |
| 2248 | return gdbarch->register_sim_regno (gdbarch, reg_nr); |
| 2249 | } |
| 2250 | |
| 2251 | void |
| 2252 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, |
| 2253 | gdbarch_register_sim_regno_ftype register_sim_regno) |
| 2254 | { |
| 2255 | gdbarch->register_sim_regno = register_sim_regno; |
| 2256 | } |
| 2257 | |
| 2258 | int |
| 2259 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
| 2260 | { |
| 2261 | gdb_assert (gdbarch != NULL); |
| 2262 | gdb_assert (gdbarch->cannot_fetch_register != NULL); |
| 2263 | if (gdbarch_debug >= 2) |
| 2264 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); |
| 2265 | return gdbarch->cannot_fetch_register (gdbarch, regnum); |
| 2266 | } |
| 2267 | |
| 2268 | void |
| 2269 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, |
| 2270 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) |
| 2271 | { |
| 2272 | gdbarch->cannot_fetch_register = cannot_fetch_register; |
| 2273 | } |
| 2274 | |
| 2275 | int |
| 2276 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
| 2277 | { |
| 2278 | gdb_assert (gdbarch != NULL); |
| 2279 | gdb_assert (gdbarch->cannot_store_register != NULL); |
| 2280 | if (gdbarch_debug >= 2) |
| 2281 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); |
| 2282 | return gdbarch->cannot_store_register (gdbarch, regnum); |
| 2283 | } |
| 2284 | |
| 2285 | void |
| 2286 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, |
| 2287 | gdbarch_cannot_store_register_ftype cannot_store_register) |
| 2288 | { |
| 2289 | gdbarch->cannot_store_register = cannot_store_register; |
| 2290 | } |
| 2291 | |
| 2292 | int |
| 2293 | gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) |
| 2294 | { |
| 2295 | gdb_assert (gdbarch != NULL); |
| 2296 | return gdbarch->get_longjmp_target != NULL; |
| 2297 | } |
| 2298 | |
| 2299 | int |
| 2300 | gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc) |
| 2301 | { |
| 2302 | gdb_assert (gdbarch != NULL); |
| 2303 | gdb_assert (gdbarch->get_longjmp_target != NULL); |
| 2304 | if (gdbarch_debug >= 2) |
| 2305 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); |
| 2306 | return gdbarch->get_longjmp_target (frame, pc); |
| 2307 | } |
| 2308 | |
| 2309 | void |
| 2310 | set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, |
| 2311 | gdbarch_get_longjmp_target_ftype get_longjmp_target) |
| 2312 | { |
| 2313 | gdbarch->get_longjmp_target = get_longjmp_target; |
| 2314 | } |
| 2315 | |
| 2316 | int |
| 2317 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
| 2318 | { |
| 2319 | gdb_assert (gdbarch != NULL); |
| 2320 | if (gdbarch_debug >= 2) |
| 2321 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
| 2322 | return gdbarch->believe_pcc_promotion; |
| 2323 | } |
| 2324 | |
| 2325 | void |
| 2326 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
| 2327 | int believe_pcc_promotion) |
| 2328 | { |
| 2329 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; |
| 2330 | } |
| 2331 | |
| 2332 | int |
| 2333 | gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) |
| 2334 | { |
| 2335 | gdb_assert (gdbarch != NULL); |
| 2336 | gdb_assert (gdbarch->convert_register_p != NULL); |
| 2337 | if (gdbarch_debug >= 2) |
| 2338 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); |
| 2339 | return gdbarch->convert_register_p (gdbarch, regnum, type); |
| 2340 | } |
| 2341 | |
| 2342 | void |
| 2343 | set_gdbarch_convert_register_p (struct gdbarch *gdbarch, |
| 2344 | gdbarch_convert_register_p_ftype convert_register_p) |
| 2345 | { |
| 2346 | gdbarch->convert_register_p = convert_register_p; |
| 2347 | } |
| 2348 | |
| 2349 | int |
| 2350 | gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep) |
| 2351 | { |
| 2352 | gdb_assert (gdbarch != NULL); |
| 2353 | gdb_assert (gdbarch->register_to_value != NULL); |
| 2354 | if (gdbarch_debug >= 2) |
| 2355 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); |
| 2356 | return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep); |
| 2357 | } |
| 2358 | |
| 2359 | void |
| 2360 | set_gdbarch_register_to_value (struct gdbarch *gdbarch, |
| 2361 | gdbarch_register_to_value_ftype register_to_value) |
| 2362 | { |
| 2363 | gdbarch->register_to_value = register_to_value; |
| 2364 | } |
| 2365 | |
| 2366 | void |
| 2367 | gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf) |
| 2368 | { |
| 2369 | gdb_assert (gdbarch != NULL); |
| 2370 | gdb_assert (gdbarch->value_to_register != NULL); |
| 2371 | if (gdbarch_debug >= 2) |
| 2372 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); |
| 2373 | gdbarch->value_to_register (frame, regnum, type, buf); |
| 2374 | } |
| 2375 | |
| 2376 | void |
| 2377 | set_gdbarch_value_to_register (struct gdbarch *gdbarch, |
| 2378 | gdbarch_value_to_register_ftype value_to_register) |
| 2379 | { |
| 2380 | gdbarch->value_to_register = value_to_register; |
| 2381 | } |
| 2382 | |
| 2383 | struct value * |
| 2384 | gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_id frame_id) |
| 2385 | { |
| 2386 | gdb_assert (gdbarch != NULL); |
| 2387 | gdb_assert (gdbarch->value_from_register != NULL); |
| 2388 | if (gdbarch_debug >= 2) |
| 2389 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n"); |
| 2390 | return gdbarch->value_from_register (gdbarch, type, regnum, frame_id); |
| 2391 | } |
| 2392 | |
| 2393 | void |
| 2394 | set_gdbarch_value_from_register (struct gdbarch *gdbarch, |
| 2395 | gdbarch_value_from_register_ftype value_from_register) |
| 2396 | { |
| 2397 | gdbarch->value_from_register = value_from_register; |
| 2398 | } |
| 2399 | |
| 2400 | CORE_ADDR |
| 2401 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) |
| 2402 | { |
| 2403 | gdb_assert (gdbarch != NULL); |
| 2404 | gdb_assert (gdbarch->pointer_to_address != NULL); |
| 2405 | if (gdbarch_debug >= 2) |
| 2406 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); |
| 2407 | return gdbarch->pointer_to_address (gdbarch, type, buf); |
| 2408 | } |
| 2409 | |
| 2410 | void |
| 2411 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, |
| 2412 | gdbarch_pointer_to_address_ftype pointer_to_address) |
| 2413 | { |
| 2414 | gdbarch->pointer_to_address = pointer_to_address; |
| 2415 | } |
| 2416 | |
| 2417 | void |
| 2418 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr) |
| 2419 | { |
| 2420 | gdb_assert (gdbarch != NULL); |
| 2421 | gdb_assert (gdbarch->address_to_pointer != NULL); |
| 2422 | if (gdbarch_debug >= 2) |
| 2423 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); |
| 2424 | gdbarch->address_to_pointer (gdbarch, type, buf, addr); |
| 2425 | } |
| 2426 | |
| 2427 | void |
| 2428 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, |
| 2429 | gdbarch_address_to_pointer_ftype address_to_pointer) |
| 2430 | { |
| 2431 | gdbarch->address_to_pointer = address_to_pointer; |
| 2432 | } |
| 2433 | |
| 2434 | int |
| 2435 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) |
| 2436 | { |
| 2437 | gdb_assert (gdbarch != NULL); |
| 2438 | return gdbarch->integer_to_address != NULL; |
| 2439 | } |
| 2440 | |
| 2441 | CORE_ADDR |
| 2442 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) |
| 2443 | { |
| 2444 | gdb_assert (gdbarch != NULL); |
| 2445 | gdb_assert (gdbarch->integer_to_address != NULL); |
| 2446 | if (gdbarch_debug >= 2) |
| 2447 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); |
| 2448 | return gdbarch->integer_to_address (gdbarch, type, buf); |
| 2449 | } |
| 2450 | |
| 2451 | void |
| 2452 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, |
| 2453 | gdbarch_integer_to_address_ftype integer_to_address) |
| 2454 | { |
| 2455 | gdbarch->integer_to_address = integer_to_address; |
| 2456 | } |
| 2457 | |
| 2458 | int |
| 2459 | gdbarch_return_value_p (struct gdbarch *gdbarch) |
| 2460 | { |
| 2461 | gdb_assert (gdbarch != NULL); |
| 2462 | return gdbarch->return_value != NULL; |
| 2463 | } |
| 2464 | |
| 2465 | enum return_value_convention |
| 2466 | gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) |
| 2467 | { |
| 2468 | gdb_assert (gdbarch != NULL); |
| 2469 | gdb_assert (gdbarch->return_value != NULL); |
| 2470 | if (gdbarch_debug >= 2) |
| 2471 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n"); |
| 2472 | return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf); |
| 2473 | } |
| 2474 | |
| 2475 | void |
| 2476 | set_gdbarch_return_value (struct gdbarch *gdbarch, |
| 2477 | gdbarch_return_value_ftype return_value) |
| 2478 | { |
| 2479 | gdbarch->return_value = return_value; |
| 2480 | } |
| 2481 | |
| 2482 | int |
| 2483 | gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type) |
| 2484 | { |
| 2485 | gdb_assert (gdbarch != NULL); |
| 2486 | gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL); |
| 2487 | if (gdbarch_debug >= 2) |
| 2488 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n"); |
| 2489 | return gdbarch->return_in_first_hidden_param_p (gdbarch, type); |
| 2490 | } |
| 2491 | |
| 2492 | void |
| 2493 | set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, |
| 2494 | gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p) |
| 2495 | { |
| 2496 | gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p; |
| 2497 | } |
| 2498 | |
| 2499 | CORE_ADDR |
| 2500 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) |
| 2501 | { |
| 2502 | gdb_assert (gdbarch != NULL); |
| 2503 | gdb_assert (gdbarch->skip_prologue != NULL); |
| 2504 | if (gdbarch_debug >= 2) |
| 2505 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
| 2506 | return gdbarch->skip_prologue (gdbarch, ip); |
| 2507 | } |
| 2508 | |
| 2509 | void |
| 2510 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
| 2511 | gdbarch_skip_prologue_ftype skip_prologue) |
| 2512 | { |
| 2513 | gdbarch->skip_prologue = skip_prologue; |
| 2514 | } |
| 2515 | |
| 2516 | int |
| 2517 | gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch) |
| 2518 | { |
| 2519 | gdb_assert (gdbarch != NULL); |
| 2520 | return gdbarch->skip_main_prologue != NULL; |
| 2521 | } |
| 2522 | |
| 2523 | CORE_ADDR |
| 2524 | gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) |
| 2525 | { |
| 2526 | gdb_assert (gdbarch != NULL); |
| 2527 | gdb_assert (gdbarch->skip_main_prologue != NULL); |
| 2528 | if (gdbarch_debug >= 2) |
| 2529 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n"); |
| 2530 | return gdbarch->skip_main_prologue (gdbarch, ip); |
| 2531 | } |
| 2532 | |
| 2533 | void |
| 2534 | set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch, |
| 2535 | gdbarch_skip_main_prologue_ftype skip_main_prologue) |
| 2536 | { |
| 2537 | gdbarch->skip_main_prologue = skip_main_prologue; |
| 2538 | } |
| 2539 | |
| 2540 | int |
| 2541 | gdbarch_skip_entrypoint_p (struct gdbarch *gdbarch) |
| 2542 | { |
| 2543 | gdb_assert (gdbarch != NULL); |
| 2544 | return gdbarch->skip_entrypoint != NULL; |
| 2545 | } |
| 2546 | |
| 2547 | CORE_ADDR |
| 2548 | gdbarch_skip_entrypoint (struct gdbarch *gdbarch, CORE_ADDR ip) |
| 2549 | { |
| 2550 | gdb_assert (gdbarch != NULL); |
| 2551 | gdb_assert (gdbarch->skip_entrypoint != NULL); |
| 2552 | if (gdbarch_debug >= 2) |
| 2553 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_entrypoint called\n"); |
| 2554 | return gdbarch->skip_entrypoint (gdbarch, ip); |
| 2555 | } |
| 2556 | |
| 2557 | void |
| 2558 | set_gdbarch_skip_entrypoint (struct gdbarch *gdbarch, |
| 2559 | gdbarch_skip_entrypoint_ftype skip_entrypoint) |
| 2560 | { |
| 2561 | gdbarch->skip_entrypoint = skip_entrypoint; |
| 2562 | } |
| 2563 | |
| 2564 | int |
| 2565 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) |
| 2566 | { |
| 2567 | gdb_assert (gdbarch != NULL); |
| 2568 | gdb_assert (gdbarch->inner_than != NULL); |
| 2569 | if (gdbarch_debug >= 2) |
| 2570 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
| 2571 | return gdbarch->inner_than (lhs, rhs); |
| 2572 | } |
| 2573 | |
| 2574 | void |
| 2575 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
| 2576 | gdbarch_inner_than_ftype inner_than) |
| 2577 | { |
| 2578 | gdbarch->inner_than = inner_than; |
| 2579 | } |
| 2580 | |
| 2581 | const gdb_byte * |
| 2582 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
| 2583 | { |
| 2584 | gdb_assert (gdbarch != NULL); |
| 2585 | gdb_assert (gdbarch->breakpoint_from_pc != NULL); |
| 2586 | if (gdbarch_debug >= 2) |
| 2587 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
| 2588 | return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr); |
| 2589 | } |
| 2590 | |
| 2591 | void |
| 2592 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
| 2593 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) |
| 2594 | { |
| 2595 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; |
| 2596 | } |
| 2597 | |
| 2598 | void |
| 2599 | gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr) |
| 2600 | { |
| 2601 | gdb_assert (gdbarch != NULL); |
| 2602 | gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL); |
| 2603 | if (gdbarch_debug >= 2) |
| 2604 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n"); |
| 2605 | gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr); |
| 2606 | } |
| 2607 | |
| 2608 | void |
| 2609 | set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, |
| 2610 | gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc) |
| 2611 | { |
| 2612 | gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc; |
| 2613 | } |
| 2614 | |
| 2615 | int |
| 2616 | gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch) |
| 2617 | { |
| 2618 | gdb_assert (gdbarch != NULL); |
| 2619 | return gdbarch->adjust_breakpoint_address != NULL; |
| 2620 | } |
| 2621 | |
| 2622 | CORE_ADDR |
| 2623 | gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr) |
| 2624 | { |
| 2625 | gdb_assert (gdbarch != NULL); |
| 2626 | gdb_assert (gdbarch->adjust_breakpoint_address != NULL); |
| 2627 | if (gdbarch_debug >= 2) |
| 2628 | fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n"); |
| 2629 | return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr); |
| 2630 | } |
| 2631 | |
| 2632 | void |
| 2633 | set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, |
| 2634 | gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address) |
| 2635 | { |
| 2636 | gdbarch->adjust_breakpoint_address = adjust_breakpoint_address; |
| 2637 | } |
| 2638 | |
| 2639 | int |
| 2640 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
| 2641 | { |
| 2642 | gdb_assert (gdbarch != NULL); |
| 2643 | gdb_assert (gdbarch->memory_insert_breakpoint != NULL); |
| 2644 | if (gdbarch_debug >= 2) |
| 2645 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
| 2646 | return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt); |
| 2647 | } |
| 2648 | |
| 2649 | void |
| 2650 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, |
| 2651 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) |
| 2652 | { |
| 2653 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; |
| 2654 | } |
| 2655 | |
| 2656 | int |
| 2657 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) |
| 2658 | { |
| 2659 | gdb_assert (gdbarch != NULL); |
| 2660 | gdb_assert (gdbarch->memory_remove_breakpoint != NULL); |
| 2661 | if (gdbarch_debug >= 2) |
| 2662 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
| 2663 | return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt); |
| 2664 | } |
| 2665 | |
| 2666 | void |
| 2667 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, |
| 2668 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) |
| 2669 | { |
| 2670 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; |
| 2671 | } |
| 2672 | |
| 2673 | CORE_ADDR |
| 2674 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
| 2675 | { |
| 2676 | gdb_assert (gdbarch != NULL); |
| 2677 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
| 2678 | if (gdbarch_debug >= 2) |
| 2679 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
| 2680 | return gdbarch->decr_pc_after_break; |
| 2681 | } |
| 2682 | |
| 2683 | void |
| 2684 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
| 2685 | CORE_ADDR decr_pc_after_break) |
| 2686 | { |
| 2687 | gdbarch->decr_pc_after_break = decr_pc_after_break; |
| 2688 | } |
| 2689 | |
| 2690 | CORE_ADDR |
| 2691 | gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch) |
| 2692 | { |
| 2693 | gdb_assert (gdbarch != NULL); |
| 2694 | /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ |
| 2695 | if (gdbarch_debug >= 2) |
| 2696 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n"); |
| 2697 | return gdbarch->deprecated_function_start_offset; |
| 2698 | } |
| 2699 | |
| 2700 | void |
| 2701 | set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, |
| 2702 | CORE_ADDR deprecated_function_start_offset) |
| 2703 | { |
| 2704 | gdbarch->deprecated_function_start_offset = deprecated_function_start_offset; |
| 2705 | } |
| 2706 | |
| 2707 | int |
| 2708 | gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno) |
| 2709 | { |
| 2710 | gdb_assert (gdbarch != NULL); |
| 2711 | gdb_assert (gdbarch->remote_register_number != NULL); |
| 2712 | if (gdbarch_debug >= 2) |
| 2713 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n"); |
| 2714 | return gdbarch->remote_register_number (gdbarch, regno); |
| 2715 | } |
| 2716 | |
| 2717 | void |
| 2718 | set_gdbarch_remote_register_number (struct gdbarch *gdbarch, |
| 2719 | gdbarch_remote_register_number_ftype remote_register_number) |
| 2720 | { |
| 2721 | gdbarch->remote_register_number = remote_register_number; |
| 2722 | } |
| 2723 | |
| 2724 | int |
| 2725 | gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch) |
| 2726 | { |
| 2727 | gdb_assert (gdbarch != NULL); |
| 2728 | return gdbarch->fetch_tls_load_module_address != NULL; |
| 2729 | } |
| 2730 | |
| 2731 | CORE_ADDR |
| 2732 | gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile) |
| 2733 | { |
| 2734 | gdb_assert (gdbarch != NULL); |
| 2735 | gdb_assert (gdbarch->fetch_tls_load_module_address != NULL); |
| 2736 | if (gdbarch_debug >= 2) |
| 2737 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n"); |
| 2738 | return gdbarch->fetch_tls_load_module_address (objfile); |
| 2739 | } |
| 2740 | |
| 2741 | void |
| 2742 | set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, |
| 2743 | gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address) |
| 2744 | { |
| 2745 | gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address; |
| 2746 | } |
| 2747 | |
| 2748 | CORE_ADDR |
| 2749 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
| 2750 | { |
| 2751 | gdb_assert (gdbarch != NULL); |
| 2752 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
| 2753 | if (gdbarch_debug >= 2) |
| 2754 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
| 2755 | return gdbarch->frame_args_skip; |
| 2756 | } |
| 2757 | |
| 2758 | void |
| 2759 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
| 2760 | CORE_ADDR frame_args_skip) |
| 2761 | { |
| 2762 | gdbarch->frame_args_skip = frame_args_skip; |
| 2763 | } |
| 2764 | |
| 2765 | int |
| 2766 | gdbarch_unwind_pc_p (struct gdbarch *gdbarch) |
| 2767 | { |
| 2768 | gdb_assert (gdbarch != NULL); |
| 2769 | return gdbarch->unwind_pc != NULL; |
| 2770 | } |
| 2771 | |
| 2772 | CORE_ADDR |
| 2773 | gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) |
| 2774 | { |
| 2775 | gdb_assert (gdbarch != NULL); |
| 2776 | gdb_assert (gdbarch->unwind_pc != NULL); |
| 2777 | if (gdbarch_debug >= 2) |
| 2778 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n"); |
| 2779 | return gdbarch->unwind_pc (gdbarch, next_frame); |
| 2780 | } |
| 2781 | |
| 2782 | void |
| 2783 | set_gdbarch_unwind_pc (struct gdbarch *gdbarch, |
| 2784 | gdbarch_unwind_pc_ftype unwind_pc) |
| 2785 | { |
| 2786 | gdbarch->unwind_pc = unwind_pc; |
| 2787 | } |
| 2788 | |
| 2789 | int |
| 2790 | gdbarch_unwind_sp_p (struct gdbarch *gdbarch) |
| 2791 | { |
| 2792 | gdb_assert (gdbarch != NULL); |
| 2793 | return gdbarch->unwind_sp != NULL; |
| 2794 | } |
| 2795 | |
| 2796 | CORE_ADDR |
| 2797 | gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) |
| 2798 | { |
| 2799 | gdb_assert (gdbarch != NULL); |
| 2800 | gdb_assert (gdbarch->unwind_sp != NULL); |
| 2801 | if (gdbarch_debug >= 2) |
| 2802 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n"); |
| 2803 | return gdbarch->unwind_sp (gdbarch, next_frame); |
| 2804 | } |
| 2805 | |
| 2806 | void |
| 2807 | set_gdbarch_unwind_sp (struct gdbarch *gdbarch, |
| 2808 | gdbarch_unwind_sp_ftype unwind_sp) |
| 2809 | { |
| 2810 | gdbarch->unwind_sp = unwind_sp; |
| 2811 | } |
| 2812 | |
| 2813 | int |
| 2814 | gdbarch_frame_num_args_p (struct gdbarch *gdbarch) |
| 2815 | { |
| 2816 | gdb_assert (gdbarch != NULL); |
| 2817 | return gdbarch->frame_num_args != NULL; |
| 2818 | } |
| 2819 | |
| 2820 | int |
| 2821 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) |
| 2822 | { |
| 2823 | gdb_assert (gdbarch != NULL); |
| 2824 | gdb_assert (gdbarch->frame_num_args != NULL); |
| 2825 | if (gdbarch_debug >= 2) |
| 2826 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
| 2827 | return gdbarch->frame_num_args (frame); |
| 2828 | } |
| 2829 | |
| 2830 | void |
| 2831 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
| 2832 | gdbarch_frame_num_args_ftype frame_num_args) |
| 2833 | { |
| 2834 | gdbarch->frame_num_args = frame_num_args; |
| 2835 | } |
| 2836 | |
| 2837 | int |
| 2838 | gdbarch_frame_align_p (struct gdbarch *gdbarch) |
| 2839 | { |
| 2840 | gdb_assert (gdbarch != NULL); |
| 2841 | return gdbarch->frame_align != NULL; |
| 2842 | } |
| 2843 | |
| 2844 | CORE_ADDR |
| 2845 | gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) |
| 2846 | { |
| 2847 | gdb_assert (gdbarch != NULL); |
| 2848 | gdb_assert (gdbarch->frame_align != NULL); |
| 2849 | if (gdbarch_debug >= 2) |
| 2850 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n"); |
| 2851 | return gdbarch->frame_align (gdbarch, address); |
| 2852 | } |
| 2853 | |
| 2854 | void |
| 2855 | set_gdbarch_frame_align (struct gdbarch *gdbarch, |
| 2856 | gdbarch_frame_align_ftype frame_align) |
| 2857 | { |
| 2858 | gdbarch->frame_align = frame_align; |
| 2859 | } |
| 2860 | |
| 2861 | int |
| 2862 | gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) |
| 2863 | { |
| 2864 | gdb_assert (gdbarch != NULL); |
| 2865 | gdb_assert (gdbarch->stabs_argument_has_addr != NULL); |
| 2866 | if (gdbarch_debug >= 2) |
| 2867 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n"); |
| 2868 | return gdbarch->stabs_argument_has_addr (gdbarch, type); |
| 2869 | } |
| 2870 | |
| 2871 | void |
| 2872 | set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, |
| 2873 | gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr) |
| 2874 | { |
| 2875 | gdbarch->stabs_argument_has_addr = stabs_argument_has_addr; |
| 2876 | } |
| 2877 | |
| 2878 | int |
| 2879 | gdbarch_frame_red_zone_size (struct gdbarch *gdbarch) |
| 2880 | { |
| 2881 | gdb_assert (gdbarch != NULL); |
| 2882 | if (gdbarch_debug >= 2) |
| 2883 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n"); |
| 2884 | return gdbarch->frame_red_zone_size; |
| 2885 | } |
| 2886 | |
| 2887 | void |
| 2888 | set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, |
| 2889 | int frame_red_zone_size) |
| 2890 | { |
| 2891 | gdbarch->frame_red_zone_size = frame_red_zone_size; |
| 2892 | } |
| 2893 | |
| 2894 | CORE_ADDR |
| 2895 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ) |
| 2896 | { |
| 2897 | gdb_assert (gdbarch != NULL); |
| 2898 | gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL); |
| 2899 | if (gdbarch_debug >= 2) |
| 2900 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); |
| 2901 | return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ); |
| 2902 | } |
| 2903 | |
| 2904 | void |
| 2905 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, |
| 2906 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) |
| 2907 | { |
| 2908 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; |
| 2909 | } |
| 2910 | |
| 2911 | CORE_ADDR |
| 2912 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 2913 | { |
| 2914 | gdb_assert (gdbarch != NULL); |
| 2915 | gdb_assert (gdbarch->addr_bits_remove != NULL); |
| 2916 | if (gdbarch_debug >= 2) |
| 2917 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); |
| 2918 | return gdbarch->addr_bits_remove (gdbarch, addr); |
| 2919 | } |
| 2920 | |
| 2921 | void |
| 2922 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, |
| 2923 | gdbarch_addr_bits_remove_ftype addr_bits_remove) |
| 2924 | { |
| 2925 | gdbarch->addr_bits_remove = addr_bits_remove; |
| 2926 | } |
| 2927 | |
| 2928 | int |
| 2929 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) |
| 2930 | { |
| 2931 | gdb_assert (gdbarch != NULL); |
| 2932 | return gdbarch->software_single_step != NULL; |
| 2933 | } |
| 2934 | |
| 2935 | int |
| 2936 | gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame) |
| 2937 | { |
| 2938 | gdb_assert (gdbarch != NULL); |
| 2939 | gdb_assert (gdbarch->software_single_step != NULL); |
| 2940 | if (gdbarch_debug >= 2) |
| 2941 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); |
| 2942 | return gdbarch->software_single_step (frame); |
| 2943 | } |
| 2944 | |
| 2945 | void |
| 2946 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, |
| 2947 | gdbarch_software_single_step_ftype software_single_step) |
| 2948 | { |
| 2949 | gdbarch->software_single_step = software_single_step; |
| 2950 | } |
| 2951 | |
| 2952 | int |
| 2953 | gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch) |
| 2954 | { |
| 2955 | gdb_assert (gdbarch != NULL); |
| 2956 | return gdbarch->single_step_through_delay != NULL; |
| 2957 | } |
| 2958 | |
| 2959 | int |
| 2960 | gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame) |
| 2961 | { |
| 2962 | gdb_assert (gdbarch != NULL); |
| 2963 | gdb_assert (gdbarch->single_step_through_delay != NULL); |
| 2964 | if (gdbarch_debug >= 2) |
| 2965 | fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n"); |
| 2966 | return gdbarch->single_step_through_delay (gdbarch, frame); |
| 2967 | } |
| 2968 | |
| 2969 | void |
| 2970 | set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch, |
| 2971 | gdbarch_single_step_through_delay_ftype single_step_through_delay) |
| 2972 | { |
| 2973 | gdbarch->single_step_through_delay = single_step_through_delay; |
| 2974 | } |
| 2975 | |
| 2976 | int |
| 2977 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info) |
| 2978 | { |
| 2979 | gdb_assert (gdbarch != NULL); |
| 2980 | gdb_assert (gdbarch->print_insn != NULL); |
| 2981 | if (gdbarch_debug >= 2) |
| 2982 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); |
| 2983 | return gdbarch->print_insn (vma, info); |
| 2984 | } |
| 2985 | |
| 2986 | void |
| 2987 | set_gdbarch_print_insn (struct gdbarch *gdbarch, |
| 2988 | gdbarch_print_insn_ftype print_insn) |
| 2989 | { |
| 2990 | gdbarch->print_insn = print_insn; |
| 2991 | } |
| 2992 | |
| 2993 | CORE_ADDR |
| 2994 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc) |
| 2995 | { |
| 2996 | gdb_assert (gdbarch != NULL); |
| 2997 | gdb_assert (gdbarch->skip_trampoline_code != NULL); |
| 2998 | if (gdbarch_debug >= 2) |
| 2999 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); |
| 3000 | return gdbarch->skip_trampoline_code (frame, pc); |
| 3001 | } |
| 3002 | |
| 3003 | void |
| 3004 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, |
| 3005 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) |
| 3006 | { |
| 3007 | gdbarch->skip_trampoline_code = skip_trampoline_code; |
| 3008 | } |
| 3009 | |
| 3010 | CORE_ADDR |
| 3011 | gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc) |
| 3012 | { |
| 3013 | gdb_assert (gdbarch != NULL); |
| 3014 | gdb_assert (gdbarch->skip_solib_resolver != NULL); |
| 3015 | if (gdbarch_debug >= 2) |
| 3016 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n"); |
| 3017 | return gdbarch->skip_solib_resolver (gdbarch, pc); |
| 3018 | } |
| 3019 | |
| 3020 | void |
| 3021 | set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, |
| 3022 | gdbarch_skip_solib_resolver_ftype skip_solib_resolver) |
| 3023 | { |
| 3024 | gdbarch->skip_solib_resolver = skip_solib_resolver; |
| 3025 | } |
| 3026 | |
| 3027 | int |
| 3028 | gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name) |
| 3029 | { |
| 3030 | gdb_assert (gdbarch != NULL); |
| 3031 | gdb_assert (gdbarch->in_solib_return_trampoline != NULL); |
| 3032 | if (gdbarch_debug >= 2) |
| 3033 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); |
| 3034 | return gdbarch->in_solib_return_trampoline (gdbarch, pc, name); |
| 3035 | } |
| 3036 | |
| 3037 | void |
| 3038 | set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, |
| 3039 | gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline) |
| 3040 | { |
| 3041 | gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; |
| 3042 | } |
| 3043 | |
| 3044 | int |
| 3045 | gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 3046 | { |
| 3047 | gdb_assert (gdbarch != NULL); |
| 3048 | gdb_assert (gdbarch->in_function_epilogue_p != NULL); |
| 3049 | if (gdbarch_debug >= 2) |
| 3050 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); |
| 3051 | return gdbarch->in_function_epilogue_p (gdbarch, addr); |
| 3052 | } |
| 3053 | |
| 3054 | void |
| 3055 | set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, |
| 3056 | gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) |
| 3057 | { |
| 3058 | gdbarch->in_function_epilogue_p = in_function_epilogue_p; |
| 3059 | } |
| 3060 | |
| 3061 | void |
| 3062 | gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym) |
| 3063 | { |
| 3064 | gdb_assert (gdbarch != NULL); |
| 3065 | gdb_assert (gdbarch->elf_make_msymbol_special != NULL); |
| 3066 | if (gdbarch_debug >= 2) |
| 3067 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); |
| 3068 | gdbarch->elf_make_msymbol_special (sym, msym); |
| 3069 | } |
| 3070 | |
| 3071 | void |
| 3072 | set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, |
| 3073 | gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special) |
| 3074 | { |
| 3075 | gdbarch->elf_make_msymbol_special = elf_make_msymbol_special; |
| 3076 | } |
| 3077 | |
| 3078 | void |
| 3079 | gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym) |
| 3080 | { |
| 3081 | gdb_assert (gdbarch != NULL); |
| 3082 | gdb_assert (gdbarch->coff_make_msymbol_special != NULL); |
| 3083 | if (gdbarch_debug >= 2) |
| 3084 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); |
| 3085 | gdbarch->coff_make_msymbol_special (val, msym); |
| 3086 | } |
| 3087 | |
| 3088 | void |
| 3089 | set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, |
| 3090 | gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special) |
| 3091 | { |
| 3092 | gdbarch->coff_make_msymbol_special = coff_make_msymbol_special; |
| 3093 | } |
| 3094 | |
| 3095 | int |
| 3096 | gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) |
| 3097 | { |
| 3098 | gdb_assert (gdbarch != NULL); |
| 3099 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ |
| 3100 | if (gdbarch_debug >= 2) |
| 3101 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); |
| 3102 | return gdbarch->cannot_step_breakpoint; |
| 3103 | } |
| 3104 | |
| 3105 | void |
| 3106 | set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, |
| 3107 | int cannot_step_breakpoint) |
| 3108 | { |
| 3109 | gdbarch->cannot_step_breakpoint = cannot_step_breakpoint; |
| 3110 | } |
| 3111 | |
| 3112 | int |
| 3113 | gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) |
| 3114 | { |
| 3115 | gdb_assert (gdbarch != NULL); |
| 3116 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ |
| 3117 | if (gdbarch_debug >= 2) |
| 3118 | fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); |
| 3119 | return gdbarch->have_nonsteppable_watchpoint; |
| 3120 | } |
| 3121 | |
| 3122 | void |
| 3123 | set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, |
| 3124 | int have_nonsteppable_watchpoint) |
| 3125 | { |
| 3126 | gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint; |
| 3127 | } |
| 3128 | |
| 3129 | int |
| 3130 | gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch) |
| 3131 | { |
| 3132 | gdb_assert (gdbarch != NULL); |
| 3133 | return gdbarch->address_class_type_flags != NULL; |
| 3134 | } |
| 3135 | |
| 3136 | int |
| 3137 | gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class) |
| 3138 | { |
| 3139 | gdb_assert (gdbarch != NULL); |
| 3140 | gdb_assert (gdbarch->address_class_type_flags != NULL); |
| 3141 | if (gdbarch_debug >= 2) |
| 3142 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); |
| 3143 | return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class); |
| 3144 | } |
| 3145 | |
| 3146 | void |
| 3147 | set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, |
| 3148 | gdbarch_address_class_type_flags_ftype address_class_type_flags) |
| 3149 | { |
| 3150 | gdbarch->address_class_type_flags = address_class_type_flags; |
| 3151 | } |
| 3152 | |
| 3153 | int |
| 3154 | gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch) |
| 3155 | { |
| 3156 | gdb_assert (gdbarch != NULL); |
| 3157 | return gdbarch->address_class_type_flags_to_name != NULL; |
| 3158 | } |
| 3159 | |
| 3160 | const char * |
| 3161 | gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags) |
| 3162 | { |
| 3163 | gdb_assert (gdbarch != NULL); |
| 3164 | gdb_assert (gdbarch->address_class_type_flags_to_name != NULL); |
| 3165 | if (gdbarch_debug >= 2) |
| 3166 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); |
| 3167 | return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags); |
| 3168 | } |
| 3169 | |
| 3170 | void |
| 3171 | set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, |
| 3172 | gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name) |
| 3173 | { |
| 3174 | gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name; |
| 3175 | } |
| 3176 | |
| 3177 | int |
| 3178 | gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch) |
| 3179 | { |
| 3180 | gdb_assert (gdbarch != NULL); |
| 3181 | return gdbarch->address_class_name_to_type_flags != NULL; |
| 3182 | } |
| 3183 | |
| 3184 | int |
| 3185 | gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr) |
| 3186 | { |
| 3187 | gdb_assert (gdbarch != NULL); |
| 3188 | gdb_assert (gdbarch->address_class_name_to_type_flags != NULL); |
| 3189 | if (gdbarch_debug >= 2) |
| 3190 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); |
| 3191 | return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr); |
| 3192 | } |
| 3193 | |
| 3194 | void |
| 3195 | set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, |
| 3196 | gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags) |
| 3197 | { |
| 3198 | gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags; |
| 3199 | } |
| 3200 | |
| 3201 | int |
| 3202 | gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup) |
| 3203 | { |
| 3204 | gdb_assert (gdbarch != NULL); |
| 3205 | gdb_assert (gdbarch->register_reggroup_p != NULL); |
| 3206 | if (gdbarch_debug >= 2) |
| 3207 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); |
| 3208 | return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup); |
| 3209 | } |
| 3210 | |
| 3211 | void |
| 3212 | set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, |
| 3213 | gdbarch_register_reggroup_p_ftype register_reggroup_p) |
| 3214 | { |
| 3215 | gdbarch->register_reggroup_p = register_reggroup_p; |
| 3216 | } |
| 3217 | |
| 3218 | int |
| 3219 | gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch) |
| 3220 | { |
| 3221 | gdb_assert (gdbarch != NULL); |
| 3222 | return gdbarch->fetch_pointer_argument != NULL; |
| 3223 | } |
| 3224 | |
| 3225 | CORE_ADDR |
| 3226 | gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type) |
| 3227 | { |
| 3228 | gdb_assert (gdbarch != NULL); |
| 3229 | gdb_assert (gdbarch->fetch_pointer_argument != NULL); |
| 3230 | if (gdbarch_debug >= 2) |
| 3231 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n"); |
| 3232 | return gdbarch->fetch_pointer_argument (frame, argi, type); |
| 3233 | } |
| 3234 | |
| 3235 | void |
| 3236 | set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, |
| 3237 | gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument) |
| 3238 | { |
| 3239 | gdbarch->fetch_pointer_argument = fetch_pointer_argument; |
| 3240 | } |
| 3241 | |
| 3242 | int |
| 3243 | gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch) |
| 3244 | { |
| 3245 | gdb_assert (gdbarch != NULL); |
| 3246 | return gdbarch->regset_from_core_section != NULL; |
| 3247 | } |
| 3248 | |
| 3249 | const struct regset * |
| 3250 | gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) |
| 3251 | { |
| 3252 | gdb_assert (gdbarch != NULL); |
| 3253 | gdb_assert (gdbarch->regset_from_core_section != NULL); |
| 3254 | if (gdbarch_debug >= 2) |
| 3255 | fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n"); |
| 3256 | return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size); |
| 3257 | } |
| 3258 | |
| 3259 | void |
| 3260 | set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, |
| 3261 | gdbarch_regset_from_core_section_ftype regset_from_core_section) |
| 3262 | { |
| 3263 | gdbarch->regset_from_core_section = regset_from_core_section; |
| 3264 | } |
| 3265 | |
| 3266 | struct core_regset_section * |
| 3267 | gdbarch_core_regset_sections (struct gdbarch *gdbarch) |
| 3268 | { |
| 3269 | gdb_assert (gdbarch != NULL); |
| 3270 | if (gdbarch_debug >= 2) |
| 3271 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n"); |
| 3272 | return gdbarch->core_regset_sections; |
| 3273 | } |
| 3274 | |
| 3275 | void |
| 3276 | set_gdbarch_core_regset_sections (struct gdbarch *gdbarch, |
| 3277 | struct core_regset_section * core_regset_sections) |
| 3278 | { |
| 3279 | gdbarch->core_regset_sections = core_regset_sections; |
| 3280 | } |
| 3281 | |
| 3282 | int |
| 3283 | gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch) |
| 3284 | { |
| 3285 | gdb_assert (gdbarch != NULL); |
| 3286 | return gdbarch->make_corefile_notes != NULL; |
| 3287 | } |
| 3288 | |
| 3289 | char * |
| 3290 | gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) |
| 3291 | { |
| 3292 | gdb_assert (gdbarch != NULL); |
| 3293 | gdb_assert (gdbarch->make_corefile_notes != NULL); |
| 3294 | if (gdbarch_debug >= 2) |
| 3295 | fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n"); |
| 3296 | return gdbarch->make_corefile_notes (gdbarch, obfd, note_size); |
| 3297 | } |
| 3298 | |
| 3299 | void |
| 3300 | set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch, |
| 3301 | gdbarch_make_corefile_notes_ftype make_corefile_notes) |
| 3302 | { |
| 3303 | gdbarch->make_corefile_notes = make_corefile_notes; |
| 3304 | } |
| 3305 | |
| 3306 | int |
| 3307 | gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch) |
| 3308 | { |
| 3309 | gdb_assert (gdbarch != NULL); |
| 3310 | return gdbarch->elfcore_write_linux_prpsinfo != NULL; |
| 3311 | } |
| 3312 | |
| 3313 | char * |
| 3314 | gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info) |
| 3315 | { |
| 3316 | gdb_assert (gdbarch != NULL); |
| 3317 | gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL); |
| 3318 | if (gdbarch_debug >= 2) |
| 3319 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n"); |
| 3320 | return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info); |
| 3321 | } |
| 3322 | |
| 3323 | void |
| 3324 | set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, |
| 3325 | gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo) |
| 3326 | { |
| 3327 | gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo; |
| 3328 | } |
| 3329 | |
| 3330 | int |
| 3331 | gdbarch_find_memory_regions_p (struct gdbarch *gdbarch) |
| 3332 | { |
| 3333 | gdb_assert (gdbarch != NULL); |
| 3334 | return gdbarch->find_memory_regions != NULL; |
| 3335 | } |
| 3336 | |
| 3337 | int |
| 3338 | gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data) |
| 3339 | { |
| 3340 | gdb_assert (gdbarch != NULL); |
| 3341 | gdb_assert (gdbarch->find_memory_regions != NULL); |
| 3342 | if (gdbarch_debug >= 2) |
| 3343 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n"); |
| 3344 | return gdbarch->find_memory_regions (gdbarch, func, data); |
| 3345 | } |
| 3346 | |
| 3347 | void |
| 3348 | set_gdbarch_find_memory_regions (struct gdbarch *gdbarch, |
| 3349 | gdbarch_find_memory_regions_ftype find_memory_regions) |
| 3350 | { |
| 3351 | gdbarch->find_memory_regions = find_memory_regions; |
| 3352 | } |
| 3353 | |
| 3354 | int |
| 3355 | gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch) |
| 3356 | { |
| 3357 | gdb_assert (gdbarch != NULL); |
| 3358 | return gdbarch->core_xfer_shared_libraries != NULL; |
| 3359 | } |
| 3360 | |
| 3361 | ULONGEST |
| 3362 | gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len) |
| 3363 | { |
| 3364 | gdb_assert (gdbarch != NULL); |
| 3365 | gdb_assert (gdbarch->core_xfer_shared_libraries != NULL); |
| 3366 | if (gdbarch_debug >= 2) |
| 3367 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n"); |
| 3368 | return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len); |
| 3369 | } |
| 3370 | |
| 3371 | void |
| 3372 | set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, |
| 3373 | gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries) |
| 3374 | { |
| 3375 | gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries; |
| 3376 | } |
| 3377 | |
| 3378 | int |
| 3379 | gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch) |
| 3380 | { |
| 3381 | gdb_assert (gdbarch != NULL); |
| 3382 | return gdbarch->core_xfer_shared_libraries_aix != NULL; |
| 3383 | } |
| 3384 | |
| 3385 | ULONGEST |
| 3386 | gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len) |
| 3387 | { |
| 3388 | gdb_assert (gdbarch != NULL); |
| 3389 | gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL); |
| 3390 | if (gdbarch_debug >= 2) |
| 3391 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n"); |
| 3392 | return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len); |
| 3393 | } |
| 3394 | |
| 3395 | void |
| 3396 | set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, |
| 3397 | gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix) |
| 3398 | { |
| 3399 | gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix; |
| 3400 | } |
| 3401 | |
| 3402 | int |
| 3403 | gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch) |
| 3404 | { |
| 3405 | gdb_assert (gdbarch != NULL); |
| 3406 | return gdbarch->core_pid_to_str != NULL; |
| 3407 | } |
| 3408 | |
| 3409 | char * |
| 3410 | gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid) |
| 3411 | { |
| 3412 | gdb_assert (gdbarch != NULL); |
| 3413 | gdb_assert (gdbarch->core_pid_to_str != NULL); |
| 3414 | if (gdbarch_debug >= 2) |
| 3415 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n"); |
| 3416 | return gdbarch->core_pid_to_str (gdbarch, ptid); |
| 3417 | } |
| 3418 | |
| 3419 | void |
| 3420 | set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch, |
| 3421 | gdbarch_core_pid_to_str_ftype core_pid_to_str) |
| 3422 | { |
| 3423 | gdbarch->core_pid_to_str = core_pid_to_str; |
| 3424 | } |
| 3425 | |
| 3426 | int |
| 3427 | gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch) |
| 3428 | { |
| 3429 | gdb_assert (gdbarch != NULL); |
| 3430 | return gdbarch->gcore_bfd_target != 0; |
| 3431 | } |
| 3432 | |
| 3433 | const char * |
| 3434 | gdbarch_gcore_bfd_target (struct gdbarch *gdbarch) |
| 3435 | { |
| 3436 | gdb_assert (gdbarch != NULL); |
| 3437 | /* Check variable changed from pre-default. */ |
| 3438 | gdb_assert (gdbarch->gcore_bfd_target != 0); |
| 3439 | if (gdbarch_debug >= 2) |
| 3440 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n"); |
| 3441 | return gdbarch->gcore_bfd_target; |
| 3442 | } |
| 3443 | |
| 3444 | void |
| 3445 | set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch, |
| 3446 | const char * gcore_bfd_target) |
| 3447 | { |
| 3448 | gdbarch->gcore_bfd_target = gcore_bfd_target; |
| 3449 | } |
| 3450 | |
| 3451 | int |
| 3452 | gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch) |
| 3453 | { |
| 3454 | gdb_assert (gdbarch != NULL); |
| 3455 | /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ |
| 3456 | if (gdbarch_debug >= 2) |
| 3457 | fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n"); |
| 3458 | return gdbarch->vtable_function_descriptors; |
| 3459 | } |
| 3460 | |
| 3461 | void |
| 3462 | set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch, |
| 3463 | int vtable_function_descriptors) |
| 3464 | { |
| 3465 | gdbarch->vtable_function_descriptors = vtable_function_descriptors; |
| 3466 | } |
| 3467 | |
| 3468 | int |
| 3469 | gdbarch_vbit_in_delta (struct gdbarch *gdbarch) |
| 3470 | { |
| 3471 | gdb_assert (gdbarch != NULL); |
| 3472 | /* Skip verify of vbit_in_delta, invalid_p == 0 */ |
| 3473 | if (gdbarch_debug >= 2) |
| 3474 | fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n"); |
| 3475 | return gdbarch->vbit_in_delta; |
| 3476 | } |
| 3477 | |
| 3478 | void |
| 3479 | set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch, |
| 3480 | int vbit_in_delta) |
| 3481 | { |
| 3482 | gdbarch->vbit_in_delta = vbit_in_delta; |
| 3483 | } |
| 3484 | |
| 3485 | int |
| 3486 | gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch) |
| 3487 | { |
| 3488 | gdb_assert (gdbarch != NULL); |
| 3489 | return gdbarch->skip_permanent_breakpoint != NULL; |
| 3490 | } |
| 3491 | |
| 3492 | void |
| 3493 | gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache) |
| 3494 | { |
| 3495 | gdb_assert (gdbarch != NULL); |
| 3496 | gdb_assert (gdbarch->skip_permanent_breakpoint != NULL); |
| 3497 | if (gdbarch_debug >= 2) |
| 3498 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n"); |
| 3499 | gdbarch->skip_permanent_breakpoint (regcache); |
| 3500 | } |
| 3501 | |
| 3502 | void |
| 3503 | set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, |
| 3504 | gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint) |
| 3505 | { |
| 3506 | gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint; |
| 3507 | } |
| 3508 | |
| 3509 | int |
| 3510 | gdbarch_max_insn_length_p (struct gdbarch *gdbarch) |
| 3511 | { |
| 3512 | gdb_assert (gdbarch != NULL); |
| 3513 | return gdbarch->max_insn_length != 0; |
| 3514 | } |
| 3515 | |
| 3516 | ULONGEST |
| 3517 | gdbarch_max_insn_length (struct gdbarch *gdbarch) |
| 3518 | { |
| 3519 | gdb_assert (gdbarch != NULL); |
| 3520 | /* Check variable changed from pre-default. */ |
| 3521 | gdb_assert (gdbarch->max_insn_length != 0); |
| 3522 | if (gdbarch_debug >= 2) |
| 3523 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n"); |
| 3524 | return gdbarch->max_insn_length; |
| 3525 | } |
| 3526 | |
| 3527 | void |
| 3528 | set_gdbarch_max_insn_length (struct gdbarch *gdbarch, |
| 3529 | ULONGEST max_insn_length) |
| 3530 | { |
| 3531 | gdbarch->max_insn_length = max_insn_length; |
| 3532 | } |
| 3533 | |
| 3534 | int |
| 3535 | gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch) |
| 3536 | { |
| 3537 | gdb_assert (gdbarch != NULL); |
| 3538 | return gdbarch->displaced_step_copy_insn != NULL; |
| 3539 | } |
| 3540 | |
| 3541 | struct displaced_step_closure * |
| 3542 | gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) |
| 3543 | { |
| 3544 | gdb_assert (gdbarch != NULL); |
| 3545 | gdb_assert (gdbarch->displaced_step_copy_insn != NULL); |
| 3546 | if (gdbarch_debug >= 2) |
| 3547 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n"); |
| 3548 | return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs); |
| 3549 | } |
| 3550 | |
| 3551 | void |
| 3552 | set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, |
| 3553 | gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn) |
| 3554 | { |
| 3555 | gdbarch->displaced_step_copy_insn = displaced_step_copy_insn; |
| 3556 | } |
| 3557 | |
| 3558 | int |
| 3559 | gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure) |
| 3560 | { |
| 3561 | gdb_assert (gdbarch != NULL); |
| 3562 | gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL); |
| 3563 | if (gdbarch_debug >= 2) |
| 3564 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n"); |
| 3565 | return gdbarch->displaced_step_hw_singlestep (gdbarch, closure); |
| 3566 | } |
| 3567 | |
| 3568 | void |
| 3569 | set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, |
| 3570 | gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep) |
| 3571 | { |
| 3572 | gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep; |
| 3573 | } |
| 3574 | |
| 3575 | int |
| 3576 | gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch) |
| 3577 | { |
| 3578 | gdb_assert (gdbarch != NULL); |
| 3579 | return gdbarch->displaced_step_fixup != NULL; |
| 3580 | } |
| 3581 | |
| 3582 | void |
| 3583 | gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) |
| 3584 | { |
| 3585 | gdb_assert (gdbarch != NULL); |
| 3586 | gdb_assert (gdbarch->displaced_step_fixup != NULL); |
| 3587 | /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */ |
| 3588 | if (gdbarch_debug >= 2) |
| 3589 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n"); |
| 3590 | gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs); |
| 3591 | } |
| 3592 | |
| 3593 | void |
| 3594 | set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, |
| 3595 | gdbarch_displaced_step_fixup_ftype displaced_step_fixup) |
| 3596 | { |
| 3597 | gdbarch->displaced_step_fixup = displaced_step_fixup; |
| 3598 | } |
| 3599 | |
| 3600 | void |
| 3601 | gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure) |
| 3602 | { |
| 3603 | gdb_assert (gdbarch != NULL); |
| 3604 | gdb_assert (gdbarch->displaced_step_free_closure != NULL); |
| 3605 | if (gdbarch_debug >= 2) |
| 3606 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n"); |
| 3607 | gdbarch->displaced_step_free_closure (gdbarch, closure); |
| 3608 | } |
| 3609 | |
| 3610 | void |
| 3611 | set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, |
| 3612 | gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure) |
| 3613 | { |
| 3614 | gdbarch->displaced_step_free_closure = displaced_step_free_closure; |
| 3615 | } |
| 3616 | |
| 3617 | CORE_ADDR |
| 3618 | gdbarch_displaced_step_location (struct gdbarch *gdbarch) |
| 3619 | { |
| 3620 | gdb_assert (gdbarch != NULL); |
| 3621 | gdb_assert (gdbarch->displaced_step_location != NULL); |
| 3622 | if (gdbarch_debug >= 2) |
| 3623 | fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n"); |
| 3624 | return gdbarch->displaced_step_location (gdbarch); |
| 3625 | } |
| 3626 | |
| 3627 | void |
| 3628 | set_gdbarch_displaced_step_location (struct gdbarch *gdbarch, |
| 3629 | gdbarch_displaced_step_location_ftype displaced_step_location) |
| 3630 | { |
| 3631 | gdbarch->displaced_step_location = displaced_step_location; |
| 3632 | } |
| 3633 | |
| 3634 | int |
| 3635 | gdbarch_relocate_instruction_p (struct gdbarch *gdbarch) |
| 3636 | { |
| 3637 | gdb_assert (gdbarch != NULL); |
| 3638 | return gdbarch->relocate_instruction != NULL; |
| 3639 | } |
| 3640 | |
| 3641 | void |
| 3642 | gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from) |
| 3643 | { |
| 3644 | gdb_assert (gdbarch != NULL); |
| 3645 | gdb_assert (gdbarch->relocate_instruction != NULL); |
| 3646 | /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */ |
| 3647 | if (gdbarch_debug >= 2) |
| 3648 | fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n"); |
| 3649 | gdbarch->relocate_instruction (gdbarch, to, from); |
| 3650 | } |
| 3651 | |
| 3652 | void |
| 3653 | set_gdbarch_relocate_instruction (struct gdbarch *gdbarch, |
| 3654 | gdbarch_relocate_instruction_ftype relocate_instruction) |
| 3655 | { |
| 3656 | gdbarch->relocate_instruction = relocate_instruction; |
| 3657 | } |
| 3658 | |
| 3659 | int |
| 3660 | gdbarch_overlay_update_p (struct gdbarch *gdbarch) |
| 3661 | { |
| 3662 | gdb_assert (gdbarch != NULL); |
| 3663 | return gdbarch->overlay_update != NULL; |
| 3664 | } |
| 3665 | |
| 3666 | void |
| 3667 | gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect) |
| 3668 | { |
| 3669 | gdb_assert (gdbarch != NULL); |
| 3670 | gdb_assert (gdbarch->overlay_update != NULL); |
| 3671 | if (gdbarch_debug >= 2) |
| 3672 | fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n"); |
| 3673 | gdbarch->overlay_update (osect); |
| 3674 | } |
| 3675 | |
| 3676 | void |
| 3677 | set_gdbarch_overlay_update (struct gdbarch *gdbarch, |
| 3678 | gdbarch_overlay_update_ftype overlay_update) |
| 3679 | { |
| 3680 | gdbarch->overlay_update = overlay_update; |
| 3681 | } |
| 3682 | |
| 3683 | int |
| 3684 | gdbarch_core_read_description_p (struct gdbarch *gdbarch) |
| 3685 | { |
| 3686 | gdb_assert (gdbarch != NULL); |
| 3687 | return gdbarch->core_read_description != NULL; |
| 3688 | } |
| 3689 | |
| 3690 | const struct target_desc * |
| 3691 | gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd) |
| 3692 | { |
| 3693 | gdb_assert (gdbarch != NULL); |
| 3694 | gdb_assert (gdbarch->core_read_description != NULL); |
| 3695 | if (gdbarch_debug >= 2) |
| 3696 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n"); |
| 3697 | return gdbarch->core_read_description (gdbarch, target, abfd); |
| 3698 | } |
| 3699 | |
| 3700 | void |
| 3701 | set_gdbarch_core_read_description (struct gdbarch *gdbarch, |
| 3702 | gdbarch_core_read_description_ftype core_read_description) |
| 3703 | { |
| 3704 | gdbarch->core_read_description = core_read_description; |
| 3705 | } |
| 3706 | |
| 3707 | int |
| 3708 | gdbarch_static_transform_name_p (struct gdbarch *gdbarch) |
| 3709 | { |
| 3710 | gdb_assert (gdbarch != NULL); |
| 3711 | return gdbarch->static_transform_name != NULL; |
| 3712 | } |
| 3713 | |
| 3714 | const char * |
| 3715 | gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name) |
| 3716 | { |
| 3717 | gdb_assert (gdbarch != NULL); |
| 3718 | gdb_assert (gdbarch->static_transform_name != NULL); |
| 3719 | if (gdbarch_debug >= 2) |
| 3720 | fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n"); |
| 3721 | return gdbarch->static_transform_name (name); |
| 3722 | } |
| 3723 | |
| 3724 | void |
| 3725 | set_gdbarch_static_transform_name (struct gdbarch *gdbarch, |
| 3726 | gdbarch_static_transform_name_ftype static_transform_name) |
| 3727 | { |
| 3728 | gdbarch->static_transform_name = static_transform_name; |
| 3729 | } |
| 3730 | |
| 3731 | int |
| 3732 | gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch) |
| 3733 | { |
| 3734 | gdb_assert (gdbarch != NULL); |
| 3735 | /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ |
| 3736 | if (gdbarch_debug >= 2) |
| 3737 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n"); |
| 3738 | return gdbarch->sofun_address_maybe_missing; |
| 3739 | } |
| 3740 | |
| 3741 | void |
| 3742 | set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch, |
| 3743 | int sofun_address_maybe_missing) |
| 3744 | { |
| 3745 | gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing; |
| 3746 | } |
| 3747 | |
| 3748 | int |
| 3749 | gdbarch_process_record_p (struct gdbarch *gdbarch) |
| 3750 | { |
| 3751 | gdb_assert (gdbarch != NULL); |
| 3752 | return gdbarch->process_record != NULL; |
| 3753 | } |
| 3754 | |
| 3755 | int |
| 3756 | gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr) |
| 3757 | { |
| 3758 | gdb_assert (gdbarch != NULL); |
| 3759 | gdb_assert (gdbarch->process_record != NULL); |
| 3760 | if (gdbarch_debug >= 2) |
| 3761 | fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n"); |
| 3762 | return gdbarch->process_record (gdbarch, regcache, addr); |
| 3763 | } |
| 3764 | |
| 3765 | void |
| 3766 | set_gdbarch_process_record (struct gdbarch *gdbarch, |
| 3767 | gdbarch_process_record_ftype process_record) |
| 3768 | { |
| 3769 | gdbarch->process_record = process_record; |
| 3770 | } |
| 3771 | |
| 3772 | int |
| 3773 | gdbarch_process_record_signal_p (struct gdbarch *gdbarch) |
| 3774 | { |
| 3775 | gdb_assert (gdbarch != NULL); |
| 3776 | return gdbarch->process_record_signal != NULL; |
| 3777 | } |
| 3778 | |
| 3779 | int |
| 3780 | gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal) |
| 3781 | { |
| 3782 | gdb_assert (gdbarch != NULL); |
| 3783 | gdb_assert (gdbarch->process_record_signal != NULL); |
| 3784 | if (gdbarch_debug >= 2) |
| 3785 | fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n"); |
| 3786 | return gdbarch->process_record_signal (gdbarch, regcache, signal); |
| 3787 | } |
| 3788 | |
| 3789 | void |
| 3790 | set_gdbarch_process_record_signal (struct gdbarch *gdbarch, |
| 3791 | gdbarch_process_record_signal_ftype process_record_signal) |
| 3792 | { |
| 3793 | gdbarch->process_record_signal = process_record_signal; |
| 3794 | } |
| 3795 | |
| 3796 | int |
| 3797 | gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch) |
| 3798 | { |
| 3799 | gdb_assert (gdbarch != NULL); |
| 3800 | return gdbarch->gdb_signal_from_target != NULL; |
| 3801 | } |
| 3802 | |
| 3803 | enum gdb_signal |
| 3804 | gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo) |
| 3805 | { |
| 3806 | gdb_assert (gdbarch != NULL); |
| 3807 | gdb_assert (gdbarch->gdb_signal_from_target != NULL); |
| 3808 | if (gdbarch_debug >= 2) |
| 3809 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n"); |
| 3810 | return gdbarch->gdb_signal_from_target (gdbarch, signo); |
| 3811 | } |
| 3812 | |
| 3813 | void |
| 3814 | set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, |
| 3815 | gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target) |
| 3816 | { |
| 3817 | gdbarch->gdb_signal_from_target = gdb_signal_from_target; |
| 3818 | } |
| 3819 | |
| 3820 | int |
| 3821 | gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch) |
| 3822 | { |
| 3823 | gdb_assert (gdbarch != NULL); |
| 3824 | return gdbarch->gdb_signal_to_target != NULL; |
| 3825 | } |
| 3826 | |
| 3827 | int |
| 3828 | gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal) |
| 3829 | { |
| 3830 | gdb_assert (gdbarch != NULL); |
| 3831 | gdb_assert (gdbarch->gdb_signal_to_target != NULL); |
| 3832 | if (gdbarch_debug >= 2) |
| 3833 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n"); |
| 3834 | return gdbarch->gdb_signal_to_target (gdbarch, signal); |
| 3835 | } |
| 3836 | |
| 3837 | void |
| 3838 | set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, |
| 3839 | gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target) |
| 3840 | { |
| 3841 | gdbarch->gdb_signal_to_target = gdb_signal_to_target; |
| 3842 | } |
| 3843 | |
| 3844 | int |
| 3845 | gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch) |
| 3846 | { |
| 3847 | gdb_assert (gdbarch != NULL); |
| 3848 | return gdbarch->get_siginfo_type != NULL; |
| 3849 | } |
| 3850 | |
| 3851 | struct type * |
| 3852 | gdbarch_get_siginfo_type (struct gdbarch *gdbarch) |
| 3853 | { |
| 3854 | gdb_assert (gdbarch != NULL); |
| 3855 | gdb_assert (gdbarch->get_siginfo_type != NULL); |
| 3856 | if (gdbarch_debug >= 2) |
| 3857 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n"); |
| 3858 | return gdbarch->get_siginfo_type (gdbarch); |
| 3859 | } |
| 3860 | |
| 3861 | void |
| 3862 | set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch, |
| 3863 | gdbarch_get_siginfo_type_ftype get_siginfo_type) |
| 3864 | { |
| 3865 | gdbarch->get_siginfo_type = get_siginfo_type; |
| 3866 | } |
| 3867 | |
| 3868 | int |
| 3869 | gdbarch_record_special_symbol_p (struct gdbarch *gdbarch) |
| 3870 | { |
| 3871 | gdb_assert (gdbarch != NULL); |
| 3872 | return gdbarch->record_special_symbol != NULL; |
| 3873 | } |
| 3874 | |
| 3875 | void |
| 3876 | gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym) |
| 3877 | { |
| 3878 | gdb_assert (gdbarch != NULL); |
| 3879 | gdb_assert (gdbarch->record_special_symbol != NULL); |
| 3880 | if (gdbarch_debug >= 2) |
| 3881 | fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n"); |
| 3882 | gdbarch->record_special_symbol (gdbarch, objfile, sym); |
| 3883 | } |
| 3884 | |
| 3885 | void |
| 3886 | set_gdbarch_record_special_symbol (struct gdbarch *gdbarch, |
| 3887 | gdbarch_record_special_symbol_ftype record_special_symbol) |
| 3888 | { |
| 3889 | gdbarch->record_special_symbol = record_special_symbol; |
| 3890 | } |
| 3891 | |
| 3892 | int |
| 3893 | gdbarch_get_syscall_number_p (struct gdbarch *gdbarch) |
| 3894 | { |
| 3895 | gdb_assert (gdbarch != NULL); |
| 3896 | return gdbarch->get_syscall_number != NULL; |
| 3897 | } |
| 3898 | |
| 3899 | LONGEST |
| 3900 | gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid) |
| 3901 | { |
| 3902 | gdb_assert (gdbarch != NULL); |
| 3903 | gdb_assert (gdbarch->get_syscall_number != NULL); |
| 3904 | if (gdbarch_debug >= 2) |
| 3905 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n"); |
| 3906 | return gdbarch->get_syscall_number (gdbarch, ptid); |
| 3907 | } |
| 3908 | |
| 3909 | void |
| 3910 | set_gdbarch_get_syscall_number (struct gdbarch *gdbarch, |
| 3911 | gdbarch_get_syscall_number_ftype get_syscall_number) |
| 3912 | { |
| 3913 | gdbarch->get_syscall_number = get_syscall_number; |
| 3914 | } |
| 3915 | |
| 3916 | const char *const * |
| 3917 | gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch) |
| 3918 | { |
| 3919 | gdb_assert (gdbarch != NULL); |
| 3920 | /* Skip verify of stap_integer_prefixes, invalid_p == 0 */ |
| 3921 | if (gdbarch_debug >= 2) |
| 3922 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefixes called\n"); |
| 3923 | return gdbarch->stap_integer_prefixes; |
| 3924 | } |
| 3925 | |
| 3926 | void |
| 3927 | set_gdbarch_stap_integer_prefixes (struct gdbarch *gdbarch, |
| 3928 | const char *const * stap_integer_prefixes) |
| 3929 | { |
| 3930 | gdbarch->stap_integer_prefixes = stap_integer_prefixes; |
| 3931 | } |
| 3932 | |
| 3933 | const char *const * |
| 3934 | gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch) |
| 3935 | { |
| 3936 | gdb_assert (gdbarch != NULL); |
| 3937 | /* Skip verify of stap_integer_suffixes, invalid_p == 0 */ |
| 3938 | if (gdbarch_debug >= 2) |
| 3939 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffixes called\n"); |
| 3940 | return gdbarch->stap_integer_suffixes; |
| 3941 | } |
| 3942 | |
| 3943 | void |
| 3944 | set_gdbarch_stap_integer_suffixes (struct gdbarch *gdbarch, |
| 3945 | const char *const * stap_integer_suffixes) |
| 3946 | { |
| 3947 | gdbarch->stap_integer_suffixes = stap_integer_suffixes; |
| 3948 | } |
| 3949 | |
| 3950 | const char *const * |
| 3951 | gdbarch_stap_register_prefixes (struct gdbarch *gdbarch) |
| 3952 | { |
| 3953 | gdb_assert (gdbarch != NULL); |
| 3954 | /* Skip verify of stap_register_prefixes, invalid_p == 0 */ |
| 3955 | if (gdbarch_debug >= 2) |
| 3956 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefixes called\n"); |
| 3957 | return gdbarch->stap_register_prefixes; |
| 3958 | } |
| 3959 | |
| 3960 | void |
| 3961 | set_gdbarch_stap_register_prefixes (struct gdbarch *gdbarch, |
| 3962 | const char *const * stap_register_prefixes) |
| 3963 | { |
| 3964 | gdbarch->stap_register_prefixes = stap_register_prefixes; |
| 3965 | } |
| 3966 | |
| 3967 | const char *const * |
| 3968 | gdbarch_stap_register_suffixes (struct gdbarch *gdbarch) |
| 3969 | { |
| 3970 | gdb_assert (gdbarch != NULL); |
| 3971 | /* Skip verify of stap_register_suffixes, invalid_p == 0 */ |
| 3972 | if (gdbarch_debug >= 2) |
| 3973 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffixes called\n"); |
| 3974 | return gdbarch->stap_register_suffixes; |
| 3975 | } |
| 3976 | |
| 3977 | void |
| 3978 | set_gdbarch_stap_register_suffixes (struct gdbarch *gdbarch, |
| 3979 | const char *const * stap_register_suffixes) |
| 3980 | { |
| 3981 | gdbarch->stap_register_suffixes = stap_register_suffixes; |
| 3982 | } |
| 3983 | |
| 3984 | const char *const * |
| 3985 | gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch) |
| 3986 | { |
| 3987 | gdb_assert (gdbarch != NULL); |
| 3988 | /* Skip verify of stap_register_indirection_prefixes, invalid_p == 0 */ |
| 3989 | if (gdbarch_debug >= 2) |
| 3990 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefixes called\n"); |
| 3991 | return gdbarch->stap_register_indirection_prefixes; |
| 3992 | } |
| 3993 | |
| 3994 | void |
| 3995 | set_gdbarch_stap_register_indirection_prefixes (struct gdbarch *gdbarch, |
| 3996 | const char *const * stap_register_indirection_prefixes) |
| 3997 | { |
| 3998 | gdbarch->stap_register_indirection_prefixes = stap_register_indirection_prefixes; |
| 3999 | } |
| 4000 | |
| 4001 | const char *const * |
| 4002 | gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch) |
| 4003 | { |
| 4004 | gdb_assert (gdbarch != NULL); |
| 4005 | /* Skip verify of stap_register_indirection_suffixes, invalid_p == 0 */ |
| 4006 | if (gdbarch_debug >= 2) |
| 4007 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffixes called\n"); |
| 4008 | return gdbarch->stap_register_indirection_suffixes; |
| 4009 | } |
| 4010 | |
| 4011 | void |
| 4012 | set_gdbarch_stap_register_indirection_suffixes (struct gdbarch *gdbarch, |
| 4013 | const char *const * stap_register_indirection_suffixes) |
| 4014 | { |
| 4015 | gdbarch->stap_register_indirection_suffixes = stap_register_indirection_suffixes; |
| 4016 | } |
| 4017 | |
| 4018 | const char * |
| 4019 | gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch) |
| 4020 | { |
| 4021 | gdb_assert (gdbarch != NULL); |
| 4022 | /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ |
| 4023 | if (gdbarch_debug >= 2) |
| 4024 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n"); |
| 4025 | return gdbarch->stap_gdb_register_prefix; |
| 4026 | } |
| 4027 | |
| 4028 | void |
| 4029 | set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch, |
| 4030 | const char * stap_gdb_register_prefix) |
| 4031 | { |
| 4032 | gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix; |
| 4033 | } |
| 4034 | |
| 4035 | const char * |
| 4036 | gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch) |
| 4037 | { |
| 4038 | gdb_assert (gdbarch != NULL); |
| 4039 | /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ |
| 4040 | if (gdbarch_debug >= 2) |
| 4041 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n"); |
| 4042 | return gdbarch->stap_gdb_register_suffix; |
| 4043 | } |
| 4044 | |
| 4045 | void |
| 4046 | set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch, |
| 4047 | const char * stap_gdb_register_suffix) |
| 4048 | { |
| 4049 | gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix; |
| 4050 | } |
| 4051 | |
| 4052 | int |
| 4053 | gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch) |
| 4054 | { |
| 4055 | gdb_assert (gdbarch != NULL); |
| 4056 | return gdbarch->stap_is_single_operand != NULL; |
| 4057 | } |
| 4058 | |
| 4059 | int |
| 4060 | gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s) |
| 4061 | { |
| 4062 | gdb_assert (gdbarch != NULL); |
| 4063 | gdb_assert (gdbarch->stap_is_single_operand != NULL); |
| 4064 | if (gdbarch_debug >= 2) |
| 4065 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n"); |
| 4066 | return gdbarch->stap_is_single_operand (gdbarch, s); |
| 4067 | } |
| 4068 | |
| 4069 | void |
| 4070 | set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, |
| 4071 | gdbarch_stap_is_single_operand_ftype stap_is_single_operand) |
| 4072 | { |
| 4073 | gdbarch->stap_is_single_operand = stap_is_single_operand; |
| 4074 | } |
| 4075 | |
| 4076 | int |
| 4077 | gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch) |
| 4078 | { |
| 4079 | gdb_assert (gdbarch != NULL); |
| 4080 | return gdbarch->stap_parse_special_token != NULL; |
| 4081 | } |
| 4082 | |
| 4083 | int |
| 4084 | gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p) |
| 4085 | { |
| 4086 | gdb_assert (gdbarch != NULL); |
| 4087 | gdb_assert (gdbarch->stap_parse_special_token != NULL); |
| 4088 | if (gdbarch_debug >= 2) |
| 4089 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n"); |
| 4090 | return gdbarch->stap_parse_special_token (gdbarch, p); |
| 4091 | } |
| 4092 | |
| 4093 | void |
| 4094 | set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, |
| 4095 | gdbarch_stap_parse_special_token_ftype stap_parse_special_token) |
| 4096 | { |
| 4097 | gdbarch->stap_parse_special_token = stap_parse_special_token; |
| 4098 | } |
| 4099 | |
| 4100 | int |
| 4101 | gdbarch_has_global_solist (struct gdbarch *gdbarch) |
| 4102 | { |
| 4103 | gdb_assert (gdbarch != NULL); |
| 4104 | /* Skip verify of has_global_solist, invalid_p == 0 */ |
| 4105 | if (gdbarch_debug >= 2) |
| 4106 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n"); |
| 4107 | return gdbarch->has_global_solist; |
| 4108 | } |
| 4109 | |
| 4110 | void |
| 4111 | set_gdbarch_has_global_solist (struct gdbarch *gdbarch, |
| 4112 | int has_global_solist) |
| 4113 | { |
| 4114 | gdbarch->has_global_solist = has_global_solist; |
| 4115 | } |
| 4116 | |
| 4117 | int |
| 4118 | gdbarch_has_global_breakpoints (struct gdbarch *gdbarch) |
| 4119 | { |
| 4120 | gdb_assert (gdbarch != NULL); |
| 4121 | /* Skip verify of has_global_breakpoints, invalid_p == 0 */ |
| 4122 | if (gdbarch_debug >= 2) |
| 4123 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n"); |
| 4124 | return gdbarch->has_global_breakpoints; |
| 4125 | } |
| 4126 | |
| 4127 | void |
| 4128 | set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch, |
| 4129 | int has_global_breakpoints) |
| 4130 | { |
| 4131 | gdbarch->has_global_breakpoints = has_global_breakpoints; |
| 4132 | } |
| 4133 | |
| 4134 | int |
| 4135 | gdbarch_has_shared_address_space (struct gdbarch *gdbarch) |
| 4136 | { |
| 4137 | gdb_assert (gdbarch != NULL); |
| 4138 | gdb_assert (gdbarch->has_shared_address_space != NULL); |
| 4139 | if (gdbarch_debug >= 2) |
| 4140 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n"); |
| 4141 | return gdbarch->has_shared_address_space (gdbarch); |
| 4142 | } |
| 4143 | |
| 4144 | void |
| 4145 | set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch, |
| 4146 | gdbarch_has_shared_address_space_ftype has_shared_address_space) |
| 4147 | { |
| 4148 | gdbarch->has_shared_address_space = has_shared_address_space; |
| 4149 | } |
| 4150 | |
| 4151 | int |
| 4152 | gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg) |
| 4153 | { |
| 4154 | gdb_assert (gdbarch != NULL); |
| 4155 | gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL); |
| 4156 | if (gdbarch_debug >= 2) |
| 4157 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n"); |
| 4158 | return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg); |
| 4159 | } |
| 4160 | |
| 4161 | void |
| 4162 | set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, |
| 4163 | gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at) |
| 4164 | { |
| 4165 | gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at; |
| 4166 | } |
| 4167 | |
| 4168 | const char * |
| 4169 | gdbarch_auto_charset (struct gdbarch *gdbarch) |
| 4170 | { |
| 4171 | gdb_assert (gdbarch != NULL); |
| 4172 | gdb_assert (gdbarch->auto_charset != NULL); |
| 4173 | if (gdbarch_debug >= 2) |
| 4174 | fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n"); |
| 4175 | return gdbarch->auto_charset (); |
| 4176 | } |
| 4177 | |
| 4178 | void |
| 4179 | set_gdbarch_auto_charset (struct gdbarch *gdbarch, |
| 4180 | gdbarch_auto_charset_ftype auto_charset) |
| 4181 | { |
| 4182 | gdbarch->auto_charset = auto_charset; |
| 4183 | } |
| 4184 | |
| 4185 | const char * |
| 4186 | gdbarch_auto_wide_charset (struct gdbarch *gdbarch) |
| 4187 | { |
| 4188 | gdb_assert (gdbarch != NULL); |
| 4189 | gdb_assert (gdbarch->auto_wide_charset != NULL); |
| 4190 | if (gdbarch_debug >= 2) |
| 4191 | fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n"); |
| 4192 | return gdbarch->auto_wide_charset (); |
| 4193 | } |
| 4194 | |
| 4195 | void |
| 4196 | set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, |
| 4197 | gdbarch_auto_wide_charset_ftype auto_wide_charset) |
| 4198 | { |
| 4199 | gdbarch->auto_wide_charset = auto_wide_charset; |
| 4200 | } |
| 4201 | |
| 4202 | const char * |
| 4203 | gdbarch_solib_symbols_extension (struct gdbarch *gdbarch) |
| 4204 | { |
| 4205 | gdb_assert (gdbarch != NULL); |
| 4206 | if (gdbarch_debug >= 2) |
| 4207 | fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n"); |
| 4208 | return gdbarch->solib_symbols_extension; |
| 4209 | } |
| 4210 | |
| 4211 | void |
| 4212 | set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, |
| 4213 | const char * solib_symbols_extension) |
| 4214 | { |
| 4215 | gdbarch->solib_symbols_extension = solib_symbols_extension; |
| 4216 | } |
| 4217 | |
| 4218 | int |
| 4219 | gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch) |
| 4220 | { |
| 4221 | gdb_assert (gdbarch != NULL); |
| 4222 | /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ |
| 4223 | if (gdbarch_debug >= 2) |
| 4224 | fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n"); |
| 4225 | return gdbarch->has_dos_based_file_system; |
| 4226 | } |
| 4227 | |
| 4228 | void |
| 4229 | set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch, |
| 4230 | int has_dos_based_file_system) |
| 4231 | { |
| 4232 | gdbarch->has_dos_based_file_system = has_dos_based_file_system; |
| 4233 | } |
| 4234 | |
| 4235 | void |
| 4236 | gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope) |
| 4237 | { |
| 4238 | gdb_assert (gdbarch != NULL); |
| 4239 | gdb_assert (gdbarch->gen_return_address != NULL); |
| 4240 | if (gdbarch_debug >= 2) |
| 4241 | fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n"); |
| 4242 | gdbarch->gen_return_address (gdbarch, ax, value, scope); |
| 4243 | } |
| 4244 | |
| 4245 | void |
| 4246 | set_gdbarch_gen_return_address (struct gdbarch *gdbarch, |
| 4247 | gdbarch_gen_return_address_ftype gen_return_address) |
| 4248 | { |
| 4249 | gdbarch->gen_return_address = gen_return_address; |
| 4250 | } |
| 4251 | |
| 4252 | int |
| 4253 | gdbarch_info_proc_p (struct gdbarch *gdbarch) |
| 4254 | { |
| 4255 | gdb_assert (gdbarch != NULL); |
| 4256 | return gdbarch->info_proc != NULL; |
| 4257 | } |
| 4258 | |
| 4259 | void |
| 4260 | gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what) |
| 4261 | { |
| 4262 | gdb_assert (gdbarch != NULL); |
| 4263 | gdb_assert (gdbarch->info_proc != NULL); |
| 4264 | if (gdbarch_debug >= 2) |
| 4265 | fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n"); |
| 4266 | gdbarch->info_proc (gdbarch, args, what); |
| 4267 | } |
| 4268 | |
| 4269 | void |
| 4270 | set_gdbarch_info_proc (struct gdbarch *gdbarch, |
| 4271 | gdbarch_info_proc_ftype info_proc) |
| 4272 | { |
| 4273 | gdbarch->info_proc = info_proc; |
| 4274 | } |
| 4275 | |
| 4276 | int |
| 4277 | gdbarch_core_info_proc_p (struct gdbarch *gdbarch) |
| 4278 | { |
| 4279 | gdb_assert (gdbarch != NULL); |
| 4280 | return gdbarch->core_info_proc != NULL; |
| 4281 | } |
| 4282 | |
| 4283 | void |
| 4284 | gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what) |
| 4285 | { |
| 4286 | gdb_assert (gdbarch != NULL); |
| 4287 | gdb_assert (gdbarch->core_info_proc != NULL); |
| 4288 | if (gdbarch_debug >= 2) |
| 4289 | fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n"); |
| 4290 | gdbarch->core_info_proc (gdbarch, args, what); |
| 4291 | } |
| 4292 | |
| 4293 | void |
| 4294 | set_gdbarch_core_info_proc (struct gdbarch *gdbarch, |
| 4295 | gdbarch_core_info_proc_ftype core_info_proc) |
| 4296 | { |
| 4297 | gdbarch->core_info_proc = core_info_proc; |
| 4298 | } |
| 4299 | |
| 4300 | void |
| 4301 | gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, iterate_over_objfiles_in_search_order_cb_ftype *cb, void *cb_data, struct objfile *current_objfile) |
| 4302 | { |
| 4303 | gdb_assert (gdbarch != NULL); |
| 4304 | gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL); |
| 4305 | if (gdbarch_debug >= 2) |
| 4306 | fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n"); |
| 4307 | gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile); |
| 4308 | } |
| 4309 | |
| 4310 | void |
| 4311 | set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, |
| 4312 | gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order) |
| 4313 | { |
| 4314 | gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order; |
| 4315 | } |
| 4316 | |
| 4317 | struct ravenscar_arch_ops * |
| 4318 | gdbarch_ravenscar_ops (struct gdbarch *gdbarch) |
| 4319 | { |
| 4320 | gdb_assert (gdbarch != NULL); |
| 4321 | /* Skip verify of ravenscar_ops, invalid_p == 0 */ |
| 4322 | if (gdbarch_debug >= 2) |
| 4323 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n"); |
| 4324 | return gdbarch->ravenscar_ops; |
| 4325 | } |
| 4326 | |
| 4327 | void |
| 4328 | set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch, |
| 4329 | struct ravenscar_arch_ops * ravenscar_ops) |
| 4330 | { |
| 4331 | gdbarch->ravenscar_ops = ravenscar_ops; |
| 4332 | } |
| 4333 | |
| 4334 | int |
| 4335 | gdbarch_insn_is_call (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4336 | { |
| 4337 | gdb_assert (gdbarch != NULL); |
| 4338 | gdb_assert (gdbarch->insn_is_call != NULL); |
| 4339 | if (gdbarch_debug >= 2) |
| 4340 | fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_call called\n"); |
| 4341 | return gdbarch->insn_is_call (gdbarch, addr); |
| 4342 | } |
| 4343 | |
| 4344 | void |
| 4345 | set_gdbarch_insn_is_call (struct gdbarch *gdbarch, |
| 4346 | gdbarch_insn_is_call_ftype insn_is_call) |
| 4347 | { |
| 4348 | gdbarch->insn_is_call = insn_is_call; |
| 4349 | } |
| 4350 | |
| 4351 | int |
| 4352 | gdbarch_insn_is_ret (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4353 | { |
| 4354 | gdb_assert (gdbarch != NULL); |
| 4355 | gdb_assert (gdbarch->insn_is_ret != NULL); |
| 4356 | if (gdbarch_debug >= 2) |
| 4357 | fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_ret called\n"); |
| 4358 | return gdbarch->insn_is_ret (gdbarch, addr); |
| 4359 | } |
| 4360 | |
| 4361 | void |
| 4362 | set_gdbarch_insn_is_ret (struct gdbarch *gdbarch, |
| 4363 | gdbarch_insn_is_ret_ftype insn_is_ret) |
| 4364 | { |
| 4365 | gdbarch->insn_is_ret = insn_is_ret; |
| 4366 | } |
| 4367 | |
| 4368 | int |
| 4369 | gdbarch_insn_is_jump (struct gdbarch *gdbarch, CORE_ADDR addr) |
| 4370 | { |
| 4371 | gdb_assert (gdbarch != NULL); |
| 4372 | gdb_assert (gdbarch->insn_is_jump != NULL); |
| 4373 | if (gdbarch_debug >= 2) |
| 4374 | fprintf_unfiltered (gdb_stdlog, "gdbarch_insn_is_jump called\n"); |
| 4375 | return gdbarch->insn_is_jump (gdbarch, addr); |
| 4376 | } |
| 4377 | |
| 4378 | void |
| 4379 | set_gdbarch_insn_is_jump (struct gdbarch *gdbarch, |
| 4380 | gdbarch_insn_is_jump_ftype insn_is_jump) |
| 4381 | { |
| 4382 | gdbarch->insn_is_jump = insn_is_jump; |
| 4383 | } |
| 4384 | |
| 4385 | int |
| 4386 | gdbarch_auxv_parse_p (struct gdbarch *gdbarch) |
| 4387 | { |
| 4388 | gdb_assert (gdbarch != NULL); |
| 4389 | return gdbarch->auxv_parse != NULL; |
| 4390 | } |
| 4391 | |
| 4392 | int |
| 4393 | gdbarch_auxv_parse (struct gdbarch *gdbarch, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp) |
| 4394 | { |
| 4395 | gdb_assert (gdbarch != NULL); |
| 4396 | gdb_assert (gdbarch->auxv_parse != NULL); |
| 4397 | if (gdbarch_debug >= 2) |
| 4398 | fprintf_unfiltered (gdb_stdlog, "gdbarch_auxv_parse called\n"); |
| 4399 | return gdbarch->auxv_parse (gdbarch, readptr, endptr, typep, valp); |
| 4400 | } |
| 4401 | |
| 4402 | void |
| 4403 | set_gdbarch_auxv_parse (struct gdbarch *gdbarch, |
| 4404 | gdbarch_auxv_parse_ftype auxv_parse) |
| 4405 | { |
| 4406 | gdbarch->auxv_parse = auxv_parse; |
| 4407 | } |
| 4408 | |
| 4409 | |
| 4410 | /* Keep a registry of per-architecture data-pointers required by GDB |
| 4411 | modules. */ |
| 4412 | |
| 4413 | struct gdbarch_data |
| 4414 | { |
| 4415 | unsigned index; |
| 4416 | int init_p; |
| 4417 | gdbarch_data_pre_init_ftype *pre_init; |
| 4418 | gdbarch_data_post_init_ftype *post_init; |
| 4419 | }; |
| 4420 | |
| 4421 | struct gdbarch_data_registration |
| 4422 | { |
| 4423 | struct gdbarch_data *data; |
| 4424 | struct gdbarch_data_registration *next; |
| 4425 | }; |
| 4426 | |
| 4427 | struct gdbarch_data_registry |
| 4428 | { |
| 4429 | unsigned nr; |
| 4430 | struct gdbarch_data_registration *registrations; |
| 4431 | }; |
| 4432 | |
| 4433 | struct gdbarch_data_registry gdbarch_data_registry = |
| 4434 | { |
| 4435 | 0, NULL, |
| 4436 | }; |
| 4437 | |
| 4438 | static struct gdbarch_data * |
| 4439 | gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init, |
| 4440 | gdbarch_data_post_init_ftype *post_init) |
| 4441 | { |
| 4442 | struct gdbarch_data_registration **curr; |
| 4443 | |
| 4444 | /* Append the new registration. */ |
| 4445 | for (curr = &gdbarch_data_registry.registrations; |
| 4446 | (*curr) != NULL; |
| 4447 | curr = &(*curr)->next); |
| 4448 | (*curr) = XNEW (struct gdbarch_data_registration); |
| 4449 | (*curr)->next = NULL; |
| 4450 | (*curr)->data = XNEW (struct gdbarch_data); |
| 4451 | (*curr)->data->index = gdbarch_data_registry.nr++; |
| 4452 | (*curr)->data->pre_init = pre_init; |
| 4453 | (*curr)->data->post_init = post_init; |
| 4454 | (*curr)->data->init_p = 1; |
| 4455 | return (*curr)->data; |
| 4456 | } |
| 4457 | |
| 4458 | struct gdbarch_data * |
| 4459 | gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init) |
| 4460 | { |
| 4461 | return gdbarch_data_register (pre_init, NULL); |
| 4462 | } |
| 4463 | |
| 4464 | struct gdbarch_data * |
| 4465 | gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init) |
| 4466 | { |
| 4467 | return gdbarch_data_register (NULL, post_init); |
| 4468 | } |
| 4469 | |
| 4470 | /* Create/delete the gdbarch data vector. */ |
| 4471 | |
| 4472 | static void |
| 4473 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
| 4474 | { |
| 4475 | gdb_assert (gdbarch->data == NULL); |
| 4476 | gdbarch->nr_data = gdbarch_data_registry.nr; |
| 4477 | gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *); |
| 4478 | } |
| 4479 | |
| 4480 | /* Initialize the current value of the specified per-architecture |
| 4481 | data-pointer. */ |
| 4482 | |
| 4483 | void |
| 4484 | deprecated_set_gdbarch_data (struct gdbarch *gdbarch, |
| 4485 | struct gdbarch_data *data, |
| 4486 | void *pointer) |
| 4487 | { |
| 4488 | gdb_assert (data->index < gdbarch->nr_data); |
| 4489 | gdb_assert (gdbarch->data[data->index] == NULL); |
| 4490 | gdb_assert (data->pre_init == NULL); |
| 4491 | gdbarch->data[data->index] = pointer; |
| 4492 | } |
| 4493 | |
| 4494 | /* Return the current value of the specified per-architecture |
| 4495 | data-pointer. */ |
| 4496 | |
| 4497 | void * |
| 4498 | gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data) |
| 4499 | { |
| 4500 | gdb_assert (data->index < gdbarch->nr_data); |
| 4501 | if (gdbarch->data[data->index] == NULL) |
| 4502 | { |
| 4503 | /* The data-pointer isn't initialized, call init() to get a |
| 4504 | value. */ |
| 4505 | if (data->pre_init != NULL) |
| 4506 | /* Mid architecture creation: pass just the obstack, and not |
| 4507 | the entire architecture, as that way it isn't possible for |
| 4508 | pre-init code to refer to undefined architecture |
| 4509 | fields. */ |
| 4510 | gdbarch->data[data->index] = data->pre_init (gdbarch->obstack); |
| 4511 | else if (gdbarch->initialized_p |
| 4512 | && data->post_init != NULL) |
| 4513 | /* Post architecture creation: pass the entire architecture |
| 4514 | (as all fields are valid), but be careful to also detect |
| 4515 | recursive references. */ |
| 4516 | { |
| 4517 | gdb_assert (data->init_p); |
| 4518 | data->init_p = 0; |
| 4519 | gdbarch->data[data->index] = data->post_init (gdbarch); |
| 4520 | data->init_p = 1; |
| 4521 | } |
| 4522 | else |
| 4523 | /* The architecture initialization hasn't completed - punt - |
| 4524 | hope that the caller knows what they are doing. Once |
| 4525 | deprecated_set_gdbarch_data has been initialized, this can be |
| 4526 | changed to an internal error. */ |
| 4527 | return NULL; |
| 4528 | gdb_assert (gdbarch->data[data->index] != NULL); |
| 4529 | } |
| 4530 | return gdbarch->data[data->index]; |
| 4531 | } |
| 4532 | |
| 4533 | |
| 4534 | /* Keep a registry of the architectures known by GDB. */ |
| 4535 | |
| 4536 | struct gdbarch_registration |
| 4537 | { |
| 4538 | enum bfd_architecture bfd_architecture; |
| 4539 | gdbarch_init_ftype *init; |
| 4540 | gdbarch_dump_tdep_ftype *dump_tdep; |
| 4541 | struct gdbarch_list *arches; |
| 4542 | struct gdbarch_registration *next; |
| 4543 | }; |
| 4544 | |
| 4545 | static struct gdbarch_registration *gdbarch_registry = NULL; |
| 4546 | |
| 4547 | static void |
| 4548 | append_name (const char ***buf, int *nr, const char *name) |
| 4549 | { |
| 4550 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); |
| 4551 | (*buf)[*nr] = name; |
| 4552 | *nr += 1; |
| 4553 | } |
| 4554 | |
| 4555 | const char ** |
| 4556 | gdbarch_printable_names (void) |
| 4557 | { |
| 4558 | /* Accumulate a list of names based on the registed list of |
| 4559 | architectures. */ |
| 4560 | int nr_arches = 0; |
| 4561 | const char **arches = NULL; |
| 4562 | struct gdbarch_registration *rego; |
| 4563 | |
| 4564 | for (rego = gdbarch_registry; |
| 4565 | rego != NULL; |
| 4566 | rego = rego->next) |
| 4567 | { |
| 4568 | const struct bfd_arch_info *ap; |
| 4569 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); |
| 4570 | if (ap == NULL) |
| 4571 | internal_error (__FILE__, __LINE__, |
| 4572 | _("gdbarch_architecture_names: multi-arch unknown")); |
| 4573 | do |
| 4574 | { |
| 4575 | append_name (&arches, &nr_arches, ap->printable_name); |
| 4576 | ap = ap->next; |
| 4577 | } |
| 4578 | while (ap != NULL); |
| 4579 | } |
| 4580 | append_name (&arches, &nr_arches, NULL); |
| 4581 | return arches; |
| 4582 | } |
| 4583 | |
| 4584 | |
| 4585 | void |
| 4586 | gdbarch_register (enum bfd_architecture bfd_architecture, |
| 4587 | gdbarch_init_ftype *init, |
| 4588 | gdbarch_dump_tdep_ftype *dump_tdep) |
| 4589 | { |
| 4590 | struct gdbarch_registration **curr; |
| 4591 | const struct bfd_arch_info *bfd_arch_info; |
| 4592 | |
| 4593 | /* Check that BFD recognizes this architecture */ |
| 4594 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
| 4595 | if (bfd_arch_info == NULL) |
| 4596 | { |
| 4597 | internal_error (__FILE__, __LINE__, |
| 4598 | _("gdbarch: Attempt to register " |
| 4599 | "unknown architecture (%d)"), |
| 4600 | bfd_architecture); |
| 4601 | } |
| 4602 | /* Check that we haven't seen this architecture before. */ |
| 4603 | for (curr = &gdbarch_registry; |
| 4604 | (*curr) != NULL; |
| 4605 | curr = &(*curr)->next) |
| 4606 | { |
| 4607 | if (bfd_architecture == (*curr)->bfd_architecture) |
| 4608 | internal_error (__FILE__, __LINE__, |
| 4609 | _("gdbarch: Duplicate registration " |
| 4610 | "of architecture (%s)"), |
| 4611 | bfd_arch_info->printable_name); |
| 4612 | } |
| 4613 | /* log it */ |
| 4614 | if (gdbarch_debug) |
| 4615 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n", |
| 4616 | bfd_arch_info->printable_name, |
| 4617 | host_address_to_string (init)); |
| 4618 | /* Append it */ |
| 4619 | (*curr) = XNEW (struct gdbarch_registration); |
| 4620 | (*curr)->bfd_architecture = bfd_architecture; |
| 4621 | (*curr)->init = init; |
| 4622 | (*curr)->dump_tdep = dump_tdep; |
| 4623 | (*curr)->arches = NULL; |
| 4624 | (*curr)->next = NULL; |
| 4625 | } |
| 4626 | |
| 4627 | void |
| 4628 | register_gdbarch_init (enum bfd_architecture bfd_architecture, |
| 4629 | gdbarch_init_ftype *init) |
| 4630 | { |
| 4631 | gdbarch_register (bfd_architecture, init, NULL); |
| 4632 | } |
| 4633 | |
| 4634 | |
| 4635 | /* Look for an architecture using gdbarch_info. */ |
| 4636 | |
| 4637 | struct gdbarch_list * |
| 4638 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
| 4639 | const struct gdbarch_info *info) |
| 4640 | { |
| 4641 | for (; arches != NULL; arches = arches->next) |
| 4642 | { |
| 4643 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) |
| 4644 | continue; |
| 4645 | if (info->byte_order != arches->gdbarch->byte_order) |
| 4646 | continue; |
| 4647 | if (info->osabi != arches->gdbarch->osabi) |
| 4648 | continue; |
| 4649 | if (info->target_desc != arches->gdbarch->target_desc) |
| 4650 | continue; |
| 4651 | return arches; |
| 4652 | } |
| 4653 | return NULL; |
| 4654 | } |
| 4655 | |
| 4656 | |
| 4657 | /* Find an architecture that matches the specified INFO. Create a new |
| 4658 | architecture if needed. Return that new architecture. */ |
| 4659 | |
| 4660 | struct gdbarch * |
| 4661 | gdbarch_find_by_info (struct gdbarch_info info) |
| 4662 | { |
| 4663 | struct gdbarch *new_gdbarch; |
| 4664 | struct gdbarch_registration *rego; |
| 4665 | |
| 4666 | /* Fill in missing parts of the INFO struct using a number of |
| 4667 | sources: "set ..."; INFOabfd supplied; and the global |
| 4668 | defaults. */ |
| 4669 | gdbarch_info_fill (&info); |
| 4670 | |
| 4671 | /* Must have found some sort of architecture. */ |
| 4672 | gdb_assert (info.bfd_arch_info != NULL); |
| 4673 | |
| 4674 | if (gdbarch_debug) |
| 4675 | { |
| 4676 | fprintf_unfiltered (gdb_stdlog, |
| 4677 | "gdbarch_find_by_info: info.bfd_arch_info %s\n", |
| 4678 | (info.bfd_arch_info != NULL |
| 4679 | ? info.bfd_arch_info->printable_name |
| 4680 | : "(null)")); |
| 4681 | fprintf_unfiltered (gdb_stdlog, |
| 4682 | "gdbarch_find_by_info: info.byte_order %d (%s)\n", |
| 4683 | info.byte_order, |
| 4684 | (info.byte_order == BFD_ENDIAN_BIG ? "big" |
| 4685 | : info.byte_order == BFD_ENDIAN_LITTLE ? "little" |
| 4686 | : "default")); |
| 4687 | fprintf_unfiltered (gdb_stdlog, |
| 4688 | "gdbarch_find_by_info: info.osabi %d (%s)\n", |
| 4689 | info.osabi, gdbarch_osabi_name (info.osabi)); |
| 4690 | fprintf_unfiltered (gdb_stdlog, |
| 4691 | "gdbarch_find_by_info: info.abfd %s\n", |
| 4692 | host_address_to_string (info.abfd)); |
| 4693 | fprintf_unfiltered (gdb_stdlog, |
| 4694 | "gdbarch_find_by_info: info.tdep_info %s\n", |
| 4695 | host_address_to_string (info.tdep_info)); |
| 4696 | } |
| 4697 | |
| 4698 | /* Find the tdep code that knows about this architecture. */ |
| 4699 | for (rego = gdbarch_registry; |
| 4700 | rego != NULL; |
| 4701 | rego = rego->next) |
| 4702 | if (rego->bfd_architecture == info.bfd_arch_info->arch) |
| 4703 | break; |
| 4704 | if (rego == NULL) |
| 4705 | { |
| 4706 | if (gdbarch_debug) |
| 4707 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
| 4708 | "No matching architecture\n"); |
| 4709 | return 0; |
| 4710 | } |
| 4711 | |
| 4712 | /* Ask the tdep code for an architecture that matches "info". */ |
| 4713 | new_gdbarch = rego->init (info, rego->arches); |
| 4714 | |
| 4715 | /* Did the tdep code like it? No. Reject the change and revert to |
| 4716 | the old architecture. */ |
| 4717 | if (new_gdbarch == NULL) |
| 4718 | { |
| 4719 | if (gdbarch_debug) |
| 4720 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
| 4721 | "Target rejected architecture\n"); |
| 4722 | return NULL; |
| 4723 | } |
| 4724 | |
| 4725 | /* Is this a pre-existing architecture (as determined by already |
| 4726 | being initialized)? Move it to the front of the architecture |
| 4727 | list (keeping the list sorted Most Recently Used). */ |
| 4728 | if (new_gdbarch->initialized_p) |
| 4729 | { |
| 4730 | struct gdbarch_list **list; |
| 4731 | struct gdbarch_list *this; |
| 4732 | if (gdbarch_debug) |
| 4733 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
| 4734 | "Previous architecture %s (%s) selected\n", |
| 4735 | host_address_to_string (new_gdbarch), |
| 4736 | new_gdbarch->bfd_arch_info->printable_name); |
| 4737 | /* Find the existing arch in the list. */ |
| 4738 | for (list = ®o->arches; |
| 4739 | (*list) != NULL && (*list)->gdbarch != new_gdbarch; |
| 4740 | list = &(*list)->next); |
| 4741 | /* It had better be in the list of architectures. */ |
| 4742 | gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch); |
| 4743 | /* Unlink THIS. */ |
| 4744 | this = (*list); |
| 4745 | (*list) = this->next; |
| 4746 | /* Insert THIS at the front. */ |
| 4747 | this->next = rego->arches; |
| 4748 | rego->arches = this; |
| 4749 | /* Return it. */ |
| 4750 | return new_gdbarch; |
| 4751 | } |
| 4752 | |
| 4753 | /* It's a new architecture. */ |
| 4754 | if (gdbarch_debug) |
| 4755 | fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " |
| 4756 | "New architecture %s (%s) selected\n", |
| 4757 | host_address_to_string (new_gdbarch), |
| 4758 | new_gdbarch->bfd_arch_info->printable_name); |
| 4759 | |
| 4760 | /* Insert the new architecture into the front of the architecture |
| 4761 | list (keep the list sorted Most Recently Used). */ |
| 4762 | { |
| 4763 | struct gdbarch_list *this = XNEW (struct gdbarch_list); |
| 4764 | this->next = rego->arches; |
| 4765 | this->gdbarch = new_gdbarch; |
| 4766 | rego->arches = this; |
| 4767 | } |
| 4768 | |
| 4769 | /* Check that the newly installed architecture is valid. Plug in |
| 4770 | any post init values. */ |
| 4771 | new_gdbarch->dump_tdep = rego->dump_tdep; |
| 4772 | verify_gdbarch (new_gdbarch); |
| 4773 | new_gdbarch->initialized_p = 1; |
| 4774 | |
| 4775 | if (gdbarch_debug) |
| 4776 | gdbarch_dump (new_gdbarch, gdb_stdlog); |
| 4777 | |
| 4778 | return new_gdbarch; |
| 4779 | } |
| 4780 | |
| 4781 | /* Make the specified architecture current. */ |
| 4782 | |
| 4783 | void |
| 4784 | set_target_gdbarch (struct gdbarch *new_gdbarch) |
| 4785 | { |
| 4786 | gdb_assert (new_gdbarch != NULL); |
| 4787 | gdb_assert (new_gdbarch->initialized_p); |
| 4788 | current_inferior ()->gdbarch = new_gdbarch; |
| 4789 | observer_notify_architecture_changed (new_gdbarch); |
| 4790 | registers_changed (); |
| 4791 | } |
| 4792 | |
| 4793 | /* Return the current inferior's arch. */ |
| 4794 | |
| 4795 | struct gdbarch * |
| 4796 | target_gdbarch (void) |
| 4797 | { |
| 4798 | return current_inferior ()->gdbarch; |
| 4799 | } |
| 4800 | |
| 4801 | extern void _initialize_gdbarch (void); |
| 4802 | |
| 4803 | void |
| 4804 | _initialize_gdbarch (void) |
| 4805 | { |
| 4806 | add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\ |
| 4807 | Set architecture debugging."), _("\ |
| 4808 | Show architecture debugging."), _("\ |
| 4809 | When non-zero, architecture debugging is enabled."), |
| 4810 | NULL, |
| 4811 | show_gdbarch_debug, |
| 4812 | &setdebuglist, &showdebuglist); |
| 4813 | } |