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