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