GDB (API)
|
00001 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED -*- buffer-read-only: t -*- */ 00002 /* vi:set ro: */ 00003 00004 /* Dynamic architecture support for GDB, the GNU debugger. 00005 00006 Copyright (C) 1998-2013 Free Software Foundation, Inc. 00007 00008 This file is part of GDB. 00009 00010 This program is free software; you can redistribute it and/or modify 00011 it under the terms of the GNU General Public License as published by 00012 the Free Software Foundation; either version 3 of the License, or 00013 (at your option) any later version. 00014 00015 This program is distributed in the hope that it will be useful, 00016 but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 GNU General Public License for more details. 00019 00020 You should have received a copy of the GNU General Public License 00021 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00022 00023 /* This file was created with the aid of ``gdbarch.sh''. 00024 00025 The Bourne shell script ``gdbarch.sh'' creates the files 00026 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them 00027 against the existing ``gdbarch.[hc]''. Any differences found 00028 being reported. 00029 00030 If editing this file, please also run gdbarch.sh and merge any 00031 changes into that script. Conversely, when making sweeping changes 00032 to this file, modifying gdbarch.sh and using its output may prove 00033 easier. */ 00034 00035 00036 #include "defs.h" 00037 #include "arch-utils.h" 00038 00039 #include "gdbcmd.h" 00040 #include "inferior.h" 00041 #include "symcat.h" 00042 00043 #include "floatformat.h" 00044 00045 #include "gdb_assert.h" 00046 #include "gdb_string.h" 00047 #include "reggroups.h" 00048 #include "osabi.h" 00049 #include "gdb_obstack.h" 00050 #include "observer.h" 00051 #include "regcache.h" 00052 #include "objfiles.h" 00053 00054 /* Static function declarations */ 00055 00056 static void alloc_gdbarch_data (struct gdbarch *); 00057 00058 /* Non-zero if we want to trace architecture code. */ 00059 00060 #ifndef GDBARCH_DEBUG 00061 #define GDBARCH_DEBUG 0 00062 #endif 00063 unsigned int gdbarch_debug = GDBARCH_DEBUG; 00064 static void 00065 show_gdbarch_debug (struct ui_file *file, int from_tty, 00066 struct cmd_list_element *c, const char *value) 00067 { 00068 fprintf_filtered (file, _("Architecture debugging is %s.\n"), value); 00069 } 00070 00071 static const char * 00072 pformat (const struct floatformat **format) 00073 { 00074 if (format == NULL) 00075 return "(null)"; 00076 else 00077 /* Just print out one of them - this is only for diagnostics. */ 00078 return format[0]->name; 00079 } 00080 00081 static const char * 00082 pstring (const char *string) 00083 { 00084 if (string == NULL) 00085 return "(null)"; 00086 return string; 00087 } 00088 00089 00090 /* Maintain the struct gdbarch object. */ 00091 00092 struct gdbarch 00093 { 00094 /* Has this architecture been fully initialized? */ 00095 int initialized_p; 00096 00097 /* An obstack bound to the lifetime of the architecture. */ 00098 struct obstack *obstack; 00099 00100 /* basic architectural information. */ 00101 const struct bfd_arch_info * bfd_arch_info; 00102 int byte_order; 00103 int byte_order_for_code; 00104 enum gdb_osabi osabi; 00105 const struct target_desc * target_desc; 00106 00107 /* target specific vector. */ 00108 struct gdbarch_tdep *tdep; 00109 gdbarch_dump_tdep_ftype *dump_tdep; 00110 00111 /* per-architecture data-pointers. */ 00112 unsigned nr_data; 00113 void **data; 00114 00115 /* Multi-arch values. 00116 00117 When extending this structure you must: 00118 00119 Add the field below. 00120 00121 Declare set/get functions and define the corresponding 00122 macro in gdbarch.h. 00123 00124 gdbarch_alloc(): If zero/NULL is not a suitable default, 00125 initialize the new field. 00126 00127 verify_gdbarch(): Confirm that the target updated the field 00128 correctly. 00129 00130 gdbarch_dump(): Add a fprintf_unfiltered call so that the new 00131 field is dumped out 00132 00133 ``startup_gdbarch()'': Append an initial value to the static 00134 variable (base values on the host's c-type system). 00135 00136 get_gdbarch(): Implement the set/get functions (probably using 00137 the macro's as shortcuts). 00138 00139 */ 00140 00141 int bits_big_endian; 00142 int short_bit; 00143 int int_bit; 00144 int long_bit; 00145 int long_long_bit; 00146 int long_long_align_bit; 00147 int half_bit; 00148 const struct floatformat ** half_format; 00149 int float_bit; 00150 const struct floatformat ** float_format; 00151 int double_bit; 00152 const struct floatformat ** double_format; 00153 int long_double_bit; 00154 const struct floatformat ** long_double_format; 00155 int ptr_bit; 00156 int addr_bit; 00157 int dwarf2_addr_size; 00158 int char_signed; 00159 gdbarch_read_pc_ftype *read_pc; 00160 gdbarch_write_pc_ftype *write_pc; 00161 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; 00162 gdbarch_pseudo_register_read_ftype *pseudo_register_read; 00163 gdbarch_pseudo_register_read_value_ftype *pseudo_register_read_value; 00164 gdbarch_pseudo_register_write_ftype *pseudo_register_write; 00165 int num_regs; 00166 int num_pseudo_regs; 00167 gdbarch_ax_pseudo_register_collect_ftype *ax_pseudo_register_collect; 00168 gdbarch_ax_pseudo_register_push_stack_ftype *ax_pseudo_register_push_stack; 00169 int sp_regnum; 00170 int pc_regnum; 00171 int ps_regnum; 00172 int fp0_regnum; 00173 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; 00174 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; 00175 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; 00176 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; 00177 gdbarch_register_name_ftype *register_name; 00178 gdbarch_register_type_ftype *register_type; 00179 gdbarch_dummy_id_ftype *dummy_id; 00180 int deprecated_fp_regnum; 00181 gdbarch_push_dummy_call_ftype *push_dummy_call; 00182 int call_dummy_location; 00183 gdbarch_push_dummy_code_ftype *push_dummy_code; 00184 gdbarch_print_registers_info_ftype *print_registers_info; 00185 gdbarch_print_float_info_ftype *print_float_info; 00186 gdbarch_print_vector_info_ftype *print_vector_info; 00187 gdbarch_register_sim_regno_ftype *register_sim_regno; 00188 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; 00189 gdbarch_cannot_store_register_ftype *cannot_store_register; 00190 gdbarch_get_longjmp_target_ftype *get_longjmp_target; 00191 int believe_pcc_promotion; 00192 gdbarch_convert_register_p_ftype *convert_register_p; 00193 gdbarch_register_to_value_ftype *register_to_value; 00194 gdbarch_value_to_register_ftype *value_to_register; 00195 gdbarch_value_from_register_ftype *value_from_register; 00196 gdbarch_pointer_to_address_ftype *pointer_to_address; 00197 gdbarch_address_to_pointer_ftype *address_to_pointer; 00198 gdbarch_integer_to_address_ftype *integer_to_address; 00199 gdbarch_return_value_ftype *return_value; 00200 gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p; 00201 gdbarch_skip_prologue_ftype *skip_prologue; 00202 gdbarch_skip_main_prologue_ftype *skip_main_prologue; 00203 gdbarch_inner_than_ftype *inner_than; 00204 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; 00205 gdbarch_remote_breakpoint_from_pc_ftype *remote_breakpoint_from_pc; 00206 gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address; 00207 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; 00208 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; 00209 CORE_ADDR decr_pc_after_break; 00210 CORE_ADDR deprecated_function_start_offset; 00211 gdbarch_remote_register_number_ftype *remote_register_number; 00212 gdbarch_fetch_tls_load_module_address_ftype *fetch_tls_load_module_address; 00213 CORE_ADDR frame_args_skip; 00214 gdbarch_unwind_pc_ftype *unwind_pc; 00215 gdbarch_unwind_sp_ftype *unwind_sp; 00216 gdbarch_frame_num_args_ftype *frame_num_args; 00217 gdbarch_frame_align_ftype *frame_align; 00218 gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr; 00219 int frame_red_zone_size; 00220 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; 00221 gdbarch_addr_bits_remove_ftype *addr_bits_remove; 00222 gdbarch_software_single_step_ftype *software_single_step; 00223 gdbarch_single_step_through_delay_ftype *single_step_through_delay; 00224 gdbarch_print_insn_ftype *print_insn; 00225 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; 00226 gdbarch_skip_solib_resolver_ftype *skip_solib_resolver; 00227 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; 00228 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; 00229 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; 00230 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; 00231 int cannot_step_breakpoint; 00232 int have_nonsteppable_watchpoint; 00233 gdbarch_address_class_type_flags_ftype *address_class_type_flags; 00234 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name; 00235 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags; 00236 gdbarch_register_reggroup_p_ftype *register_reggroup_p; 00237 gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument; 00238 gdbarch_regset_from_core_section_ftype *regset_from_core_section; 00239 struct core_regset_section * core_regset_sections; 00240 gdbarch_make_corefile_notes_ftype *make_corefile_notes; 00241 gdbarch_elfcore_write_linux_prpsinfo_ftype *elfcore_write_linux_prpsinfo; 00242 gdbarch_find_memory_regions_ftype *find_memory_regions; 00243 gdbarch_core_xfer_shared_libraries_ftype *core_xfer_shared_libraries; 00244 gdbarch_core_xfer_shared_libraries_aix_ftype *core_xfer_shared_libraries_aix; 00245 gdbarch_core_pid_to_str_ftype *core_pid_to_str; 00246 const char * gcore_bfd_target; 00247 int vtable_function_descriptors; 00248 int vbit_in_delta; 00249 gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint; 00250 ULONGEST max_insn_length; 00251 gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn; 00252 gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep; 00253 gdbarch_displaced_step_fixup_ftype *displaced_step_fixup; 00254 gdbarch_displaced_step_free_closure_ftype *displaced_step_free_closure; 00255 gdbarch_displaced_step_location_ftype *displaced_step_location; 00256 gdbarch_relocate_instruction_ftype *relocate_instruction; 00257 gdbarch_overlay_update_ftype *overlay_update; 00258 gdbarch_core_read_description_ftype *core_read_description; 00259 gdbarch_static_transform_name_ftype *static_transform_name; 00260 int sofun_address_maybe_missing; 00261 gdbarch_process_record_ftype *process_record; 00262 gdbarch_process_record_signal_ftype *process_record_signal; 00263 gdbarch_gdb_signal_from_target_ftype *gdb_signal_from_target; 00264 gdbarch_gdb_signal_to_target_ftype *gdb_signal_to_target; 00265 gdbarch_get_siginfo_type_ftype *get_siginfo_type; 00266 gdbarch_record_special_symbol_ftype *record_special_symbol; 00267 gdbarch_get_syscall_number_ftype *get_syscall_number; 00268 const char * stap_integer_prefix; 00269 const char * stap_integer_suffix; 00270 const char * stap_register_prefix; 00271 const char * stap_register_suffix; 00272 const char * stap_register_indirection_prefix; 00273 const char * stap_register_indirection_suffix; 00274 const char * stap_gdb_register_prefix; 00275 const char * stap_gdb_register_suffix; 00276 gdbarch_stap_is_single_operand_ftype *stap_is_single_operand; 00277 gdbarch_stap_parse_special_token_ftype *stap_parse_special_token; 00278 int has_global_solist; 00279 int has_global_breakpoints; 00280 gdbarch_has_shared_address_space_ftype *has_shared_address_space; 00281 gdbarch_fast_tracepoint_valid_at_ftype *fast_tracepoint_valid_at; 00282 gdbarch_auto_charset_ftype *auto_charset; 00283 gdbarch_auto_wide_charset_ftype *auto_wide_charset; 00284 const char * solib_symbols_extension; 00285 int has_dos_based_file_system; 00286 gdbarch_gen_return_address_ftype *gen_return_address; 00287 gdbarch_info_proc_ftype *info_proc; 00288 gdbarch_core_info_proc_ftype *core_info_proc; 00289 gdbarch_iterate_over_objfiles_in_search_order_ftype *iterate_over_objfiles_in_search_order; 00290 struct ravenscar_arch_ops * ravenscar_ops; 00291 }; 00292 00293 00294 /* The default architecture uses host values (for want of a better 00295 choice). */ 00296 00297 extern const struct bfd_arch_info bfd_default_arch_struct; 00298 00299 struct gdbarch startup_gdbarch = 00300 { 00301 1, /* Always initialized. */ 00302 NULL, /* The obstack. */ 00303 /* basic architecture information. */ 00304 &bfd_default_arch_struct, /* bfd_arch_info */ 00305 BFD_ENDIAN_BIG, /* byte_order */ 00306 BFD_ENDIAN_BIG, /* byte_order_for_code */ 00307 GDB_OSABI_UNKNOWN, /* osabi */ 00308 0, /* target_desc */ 00309 /* target specific vector and its dump routine. */ 00310 NULL, NULL, 00311 /*per-architecture data-pointers. */ 00312 0, NULL, 00313 /* Multi-arch values */ 00314 1, /* bits_big_endian */ 00315 8 * sizeof (short), /* short_bit */ 00316 8 * sizeof (int), /* int_bit */ 00317 8 * sizeof (long), /* long_bit */ 00318 8 * sizeof (LONGEST), /* long_long_bit */ 00319 8 * sizeof (LONGEST), /* long_long_align_bit */ 00320 16, /* half_bit */ 00321 0, /* half_format */ 00322 8 * sizeof (float), /* float_bit */ 00323 0, /* float_format */ 00324 8 * sizeof (double), /* double_bit */ 00325 0, /* double_format */ 00326 8 * sizeof (long double), /* long_double_bit */ 00327 0, /* long_double_format */ 00328 8 * sizeof (void*), /* ptr_bit */ 00329 8 * sizeof (void*), /* addr_bit */ 00330 sizeof (void*), /* dwarf2_addr_size */ 00331 1, /* char_signed */ 00332 0, /* read_pc */ 00333 0, /* write_pc */ 00334 legacy_virtual_frame_pointer, /* virtual_frame_pointer */ 00335 0, /* pseudo_register_read */ 00336 0, /* pseudo_register_read_value */ 00337 0, /* pseudo_register_write */ 00338 0, /* num_regs */ 00339 0, /* num_pseudo_regs */ 00340 0, /* ax_pseudo_register_collect */ 00341 0, /* ax_pseudo_register_push_stack */ 00342 -1, /* sp_regnum */ 00343 -1, /* pc_regnum */ 00344 -1, /* ps_regnum */ 00345 0, /* fp0_regnum */ 00346 no_op_reg_to_regnum, /* stab_reg_to_regnum */ 00347 no_op_reg_to_regnum, /* ecoff_reg_to_regnum */ 00348 no_op_reg_to_regnum, /* sdb_reg_to_regnum */ 00349 no_op_reg_to_regnum, /* dwarf2_reg_to_regnum */ 00350 0, /* register_name */ 00351 0, /* register_type */ 00352 0, /* dummy_id */ 00353 -1, /* deprecated_fp_regnum */ 00354 0, /* push_dummy_call */ 00355 0, /* call_dummy_location */ 00356 0, /* push_dummy_code */ 00357 default_print_registers_info, /* print_registers_info */ 00358 0, /* print_float_info */ 00359 0, /* print_vector_info */ 00360 legacy_register_sim_regno, /* register_sim_regno */ 00361 cannot_register_not, /* cannot_fetch_register */ 00362 cannot_register_not, /* cannot_store_register */ 00363 0, /* get_longjmp_target */ 00364 0, /* believe_pcc_promotion */ 00365 generic_convert_register_p, /* convert_register_p */ 00366 0, /* register_to_value */ 00367 0, /* value_to_register */ 00368 0, /* value_from_register */ 00369 unsigned_pointer_to_address, /* pointer_to_address */ 00370 unsigned_address_to_pointer, /* address_to_pointer */ 00371 0, /* integer_to_address */ 00372 0, /* return_value */ 00373 default_return_in_first_hidden_param_p, /* return_in_first_hidden_param_p */ 00374 0, /* skip_prologue */ 00375 0, /* skip_main_prologue */ 00376 0, /* inner_than */ 00377 0, /* breakpoint_from_pc */ 00378 default_remote_breakpoint_from_pc, /* remote_breakpoint_from_pc */ 00379 0, /* adjust_breakpoint_address */ 00380 default_memory_insert_breakpoint, /* memory_insert_breakpoint */ 00381 default_memory_remove_breakpoint, /* memory_remove_breakpoint */ 00382 0, /* decr_pc_after_break */ 00383 0, /* deprecated_function_start_offset */ 00384 default_remote_register_number, /* remote_register_number */ 00385 0, /* fetch_tls_load_module_address */ 00386 0, /* frame_args_skip */ 00387 0, /* unwind_pc */ 00388 0, /* unwind_sp */ 00389 0, /* frame_num_args */ 00390 0, /* frame_align */ 00391 default_stabs_argument_has_addr, /* stabs_argument_has_addr */ 00392 0, /* frame_red_zone_size */ 00393 convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */ 00394 core_addr_identity, /* addr_bits_remove */ 00395 0, /* software_single_step */ 00396 0, /* single_step_through_delay */ 00397 0, /* print_insn */ 00398 0, /* skip_trampoline_code */ 00399 generic_skip_solib_resolver, /* skip_solib_resolver */ 00400 generic_in_solib_return_trampoline, /* in_solib_return_trampoline */ 00401 generic_in_function_epilogue_p, /* in_function_epilogue_p */ 00402 0, /* elf_make_msymbol_special */ 00403 0, /* coff_make_msymbol_special */ 00404 0, /* cannot_step_breakpoint */ 00405 0, /* have_nonsteppable_watchpoint */ 00406 0, /* address_class_type_flags */ 00407 0, /* address_class_type_flags_to_name */ 00408 0, /* address_class_name_to_type_flags */ 00409 default_register_reggroup_p, /* register_reggroup_p */ 00410 0, /* fetch_pointer_argument */ 00411 0, /* regset_from_core_section */ 00412 0, /* core_regset_sections */ 00413 0, /* make_corefile_notes */ 00414 0, /* elfcore_write_linux_prpsinfo */ 00415 0, /* find_memory_regions */ 00416 0, /* core_xfer_shared_libraries */ 00417 0, /* core_xfer_shared_libraries_aix */ 00418 0, /* core_pid_to_str */ 00419 0, /* gcore_bfd_target */ 00420 0, /* vtable_function_descriptors */ 00421 0, /* vbit_in_delta */ 00422 0, /* skip_permanent_breakpoint */ 00423 0, /* max_insn_length */ 00424 0, /* displaced_step_copy_insn */ 00425 default_displaced_step_hw_singlestep, /* displaced_step_hw_singlestep */ 00426 0, /* displaced_step_fixup */ 00427 NULL, /* displaced_step_free_closure */ 00428 NULL, /* displaced_step_location */ 00429 0, /* relocate_instruction */ 00430 0, /* overlay_update */ 00431 0, /* core_read_description */ 00432 0, /* static_transform_name */ 00433 0, /* sofun_address_maybe_missing */ 00434 0, /* process_record */ 00435 0, /* process_record_signal */ 00436 0, /* gdb_signal_from_target */ 00437 0, /* gdb_signal_to_target */ 00438 0, /* get_siginfo_type */ 00439 0, /* record_special_symbol */ 00440 0, /* get_syscall_number */ 00441 0, /* stap_integer_prefix */ 00442 0, /* stap_integer_suffix */ 00443 0, /* stap_register_prefix */ 00444 0, /* stap_register_suffix */ 00445 0, /* stap_register_indirection_prefix */ 00446 0, /* stap_register_indirection_suffix */ 00447 0, /* stap_gdb_register_prefix */ 00448 0, /* stap_gdb_register_suffix */ 00449 0, /* stap_is_single_operand */ 00450 0, /* stap_parse_special_token */ 00451 0, /* has_global_solist */ 00452 0, /* has_global_breakpoints */ 00453 default_has_shared_address_space, /* has_shared_address_space */ 00454 default_fast_tracepoint_valid_at, /* fast_tracepoint_valid_at */ 00455 default_auto_charset, /* auto_charset */ 00456 default_auto_wide_charset, /* auto_wide_charset */ 00457 0, /* solib_symbols_extension */ 00458 0, /* has_dos_based_file_system */ 00459 default_gen_return_address, /* gen_return_address */ 00460 0, /* info_proc */ 00461 0, /* core_info_proc */ 00462 default_iterate_over_objfiles_in_search_order, /* iterate_over_objfiles_in_search_order */ 00463 NULL, /* ravenscar_ops */ 00464 /* startup_gdbarch() */ 00465 }; 00466 00467 00468 /* Create a new ``struct gdbarch'' based on information provided by 00469 ``struct gdbarch_info''. */ 00470 00471 struct gdbarch * 00472 gdbarch_alloc (const struct gdbarch_info *info, 00473 struct gdbarch_tdep *tdep) 00474 { 00475 struct gdbarch *gdbarch; 00476 00477 /* Create an obstack for allocating all the per-architecture memory, 00478 then use that to allocate the architecture vector. */ 00479 struct obstack *obstack = XMALLOC (struct obstack); 00480 obstack_init (obstack); 00481 gdbarch = obstack_alloc (obstack, sizeof (*gdbarch)); 00482 memset (gdbarch, 0, sizeof (*gdbarch)); 00483 gdbarch->obstack = obstack; 00484 00485 alloc_gdbarch_data (gdbarch); 00486 00487 gdbarch->tdep = tdep; 00488 00489 gdbarch->bfd_arch_info = info->bfd_arch_info; 00490 gdbarch->byte_order = info->byte_order; 00491 gdbarch->byte_order_for_code = info->byte_order_for_code; 00492 gdbarch->osabi = info->osabi; 00493 gdbarch->target_desc = info->target_desc; 00494 00495 /* Force the explicit initialization of these. */ 00496 gdbarch->bits_big_endian = (gdbarch->byte_order == BFD_ENDIAN_BIG); 00497 gdbarch->short_bit = 2*TARGET_CHAR_BIT; 00498 gdbarch->int_bit = 4*TARGET_CHAR_BIT; 00499 gdbarch->long_bit = 4*TARGET_CHAR_BIT; 00500 gdbarch->long_long_bit = 2*gdbarch->long_bit; 00501 gdbarch->long_long_align_bit = 2*gdbarch->long_bit; 00502 gdbarch->half_bit = 2*TARGET_CHAR_BIT; 00503 gdbarch->float_bit = 4*TARGET_CHAR_BIT; 00504 gdbarch->double_bit = 8*TARGET_CHAR_BIT; 00505 gdbarch->long_double_bit = 8*TARGET_CHAR_BIT; 00506 gdbarch->ptr_bit = gdbarch->int_bit; 00507 gdbarch->char_signed = -1; 00508 gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; 00509 gdbarch->num_regs = -1; 00510 gdbarch->sp_regnum = -1; 00511 gdbarch->pc_regnum = -1; 00512 gdbarch->ps_regnum = -1; 00513 gdbarch->fp0_regnum = -1; 00514 gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; 00515 gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; 00516 gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; 00517 gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; 00518 gdbarch->deprecated_fp_regnum = -1; 00519 gdbarch->call_dummy_location = AT_ENTRY_POINT; 00520 gdbarch->print_registers_info = default_print_registers_info; 00521 gdbarch->register_sim_regno = legacy_register_sim_regno; 00522 gdbarch->cannot_fetch_register = cannot_register_not; 00523 gdbarch->cannot_store_register = cannot_register_not; 00524 gdbarch->convert_register_p = generic_convert_register_p; 00525 gdbarch->value_from_register = default_value_from_register; 00526 gdbarch->pointer_to_address = unsigned_pointer_to_address; 00527 gdbarch->address_to_pointer = unsigned_address_to_pointer; 00528 gdbarch->return_in_first_hidden_param_p = default_return_in_first_hidden_param_p; 00529 gdbarch->remote_breakpoint_from_pc = default_remote_breakpoint_from_pc; 00530 gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; 00531 gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; 00532 gdbarch->remote_register_number = default_remote_register_number; 00533 gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr; 00534 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity; 00535 gdbarch->addr_bits_remove = core_addr_identity; 00536 gdbarch->skip_trampoline_code = generic_skip_trampoline_code; 00537 gdbarch->skip_solib_resolver = generic_skip_solib_resolver; 00538 gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline; 00539 gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; 00540 gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special; 00541 gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special; 00542 gdbarch->register_reggroup_p = default_register_reggroup_p; 00543 gdbarch->displaced_step_hw_singlestep = default_displaced_step_hw_singlestep; 00544 gdbarch->displaced_step_fixup = NULL; 00545 gdbarch->displaced_step_free_closure = NULL; 00546 gdbarch->displaced_step_location = NULL; 00547 gdbarch->relocate_instruction = NULL; 00548 gdbarch->has_shared_address_space = default_has_shared_address_space; 00549 gdbarch->fast_tracepoint_valid_at = default_fast_tracepoint_valid_at; 00550 gdbarch->auto_charset = default_auto_charset; 00551 gdbarch->auto_wide_charset = default_auto_wide_charset; 00552 gdbarch->gen_return_address = default_gen_return_address; 00553 gdbarch->iterate_over_objfiles_in_search_order = default_iterate_over_objfiles_in_search_order; 00554 gdbarch->ravenscar_ops = NULL; 00555 /* gdbarch_alloc() */ 00556 00557 return gdbarch; 00558 } 00559 00560 00561 /* Allocate extra space using the per-architecture obstack. */ 00562 00563 void * 00564 gdbarch_obstack_zalloc (struct gdbarch *arch, long size) 00565 { 00566 void *data = obstack_alloc (arch->obstack, size); 00567 00568 memset (data, 0, size); 00569 return data; 00570 } 00571 00572 00573 /* Free a gdbarch struct. This should never happen in normal 00574 operation --- once you've created a gdbarch, you keep it around. 00575 However, if an architecture's init function encounters an error 00576 building the structure, it may need to clean up a partially 00577 constructed gdbarch. */ 00578 00579 void 00580 gdbarch_free (struct gdbarch *arch) 00581 { 00582 struct obstack *obstack; 00583 00584 gdb_assert (arch != NULL); 00585 gdb_assert (!arch->initialized_p); 00586 obstack = arch->obstack; 00587 obstack_free (obstack, 0); /* Includes the ARCH. */ 00588 xfree (obstack); 00589 } 00590 00591 00592 /* Ensure that all values in a GDBARCH are reasonable. */ 00593 00594 static void 00595 verify_gdbarch (struct gdbarch *gdbarch) 00596 { 00597 struct ui_file *log; 00598 struct cleanup *cleanups; 00599 long length; 00600 char *buf; 00601 00602 log = mem_fileopen (); 00603 cleanups = make_cleanup_ui_file_delete (log); 00604 /* fundamental */ 00605 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) 00606 fprintf_unfiltered (log, "\n\tbyte-order"); 00607 if (gdbarch->bfd_arch_info == NULL) 00608 fprintf_unfiltered (log, "\n\tbfd_arch_info"); 00609 /* Check those that need to be defined for the given multi-arch level. */ 00610 /* Skip verify of bits_big_endian, invalid_p == 0 */ 00611 /* Skip verify of short_bit, invalid_p == 0 */ 00612 /* Skip verify of int_bit, invalid_p == 0 */ 00613 /* Skip verify of long_bit, invalid_p == 0 */ 00614 /* Skip verify of long_long_bit, invalid_p == 0 */ 00615 /* Skip verify of long_long_align_bit, invalid_p == 0 */ 00616 /* Skip verify of half_bit, invalid_p == 0 */ 00617 if (gdbarch->half_format == 0) 00618 gdbarch->half_format = floatformats_ieee_half; 00619 /* Skip verify of float_bit, invalid_p == 0 */ 00620 if (gdbarch->float_format == 0) 00621 gdbarch->float_format = floatformats_ieee_single; 00622 /* Skip verify of double_bit, invalid_p == 0 */ 00623 if (gdbarch->double_format == 0) 00624 gdbarch->double_format = floatformats_ieee_double; 00625 /* Skip verify of long_double_bit, invalid_p == 0 */ 00626 if (gdbarch->long_double_format == 0) 00627 gdbarch->long_double_format = floatformats_ieee_double; 00628 /* Skip verify of ptr_bit, invalid_p == 0 */ 00629 if (gdbarch->addr_bit == 0) 00630 gdbarch->addr_bit = gdbarch_ptr_bit (gdbarch); 00631 if (gdbarch->dwarf2_addr_size == 0) 00632 gdbarch->dwarf2_addr_size = gdbarch_ptr_bit (gdbarch) / TARGET_CHAR_BIT; 00633 if (gdbarch->char_signed == -1) 00634 gdbarch->char_signed = 1; 00635 /* Skip verify of read_pc, has predicate. */ 00636 /* Skip verify of write_pc, has predicate. */ 00637 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ 00638 /* Skip verify of pseudo_register_read, has predicate. */ 00639 /* Skip verify of pseudo_register_read_value, has predicate. */ 00640 /* Skip verify of pseudo_register_write, has predicate. */ 00641 if (gdbarch->num_regs == -1) 00642 fprintf_unfiltered (log, "\n\tnum_regs"); 00643 /* Skip verify of num_pseudo_regs, invalid_p == 0 */ 00644 /* Skip verify of ax_pseudo_register_collect, has predicate. */ 00645 /* Skip verify of ax_pseudo_register_push_stack, has predicate. */ 00646 /* Skip verify of sp_regnum, invalid_p == 0 */ 00647 /* Skip verify of pc_regnum, invalid_p == 0 */ 00648 /* Skip verify of ps_regnum, invalid_p == 0 */ 00649 /* Skip verify of fp0_regnum, invalid_p == 0 */ 00650 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ 00651 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ 00652 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ 00653 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ 00654 if (gdbarch->register_name == 0) 00655 fprintf_unfiltered (log, "\n\tregister_name"); 00656 /* Skip verify of register_type, has predicate. */ 00657 /* Skip verify of dummy_id, has predicate. */ 00658 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ 00659 /* Skip verify of push_dummy_call, has predicate. */ 00660 /* Skip verify of call_dummy_location, invalid_p == 0 */ 00661 /* Skip verify of push_dummy_code, has predicate. */ 00662 /* Skip verify of print_registers_info, invalid_p == 0 */ 00663 /* Skip verify of print_float_info, has predicate. */ 00664 /* Skip verify of print_vector_info, has predicate. */ 00665 /* Skip verify of register_sim_regno, invalid_p == 0 */ 00666 /* Skip verify of cannot_fetch_register, invalid_p == 0 */ 00667 /* Skip verify of cannot_store_register, invalid_p == 0 */ 00668 /* Skip verify of get_longjmp_target, has predicate. */ 00669 /* Skip verify of convert_register_p, invalid_p == 0 */ 00670 /* Skip verify of value_from_register, invalid_p == 0 */ 00671 /* Skip verify of pointer_to_address, invalid_p == 0 */ 00672 /* Skip verify of address_to_pointer, invalid_p == 0 */ 00673 /* Skip verify of integer_to_address, has predicate. */ 00674 /* Skip verify of return_value, has predicate. */ 00675 /* Skip verify of return_in_first_hidden_param_p, invalid_p == 0 */ 00676 if (gdbarch->skip_prologue == 0) 00677 fprintf_unfiltered (log, "\n\tskip_prologue"); 00678 /* Skip verify of skip_main_prologue, has predicate. */ 00679 if (gdbarch->inner_than == 0) 00680 fprintf_unfiltered (log, "\n\tinner_than"); 00681 if (gdbarch->breakpoint_from_pc == 0) 00682 fprintf_unfiltered (log, "\n\tbreakpoint_from_pc"); 00683 /* Skip verify of remote_breakpoint_from_pc, invalid_p == 0 */ 00684 /* Skip verify of adjust_breakpoint_address, has predicate. */ 00685 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ 00686 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ 00687 /* Skip verify of decr_pc_after_break, invalid_p == 0 */ 00688 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ 00689 /* Skip verify of remote_register_number, invalid_p == 0 */ 00690 /* Skip verify of fetch_tls_load_module_address, has predicate. */ 00691 /* Skip verify of frame_args_skip, invalid_p == 0 */ 00692 /* Skip verify of unwind_pc, has predicate. */ 00693 /* Skip verify of unwind_sp, has predicate. */ 00694 /* Skip verify of frame_num_args, has predicate. */ 00695 /* Skip verify of frame_align, has predicate. */ 00696 /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */ 00697 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ 00698 /* Skip verify of addr_bits_remove, invalid_p == 0 */ 00699 /* Skip verify of software_single_step, has predicate. */ 00700 /* Skip verify of single_step_through_delay, has predicate. */ 00701 if (gdbarch->print_insn == 0) 00702 fprintf_unfiltered (log, "\n\tprint_insn"); 00703 /* Skip verify of skip_trampoline_code, invalid_p == 0 */ 00704 /* Skip verify of skip_solib_resolver, invalid_p == 0 */ 00705 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ 00706 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ 00707 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ 00708 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ 00709 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ 00710 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ 00711 /* Skip verify of address_class_type_flags, has predicate. */ 00712 /* Skip verify of address_class_type_flags_to_name, has predicate. */ 00713 /* Skip verify of address_class_name_to_type_flags, has predicate. */ 00714 /* Skip verify of register_reggroup_p, invalid_p == 0 */ 00715 /* Skip verify of fetch_pointer_argument, has predicate. */ 00716 /* Skip verify of regset_from_core_section, has predicate. */ 00717 /* Skip verify of make_corefile_notes, has predicate. */ 00718 /* Skip verify of elfcore_write_linux_prpsinfo, has predicate. */ 00719 /* Skip verify of find_memory_regions, has predicate. */ 00720 /* Skip verify of core_xfer_shared_libraries, has predicate. */ 00721 /* Skip verify of core_xfer_shared_libraries_aix, has predicate. */ 00722 /* Skip verify of core_pid_to_str, has predicate. */ 00723 /* Skip verify of gcore_bfd_target, has predicate. */ 00724 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ 00725 /* Skip verify of vbit_in_delta, invalid_p == 0 */ 00726 /* Skip verify of skip_permanent_breakpoint, has predicate. */ 00727 /* Skip verify of max_insn_length, has predicate. */ 00728 /* Skip verify of displaced_step_copy_insn, has predicate. */ 00729 /* Skip verify of displaced_step_hw_singlestep, invalid_p == 0 */ 00730 /* Skip verify of displaced_step_fixup, has predicate. */ 00731 if ((! gdbarch->displaced_step_free_closure) != (! gdbarch->displaced_step_copy_insn)) 00732 fprintf_unfiltered (log, "\n\tdisplaced_step_free_closure"); 00733 if ((! gdbarch->displaced_step_location) != (! gdbarch->displaced_step_copy_insn)) 00734 fprintf_unfiltered (log, "\n\tdisplaced_step_location"); 00735 /* Skip verify of relocate_instruction, has predicate. */ 00736 /* Skip verify of overlay_update, has predicate. */ 00737 /* Skip verify of core_read_description, has predicate. */ 00738 /* Skip verify of static_transform_name, has predicate. */ 00739 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ 00740 /* Skip verify of process_record, has predicate. */ 00741 /* Skip verify of process_record_signal, has predicate. */ 00742 /* Skip verify of gdb_signal_from_target, has predicate. */ 00743 /* Skip verify of gdb_signal_to_target, has predicate. */ 00744 /* Skip verify of get_siginfo_type, has predicate. */ 00745 /* Skip verify of record_special_symbol, has predicate. */ 00746 /* Skip verify of get_syscall_number, has predicate. */ 00747 /* Skip verify of stap_integer_prefix, invalid_p == 0 */ 00748 /* Skip verify of stap_integer_suffix, invalid_p == 0 */ 00749 /* Skip verify of stap_register_prefix, invalid_p == 0 */ 00750 /* Skip verify of stap_register_suffix, invalid_p == 0 */ 00751 /* Skip verify of stap_register_indirection_prefix, invalid_p == 0 */ 00752 /* Skip verify of stap_register_indirection_suffix, invalid_p == 0 */ 00753 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ 00754 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ 00755 /* Skip verify of stap_is_single_operand, has predicate. */ 00756 /* Skip verify of stap_parse_special_token, has predicate. */ 00757 /* Skip verify of has_global_solist, invalid_p == 0 */ 00758 /* Skip verify of has_global_breakpoints, invalid_p == 0 */ 00759 /* Skip verify of has_shared_address_space, invalid_p == 0 */ 00760 /* Skip verify of fast_tracepoint_valid_at, invalid_p == 0 */ 00761 /* Skip verify of auto_charset, invalid_p == 0 */ 00762 /* Skip verify of auto_wide_charset, invalid_p == 0 */ 00763 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ 00764 /* Skip verify of gen_return_address, invalid_p == 0 */ 00765 /* Skip verify of info_proc, has predicate. */ 00766 /* Skip verify of core_info_proc, has predicate. */ 00767 /* Skip verify of iterate_over_objfiles_in_search_order, invalid_p == 0 */ 00768 /* Skip verify of ravenscar_ops, invalid_p == 0 */ 00769 buf = ui_file_xstrdup (log, &length); 00770 make_cleanup (xfree, buf); 00771 if (length > 0) 00772 internal_error (__FILE__, __LINE__, 00773 _("verify_gdbarch: the following are invalid ...%s"), 00774 buf); 00775 do_cleanups (cleanups); 00776 } 00777 00778 00779 /* Print out the details of the current architecture. */ 00780 00781 void 00782 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) 00783 { 00784 const char *gdb_nm_file = "<not-defined>"; 00785 00786 #if defined (GDB_NM_FILE) 00787 gdb_nm_file = GDB_NM_FILE; 00788 #endif 00789 fprintf_unfiltered (file, 00790 "gdbarch_dump: GDB_NM_FILE = %s\n", 00791 gdb_nm_file); 00792 fprintf_unfiltered (file, 00793 "gdbarch_dump: addr_bit = %s\n", 00794 plongest (gdbarch->addr_bit)); 00795 fprintf_unfiltered (file, 00796 "gdbarch_dump: addr_bits_remove = <%s>\n", 00797 host_address_to_string (gdbarch->addr_bits_remove)); 00798 fprintf_unfiltered (file, 00799 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n", 00800 gdbarch_address_class_name_to_type_flags_p (gdbarch)); 00801 fprintf_unfiltered (file, 00802 "gdbarch_dump: address_class_name_to_type_flags = <%s>\n", 00803 host_address_to_string (gdbarch->address_class_name_to_type_flags)); 00804 fprintf_unfiltered (file, 00805 "gdbarch_dump: gdbarch_address_class_type_flags_p() = %d\n", 00806 gdbarch_address_class_type_flags_p (gdbarch)); 00807 fprintf_unfiltered (file, 00808 "gdbarch_dump: address_class_type_flags = <%s>\n", 00809 host_address_to_string (gdbarch->address_class_type_flags)); 00810 fprintf_unfiltered (file, 00811 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n", 00812 gdbarch_address_class_type_flags_to_name_p (gdbarch)); 00813 fprintf_unfiltered (file, 00814 "gdbarch_dump: address_class_type_flags_to_name = <%s>\n", 00815 host_address_to_string (gdbarch->address_class_type_flags_to_name)); 00816 fprintf_unfiltered (file, 00817 "gdbarch_dump: address_to_pointer = <%s>\n", 00818 host_address_to_string (gdbarch->address_to_pointer)); 00819 fprintf_unfiltered (file, 00820 "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n", 00821 gdbarch_adjust_breakpoint_address_p (gdbarch)); 00822 fprintf_unfiltered (file, 00823 "gdbarch_dump: adjust_breakpoint_address = <%s>\n", 00824 host_address_to_string (gdbarch->adjust_breakpoint_address)); 00825 fprintf_unfiltered (file, 00826 "gdbarch_dump: auto_charset = <%s>\n", 00827 host_address_to_string (gdbarch->auto_charset)); 00828 fprintf_unfiltered (file, 00829 "gdbarch_dump: auto_wide_charset = <%s>\n", 00830 host_address_to_string (gdbarch->auto_wide_charset)); 00831 fprintf_unfiltered (file, 00832 "gdbarch_dump: gdbarch_ax_pseudo_register_collect_p() = %d\n", 00833 gdbarch_ax_pseudo_register_collect_p (gdbarch)); 00834 fprintf_unfiltered (file, 00835 "gdbarch_dump: ax_pseudo_register_collect = <%s>\n", 00836 host_address_to_string (gdbarch->ax_pseudo_register_collect)); 00837 fprintf_unfiltered (file, 00838 "gdbarch_dump: gdbarch_ax_pseudo_register_push_stack_p() = %d\n", 00839 gdbarch_ax_pseudo_register_push_stack_p (gdbarch)); 00840 fprintf_unfiltered (file, 00841 "gdbarch_dump: ax_pseudo_register_push_stack = <%s>\n", 00842 host_address_to_string (gdbarch->ax_pseudo_register_push_stack)); 00843 fprintf_unfiltered (file, 00844 "gdbarch_dump: believe_pcc_promotion = %s\n", 00845 plongest (gdbarch->believe_pcc_promotion)); 00846 fprintf_unfiltered (file, 00847 "gdbarch_dump: bfd_arch_info = %s\n", 00848 gdbarch_bfd_arch_info (gdbarch)->printable_name); 00849 fprintf_unfiltered (file, 00850 "gdbarch_dump: bits_big_endian = %s\n", 00851 plongest (gdbarch->bits_big_endian)); 00852 fprintf_unfiltered (file, 00853 "gdbarch_dump: breakpoint_from_pc = <%s>\n", 00854 host_address_to_string (gdbarch->breakpoint_from_pc)); 00855 fprintf_unfiltered (file, 00856 "gdbarch_dump: byte_order = %s\n", 00857 plongest (gdbarch->byte_order)); 00858 fprintf_unfiltered (file, 00859 "gdbarch_dump: byte_order_for_code = %s\n", 00860 plongest (gdbarch->byte_order_for_code)); 00861 fprintf_unfiltered (file, 00862 "gdbarch_dump: call_dummy_location = %s\n", 00863 plongest (gdbarch->call_dummy_location)); 00864 fprintf_unfiltered (file, 00865 "gdbarch_dump: cannot_fetch_register = <%s>\n", 00866 host_address_to_string (gdbarch->cannot_fetch_register)); 00867 fprintf_unfiltered (file, 00868 "gdbarch_dump: cannot_step_breakpoint = %s\n", 00869 plongest (gdbarch->cannot_step_breakpoint)); 00870 fprintf_unfiltered (file, 00871 "gdbarch_dump: cannot_store_register = <%s>\n", 00872 host_address_to_string (gdbarch->cannot_store_register)); 00873 fprintf_unfiltered (file, 00874 "gdbarch_dump: char_signed = %s\n", 00875 plongest (gdbarch->char_signed)); 00876 fprintf_unfiltered (file, 00877 "gdbarch_dump: coff_make_msymbol_special = <%s>\n", 00878 host_address_to_string (gdbarch->coff_make_msymbol_special)); 00879 fprintf_unfiltered (file, 00880 "gdbarch_dump: convert_from_func_ptr_addr = <%s>\n", 00881 host_address_to_string (gdbarch->convert_from_func_ptr_addr)); 00882 fprintf_unfiltered (file, 00883 "gdbarch_dump: convert_register_p = <%s>\n", 00884 host_address_to_string (gdbarch->convert_register_p)); 00885 fprintf_unfiltered (file, 00886 "gdbarch_dump: gdbarch_core_info_proc_p() = %d\n", 00887 gdbarch_core_info_proc_p (gdbarch)); 00888 fprintf_unfiltered (file, 00889 "gdbarch_dump: core_info_proc = <%s>\n", 00890 host_address_to_string (gdbarch->core_info_proc)); 00891 fprintf_unfiltered (file, 00892 "gdbarch_dump: gdbarch_core_pid_to_str_p() = %d\n", 00893 gdbarch_core_pid_to_str_p (gdbarch)); 00894 fprintf_unfiltered (file, 00895 "gdbarch_dump: core_pid_to_str = <%s>\n", 00896 host_address_to_string (gdbarch->core_pid_to_str)); 00897 fprintf_unfiltered (file, 00898 "gdbarch_dump: gdbarch_core_read_description_p() = %d\n", 00899 gdbarch_core_read_description_p (gdbarch)); 00900 fprintf_unfiltered (file, 00901 "gdbarch_dump: core_read_description = <%s>\n", 00902 host_address_to_string (gdbarch->core_read_description)); 00903 fprintf_unfiltered (file, 00904 "gdbarch_dump: core_regset_sections = %s\n", 00905 host_address_to_string (gdbarch->core_regset_sections)); 00906 fprintf_unfiltered (file, 00907 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_p() = %d\n", 00908 gdbarch_core_xfer_shared_libraries_p (gdbarch)); 00909 fprintf_unfiltered (file, 00910 "gdbarch_dump: core_xfer_shared_libraries = <%s>\n", 00911 host_address_to_string (gdbarch->core_xfer_shared_libraries)); 00912 fprintf_unfiltered (file, 00913 "gdbarch_dump: gdbarch_core_xfer_shared_libraries_aix_p() = %d\n", 00914 gdbarch_core_xfer_shared_libraries_aix_p (gdbarch)); 00915 fprintf_unfiltered (file, 00916 "gdbarch_dump: core_xfer_shared_libraries_aix = <%s>\n", 00917 host_address_to_string (gdbarch->core_xfer_shared_libraries_aix)); 00918 fprintf_unfiltered (file, 00919 "gdbarch_dump: decr_pc_after_break = %s\n", 00920 core_addr_to_string_nz (gdbarch->decr_pc_after_break)); 00921 fprintf_unfiltered (file, 00922 "gdbarch_dump: deprecated_fp_regnum = %s\n", 00923 plongest (gdbarch->deprecated_fp_regnum)); 00924 fprintf_unfiltered (file, 00925 "gdbarch_dump: deprecated_function_start_offset = %s\n", 00926 core_addr_to_string_nz (gdbarch->deprecated_function_start_offset)); 00927 fprintf_unfiltered (file, 00928 "gdbarch_dump: gdbarch_displaced_step_copy_insn_p() = %d\n", 00929 gdbarch_displaced_step_copy_insn_p (gdbarch)); 00930 fprintf_unfiltered (file, 00931 "gdbarch_dump: displaced_step_copy_insn = <%s>\n", 00932 host_address_to_string (gdbarch->displaced_step_copy_insn)); 00933 fprintf_unfiltered (file, 00934 "gdbarch_dump: gdbarch_displaced_step_fixup_p() = %d\n", 00935 gdbarch_displaced_step_fixup_p (gdbarch)); 00936 fprintf_unfiltered (file, 00937 "gdbarch_dump: displaced_step_fixup = <%s>\n", 00938 host_address_to_string (gdbarch->displaced_step_fixup)); 00939 fprintf_unfiltered (file, 00940 "gdbarch_dump: displaced_step_free_closure = <%s>\n", 00941 host_address_to_string (gdbarch->displaced_step_free_closure)); 00942 fprintf_unfiltered (file, 00943 "gdbarch_dump: displaced_step_hw_singlestep = <%s>\n", 00944 host_address_to_string (gdbarch->displaced_step_hw_singlestep)); 00945 fprintf_unfiltered (file, 00946 "gdbarch_dump: displaced_step_location = <%s>\n", 00947 host_address_to_string (gdbarch->displaced_step_location)); 00948 fprintf_unfiltered (file, 00949 "gdbarch_dump: double_bit = %s\n", 00950 plongest (gdbarch->double_bit)); 00951 fprintf_unfiltered (file, 00952 "gdbarch_dump: double_format = %s\n", 00953 pformat (gdbarch->double_format)); 00954 fprintf_unfiltered (file, 00955 "gdbarch_dump: gdbarch_dummy_id_p() = %d\n", 00956 gdbarch_dummy_id_p (gdbarch)); 00957 fprintf_unfiltered (file, 00958 "gdbarch_dump: dummy_id = <%s>\n", 00959 host_address_to_string (gdbarch->dummy_id)); 00960 fprintf_unfiltered (file, 00961 "gdbarch_dump: dwarf2_addr_size = %s\n", 00962 plongest (gdbarch->dwarf2_addr_size)); 00963 fprintf_unfiltered (file, 00964 "gdbarch_dump: dwarf2_reg_to_regnum = <%s>\n", 00965 host_address_to_string (gdbarch->dwarf2_reg_to_regnum)); 00966 fprintf_unfiltered (file, 00967 "gdbarch_dump: ecoff_reg_to_regnum = <%s>\n", 00968 host_address_to_string (gdbarch->ecoff_reg_to_regnum)); 00969 fprintf_unfiltered (file, 00970 "gdbarch_dump: elf_make_msymbol_special = <%s>\n", 00971 host_address_to_string (gdbarch->elf_make_msymbol_special)); 00972 fprintf_unfiltered (file, 00973 "gdbarch_dump: gdbarch_elfcore_write_linux_prpsinfo_p() = %d\n", 00974 gdbarch_elfcore_write_linux_prpsinfo_p (gdbarch)); 00975 fprintf_unfiltered (file, 00976 "gdbarch_dump: elfcore_write_linux_prpsinfo = <%s>\n", 00977 host_address_to_string (gdbarch->elfcore_write_linux_prpsinfo)); 00978 fprintf_unfiltered (file, 00979 "gdbarch_dump: fast_tracepoint_valid_at = <%s>\n", 00980 host_address_to_string (gdbarch->fast_tracepoint_valid_at)); 00981 fprintf_unfiltered (file, 00982 "gdbarch_dump: gdbarch_fetch_pointer_argument_p() = %d\n", 00983 gdbarch_fetch_pointer_argument_p (gdbarch)); 00984 fprintf_unfiltered (file, 00985 "gdbarch_dump: fetch_pointer_argument = <%s>\n", 00986 host_address_to_string (gdbarch->fetch_pointer_argument)); 00987 fprintf_unfiltered (file, 00988 "gdbarch_dump: gdbarch_fetch_tls_load_module_address_p() = %d\n", 00989 gdbarch_fetch_tls_load_module_address_p (gdbarch)); 00990 fprintf_unfiltered (file, 00991 "gdbarch_dump: fetch_tls_load_module_address = <%s>\n", 00992 host_address_to_string (gdbarch->fetch_tls_load_module_address)); 00993 fprintf_unfiltered (file, 00994 "gdbarch_dump: gdbarch_find_memory_regions_p() = %d\n", 00995 gdbarch_find_memory_regions_p (gdbarch)); 00996 fprintf_unfiltered (file, 00997 "gdbarch_dump: find_memory_regions = <%s>\n", 00998 host_address_to_string (gdbarch->find_memory_regions)); 00999 fprintf_unfiltered (file, 01000 "gdbarch_dump: float_bit = %s\n", 01001 plongest (gdbarch->float_bit)); 01002 fprintf_unfiltered (file, 01003 "gdbarch_dump: float_format = %s\n", 01004 pformat (gdbarch->float_format)); 01005 fprintf_unfiltered (file, 01006 "gdbarch_dump: fp0_regnum = %s\n", 01007 plongest (gdbarch->fp0_regnum)); 01008 fprintf_unfiltered (file, 01009 "gdbarch_dump: gdbarch_frame_align_p() = %d\n", 01010 gdbarch_frame_align_p (gdbarch)); 01011 fprintf_unfiltered (file, 01012 "gdbarch_dump: frame_align = <%s>\n", 01013 host_address_to_string (gdbarch->frame_align)); 01014 fprintf_unfiltered (file, 01015 "gdbarch_dump: frame_args_skip = %s\n", 01016 core_addr_to_string_nz (gdbarch->frame_args_skip)); 01017 fprintf_unfiltered (file, 01018 "gdbarch_dump: gdbarch_frame_num_args_p() = %d\n", 01019 gdbarch_frame_num_args_p (gdbarch)); 01020 fprintf_unfiltered (file, 01021 "gdbarch_dump: frame_num_args = <%s>\n", 01022 host_address_to_string (gdbarch->frame_num_args)); 01023 fprintf_unfiltered (file, 01024 "gdbarch_dump: frame_red_zone_size = %s\n", 01025 plongest (gdbarch->frame_red_zone_size)); 01026 fprintf_unfiltered (file, 01027 "gdbarch_dump: gdbarch_gcore_bfd_target_p() = %d\n", 01028 gdbarch_gcore_bfd_target_p (gdbarch)); 01029 fprintf_unfiltered (file, 01030 "gdbarch_dump: gcore_bfd_target = %s\n", 01031 pstring (gdbarch->gcore_bfd_target)); 01032 fprintf_unfiltered (file, 01033 "gdbarch_dump: gdbarch_gdb_signal_from_target_p() = %d\n", 01034 gdbarch_gdb_signal_from_target_p (gdbarch)); 01035 fprintf_unfiltered (file, 01036 "gdbarch_dump: gdb_signal_from_target = <%s>\n", 01037 host_address_to_string (gdbarch->gdb_signal_from_target)); 01038 fprintf_unfiltered (file, 01039 "gdbarch_dump: gdbarch_gdb_signal_to_target_p() = %d\n", 01040 gdbarch_gdb_signal_to_target_p (gdbarch)); 01041 fprintf_unfiltered (file, 01042 "gdbarch_dump: gdb_signal_to_target = <%s>\n", 01043 host_address_to_string (gdbarch->gdb_signal_to_target)); 01044 fprintf_unfiltered (file, 01045 "gdbarch_dump: gen_return_address = <%s>\n", 01046 host_address_to_string (gdbarch->gen_return_address)); 01047 fprintf_unfiltered (file, 01048 "gdbarch_dump: gdbarch_get_longjmp_target_p() = %d\n", 01049 gdbarch_get_longjmp_target_p (gdbarch)); 01050 fprintf_unfiltered (file, 01051 "gdbarch_dump: get_longjmp_target = <%s>\n", 01052 host_address_to_string (gdbarch->get_longjmp_target)); 01053 fprintf_unfiltered (file, 01054 "gdbarch_dump: gdbarch_get_siginfo_type_p() = %d\n", 01055 gdbarch_get_siginfo_type_p (gdbarch)); 01056 fprintf_unfiltered (file, 01057 "gdbarch_dump: get_siginfo_type = <%s>\n", 01058 host_address_to_string (gdbarch->get_siginfo_type)); 01059 fprintf_unfiltered (file, 01060 "gdbarch_dump: gdbarch_get_syscall_number_p() = %d\n", 01061 gdbarch_get_syscall_number_p (gdbarch)); 01062 fprintf_unfiltered (file, 01063 "gdbarch_dump: get_syscall_number = <%s>\n", 01064 host_address_to_string (gdbarch->get_syscall_number)); 01065 fprintf_unfiltered (file, 01066 "gdbarch_dump: half_bit = %s\n", 01067 plongest (gdbarch->half_bit)); 01068 fprintf_unfiltered (file, 01069 "gdbarch_dump: half_format = %s\n", 01070 pformat (gdbarch->half_format)); 01071 fprintf_unfiltered (file, 01072 "gdbarch_dump: has_dos_based_file_system = %s\n", 01073 plongest (gdbarch->has_dos_based_file_system)); 01074 fprintf_unfiltered (file, 01075 "gdbarch_dump: has_global_breakpoints = %s\n", 01076 plongest (gdbarch->has_global_breakpoints)); 01077 fprintf_unfiltered (file, 01078 "gdbarch_dump: has_global_solist = %s\n", 01079 plongest (gdbarch->has_global_solist)); 01080 fprintf_unfiltered (file, 01081 "gdbarch_dump: has_shared_address_space = <%s>\n", 01082 host_address_to_string (gdbarch->has_shared_address_space)); 01083 fprintf_unfiltered (file, 01084 "gdbarch_dump: have_nonsteppable_watchpoint = %s\n", 01085 plongest (gdbarch->have_nonsteppable_watchpoint)); 01086 fprintf_unfiltered (file, 01087 "gdbarch_dump: in_function_epilogue_p = <%s>\n", 01088 host_address_to_string (gdbarch->in_function_epilogue_p)); 01089 fprintf_unfiltered (file, 01090 "gdbarch_dump: in_solib_return_trampoline = <%s>\n", 01091 host_address_to_string (gdbarch->in_solib_return_trampoline)); 01092 fprintf_unfiltered (file, 01093 "gdbarch_dump: gdbarch_info_proc_p() = %d\n", 01094 gdbarch_info_proc_p (gdbarch)); 01095 fprintf_unfiltered (file, 01096 "gdbarch_dump: info_proc = <%s>\n", 01097 host_address_to_string (gdbarch->info_proc)); 01098 fprintf_unfiltered (file, 01099 "gdbarch_dump: inner_than = <%s>\n", 01100 host_address_to_string (gdbarch->inner_than)); 01101 fprintf_unfiltered (file, 01102 "gdbarch_dump: int_bit = %s\n", 01103 plongest (gdbarch->int_bit)); 01104 fprintf_unfiltered (file, 01105 "gdbarch_dump: gdbarch_integer_to_address_p() = %d\n", 01106 gdbarch_integer_to_address_p (gdbarch)); 01107 fprintf_unfiltered (file, 01108 "gdbarch_dump: integer_to_address = <%s>\n", 01109 host_address_to_string (gdbarch->integer_to_address)); 01110 fprintf_unfiltered (file, 01111 "gdbarch_dump: iterate_over_objfiles_in_search_order = <%s>\n", 01112 host_address_to_string (gdbarch->iterate_over_objfiles_in_search_order)); 01113 fprintf_unfiltered (file, 01114 "gdbarch_dump: long_bit = %s\n", 01115 plongest (gdbarch->long_bit)); 01116 fprintf_unfiltered (file, 01117 "gdbarch_dump: long_double_bit = %s\n", 01118 plongest (gdbarch->long_double_bit)); 01119 fprintf_unfiltered (file, 01120 "gdbarch_dump: long_double_format = %s\n", 01121 pformat (gdbarch->long_double_format)); 01122 fprintf_unfiltered (file, 01123 "gdbarch_dump: long_long_align_bit = %s\n", 01124 plongest (gdbarch->long_long_align_bit)); 01125 fprintf_unfiltered (file, 01126 "gdbarch_dump: long_long_bit = %s\n", 01127 plongest (gdbarch->long_long_bit)); 01128 fprintf_unfiltered (file, 01129 "gdbarch_dump: gdbarch_make_corefile_notes_p() = %d\n", 01130 gdbarch_make_corefile_notes_p (gdbarch)); 01131 fprintf_unfiltered (file, 01132 "gdbarch_dump: make_corefile_notes = <%s>\n", 01133 host_address_to_string (gdbarch->make_corefile_notes)); 01134 fprintf_unfiltered (file, 01135 "gdbarch_dump: gdbarch_max_insn_length_p() = %d\n", 01136 gdbarch_max_insn_length_p (gdbarch)); 01137 fprintf_unfiltered (file, 01138 "gdbarch_dump: max_insn_length = %s\n", 01139 plongest (gdbarch->max_insn_length)); 01140 fprintf_unfiltered (file, 01141 "gdbarch_dump: memory_insert_breakpoint = <%s>\n", 01142 host_address_to_string (gdbarch->memory_insert_breakpoint)); 01143 fprintf_unfiltered (file, 01144 "gdbarch_dump: memory_remove_breakpoint = <%s>\n", 01145 host_address_to_string (gdbarch->memory_remove_breakpoint)); 01146 fprintf_unfiltered (file, 01147 "gdbarch_dump: num_pseudo_regs = %s\n", 01148 plongest (gdbarch->num_pseudo_regs)); 01149 fprintf_unfiltered (file, 01150 "gdbarch_dump: num_regs = %s\n", 01151 plongest (gdbarch->num_regs)); 01152 fprintf_unfiltered (file, 01153 "gdbarch_dump: osabi = %s\n", 01154 plongest (gdbarch->osabi)); 01155 fprintf_unfiltered (file, 01156 "gdbarch_dump: gdbarch_overlay_update_p() = %d\n", 01157 gdbarch_overlay_update_p (gdbarch)); 01158 fprintf_unfiltered (file, 01159 "gdbarch_dump: overlay_update = <%s>\n", 01160 host_address_to_string (gdbarch->overlay_update)); 01161 fprintf_unfiltered (file, 01162 "gdbarch_dump: pc_regnum = %s\n", 01163 plongest (gdbarch->pc_regnum)); 01164 fprintf_unfiltered (file, 01165 "gdbarch_dump: pointer_to_address = <%s>\n", 01166 host_address_to_string (gdbarch->pointer_to_address)); 01167 fprintf_unfiltered (file, 01168 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n", 01169 gdbarch_print_float_info_p (gdbarch)); 01170 fprintf_unfiltered (file, 01171 "gdbarch_dump: print_float_info = <%s>\n", 01172 host_address_to_string (gdbarch->print_float_info)); 01173 fprintf_unfiltered (file, 01174 "gdbarch_dump: print_insn = <%s>\n", 01175 host_address_to_string (gdbarch->print_insn)); 01176 fprintf_unfiltered (file, 01177 "gdbarch_dump: print_registers_info = <%s>\n", 01178 host_address_to_string (gdbarch->print_registers_info)); 01179 fprintf_unfiltered (file, 01180 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", 01181 gdbarch_print_vector_info_p (gdbarch)); 01182 fprintf_unfiltered (file, 01183 "gdbarch_dump: print_vector_info = <%s>\n", 01184 host_address_to_string (gdbarch->print_vector_info)); 01185 fprintf_unfiltered (file, 01186 "gdbarch_dump: gdbarch_process_record_p() = %d\n", 01187 gdbarch_process_record_p (gdbarch)); 01188 fprintf_unfiltered (file, 01189 "gdbarch_dump: process_record = <%s>\n", 01190 host_address_to_string (gdbarch->process_record)); 01191 fprintf_unfiltered (file, 01192 "gdbarch_dump: gdbarch_process_record_signal_p() = %d\n", 01193 gdbarch_process_record_signal_p (gdbarch)); 01194 fprintf_unfiltered (file, 01195 "gdbarch_dump: process_record_signal = <%s>\n", 01196 host_address_to_string (gdbarch->process_record_signal)); 01197 fprintf_unfiltered (file, 01198 "gdbarch_dump: ps_regnum = %s\n", 01199 plongest (gdbarch->ps_regnum)); 01200 fprintf_unfiltered (file, 01201 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n", 01202 gdbarch_pseudo_register_read_p (gdbarch)); 01203 fprintf_unfiltered (file, 01204 "gdbarch_dump: pseudo_register_read = <%s>\n", 01205 host_address_to_string (gdbarch->pseudo_register_read)); 01206 fprintf_unfiltered (file, 01207 "gdbarch_dump: gdbarch_pseudo_register_read_value_p() = %d\n", 01208 gdbarch_pseudo_register_read_value_p (gdbarch)); 01209 fprintf_unfiltered (file, 01210 "gdbarch_dump: pseudo_register_read_value = <%s>\n", 01211 host_address_to_string (gdbarch->pseudo_register_read_value)); 01212 fprintf_unfiltered (file, 01213 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", 01214 gdbarch_pseudo_register_write_p (gdbarch)); 01215 fprintf_unfiltered (file, 01216 "gdbarch_dump: pseudo_register_write = <%s>\n", 01217 host_address_to_string (gdbarch->pseudo_register_write)); 01218 fprintf_unfiltered (file, 01219 "gdbarch_dump: ptr_bit = %s\n", 01220 plongest (gdbarch->ptr_bit)); 01221 fprintf_unfiltered (file, 01222 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n", 01223 gdbarch_push_dummy_call_p (gdbarch)); 01224 fprintf_unfiltered (file, 01225 "gdbarch_dump: push_dummy_call = <%s>\n", 01226 host_address_to_string (gdbarch->push_dummy_call)); 01227 fprintf_unfiltered (file, 01228 "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n", 01229 gdbarch_push_dummy_code_p (gdbarch)); 01230 fprintf_unfiltered (file, 01231 "gdbarch_dump: push_dummy_code = <%s>\n", 01232 host_address_to_string (gdbarch->push_dummy_code)); 01233 fprintf_unfiltered (file, 01234 "gdbarch_dump: ravenscar_ops = %s\n", 01235 host_address_to_string (gdbarch->ravenscar_ops)); 01236 fprintf_unfiltered (file, 01237 "gdbarch_dump: gdbarch_read_pc_p() = %d\n", 01238 gdbarch_read_pc_p (gdbarch)); 01239 fprintf_unfiltered (file, 01240 "gdbarch_dump: read_pc = <%s>\n", 01241 host_address_to_string (gdbarch->read_pc)); 01242 fprintf_unfiltered (file, 01243 "gdbarch_dump: gdbarch_record_special_symbol_p() = %d\n", 01244 gdbarch_record_special_symbol_p (gdbarch)); 01245 fprintf_unfiltered (file, 01246 "gdbarch_dump: record_special_symbol = <%s>\n", 01247 host_address_to_string (gdbarch->record_special_symbol)); 01248 fprintf_unfiltered (file, 01249 "gdbarch_dump: register_name = <%s>\n", 01250 host_address_to_string (gdbarch->register_name)); 01251 fprintf_unfiltered (file, 01252 "gdbarch_dump: register_reggroup_p = <%s>\n", 01253 host_address_to_string (gdbarch->register_reggroup_p)); 01254 fprintf_unfiltered (file, 01255 "gdbarch_dump: register_sim_regno = <%s>\n", 01256 host_address_to_string (gdbarch->register_sim_regno)); 01257 fprintf_unfiltered (file, 01258 "gdbarch_dump: register_to_value = <%s>\n", 01259 host_address_to_string (gdbarch->register_to_value)); 01260 fprintf_unfiltered (file, 01261 "gdbarch_dump: gdbarch_register_type_p() = %d\n", 01262 gdbarch_register_type_p (gdbarch)); 01263 fprintf_unfiltered (file, 01264 "gdbarch_dump: register_type = <%s>\n", 01265 host_address_to_string (gdbarch->register_type)); 01266 fprintf_unfiltered (file, 01267 "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n", 01268 gdbarch_regset_from_core_section_p (gdbarch)); 01269 fprintf_unfiltered (file, 01270 "gdbarch_dump: regset_from_core_section = <%s>\n", 01271 host_address_to_string (gdbarch->regset_from_core_section)); 01272 fprintf_unfiltered (file, 01273 "gdbarch_dump: gdbarch_relocate_instruction_p() = %d\n", 01274 gdbarch_relocate_instruction_p (gdbarch)); 01275 fprintf_unfiltered (file, 01276 "gdbarch_dump: relocate_instruction = <%s>\n", 01277 host_address_to_string (gdbarch->relocate_instruction)); 01278 fprintf_unfiltered (file, 01279 "gdbarch_dump: remote_breakpoint_from_pc = <%s>\n", 01280 host_address_to_string (gdbarch->remote_breakpoint_from_pc)); 01281 fprintf_unfiltered (file, 01282 "gdbarch_dump: remote_register_number = <%s>\n", 01283 host_address_to_string (gdbarch->remote_register_number)); 01284 fprintf_unfiltered (file, 01285 "gdbarch_dump: return_in_first_hidden_param_p = <%s>\n", 01286 host_address_to_string (gdbarch->return_in_first_hidden_param_p)); 01287 fprintf_unfiltered (file, 01288 "gdbarch_dump: gdbarch_return_value_p() = %d\n", 01289 gdbarch_return_value_p (gdbarch)); 01290 fprintf_unfiltered (file, 01291 "gdbarch_dump: return_value = <%s>\n", 01292 host_address_to_string (gdbarch->return_value)); 01293 fprintf_unfiltered (file, 01294 "gdbarch_dump: sdb_reg_to_regnum = <%s>\n", 01295 host_address_to_string (gdbarch->sdb_reg_to_regnum)); 01296 fprintf_unfiltered (file, 01297 "gdbarch_dump: short_bit = %s\n", 01298 plongest (gdbarch->short_bit)); 01299 fprintf_unfiltered (file, 01300 "gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n", 01301 gdbarch_single_step_through_delay_p (gdbarch)); 01302 fprintf_unfiltered (file, 01303 "gdbarch_dump: single_step_through_delay = <%s>\n", 01304 host_address_to_string (gdbarch->single_step_through_delay)); 01305 fprintf_unfiltered (file, 01306 "gdbarch_dump: gdbarch_skip_main_prologue_p() = %d\n", 01307 gdbarch_skip_main_prologue_p (gdbarch)); 01308 fprintf_unfiltered (file, 01309 "gdbarch_dump: skip_main_prologue = <%s>\n", 01310 host_address_to_string (gdbarch->skip_main_prologue)); 01311 fprintf_unfiltered (file, 01312 "gdbarch_dump: gdbarch_skip_permanent_breakpoint_p() = %d\n", 01313 gdbarch_skip_permanent_breakpoint_p (gdbarch)); 01314 fprintf_unfiltered (file, 01315 "gdbarch_dump: skip_permanent_breakpoint = <%s>\n", 01316 host_address_to_string (gdbarch->skip_permanent_breakpoint)); 01317 fprintf_unfiltered (file, 01318 "gdbarch_dump: skip_prologue = <%s>\n", 01319 host_address_to_string (gdbarch->skip_prologue)); 01320 fprintf_unfiltered (file, 01321 "gdbarch_dump: skip_solib_resolver = <%s>\n", 01322 host_address_to_string (gdbarch->skip_solib_resolver)); 01323 fprintf_unfiltered (file, 01324 "gdbarch_dump: skip_trampoline_code = <%s>\n", 01325 host_address_to_string (gdbarch->skip_trampoline_code)); 01326 fprintf_unfiltered (file, 01327 "gdbarch_dump: gdbarch_software_single_step_p() = %d\n", 01328 gdbarch_software_single_step_p (gdbarch)); 01329 fprintf_unfiltered (file, 01330 "gdbarch_dump: software_single_step = <%s>\n", 01331 host_address_to_string (gdbarch->software_single_step)); 01332 fprintf_unfiltered (file, 01333 "gdbarch_dump: sofun_address_maybe_missing = %s\n", 01334 plongest (gdbarch->sofun_address_maybe_missing)); 01335 fprintf_unfiltered (file, 01336 "gdbarch_dump: solib_symbols_extension = %s\n", 01337 pstring (gdbarch->solib_symbols_extension)); 01338 fprintf_unfiltered (file, 01339 "gdbarch_dump: sp_regnum = %s\n", 01340 plongest (gdbarch->sp_regnum)); 01341 fprintf_unfiltered (file, 01342 "gdbarch_dump: stab_reg_to_regnum = <%s>\n", 01343 host_address_to_string (gdbarch->stab_reg_to_regnum)); 01344 fprintf_unfiltered (file, 01345 "gdbarch_dump: stabs_argument_has_addr = <%s>\n", 01346 host_address_to_string (gdbarch->stabs_argument_has_addr)); 01347 fprintf_unfiltered (file, 01348 "gdbarch_dump: stap_gdb_register_prefix = %s\n", 01349 pstring (gdbarch->stap_gdb_register_prefix)); 01350 fprintf_unfiltered (file, 01351 "gdbarch_dump: stap_gdb_register_suffix = %s\n", 01352 pstring (gdbarch->stap_gdb_register_suffix)); 01353 fprintf_unfiltered (file, 01354 "gdbarch_dump: stap_integer_prefix = %s\n", 01355 pstring (gdbarch->stap_integer_prefix)); 01356 fprintf_unfiltered (file, 01357 "gdbarch_dump: stap_integer_suffix = %s\n", 01358 pstring (gdbarch->stap_integer_suffix)); 01359 fprintf_unfiltered (file, 01360 "gdbarch_dump: gdbarch_stap_is_single_operand_p() = %d\n", 01361 gdbarch_stap_is_single_operand_p (gdbarch)); 01362 fprintf_unfiltered (file, 01363 "gdbarch_dump: stap_is_single_operand = <%s>\n", 01364 host_address_to_string (gdbarch->stap_is_single_operand)); 01365 fprintf_unfiltered (file, 01366 "gdbarch_dump: gdbarch_stap_parse_special_token_p() = %d\n", 01367 gdbarch_stap_parse_special_token_p (gdbarch)); 01368 fprintf_unfiltered (file, 01369 "gdbarch_dump: stap_parse_special_token = <%s>\n", 01370 host_address_to_string (gdbarch->stap_parse_special_token)); 01371 fprintf_unfiltered (file, 01372 "gdbarch_dump: stap_register_indirection_prefix = %s\n", 01373 pstring (gdbarch->stap_register_indirection_prefix)); 01374 fprintf_unfiltered (file, 01375 "gdbarch_dump: stap_register_indirection_suffix = %s\n", 01376 pstring (gdbarch->stap_register_indirection_suffix)); 01377 fprintf_unfiltered (file, 01378 "gdbarch_dump: stap_register_prefix = %s\n", 01379 pstring (gdbarch->stap_register_prefix)); 01380 fprintf_unfiltered (file, 01381 "gdbarch_dump: stap_register_suffix = %s\n", 01382 pstring (gdbarch->stap_register_suffix)); 01383 fprintf_unfiltered (file, 01384 "gdbarch_dump: gdbarch_static_transform_name_p() = %d\n", 01385 gdbarch_static_transform_name_p (gdbarch)); 01386 fprintf_unfiltered (file, 01387 "gdbarch_dump: static_transform_name = <%s>\n", 01388 host_address_to_string (gdbarch->static_transform_name)); 01389 fprintf_unfiltered (file, 01390 "gdbarch_dump: target_desc = %s\n", 01391 host_address_to_string (gdbarch->target_desc)); 01392 fprintf_unfiltered (file, 01393 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n", 01394 gdbarch_unwind_pc_p (gdbarch)); 01395 fprintf_unfiltered (file, 01396 "gdbarch_dump: unwind_pc = <%s>\n", 01397 host_address_to_string (gdbarch->unwind_pc)); 01398 fprintf_unfiltered (file, 01399 "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n", 01400 gdbarch_unwind_sp_p (gdbarch)); 01401 fprintf_unfiltered (file, 01402 "gdbarch_dump: unwind_sp = <%s>\n", 01403 host_address_to_string (gdbarch->unwind_sp)); 01404 fprintf_unfiltered (file, 01405 "gdbarch_dump: value_from_register = <%s>\n", 01406 host_address_to_string (gdbarch->value_from_register)); 01407 fprintf_unfiltered (file, 01408 "gdbarch_dump: value_to_register = <%s>\n", 01409 host_address_to_string (gdbarch->value_to_register)); 01410 fprintf_unfiltered (file, 01411 "gdbarch_dump: vbit_in_delta = %s\n", 01412 plongest (gdbarch->vbit_in_delta)); 01413 fprintf_unfiltered (file, 01414 "gdbarch_dump: virtual_frame_pointer = <%s>\n", 01415 host_address_to_string (gdbarch->virtual_frame_pointer)); 01416 fprintf_unfiltered (file, 01417 "gdbarch_dump: vtable_function_descriptors = %s\n", 01418 plongest (gdbarch->vtable_function_descriptors)); 01419 fprintf_unfiltered (file, 01420 "gdbarch_dump: gdbarch_write_pc_p() = %d\n", 01421 gdbarch_write_pc_p (gdbarch)); 01422 fprintf_unfiltered (file, 01423 "gdbarch_dump: write_pc = <%s>\n", 01424 host_address_to_string (gdbarch->write_pc)); 01425 if (gdbarch->dump_tdep != NULL) 01426 gdbarch->dump_tdep (gdbarch, file); 01427 } 01428 01429 struct gdbarch_tdep * 01430 gdbarch_tdep (struct gdbarch *gdbarch) 01431 { 01432 if (gdbarch_debug >= 2) 01433 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); 01434 return gdbarch->tdep; 01435 } 01436 01437 01438 const struct bfd_arch_info * 01439 gdbarch_bfd_arch_info (struct gdbarch *gdbarch) 01440 { 01441 gdb_assert (gdbarch != NULL); 01442 if (gdbarch_debug >= 2) 01443 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); 01444 return gdbarch->bfd_arch_info; 01445 } 01446 01447 int 01448 gdbarch_byte_order (struct gdbarch *gdbarch) 01449 { 01450 gdb_assert (gdbarch != NULL); 01451 if (gdbarch_debug >= 2) 01452 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); 01453 return gdbarch->byte_order; 01454 } 01455 01456 int 01457 gdbarch_byte_order_for_code (struct gdbarch *gdbarch) 01458 { 01459 gdb_assert (gdbarch != NULL); 01460 if (gdbarch_debug >= 2) 01461 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order_for_code called\n"); 01462 return gdbarch->byte_order_for_code; 01463 } 01464 01465 enum gdb_osabi 01466 gdbarch_osabi (struct gdbarch *gdbarch) 01467 { 01468 gdb_assert (gdbarch != NULL); 01469 if (gdbarch_debug >= 2) 01470 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n"); 01471 return gdbarch->osabi; 01472 } 01473 01474 const struct target_desc * 01475 gdbarch_target_desc (struct gdbarch *gdbarch) 01476 { 01477 gdb_assert (gdbarch != NULL); 01478 if (gdbarch_debug >= 2) 01479 fprintf_unfiltered (gdb_stdlog, "gdbarch_target_desc called\n"); 01480 return gdbarch->target_desc; 01481 } 01482 01483 int 01484 gdbarch_bits_big_endian (struct gdbarch *gdbarch) 01485 { 01486 gdb_assert (gdbarch != NULL); 01487 /* Skip verify of bits_big_endian, invalid_p == 0 */ 01488 if (gdbarch_debug >= 2) 01489 fprintf_unfiltered (gdb_stdlog, "gdbarch_bits_big_endian called\n"); 01490 return gdbarch->bits_big_endian; 01491 } 01492 01493 void 01494 set_gdbarch_bits_big_endian (struct gdbarch *gdbarch, 01495 int bits_big_endian) 01496 { 01497 gdbarch->bits_big_endian = bits_big_endian; 01498 } 01499 01500 int 01501 gdbarch_short_bit (struct gdbarch *gdbarch) 01502 { 01503 gdb_assert (gdbarch != NULL); 01504 /* Skip verify of short_bit, invalid_p == 0 */ 01505 if (gdbarch_debug >= 2) 01506 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); 01507 return gdbarch->short_bit; 01508 } 01509 01510 void 01511 set_gdbarch_short_bit (struct gdbarch *gdbarch, 01512 int short_bit) 01513 { 01514 gdbarch->short_bit = short_bit; 01515 } 01516 01517 int 01518 gdbarch_int_bit (struct gdbarch *gdbarch) 01519 { 01520 gdb_assert (gdbarch != NULL); 01521 /* Skip verify of int_bit, invalid_p == 0 */ 01522 if (gdbarch_debug >= 2) 01523 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); 01524 return gdbarch->int_bit; 01525 } 01526 01527 void 01528 set_gdbarch_int_bit (struct gdbarch *gdbarch, 01529 int int_bit) 01530 { 01531 gdbarch->int_bit = int_bit; 01532 } 01533 01534 int 01535 gdbarch_long_bit (struct gdbarch *gdbarch) 01536 { 01537 gdb_assert (gdbarch != NULL); 01538 /* Skip verify of long_bit, invalid_p == 0 */ 01539 if (gdbarch_debug >= 2) 01540 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); 01541 return gdbarch->long_bit; 01542 } 01543 01544 void 01545 set_gdbarch_long_bit (struct gdbarch *gdbarch, 01546 int long_bit) 01547 { 01548 gdbarch->long_bit = long_bit; 01549 } 01550 01551 int 01552 gdbarch_long_long_bit (struct gdbarch *gdbarch) 01553 { 01554 gdb_assert (gdbarch != NULL); 01555 /* Skip verify of long_long_bit, invalid_p == 0 */ 01556 if (gdbarch_debug >= 2) 01557 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); 01558 return gdbarch->long_long_bit; 01559 } 01560 01561 void 01562 set_gdbarch_long_long_bit (struct gdbarch *gdbarch, 01563 int long_long_bit) 01564 { 01565 gdbarch->long_long_bit = long_long_bit; 01566 } 01567 01568 int 01569 gdbarch_long_long_align_bit (struct gdbarch *gdbarch) 01570 { 01571 gdb_assert (gdbarch != NULL); 01572 /* Skip verify of long_long_align_bit, invalid_p == 0 */ 01573 if (gdbarch_debug >= 2) 01574 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_align_bit called\n"); 01575 return gdbarch->long_long_align_bit; 01576 } 01577 01578 void 01579 set_gdbarch_long_long_align_bit (struct gdbarch *gdbarch, 01580 int long_long_align_bit) 01581 { 01582 gdbarch->long_long_align_bit = long_long_align_bit; 01583 } 01584 01585 int 01586 gdbarch_half_bit (struct gdbarch *gdbarch) 01587 { 01588 gdb_assert (gdbarch != NULL); 01589 /* Skip verify of half_bit, invalid_p == 0 */ 01590 if (gdbarch_debug >= 2) 01591 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_bit called\n"); 01592 return gdbarch->half_bit; 01593 } 01594 01595 void 01596 set_gdbarch_half_bit (struct gdbarch *gdbarch, 01597 int half_bit) 01598 { 01599 gdbarch->half_bit = half_bit; 01600 } 01601 01602 const struct floatformat ** 01603 gdbarch_half_format (struct gdbarch *gdbarch) 01604 { 01605 gdb_assert (gdbarch != NULL); 01606 if (gdbarch_debug >= 2) 01607 fprintf_unfiltered (gdb_stdlog, "gdbarch_half_format called\n"); 01608 return gdbarch->half_format; 01609 } 01610 01611 void 01612 set_gdbarch_half_format (struct gdbarch *gdbarch, 01613 const struct floatformat ** half_format) 01614 { 01615 gdbarch->half_format = half_format; 01616 } 01617 01618 int 01619 gdbarch_float_bit (struct gdbarch *gdbarch) 01620 { 01621 gdb_assert (gdbarch != NULL); 01622 /* Skip verify of float_bit, invalid_p == 0 */ 01623 if (gdbarch_debug >= 2) 01624 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); 01625 return gdbarch->float_bit; 01626 } 01627 01628 void 01629 set_gdbarch_float_bit (struct gdbarch *gdbarch, 01630 int float_bit) 01631 { 01632 gdbarch->float_bit = float_bit; 01633 } 01634 01635 const struct floatformat ** 01636 gdbarch_float_format (struct gdbarch *gdbarch) 01637 { 01638 gdb_assert (gdbarch != NULL); 01639 if (gdbarch_debug >= 2) 01640 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); 01641 return gdbarch->float_format; 01642 } 01643 01644 void 01645 set_gdbarch_float_format (struct gdbarch *gdbarch, 01646 const struct floatformat ** float_format) 01647 { 01648 gdbarch->float_format = float_format; 01649 } 01650 01651 int 01652 gdbarch_double_bit (struct gdbarch *gdbarch) 01653 { 01654 gdb_assert (gdbarch != NULL); 01655 /* Skip verify of double_bit, invalid_p == 0 */ 01656 if (gdbarch_debug >= 2) 01657 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); 01658 return gdbarch->double_bit; 01659 } 01660 01661 void 01662 set_gdbarch_double_bit (struct gdbarch *gdbarch, 01663 int double_bit) 01664 { 01665 gdbarch->double_bit = double_bit; 01666 } 01667 01668 const struct floatformat ** 01669 gdbarch_double_format (struct gdbarch *gdbarch) 01670 { 01671 gdb_assert (gdbarch != NULL); 01672 if (gdbarch_debug >= 2) 01673 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); 01674 return gdbarch->double_format; 01675 } 01676 01677 void 01678 set_gdbarch_double_format (struct gdbarch *gdbarch, 01679 const struct floatformat ** double_format) 01680 { 01681 gdbarch->double_format = double_format; 01682 } 01683 01684 int 01685 gdbarch_long_double_bit (struct gdbarch *gdbarch) 01686 { 01687 gdb_assert (gdbarch != NULL); 01688 /* Skip verify of long_double_bit, invalid_p == 0 */ 01689 if (gdbarch_debug >= 2) 01690 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); 01691 return gdbarch->long_double_bit; 01692 } 01693 01694 void 01695 set_gdbarch_long_double_bit (struct gdbarch *gdbarch, 01696 int long_double_bit) 01697 { 01698 gdbarch->long_double_bit = long_double_bit; 01699 } 01700 01701 const struct floatformat ** 01702 gdbarch_long_double_format (struct gdbarch *gdbarch) 01703 { 01704 gdb_assert (gdbarch != NULL); 01705 if (gdbarch_debug >= 2) 01706 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); 01707 return gdbarch->long_double_format; 01708 } 01709 01710 void 01711 set_gdbarch_long_double_format (struct gdbarch *gdbarch, 01712 const struct floatformat ** long_double_format) 01713 { 01714 gdbarch->long_double_format = long_double_format; 01715 } 01716 01717 int 01718 gdbarch_ptr_bit (struct gdbarch *gdbarch) 01719 { 01720 gdb_assert (gdbarch != NULL); 01721 /* Skip verify of ptr_bit, invalid_p == 0 */ 01722 if (gdbarch_debug >= 2) 01723 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); 01724 return gdbarch->ptr_bit; 01725 } 01726 01727 void 01728 set_gdbarch_ptr_bit (struct gdbarch *gdbarch, 01729 int ptr_bit) 01730 { 01731 gdbarch->ptr_bit = ptr_bit; 01732 } 01733 01734 int 01735 gdbarch_addr_bit (struct gdbarch *gdbarch) 01736 { 01737 gdb_assert (gdbarch != NULL); 01738 /* Check variable changed from pre-default. */ 01739 gdb_assert (gdbarch->addr_bit != 0); 01740 if (gdbarch_debug >= 2) 01741 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); 01742 return gdbarch->addr_bit; 01743 } 01744 01745 void 01746 set_gdbarch_addr_bit (struct gdbarch *gdbarch, 01747 int addr_bit) 01748 { 01749 gdbarch->addr_bit = addr_bit; 01750 } 01751 01752 int 01753 gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch) 01754 { 01755 gdb_assert (gdbarch != NULL); 01756 /* Check variable changed from pre-default. */ 01757 gdb_assert (gdbarch->dwarf2_addr_size != 0); 01758 if (gdbarch_debug >= 2) 01759 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_addr_size called\n"); 01760 return gdbarch->dwarf2_addr_size; 01761 } 01762 01763 void 01764 set_gdbarch_dwarf2_addr_size (struct gdbarch *gdbarch, 01765 int dwarf2_addr_size) 01766 { 01767 gdbarch->dwarf2_addr_size = dwarf2_addr_size; 01768 } 01769 01770 int 01771 gdbarch_char_signed (struct gdbarch *gdbarch) 01772 { 01773 gdb_assert (gdbarch != NULL); 01774 /* Check variable changed from pre-default. */ 01775 gdb_assert (gdbarch->char_signed != -1); 01776 if (gdbarch_debug >= 2) 01777 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); 01778 return gdbarch->char_signed; 01779 } 01780 01781 void 01782 set_gdbarch_char_signed (struct gdbarch *gdbarch, 01783 int char_signed) 01784 { 01785 gdbarch->char_signed = char_signed; 01786 } 01787 01788 int 01789 gdbarch_read_pc_p (struct gdbarch *gdbarch) 01790 { 01791 gdb_assert (gdbarch != NULL); 01792 return gdbarch->read_pc != NULL; 01793 } 01794 01795 CORE_ADDR 01796 gdbarch_read_pc (struct gdbarch *gdbarch, struct regcache *regcache) 01797 { 01798 gdb_assert (gdbarch != NULL); 01799 gdb_assert (gdbarch->read_pc != NULL); 01800 if (gdbarch_debug >= 2) 01801 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); 01802 return gdbarch->read_pc (regcache); 01803 } 01804 01805 void 01806 set_gdbarch_read_pc (struct gdbarch *gdbarch, 01807 gdbarch_read_pc_ftype read_pc) 01808 { 01809 gdbarch->read_pc = read_pc; 01810 } 01811 01812 int 01813 gdbarch_write_pc_p (struct gdbarch *gdbarch) 01814 { 01815 gdb_assert (gdbarch != NULL); 01816 return gdbarch->write_pc != NULL; 01817 } 01818 01819 void 01820 gdbarch_write_pc (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR val) 01821 { 01822 gdb_assert (gdbarch != NULL); 01823 gdb_assert (gdbarch->write_pc != NULL); 01824 if (gdbarch_debug >= 2) 01825 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); 01826 gdbarch->write_pc (regcache, val); 01827 } 01828 01829 void 01830 set_gdbarch_write_pc (struct gdbarch *gdbarch, 01831 gdbarch_write_pc_ftype write_pc) 01832 { 01833 gdbarch->write_pc = write_pc; 01834 } 01835 01836 void 01837 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) 01838 { 01839 gdb_assert (gdbarch != NULL); 01840 gdb_assert (gdbarch->virtual_frame_pointer != NULL); 01841 if (gdbarch_debug >= 2) 01842 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); 01843 gdbarch->virtual_frame_pointer (gdbarch, pc, frame_regnum, frame_offset); 01844 } 01845 01846 void 01847 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, 01848 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) 01849 { 01850 gdbarch->virtual_frame_pointer = virtual_frame_pointer; 01851 } 01852 01853 int 01854 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch) 01855 { 01856 gdb_assert (gdbarch != NULL); 01857 return gdbarch->pseudo_register_read != NULL; 01858 } 01859 01860 enum register_status 01861 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, gdb_byte *buf) 01862 { 01863 gdb_assert (gdbarch != NULL); 01864 gdb_assert (gdbarch->pseudo_register_read != NULL); 01865 if (gdbarch_debug >= 2) 01866 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); 01867 return gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); 01868 } 01869 01870 void 01871 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, 01872 gdbarch_pseudo_register_read_ftype pseudo_register_read) 01873 { 01874 gdbarch->pseudo_register_read = pseudo_register_read; 01875 } 01876 01877 int 01878 gdbarch_pseudo_register_read_value_p (struct gdbarch *gdbarch) 01879 { 01880 gdb_assert (gdbarch != NULL); 01881 return gdbarch->pseudo_register_read_value != NULL; 01882 } 01883 01884 struct value * 01885 gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum) 01886 { 01887 gdb_assert (gdbarch != NULL); 01888 gdb_assert (gdbarch->pseudo_register_read_value != NULL); 01889 if (gdbarch_debug >= 2) 01890 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read_value called\n"); 01891 return gdbarch->pseudo_register_read_value (gdbarch, regcache, cookednum); 01892 } 01893 01894 void 01895 set_gdbarch_pseudo_register_read_value (struct gdbarch *gdbarch, 01896 gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value) 01897 { 01898 gdbarch->pseudo_register_read_value = pseudo_register_read_value; 01899 } 01900 01901 int 01902 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) 01903 { 01904 gdb_assert (gdbarch != NULL); 01905 return gdbarch->pseudo_register_write != NULL; 01906 } 01907 01908 void 01909 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const gdb_byte *buf) 01910 { 01911 gdb_assert (gdbarch != NULL); 01912 gdb_assert (gdbarch->pseudo_register_write != NULL); 01913 if (gdbarch_debug >= 2) 01914 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); 01915 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); 01916 } 01917 01918 void 01919 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, 01920 gdbarch_pseudo_register_write_ftype pseudo_register_write) 01921 { 01922 gdbarch->pseudo_register_write = pseudo_register_write; 01923 } 01924 01925 int 01926 gdbarch_num_regs (struct gdbarch *gdbarch) 01927 { 01928 gdb_assert (gdbarch != NULL); 01929 /* Check variable changed from pre-default. */ 01930 gdb_assert (gdbarch->num_regs != -1); 01931 if (gdbarch_debug >= 2) 01932 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); 01933 return gdbarch->num_regs; 01934 } 01935 01936 void 01937 set_gdbarch_num_regs (struct gdbarch *gdbarch, 01938 int num_regs) 01939 { 01940 gdbarch->num_regs = num_regs; 01941 } 01942 01943 int 01944 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) 01945 { 01946 gdb_assert (gdbarch != NULL); 01947 /* Skip verify of num_pseudo_regs, invalid_p == 0 */ 01948 if (gdbarch_debug >= 2) 01949 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); 01950 return gdbarch->num_pseudo_regs; 01951 } 01952 01953 void 01954 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, 01955 int num_pseudo_regs) 01956 { 01957 gdbarch->num_pseudo_regs = num_pseudo_regs; 01958 } 01959 01960 int 01961 gdbarch_ax_pseudo_register_collect_p (struct gdbarch *gdbarch) 01962 { 01963 gdb_assert (gdbarch != NULL); 01964 return gdbarch->ax_pseudo_register_collect != NULL; 01965 } 01966 01967 int 01968 gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, struct agent_expr *ax, int reg) 01969 { 01970 gdb_assert (gdbarch != NULL); 01971 gdb_assert (gdbarch->ax_pseudo_register_collect != NULL); 01972 if (gdbarch_debug >= 2) 01973 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_collect called\n"); 01974 return gdbarch->ax_pseudo_register_collect (gdbarch, ax, reg); 01975 } 01976 01977 void 01978 set_gdbarch_ax_pseudo_register_collect (struct gdbarch *gdbarch, 01979 gdbarch_ax_pseudo_register_collect_ftype ax_pseudo_register_collect) 01980 { 01981 gdbarch->ax_pseudo_register_collect = ax_pseudo_register_collect; 01982 } 01983 01984 int 01985 gdbarch_ax_pseudo_register_push_stack_p (struct gdbarch *gdbarch) 01986 { 01987 gdb_assert (gdbarch != NULL); 01988 return gdbarch->ax_pseudo_register_push_stack != NULL; 01989 } 01990 01991 int 01992 gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, struct agent_expr *ax, int reg) 01993 { 01994 gdb_assert (gdbarch != NULL); 01995 gdb_assert (gdbarch->ax_pseudo_register_push_stack != NULL); 01996 if (gdbarch_debug >= 2) 01997 fprintf_unfiltered (gdb_stdlog, "gdbarch_ax_pseudo_register_push_stack called\n"); 01998 return gdbarch->ax_pseudo_register_push_stack (gdbarch, ax, reg); 01999 } 02000 02001 void 02002 set_gdbarch_ax_pseudo_register_push_stack (struct gdbarch *gdbarch, 02003 gdbarch_ax_pseudo_register_push_stack_ftype ax_pseudo_register_push_stack) 02004 { 02005 gdbarch->ax_pseudo_register_push_stack = ax_pseudo_register_push_stack; 02006 } 02007 02008 int 02009 gdbarch_sp_regnum (struct gdbarch *gdbarch) 02010 { 02011 gdb_assert (gdbarch != NULL); 02012 /* Skip verify of sp_regnum, invalid_p == 0 */ 02013 if (gdbarch_debug >= 2) 02014 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); 02015 return gdbarch->sp_regnum; 02016 } 02017 02018 void 02019 set_gdbarch_sp_regnum (struct gdbarch *gdbarch, 02020 int sp_regnum) 02021 { 02022 gdbarch->sp_regnum = sp_regnum; 02023 } 02024 02025 int 02026 gdbarch_pc_regnum (struct gdbarch *gdbarch) 02027 { 02028 gdb_assert (gdbarch != NULL); 02029 /* Skip verify of pc_regnum, invalid_p == 0 */ 02030 if (gdbarch_debug >= 2) 02031 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); 02032 return gdbarch->pc_regnum; 02033 } 02034 02035 void 02036 set_gdbarch_pc_regnum (struct gdbarch *gdbarch, 02037 int pc_regnum) 02038 { 02039 gdbarch->pc_regnum = pc_regnum; 02040 } 02041 02042 int 02043 gdbarch_ps_regnum (struct gdbarch *gdbarch) 02044 { 02045 gdb_assert (gdbarch != NULL); 02046 /* Skip verify of ps_regnum, invalid_p == 0 */ 02047 if (gdbarch_debug >= 2) 02048 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); 02049 return gdbarch->ps_regnum; 02050 } 02051 02052 void 02053 set_gdbarch_ps_regnum (struct gdbarch *gdbarch, 02054 int ps_regnum) 02055 { 02056 gdbarch->ps_regnum = ps_regnum; 02057 } 02058 02059 int 02060 gdbarch_fp0_regnum (struct gdbarch *gdbarch) 02061 { 02062 gdb_assert (gdbarch != NULL); 02063 /* Skip verify of fp0_regnum, invalid_p == 0 */ 02064 if (gdbarch_debug >= 2) 02065 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); 02066 return gdbarch->fp0_regnum; 02067 } 02068 02069 void 02070 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, 02071 int fp0_regnum) 02072 { 02073 gdbarch->fp0_regnum = fp0_regnum; 02074 } 02075 02076 int 02077 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) 02078 { 02079 gdb_assert (gdbarch != NULL); 02080 gdb_assert (gdbarch->stab_reg_to_regnum != NULL); 02081 if (gdbarch_debug >= 2) 02082 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); 02083 return gdbarch->stab_reg_to_regnum (gdbarch, stab_regnr); 02084 } 02085 02086 void 02087 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, 02088 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) 02089 { 02090 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; 02091 } 02092 02093 int 02094 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) 02095 { 02096 gdb_assert (gdbarch != NULL); 02097 gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); 02098 if (gdbarch_debug >= 2) 02099 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); 02100 return gdbarch->ecoff_reg_to_regnum (gdbarch, ecoff_regnr); 02101 } 02102 02103 void 02104 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, 02105 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) 02106 { 02107 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; 02108 } 02109 02110 int 02111 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) 02112 { 02113 gdb_assert (gdbarch != NULL); 02114 gdb_assert (gdbarch->sdb_reg_to_regnum != NULL); 02115 if (gdbarch_debug >= 2) 02116 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); 02117 return gdbarch->sdb_reg_to_regnum (gdbarch, sdb_regnr); 02118 } 02119 02120 void 02121 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, 02122 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) 02123 { 02124 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; 02125 } 02126 02127 int 02128 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) 02129 { 02130 gdb_assert (gdbarch != NULL); 02131 gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL); 02132 if (gdbarch_debug >= 2) 02133 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); 02134 return gdbarch->dwarf2_reg_to_regnum (gdbarch, dwarf2_regnr); 02135 } 02136 02137 void 02138 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, 02139 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) 02140 { 02141 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; 02142 } 02143 02144 const char * 02145 gdbarch_register_name (struct gdbarch *gdbarch, int regnr) 02146 { 02147 gdb_assert (gdbarch != NULL); 02148 gdb_assert (gdbarch->register_name != NULL); 02149 if (gdbarch_debug >= 2) 02150 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); 02151 return gdbarch->register_name (gdbarch, regnr); 02152 } 02153 02154 void 02155 set_gdbarch_register_name (struct gdbarch *gdbarch, 02156 gdbarch_register_name_ftype register_name) 02157 { 02158 gdbarch->register_name = register_name; 02159 } 02160 02161 int 02162 gdbarch_register_type_p (struct gdbarch *gdbarch) 02163 { 02164 gdb_assert (gdbarch != NULL); 02165 return gdbarch->register_type != NULL; 02166 } 02167 02168 struct type * 02169 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr) 02170 { 02171 gdb_assert (gdbarch != NULL); 02172 gdb_assert (gdbarch->register_type != NULL); 02173 if (gdbarch_debug >= 2) 02174 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n"); 02175 return gdbarch->register_type (gdbarch, reg_nr); 02176 } 02177 02178 void 02179 set_gdbarch_register_type (struct gdbarch *gdbarch, 02180 gdbarch_register_type_ftype register_type) 02181 { 02182 gdbarch->register_type = register_type; 02183 } 02184 02185 int 02186 gdbarch_dummy_id_p (struct gdbarch *gdbarch) 02187 { 02188 gdb_assert (gdbarch != NULL); 02189 return gdbarch->dummy_id != NULL; 02190 } 02191 02192 struct frame_id 02193 gdbarch_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) 02194 { 02195 gdb_assert (gdbarch != NULL); 02196 gdb_assert (gdbarch->dummy_id != NULL); 02197 if (gdbarch_debug >= 2) 02198 fprintf_unfiltered (gdb_stdlog, "gdbarch_dummy_id called\n"); 02199 return gdbarch->dummy_id (gdbarch, this_frame); 02200 } 02201 02202 void 02203 set_gdbarch_dummy_id (struct gdbarch *gdbarch, 02204 gdbarch_dummy_id_ftype dummy_id) 02205 { 02206 gdbarch->dummy_id = dummy_id; 02207 } 02208 02209 int 02210 gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch) 02211 { 02212 gdb_assert (gdbarch != NULL); 02213 /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ 02214 if (gdbarch_debug >= 2) 02215 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); 02216 return gdbarch->deprecated_fp_regnum; 02217 } 02218 02219 void 02220 set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, 02221 int deprecated_fp_regnum) 02222 { 02223 gdbarch->deprecated_fp_regnum = deprecated_fp_regnum; 02224 } 02225 02226 int 02227 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch) 02228 { 02229 gdb_assert (gdbarch != NULL); 02230 return gdbarch->push_dummy_call != NULL; 02231 } 02232 02233 CORE_ADDR 02234 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) 02235 { 02236 gdb_assert (gdbarch != NULL); 02237 gdb_assert (gdbarch->push_dummy_call != NULL); 02238 if (gdbarch_debug >= 2) 02239 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n"); 02240 return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr); 02241 } 02242 02243 void 02244 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, 02245 gdbarch_push_dummy_call_ftype push_dummy_call) 02246 { 02247 gdbarch->push_dummy_call = push_dummy_call; 02248 } 02249 02250 int 02251 gdbarch_call_dummy_location (struct gdbarch *gdbarch) 02252 { 02253 gdb_assert (gdbarch != NULL); 02254 /* Skip verify of call_dummy_location, invalid_p == 0 */ 02255 if (gdbarch_debug >= 2) 02256 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); 02257 return gdbarch->call_dummy_location; 02258 } 02259 02260 void 02261 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, 02262 int call_dummy_location) 02263 { 02264 gdbarch->call_dummy_location = call_dummy_location; 02265 } 02266 02267 int 02268 gdbarch_push_dummy_code_p (struct gdbarch *gdbarch) 02269 { 02270 gdb_assert (gdbarch != NULL); 02271 return gdbarch->push_dummy_code != NULL; 02272 } 02273 02274 CORE_ADDR 02275 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) 02276 { 02277 gdb_assert (gdbarch != NULL); 02278 gdb_assert (gdbarch->push_dummy_code != NULL); 02279 if (gdbarch_debug >= 2) 02280 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n"); 02281 return gdbarch->push_dummy_code (gdbarch, sp, funaddr, args, nargs, value_type, real_pc, bp_addr, regcache); 02282 } 02283 02284 void 02285 set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, 02286 gdbarch_push_dummy_code_ftype push_dummy_code) 02287 { 02288 gdbarch->push_dummy_code = push_dummy_code; 02289 } 02290 02291 void 02292 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) 02293 { 02294 gdb_assert (gdbarch != NULL); 02295 gdb_assert (gdbarch->print_registers_info != NULL); 02296 if (gdbarch_debug >= 2) 02297 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); 02298 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); 02299 } 02300 02301 void 02302 set_gdbarch_print_registers_info (struct gdbarch *gdbarch, 02303 gdbarch_print_registers_info_ftype print_registers_info) 02304 { 02305 gdbarch->print_registers_info = print_registers_info; 02306 } 02307 02308 int 02309 gdbarch_print_float_info_p (struct gdbarch *gdbarch) 02310 { 02311 gdb_assert (gdbarch != NULL); 02312 return gdbarch->print_float_info != NULL; 02313 } 02314 02315 void 02316 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) 02317 { 02318 gdb_assert (gdbarch != NULL); 02319 gdb_assert (gdbarch->print_float_info != NULL); 02320 if (gdbarch_debug >= 2) 02321 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); 02322 gdbarch->print_float_info (gdbarch, file, frame, args); 02323 } 02324 02325 void 02326 set_gdbarch_print_float_info (struct gdbarch *gdbarch, 02327 gdbarch_print_float_info_ftype print_float_info) 02328 { 02329 gdbarch->print_float_info = print_float_info; 02330 } 02331 02332 int 02333 gdbarch_print_vector_info_p (struct gdbarch *gdbarch) 02334 { 02335 gdb_assert (gdbarch != NULL); 02336 return gdbarch->print_vector_info != NULL; 02337 } 02338 02339 void 02340 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) 02341 { 02342 gdb_assert (gdbarch != NULL); 02343 gdb_assert (gdbarch->print_vector_info != NULL); 02344 if (gdbarch_debug >= 2) 02345 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); 02346 gdbarch->print_vector_info (gdbarch, file, frame, args); 02347 } 02348 02349 void 02350 set_gdbarch_print_vector_info (struct gdbarch *gdbarch, 02351 gdbarch_print_vector_info_ftype print_vector_info) 02352 { 02353 gdbarch->print_vector_info = print_vector_info; 02354 } 02355 02356 int 02357 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) 02358 { 02359 gdb_assert (gdbarch != NULL); 02360 gdb_assert (gdbarch->register_sim_regno != NULL); 02361 if (gdbarch_debug >= 2) 02362 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); 02363 return gdbarch->register_sim_regno (gdbarch, reg_nr); 02364 } 02365 02366 void 02367 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, 02368 gdbarch_register_sim_regno_ftype register_sim_regno) 02369 { 02370 gdbarch->register_sim_regno = register_sim_regno; 02371 } 02372 02373 int 02374 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) 02375 { 02376 gdb_assert (gdbarch != NULL); 02377 gdb_assert (gdbarch->cannot_fetch_register != NULL); 02378 if (gdbarch_debug >= 2) 02379 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); 02380 return gdbarch->cannot_fetch_register (gdbarch, regnum); 02381 } 02382 02383 void 02384 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, 02385 gdbarch_cannot_fetch_register_ftype cannot_fetch_register) 02386 { 02387 gdbarch->cannot_fetch_register = cannot_fetch_register; 02388 } 02389 02390 int 02391 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) 02392 { 02393 gdb_assert (gdbarch != NULL); 02394 gdb_assert (gdbarch->cannot_store_register != NULL); 02395 if (gdbarch_debug >= 2) 02396 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); 02397 return gdbarch->cannot_store_register (gdbarch, regnum); 02398 } 02399 02400 void 02401 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, 02402 gdbarch_cannot_store_register_ftype cannot_store_register) 02403 { 02404 gdbarch->cannot_store_register = cannot_store_register; 02405 } 02406 02407 int 02408 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) 02409 { 02410 gdb_assert (gdbarch != NULL); 02411 return gdbarch->get_longjmp_target != NULL; 02412 } 02413 02414 int 02415 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR *pc) 02416 { 02417 gdb_assert (gdbarch != NULL); 02418 gdb_assert (gdbarch->get_longjmp_target != NULL); 02419 if (gdbarch_debug >= 2) 02420 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); 02421 return gdbarch->get_longjmp_target (frame, pc); 02422 } 02423 02424 void 02425 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, 02426 gdbarch_get_longjmp_target_ftype get_longjmp_target) 02427 { 02428 gdbarch->get_longjmp_target = get_longjmp_target; 02429 } 02430 02431 int 02432 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) 02433 { 02434 gdb_assert (gdbarch != NULL); 02435 if (gdbarch_debug >= 2) 02436 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); 02437 return gdbarch->believe_pcc_promotion; 02438 } 02439 02440 void 02441 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, 02442 int believe_pcc_promotion) 02443 { 02444 gdbarch->believe_pcc_promotion = believe_pcc_promotion; 02445 } 02446 02447 int 02448 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) 02449 { 02450 gdb_assert (gdbarch != NULL); 02451 gdb_assert (gdbarch->convert_register_p != NULL); 02452 if (gdbarch_debug >= 2) 02453 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); 02454 return gdbarch->convert_register_p (gdbarch, regnum, type); 02455 } 02456 02457 void 02458 set_gdbarch_convert_register_p (struct gdbarch *gdbarch, 02459 gdbarch_convert_register_p_ftype convert_register_p) 02460 { 02461 gdbarch->convert_register_p = convert_register_p; 02462 } 02463 02464 int 02465 gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, gdb_byte *buf, int *optimizedp, int *unavailablep) 02466 { 02467 gdb_assert (gdbarch != NULL); 02468 gdb_assert (gdbarch->register_to_value != NULL); 02469 if (gdbarch_debug >= 2) 02470 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); 02471 return gdbarch->register_to_value (frame, regnum, type, buf, optimizedp, unavailablep); 02472 } 02473 02474 void 02475 set_gdbarch_register_to_value (struct gdbarch *gdbarch, 02476 gdbarch_register_to_value_ftype register_to_value) 02477 { 02478 gdbarch->register_to_value = register_to_value; 02479 } 02480 02481 void 02482 gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const gdb_byte *buf) 02483 { 02484 gdb_assert (gdbarch != NULL); 02485 gdb_assert (gdbarch->value_to_register != NULL); 02486 if (gdbarch_debug >= 2) 02487 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); 02488 gdbarch->value_to_register (frame, regnum, type, buf); 02489 } 02490 02491 void 02492 set_gdbarch_value_to_register (struct gdbarch *gdbarch, 02493 gdbarch_value_to_register_ftype value_to_register) 02494 { 02495 gdbarch->value_to_register = value_to_register; 02496 } 02497 02498 struct value * 02499 gdbarch_value_from_register (struct gdbarch *gdbarch, struct type *type, int regnum, struct frame_info *frame) 02500 { 02501 gdb_assert (gdbarch != NULL); 02502 gdb_assert (gdbarch->value_from_register != NULL); 02503 if (gdbarch_debug >= 2) 02504 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_from_register called\n"); 02505 return gdbarch->value_from_register (type, regnum, frame); 02506 } 02507 02508 void 02509 set_gdbarch_value_from_register (struct gdbarch *gdbarch, 02510 gdbarch_value_from_register_ftype value_from_register) 02511 { 02512 gdbarch->value_from_register = value_from_register; 02513 } 02514 02515 CORE_ADDR 02516 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) 02517 { 02518 gdb_assert (gdbarch != NULL); 02519 gdb_assert (gdbarch->pointer_to_address != NULL); 02520 if (gdbarch_debug >= 2) 02521 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); 02522 return gdbarch->pointer_to_address (gdbarch, type, buf); 02523 } 02524 02525 void 02526 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, 02527 gdbarch_pointer_to_address_ftype pointer_to_address) 02528 { 02529 gdbarch->pointer_to_address = pointer_to_address; 02530 } 02531 02532 void 02533 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, gdb_byte *buf, CORE_ADDR addr) 02534 { 02535 gdb_assert (gdbarch != NULL); 02536 gdb_assert (gdbarch->address_to_pointer != NULL); 02537 if (gdbarch_debug >= 2) 02538 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); 02539 gdbarch->address_to_pointer (gdbarch, type, buf, addr); 02540 } 02541 02542 void 02543 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, 02544 gdbarch_address_to_pointer_ftype address_to_pointer) 02545 { 02546 gdbarch->address_to_pointer = address_to_pointer; 02547 } 02548 02549 int 02550 gdbarch_integer_to_address_p (struct gdbarch *gdbarch) 02551 { 02552 gdb_assert (gdbarch != NULL); 02553 return gdbarch->integer_to_address != NULL; 02554 } 02555 02556 CORE_ADDR 02557 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, const gdb_byte *buf) 02558 { 02559 gdb_assert (gdbarch != NULL); 02560 gdb_assert (gdbarch->integer_to_address != NULL); 02561 if (gdbarch_debug >= 2) 02562 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); 02563 return gdbarch->integer_to_address (gdbarch, type, buf); 02564 } 02565 02566 void 02567 set_gdbarch_integer_to_address (struct gdbarch *gdbarch, 02568 gdbarch_integer_to_address_ftype integer_to_address) 02569 { 02570 gdbarch->integer_to_address = integer_to_address; 02571 } 02572 02573 int 02574 gdbarch_return_value_p (struct gdbarch *gdbarch) 02575 { 02576 gdb_assert (gdbarch != NULL); 02577 return gdbarch->return_value != NULL; 02578 } 02579 02580 enum return_value_convention 02581 gdbarch_return_value (struct gdbarch *gdbarch, struct value *function, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf) 02582 { 02583 gdb_assert (gdbarch != NULL); 02584 gdb_assert (gdbarch->return_value != NULL); 02585 if (gdbarch_debug >= 2) 02586 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n"); 02587 return gdbarch->return_value (gdbarch, function, valtype, regcache, readbuf, writebuf); 02588 } 02589 02590 void 02591 set_gdbarch_return_value (struct gdbarch *gdbarch, 02592 gdbarch_return_value_ftype return_value) 02593 { 02594 gdbarch->return_value = return_value; 02595 } 02596 02597 int 02598 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type) 02599 { 02600 gdb_assert (gdbarch != NULL); 02601 gdb_assert (gdbarch->return_in_first_hidden_param_p != NULL); 02602 if (gdbarch_debug >= 2) 02603 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_in_first_hidden_param_p called\n"); 02604 return gdbarch->return_in_first_hidden_param_p (gdbarch, type); 02605 } 02606 02607 void 02608 set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, 02609 gdbarch_return_in_first_hidden_param_p_ftype return_in_first_hidden_param_p) 02610 { 02611 gdbarch->return_in_first_hidden_param_p = return_in_first_hidden_param_p; 02612 } 02613 02614 CORE_ADDR 02615 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) 02616 { 02617 gdb_assert (gdbarch != NULL); 02618 gdb_assert (gdbarch->skip_prologue != NULL); 02619 if (gdbarch_debug >= 2) 02620 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); 02621 return gdbarch->skip_prologue (gdbarch, ip); 02622 } 02623 02624 void 02625 set_gdbarch_skip_prologue (struct gdbarch *gdbarch, 02626 gdbarch_skip_prologue_ftype skip_prologue) 02627 { 02628 gdbarch->skip_prologue = skip_prologue; 02629 } 02630 02631 int 02632 gdbarch_skip_main_prologue_p (struct gdbarch *gdbarch) 02633 { 02634 gdb_assert (gdbarch != NULL); 02635 return gdbarch->skip_main_prologue != NULL; 02636 } 02637 02638 CORE_ADDR 02639 gdbarch_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) 02640 { 02641 gdb_assert (gdbarch != NULL); 02642 gdb_assert (gdbarch->skip_main_prologue != NULL); 02643 if (gdbarch_debug >= 2) 02644 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_main_prologue called\n"); 02645 return gdbarch->skip_main_prologue (gdbarch, ip); 02646 } 02647 02648 void 02649 set_gdbarch_skip_main_prologue (struct gdbarch *gdbarch, 02650 gdbarch_skip_main_prologue_ftype skip_main_prologue) 02651 { 02652 gdbarch->skip_main_prologue = skip_main_prologue; 02653 } 02654 02655 int 02656 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) 02657 { 02658 gdb_assert (gdbarch != NULL); 02659 gdb_assert (gdbarch->inner_than != NULL); 02660 if (gdbarch_debug >= 2) 02661 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); 02662 return gdbarch->inner_than (lhs, rhs); 02663 } 02664 02665 void 02666 set_gdbarch_inner_than (struct gdbarch *gdbarch, 02667 gdbarch_inner_than_ftype inner_than) 02668 { 02669 gdbarch->inner_than = inner_than; 02670 } 02671 02672 const gdb_byte * 02673 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) 02674 { 02675 gdb_assert (gdbarch != NULL); 02676 gdb_assert (gdbarch->breakpoint_from_pc != NULL); 02677 if (gdbarch_debug >= 2) 02678 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); 02679 return gdbarch->breakpoint_from_pc (gdbarch, pcptr, lenptr); 02680 } 02681 02682 void 02683 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, 02684 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) 02685 { 02686 gdbarch->breakpoint_from_pc = breakpoint_from_pc; 02687 } 02688 02689 void 02690 gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *kindptr) 02691 { 02692 gdb_assert (gdbarch != NULL); 02693 gdb_assert (gdbarch->remote_breakpoint_from_pc != NULL); 02694 if (gdbarch_debug >= 2) 02695 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_breakpoint_from_pc called\n"); 02696 gdbarch->remote_breakpoint_from_pc (gdbarch, pcptr, kindptr); 02697 } 02698 02699 void 02700 set_gdbarch_remote_breakpoint_from_pc (struct gdbarch *gdbarch, 02701 gdbarch_remote_breakpoint_from_pc_ftype remote_breakpoint_from_pc) 02702 { 02703 gdbarch->remote_breakpoint_from_pc = remote_breakpoint_from_pc; 02704 } 02705 02706 int 02707 gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch) 02708 { 02709 gdb_assert (gdbarch != NULL); 02710 return gdbarch->adjust_breakpoint_address != NULL; 02711 } 02712 02713 CORE_ADDR 02714 gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr) 02715 { 02716 gdb_assert (gdbarch != NULL); 02717 gdb_assert (gdbarch->adjust_breakpoint_address != NULL); 02718 if (gdbarch_debug >= 2) 02719 fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n"); 02720 return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr); 02721 } 02722 02723 void 02724 set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, 02725 gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address) 02726 { 02727 gdbarch->adjust_breakpoint_address = adjust_breakpoint_address; 02728 } 02729 02730 int 02731 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) 02732 { 02733 gdb_assert (gdbarch != NULL); 02734 gdb_assert (gdbarch->memory_insert_breakpoint != NULL); 02735 if (gdbarch_debug >= 2) 02736 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); 02737 return gdbarch->memory_insert_breakpoint (gdbarch, bp_tgt); 02738 } 02739 02740 void 02741 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, 02742 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) 02743 { 02744 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; 02745 } 02746 02747 int 02748 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt) 02749 { 02750 gdb_assert (gdbarch != NULL); 02751 gdb_assert (gdbarch->memory_remove_breakpoint != NULL); 02752 if (gdbarch_debug >= 2) 02753 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); 02754 return gdbarch->memory_remove_breakpoint (gdbarch, bp_tgt); 02755 } 02756 02757 void 02758 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, 02759 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) 02760 { 02761 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; 02762 } 02763 02764 CORE_ADDR 02765 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) 02766 { 02767 gdb_assert (gdbarch != NULL); 02768 /* Skip verify of decr_pc_after_break, invalid_p == 0 */ 02769 if (gdbarch_debug >= 2) 02770 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); 02771 return gdbarch->decr_pc_after_break; 02772 } 02773 02774 void 02775 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, 02776 CORE_ADDR decr_pc_after_break) 02777 { 02778 gdbarch->decr_pc_after_break = decr_pc_after_break; 02779 } 02780 02781 CORE_ADDR 02782 gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch) 02783 { 02784 gdb_assert (gdbarch != NULL); 02785 /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */ 02786 if (gdbarch_debug >= 2) 02787 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_function_start_offset called\n"); 02788 return gdbarch->deprecated_function_start_offset; 02789 } 02790 02791 void 02792 set_gdbarch_deprecated_function_start_offset (struct gdbarch *gdbarch, 02793 CORE_ADDR deprecated_function_start_offset) 02794 { 02795 gdbarch->deprecated_function_start_offset = deprecated_function_start_offset; 02796 } 02797 02798 int 02799 gdbarch_remote_register_number (struct gdbarch *gdbarch, int regno) 02800 { 02801 gdb_assert (gdbarch != NULL); 02802 gdb_assert (gdbarch->remote_register_number != NULL); 02803 if (gdbarch_debug >= 2) 02804 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_register_number called\n"); 02805 return gdbarch->remote_register_number (gdbarch, regno); 02806 } 02807 02808 void 02809 set_gdbarch_remote_register_number (struct gdbarch *gdbarch, 02810 gdbarch_remote_register_number_ftype remote_register_number) 02811 { 02812 gdbarch->remote_register_number = remote_register_number; 02813 } 02814 02815 int 02816 gdbarch_fetch_tls_load_module_address_p (struct gdbarch *gdbarch) 02817 { 02818 gdb_assert (gdbarch != NULL); 02819 return gdbarch->fetch_tls_load_module_address != NULL; 02820 } 02821 02822 CORE_ADDR 02823 gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, struct objfile *objfile) 02824 { 02825 gdb_assert (gdbarch != NULL); 02826 gdb_assert (gdbarch->fetch_tls_load_module_address != NULL); 02827 if (gdbarch_debug >= 2) 02828 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_tls_load_module_address called\n"); 02829 return gdbarch->fetch_tls_load_module_address (objfile); 02830 } 02831 02832 void 02833 set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, 02834 gdbarch_fetch_tls_load_module_address_ftype fetch_tls_load_module_address) 02835 { 02836 gdbarch->fetch_tls_load_module_address = fetch_tls_load_module_address; 02837 } 02838 02839 CORE_ADDR 02840 gdbarch_frame_args_skip (struct gdbarch *gdbarch) 02841 { 02842 gdb_assert (gdbarch != NULL); 02843 /* Skip verify of frame_args_skip, invalid_p == 0 */ 02844 if (gdbarch_debug >= 2) 02845 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); 02846 return gdbarch->frame_args_skip; 02847 } 02848 02849 void 02850 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, 02851 CORE_ADDR frame_args_skip) 02852 { 02853 gdbarch->frame_args_skip = frame_args_skip; 02854 } 02855 02856 int 02857 gdbarch_unwind_pc_p (struct gdbarch *gdbarch) 02858 { 02859 gdb_assert (gdbarch != NULL); 02860 return gdbarch->unwind_pc != NULL; 02861 } 02862 02863 CORE_ADDR 02864 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) 02865 { 02866 gdb_assert (gdbarch != NULL); 02867 gdb_assert (gdbarch->unwind_pc != NULL); 02868 if (gdbarch_debug >= 2) 02869 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n"); 02870 return gdbarch->unwind_pc (gdbarch, next_frame); 02871 } 02872 02873 void 02874 set_gdbarch_unwind_pc (struct gdbarch *gdbarch, 02875 gdbarch_unwind_pc_ftype unwind_pc) 02876 { 02877 gdbarch->unwind_pc = unwind_pc; 02878 } 02879 02880 int 02881 gdbarch_unwind_sp_p (struct gdbarch *gdbarch) 02882 { 02883 gdb_assert (gdbarch != NULL); 02884 return gdbarch->unwind_sp != NULL; 02885 } 02886 02887 CORE_ADDR 02888 gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) 02889 { 02890 gdb_assert (gdbarch != NULL); 02891 gdb_assert (gdbarch->unwind_sp != NULL); 02892 if (gdbarch_debug >= 2) 02893 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n"); 02894 return gdbarch->unwind_sp (gdbarch, next_frame); 02895 } 02896 02897 void 02898 set_gdbarch_unwind_sp (struct gdbarch *gdbarch, 02899 gdbarch_unwind_sp_ftype unwind_sp) 02900 { 02901 gdbarch->unwind_sp = unwind_sp; 02902 } 02903 02904 int 02905 gdbarch_frame_num_args_p (struct gdbarch *gdbarch) 02906 { 02907 gdb_assert (gdbarch != NULL); 02908 return gdbarch->frame_num_args != NULL; 02909 } 02910 02911 int 02912 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) 02913 { 02914 gdb_assert (gdbarch != NULL); 02915 gdb_assert (gdbarch->frame_num_args != NULL); 02916 if (gdbarch_debug >= 2) 02917 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); 02918 return gdbarch->frame_num_args (frame); 02919 } 02920 02921 void 02922 set_gdbarch_frame_num_args (struct gdbarch *gdbarch, 02923 gdbarch_frame_num_args_ftype frame_num_args) 02924 { 02925 gdbarch->frame_num_args = frame_num_args; 02926 } 02927 02928 int 02929 gdbarch_frame_align_p (struct gdbarch *gdbarch) 02930 { 02931 gdb_assert (gdbarch != NULL); 02932 return gdbarch->frame_align != NULL; 02933 } 02934 02935 CORE_ADDR 02936 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) 02937 { 02938 gdb_assert (gdbarch != NULL); 02939 gdb_assert (gdbarch->frame_align != NULL); 02940 if (gdbarch_debug >= 2) 02941 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n"); 02942 return gdbarch->frame_align (gdbarch, address); 02943 } 02944 02945 void 02946 set_gdbarch_frame_align (struct gdbarch *gdbarch, 02947 gdbarch_frame_align_ftype frame_align) 02948 { 02949 gdbarch->frame_align = frame_align; 02950 } 02951 02952 int 02953 gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) 02954 { 02955 gdb_assert (gdbarch != NULL); 02956 gdb_assert (gdbarch->stabs_argument_has_addr != NULL); 02957 if (gdbarch_debug >= 2) 02958 fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n"); 02959 return gdbarch->stabs_argument_has_addr (gdbarch, type); 02960 } 02961 02962 void 02963 set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, 02964 gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr) 02965 { 02966 gdbarch->stabs_argument_has_addr = stabs_argument_has_addr; 02967 } 02968 02969 int 02970 gdbarch_frame_red_zone_size (struct gdbarch *gdbarch) 02971 { 02972 gdb_assert (gdbarch != NULL); 02973 if (gdbarch_debug >= 2) 02974 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n"); 02975 return gdbarch->frame_red_zone_size; 02976 } 02977 02978 void 02979 set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, 02980 int frame_red_zone_size) 02981 { 02982 gdbarch->frame_red_zone_size = frame_red_zone_size; 02983 } 02984 02985 CORE_ADDR 02986 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ) 02987 { 02988 gdb_assert (gdbarch != NULL); 02989 gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL); 02990 if (gdbarch_debug >= 2) 02991 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); 02992 return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ); 02993 } 02994 02995 void 02996 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, 02997 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) 02998 { 02999 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; 03000 } 03001 03002 CORE_ADDR 03003 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) 03004 { 03005 gdb_assert (gdbarch != NULL); 03006 gdb_assert (gdbarch->addr_bits_remove != NULL); 03007 if (gdbarch_debug >= 2) 03008 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); 03009 return gdbarch->addr_bits_remove (gdbarch, addr); 03010 } 03011 03012 void 03013 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, 03014 gdbarch_addr_bits_remove_ftype addr_bits_remove) 03015 { 03016 gdbarch->addr_bits_remove = addr_bits_remove; 03017 } 03018 03019 int 03020 gdbarch_software_single_step_p (struct gdbarch *gdbarch) 03021 { 03022 gdb_assert (gdbarch != NULL); 03023 return gdbarch->software_single_step != NULL; 03024 } 03025 03026 int 03027 gdbarch_software_single_step (struct gdbarch *gdbarch, struct frame_info *frame) 03028 { 03029 gdb_assert (gdbarch != NULL); 03030 gdb_assert (gdbarch->software_single_step != NULL); 03031 if (gdbarch_debug >= 2) 03032 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); 03033 return gdbarch->software_single_step (frame); 03034 } 03035 03036 void 03037 set_gdbarch_software_single_step (struct gdbarch *gdbarch, 03038 gdbarch_software_single_step_ftype software_single_step) 03039 { 03040 gdbarch->software_single_step = software_single_step; 03041 } 03042 03043 int 03044 gdbarch_single_step_through_delay_p (struct gdbarch *gdbarch) 03045 { 03046 gdb_assert (gdbarch != NULL); 03047 return gdbarch->single_step_through_delay != NULL; 03048 } 03049 03050 int 03051 gdbarch_single_step_through_delay (struct gdbarch *gdbarch, struct frame_info *frame) 03052 { 03053 gdb_assert (gdbarch != NULL); 03054 gdb_assert (gdbarch->single_step_through_delay != NULL); 03055 if (gdbarch_debug >= 2) 03056 fprintf_unfiltered (gdb_stdlog, "gdbarch_single_step_through_delay called\n"); 03057 return gdbarch->single_step_through_delay (gdbarch, frame); 03058 } 03059 03060 void 03061 set_gdbarch_single_step_through_delay (struct gdbarch *gdbarch, 03062 gdbarch_single_step_through_delay_ftype single_step_through_delay) 03063 { 03064 gdbarch->single_step_through_delay = single_step_through_delay; 03065 } 03066 03067 int 03068 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info) 03069 { 03070 gdb_assert (gdbarch != NULL); 03071 gdb_assert (gdbarch->print_insn != NULL); 03072 if (gdbarch_debug >= 2) 03073 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); 03074 return gdbarch->print_insn (vma, info); 03075 } 03076 03077 void 03078 set_gdbarch_print_insn (struct gdbarch *gdbarch, 03079 gdbarch_print_insn_ftype print_insn) 03080 { 03081 gdbarch->print_insn = print_insn; 03082 } 03083 03084 CORE_ADDR 03085 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc) 03086 { 03087 gdb_assert (gdbarch != NULL); 03088 gdb_assert (gdbarch->skip_trampoline_code != NULL); 03089 if (gdbarch_debug >= 2) 03090 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); 03091 return gdbarch->skip_trampoline_code (frame, pc); 03092 } 03093 03094 void 03095 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, 03096 gdbarch_skip_trampoline_code_ftype skip_trampoline_code) 03097 { 03098 gdbarch->skip_trampoline_code = skip_trampoline_code; 03099 } 03100 03101 CORE_ADDR 03102 gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc) 03103 { 03104 gdb_assert (gdbarch != NULL); 03105 gdb_assert (gdbarch->skip_solib_resolver != NULL); 03106 if (gdbarch_debug >= 2) 03107 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n"); 03108 return gdbarch->skip_solib_resolver (gdbarch, pc); 03109 } 03110 03111 void 03112 set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, 03113 gdbarch_skip_solib_resolver_ftype skip_solib_resolver) 03114 { 03115 gdbarch->skip_solib_resolver = skip_solib_resolver; 03116 } 03117 03118 int 03119 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, const char *name) 03120 { 03121 gdb_assert (gdbarch != NULL); 03122 gdb_assert (gdbarch->in_solib_return_trampoline != NULL); 03123 if (gdbarch_debug >= 2) 03124 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); 03125 return gdbarch->in_solib_return_trampoline (gdbarch, pc, name); 03126 } 03127 03128 void 03129 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, 03130 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline) 03131 { 03132 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; 03133 } 03134 03135 int 03136 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) 03137 { 03138 gdb_assert (gdbarch != NULL); 03139 gdb_assert (gdbarch->in_function_epilogue_p != NULL); 03140 if (gdbarch_debug >= 2) 03141 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); 03142 return gdbarch->in_function_epilogue_p (gdbarch, addr); 03143 } 03144 03145 void 03146 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, 03147 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) 03148 { 03149 gdbarch->in_function_epilogue_p = in_function_epilogue_p; 03150 } 03151 03152 void 03153 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym) 03154 { 03155 gdb_assert (gdbarch != NULL); 03156 gdb_assert (gdbarch->elf_make_msymbol_special != NULL); 03157 if (gdbarch_debug >= 2) 03158 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); 03159 gdbarch->elf_make_msymbol_special (sym, msym); 03160 } 03161 03162 void 03163 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, 03164 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special) 03165 { 03166 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special; 03167 } 03168 03169 void 03170 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym) 03171 { 03172 gdb_assert (gdbarch != NULL); 03173 gdb_assert (gdbarch->coff_make_msymbol_special != NULL); 03174 if (gdbarch_debug >= 2) 03175 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); 03176 gdbarch->coff_make_msymbol_special (val, msym); 03177 } 03178 03179 void 03180 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, 03181 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special) 03182 { 03183 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special; 03184 } 03185 03186 int 03187 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) 03188 { 03189 gdb_assert (gdbarch != NULL); 03190 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ 03191 if (gdbarch_debug >= 2) 03192 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); 03193 return gdbarch->cannot_step_breakpoint; 03194 } 03195 03196 void 03197 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, 03198 int cannot_step_breakpoint) 03199 { 03200 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint; 03201 } 03202 03203 int 03204 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) 03205 { 03206 gdb_assert (gdbarch != NULL); 03207 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ 03208 if (gdbarch_debug >= 2) 03209 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); 03210 return gdbarch->have_nonsteppable_watchpoint; 03211 } 03212 03213 void 03214 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, 03215 int have_nonsteppable_watchpoint) 03216 { 03217 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint; 03218 } 03219 03220 int 03221 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch) 03222 { 03223 gdb_assert (gdbarch != NULL); 03224 return gdbarch->address_class_type_flags != NULL; 03225 } 03226 03227 int 03228 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class) 03229 { 03230 gdb_assert (gdbarch != NULL); 03231 gdb_assert (gdbarch->address_class_type_flags != NULL); 03232 if (gdbarch_debug >= 2) 03233 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); 03234 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class); 03235 } 03236 03237 void 03238 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, 03239 gdbarch_address_class_type_flags_ftype address_class_type_flags) 03240 { 03241 gdbarch->address_class_type_flags = address_class_type_flags; 03242 } 03243 03244 int 03245 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch) 03246 { 03247 gdb_assert (gdbarch != NULL); 03248 return gdbarch->address_class_type_flags_to_name != NULL; 03249 } 03250 03251 const char * 03252 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags) 03253 { 03254 gdb_assert (gdbarch != NULL); 03255 gdb_assert (gdbarch->address_class_type_flags_to_name != NULL); 03256 if (gdbarch_debug >= 2) 03257 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); 03258 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags); 03259 } 03260 03261 void 03262 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, 03263 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name) 03264 { 03265 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name; 03266 } 03267 03268 int 03269 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch) 03270 { 03271 gdb_assert (gdbarch != NULL); 03272 return gdbarch->address_class_name_to_type_flags != NULL; 03273 } 03274 03275 int 03276 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr) 03277 { 03278 gdb_assert (gdbarch != NULL); 03279 gdb_assert (gdbarch->address_class_name_to_type_flags != NULL); 03280 if (gdbarch_debug >= 2) 03281 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); 03282 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr); 03283 } 03284 03285 void 03286 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, 03287 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags) 03288 { 03289 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags; 03290 } 03291 03292 int 03293 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup) 03294 { 03295 gdb_assert (gdbarch != NULL); 03296 gdb_assert (gdbarch->register_reggroup_p != NULL); 03297 if (gdbarch_debug >= 2) 03298 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); 03299 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup); 03300 } 03301 03302 void 03303 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, 03304 gdbarch_register_reggroup_p_ftype register_reggroup_p) 03305 { 03306 gdbarch->register_reggroup_p = register_reggroup_p; 03307 } 03308 03309 int 03310 gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch) 03311 { 03312 gdb_assert (gdbarch != NULL); 03313 return gdbarch->fetch_pointer_argument != NULL; 03314 } 03315 03316 CORE_ADDR 03317 gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type) 03318 { 03319 gdb_assert (gdbarch != NULL); 03320 gdb_assert (gdbarch->fetch_pointer_argument != NULL); 03321 if (gdbarch_debug >= 2) 03322 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n"); 03323 return gdbarch->fetch_pointer_argument (frame, argi, type); 03324 } 03325 03326 void 03327 set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, 03328 gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument) 03329 { 03330 gdbarch->fetch_pointer_argument = fetch_pointer_argument; 03331 } 03332 03333 int 03334 gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch) 03335 { 03336 gdb_assert (gdbarch != NULL); 03337 return gdbarch->regset_from_core_section != NULL; 03338 } 03339 03340 const struct regset * 03341 gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) 03342 { 03343 gdb_assert (gdbarch != NULL); 03344 gdb_assert (gdbarch->regset_from_core_section != NULL); 03345 if (gdbarch_debug >= 2) 03346 fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n"); 03347 return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size); 03348 } 03349 03350 void 03351 set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, 03352 gdbarch_regset_from_core_section_ftype regset_from_core_section) 03353 { 03354 gdbarch->regset_from_core_section = regset_from_core_section; 03355 } 03356 03357 struct core_regset_section * 03358 gdbarch_core_regset_sections (struct gdbarch *gdbarch) 03359 { 03360 gdb_assert (gdbarch != NULL); 03361 if (gdbarch_debug >= 2) 03362 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_regset_sections called\n"); 03363 return gdbarch->core_regset_sections; 03364 } 03365 03366 void 03367 set_gdbarch_core_regset_sections (struct gdbarch *gdbarch, 03368 struct core_regset_section * core_regset_sections) 03369 { 03370 gdbarch->core_regset_sections = core_regset_sections; 03371 } 03372 03373 int 03374 gdbarch_make_corefile_notes_p (struct gdbarch *gdbarch) 03375 { 03376 gdb_assert (gdbarch != NULL); 03377 return gdbarch->make_corefile_notes != NULL; 03378 } 03379 03380 char * 03381 gdbarch_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size) 03382 { 03383 gdb_assert (gdbarch != NULL); 03384 gdb_assert (gdbarch->make_corefile_notes != NULL); 03385 if (gdbarch_debug >= 2) 03386 fprintf_unfiltered (gdb_stdlog, "gdbarch_make_corefile_notes called\n"); 03387 return gdbarch->make_corefile_notes (gdbarch, obfd, note_size); 03388 } 03389 03390 void 03391 set_gdbarch_make_corefile_notes (struct gdbarch *gdbarch, 03392 gdbarch_make_corefile_notes_ftype make_corefile_notes) 03393 { 03394 gdbarch->make_corefile_notes = make_corefile_notes; 03395 } 03396 03397 int 03398 gdbarch_elfcore_write_linux_prpsinfo_p (struct gdbarch *gdbarch) 03399 { 03400 gdb_assert (gdbarch != NULL); 03401 return gdbarch->elfcore_write_linux_prpsinfo != NULL; 03402 } 03403 03404 char * 03405 gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size, const struct elf_internal_linux_prpsinfo *info) 03406 { 03407 gdb_assert (gdbarch != NULL); 03408 gdb_assert (gdbarch->elfcore_write_linux_prpsinfo != NULL); 03409 if (gdbarch_debug >= 2) 03410 fprintf_unfiltered (gdb_stdlog, "gdbarch_elfcore_write_linux_prpsinfo called\n"); 03411 return gdbarch->elfcore_write_linux_prpsinfo (obfd, note_data, note_size, info); 03412 } 03413 03414 void 03415 set_gdbarch_elfcore_write_linux_prpsinfo (struct gdbarch *gdbarch, 03416 gdbarch_elfcore_write_linux_prpsinfo_ftype elfcore_write_linux_prpsinfo) 03417 { 03418 gdbarch->elfcore_write_linux_prpsinfo = elfcore_write_linux_prpsinfo; 03419 } 03420 03421 int 03422 gdbarch_find_memory_regions_p (struct gdbarch *gdbarch) 03423 { 03424 gdb_assert (gdbarch != NULL); 03425 return gdbarch->find_memory_regions != NULL; 03426 } 03427 03428 int 03429 gdbarch_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *data) 03430 { 03431 gdb_assert (gdbarch != NULL); 03432 gdb_assert (gdbarch->find_memory_regions != NULL); 03433 if (gdbarch_debug >= 2) 03434 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_memory_regions called\n"); 03435 return gdbarch->find_memory_regions (gdbarch, func, data); 03436 } 03437 03438 void 03439 set_gdbarch_find_memory_regions (struct gdbarch *gdbarch, 03440 gdbarch_find_memory_regions_ftype find_memory_regions) 03441 { 03442 gdbarch->find_memory_regions = find_memory_regions; 03443 } 03444 03445 int 03446 gdbarch_core_xfer_shared_libraries_p (struct gdbarch *gdbarch) 03447 { 03448 gdb_assert (gdbarch != NULL); 03449 return gdbarch->core_xfer_shared_libraries != NULL; 03450 } 03451 03452 LONGEST 03453 gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len) 03454 { 03455 gdb_assert (gdbarch != NULL); 03456 gdb_assert (gdbarch->core_xfer_shared_libraries != NULL); 03457 if (gdbarch_debug >= 2) 03458 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries called\n"); 03459 return gdbarch->core_xfer_shared_libraries (gdbarch, readbuf, offset, len); 03460 } 03461 03462 void 03463 set_gdbarch_core_xfer_shared_libraries (struct gdbarch *gdbarch, 03464 gdbarch_core_xfer_shared_libraries_ftype core_xfer_shared_libraries) 03465 { 03466 gdbarch->core_xfer_shared_libraries = core_xfer_shared_libraries; 03467 } 03468 03469 int 03470 gdbarch_core_xfer_shared_libraries_aix_p (struct gdbarch *gdbarch) 03471 { 03472 gdb_assert (gdbarch != NULL); 03473 return gdbarch->core_xfer_shared_libraries_aix != NULL; 03474 } 03475 03476 LONGEST 03477 gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, LONGEST len) 03478 { 03479 gdb_assert (gdbarch != NULL); 03480 gdb_assert (gdbarch->core_xfer_shared_libraries_aix != NULL); 03481 if (gdbarch_debug >= 2) 03482 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_xfer_shared_libraries_aix called\n"); 03483 return gdbarch->core_xfer_shared_libraries_aix (gdbarch, readbuf, offset, len); 03484 } 03485 03486 void 03487 set_gdbarch_core_xfer_shared_libraries_aix (struct gdbarch *gdbarch, 03488 gdbarch_core_xfer_shared_libraries_aix_ftype core_xfer_shared_libraries_aix) 03489 { 03490 gdbarch->core_xfer_shared_libraries_aix = core_xfer_shared_libraries_aix; 03491 } 03492 03493 int 03494 gdbarch_core_pid_to_str_p (struct gdbarch *gdbarch) 03495 { 03496 gdb_assert (gdbarch != NULL); 03497 return gdbarch->core_pid_to_str != NULL; 03498 } 03499 03500 char * 03501 gdbarch_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid) 03502 { 03503 gdb_assert (gdbarch != NULL); 03504 gdb_assert (gdbarch->core_pid_to_str != NULL); 03505 if (gdbarch_debug >= 2) 03506 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_pid_to_str called\n"); 03507 return gdbarch->core_pid_to_str (gdbarch, ptid); 03508 } 03509 03510 void 03511 set_gdbarch_core_pid_to_str (struct gdbarch *gdbarch, 03512 gdbarch_core_pid_to_str_ftype core_pid_to_str) 03513 { 03514 gdbarch->core_pid_to_str = core_pid_to_str; 03515 } 03516 03517 int 03518 gdbarch_gcore_bfd_target_p (struct gdbarch *gdbarch) 03519 { 03520 gdb_assert (gdbarch != NULL); 03521 return gdbarch->gcore_bfd_target != 0; 03522 } 03523 03524 const char * 03525 gdbarch_gcore_bfd_target (struct gdbarch *gdbarch) 03526 { 03527 gdb_assert (gdbarch != NULL); 03528 /* Check variable changed from pre-default. */ 03529 gdb_assert (gdbarch->gcore_bfd_target != 0); 03530 if (gdbarch_debug >= 2) 03531 fprintf_unfiltered (gdb_stdlog, "gdbarch_gcore_bfd_target called\n"); 03532 return gdbarch->gcore_bfd_target; 03533 } 03534 03535 void 03536 set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch, 03537 const char * gcore_bfd_target) 03538 { 03539 gdbarch->gcore_bfd_target = gcore_bfd_target; 03540 } 03541 03542 int 03543 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch) 03544 { 03545 gdb_assert (gdbarch != NULL); 03546 /* Skip verify of vtable_function_descriptors, invalid_p == 0 */ 03547 if (gdbarch_debug >= 2) 03548 fprintf_unfiltered (gdb_stdlog, "gdbarch_vtable_function_descriptors called\n"); 03549 return gdbarch->vtable_function_descriptors; 03550 } 03551 03552 void 03553 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch, 03554 int vtable_function_descriptors) 03555 { 03556 gdbarch->vtable_function_descriptors = vtable_function_descriptors; 03557 } 03558 03559 int 03560 gdbarch_vbit_in_delta (struct gdbarch *gdbarch) 03561 { 03562 gdb_assert (gdbarch != NULL); 03563 /* Skip verify of vbit_in_delta, invalid_p == 0 */ 03564 if (gdbarch_debug >= 2) 03565 fprintf_unfiltered (gdb_stdlog, "gdbarch_vbit_in_delta called\n"); 03566 return gdbarch->vbit_in_delta; 03567 } 03568 03569 void 03570 set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch, 03571 int vbit_in_delta) 03572 { 03573 gdbarch->vbit_in_delta = vbit_in_delta; 03574 } 03575 03576 int 03577 gdbarch_skip_permanent_breakpoint_p (struct gdbarch *gdbarch) 03578 { 03579 gdb_assert (gdbarch != NULL); 03580 return gdbarch->skip_permanent_breakpoint != NULL; 03581 } 03582 03583 void 03584 gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache) 03585 { 03586 gdb_assert (gdbarch != NULL); 03587 gdb_assert (gdbarch->skip_permanent_breakpoint != NULL); 03588 if (gdbarch_debug >= 2) 03589 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n"); 03590 gdbarch->skip_permanent_breakpoint (regcache); 03591 } 03592 03593 void 03594 set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, 03595 gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint) 03596 { 03597 gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint; 03598 } 03599 03600 int 03601 gdbarch_max_insn_length_p (struct gdbarch *gdbarch) 03602 { 03603 gdb_assert (gdbarch != NULL); 03604 return gdbarch->max_insn_length != 0; 03605 } 03606 03607 ULONGEST 03608 gdbarch_max_insn_length (struct gdbarch *gdbarch) 03609 { 03610 gdb_assert (gdbarch != NULL); 03611 /* Check variable changed from pre-default. */ 03612 gdb_assert (gdbarch->max_insn_length != 0); 03613 if (gdbarch_debug >= 2) 03614 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_insn_length called\n"); 03615 return gdbarch->max_insn_length; 03616 } 03617 03618 void 03619 set_gdbarch_max_insn_length (struct gdbarch *gdbarch, 03620 ULONGEST max_insn_length) 03621 { 03622 gdbarch->max_insn_length = max_insn_length; 03623 } 03624 03625 int 03626 gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch) 03627 { 03628 gdb_assert (gdbarch != NULL); 03629 return gdbarch->displaced_step_copy_insn != NULL; 03630 } 03631 03632 struct displaced_step_closure * 03633 gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) 03634 { 03635 gdb_assert (gdbarch != NULL); 03636 gdb_assert (gdbarch->displaced_step_copy_insn != NULL); 03637 if (gdbarch_debug >= 2) 03638 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_copy_insn called\n"); 03639 return gdbarch->displaced_step_copy_insn (gdbarch, from, to, regs); 03640 } 03641 03642 void 03643 set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, 03644 gdbarch_displaced_step_copy_insn_ftype displaced_step_copy_insn) 03645 { 03646 gdbarch->displaced_step_copy_insn = displaced_step_copy_insn; 03647 } 03648 03649 int 03650 gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure) 03651 { 03652 gdb_assert (gdbarch != NULL); 03653 gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL); 03654 if (gdbarch_debug >= 2) 03655 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n"); 03656 return gdbarch->displaced_step_hw_singlestep (gdbarch, closure); 03657 } 03658 03659 void 03660 set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, 03661 gdbarch_displaced_step_hw_singlestep_ftype displaced_step_hw_singlestep) 03662 { 03663 gdbarch->displaced_step_hw_singlestep = displaced_step_hw_singlestep; 03664 } 03665 03666 int 03667 gdbarch_displaced_step_fixup_p (struct gdbarch *gdbarch) 03668 { 03669 gdb_assert (gdbarch != NULL); 03670 return gdbarch->displaced_step_fixup != NULL; 03671 } 03672 03673 void 03674 gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, struct displaced_step_closure *closure, CORE_ADDR from, CORE_ADDR to, struct regcache *regs) 03675 { 03676 gdb_assert (gdbarch != NULL); 03677 gdb_assert (gdbarch->displaced_step_fixup != NULL); 03678 /* Do not check predicate: gdbarch->displaced_step_fixup != NULL, allow call. */ 03679 if (gdbarch_debug >= 2) 03680 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_fixup called\n"); 03681 gdbarch->displaced_step_fixup (gdbarch, closure, from, to, regs); 03682 } 03683 03684 void 03685 set_gdbarch_displaced_step_fixup (struct gdbarch *gdbarch, 03686 gdbarch_displaced_step_fixup_ftype displaced_step_fixup) 03687 { 03688 gdbarch->displaced_step_fixup = displaced_step_fixup; 03689 } 03690 03691 void 03692 gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, struct displaced_step_closure *closure) 03693 { 03694 gdb_assert (gdbarch != NULL); 03695 gdb_assert (gdbarch->displaced_step_free_closure != NULL); 03696 if (gdbarch_debug >= 2) 03697 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_free_closure called\n"); 03698 gdbarch->displaced_step_free_closure (gdbarch, closure); 03699 } 03700 03701 void 03702 set_gdbarch_displaced_step_free_closure (struct gdbarch *gdbarch, 03703 gdbarch_displaced_step_free_closure_ftype displaced_step_free_closure) 03704 { 03705 gdbarch->displaced_step_free_closure = displaced_step_free_closure; 03706 } 03707 03708 CORE_ADDR 03709 gdbarch_displaced_step_location (struct gdbarch *gdbarch) 03710 { 03711 gdb_assert (gdbarch != NULL); 03712 gdb_assert (gdbarch->displaced_step_location != NULL); 03713 if (gdbarch_debug >= 2) 03714 fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_location called\n"); 03715 return gdbarch->displaced_step_location (gdbarch); 03716 } 03717 03718 void 03719 set_gdbarch_displaced_step_location (struct gdbarch *gdbarch, 03720 gdbarch_displaced_step_location_ftype displaced_step_location) 03721 { 03722 gdbarch->displaced_step_location = displaced_step_location; 03723 } 03724 03725 int 03726 gdbarch_relocate_instruction_p (struct gdbarch *gdbarch) 03727 { 03728 gdb_assert (gdbarch != NULL); 03729 return gdbarch->relocate_instruction != NULL; 03730 } 03731 03732 void 03733 gdbarch_relocate_instruction (struct gdbarch *gdbarch, CORE_ADDR *to, CORE_ADDR from) 03734 { 03735 gdb_assert (gdbarch != NULL); 03736 gdb_assert (gdbarch->relocate_instruction != NULL); 03737 /* Do not check predicate: gdbarch->relocate_instruction != NULL, allow call. */ 03738 if (gdbarch_debug >= 2) 03739 fprintf_unfiltered (gdb_stdlog, "gdbarch_relocate_instruction called\n"); 03740 gdbarch->relocate_instruction (gdbarch, to, from); 03741 } 03742 03743 void 03744 set_gdbarch_relocate_instruction (struct gdbarch *gdbarch, 03745 gdbarch_relocate_instruction_ftype relocate_instruction) 03746 { 03747 gdbarch->relocate_instruction = relocate_instruction; 03748 } 03749 03750 int 03751 gdbarch_overlay_update_p (struct gdbarch *gdbarch) 03752 { 03753 gdb_assert (gdbarch != NULL); 03754 return gdbarch->overlay_update != NULL; 03755 } 03756 03757 void 03758 gdbarch_overlay_update (struct gdbarch *gdbarch, struct obj_section *osect) 03759 { 03760 gdb_assert (gdbarch != NULL); 03761 gdb_assert (gdbarch->overlay_update != NULL); 03762 if (gdbarch_debug >= 2) 03763 fprintf_unfiltered (gdb_stdlog, "gdbarch_overlay_update called\n"); 03764 gdbarch->overlay_update (osect); 03765 } 03766 03767 void 03768 set_gdbarch_overlay_update (struct gdbarch *gdbarch, 03769 gdbarch_overlay_update_ftype overlay_update) 03770 { 03771 gdbarch->overlay_update = overlay_update; 03772 } 03773 03774 int 03775 gdbarch_core_read_description_p (struct gdbarch *gdbarch) 03776 { 03777 gdb_assert (gdbarch != NULL); 03778 return gdbarch->core_read_description != NULL; 03779 } 03780 03781 const struct target_desc * 03782 gdbarch_core_read_description (struct gdbarch *gdbarch, struct target_ops *target, bfd *abfd) 03783 { 03784 gdb_assert (gdbarch != NULL); 03785 gdb_assert (gdbarch->core_read_description != NULL); 03786 if (gdbarch_debug >= 2) 03787 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_read_description called\n"); 03788 return gdbarch->core_read_description (gdbarch, target, abfd); 03789 } 03790 03791 void 03792 set_gdbarch_core_read_description (struct gdbarch *gdbarch, 03793 gdbarch_core_read_description_ftype core_read_description) 03794 { 03795 gdbarch->core_read_description = core_read_description; 03796 } 03797 03798 int 03799 gdbarch_static_transform_name_p (struct gdbarch *gdbarch) 03800 { 03801 gdb_assert (gdbarch != NULL); 03802 return gdbarch->static_transform_name != NULL; 03803 } 03804 03805 const char * 03806 gdbarch_static_transform_name (struct gdbarch *gdbarch, const char *name) 03807 { 03808 gdb_assert (gdbarch != NULL); 03809 gdb_assert (gdbarch->static_transform_name != NULL); 03810 if (gdbarch_debug >= 2) 03811 fprintf_unfiltered (gdb_stdlog, "gdbarch_static_transform_name called\n"); 03812 return gdbarch->static_transform_name (name); 03813 } 03814 03815 void 03816 set_gdbarch_static_transform_name (struct gdbarch *gdbarch, 03817 gdbarch_static_transform_name_ftype static_transform_name) 03818 { 03819 gdbarch->static_transform_name = static_transform_name; 03820 } 03821 03822 int 03823 gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch) 03824 { 03825 gdb_assert (gdbarch != NULL); 03826 /* Skip verify of sofun_address_maybe_missing, invalid_p == 0 */ 03827 if (gdbarch_debug >= 2) 03828 fprintf_unfiltered (gdb_stdlog, "gdbarch_sofun_address_maybe_missing called\n"); 03829 return gdbarch->sofun_address_maybe_missing; 03830 } 03831 03832 void 03833 set_gdbarch_sofun_address_maybe_missing (struct gdbarch *gdbarch, 03834 int sofun_address_maybe_missing) 03835 { 03836 gdbarch->sofun_address_maybe_missing = sofun_address_maybe_missing; 03837 } 03838 03839 int 03840 gdbarch_process_record_p (struct gdbarch *gdbarch) 03841 { 03842 gdb_assert (gdbarch != NULL); 03843 return gdbarch->process_record != NULL; 03844 } 03845 03846 int 03847 gdbarch_process_record (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR addr) 03848 { 03849 gdb_assert (gdbarch != NULL); 03850 gdb_assert (gdbarch->process_record != NULL); 03851 if (gdbarch_debug >= 2) 03852 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record called\n"); 03853 return gdbarch->process_record (gdbarch, regcache, addr); 03854 } 03855 03856 void 03857 set_gdbarch_process_record (struct gdbarch *gdbarch, 03858 gdbarch_process_record_ftype process_record) 03859 { 03860 gdbarch->process_record = process_record; 03861 } 03862 03863 int 03864 gdbarch_process_record_signal_p (struct gdbarch *gdbarch) 03865 { 03866 gdb_assert (gdbarch != NULL); 03867 return gdbarch->process_record_signal != NULL; 03868 } 03869 03870 int 03871 gdbarch_process_record_signal (struct gdbarch *gdbarch, struct regcache *regcache, enum gdb_signal signal) 03872 { 03873 gdb_assert (gdbarch != NULL); 03874 gdb_assert (gdbarch->process_record_signal != NULL); 03875 if (gdbarch_debug >= 2) 03876 fprintf_unfiltered (gdb_stdlog, "gdbarch_process_record_signal called\n"); 03877 return gdbarch->process_record_signal (gdbarch, regcache, signal); 03878 } 03879 03880 void 03881 set_gdbarch_process_record_signal (struct gdbarch *gdbarch, 03882 gdbarch_process_record_signal_ftype process_record_signal) 03883 { 03884 gdbarch->process_record_signal = process_record_signal; 03885 } 03886 03887 int 03888 gdbarch_gdb_signal_from_target_p (struct gdbarch *gdbarch) 03889 { 03890 gdb_assert (gdbarch != NULL); 03891 return gdbarch->gdb_signal_from_target != NULL; 03892 } 03893 03894 enum gdb_signal 03895 gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, int signo) 03896 { 03897 gdb_assert (gdbarch != NULL); 03898 gdb_assert (gdbarch->gdb_signal_from_target != NULL); 03899 if (gdbarch_debug >= 2) 03900 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_from_target called\n"); 03901 return gdbarch->gdb_signal_from_target (gdbarch, signo); 03902 } 03903 03904 void 03905 set_gdbarch_gdb_signal_from_target (struct gdbarch *gdbarch, 03906 gdbarch_gdb_signal_from_target_ftype gdb_signal_from_target) 03907 { 03908 gdbarch->gdb_signal_from_target = gdb_signal_from_target; 03909 } 03910 03911 int 03912 gdbarch_gdb_signal_to_target_p (struct gdbarch *gdbarch) 03913 { 03914 gdb_assert (gdbarch != NULL); 03915 return gdbarch->gdb_signal_to_target != NULL; 03916 } 03917 03918 int 03919 gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal) 03920 { 03921 gdb_assert (gdbarch != NULL); 03922 gdb_assert (gdbarch->gdb_signal_to_target != NULL); 03923 if (gdbarch_debug >= 2) 03924 fprintf_unfiltered (gdb_stdlog, "gdbarch_gdb_signal_to_target called\n"); 03925 return gdbarch->gdb_signal_to_target (gdbarch, signal); 03926 } 03927 03928 void 03929 set_gdbarch_gdb_signal_to_target (struct gdbarch *gdbarch, 03930 gdbarch_gdb_signal_to_target_ftype gdb_signal_to_target) 03931 { 03932 gdbarch->gdb_signal_to_target = gdb_signal_to_target; 03933 } 03934 03935 int 03936 gdbarch_get_siginfo_type_p (struct gdbarch *gdbarch) 03937 { 03938 gdb_assert (gdbarch != NULL); 03939 return gdbarch->get_siginfo_type != NULL; 03940 } 03941 03942 struct type * 03943 gdbarch_get_siginfo_type (struct gdbarch *gdbarch) 03944 { 03945 gdb_assert (gdbarch != NULL); 03946 gdb_assert (gdbarch->get_siginfo_type != NULL); 03947 if (gdbarch_debug >= 2) 03948 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_siginfo_type called\n"); 03949 return gdbarch->get_siginfo_type (gdbarch); 03950 } 03951 03952 void 03953 set_gdbarch_get_siginfo_type (struct gdbarch *gdbarch, 03954 gdbarch_get_siginfo_type_ftype get_siginfo_type) 03955 { 03956 gdbarch->get_siginfo_type = get_siginfo_type; 03957 } 03958 03959 int 03960 gdbarch_record_special_symbol_p (struct gdbarch *gdbarch) 03961 { 03962 gdb_assert (gdbarch != NULL); 03963 return gdbarch->record_special_symbol != NULL; 03964 } 03965 03966 void 03967 gdbarch_record_special_symbol (struct gdbarch *gdbarch, struct objfile *objfile, asymbol *sym) 03968 { 03969 gdb_assert (gdbarch != NULL); 03970 gdb_assert (gdbarch->record_special_symbol != NULL); 03971 if (gdbarch_debug >= 2) 03972 fprintf_unfiltered (gdb_stdlog, "gdbarch_record_special_symbol called\n"); 03973 gdbarch->record_special_symbol (gdbarch, objfile, sym); 03974 } 03975 03976 void 03977 set_gdbarch_record_special_symbol (struct gdbarch *gdbarch, 03978 gdbarch_record_special_symbol_ftype record_special_symbol) 03979 { 03980 gdbarch->record_special_symbol = record_special_symbol; 03981 } 03982 03983 int 03984 gdbarch_get_syscall_number_p (struct gdbarch *gdbarch) 03985 { 03986 gdb_assert (gdbarch != NULL); 03987 return gdbarch->get_syscall_number != NULL; 03988 } 03989 03990 LONGEST 03991 gdbarch_get_syscall_number (struct gdbarch *gdbarch, ptid_t ptid) 03992 { 03993 gdb_assert (gdbarch != NULL); 03994 gdb_assert (gdbarch->get_syscall_number != NULL); 03995 if (gdbarch_debug >= 2) 03996 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_syscall_number called\n"); 03997 return gdbarch->get_syscall_number (gdbarch, ptid); 03998 } 03999 04000 void 04001 set_gdbarch_get_syscall_number (struct gdbarch *gdbarch, 04002 gdbarch_get_syscall_number_ftype get_syscall_number) 04003 { 04004 gdbarch->get_syscall_number = get_syscall_number; 04005 } 04006 04007 const char * 04008 gdbarch_stap_integer_prefix (struct gdbarch *gdbarch) 04009 { 04010 gdb_assert (gdbarch != NULL); 04011 /* Skip verify of stap_integer_prefix, invalid_p == 0 */ 04012 if (gdbarch_debug >= 2) 04013 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_prefix called\n"); 04014 return gdbarch->stap_integer_prefix; 04015 } 04016 04017 void 04018 set_gdbarch_stap_integer_prefix (struct gdbarch *gdbarch, 04019 const char * stap_integer_prefix) 04020 { 04021 gdbarch->stap_integer_prefix = stap_integer_prefix; 04022 } 04023 04024 const char * 04025 gdbarch_stap_integer_suffix (struct gdbarch *gdbarch) 04026 { 04027 gdb_assert (gdbarch != NULL); 04028 /* Skip verify of stap_integer_suffix, invalid_p == 0 */ 04029 if (gdbarch_debug >= 2) 04030 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_integer_suffix called\n"); 04031 return gdbarch->stap_integer_suffix; 04032 } 04033 04034 void 04035 set_gdbarch_stap_integer_suffix (struct gdbarch *gdbarch, 04036 const char * stap_integer_suffix) 04037 { 04038 gdbarch->stap_integer_suffix = stap_integer_suffix; 04039 } 04040 04041 const char * 04042 gdbarch_stap_register_prefix (struct gdbarch *gdbarch) 04043 { 04044 gdb_assert (gdbarch != NULL); 04045 /* Skip verify of stap_register_prefix, invalid_p == 0 */ 04046 if (gdbarch_debug >= 2) 04047 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_prefix called\n"); 04048 return gdbarch->stap_register_prefix; 04049 } 04050 04051 void 04052 set_gdbarch_stap_register_prefix (struct gdbarch *gdbarch, 04053 const char * stap_register_prefix) 04054 { 04055 gdbarch->stap_register_prefix = stap_register_prefix; 04056 } 04057 04058 const char * 04059 gdbarch_stap_register_suffix (struct gdbarch *gdbarch) 04060 { 04061 gdb_assert (gdbarch != NULL); 04062 /* Skip verify of stap_register_suffix, invalid_p == 0 */ 04063 if (gdbarch_debug >= 2) 04064 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_suffix called\n"); 04065 return gdbarch->stap_register_suffix; 04066 } 04067 04068 void 04069 set_gdbarch_stap_register_suffix (struct gdbarch *gdbarch, 04070 const char * stap_register_suffix) 04071 { 04072 gdbarch->stap_register_suffix = stap_register_suffix; 04073 } 04074 04075 const char * 04076 gdbarch_stap_register_indirection_prefix (struct gdbarch *gdbarch) 04077 { 04078 gdb_assert (gdbarch != NULL); 04079 /* Skip verify of stap_register_indirection_prefix, invalid_p == 0 */ 04080 if (gdbarch_debug >= 2) 04081 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_prefix called\n"); 04082 return gdbarch->stap_register_indirection_prefix; 04083 } 04084 04085 void 04086 set_gdbarch_stap_register_indirection_prefix (struct gdbarch *gdbarch, 04087 const char * stap_register_indirection_prefix) 04088 { 04089 gdbarch->stap_register_indirection_prefix = stap_register_indirection_prefix; 04090 } 04091 04092 const char * 04093 gdbarch_stap_register_indirection_suffix (struct gdbarch *gdbarch) 04094 { 04095 gdb_assert (gdbarch != NULL); 04096 /* Skip verify of stap_register_indirection_suffix, invalid_p == 0 */ 04097 if (gdbarch_debug >= 2) 04098 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_register_indirection_suffix called\n"); 04099 return gdbarch->stap_register_indirection_suffix; 04100 } 04101 04102 void 04103 set_gdbarch_stap_register_indirection_suffix (struct gdbarch *gdbarch, 04104 const char * stap_register_indirection_suffix) 04105 { 04106 gdbarch->stap_register_indirection_suffix = stap_register_indirection_suffix; 04107 } 04108 04109 const char * 04110 gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch) 04111 { 04112 gdb_assert (gdbarch != NULL); 04113 /* Skip verify of stap_gdb_register_prefix, invalid_p == 0 */ 04114 if (gdbarch_debug >= 2) 04115 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_prefix called\n"); 04116 return gdbarch->stap_gdb_register_prefix; 04117 } 04118 04119 void 04120 set_gdbarch_stap_gdb_register_prefix (struct gdbarch *gdbarch, 04121 const char * stap_gdb_register_prefix) 04122 { 04123 gdbarch->stap_gdb_register_prefix = stap_gdb_register_prefix; 04124 } 04125 04126 const char * 04127 gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch) 04128 { 04129 gdb_assert (gdbarch != NULL); 04130 /* Skip verify of stap_gdb_register_suffix, invalid_p == 0 */ 04131 if (gdbarch_debug >= 2) 04132 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_gdb_register_suffix called\n"); 04133 return gdbarch->stap_gdb_register_suffix; 04134 } 04135 04136 void 04137 set_gdbarch_stap_gdb_register_suffix (struct gdbarch *gdbarch, 04138 const char * stap_gdb_register_suffix) 04139 { 04140 gdbarch->stap_gdb_register_suffix = stap_gdb_register_suffix; 04141 } 04142 04143 int 04144 gdbarch_stap_is_single_operand_p (struct gdbarch *gdbarch) 04145 { 04146 gdb_assert (gdbarch != NULL); 04147 return gdbarch->stap_is_single_operand != NULL; 04148 } 04149 04150 int 04151 gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, const char *s) 04152 { 04153 gdb_assert (gdbarch != NULL); 04154 gdb_assert (gdbarch->stap_is_single_operand != NULL); 04155 if (gdbarch_debug >= 2) 04156 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_is_single_operand called\n"); 04157 return gdbarch->stap_is_single_operand (gdbarch, s); 04158 } 04159 04160 void 04161 set_gdbarch_stap_is_single_operand (struct gdbarch *gdbarch, 04162 gdbarch_stap_is_single_operand_ftype stap_is_single_operand) 04163 { 04164 gdbarch->stap_is_single_operand = stap_is_single_operand; 04165 } 04166 04167 int 04168 gdbarch_stap_parse_special_token_p (struct gdbarch *gdbarch) 04169 { 04170 gdb_assert (gdbarch != NULL); 04171 return gdbarch->stap_parse_special_token != NULL; 04172 } 04173 04174 int 04175 gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, struct stap_parse_info *p) 04176 { 04177 gdb_assert (gdbarch != NULL); 04178 gdb_assert (gdbarch->stap_parse_special_token != NULL); 04179 if (gdbarch_debug >= 2) 04180 fprintf_unfiltered (gdb_stdlog, "gdbarch_stap_parse_special_token called\n"); 04181 return gdbarch->stap_parse_special_token (gdbarch, p); 04182 } 04183 04184 void 04185 set_gdbarch_stap_parse_special_token (struct gdbarch *gdbarch, 04186 gdbarch_stap_parse_special_token_ftype stap_parse_special_token) 04187 { 04188 gdbarch->stap_parse_special_token = stap_parse_special_token; 04189 } 04190 04191 int 04192 gdbarch_has_global_solist (struct gdbarch *gdbarch) 04193 { 04194 gdb_assert (gdbarch != NULL); 04195 /* Skip verify of has_global_solist, invalid_p == 0 */ 04196 if (gdbarch_debug >= 2) 04197 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_solist called\n"); 04198 return gdbarch->has_global_solist; 04199 } 04200 04201 void 04202 set_gdbarch_has_global_solist (struct gdbarch *gdbarch, 04203 int has_global_solist) 04204 { 04205 gdbarch->has_global_solist = has_global_solist; 04206 } 04207 04208 int 04209 gdbarch_has_global_breakpoints (struct gdbarch *gdbarch) 04210 { 04211 gdb_assert (gdbarch != NULL); 04212 /* Skip verify of has_global_breakpoints, invalid_p == 0 */ 04213 if (gdbarch_debug >= 2) 04214 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_global_breakpoints called\n"); 04215 return gdbarch->has_global_breakpoints; 04216 } 04217 04218 void 04219 set_gdbarch_has_global_breakpoints (struct gdbarch *gdbarch, 04220 int has_global_breakpoints) 04221 { 04222 gdbarch->has_global_breakpoints = has_global_breakpoints; 04223 } 04224 04225 int 04226 gdbarch_has_shared_address_space (struct gdbarch *gdbarch) 04227 { 04228 gdb_assert (gdbarch != NULL); 04229 gdb_assert (gdbarch->has_shared_address_space != NULL); 04230 if (gdbarch_debug >= 2) 04231 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_shared_address_space called\n"); 04232 return gdbarch->has_shared_address_space (gdbarch); 04233 } 04234 04235 void 04236 set_gdbarch_has_shared_address_space (struct gdbarch *gdbarch, 04237 gdbarch_has_shared_address_space_ftype has_shared_address_space) 04238 { 04239 gdbarch->has_shared_address_space = has_shared_address_space; 04240 } 04241 04242 int 04243 gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, CORE_ADDR addr, int *isize, char **msg) 04244 { 04245 gdb_assert (gdbarch != NULL); 04246 gdb_assert (gdbarch->fast_tracepoint_valid_at != NULL); 04247 if (gdbarch_debug >= 2) 04248 fprintf_unfiltered (gdb_stdlog, "gdbarch_fast_tracepoint_valid_at called\n"); 04249 return gdbarch->fast_tracepoint_valid_at (gdbarch, addr, isize, msg); 04250 } 04251 04252 void 04253 set_gdbarch_fast_tracepoint_valid_at (struct gdbarch *gdbarch, 04254 gdbarch_fast_tracepoint_valid_at_ftype fast_tracepoint_valid_at) 04255 { 04256 gdbarch->fast_tracepoint_valid_at = fast_tracepoint_valid_at; 04257 } 04258 04259 const char * 04260 gdbarch_auto_charset (struct gdbarch *gdbarch) 04261 { 04262 gdb_assert (gdbarch != NULL); 04263 gdb_assert (gdbarch->auto_charset != NULL); 04264 if (gdbarch_debug >= 2) 04265 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_charset called\n"); 04266 return gdbarch->auto_charset (); 04267 } 04268 04269 void 04270 set_gdbarch_auto_charset (struct gdbarch *gdbarch, 04271 gdbarch_auto_charset_ftype auto_charset) 04272 { 04273 gdbarch->auto_charset = auto_charset; 04274 } 04275 04276 const char * 04277 gdbarch_auto_wide_charset (struct gdbarch *gdbarch) 04278 { 04279 gdb_assert (gdbarch != NULL); 04280 gdb_assert (gdbarch->auto_wide_charset != NULL); 04281 if (gdbarch_debug >= 2) 04282 fprintf_unfiltered (gdb_stdlog, "gdbarch_auto_wide_charset called\n"); 04283 return gdbarch->auto_wide_charset (); 04284 } 04285 04286 void 04287 set_gdbarch_auto_wide_charset (struct gdbarch *gdbarch, 04288 gdbarch_auto_wide_charset_ftype auto_wide_charset) 04289 { 04290 gdbarch->auto_wide_charset = auto_wide_charset; 04291 } 04292 04293 const char * 04294 gdbarch_solib_symbols_extension (struct gdbarch *gdbarch) 04295 { 04296 gdb_assert (gdbarch != NULL); 04297 if (gdbarch_debug >= 2) 04298 fprintf_unfiltered (gdb_stdlog, "gdbarch_solib_symbols_extension called\n"); 04299 return gdbarch->solib_symbols_extension; 04300 } 04301 04302 void 04303 set_gdbarch_solib_symbols_extension (struct gdbarch *gdbarch, 04304 const char * solib_symbols_extension) 04305 { 04306 gdbarch->solib_symbols_extension = solib_symbols_extension; 04307 } 04308 04309 int 04310 gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch) 04311 { 04312 gdb_assert (gdbarch != NULL); 04313 /* Skip verify of has_dos_based_file_system, invalid_p == 0 */ 04314 if (gdbarch_debug >= 2) 04315 fprintf_unfiltered (gdb_stdlog, "gdbarch_has_dos_based_file_system called\n"); 04316 return gdbarch->has_dos_based_file_system; 04317 } 04318 04319 void 04320 set_gdbarch_has_dos_based_file_system (struct gdbarch *gdbarch, 04321 int has_dos_based_file_system) 04322 { 04323 gdbarch->has_dos_based_file_system = has_dos_based_file_system; 04324 } 04325 04326 void 04327 gdbarch_gen_return_address (struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope) 04328 { 04329 gdb_assert (gdbarch != NULL); 04330 gdb_assert (gdbarch->gen_return_address != NULL); 04331 if (gdbarch_debug >= 2) 04332 fprintf_unfiltered (gdb_stdlog, "gdbarch_gen_return_address called\n"); 04333 gdbarch->gen_return_address (gdbarch, ax, value, scope); 04334 } 04335 04336 void 04337 set_gdbarch_gen_return_address (struct gdbarch *gdbarch, 04338 gdbarch_gen_return_address_ftype gen_return_address) 04339 { 04340 gdbarch->gen_return_address = gen_return_address; 04341 } 04342 04343 int 04344 gdbarch_info_proc_p (struct gdbarch *gdbarch) 04345 { 04346 gdb_assert (gdbarch != NULL); 04347 return gdbarch->info_proc != NULL; 04348 } 04349 04350 void 04351 gdbarch_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what) 04352 { 04353 gdb_assert (gdbarch != NULL); 04354 gdb_assert (gdbarch->info_proc != NULL); 04355 if (gdbarch_debug >= 2) 04356 fprintf_unfiltered (gdb_stdlog, "gdbarch_info_proc called\n"); 04357 gdbarch->info_proc (gdbarch, args, what); 04358 } 04359 04360 void 04361 set_gdbarch_info_proc (struct gdbarch *gdbarch, 04362 gdbarch_info_proc_ftype info_proc) 04363 { 04364 gdbarch->info_proc = info_proc; 04365 } 04366 04367 int 04368 gdbarch_core_info_proc_p (struct gdbarch *gdbarch) 04369 { 04370 gdb_assert (gdbarch != NULL); 04371 return gdbarch->core_info_proc != NULL; 04372 } 04373 04374 void 04375 gdbarch_core_info_proc (struct gdbarch *gdbarch, char *args, enum info_proc_what what) 04376 { 04377 gdb_assert (gdbarch != NULL); 04378 gdb_assert (gdbarch->core_info_proc != NULL); 04379 if (gdbarch_debug >= 2) 04380 fprintf_unfiltered (gdb_stdlog, "gdbarch_core_info_proc called\n"); 04381 gdbarch->core_info_proc (gdbarch, args, what); 04382 } 04383 04384 void 04385 set_gdbarch_core_info_proc (struct gdbarch *gdbarch, 04386 gdbarch_core_info_proc_ftype core_info_proc) 04387 { 04388 gdbarch->core_info_proc = core_info_proc; 04389 } 04390 04391 void 04392 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) 04393 { 04394 gdb_assert (gdbarch != NULL); 04395 gdb_assert (gdbarch->iterate_over_objfiles_in_search_order != NULL); 04396 if (gdbarch_debug >= 2) 04397 fprintf_unfiltered (gdb_stdlog, "gdbarch_iterate_over_objfiles_in_search_order called\n"); 04398 gdbarch->iterate_over_objfiles_in_search_order (gdbarch, cb, cb_data, current_objfile); 04399 } 04400 04401 void 04402 set_gdbarch_iterate_over_objfiles_in_search_order (struct gdbarch *gdbarch, 04403 gdbarch_iterate_over_objfiles_in_search_order_ftype iterate_over_objfiles_in_search_order) 04404 { 04405 gdbarch->iterate_over_objfiles_in_search_order = iterate_over_objfiles_in_search_order; 04406 } 04407 04408 struct ravenscar_arch_ops * 04409 gdbarch_ravenscar_ops (struct gdbarch *gdbarch) 04410 { 04411 gdb_assert (gdbarch != NULL); 04412 /* Skip verify of ravenscar_ops, invalid_p == 0 */ 04413 if (gdbarch_debug >= 2) 04414 fprintf_unfiltered (gdb_stdlog, "gdbarch_ravenscar_ops called\n"); 04415 return gdbarch->ravenscar_ops; 04416 } 04417 04418 void 04419 set_gdbarch_ravenscar_ops (struct gdbarch *gdbarch, 04420 struct ravenscar_arch_ops * ravenscar_ops) 04421 { 04422 gdbarch->ravenscar_ops = ravenscar_ops; 04423 } 04424 04425 04426 /* Keep a registry of per-architecture data-pointers required by GDB 04427 modules. */ 04428 04429 struct gdbarch_data 04430 { 04431 unsigned index; 04432 int init_p; 04433 gdbarch_data_pre_init_ftype *pre_init; 04434 gdbarch_data_post_init_ftype *post_init; 04435 }; 04436 04437 struct gdbarch_data_registration 04438 { 04439 struct gdbarch_data *data; 04440 struct gdbarch_data_registration *next; 04441 }; 04442 04443 struct gdbarch_data_registry 04444 { 04445 unsigned nr; 04446 struct gdbarch_data_registration *registrations; 04447 }; 04448 04449 struct gdbarch_data_registry gdbarch_data_registry = 04450 { 04451 0, NULL, 04452 }; 04453 04454 static struct gdbarch_data * 04455 gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init, 04456 gdbarch_data_post_init_ftype *post_init) 04457 { 04458 struct gdbarch_data_registration **curr; 04459 04460 /* Append the new registration. */ 04461 for (curr = &gdbarch_data_registry.registrations; 04462 (*curr) != NULL; 04463 curr = &(*curr)->next); 04464 (*curr) = XMALLOC (struct gdbarch_data_registration); 04465 (*curr)->next = NULL; 04466 (*curr)->data = XMALLOC (struct gdbarch_data); 04467 (*curr)->data->index = gdbarch_data_registry.nr++; 04468 (*curr)->data->pre_init = pre_init; 04469 (*curr)->data->post_init = post_init; 04470 (*curr)->data->init_p = 1; 04471 return (*curr)->data; 04472 } 04473 04474 struct gdbarch_data * 04475 gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init) 04476 { 04477 return gdbarch_data_register (pre_init, NULL); 04478 } 04479 04480 struct gdbarch_data * 04481 gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init) 04482 { 04483 return gdbarch_data_register (NULL, post_init); 04484 } 04485 04486 /* Create/delete the gdbarch data vector. */ 04487 04488 static void 04489 alloc_gdbarch_data (struct gdbarch *gdbarch) 04490 { 04491 gdb_assert (gdbarch->data == NULL); 04492 gdbarch->nr_data = gdbarch_data_registry.nr; 04493 gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *); 04494 } 04495 04496 /* Initialize the current value of the specified per-architecture 04497 data-pointer. */ 04498 04499 void 04500 deprecated_set_gdbarch_data (struct gdbarch *gdbarch, 04501 struct gdbarch_data *data, 04502 void *pointer) 04503 { 04504 gdb_assert (data->index < gdbarch->nr_data); 04505 gdb_assert (gdbarch->data[data->index] == NULL); 04506 gdb_assert (data->pre_init == NULL); 04507 gdbarch->data[data->index] = pointer; 04508 } 04509 04510 /* Return the current value of the specified per-architecture 04511 data-pointer. */ 04512 04513 void * 04514 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data) 04515 { 04516 gdb_assert (data->index < gdbarch->nr_data); 04517 if (gdbarch->data[data->index] == NULL) 04518 { 04519 /* The data-pointer isn't initialized, call init() to get a 04520 value. */ 04521 if (data->pre_init != NULL) 04522 /* Mid architecture creation: pass just the obstack, and not 04523 the entire architecture, as that way it isn't possible for 04524 pre-init code to refer to undefined architecture 04525 fields. */ 04526 gdbarch->data[data->index] = data->pre_init (gdbarch->obstack); 04527 else if (gdbarch->initialized_p 04528 && data->post_init != NULL) 04529 /* Post architecture creation: pass the entire architecture 04530 (as all fields are valid), but be careful to also detect 04531 recursive references. */ 04532 { 04533 gdb_assert (data->init_p); 04534 data->init_p = 0; 04535 gdbarch->data[data->index] = data->post_init (gdbarch); 04536 data->init_p = 1; 04537 } 04538 else 04539 /* The architecture initialization hasn't completed - punt - 04540 hope that the caller knows what they are doing. Once 04541 deprecated_set_gdbarch_data has been initialized, this can be 04542 changed to an internal error. */ 04543 return NULL; 04544 gdb_assert (gdbarch->data[data->index] != NULL); 04545 } 04546 return gdbarch->data[data->index]; 04547 } 04548 04549 04550 /* Keep a registry of the architectures known by GDB. */ 04551 04552 struct gdbarch_registration 04553 { 04554 enum bfd_architecture bfd_architecture; 04555 gdbarch_init_ftype *init; 04556 gdbarch_dump_tdep_ftype *dump_tdep; 04557 struct gdbarch_list *arches; 04558 struct gdbarch_registration *next; 04559 }; 04560 04561 static struct gdbarch_registration *gdbarch_registry = NULL; 04562 04563 static void 04564 append_name (const char ***buf, int *nr, const char *name) 04565 { 04566 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); 04567 (*buf)[*nr] = name; 04568 *nr += 1; 04569 } 04570 04571 const char ** 04572 gdbarch_printable_names (void) 04573 { 04574 /* Accumulate a list of names based on the registed list of 04575 architectures. */ 04576 int nr_arches = 0; 04577 const char **arches = NULL; 04578 struct gdbarch_registration *rego; 04579 04580 for (rego = gdbarch_registry; 04581 rego != NULL; 04582 rego = rego->next) 04583 { 04584 const struct bfd_arch_info *ap; 04585 ap = bfd_lookup_arch (rego->bfd_architecture, 0); 04586 if (ap == NULL) 04587 internal_error (__FILE__, __LINE__, 04588 _("gdbarch_architecture_names: multi-arch unknown")); 04589 do 04590 { 04591 append_name (&arches, &nr_arches, ap->printable_name); 04592 ap = ap->next; 04593 } 04594 while (ap != NULL); 04595 } 04596 append_name (&arches, &nr_arches, NULL); 04597 return arches; 04598 } 04599 04600 04601 void 04602 gdbarch_register (enum bfd_architecture bfd_architecture, 04603 gdbarch_init_ftype *init, 04604 gdbarch_dump_tdep_ftype *dump_tdep) 04605 { 04606 struct gdbarch_registration **curr; 04607 const struct bfd_arch_info *bfd_arch_info; 04608 04609 /* Check that BFD recognizes this architecture */ 04610 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); 04611 if (bfd_arch_info == NULL) 04612 { 04613 internal_error (__FILE__, __LINE__, 04614 _("gdbarch: Attempt to register " 04615 "unknown architecture (%d)"), 04616 bfd_architecture); 04617 } 04618 /* Check that we haven't seen this architecture before. */ 04619 for (curr = &gdbarch_registry; 04620 (*curr) != NULL; 04621 curr = &(*curr)->next) 04622 { 04623 if (bfd_architecture == (*curr)->bfd_architecture) 04624 internal_error (__FILE__, __LINE__, 04625 _("gdbarch: Duplicate registration " 04626 "of architecture (%s)"), 04627 bfd_arch_info->printable_name); 04628 } 04629 /* log it */ 04630 if (gdbarch_debug) 04631 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, %s)\n", 04632 bfd_arch_info->printable_name, 04633 host_address_to_string (init)); 04634 /* Append it */ 04635 (*curr) = XMALLOC (struct gdbarch_registration); 04636 (*curr)->bfd_architecture = bfd_architecture; 04637 (*curr)->init = init; 04638 (*curr)->dump_tdep = dump_tdep; 04639 (*curr)->arches = NULL; 04640 (*curr)->next = NULL; 04641 } 04642 04643 void 04644 register_gdbarch_init (enum bfd_architecture bfd_architecture, 04645 gdbarch_init_ftype *init) 04646 { 04647 gdbarch_register (bfd_architecture, init, NULL); 04648 } 04649 04650 04651 /* Look for an architecture using gdbarch_info. */ 04652 04653 struct gdbarch_list * 04654 gdbarch_list_lookup_by_info (struct gdbarch_list *arches, 04655 const struct gdbarch_info *info) 04656 { 04657 for (; arches != NULL; arches = arches->next) 04658 { 04659 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) 04660 continue; 04661 if (info->byte_order != arches->gdbarch->byte_order) 04662 continue; 04663 if (info->osabi != arches->gdbarch->osabi) 04664 continue; 04665 if (info->target_desc != arches->gdbarch->target_desc) 04666 continue; 04667 return arches; 04668 } 04669 return NULL; 04670 } 04671 04672 04673 /* Find an architecture that matches the specified INFO. Create a new 04674 architecture if needed. Return that new architecture. */ 04675 04676 struct gdbarch * 04677 gdbarch_find_by_info (struct gdbarch_info info) 04678 { 04679 struct gdbarch *new_gdbarch; 04680 struct gdbarch_registration *rego; 04681 04682 /* Fill in missing parts of the INFO struct using a number of 04683 sources: "set ..."; INFOabfd supplied; and the global 04684 defaults. */ 04685 gdbarch_info_fill (&info); 04686 04687 /* Must have found some sort of architecture. */ 04688 gdb_assert (info.bfd_arch_info != NULL); 04689 04690 if (gdbarch_debug) 04691 { 04692 fprintf_unfiltered (gdb_stdlog, 04693 "gdbarch_find_by_info: info.bfd_arch_info %s\n", 04694 (info.bfd_arch_info != NULL 04695 ? info.bfd_arch_info->printable_name 04696 : "(null)")); 04697 fprintf_unfiltered (gdb_stdlog, 04698 "gdbarch_find_by_info: info.byte_order %d (%s)\n", 04699 info.byte_order, 04700 (info.byte_order == BFD_ENDIAN_BIG ? "big" 04701 : info.byte_order == BFD_ENDIAN_LITTLE ? "little" 04702 : "default")); 04703 fprintf_unfiltered (gdb_stdlog, 04704 "gdbarch_find_by_info: info.osabi %d (%s)\n", 04705 info.osabi, gdbarch_osabi_name (info.osabi)); 04706 fprintf_unfiltered (gdb_stdlog, 04707 "gdbarch_find_by_info: info.abfd %s\n", 04708 host_address_to_string (info.abfd)); 04709 fprintf_unfiltered (gdb_stdlog, 04710 "gdbarch_find_by_info: info.tdep_info %s\n", 04711 host_address_to_string (info.tdep_info)); 04712 } 04713 04714 /* Find the tdep code that knows about this architecture. */ 04715 for (rego = gdbarch_registry; 04716 rego != NULL; 04717 rego = rego->next) 04718 if (rego->bfd_architecture == info.bfd_arch_info->arch) 04719 break; 04720 if (rego == NULL) 04721 { 04722 if (gdbarch_debug) 04723 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " 04724 "No matching architecture\n"); 04725 return 0; 04726 } 04727 04728 /* Ask the tdep code for an architecture that matches "info". */ 04729 new_gdbarch = rego->init (info, rego->arches); 04730 04731 /* Did the tdep code like it? No. Reject the change and revert to 04732 the old architecture. */ 04733 if (new_gdbarch == NULL) 04734 { 04735 if (gdbarch_debug) 04736 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " 04737 "Target rejected architecture\n"); 04738 return NULL; 04739 } 04740 04741 /* Is this a pre-existing architecture (as determined by already 04742 being initialized)? Move it to the front of the architecture 04743 list (keeping the list sorted Most Recently Used). */ 04744 if (new_gdbarch->initialized_p) 04745 { 04746 struct gdbarch_list **list; 04747 struct gdbarch_list *this; 04748 if (gdbarch_debug) 04749 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " 04750 "Previous architecture %s (%s) selected\n", 04751 host_address_to_string (new_gdbarch), 04752 new_gdbarch->bfd_arch_info->printable_name); 04753 /* Find the existing arch in the list. */ 04754 for (list = ®o->arches; 04755 (*list) != NULL && (*list)->gdbarch != new_gdbarch; 04756 list = &(*list)->next); 04757 /* It had better be in the list of architectures. */ 04758 gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch); 04759 /* Unlink THIS. */ 04760 this = (*list); 04761 (*list) = this->next; 04762 /* Insert THIS at the front. */ 04763 this->next = rego->arches; 04764 rego->arches = this; 04765 /* Return it. */ 04766 return new_gdbarch; 04767 } 04768 04769 /* It's a new architecture. */ 04770 if (gdbarch_debug) 04771 fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: " 04772 "New architecture %s (%s) selected\n", 04773 host_address_to_string (new_gdbarch), 04774 new_gdbarch->bfd_arch_info->printable_name); 04775 04776 /* Insert the new architecture into the front of the architecture 04777 list (keep the list sorted Most Recently Used). */ 04778 { 04779 struct gdbarch_list *this = XMALLOC (struct gdbarch_list); 04780 this->next = rego->arches; 04781 this->gdbarch = new_gdbarch; 04782 rego->arches = this; 04783 } 04784 04785 /* Check that the newly installed architecture is valid. Plug in 04786 any post init values. */ 04787 new_gdbarch->dump_tdep = rego->dump_tdep; 04788 verify_gdbarch (new_gdbarch); 04789 new_gdbarch->initialized_p = 1; 04790 04791 if (gdbarch_debug) 04792 gdbarch_dump (new_gdbarch, gdb_stdlog); 04793 04794 return new_gdbarch; 04795 } 04796 04797 /* Make the specified architecture current. */ 04798 04799 void 04800 set_target_gdbarch (struct gdbarch *new_gdbarch) 04801 { 04802 gdb_assert (new_gdbarch != NULL); 04803 gdb_assert (new_gdbarch->initialized_p); 04804 current_inferior ()->gdbarch = new_gdbarch; 04805 observer_notify_architecture_changed (new_gdbarch); 04806 registers_changed (); 04807 } 04808 04809 /* Return the current inferior's arch. */ 04810 04811 struct gdbarch * 04812 target_gdbarch (void) 04813 { 04814 return current_inferior ()->gdbarch; 04815 } 04816 04817 extern void _initialize_gdbarch (void); 04818 04819 void 04820 _initialize_gdbarch (void) 04821 { 04822 add_setshow_zuinteger_cmd ("arch", class_maintenance, &gdbarch_debug, _("\ 04823 Set architecture debugging."), _("\ 04824 Show architecture debugging."), _("\ 04825 When non-zero, architecture debugging is enabled."), 04826 NULL, 04827 show_gdbarch_debug, 04828 &setdebuglist, &showdebuglist); 04829 }