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