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