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