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