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