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