]>
Commit | Line | Data |
---|---|---|
59233f88 AC |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
2 | ||
adf40b2e | 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
79d45cd4 AC |
4 | |
5 | Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free | |
6 | 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 | |
12 | the Free Software Foundation; either version 2 of the License, or | |
13 | (at your option) any later version. | |
c906108c | 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. | |
c906108c | 19 | |
96baa820 JM |
20 | You should have received a copy of the GNU General Public License |
21 | along with this program; if not, write to the Free Software | |
22 | Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | Boston, MA 02111-1307, USA. */ | |
adf40b2e | 24 | |
104c1213 JM |
25 | /* This file was created with the aid of ``gdbarch.sh''. |
26 | ||
52204a0b | 27 | The Bourne shell script ``gdbarch.sh'' creates the files |
104c1213 JM |
28 | ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them |
29 | against the existing ``gdbarch.[hc]''. Any differences found | |
30 | being reported. | |
31 | ||
32 | If editing this file, please also run gdbarch.sh and merge any | |
52204a0b | 33 | changes into that script. Conversely, when making sweeping changes |
104c1213 JM |
34 | to this file, modifying gdbarch.sh and using its output may prove |
35 | easier. */ | |
c906108c | 36 | |
c906108c SS |
37 | |
38 | #include "defs.h" | |
1ad03bde | 39 | #include "arch-utils.h" |
c906108c | 40 | |
0f71a2f6 | 41 | #include "gdbcmd.h" |
adf40b2e | 42 | #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */ |
7a292a7a | 43 | #include "symcat.h" |
c906108c | 44 | |
f0d4cc9e | 45 | #include "floatformat.h" |
c906108c | 46 | |
95160752 | 47 | #include "gdb_assert.h" |
b66d6d2e | 48 | #include "gdb_string.h" |
67c2c32c | 49 | #include "gdb-events.h" |
b59ff9d5 | 50 | #include "reggroups.h" |
4be87837 | 51 | #include "osabi.h" |
aebd7893 | 52 | #include "gdb_obstack.h" |
95160752 | 53 | |
104c1213 JM |
54 | /* Static function declarations */ |
55 | ||
b3cc3077 | 56 | static void alloc_gdbarch_data (struct gdbarch *); |
104c1213 | 57 | |
0f71a2f6 JM |
58 | /* Non-zero if we want to trace architecture code. */ |
59 | ||
60 | #ifndef GDBARCH_DEBUG | |
61 | #define GDBARCH_DEBUG 0 | |
62 | #endif | |
63 | int gdbarch_debug = GDBARCH_DEBUG; | |
64 | ||
65 | ||
66 | /* Maintain the struct gdbarch object */ | |
67 | ||
68 | struct gdbarch | |
adf40b2e | 69 | { |
76860b5f AC |
70 | /* Has this architecture been fully initialized? */ |
71 | int initialized_p; | |
aebd7893 AC |
72 | |
73 | /* An obstack bound to the lifetime of the architecture. */ | |
74 | struct obstack *obstack; | |
75 | ||
adf40b2e JM |
76 | /* basic architectural information */ |
77 | const struct bfd_arch_info * bfd_arch_info; | |
78 | int byte_order; | |
4be87837 | 79 | enum gdb_osabi osabi; |
0f71a2f6 | 80 | |
adf40b2e JM |
81 | /* target specific vector. */ |
82 | struct gdbarch_tdep *tdep; | |
4b9b3959 | 83 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 84 | |
adf40b2e | 85 | /* per-architecture data-pointers */ |
95160752 | 86 | unsigned nr_data; |
adf40b2e | 87 | void **data; |
0f71a2f6 | 88 | |
adf40b2e JM |
89 | /* per-architecture swap-regions */ |
90 | struct gdbarch_swap *swap; | |
0f71a2f6 | 91 | |
adf40b2e | 92 | /* Multi-arch values. |
0f71a2f6 | 93 | |
adf40b2e | 94 | When extending this structure you must: |
0f71a2f6 | 95 | |
adf40b2e | 96 | Add the field below. |
0f71a2f6 | 97 | |
adf40b2e JM |
98 | Declare set/get functions and define the corresponding |
99 | macro in gdbarch.h. | |
0f71a2f6 | 100 | |
adf40b2e JM |
101 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
102 | initialize the new field. | |
0f71a2f6 | 103 | |
adf40b2e JM |
104 | verify_gdbarch(): Confirm that the target updated the field |
105 | correctly. | |
0f71a2f6 | 106 | |
7e73cedf | 107 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
adf40b2e | 108 | field is dumped out |
0f71a2f6 | 109 | |
c0e8c252 | 110 | ``startup_gdbarch()'': Append an initial value to the static |
adf40b2e | 111 | variable (base values on the host's c-type system). |
0f71a2f6 | 112 | |
adf40b2e JM |
113 | get_gdbarch(): Implement the set/get functions (probably using |
114 | the macro's as shortcuts). | |
0f71a2f6 JM |
115 | |
116 | */ | |
117 | ||
adf40b2e JM |
118 | int short_bit; |
119 | int int_bit; | |
120 | int long_bit; | |
121 | int long_long_bit; | |
122 | int float_bit; | |
123 | int double_bit; | |
124 | int long_double_bit; | |
66b43ecb | 125 | int ptr_bit; |
52204a0b | 126 | int addr_bit; |
66b43ecb | 127 | int bfd_vma_bit; |
4e409299 | 128 | int char_signed; |
adf40b2e JM |
129 | gdbarch_read_pc_ftype *read_pc; |
130 | gdbarch_write_pc_ftype *write_pc; | |
adf40b2e | 131 | gdbarch_read_sp_ftype *read_sp; |
39d4ef09 | 132 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
d8124050 AC |
133 | gdbarch_pseudo_register_read_ftype *pseudo_register_read; |
134 | gdbarch_pseudo_register_write_ftype *pseudo_register_write; | |
adf40b2e | 135 | int num_regs; |
0aba1244 | 136 | int num_pseudo_regs; |
adf40b2e | 137 | int sp_regnum; |
adf40b2e | 138 | int pc_regnum; |
c2169756 | 139 | int ps_regnum; |
60054393 | 140 | int fp0_regnum; |
88c72b7d AC |
141 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
142 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; | |
143 | gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum; | |
144 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; | |
145 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; | |
adf40b2e | 146 | gdbarch_register_name_ftype *register_name; |
9c04cab7 AC |
147 | gdbarch_register_type_ftype *register_type; |
148 | gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type; | |
b8b527c5 | 149 | int deprecated_register_bytes; |
9c04cab7 AC |
150 | gdbarch_deprecated_register_byte_ftype *deprecated_register_byte; |
151 | gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size; | |
152 | gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size; | |
a0ed5532 | 153 | int deprecated_max_register_raw_size; |
a0ed5532 | 154 | int deprecated_max_register_virtual_size; |
f3be58bc | 155 | gdbarch_unwind_dummy_id_ftype *unwind_dummy_id; |
a59fe496 | 156 | gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos; |
f3be58bc AC |
157 | int deprecated_fp_regnum; |
158 | gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp; | |
b8de8283 AC |
159 | gdbarch_push_dummy_call_ftype *push_dummy_call; |
160 | gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments; | |
07555a72 | 161 | int deprecated_use_generic_dummy_frames; |
b8de8283 AC |
162 | gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address; |
163 | gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp; | |
164 | int deprecated_register_size; | |
adf40b2e | 165 | int call_dummy_location; |
b1e29e33 AC |
166 | CORE_ADDR deprecated_call_dummy_start_offset; |
167 | CORE_ADDR deprecated_call_dummy_breakpoint_offset; | |
168 | int deprecated_call_dummy_length; | |
b1e29e33 AC |
169 | LONGEST * deprecated_call_dummy_words; |
170 | int deprecated_sizeof_call_dummy_words; | |
b1e29e33 | 171 | gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy; |
7043d8dc | 172 | gdbarch_push_dummy_code_ftype *push_dummy_code; |
b8de8283 | 173 | gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame; |
b8de8283 AC |
174 | gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info; |
175 | gdbarch_print_registers_info_ftype *print_registers_info; | |
176 | gdbarch_print_float_info_ftype *print_float_info; | |
177 | gdbarch_print_vector_info_ftype *print_vector_info; | |
178 | gdbarch_register_sim_regno_ftype *register_sim_regno; | |
179 | gdbarch_register_bytes_ok_ftype *register_bytes_ok; | |
180 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; | |
181 | gdbarch_cannot_store_register_ftype *cannot_store_register; | |
182 | gdbarch_get_longjmp_target_ftype *get_longjmp_target; | |
183 | gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy; | |
2ca6c561 | 184 | gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first; |
a5afb99f | 185 | gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc; |
adf40b2e JM |
186 | int believe_pcc_promotion; |
187 | int believe_pcc_promotion_type; | |
129c1cd6 | 188 | gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register; |
781a750d AC |
189 | gdbarch_deprecated_register_convertible_ftype *deprecated_register_convertible; |
190 | gdbarch_deprecated_register_convert_to_virtual_ftype *deprecated_register_convert_to_virtual; | |
191 | gdbarch_deprecated_register_convert_to_raw_ftype *deprecated_register_convert_to_raw; | |
13d01224 AC |
192 | gdbarch_convert_register_p_ftype *convert_register_p; |
193 | gdbarch_register_to_value_ftype *register_to_value; | |
194 | gdbarch_value_to_register_ftype *value_to_register; | |
4478b372 JB |
195 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
196 | gdbarch_address_to_pointer_ftype *address_to_pointer; | |
fc0c74b1 | 197 | gdbarch_integer_to_address_ftype *integer_to_address; |
749b82f6 | 198 | gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame; |
4183d812 | 199 | gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return; |
92ad9cd9 AC |
200 | gdbarch_return_value_ftype *return_value; |
201 | gdbarch_return_value_on_stack_ftype *return_value_on_stack; | |
ebba8386 | 202 | gdbarch_extract_return_value_ftype *extract_return_value; |
adf40b2e | 203 | gdbarch_store_return_value_ftype *store_return_value; |
ebba8386 AC |
204 | gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value; |
205 | gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value; | |
92ad9cd9 | 206 | gdbarch_use_struct_convention_ftype *use_struct_convention; |
74055713 | 207 | gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address; |
f30ee0bc | 208 | gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs; |
e9582e71 | 209 | gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info; |
adf40b2e JM |
210 | gdbarch_skip_prologue_ftype *skip_prologue; |
211 | gdbarch_inner_than_ftype *inner_than; | |
212 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; | |
a1131521 | 213 | gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address; |
917317f4 JM |
214 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
215 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; | |
adf40b2e JM |
216 | CORE_ADDR decr_pc_after_break; |
217 | CORE_ADDR function_start_offset; | |
218 | gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; | |
219 | CORE_ADDR frame_args_skip; | |
19772a2c | 220 | gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation; |
618ce49f AC |
221 | gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain; |
222 | gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid; | |
8bedc050 | 223 | gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc; |
12cc2063 | 224 | gdbarch_unwind_pc_ftype *unwind_pc; |
a9e5fdc2 | 225 | gdbarch_unwind_sp_ftype *unwind_sp; |
42efa47a AC |
226 | gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address; |
227 | gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address; | |
6913c89a | 228 | gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call; |
adf40b2e | 229 | gdbarch_frame_num_args_ftype *frame_num_args; |
f27dd7fd | 230 | gdbarch_deprecated_stack_align_ftype *deprecated_stack_align; |
dc604539 | 231 | gdbarch_frame_align_ftype *frame_align; |
88d89dbb | 232 | gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr; |
192cb3d4 | 233 | gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr; |
8b148df9 | 234 | int frame_red_zone_size; |
58d5518e | 235 | int parm_boundary; |
f0d4cc9e AC |
236 | const struct floatformat * float_format; |
237 | const struct floatformat * double_format; | |
238 | const struct floatformat * long_double_format; | |
f517ea4e | 239 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
875e1767 | 240 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
181c1381 | 241 | gdbarch_smash_text_address_ftype *smash_text_address; |
64c4637f | 242 | gdbarch_software_single_step_ftype *software_single_step; |
2bf0cb65 | 243 | gdbarch_print_insn_ftype *print_insn; |
bdcd319a | 244 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
dea0c52f | 245 | gdbarch_skip_solib_resolver_ftype *skip_solib_resolver; |
68e9cc94 | 246 | gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; |
d50355b6 | 247 | gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; |
f561f026 | 248 | gdbarch_deprecated_pc_in_sigtramp_ftype *deprecated_pc_in_sigtramp; |
aa2a3f87 AC |
249 | gdbarch_deprecated_sigtramp_start_ftype *deprecated_sigtramp_start; |
250 | gdbarch_deprecated_sigtramp_end_ftype *deprecated_sigtramp_end; | |
c12260ac | 251 | gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; |
552c04a7 | 252 | gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; |
a2cf933a EZ |
253 | gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; |
254 | gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; | |
5720643c | 255 | const char * name_of_malloc; |
c4ed33b9 | 256 | int cannot_step_breakpoint; |
f74fa174 | 257 | int have_nonsteppable_watchpoint; |
8b2dbe47 KB |
258 | gdbarch_address_class_type_flags_ftype *address_class_type_flags; |
259 | gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name; | |
260 | gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags; | |
b59ff9d5 | 261 | gdbarch_register_reggroup_p_ftype *register_reggroup_p; |
143985b7 | 262 | gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument; |
6ce6d90f | 263 | gdbarch_regset_from_core_section_ftype *regset_from_core_section; |
adf40b2e | 264 | }; |
0f71a2f6 JM |
265 | |
266 | ||
267 | /* The default architecture uses host values (for want of a better | |
268 | choice). */ | |
269 | ||
270 | extern const struct bfd_arch_info bfd_default_arch_struct; | |
271 | ||
4b9b3959 AC |
272 | struct gdbarch startup_gdbarch = |
273 | { | |
76860b5f | 274 | 1, /* Always initialized. */ |
aebd7893 | 275 | NULL, /* The obstack. */ |
0f71a2f6 | 276 | /* basic architecture information */ |
ec5cbaec AC |
277 | &bfd_default_arch_struct, /* bfd_arch_info */ |
278 | BFD_ENDIAN_BIG, /* byte_order */ | |
279 | GDB_OSABI_UNKNOWN, /* osabi */ | |
4b9b3959 AC |
280 | /* target specific vector and its dump routine */ |
281 | NULL, NULL, | |
0f71a2f6 JM |
282 | /*per-architecture data-pointers and swap regions */ |
283 | 0, NULL, NULL, | |
284 | /* Multi-arch values */ | |
ec5cbaec AC |
285 | 8 * sizeof (short), /* short_bit */ |
286 | 8 * sizeof (int), /* int_bit */ | |
287 | 8 * sizeof (long), /* long_bit */ | |
288 | 8 * sizeof (LONGEST), /* long_long_bit */ | |
289 | 8 * sizeof (float), /* float_bit */ | |
290 | 8 * sizeof (double), /* double_bit */ | |
291 | 8 * sizeof (long double), /* long_double_bit */ | |
292 | 8 * sizeof (void*), /* ptr_bit */ | |
293 | 8 * sizeof (void*), /* addr_bit */ | |
294 | 8 * sizeof (void*), /* bfd_vma_bit */ | |
295 | 1, /* char_signed */ | |
296 | 0, /* read_pc */ | |
297 | 0, /* write_pc */ | |
ec5cbaec | 298 | 0, /* read_sp */ |
ec5cbaec AC |
299 | 0, /* virtual_frame_pointer */ |
300 | 0, /* pseudo_register_read */ | |
301 | 0, /* pseudo_register_write */ | |
302 | 0, /* num_regs */ | |
303 | 0, /* num_pseudo_regs */ | |
304 | -1, /* sp_regnum */ | |
ec5cbaec AC |
305 | -1, /* pc_regnum */ |
306 | -1, /* ps_regnum */ | |
307 | 0, /* fp0_regnum */ | |
ec5cbaec AC |
308 | 0, /* stab_reg_to_regnum */ |
309 | 0, /* ecoff_reg_to_regnum */ | |
310 | 0, /* dwarf_reg_to_regnum */ | |
311 | 0, /* sdb_reg_to_regnum */ | |
312 | 0, /* dwarf2_reg_to_regnum */ | |
313 | 0, /* register_name */ | |
9c04cab7 AC |
314 | 0, /* register_type */ |
315 | 0, /* deprecated_register_virtual_type */ | |
ec5cbaec | 316 | 0, /* deprecated_register_bytes */ |
9c04cab7 AC |
317 | generic_register_byte, /* deprecated_register_byte */ |
318 | generic_register_size, /* deprecated_register_raw_size */ | |
319 | generic_register_size, /* deprecated_register_virtual_size */ | |
ec5cbaec | 320 | 0, /* deprecated_max_register_raw_size */ |
ec5cbaec | 321 | 0, /* deprecated_max_register_virtual_size */ |
f3be58bc | 322 | 0, /* unwind_dummy_id */ |
a59fe496 | 323 | 0, /* deprecated_save_dummy_frame_tos */ |
f3be58bc AC |
324 | -1, /* deprecated_fp_regnum */ |
325 | 0, /* deprecated_target_read_fp */ | |
b8de8283 AC |
326 | 0, /* push_dummy_call */ |
327 | 0, /* deprecated_push_arguments */ | |
ec5cbaec | 328 | 0, /* deprecated_use_generic_dummy_frames */ |
b8de8283 AC |
329 | 0, /* deprecated_push_return_address */ |
330 | 0, /* deprecated_dummy_write_sp */ | |
331 | 0, /* deprecated_register_size */ | |
ec5cbaec | 332 | 0, /* call_dummy_location */ |
ec5cbaec AC |
333 | 0, /* deprecated_call_dummy_start_offset */ |
334 | 0, /* deprecated_call_dummy_breakpoint_offset */ | |
335 | 0, /* deprecated_call_dummy_length */ | |
ec5cbaec AC |
336 | 0, /* deprecated_call_dummy_words */ |
337 | 0, /* deprecated_sizeof_call_dummy_words */ | |
ec5cbaec AC |
338 | 0, /* deprecated_fix_call_dummy */ |
339 | 0, /* push_dummy_code */ | |
b8de8283 | 340 | 0, /* deprecated_push_dummy_frame */ |
b8de8283 AC |
341 | 0, /* deprecated_do_registers_info */ |
342 | default_print_registers_info, /* print_registers_info */ | |
343 | 0, /* print_float_info */ | |
344 | 0, /* print_vector_info */ | |
345 | 0, /* register_sim_regno */ | |
346 | 0, /* register_bytes_ok */ | |
347 | 0, /* cannot_fetch_register */ | |
348 | 0, /* cannot_store_register */ | |
349 | 0, /* get_longjmp_target */ | |
90ba813f | 350 | deprecated_pc_in_call_dummy, /* deprecated_pc_in_call_dummy */ |
ec5cbaec AC |
351 | 0, /* deprecated_init_frame_pc_first */ |
352 | 0, /* deprecated_init_frame_pc */ | |
353 | 0, /* believe_pcc_promotion */ | |
354 | 0, /* believe_pcc_promotion_type */ | |
355 | 0, /* deprecated_get_saved_register */ | |
781a750d AC |
356 | 0, /* deprecated_register_convertible */ |
357 | 0, /* deprecated_register_convert_to_virtual */ | |
358 | 0, /* deprecated_register_convert_to_raw */ | |
ec5cbaec AC |
359 | 0, /* convert_register_p */ |
360 | 0, /* register_to_value */ | |
361 | 0, /* value_to_register */ | |
362 | 0, /* pointer_to_address */ | |
363 | 0, /* address_to_pointer */ | |
364 | 0, /* integer_to_address */ | |
ec5cbaec AC |
365 | 0, /* deprecated_pop_frame */ |
366 | 0, /* deprecated_store_struct_return */ | |
92ad9cd9 AC |
367 | 0, /* return_value */ |
368 | 0, /* return_value_on_stack */ | |
ec5cbaec AC |
369 | 0, /* extract_return_value */ |
370 | 0, /* store_return_value */ | |
371 | 0, /* deprecated_extract_return_value */ | |
372 | 0, /* deprecated_store_return_value */ | |
92ad9cd9 | 373 | 0, /* use_struct_convention */ |
74055713 | 374 | 0, /* deprecated_extract_struct_value_address */ |
ec5cbaec AC |
375 | 0, /* deprecated_frame_init_saved_regs */ |
376 | 0, /* deprecated_init_extra_frame_info */ | |
377 | 0, /* skip_prologue */ | |
ec5cbaec AC |
378 | 0, /* inner_than */ |
379 | 0, /* breakpoint_from_pc */ | |
a1131521 | 380 | 0, /* adjust_breakpoint_address */ |
ec5cbaec AC |
381 | 0, /* memory_insert_breakpoint */ |
382 | 0, /* memory_remove_breakpoint */ | |
383 | 0, /* decr_pc_after_break */ | |
ec5cbaec AC |
384 | 0, /* function_start_offset */ |
385 | generic_remote_translate_xfer_address, /* remote_translate_xfer_address */ | |
386 | 0, /* frame_args_skip */ | |
19772a2c | 387 | 0, /* deprecated_frameless_function_invocation */ |
ec5cbaec AC |
388 | 0, /* deprecated_frame_chain */ |
389 | 0, /* deprecated_frame_chain_valid */ | |
390 | 0, /* deprecated_frame_saved_pc */ | |
391 | 0, /* unwind_pc */ | |
a9e5fdc2 | 392 | 0, /* unwind_sp */ |
42efa47a AC |
393 | get_frame_base, /* deprecated_frame_args_address */ |
394 | get_frame_base, /* deprecated_frame_locals_address */ | |
ec5cbaec AC |
395 | 0, /* deprecated_saved_pc_after_call */ |
396 | 0, /* frame_num_args */ | |
f27dd7fd | 397 | 0, /* deprecated_stack_align */ |
ec5cbaec | 398 | 0, /* frame_align */ |
88d89dbb | 399 | 0, /* deprecated_reg_struct_has_addr */ |
192cb3d4 | 400 | default_stabs_argument_has_addr, /* stabs_argument_has_addr */ |
8b148df9 | 401 | 0, /* frame_red_zone_size */ |
ec5cbaec AC |
402 | 0, /* parm_boundary */ |
403 | 0, /* float_format */ | |
404 | 0, /* double_format */ | |
405 | 0, /* long_double_format */ | |
e2d0e7eb | 406 | convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */ |
ec5cbaec AC |
407 | 0, /* addr_bits_remove */ |
408 | 0, /* smash_text_address */ | |
409 | 0, /* software_single_step */ | |
410 | 0, /* print_insn */ | |
411 | 0, /* skip_trampoline_code */ | |
4c8c40e6 | 412 | generic_skip_solib_resolver, /* skip_solib_resolver */ |
ec5cbaec AC |
413 | 0, /* in_solib_call_trampoline */ |
414 | 0, /* in_solib_return_trampoline */ | |
f561f026 | 415 | 0, /* deprecated_pc_in_sigtramp */ |
aa2a3f87 AC |
416 | 0, /* deprecated_sigtramp_start */ |
417 | 0, /* deprecated_sigtramp_end */ | |
ec5cbaec AC |
418 | generic_in_function_epilogue_p, /* in_function_epilogue_p */ |
419 | construct_inferior_arguments, /* construct_inferior_arguments */ | |
ec5cbaec AC |
420 | 0, /* elf_make_msymbol_special */ |
421 | 0, /* coff_make_msymbol_special */ | |
422 | "malloc", /* name_of_malloc */ | |
423 | 0, /* cannot_step_breakpoint */ | |
424 | 0, /* have_nonsteppable_watchpoint */ | |
425 | 0, /* address_class_type_flags */ | |
426 | 0, /* address_class_type_flags_to_name */ | |
427 | 0, /* address_class_name_to_type_flags */ | |
428 | default_register_reggroup_p, /* register_reggroup_p */ | |
429 | 0, /* fetch_pointer_argument */ | |
6ce6d90f | 430 | 0, /* regset_from_core_section */ |
c0e8c252 | 431 | /* startup_gdbarch() */ |
0f71a2f6 | 432 | }; |
4b9b3959 | 433 | |
c0e8c252 | 434 | struct gdbarch *current_gdbarch = &startup_gdbarch; |
0f71a2f6 | 435 | |
66b43ecb | 436 | /* Create a new ``struct gdbarch'' based on information provided by |
0f71a2f6 JM |
437 | ``struct gdbarch_info''. */ |
438 | ||
439 | struct gdbarch * | |
104c1213 JM |
440 | gdbarch_alloc (const struct gdbarch_info *info, |
441 | struct gdbarch_tdep *tdep) | |
0f71a2f6 | 442 | { |
85de9627 AC |
443 | /* NOTE: The new architecture variable is named ``current_gdbarch'' |
444 | so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to | |
445 | the current local architecture and not the previous global | |
446 | architecture. This ensures that the new architectures initial | |
447 | values are not influenced by the previous architecture. Once | |
448 | everything is parameterised with gdbarch, this will go away. */ | |
aebd7893 AC |
449 | struct gdbarch *current_gdbarch; |
450 | ||
451 | /* Create an obstack for allocating all the per-architecture memory, | |
452 | then use that to allocate the architecture vector. */ | |
453 | struct obstack *obstack = XMALLOC (struct obstack); | |
454 | obstack_init (obstack); | |
455 | current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch)); | |
85de9627 | 456 | memset (current_gdbarch, 0, sizeof (*current_gdbarch)); |
aebd7893 | 457 | current_gdbarch->obstack = obstack; |
0f71a2f6 | 458 | |
85de9627 | 459 | alloc_gdbarch_data (current_gdbarch); |
b3cc3077 | 460 | |
85de9627 | 461 | current_gdbarch->tdep = tdep; |
0f71a2f6 | 462 | |
85de9627 AC |
463 | current_gdbarch->bfd_arch_info = info->bfd_arch_info; |
464 | current_gdbarch->byte_order = info->byte_order; | |
4be87837 | 465 | current_gdbarch->osabi = info->osabi; |
0f71a2f6 JM |
466 | |
467 | /* Force the explicit initialization of these. */ | |
85de9627 AC |
468 | current_gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
469 | current_gdbarch->int_bit = 4*TARGET_CHAR_BIT; | |
470 | current_gdbarch->long_bit = 4*TARGET_CHAR_BIT; | |
471 | current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT; | |
472 | current_gdbarch->float_bit = 4*TARGET_CHAR_BIT; | |
473 | current_gdbarch->double_bit = 8*TARGET_CHAR_BIT; | |
17ef5d92 | 474 | current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT; |
85de9627 AC |
475 | current_gdbarch->ptr_bit = TARGET_INT_BIT; |
476 | current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address; | |
4e409299 | 477 | current_gdbarch->char_signed = -1; |
85de9627 | 478 | current_gdbarch->write_pc = generic_target_write_pc; |
85de9627 AC |
479 | current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; |
480 | current_gdbarch->num_regs = -1; | |
481 | current_gdbarch->sp_regnum = -1; | |
85de9627 | 482 | current_gdbarch->pc_regnum = -1; |
c2169756 | 483 | current_gdbarch->ps_regnum = -1; |
85de9627 | 484 | current_gdbarch->fp0_regnum = -1; |
85de9627 AC |
485 | current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; |
486 | current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; | |
487 | current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum; | |
488 | current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; | |
489 | current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; | |
9c04cab7 AC |
490 | current_gdbarch->deprecated_register_byte = generic_register_byte; |
491 | current_gdbarch->deprecated_register_raw_size = generic_register_size; | |
492 | current_gdbarch->deprecated_register_virtual_size = generic_register_size; | |
f3be58bc | 493 | current_gdbarch->deprecated_fp_regnum = -1; |
07555a72 | 494 | current_gdbarch->deprecated_use_generic_dummy_frames = 1; |
b99fa2d2 | 495 | current_gdbarch->call_dummy_location = AT_ENTRY_POINT; |
b1e29e33 AC |
496 | current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words; |
497 | current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; | |
b8de8283 AC |
498 | current_gdbarch->print_registers_info = default_print_registers_info; |
499 | current_gdbarch->register_sim_regno = legacy_register_sim_regno; | |
500 | current_gdbarch->cannot_fetch_register = cannot_register_not; | |
501 | current_gdbarch->cannot_store_register = cannot_register_not; | |
90ba813f | 502 | current_gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy; |
13d01224 AC |
503 | current_gdbarch->convert_register_p = legacy_convert_register_p; |
504 | current_gdbarch->register_to_value = legacy_register_to_value; | |
505 | current_gdbarch->value_to_register = legacy_value_to_register; | |
85de9627 AC |
506 | current_gdbarch->pointer_to_address = unsigned_pointer_to_address; |
507 | current_gdbarch->address_to_pointer = unsigned_address_to_pointer; | |
508 | current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not; | |
ebba8386 AC |
509 | current_gdbarch->extract_return_value = legacy_extract_return_value; |
510 | current_gdbarch->store_return_value = legacy_store_return_value; | |
56f12751 | 511 | current_gdbarch->use_struct_convention = generic_use_struct_convention; |
85de9627 AC |
512 | current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; |
513 | current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; | |
85de9627 | 514 | current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address; |
42efa47a AC |
515 | current_gdbarch->deprecated_frame_args_address = get_frame_base; |
516 | current_gdbarch->deprecated_frame_locals_address = get_frame_base; | |
192cb3d4 | 517 | current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr; |
e2d0e7eb | 518 | current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity; |
85de9627 | 519 | current_gdbarch->addr_bits_remove = core_addr_identity; |
181c1381 | 520 | current_gdbarch->smash_text_address = core_addr_identity; |
85de9627 | 521 | current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code; |
dea0c52f | 522 | current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver; |
68e9cc94 | 523 | current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline; |
d50355b6 | 524 | current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline; |
f561f026 | 525 | current_gdbarch->deprecated_pc_in_sigtramp = legacy_pc_in_sigtramp; |
c12260ac | 526 | current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; |
552c04a7 | 527 | current_gdbarch->construct_inferior_arguments = construct_inferior_arguments; |
a2cf933a EZ |
528 | current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special; |
529 | current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special; | |
5720643c | 530 | current_gdbarch->name_of_malloc = "malloc"; |
b59ff9d5 | 531 | current_gdbarch->register_reggroup_p = default_register_reggroup_p; |
0f71a2f6 JM |
532 | /* gdbarch_alloc() */ |
533 | ||
85de9627 | 534 | return current_gdbarch; |
0f71a2f6 JM |
535 | } |
536 | ||
537 | ||
aebd7893 AC |
538 | /* Allocate extra space using the per-architecture obstack. */ |
539 | ||
540 | void * | |
541 | gdbarch_obstack_zalloc (struct gdbarch *arch, long size) | |
542 | { | |
543 | void *data = obstack_alloc (arch->obstack, size); | |
544 | memset (data, 0, size); | |
545 | return data; | |
546 | } | |
547 | ||
548 | ||
058f20d5 JB |
549 | /* Free a gdbarch struct. This should never happen in normal |
550 | operation --- once you've created a gdbarch, you keep it around. | |
551 | However, if an architecture's init function encounters an error | |
552 | building the structure, it may need to clean up a partially | |
553 | constructed gdbarch. */ | |
4b9b3959 | 554 | |
058f20d5 JB |
555 | void |
556 | gdbarch_free (struct gdbarch *arch) | |
557 | { | |
aebd7893 | 558 | struct obstack *obstack; |
95160752 | 559 | gdb_assert (arch != NULL); |
aebd7893 AC |
560 | gdb_assert (!arch->initialized_p); |
561 | obstack = arch->obstack; | |
562 | obstack_free (obstack, 0); /* Includes the ARCH. */ | |
563 | xfree (obstack); | |
058f20d5 JB |
564 | } |
565 | ||
566 | ||
db446970 AC |
567 | /* Ensure that all values in a GDBARCH are reasonable. */ |
568 | ||
569 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it | |
570 | just happens to match the global variable ``current_gdbarch''. That | |
571 | way macros refering to that variable get the local and not the global | |
572 | version - ulgh. Once everything is parameterised with gdbarch, this | |
573 | will go away. */ | |
0f71a2f6 | 574 | |
0f71a2f6 | 575 | static void |
db446970 | 576 | verify_gdbarch (struct gdbarch *current_gdbarch) |
0f71a2f6 | 577 | { |
f16a1923 AC |
578 | struct ui_file *log; |
579 | struct cleanup *cleanups; | |
580 | long dummy; | |
581 | char *buf; | |
f16a1923 AC |
582 | log = mem_fileopen (); |
583 | cleanups = make_cleanup_ui_file_delete (log); | |
0f71a2f6 | 584 | /* fundamental */ |
db446970 | 585 | if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) |
f16a1923 | 586 | fprintf_unfiltered (log, "\n\tbyte-order"); |
db446970 | 587 | if (current_gdbarch->bfd_arch_info == NULL) |
f16a1923 | 588 | fprintf_unfiltered (log, "\n\tbfd_arch_info"); |
0f71a2f6 | 589 | /* Check those that need to be defined for the given multi-arch level. */ |
66b43ecb AC |
590 | /* Skip verify of short_bit, invalid_p == 0 */ |
591 | /* Skip verify of int_bit, invalid_p == 0 */ | |
592 | /* Skip verify of long_bit, invalid_p == 0 */ | |
593 | /* Skip verify of long_long_bit, invalid_p == 0 */ | |
594 | /* Skip verify of float_bit, invalid_p == 0 */ | |
595 | /* Skip verify of double_bit, invalid_p == 0 */ | |
596 | /* Skip verify of long_double_bit, invalid_p == 0 */ | |
597 | /* Skip verify of ptr_bit, invalid_p == 0 */ | |
db446970 AC |
598 | if (current_gdbarch->addr_bit == 0) |
599 | current_gdbarch->addr_bit = TARGET_PTR_BIT; | |
c0e8c252 | 600 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
db446970 AC |
601 | if (current_gdbarch->char_signed == -1) |
602 | current_gdbarch->char_signed = 1; | |
cde9ea48 | 603 | /* Skip verify of read_pc, has predicate */ |
be8dfb87 | 604 | /* Skip verify of write_pc, invalid_p == 0 */ |
bd1ce8ba | 605 | /* Skip verify of read_sp, has predicate */ |
39d4ef09 | 606 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
d8124050 AC |
607 | /* Skip verify of pseudo_register_read, has predicate */ |
608 | /* Skip verify of pseudo_register_write, has predicate */ | |
50248794 | 609 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 610 | && (current_gdbarch->num_regs == -1)) |
f16a1923 | 611 | fprintf_unfiltered (log, "\n\tnum_regs"); |
0aba1244 | 612 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
1200cd6e | 613 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
1200cd6e | 614 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
c2169756 | 615 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
60054393 | 616 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
88c72b7d AC |
617 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
618 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ | |
619 | /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */ | |
620 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ | |
621 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ | |
9c04cab7 AC |
622 | /* Skip verify of register_type, has predicate */ |
623 | /* Skip verify of deprecated_register_virtual_type, has predicate */ | |
624 | /* Skip verify of deprecated_register_byte, has predicate */ | |
dadd712e AC |
625 | /* Skip verify of deprecated_register_raw_size, has predicate */ |
626 | /* Skip verify of deprecated_register_virtual_size, has predicate */ | |
a0ed5532 | 627 | /* Skip verify of deprecated_max_register_raw_size, has predicate */ |
a0ed5532 | 628 | /* Skip verify of deprecated_max_register_virtual_size, has predicate */ |
f3be58bc | 629 | /* Skip verify of unwind_dummy_id, has predicate */ |
a59fe496 | 630 | /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */ |
f3be58bc AC |
631 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ |
632 | /* Skip verify of deprecated_target_read_fp, has predicate */ | |
b8de8283 AC |
633 | /* Skip verify of push_dummy_call, has predicate */ |
634 | /* Skip verify of deprecated_push_arguments, has predicate */ | |
635 | /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */ | |
636 | /* Skip verify of deprecated_push_return_address, has predicate */ | |
637 | /* Skip verify of deprecated_dummy_write_sp, has predicate */ | |
638 | /* Skip verify of call_dummy_location, invalid_p == 0 */ | |
b8de8283 AC |
639 | /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */ |
640 | /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */ | |
b8de8283 AC |
641 | /* Skip verify of deprecated_fix_call_dummy, has predicate */ |
642 | /* Skip verify of push_dummy_code, has predicate */ | |
643 | /* Skip verify of deprecated_push_dummy_frame, has predicate */ | |
903ad3a6 | 644 | /* Skip verify of deprecated_do_registers_info, has predicate */ |
0ab7a791 | 645 | /* Skip verify of print_registers_info, invalid_p == 0 */ |
23e3a7ac | 646 | /* Skip verify of print_float_info, has predicate */ |
e76f1f2e | 647 | /* Skip verify of print_vector_info, has predicate */ |
7c7651b2 | 648 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
2649061d | 649 | /* Skip verify of register_bytes_ok, has predicate */ |
01fb7433 AC |
650 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
651 | /* Skip verify of cannot_store_register, invalid_p == 0 */ | |
9df628e0 | 652 | /* Skip verify of get_longjmp_target, has predicate */ |
ae45cd16 | 653 | /* Skip verify of deprecated_pc_in_call_dummy, has predicate */ |
2ca6c561 | 654 | /* Skip verify of deprecated_init_frame_pc_first, has predicate */ |
a5afb99f | 655 | /* Skip verify of deprecated_init_frame_pc, has predicate */ |
129c1cd6 | 656 | /* Skip verify of deprecated_get_saved_register, has predicate */ |
cd0bfa36 | 657 | /* Skip verify of deprecated_register_convertible, has predicate */ |
781a750d AC |
658 | /* Skip verify of deprecated_register_convert_to_virtual, invalid_p == 0 */ |
659 | /* Skip verify of deprecated_register_convert_to_raw, invalid_p == 0 */ | |
13d01224 AC |
660 | /* Skip verify of convert_register_p, invalid_p == 0 */ |
661 | /* Skip verify of register_to_value, invalid_p == 0 */ | |
662 | /* Skip verify of value_to_register, invalid_p == 0 */ | |
4478b372 JB |
663 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
664 | /* Skip verify of address_to_pointer, invalid_p == 0 */ | |
fc0c74b1 | 665 | /* Skip verify of integer_to_address, has predicate */ |
749b82f6 | 666 | /* Skip verify of deprecated_pop_frame, has predicate */ |
4183d812 | 667 | /* Skip verify of deprecated_store_struct_return, has predicate */ |
92ad9cd9 AC |
668 | /* Skip verify of return_value, has predicate */ |
669 | /* Skip verify of return_value_on_stack, invalid_p == 0 */ | |
ebba8386 AC |
670 | /* Skip verify of extract_return_value, invalid_p == 0 */ |
671 | /* Skip verify of store_return_value, invalid_p == 0 */ | |
92ad9cd9 | 672 | /* Skip verify of use_struct_convention, invalid_p == 0 */ |
74055713 | 673 | /* Skip verify of deprecated_extract_struct_value_address, has predicate */ |
f30ee0bc | 674 | /* Skip verify of deprecated_frame_init_saved_regs, has predicate */ |
e9582e71 | 675 | /* Skip verify of deprecated_init_extra_frame_info, has predicate */ |
50248794 | 676 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 677 | && (current_gdbarch->skip_prologue == 0)) |
f16a1923 | 678 | fprintf_unfiltered (log, "\n\tskip_prologue"); |
50248794 | 679 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 680 | && (current_gdbarch->inner_than == 0)) |
f16a1923 | 681 | fprintf_unfiltered (log, "\n\tinner_than"); |
aaab4dba | 682 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 683 | && (current_gdbarch->breakpoint_from_pc == 0)) |
aaab4dba | 684 | fprintf_unfiltered (log, "\n\tbreakpoint_from_pc"); |
a1131521 | 685 | /* Skip verify of adjust_breakpoint_address, has predicate */ |
c0e8c252 AC |
686 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ |
687 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ | |
71bd6bd4 | 688 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
6503b91e | 689 | /* Skip verify of function_start_offset, invalid_p == 0 */ |
c0e8c252 | 690 | /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */ |
5867a2fb | 691 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
19772a2c | 692 | /* Skip verify of deprecated_frameless_function_invocation, has predicate */ |
618ce49f AC |
693 | /* Skip verify of deprecated_frame_chain, has predicate */ |
694 | /* Skip verify of deprecated_frame_chain_valid, has predicate */ | |
8bedc050 | 695 | /* Skip verify of deprecated_frame_saved_pc, has predicate */ |
12cc2063 | 696 | /* Skip verify of unwind_pc, has predicate */ |
a9e5fdc2 | 697 | /* Skip verify of unwind_sp, has predicate */ |
42efa47a AC |
698 | /* Skip verify of deprecated_frame_args_address, has predicate */ |
699 | /* Skip verify of deprecated_frame_locals_address, has predicate */ | |
6913c89a | 700 | /* Skip verify of deprecated_saved_pc_after_call, has predicate */ |
983a287a | 701 | /* Skip verify of frame_num_args, has predicate */ |
f27dd7fd | 702 | /* Skip verify of deprecated_stack_align, has predicate */ |
dc604539 | 703 | /* Skip verify of frame_align, has predicate */ |
88d89dbb | 704 | /* Skip verify of deprecated_reg_struct_has_addr, has predicate */ |
192cb3d4 | 705 | /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */ |
db446970 AC |
706 | if (current_gdbarch->float_format == 0) |
707 | current_gdbarch->float_format = default_float_format (current_gdbarch); | |
708 | if (current_gdbarch->double_format == 0) | |
709 | current_gdbarch->double_format = default_double_format (current_gdbarch); | |
710 | if (current_gdbarch->long_double_format == 0) | |
711 | current_gdbarch->long_double_format = default_double_format (current_gdbarch); | |
f517ea4e | 712 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
875e1767 | 713 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
181c1381 | 714 | /* Skip verify of smash_text_address, invalid_p == 0 */ |
64c4637f | 715 | /* Skip verify of software_single_step, has predicate */ |
f6c40618 | 716 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 717 | && (current_gdbarch->print_insn == 0)) |
f6c40618 | 718 | fprintf_unfiltered (log, "\n\tprint_insn"); |
bdcd319a | 719 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
dea0c52f | 720 | /* Skip verify of skip_solib_resolver, invalid_p == 0 */ |
68e9cc94 | 721 | /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */ |
d50355b6 | 722 | /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ |
f561f026 | 723 | /* Skip verify of deprecated_pc_in_sigtramp, has predicate */ |
aa2a3f87 AC |
724 | /* Skip verify of deprecated_sigtramp_start, has predicate */ |
725 | /* Skip verify of deprecated_sigtramp_end, has predicate */ | |
c12260ac | 726 | /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ |
552c04a7 | 727 | /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ |
a2cf933a EZ |
728 | /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ |
729 | /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ | |
5720643c | 730 | /* Skip verify of name_of_malloc, invalid_p == 0 */ |
c4ed33b9 | 731 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ |
f74fa174 | 732 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ |
8b2dbe47 KB |
733 | /* Skip verify of address_class_type_flags, has predicate */ |
734 | /* Skip verify of address_class_type_flags_to_name, has predicate */ | |
735 | /* Skip verify of address_class_name_to_type_flags, has predicate */ | |
7e20f3fb | 736 | /* Skip verify of register_reggroup_p, invalid_p == 0 */ |
143985b7 | 737 | /* Skip verify of fetch_pointer_argument, has predicate */ |
6ce6d90f | 738 | /* Skip verify of regset_from_core_section, has predicate */ |
f16a1923 AC |
739 | buf = ui_file_xstrdup (log, &dummy); |
740 | make_cleanup (xfree, buf); | |
741 | if (strlen (buf) > 0) | |
742 | internal_error (__FILE__, __LINE__, | |
743 | "verify_gdbarch: the following are invalid ...%s", | |
744 | buf); | |
745 | do_cleanups (cleanups); | |
0f71a2f6 JM |
746 | } |
747 | ||
748 | ||
749 | /* Print out the details of the current architecture. */ | |
750 | ||
4b9b3959 AC |
751 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it |
752 | just happens to match the global variable ``current_gdbarch''. That | |
753 | way macros refering to that variable get the local and not the global | |
754 | version - ulgh. Once everything is parameterised with gdbarch, this | |
755 | will go away. */ | |
756 | ||
0f71a2f6 | 757 | void |
db446970 | 758 | gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) |
0f71a2f6 | 759 | { |
4b9b3959 AC |
760 | fprintf_unfiltered (file, |
761 | "gdbarch_dump: GDB_MULTI_ARCH = %d\n", | |
762 | GDB_MULTI_ARCH); | |
e2d0e7eb AC |
763 | fprintf_unfiltered (file, |
764 | "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n", | |
765 | (long) current_gdbarch->convert_from_func_ptr_addr); | |
7996bcec AC |
766 | fprintf_unfiltered (file, |
767 | "gdbarch_dump: gdbarch_frame_align_p() = %d\n", | |
768 | gdbarch_frame_align_p (current_gdbarch)); | |
769 | fprintf_unfiltered (file, | |
770 | "gdbarch_dump: frame_align = 0x%08lx\n", | |
771 | (long) current_gdbarch->frame_align); | |
6ce6d90f MK |
772 | fprintf_unfiltered (file, |
773 | "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n", | |
774 | gdbarch_regset_from_core_section_p (current_gdbarch)); | |
775 | fprintf_unfiltered (file, | |
776 | "gdbarch_dump: regset_from_core_section = 0x%08lx\n", | |
777 | (long) current_gdbarch->regset_from_core_section); | |
92ad9cd9 AC |
778 | fprintf_unfiltered (file, |
779 | "gdbarch_dump: gdbarch_return_value_p() = %d\n", | |
780 | gdbarch_return_value_p (current_gdbarch)); | |
781 | fprintf_unfiltered (file, | |
782 | "gdbarch_dump: return_value = 0x%08lx\n", | |
783 | (long) current_gdbarch->return_value); | |
7996bcec AC |
784 | fprintf_unfiltered (file, |
785 | "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n", | |
786 | (long) current_gdbarch->in_function_epilogue_p); | |
787 | fprintf_unfiltered (file, | |
788 | "gdbarch_dump: register_reggroup_p = 0x%08lx\n", | |
789 | (long) current_gdbarch->register_reggroup_p); | |
192cb3d4 MK |
790 | fprintf_unfiltered (file, |
791 | "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n", | |
792 | (long) current_gdbarch->stabs_argument_has_addr); | |
7996bcec AC |
793 | fprintf_unfiltered (file, |
794 | "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n", | |
795 | gdbarch_pseudo_register_read_p (current_gdbarch)); | |
796 | fprintf_unfiltered (file, | |
797 | "gdbarch_dump: pseudo_register_read = 0x%08lx\n", | |
798 | (long) current_gdbarch->pseudo_register_read); | |
799 | fprintf_unfiltered (file, | |
800 | "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", | |
801 | gdbarch_pseudo_register_write_p (current_gdbarch)); | |
802 | fprintf_unfiltered (file, | |
803 | "gdbarch_dump: pseudo_register_write = 0x%08lx\n", | |
804 | (long) current_gdbarch->pseudo_register_write); | |
805 | fprintf_unfiltered (file, | |
806 | "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n", | |
807 | gdbarch_address_class_name_to_type_flags_p (current_gdbarch)); | |
808 | fprintf_unfiltered (file, | |
809 | "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n", | |
810 | (long) current_gdbarch->address_class_name_to_type_flags); | |
1e9f55d0 AC |
811 | #ifdef ADDRESS_CLASS_TYPE_FLAGS_P |
812 | fprintf_unfiltered (file, | |
813 | "gdbarch_dump: %s # %s\n", | |
814 | "ADDRESS_CLASS_TYPE_FLAGS_P()", | |
815 | XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ())); | |
816 | fprintf_unfiltered (file, | |
817 | "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n", | |
818 | ADDRESS_CLASS_TYPE_FLAGS_P ()); | |
819 | #endif | |
8b2dbe47 KB |
820 | #ifdef ADDRESS_CLASS_TYPE_FLAGS |
821 | fprintf_unfiltered (file, | |
822 | "gdbarch_dump: %s # %s\n", | |
823 | "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)", | |
824 | XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class))); | |
7996bcec AC |
825 | fprintf_unfiltered (file, |
826 | "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n", | |
827 | (long) current_gdbarch->address_class_type_flags | |
828 | /*ADDRESS_CLASS_TYPE_FLAGS ()*/); | |
8b2dbe47 | 829 | #endif |
7996bcec AC |
830 | fprintf_unfiltered (file, |
831 | "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n", | |
832 | gdbarch_address_class_type_flags_to_name_p (current_gdbarch)); | |
833 | fprintf_unfiltered (file, | |
834 | "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n", | |
835 | (long) current_gdbarch->address_class_type_flags_to_name); | |
08e45a40 | 836 | #ifdef ADDRESS_TO_POINTER |
4b9b3959 | 837 | fprintf_unfiltered (file, |
08e45a40 AC |
838 | "gdbarch_dump: %s # %s\n", |
839 | "ADDRESS_TO_POINTER(type, buf, addr)", | |
840 | XSTRING (ADDRESS_TO_POINTER (type, buf, addr))); | |
7996bcec AC |
841 | fprintf_unfiltered (file, |
842 | "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n", | |
843 | (long) current_gdbarch->address_to_pointer | |
844 | /*ADDRESS_TO_POINTER ()*/); | |
4b9b3959 | 845 | #endif |
5e74b15c RE |
846 | #ifdef ADDR_BITS_REMOVE |
847 | fprintf_unfiltered (file, | |
848 | "gdbarch_dump: %s # %s\n", | |
849 | "ADDR_BITS_REMOVE(addr)", | |
850 | XSTRING (ADDR_BITS_REMOVE (addr))); | |
7996bcec AC |
851 | fprintf_unfiltered (file, |
852 | "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n", | |
853 | (long) current_gdbarch->addr_bits_remove | |
854 | /*ADDR_BITS_REMOVE ()*/); | |
5e74b15c | 855 | #endif |
a1131521 KB |
856 | fprintf_unfiltered (file, |
857 | "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n", | |
858 | gdbarch_adjust_breakpoint_address_p (current_gdbarch)); | |
859 | fprintf_unfiltered (file, | |
860 | "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n", | |
861 | (long) current_gdbarch->adjust_breakpoint_address); | |
08e45a40 | 862 | #ifdef BELIEVE_PCC_PROMOTION |
4b9b3959 | 863 | fprintf_unfiltered (file, |
08e45a40 AC |
864 | "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n", |
865 | XSTRING (BELIEVE_PCC_PROMOTION)); | |
866 | fprintf_unfiltered (file, | |
06b25f14 AC |
867 | "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n", |
868 | BELIEVE_PCC_PROMOTION); | |
4b9b3959 | 869 | #endif |
08e45a40 | 870 | #ifdef BELIEVE_PCC_PROMOTION_TYPE |
4b9b3959 | 871 | fprintf_unfiltered (file, |
08e45a40 AC |
872 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n", |
873 | XSTRING (BELIEVE_PCC_PROMOTION_TYPE)); | |
874 | fprintf_unfiltered (file, | |
06b25f14 AC |
875 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n", |
876 | BELIEVE_PCC_PROMOTION_TYPE); | |
4b9b3959 | 877 | #endif |
08e45a40 | 878 | #ifdef BREAKPOINT_FROM_PC |
4b9b3959 | 879 | fprintf_unfiltered (file, |
08e45a40 AC |
880 | "gdbarch_dump: %s # %s\n", |
881 | "BREAKPOINT_FROM_PC(pcptr, lenptr)", | |
882 | XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr))); | |
7996bcec AC |
883 | fprintf_unfiltered (file, |
884 | "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n", | |
885 | (long) current_gdbarch->breakpoint_from_pc | |
886 | /*BREAKPOINT_FROM_PC ()*/); | |
4b9b3959 | 887 | #endif |
08e45a40 | 888 | #ifdef CALL_DUMMY_LOCATION |
52204a0b | 889 | fprintf_unfiltered (file, |
08e45a40 AC |
890 | "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", |
891 | XSTRING (CALL_DUMMY_LOCATION)); | |
892 | fprintf_unfiltered (file, | |
06b25f14 AC |
893 | "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n", |
894 | CALL_DUMMY_LOCATION); | |
52204a0b | 895 | #endif |
08e45a40 | 896 | #ifdef CANNOT_FETCH_REGISTER |
4b9b3959 AC |
897 | fprintf_unfiltered (file, |
898 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
899 | "CANNOT_FETCH_REGISTER(regnum)", |
900 | XSTRING (CANNOT_FETCH_REGISTER (regnum))); | |
7996bcec AC |
901 | fprintf_unfiltered (file, |
902 | "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n", | |
903 | (long) current_gdbarch->cannot_fetch_register | |
904 | /*CANNOT_FETCH_REGISTER ()*/); | |
4b9b3959 | 905 | #endif |
c4ed33b9 AC |
906 | #ifdef CANNOT_STEP_BREAKPOINT |
907 | fprintf_unfiltered (file, | |
908 | "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n", | |
909 | XSTRING (CANNOT_STEP_BREAKPOINT)); | |
910 | fprintf_unfiltered (file, | |
911 | "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n", | |
912 | CANNOT_STEP_BREAKPOINT); | |
913 | #endif | |
08e45a40 | 914 | #ifdef CANNOT_STORE_REGISTER |
4b9b3959 AC |
915 | fprintf_unfiltered (file, |
916 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
917 | "CANNOT_STORE_REGISTER(regnum)", |
918 | XSTRING (CANNOT_STORE_REGISTER (regnum))); | |
7996bcec AC |
919 | fprintf_unfiltered (file, |
920 | "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n", | |
921 | (long) current_gdbarch->cannot_store_register | |
922 | /*CANNOT_STORE_REGISTER ()*/); | |
4b9b3959 | 923 | #endif |
a2cf933a | 924 | #ifdef COFF_MAKE_MSYMBOL_SPECIAL |
a2cf933a EZ |
925 | fprintf_unfiltered (file, |
926 | "gdbarch_dump: %s # %s\n", | |
927 | "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)", | |
928 | XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym))); | |
7996bcec AC |
929 | fprintf_unfiltered (file, |
930 | "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n", | |
931 | (long) current_gdbarch->coff_make_msymbol_special | |
932 | /*COFF_MAKE_MSYMBOL_SPECIAL ()*/); | |
a2cf933a | 933 | #endif |
7996bcec AC |
934 | fprintf_unfiltered (file, |
935 | "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n", | |
936 | (long) current_gdbarch->construct_inferior_arguments); | |
13d01224 AC |
937 | #ifdef CONVERT_REGISTER_P |
938 | fprintf_unfiltered (file, | |
939 | "gdbarch_dump: %s # %s\n", | |
ff2e87ac AC |
940 | "CONVERT_REGISTER_P(regnum, type)", |
941 | XSTRING (CONVERT_REGISTER_P (regnum, type))); | |
7996bcec AC |
942 | fprintf_unfiltered (file, |
943 | "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n", | |
944 | (long) current_gdbarch->convert_register_p | |
945 | /*CONVERT_REGISTER_P ()*/); | |
13d01224 | 946 | #endif |
08e45a40 | 947 | #ifdef DECR_PC_AFTER_BREAK |
4b9b3959 | 948 | fprintf_unfiltered (file, |
08e45a40 AC |
949 | "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n", |
950 | XSTRING (DECR_PC_AFTER_BREAK)); | |
0aba1244 | 951 | fprintf_unfiltered (file, |
08e45a40 AC |
952 | "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", |
953 | (long) DECR_PC_AFTER_BREAK); | |
0aba1244 | 954 | #endif |
b1e29e33 AC |
955 | #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET |
956 | fprintf_unfiltered (file, | |
957 | "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", | |
958 | XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)); | |
959 | fprintf_unfiltered (file, | |
960 | "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n", | |
961 | (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET); | |
962 | #endif | |
963 | #ifdef DEPRECATED_CALL_DUMMY_LENGTH | |
964 | fprintf_unfiltered (file, | |
965 | "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n", | |
966 | XSTRING (DEPRECATED_CALL_DUMMY_LENGTH)); | |
967 | fprintf_unfiltered (file, | |
968 | "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n", | |
969 | DEPRECATED_CALL_DUMMY_LENGTH); | |
970 | #endif | |
b1e29e33 AC |
971 | #ifdef DEPRECATED_CALL_DUMMY_START_OFFSET |
972 | fprintf_unfiltered (file, | |
973 | "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n", | |
974 | XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET)); | |
975 | fprintf_unfiltered (file, | |
976 | "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n", | |
977 | (long) DEPRECATED_CALL_DUMMY_START_OFFSET); | |
978 | #endif | |
979 | #ifdef DEPRECATED_CALL_DUMMY_WORDS | |
980 | fprintf_unfiltered (file, | |
981 | "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n", | |
982 | XSTRING (DEPRECATED_CALL_DUMMY_WORDS)); | |
983 | fprintf_unfiltered (file, | |
984 | "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n", | |
985 | (long) DEPRECATED_CALL_DUMMY_WORDS); | |
986 | #endif | |
1e9f55d0 AC |
987 | #ifdef DEPRECATED_DO_REGISTERS_INFO_P |
988 | fprintf_unfiltered (file, | |
989 | "gdbarch_dump: %s # %s\n", | |
990 | "DEPRECATED_DO_REGISTERS_INFO_P()", | |
991 | XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ())); | |
992 | fprintf_unfiltered (file, | |
993 | "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n", | |
994 | DEPRECATED_DO_REGISTERS_INFO_P ()); | |
995 | #endif | |
903ad3a6 | 996 | #ifdef DEPRECATED_DO_REGISTERS_INFO |
903ad3a6 AC |
997 | fprintf_unfiltered (file, |
998 | "gdbarch_dump: %s # %s\n", | |
999 | "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)", | |
1000 | XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs))); | |
7996bcec AC |
1001 | fprintf_unfiltered (file, |
1002 | "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n", | |
1003 | (long) current_gdbarch->deprecated_do_registers_info | |
1004 | /*DEPRECATED_DO_REGISTERS_INFO ()*/); | |
903ad3a6 | 1005 | #endif |
6c0e89ed AC |
1006 | #ifdef DEPRECATED_DUMMY_WRITE_SP_P |
1007 | fprintf_unfiltered (file, | |
1008 | "gdbarch_dump: %s # %s\n", | |
1009 | "DEPRECATED_DUMMY_WRITE_SP_P()", | |
1010 | XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ())); | |
1011 | fprintf_unfiltered (file, | |
1012 | "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n", | |
1013 | DEPRECATED_DUMMY_WRITE_SP_P ()); | |
1014 | #endif | |
1015 | #ifdef DEPRECATED_DUMMY_WRITE_SP | |
6c0e89ed AC |
1016 | fprintf_unfiltered (file, |
1017 | "gdbarch_dump: %s # %s\n", | |
1018 | "DEPRECATED_DUMMY_WRITE_SP(val)", | |
1019 | XSTRING (DEPRECATED_DUMMY_WRITE_SP (val))); | |
7996bcec AC |
1020 | fprintf_unfiltered (file, |
1021 | "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n", | |
1022 | (long) current_gdbarch->deprecated_dummy_write_sp | |
1023 | /*DEPRECATED_DUMMY_WRITE_SP ()*/); | |
6c0e89ed | 1024 | #endif |
26e9b323 | 1025 | #ifdef DEPRECATED_EXTRACT_RETURN_VALUE |
26e9b323 AC |
1026 | fprintf_unfiltered (file, |
1027 | "gdbarch_dump: %s # %s\n", | |
1028 | "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", | |
1029 | XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); | |
7996bcec AC |
1030 | fprintf_unfiltered (file, |
1031 | "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n", | |
1032 | (long) current_gdbarch->deprecated_extract_return_value | |
1033 | /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/); | |
26e9b323 | 1034 | #endif |
74055713 AC |
1035 | #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P |
1036 | fprintf_unfiltered (file, | |
1037 | "gdbarch_dump: %s # %s\n", | |
1038 | "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()", | |
1039 | XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())); | |
1040 | fprintf_unfiltered (file, | |
1041 | "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n", | |
1042 | DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()); | |
1043 | #endif | |
1044 | #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS | |
1045 | fprintf_unfiltered (file, | |
1046 | "gdbarch_dump: %s # %s\n", | |
1047 | "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)", | |
1048 | XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache))); | |
1049 | fprintf_unfiltered (file, | |
1050 | "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n", | |
1051 | (long) current_gdbarch->deprecated_extract_struct_value_address | |
1052 | /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/); | |
1053 | #endif | |
b1e29e33 AC |
1054 | #ifdef DEPRECATED_FIX_CALL_DUMMY_P |
1055 | fprintf_unfiltered (file, | |
1056 | "gdbarch_dump: %s # %s\n", | |
1057 | "DEPRECATED_FIX_CALL_DUMMY_P()", | |
1058 | XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ())); | |
1059 | fprintf_unfiltered (file, | |
1060 | "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n", | |
1061 | DEPRECATED_FIX_CALL_DUMMY_P ()); | |
1062 | #endif | |
1063 | #ifdef DEPRECATED_FIX_CALL_DUMMY | |
b1e29e33 AC |
1064 | fprintf_unfiltered (file, |
1065 | "gdbarch_dump: %s # %s\n", | |
1066 | "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)", | |
1067 | XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p))); | |
7996bcec AC |
1068 | fprintf_unfiltered (file, |
1069 | "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n", | |
1070 | (long) current_gdbarch->deprecated_fix_call_dummy | |
1071 | /*DEPRECATED_FIX_CALL_DUMMY ()*/); | |
b1e29e33 | 1072 | #endif |
0ba6dca9 AC |
1073 | #ifdef DEPRECATED_FP_REGNUM |
1074 | fprintf_unfiltered (file, | |
1075 | "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n", | |
1076 | XSTRING (DEPRECATED_FP_REGNUM)); | |
1077 | fprintf_unfiltered (file, | |
1078 | "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n", | |
1079 | DEPRECATED_FP_REGNUM); | |
1080 | #endif | |
19772a2c AC |
1081 | #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P |
1082 | fprintf_unfiltered (file, | |
1083 | "gdbarch_dump: %s # %s\n", | |
1084 | "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()", | |
1085 | XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ())); | |
1086 | fprintf_unfiltered (file, | |
1087 | "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n", | |
1088 | DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()); | |
1089 | #endif | |
1090 | #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION | |
1091 | fprintf_unfiltered (file, | |
1092 | "gdbarch_dump: %s # %s\n", | |
1093 | "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)", | |
1094 | XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi))); | |
1095 | fprintf_unfiltered (file, | |
1096 | "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n", | |
1097 | (long) current_gdbarch->deprecated_frameless_function_invocation | |
1098 | /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/); | |
1099 | #endif | |
42efa47a AC |
1100 | #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P |
1101 | fprintf_unfiltered (file, | |
1102 | "gdbarch_dump: %s # %s\n", | |
1103 | "DEPRECATED_FRAME_ARGS_ADDRESS_P()", | |
1104 | XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ())); | |
1105 | fprintf_unfiltered (file, | |
1106 | "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n", | |
1107 | DEPRECATED_FRAME_ARGS_ADDRESS_P ()); | |
1108 | #endif | |
1109 | #ifdef DEPRECATED_FRAME_ARGS_ADDRESS | |
1110 | fprintf_unfiltered (file, | |
1111 | "gdbarch_dump: %s # %s\n", | |
1112 | "DEPRECATED_FRAME_ARGS_ADDRESS(fi)", | |
1113 | XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi))); | |
7996bcec AC |
1114 | fprintf_unfiltered (file, |
1115 | "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n", | |
1116 | (long) current_gdbarch->deprecated_frame_args_address | |
1117 | /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/); | |
42efa47a | 1118 | #endif |
618ce49f AC |
1119 | #ifdef DEPRECATED_FRAME_CHAIN_P |
1120 | fprintf_unfiltered (file, | |
1121 | "gdbarch_dump: %s # %s\n", | |
1122 | "DEPRECATED_FRAME_CHAIN_P()", | |
1123 | XSTRING (DEPRECATED_FRAME_CHAIN_P ())); | |
1124 | fprintf_unfiltered (file, | |
1125 | "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n", | |
1126 | DEPRECATED_FRAME_CHAIN_P ()); | |
1127 | #endif | |
1128 | #ifdef DEPRECATED_FRAME_CHAIN | |
1129 | fprintf_unfiltered (file, | |
1130 | "gdbarch_dump: %s # %s\n", | |
1131 | "DEPRECATED_FRAME_CHAIN(frame)", | |
1132 | XSTRING (DEPRECATED_FRAME_CHAIN (frame))); | |
7996bcec AC |
1133 | fprintf_unfiltered (file, |
1134 | "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n", | |
1135 | (long) current_gdbarch->deprecated_frame_chain | |
1136 | /*DEPRECATED_FRAME_CHAIN ()*/); | |
618ce49f AC |
1137 | #endif |
1138 | #ifdef DEPRECATED_FRAME_CHAIN_VALID_P | |
1139 | fprintf_unfiltered (file, | |
1140 | "gdbarch_dump: %s # %s\n", | |
1141 | "DEPRECATED_FRAME_CHAIN_VALID_P()", | |
1142 | XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ())); | |
1143 | fprintf_unfiltered (file, | |
1144 | "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n", | |
1145 | DEPRECATED_FRAME_CHAIN_VALID_P ()); | |
1146 | #endif | |
1147 | #ifdef DEPRECATED_FRAME_CHAIN_VALID | |
1148 | fprintf_unfiltered (file, | |
1149 | "gdbarch_dump: %s # %s\n", | |
1150 | "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)", | |
1151 | XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe))); | |
7996bcec AC |
1152 | fprintf_unfiltered (file, |
1153 | "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n", | |
1154 | (long) current_gdbarch->deprecated_frame_chain_valid | |
1155 | /*DEPRECATED_FRAME_CHAIN_VALID ()*/); | |
618ce49f | 1156 | #endif |
f30ee0bc AC |
1157 | #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P |
1158 | fprintf_unfiltered (file, | |
1159 | "gdbarch_dump: %s # %s\n", | |
1160 | "DEPRECATED_FRAME_INIT_SAVED_REGS_P()", | |
1161 | XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ())); | |
1162 | fprintf_unfiltered (file, | |
1163 | "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n", | |
1164 | DEPRECATED_FRAME_INIT_SAVED_REGS_P ()); | |
1165 | #endif | |
1166 | #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS | |
f30ee0bc AC |
1167 | fprintf_unfiltered (file, |
1168 | "gdbarch_dump: %s # %s\n", | |
1169 | "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)", | |
1170 | XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame))); | |
7996bcec AC |
1171 | fprintf_unfiltered (file, |
1172 | "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n", | |
1173 | (long) current_gdbarch->deprecated_frame_init_saved_regs | |
1174 | /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/); | |
f30ee0bc | 1175 | #endif |
42efa47a AC |
1176 | #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P |
1177 | fprintf_unfiltered (file, | |
1178 | "gdbarch_dump: %s # %s\n", | |
1179 | "DEPRECATED_FRAME_LOCALS_ADDRESS_P()", | |
1180 | XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ())); | |
1181 | fprintf_unfiltered (file, | |
1182 | "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n", | |
1183 | DEPRECATED_FRAME_LOCALS_ADDRESS_P ()); | |
1184 | #endif | |
1185 | #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS | |
1186 | fprintf_unfiltered (file, | |
1187 | "gdbarch_dump: %s # %s\n", | |
1188 | "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)", | |
1189 | XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi))); | |
7996bcec AC |
1190 | fprintf_unfiltered (file, |
1191 | "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n", | |
1192 | (long) current_gdbarch->deprecated_frame_locals_address | |
1193 | /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/); | |
42efa47a | 1194 | #endif |
8bedc050 AC |
1195 | #ifdef DEPRECATED_FRAME_SAVED_PC_P |
1196 | fprintf_unfiltered (file, | |
1197 | "gdbarch_dump: %s # %s\n", | |
1198 | "DEPRECATED_FRAME_SAVED_PC_P()", | |
1199 | XSTRING (DEPRECATED_FRAME_SAVED_PC_P ())); | |
1200 | fprintf_unfiltered (file, | |
1201 | "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n", | |
1202 | DEPRECATED_FRAME_SAVED_PC_P ()); | |
1203 | #endif | |
1204 | #ifdef DEPRECATED_FRAME_SAVED_PC | |
1205 | fprintf_unfiltered (file, | |
1206 | "gdbarch_dump: %s # %s\n", | |
1207 | "DEPRECATED_FRAME_SAVED_PC(fi)", | |
1208 | XSTRING (DEPRECATED_FRAME_SAVED_PC (fi))); | |
7996bcec AC |
1209 | fprintf_unfiltered (file, |
1210 | "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n", | |
1211 | (long) current_gdbarch->deprecated_frame_saved_pc | |
1212 | /*DEPRECATED_FRAME_SAVED_PC ()*/); | |
8bedc050 | 1213 | #endif |
129c1cd6 AC |
1214 | #ifdef DEPRECATED_GET_SAVED_REGISTER_P |
1215 | fprintf_unfiltered (file, | |
1216 | "gdbarch_dump: %s # %s\n", | |
1217 | "DEPRECATED_GET_SAVED_REGISTER_P()", | |
1218 | XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ())); | |
1219 | fprintf_unfiltered (file, | |
1220 | "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n", | |
1221 | DEPRECATED_GET_SAVED_REGISTER_P ()); | |
1222 | #endif | |
1223 | #ifdef DEPRECATED_GET_SAVED_REGISTER | |
129c1cd6 AC |
1224 | fprintf_unfiltered (file, |
1225 | "gdbarch_dump: %s # %s\n", | |
1226 | "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)", | |
1227 | XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval))); | |
7996bcec AC |
1228 | fprintf_unfiltered (file, |
1229 | "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n", | |
1230 | (long) current_gdbarch->deprecated_get_saved_register | |
1231 | /*DEPRECATED_GET_SAVED_REGISTER ()*/); | |
129c1cd6 | 1232 | #endif |
e9582e71 AC |
1233 | #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P |
1234 | fprintf_unfiltered (file, | |
1235 | "gdbarch_dump: %s # %s\n", | |
1236 | "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()", | |
1237 | XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ())); | |
1238 | fprintf_unfiltered (file, | |
1239 | "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n", | |
1240 | DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()); | |
1241 | #endif | |
1242 | #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO | |
e9582e71 AC |
1243 | fprintf_unfiltered (file, |
1244 | "gdbarch_dump: %s # %s\n", | |
1245 | "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)", | |
1246 | XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame))); | |
7996bcec AC |
1247 | fprintf_unfiltered (file, |
1248 | "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n", | |
1249 | (long) current_gdbarch->deprecated_init_extra_frame_info | |
1250 | /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/); | |
e9582e71 | 1251 | #endif |
a5afb99f AC |
1252 | #ifdef DEPRECATED_INIT_FRAME_PC_P |
1253 | fprintf_unfiltered (file, | |
1254 | "gdbarch_dump: %s # %s\n", | |
1255 | "DEPRECATED_INIT_FRAME_PC_P()", | |
1256 | XSTRING (DEPRECATED_INIT_FRAME_PC_P ())); | |
1257 | fprintf_unfiltered (file, | |
1258 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n", | |
1259 | DEPRECATED_INIT_FRAME_PC_P ()); | |
1260 | #endif | |
1261 | #ifdef DEPRECATED_INIT_FRAME_PC | |
1262 | fprintf_unfiltered (file, | |
1263 | "gdbarch_dump: %s # %s\n", | |
1264 | "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)", | |
1265 | XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev))); | |
7996bcec AC |
1266 | fprintf_unfiltered (file, |
1267 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n", | |
1268 | (long) current_gdbarch->deprecated_init_frame_pc | |
1269 | /*DEPRECATED_INIT_FRAME_PC ()*/); | |
a5afb99f | 1270 | #endif |
2ca6c561 AC |
1271 | #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P |
1272 | fprintf_unfiltered (file, | |
1273 | "gdbarch_dump: %s # %s\n", | |
1274 | "DEPRECATED_INIT_FRAME_PC_FIRST_P()", | |
1275 | XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ())); | |
1276 | fprintf_unfiltered (file, | |
1277 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n", | |
1278 | DEPRECATED_INIT_FRAME_PC_FIRST_P ()); | |
1279 | #endif | |
1280 | #ifdef DEPRECATED_INIT_FRAME_PC_FIRST | |
2ca6c561 AC |
1281 | fprintf_unfiltered (file, |
1282 | "gdbarch_dump: %s # %s\n", | |
1283 | "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)", | |
1284 | XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev))); | |
7996bcec AC |
1285 | fprintf_unfiltered (file, |
1286 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n", | |
1287 | (long) current_gdbarch->deprecated_init_frame_pc_first | |
1288 | /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/); | |
2ca6c561 | 1289 | #endif |
a0ed5532 AC |
1290 | #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P |
1291 | fprintf_unfiltered (file, | |
1292 | "gdbarch_dump: %s # %s\n", | |
1293 | "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()", | |
1294 | XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ())); | |
1295 | fprintf_unfiltered (file, | |
1296 | "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n", | |
1297 | DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()); | |
1298 | #endif | |
1299 | #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE | |
1300 | fprintf_unfiltered (file, | |
1301 | "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n", | |
1302 | XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE)); | |
1303 | fprintf_unfiltered (file, | |
1304 | "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n", | |
1305 | DEPRECATED_MAX_REGISTER_RAW_SIZE); | |
1306 | #endif | |
1307 | #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P | |
1308 | fprintf_unfiltered (file, | |
1309 | "gdbarch_dump: %s # %s\n", | |
1310 | "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()", | |
1311 | XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ())); | |
1312 | fprintf_unfiltered (file, | |
1313 | "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n", | |
1314 | DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()); | |
1315 | #endif | |
1316 | #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE | |
1317 | fprintf_unfiltered (file, | |
1318 | "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n", | |
1319 | XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE)); | |
1320 | fprintf_unfiltered (file, | |
1321 | "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n", | |
1322 | DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE); | |
1323 | #endif | |
1e9f55d0 AC |
1324 | #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P |
1325 | fprintf_unfiltered (file, | |
1326 | "gdbarch_dump: %s # %s\n", | |
1327 | "DEPRECATED_PC_IN_CALL_DUMMY_P()", | |
1328 | XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ())); | |
1329 | fprintf_unfiltered (file, | |
1330 | "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n", | |
1331 | DEPRECATED_PC_IN_CALL_DUMMY_P ()); | |
1332 | #endif | |
ae45cd16 AC |
1333 | #ifdef DEPRECATED_PC_IN_CALL_DUMMY |
1334 | fprintf_unfiltered (file, | |
1335 | "gdbarch_dump: %s # %s\n", | |
1336 | "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)", | |
1337 | XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address))); | |
7996bcec AC |
1338 | fprintf_unfiltered (file, |
1339 | "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n", | |
1340 | (long) current_gdbarch->deprecated_pc_in_call_dummy | |
1341 | /*DEPRECATED_PC_IN_CALL_DUMMY ()*/); | |
ae45cd16 | 1342 | #endif |
f561f026 AC |
1343 | #ifdef DEPRECATED_PC_IN_SIGTRAMP_P |
1344 | fprintf_unfiltered (file, | |
1345 | "gdbarch_dump: %s # %s\n", | |
1346 | "DEPRECATED_PC_IN_SIGTRAMP_P()", | |
1347 | XSTRING (DEPRECATED_PC_IN_SIGTRAMP_P ())); | |
1348 | fprintf_unfiltered (file, | |
1349 | "gdbarch_dump: DEPRECATED_PC_IN_SIGTRAMP_P() = %d\n", | |
1350 | DEPRECATED_PC_IN_SIGTRAMP_P ()); | |
1351 | #endif | |
1352 | #ifdef DEPRECATED_PC_IN_SIGTRAMP | |
1353 | fprintf_unfiltered (file, | |
1354 | "gdbarch_dump: %s # %s\n", | |
1355 | "DEPRECATED_PC_IN_SIGTRAMP(pc, name)", | |
1356 | XSTRING (DEPRECATED_PC_IN_SIGTRAMP (pc, name))); | |
1357 | fprintf_unfiltered (file, | |
1358 | "gdbarch_dump: DEPRECATED_PC_IN_SIGTRAMP = <0x%08lx>\n", | |
1359 | (long) current_gdbarch->deprecated_pc_in_sigtramp | |
1360 | /*DEPRECATED_PC_IN_SIGTRAMP ()*/); | |
1361 | #endif | |
749b82f6 AC |
1362 | #ifdef DEPRECATED_POP_FRAME_P |
1363 | fprintf_unfiltered (file, | |
1364 | "gdbarch_dump: %s # %s\n", | |
1365 | "DEPRECATED_POP_FRAME_P()", | |
1366 | XSTRING (DEPRECATED_POP_FRAME_P ())); | |
1367 | fprintf_unfiltered (file, | |
1368 | "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n", | |
1369 | DEPRECATED_POP_FRAME_P ()); | |
1370 | #endif | |
1371 | #ifdef DEPRECATED_POP_FRAME | |
749b82f6 AC |
1372 | fprintf_unfiltered (file, |
1373 | "gdbarch_dump: %s # %s\n", | |
1374 | "DEPRECATED_POP_FRAME(-)", | |
1375 | XSTRING (DEPRECATED_POP_FRAME (-))); | |
7996bcec AC |
1376 | fprintf_unfiltered (file, |
1377 | "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n", | |
1378 | (long) current_gdbarch->deprecated_pop_frame | |
1379 | /*DEPRECATED_POP_FRAME ()*/); | |
749b82f6 | 1380 | #endif |
b81774d8 AC |
1381 | #ifdef DEPRECATED_PUSH_ARGUMENTS_P |
1382 | fprintf_unfiltered (file, | |
1383 | "gdbarch_dump: %s # %s\n", | |
1384 | "DEPRECATED_PUSH_ARGUMENTS_P()", | |
1385 | XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ())); | |
1386 | fprintf_unfiltered (file, | |
1387 | "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n", | |
1388 | DEPRECATED_PUSH_ARGUMENTS_P ()); | |
1389 | #endif | |
1390 | #ifdef DEPRECATED_PUSH_ARGUMENTS | |
1391 | fprintf_unfiltered (file, | |
1392 | "gdbarch_dump: %s # %s\n", | |
1393 | "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)", | |
1394 | XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr))); | |
7996bcec AC |
1395 | fprintf_unfiltered (file, |
1396 | "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n", | |
1397 | (long) current_gdbarch->deprecated_push_arguments | |
1398 | /*DEPRECATED_PUSH_ARGUMENTS ()*/); | |
b81774d8 | 1399 | #endif |
f3824013 AC |
1400 | #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P |
1401 | fprintf_unfiltered (file, | |
1402 | "gdbarch_dump: %s # %s\n", | |
1403 | "DEPRECATED_PUSH_DUMMY_FRAME_P()", | |
1404 | XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ())); | |
1405 | fprintf_unfiltered (file, | |
1406 | "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n", | |
1407 | DEPRECATED_PUSH_DUMMY_FRAME_P ()); | |
1408 | #endif | |
1409 | #ifdef DEPRECATED_PUSH_DUMMY_FRAME | |
f3824013 AC |
1410 | fprintf_unfiltered (file, |
1411 | "gdbarch_dump: %s # %s\n", | |
1412 | "DEPRECATED_PUSH_DUMMY_FRAME(-)", | |
1413 | XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-))); | |
7996bcec AC |
1414 | fprintf_unfiltered (file, |
1415 | "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n", | |
1416 | (long) current_gdbarch->deprecated_push_dummy_frame | |
1417 | /*DEPRECATED_PUSH_DUMMY_FRAME ()*/); | |
f3824013 | 1418 | #endif |
28f617b3 AC |
1419 | #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P |
1420 | fprintf_unfiltered (file, | |
1421 | "gdbarch_dump: %s # %s\n", | |
1422 | "DEPRECATED_PUSH_RETURN_ADDRESS_P()", | |
1423 | XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ())); | |
1424 | fprintf_unfiltered (file, | |
1425 | "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n", | |
1426 | DEPRECATED_PUSH_RETURN_ADDRESS_P ()); | |
1427 | #endif | |
1428 | #ifdef DEPRECATED_PUSH_RETURN_ADDRESS | |
1429 | fprintf_unfiltered (file, | |
1430 | "gdbarch_dump: %s # %s\n", | |
1431 | "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)", | |
1432 | XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp))); | |
7996bcec AC |
1433 | fprintf_unfiltered (file, |
1434 | "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n", | |
1435 | (long) current_gdbarch->deprecated_push_return_address | |
1436 | /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/); | |
28f617b3 | 1437 | #endif |
62700349 AC |
1438 | #ifdef DEPRECATED_REGISTER_BYTE_P |
1439 | fprintf_unfiltered (file, | |
1440 | "gdbarch_dump: %s # %s\n", | |
1441 | "DEPRECATED_REGISTER_BYTE_P()", | |
1442 | XSTRING (DEPRECATED_REGISTER_BYTE_P ())); | |
1443 | fprintf_unfiltered (file, | |
1444 | "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n", | |
1445 | DEPRECATED_REGISTER_BYTE_P ()); | |
1446 | #endif | |
1447 | #ifdef DEPRECATED_REGISTER_BYTE | |
1448 | fprintf_unfiltered (file, | |
1449 | "gdbarch_dump: %s # %s\n", | |
1450 | "DEPRECATED_REGISTER_BYTE(reg_nr)", | |
1451 | XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr))); | |
1452 | fprintf_unfiltered (file, | |
1453 | "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n", | |
1454 | (long) current_gdbarch->deprecated_register_byte | |
1455 | /*DEPRECATED_REGISTER_BYTE ()*/); | |
1456 | #endif | |
b8b527c5 AC |
1457 | #ifdef DEPRECATED_REGISTER_BYTES |
1458 | fprintf_unfiltered (file, | |
1459 | "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n", | |
1460 | XSTRING (DEPRECATED_REGISTER_BYTES)); | |
1461 | fprintf_unfiltered (file, | |
1462 | "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n", | |
1463 | DEPRECATED_REGISTER_BYTES); | |
1464 | #endif | |
cd0bfa36 AC |
1465 | #ifdef DEPRECATED_REGISTER_CONVERTIBLE_P |
1466 | fprintf_unfiltered (file, | |
1467 | "gdbarch_dump: %s # %s\n", | |
1468 | "DEPRECATED_REGISTER_CONVERTIBLE_P()", | |
1469 | XSTRING (DEPRECATED_REGISTER_CONVERTIBLE_P ())); | |
1470 | fprintf_unfiltered (file, | |
1471 | "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE_P() = %d\n", | |
1472 | DEPRECATED_REGISTER_CONVERTIBLE_P ()); | |
1473 | #endif | |
781a750d AC |
1474 | #ifdef DEPRECATED_REGISTER_CONVERTIBLE |
1475 | fprintf_unfiltered (file, | |
1476 | "gdbarch_dump: %s # %s\n", | |
1477 | "DEPRECATED_REGISTER_CONVERTIBLE(nr)", | |
1478 | XSTRING (DEPRECATED_REGISTER_CONVERTIBLE (nr))); | |
7996bcec AC |
1479 | fprintf_unfiltered (file, |
1480 | "gdbarch_dump: DEPRECATED_REGISTER_CONVERTIBLE = <0x%08lx>\n", | |
1481 | (long) current_gdbarch->deprecated_register_convertible | |
1482 | /*DEPRECATED_REGISTER_CONVERTIBLE ()*/); | |
781a750d AC |
1483 | #endif |
1484 | #ifdef DEPRECATED_REGISTER_CONVERT_TO_RAW | |
781a750d AC |
1485 | fprintf_unfiltered (file, |
1486 | "gdbarch_dump: %s # %s\n", | |
1487 | "DEPRECATED_REGISTER_CONVERT_TO_RAW(type, regnum, from, to)", | |
1488 | XSTRING (DEPRECATED_REGISTER_CONVERT_TO_RAW (type, regnum, from, to))); | |
7996bcec AC |
1489 | fprintf_unfiltered (file, |
1490 | "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_RAW = <0x%08lx>\n", | |
1491 | (long) current_gdbarch->deprecated_register_convert_to_raw | |
1492 | /*DEPRECATED_REGISTER_CONVERT_TO_RAW ()*/); | |
781a750d AC |
1493 | #endif |
1494 | #ifdef DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL | |
781a750d AC |
1495 | fprintf_unfiltered (file, |
1496 | "gdbarch_dump: %s # %s\n", | |
1497 | "DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)", | |
1498 | XSTRING (DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to))); | |
7996bcec AC |
1499 | fprintf_unfiltered (file, |
1500 | "gdbarch_dump: DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n", | |
1501 | (long) current_gdbarch->deprecated_register_convert_to_virtual | |
1502 | /*DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL ()*/); | |
781a750d | 1503 | #endif |
12c266ea AC |
1504 | #ifdef DEPRECATED_REGISTER_RAW_SIZE_P |
1505 | fprintf_unfiltered (file, | |
1506 | "gdbarch_dump: %s # %s\n", | |
1507 | "DEPRECATED_REGISTER_RAW_SIZE_P()", | |
1508 | XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ())); | |
1509 | fprintf_unfiltered (file, | |
1510 | "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n", | |
1511 | DEPRECATED_REGISTER_RAW_SIZE_P ()); | |
1512 | #endif | |
1513 | #ifdef DEPRECATED_REGISTER_RAW_SIZE | |
1514 | fprintf_unfiltered (file, | |
1515 | "gdbarch_dump: %s # %s\n", | |
1516 | "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)", | |
1517 | XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr))); | |
1518 | fprintf_unfiltered (file, | |
1519 | "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n", | |
1520 | (long) current_gdbarch->deprecated_register_raw_size | |
1521 | /*DEPRECATED_REGISTER_RAW_SIZE ()*/); | |
1522 | #endif | |
b1e29e33 AC |
1523 | #ifdef DEPRECATED_REGISTER_SIZE |
1524 | fprintf_unfiltered (file, | |
1525 | "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n", | |
1526 | XSTRING (DEPRECATED_REGISTER_SIZE)); | |
1527 | fprintf_unfiltered (file, | |
1528 | "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n", | |
1529 | DEPRECATED_REGISTER_SIZE); | |
1530 | #endif | |
f30992d4 AC |
1531 | #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P |
1532 | fprintf_unfiltered (file, | |
1533 | "gdbarch_dump: %s # %s\n", | |
1534 | "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()", | |
1535 | XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ())); | |
1536 | fprintf_unfiltered (file, | |
1537 | "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n", | |
1538 | DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()); | |
1539 | #endif | |
1540 | #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE | |
1541 | fprintf_unfiltered (file, | |
1542 | "gdbarch_dump: %s # %s\n", | |
1543 | "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)", | |
1544 | XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr))); | |
1545 | fprintf_unfiltered (file, | |
1546 | "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n", | |
1547 | (long) current_gdbarch->deprecated_register_virtual_size | |
1548 | /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/); | |
1549 | #endif | |
2e092625 AC |
1550 | #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P |
1551 | fprintf_unfiltered (file, | |
1552 | "gdbarch_dump: %s # %s\n", | |
1553 | "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()", | |
1554 | XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ())); | |
1555 | fprintf_unfiltered (file, | |
1556 | "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n", | |
1557 | DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()); | |
1558 | #endif | |
1559 | #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE | |
1560 | fprintf_unfiltered (file, | |
1561 | "gdbarch_dump: %s # %s\n", | |
1562 | "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)", | |
1563 | XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr))); | |
1564 | fprintf_unfiltered (file, | |
1565 | "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n", | |
1566 | (long) current_gdbarch->deprecated_register_virtual_type | |
1567 | /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/); | |
1568 | #endif | |
88d89dbb MK |
1569 | #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P |
1570 | fprintf_unfiltered (file, | |
1571 | "gdbarch_dump: %s # %s\n", | |
1572 | "DEPRECATED_REG_STRUCT_HAS_ADDR_P()", | |
1573 | XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ())); | |
1574 | fprintf_unfiltered (file, | |
1575 | "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n", | |
1576 | DEPRECATED_REG_STRUCT_HAS_ADDR_P ()); | |
1577 | #endif | |
1578 | #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR | |
1579 | fprintf_unfiltered (file, | |
1580 | "gdbarch_dump: %s # %s\n", | |
1581 | "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)", | |
1582 | XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type))); | |
1583 | fprintf_unfiltered (file, | |
1584 | "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n", | |
1585 | (long) current_gdbarch->deprecated_reg_struct_has_addr | |
1586 | /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/); | |
1587 | #endif | |
6913c89a AC |
1588 | #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P |
1589 | fprintf_unfiltered (file, | |
1590 | "gdbarch_dump: %s # %s\n", | |
1591 | "DEPRECATED_SAVED_PC_AFTER_CALL_P()", | |
1592 | XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ())); | |
1593 | fprintf_unfiltered (file, | |
1594 | "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n", | |
1595 | DEPRECATED_SAVED_PC_AFTER_CALL_P ()); | |
1596 | #endif | |
1597 | #ifdef DEPRECATED_SAVED_PC_AFTER_CALL | |
1598 | fprintf_unfiltered (file, | |
1599 | "gdbarch_dump: %s # %s\n", | |
1600 | "DEPRECATED_SAVED_PC_AFTER_CALL(frame)", | |
1601 | XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame))); | |
7996bcec AC |
1602 | fprintf_unfiltered (file, |
1603 | "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n", | |
1604 | (long) current_gdbarch->deprecated_saved_pc_after_call | |
1605 | /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/); | |
6913c89a | 1606 | #endif |
a59fe496 AC |
1607 | #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P |
1608 | fprintf_unfiltered (file, | |
1609 | "gdbarch_dump: %s # %s\n", | |
1610 | "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()", | |
1611 | XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ())); | |
1612 | fprintf_unfiltered (file, | |
1613 | "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n", | |
1614 | DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()); | |
1615 | #endif | |
1616 | #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS | |
a59fe496 AC |
1617 | fprintf_unfiltered (file, |
1618 | "gdbarch_dump: %s # %s\n", | |
1619 | "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)", | |
1620 | XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp))); | |
7996bcec AC |
1621 | fprintf_unfiltered (file, |
1622 | "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n", | |
1623 | (long) current_gdbarch->deprecated_save_dummy_frame_tos | |
1624 | /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/); | |
a59fe496 | 1625 | #endif |
aa2a3f87 AC |
1626 | #ifdef DEPRECATED_SIGTRAMP_END_P |
1627 | fprintf_unfiltered (file, | |
1628 | "gdbarch_dump: %s # %s\n", | |
1629 | "DEPRECATED_SIGTRAMP_END_P()", | |
1630 | XSTRING (DEPRECATED_SIGTRAMP_END_P ())); | |
1631 | fprintf_unfiltered (file, | |
1632 | "gdbarch_dump: DEPRECATED_SIGTRAMP_END_P() = %d\n", | |
1633 | DEPRECATED_SIGTRAMP_END_P ()); | |
1634 | #endif | |
1635 | #ifdef DEPRECATED_SIGTRAMP_END | |
1636 | fprintf_unfiltered (file, | |
1637 | "gdbarch_dump: %s # %s\n", | |
1638 | "DEPRECATED_SIGTRAMP_END(pc)", | |
1639 | XSTRING (DEPRECATED_SIGTRAMP_END (pc))); | |
1640 | fprintf_unfiltered (file, | |
1641 | "gdbarch_dump: DEPRECATED_SIGTRAMP_END = <0x%08lx>\n", | |
1642 | (long) current_gdbarch->deprecated_sigtramp_end | |
1643 | /*DEPRECATED_SIGTRAMP_END ()*/); | |
1644 | #endif | |
1645 | #ifdef DEPRECATED_SIGTRAMP_START_P | |
1646 | fprintf_unfiltered (file, | |
1647 | "gdbarch_dump: %s # %s\n", | |
1648 | "DEPRECATED_SIGTRAMP_START_P()", | |
1649 | XSTRING (DEPRECATED_SIGTRAMP_START_P ())); | |
1650 | fprintf_unfiltered (file, | |
1651 | "gdbarch_dump: DEPRECATED_SIGTRAMP_START_P() = %d\n", | |
1652 | DEPRECATED_SIGTRAMP_START_P ()); | |
1653 | #endif | |
1654 | #ifdef DEPRECATED_SIGTRAMP_START | |
1655 | fprintf_unfiltered (file, | |
1656 | "gdbarch_dump: %s # %s\n", | |
1657 | "DEPRECATED_SIGTRAMP_START(pc)", | |
1658 | XSTRING (DEPRECATED_SIGTRAMP_START (pc))); | |
1659 | fprintf_unfiltered (file, | |
1660 | "gdbarch_dump: DEPRECATED_SIGTRAMP_START = <0x%08lx>\n", | |
1661 | (long) current_gdbarch->deprecated_sigtramp_start | |
1662 | /*DEPRECATED_SIGTRAMP_START ()*/); | |
1663 | #endif | |
b1e29e33 AC |
1664 | #ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS |
1665 | fprintf_unfiltered (file, | |
1666 | "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n", | |
1667 | XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)); | |
1668 | fprintf_unfiltered (file, | |
1669 | "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n", | |
1670 | DEPRECATED_SIZEOF_CALL_DUMMY_WORDS); | |
1671 | #endif | |
f27dd7fd AC |
1672 | #ifdef DEPRECATED_STACK_ALIGN_P |
1673 | fprintf_unfiltered (file, | |
1674 | "gdbarch_dump: %s # %s\n", | |
1675 | "DEPRECATED_STACK_ALIGN_P()", | |
1676 | XSTRING (DEPRECATED_STACK_ALIGN_P ())); | |
1677 | fprintf_unfiltered (file, | |
1678 | "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n", | |
1679 | DEPRECATED_STACK_ALIGN_P ()); | |
1680 | #endif | |
1681 | #ifdef DEPRECATED_STACK_ALIGN | |
1682 | fprintf_unfiltered (file, | |
1683 | "gdbarch_dump: %s # %s\n", | |
1684 | "DEPRECATED_STACK_ALIGN(sp)", | |
1685 | XSTRING (DEPRECATED_STACK_ALIGN (sp))); | |
1686 | fprintf_unfiltered (file, | |
1687 | "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n", | |
1688 | (long) current_gdbarch->deprecated_stack_align | |
1689 | /*DEPRECATED_STACK_ALIGN ()*/); | |
1690 | #endif | |
ebba8386 | 1691 | #ifdef DEPRECATED_STORE_RETURN_VALUE |
ebba8386 AC |
1692 | fprintf_unfiltered (file, |
1693 | "gdbarch_dump: %s # %s\n", | |
1694 | "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)", | |
1695 | XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf))); | |
7996bcec AC |
1696 | fprintf_unfiltered (file, |
1697 | "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n", | |
1698 | (long) current_gdbarch->deprecated_store_return_value | |
1699 | /*DEPRECATED_STORE_RETURN_VALUE ()*/); | |
ebba8386 | 1700 | #endif |
4183d812 AC |
1701 | #ifdef DEPRECATED_STORE_STRUCT_RETURN_P |
1702 | fprintf_unfiltered (file, | |
1703 | "gdbarch_dump: %s # %s\n", | |
1704 | "DEPRECATED_STORE_STRUCT_RETURN_P()", | |
1705 | XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ())); | |
1706 | fprintf_unfiltered (file, | |
1707 | "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n", | |
1708 | DEPRECATED_STORE_STRUCT_RETURN_P ()); | |
1709 | #endif | |
1710 | #ifdef DEPRECATED_STORE_STRUCT_RETURN | |
4183d812 AC |
1711 | fprintf_unfiltered (file, |
1712 | "gdbarch_dump: %s # %s\n", | |
1713 | "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)", | |
1714 | XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp))); | |
7996bcec AC |
1715 | fprintf_unfiltered (file, |
1716 | "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n", | |
1717 | (long) current_gdbarch->deprecated_store_struct_return | |
1718 | /*DEPRECATED_STORE_STRUCT_RETURN ()*/); | |
4183d812 | 1719 | #endif |
0ba6dca9 AC |
1720 | #ifdef DEPRECATED_TARGET_READ_FP_P |
1721 | fprintf_unfiltered (file, | |
1722 | "gdbarch_dump: %s # %s\n", | |
1723 | "DEPRECATED_TARGET_READ_FP_P()", | |
1724 | XSTRING (DEPRECATED_TARGET_READ_FP_P ())); | |
1725 | fprintf_unfiltered (file, | |
1726 | "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n", | |
1727 | DEPRECATED_TARGET_READ_FP_P ()); | |
1728 | #endif | |
1729 | #ifdef DEPRECATED_TARGET_READ_FP | |
1730 | fprintf_unfiltered (file, | |
1731 | "gdbarch_dump: %s # %s\n", | |
1732 | "DEPRECATED_TARGET_READ_FP()", | |
1733 | XSTRING (DEPRECATED_TARGET_READ_FP ())); | |
7996bcec AC |
1734 | fprintf_unfiltered (file, |
1735 | "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n", | |
1736 | (long) current_gdbarch->deprecated_target_read_fp | |
1737 | /*DEPRECATED_TARGET_READ_FP ()*/); | |
0ba6dca9 | 1738 | #endif |
07555a72 AC |
1739 | #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES |
1740 | fprintf_unfiltered (file, | |
1741 | "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n", | |
1742 | XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES)); | |
1743 | fprintf_unfiltered (file, | |
1744 | "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n", | |
1745 | DEPRECATED_USE_GENERIC_DUMMY_FRAMES); | |
1746 | #endif | |
08e45a40 | 1747 | #ifdef DWARF2_REG_TO_REGNUM |
4b9b3959 | 1748 | fprintf_unfiltered (file, |
08e45a40 AC |
1749 | "gdbarch_dump: %s # %s\n", |
1750 | "DWARF2_REG_TO_REGNUM(dwarf2_regnr)", | |
1751 | XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr))); | |
7996bcec AC |
1752 | fprintf_unfiltered (file, |
1753 | "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n", | |
1754 | (long) current_gdbarch->dwarf2_reg_to_regnum | |
1755 | /*DWARF2_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1756 | #endif |
08e45a40 | 1757 | #ifdef DWARF_REG_TO_REGNUM |
88c72b7d AC |
1758 | fprintf_unfiltered (file, |
1759 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1760 | "DWARF_REG_TO_REGNUM(dwarf_regnr)", |
1761 | XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr))); | |
7996bcec AC |
1762 | fprintf_unfiltered (file, |
1763 | "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n", | |
1764 | (long) current_gdbarch->dwarf_reg_to_regnum | |
1765 | /*DWARF_REG_TO_REGNUM ()*/); | |
88c72b7d AC |
1766 | #endif |
1767 | #ifdef ECOFF_REG_TO_REGNUM | |
1768 | fprintf_unfiltered (file, | |
1769 | "gdbarch_dump: %s # %s\n", | |
1770 | "ECOFF_REG_TO_REGNUM(ecoff_regnr)", | |
1771 | XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr))); | |
7996bcec AC |
1772 | fprintf_unfiltered (file, |
1773 | "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n", | |
1774 | (long) current_gdbarch->ecoff_reg_to_regnum | |
1775 | /*ECOFF_REG_TO_REGNUM ()*/); | |
88c72b7d | 1776 | #endif |
a2cf933a | 1777 | #ifdef ELF_MAKE_MSYMBOL_SPECIAL |
a2cf933a EZ |
1778 | fprintf_unfiltered (file, |
1779 | "gdbarch_dump: %s # %s\n", | |
1780 | "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)", | |
1781 | XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym))); | |
7996bcec AC |
1782 | fprintf_unfiltered (file, |
1783 | "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n", | |
1784 | (long) current_gdbarch->elf_make_msymbol_special | |
1785 | /*ELF_MAKE_MSYMBOL_SPECIAL ()*/); | |
a2cf933a | 1786 | #endif |
049ee0e4 | 1787 | #ifdef EXTRACT_RETURN_VALUE |
049ee0e4 AC |
1788 | fprintf_unfiltered (file, |
1789 | "gdbarch_dump: %s # %s\n", | |
1790 | "EXTRACT_RETURN_VALUE(type, regcache, valbuf)", | |
1791 | XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf))); | |
7996bcec AC |
1792 | fprintf_unfiltered (file, |
1793 | "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n", | |
1794 | (long) current_gdbarch->extract_return_value | |
1795 | /*EXTRACT_RETURN_VALUE ()*/); | |
049ee0e4 | 1796 | #endif |
143985b7 AF |
1797 | #ifdef FETCH_POINTER_ARGUMENT_P |
1798 | fprintf_unfiltered (file, | |
1799 | "gdbarch_dump: %s # %s\n", | |
1800 | "FETCH_POINTER_ARGUMENT_P()", | |
1801 | XSTRING (FETCH_POINTER_ARGUMENT_P ())); | |
1802 | fprintf_unfiltered (file, | |
1803 | "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n", | |
1804 | FETCH_POINTER_ARGUMENT_P ()); | |
1805 | #endif | |
1806 | #ifdef FETCH_POINTER_ARGUMENT | |
1807 | fprintf_unfiltered (file, | |
1808 | "gdbarch_dump: %s # %s\n", | |
1809 | "FETCH_POINTER_ARGUMENT(frame, argi, type)", | |
1810 | XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type))); | |
7996bcec AC |
1811 | fprintf_unfiltered (file, |
1812 | "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n", | |
1813 | (long) current_gdbarch->fetch_pointer_argument | |
1814 | /*FETCH_POINTER_ARGUMENT ()*/); | |
143985b7 | 1815 | #endif |
08e45a40 | 1816 | #ifdef FP0_REGNUM |
4b9b3959 | 1817 | fprintf_unfiltered (file, |
08e45a40 AC |
1818 | "gdbarch_dump: FP0_REGNUM # %s\n", |
1819 | XSTRING (FP0_REGNUM)); | |
1820 | fprintf_unfiltered (file, | |
06b25f14 AC |
1821 | "gdbarch_dump: FP0_REGNUM = %d\n", |
1822 | FP0_REGNUM); | |
4b9b3959 | 1823 | #endif |
08e45a40 | 1824 | #ifdef FRAME_ARGS_SKIP |
4b9b3959 | 1825 | fprintf_unfiltered (file, |
08e45a40 AC |
1826 | "gdbarch_dump: FRAME_ARGS_SKIP # %s\n", |
1827 | XSTRING (FRAME_ARGS_SKIP)); | |
4b9b3959 | 1828 | fprintf_unfiltered (file, |
08e45a40 AC |
1829 | "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n", |
1830 | (long) FRAME_ARGS_SKIP); | |
4b9b3959 | 1831 | #endif |
983a287a AC |
1832 | #ifdef FRAME_NUM_ARGS_P |
1833 | fprintf_unfiltered (file, | |
1834 | "gdbarch_dump: %s # %s\n", | |
1835 | "FRAME_NUM_ARGS_P()", | |
1836 | XSTRING (FRAME_NUM_ARGS_P ())); | |
1837 | fprintf_unfiltered (file, | |
1838 | "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n", | |
1839 | FRAME_NUM_ARGS_P ()); | |
1840 | #endif | |
08e45a40 | 1841 | #ifdef FRAME_NUM_ARGS |
01fb7433 AC |
1842 | fprintf_unfiltered (file, |
1843 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1844 | "FRAME_NUM_ARGS(frame)", |
1845 | XSTRING (FRAME_NUM_ARGS (frame))); | |
7996bcec AC |
1846 | fprintf_unfiltered (file, |
1847 | "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n", | |
1848 | (long) current_gdbarch->frame_num_args | |
1849 | /*FRAME_NUM_ARGS ()*/); | |
01fb7433 | 1850 | #endif |
8b148df9 AC |
1851 | #ifdef FRAME_RED_ZONE_SIZE |
1852 | fprintf_unfiltered (file, | |
1853 | "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n", | |
1854 | XSTRING (FRAME_RED_ZONE_SIZE)); | |
1855 | fprintf_unfiltered (file, | |
1856 | "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n", | |
1857 | FRAME_RED_ZONE_SIZE); | |
1858 | #endif | |
08e45a40 | 1859 | #ifdef FUNCTION_START_OFFSET |
4b9b3959 | 1860 | fprintf_unfiltered (file, |
08e45a40 AC |
1861 | "gdbarch_dump: FUNCTION_START_OFFSET # %s\n", |
1862 | XSTRING (FUNCTION_START_OFFSET)); | |
4b9b3959 | 1863 | fprintf_unfiltered (file, |
08e45a40 AC |
1864 | "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", |
1865 | (long) FUNCTION_START_OFFSET); | |
4b9b3959 | 1866 | #endif |
1e9f55d0 AC |
1867 | #ifdef GET_LONGJMP_TARGET_P |
1868 | fprintf_unfiltered (file, | |
1869 | "gdbarch_dump: %s # %s\n", | |
1870 | "GET_LONGJMP_TARGET_P()", | |
1871 | XSTRING (GET_LONGJMP_TARGET_P ())); | |
1872 | fprintf_unfiltered (file, | |
1873 | "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n", | |
1874 | GET_LONGJMP_TARGET_P ()); | |
1875 | #endif | |
9df628e0 RE |
1876 | #ifdef GET_LONGJMP_TARGET |
1877 | fprintf_unfiltered (file, | |
1878 | "gdbarch_dump: %s # %s\n", | |
1879 | "GET_LONGJMP_TARGET(pc)", | |
1880 | XSTRING (GET_LONGJMP_TARGET (pc))); | |
7996bcec AC |
1881 | fprintf_unfiltered (file, |
1882 | "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n", | |
1883 | (long) current_gdbarch->get_longjmp_target | |
1884 | /*GET_LONGJMP_TARGET ()*/); | |
9df628e0 | 1885 | #endif |
967c0d83 | 1886 | #ifdef HAVE_NONSTEPPABLE_WATCHPOINT |
f74fa174 | 1887 | fprintf_unfiltered (file, |
967c0d83 MM |
1888 | "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n", |
1889 | XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT)); | |
f74fa174 | 1890 | fprintf_unfiltered (file, |
967c0d83 MM |
1891 | "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n", |
1892 | HAVE_NONSTEPPABLE_WATCHPOINT); | |
f74fa174 | 1893 | #endif |
08e45a40 | 1894 | #ifdef INNER_THAN |
10312cc4 AC |
1895 | fprintf_unfiltered (file, |
1896 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1897 | "INNER_THAN(lhs, rhs)", |
1898 | XSTRING (INNER_THAN (lhs, rhs))); | |
7996bcec AC |
1899 | fprintf_unfiltered (file, |
1900 | "gdbarch_dump: INNER_THAN = <0x%08lx>\n", | |
1901 | (long) current_gdbarch->inner_than | |
1902 | /*INNER_THAN ()*/); | |
10312cc4 | 1903 | #endif |
1e9f55d0 AC |
1904 | #ifdef INTEGER_TO_ADDRESS_P |
1905 | fprintf_unfiltered (file, | |
1906 | "gdbarch_dump: %s # %s\n", | |
1907 | "INTEGER_TO_ADDRESS_P()", | |
1908 | XSTRING (INTEGER_TO_ADDRESS_P ())); | |
1909 | fprintf_unfiltered (file, | |
1910 | "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n", | |
1911 | INTEGER_TO_ADDRESS_P ()); | |
1912 | #endif | |
fc0c74b1 AC |
1913 | #ifdef INTEGER_TO_ADDRESS |
1914 | fprintf_unfiltered (file, | |
1915 | "gdbarch_dump: %s # %s\n", | |
1916 | "INTEGER_TO_ADDRESS(type, buf)", | |
1917 | XSTRING (INTEGER_TO_ADDRESS (type, buf))); | |
7996bcec AC |
1918 | fprintf_unfiltered (file, |
1919 | "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n", | |
1920 | (long) current_gdbarch->integer_to_address | |
1921 | /*INTEGER_TO_ADDRESS ()*/); | |
fc0c74b1 | 1922 | #endif |
5e74b15c RE |
1923 | #ifdef IN_SOLIB_CALL_TRAMPOLINE |
1924 | fprintf_unfiltered (file, | |
1925 | "gdbarch_dump: %s # %s\n", | |
1926 | "IN_SOLIB_CALL_TRAMPOLINE(pc, name)", | |
1927 | XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name))); | |
7996bcec AC |
1928 | fprintf_unfiltered (file, |
1929 | "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n", | |
1930 | (long) current_gdbarch->in_solib_call_trampoline | |
1931 | /*IN_SOLIB_CALL_TRAMPOLINE ()*/); | |
5e74b15c | 1932 | #endif |
d50355b6 MS |
1933 | #ifdef IN_SOLIB_RETURN_TRAMPOLINE |
1934 | fprintf_unfiltered (file, | |
1935 | "gdbarch_dump: %s # %s\n", | |
1936 | "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)", | |
1937 | XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name))); | |
7996bcec AC |
1938 | fprintf_unfiltered (file, |
1939 | "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n", | |
1940 | (long) current_gdbarch->in_solib_return_trampoline | |
1941 | /*IN_SOLIB_RETURN_TRAMPOLINE ()*/); | |
d50355b6 | 1942 | #endif |
08e45a40 | 1943 | #ifdef MEMORY_INSERT_BREAKPOINT |
4b9b3959 AC |
1944 | fprintf_unfiltered (file, |
1945 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1946 | "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)", |
1947 | XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache))); | |
7996bcec AC |
1948 | fprintf_unfiltered (file, |
1949 | "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n", | |
1950 | (long) current_gdbarch->memory_insert_breakpoint | |
1951 | /*MEMORY_INSERT_BREAKPOINT ()*/); | |
4b9b3959 | 1952 | #endif |
08e45a40 | 1953 | #ifdef MEMORY_REMOVE_BREAKPOINT |
4b9b3959 AC |
1954 | fprintf_unfiltered (file, |
1955 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1956 | "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)", |
1957 | XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache))); | |
7996bcec AC |
1958 | fprintf_unfiltered (file, |
1959 | "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n", | |
1960 | (long) current_gdbarch->memory_remove_breakpoint | |
1961 | /*MEMORY_REMOVE_BREAKPOINT ()*/); | |
4b9b3959 | 1962 | #endif |
5720643c JB |
1963 | #ifdef NAME_OF_MALLOC |
1964 | fprintf_unfiltered (file, | |
1965 | "gdbarch_dump: NAME_OF_MALLOC # %s\n", | |
1966 | XSTRING (NAME_OF_MALLOC)); | |
1967 | fprintf_unfiltered (file, | |
31deffe5 AC |
1968 | "gdbarch_dump: NAME_OF_MALLOC = %s\n", |
1969 | NAME_OF_MALLOC); | |
5720643c | 1970 | #endif |
08e45a40 | 1971 | #ifdef NUM_PSEUDO_REGS |
4b9b3959 | 1972 | fprintf_unfiltered (file, |
08e45a40 AC |
1973 | "gdbarch_dump: NUM_PSEUDO_REGS # %s\n", |
1974 | XSTRING (NUM_PSEUDO_REGS)); | |
1975 | fprintf_unfiltered (file, | |
06b25f14 AC |
1976 | "gdbarch_dump: NUM_PSEUDO_REGS = %d\n", |
1977 | NUM_PSEUDO_REGS); | |
4b9b3959 | 1978 | #endif |
08e45a40 | 1979 | #ifdef NUM_REGS |
7f1b2585 | 1980 | fprintf_unfiltered (file, |
08e45a40 AC |
1981 | "gdbarch_dump: NUM_REGS # %s\n", |
1982 | XSTRING (NUM_REGS)); | |
1983 | fprintf_unfiltered (file, | |
06b25f14 AC |
1984 | "gdbarch_dump: NUM_REGS = %d\n", |
1985 | NUM_REGS); | |
7f1b2585 | 1986 | #endif |
08e45a40 AC |
1987 | #ifdef PARM_BOUNDARY |
1988 | fprintf_unfiltered (file, | |
1989 | "gdbarch_dump: PARM_BOUNDARY # %s\n", | |
1990 | XSTRING (PARM_BOUNDARY)); | |
1991 | fprintf_unfiltered (file, | |
06b25f14 AC |
1992 | "gdbarch_dump: PARM_BOUNDARY = %d\n", |
1993 | PARM_BOUNDARY); | |
08e45a40 | 1994 | #endif |
08e45a40 AC |
1995 | #ifdef PC_REGNUM |
1996 | fprintf_unfiltered (file, | |
1997 | "gdbarch_dump: PC_REGNUM # %s\n", | |
1998 | XSTRING (PC_REGNUM)); | |
1999 | fprintf_unfiltered (file, | |
06b25f14 AC |
2000 | "gdbarch_dump: PC_REGNUM = %d\n", |
2001 | PC_REGNUM); | |
7f1b2585 | 2002 | #endif |
4b9b3959 AC |
2003 | #ifdef POINTER_TO_ADDRESS |
2004 | fprintf_unfiltered (file, | |
2005 | "gdbarch_dump: %s # %s\n", | |
2006 | "POINTER_TO_ADDRESS(type, buf)", | |
2007 | XSTRING (POINTER_TO_ADDRESS (type, buf))); | |
7996bcec AC |
2008 | fprintf_unfiltered (file, |
2009 | "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n", | |
2010 | (long) current_gdbarch->pointer_to_address | |
2011 | /*POINTER_TO_ADDRESS ()*/); | |
5e74b15c | 2012 | #endif |
7996bcec AC |
2013 | fprintf_unfiltered (file, |
2014 | "gdbarch_dump: gdbarch_print_float_info_p() = %d\n", | |
2015 | gdbarch_print_float_info_p (current_gdbarch)); | |
2016 | fprintf_unfiltered (file, | |
2017 | "gdbarch_dump: print_float_info = 0x%08lx\n", | |
2018 | (long) current_gdbarch->print_float_info); | |
2019 | fprintf_unfiltered (file, | |
2020 | "gdbarch_dump: print_registers_info = 0x%08lx\n", | |
2021 | (long) current_gdbarch->print_registers_info); | |
2022 | fprintf_unfiltered (file, | |
2023 | "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", | |
2024 | gdbarch_print_vector_info_p (current_gdbarch)); | |
2025 | fprintf_unfiltered (file, | |
2026 | "gdbarch_dump: print_vector_info = 0x%08lx\n", | |
2027 | (long) current_gdbarch->print_vector_info); | |
c2169756 AC |
2028 | #ifdef PS_REGNUM |
2029 | fprintf_unfiltered (file, | |
2030 | "gdbarch_dump: PS_REGNUM # %s\n", | |
2031 | XSTRING (PS_REGNUM)); | |
2032 | fprintf_unfiltered (file, | |
2033 | "gdbarch_dump: PS_REGNUM = %d\n", | |
2034 | PS_REGNUM); | |
2035 | #endif | |
7996bcec AC |
2036 | fprintf_unfiltered (file, |
2037 | "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n", | |
2038 | gdbarch_push_dummy_call_p (current_gdbarch)); | |
2039 | fprintf_unfiltered (file, | |
2040 | "gdbarch_dump: push_dummy_call = 0x%08lx\n", | |
2041 | (long) current_gdbarch->push_dummy_call); | |
2042 | fprintf_unfiltered (file, | |
2043 | "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n", | |
2044 | gdbarch_push_dummy_code_p (current_gdbarch)); | |
2045 | fprintf_unfiltered (file, | |
2046 | "gdbarch_dump: push_dummy_code = 0x%08lx\n", | |
2047 | (long) current_gdbarch->push_dummy_code); | |
1e9f55d0 AC |
2048 | #ifdef REGISTER_BYTES_OK_P |
2049 | fprintf_unfiltered (file, | |
2050 | "gdbarch_dump: %s # %s\n", | |
2051 | "REGISTER_BYTES_OK_P()", | |
2052 | XSTRING (REGISTER_BYTES_OK_P ())); | |
2053 | fprintf_unfiltered (file, | |
2054 | "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n", | |
2055 | REGISTER_BYTES_OK_P ()); | |
2056 | #endif | |
08e45a40 | 2057 | #ifdef REGISTER_BYTES_OK |
4b9b3959 AC |
2058 | fprintf_unfiltered (file, |
2059 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2060 | "REGISTER_BYTES_OK(nr_bytes)", |
2061 | XSTRING (REGISTER_BYTES_OK (nr_bytes))); | |
7996bcec AC |
2062 | fprintf_unfiltered (file, |
2063 | "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n", | |
2064 | (long) current_gdbarch->register_bytes_ok | |
2065 | /*REGISTER_BYTES_OK ()*/); | |
4b9b3959 | 2066 | #endif |
08e45a40 | 2067 | #ifdef REGISTER_NAME |
4b9b3959 AC |
2068 | fprintf_unfiltered (file, |
2069 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2070 | "REGISTER_NAME(regnr)", |
2071 | XSTRING (REGISTER_NAME (regnr))); | |
7996bcec AC |
2072 | fprintf_unfiltered (file, |
2073 | "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n", | |
2074 | (long) current_gdbarch->register_name | |
2075 | /*REGISTER_NAME ()*/); | |
4b9b3959 | 2076 | #endif |
08e45a40 | 2077 | #ifdef REGISTER_SIM_REGNO |
4b9b3959 AC |
2078 | fprintf_unfiltered (file, |
2079 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2080 | "REGISTER_SIM_REGNO(reg_nr)", |
2081 | XSTRING (REGISTER_SIM_REGNO (reg_nr))); | |
7996bcec AC |
2082 | fprintf_unfiltered (file, |
2083 | "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n", | |
2084 | (long) current_gdbarch->register_sim_regno | |
2085 | /*REGISTER_SIM_REGNO ()*/); | |
4b9b3959 | 2086 | #endif |
13d01224 | 2087 | #ifdef REGISTER_TO_VALUE |
13d01224 AC |
2088 | fprintf_unfiltered (file, |
2089 | "gdbarch_dump: %s # %s\n", | |
ff2e87ac AC |
2090 | "REGISTER_TO_VALUE(frame, regnum, type, buf)", |
2091 | XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf))); | |
7996bcec AC |
2092 | fprintf_unfiltered (file, |
2093 | "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n", | |
2094 | (long) current_gdbarch->register_to_value | |
2095 | /*REGISTER_TO_VALUE ()*/); | |
13d01224 | 2096 | #endif |
7996bcec AC |
2097 | fprintf_unfiltered (file, |
2098 | "gdbarch_dump: gdbarch_register_type_p() = %d\n", | |
2099 | gdbarch_register_type_p (current_gdbarch)); | |
2100 | fprintf_unfiltered (file, | |
2101 | "gdbarch_dump: register_type = 0x%08lx\n", | |
2102 | (long) current_gdbarch->register_type); | |
7996bcec AC |
2103 | fprintf_unfiltered (file, |
2104 | "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n", | |
2105 | (long) current_gdbarch->remote_translate_xfer_address); | |
08e45a40 | 2106 | #ifdef RETURN_VALUE_ON_STACK |
4b9b3959 AC |
2107 | fprintf_unfiltered (file, |
2108 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2109 | "RETURN_VALUE_ON_STACK(type)", |
2110 | XSTRING (RETURN_VALUE_ON_STACK (type))); | |
7996bcec AC |
2111 | fprintf_unfiltered (file, |
2112 | "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n", | |
2113 | (long) current_gdbarch->return_value_on_stack | |
2114 | /*RETURN_VALUE_ON_STACK ()*/); | |
4b9b3959 | 2115 | #endif |
08e45a40 | 2116 | #ifdef SDB_REG_TO_REGNUM |
4b9b3959 AC |
2117 | fprintf_unfiltered (file, |
2118 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2119 | "SDB_REG_TO_REGNUM(sdb_regnr)", |
2120 | XSTRING (SDB_REG_TO_REGNUM (sdb_regnr))); | |
7996bcec AC |
2121 | fprintf_unfiltered (file, |
2122 | "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n", | |
2123 | (long) current_gdbarch->sdb_reg_to_regnum | |
2124 | /*SDB_REG_TO_REGNUM ()*/); | |
4b9b3959 | 2125 | #endif |
08e45a40 | 2126 | #ifdef SKIP_PROLOGUE |
4b9b3959 AC |
2127 | fprintf_unfiltered (file, |
2128 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2129 | "SKIP_PROLOGUE(ip)", |
2130 | XSTRING (SKIP_PROLOGUE (ip))); | |
7996bcec AC |
2131 | fprintf_unfiltered (file, |
2132 | "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n", | |
2133 | (long) current_gdbarch->skip_prologue | |
2134 | /*SKIP_PROLOGUE ()*/); | |
4b9b3959 | 2135 | #endif |
dea0c52f | 2136 | fprintf_unfiltered (file, |
4c8c40e6 MK |
2137 | "gdbarch_dump: skip_solib_resolver = 0x%08lx\n", |
2138 | (long) current_gdbarch->skip_solib_resolver); | |
08e45a40 | 2139 | #ifdef SKIP_TRAMPOLINE_CODE |
4b9b3959 AC |
2140 | fprintf_unfiltered (file, |
2141 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2142 | "SKIP_TRAMPOLINE_CODE(pc)", |
2143 | XSTRING (SKIP_TRAMPOLINE_CODE (pc))); | |
7996bcec AC |
2144 | fprintf_unfiltered (file, |
2145 | "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n", | |
2146 | (long) current_gdbarch->skip_trampoline_code | |
2147 | /*SKIP_TRAMPOLINE_CODE ()*/); | |
4b9b3959 | 2148 | #endif |
181c1381 RE |
2149 | #ifdef SMASH_TEXT_ADDRESS |
2150 | fprintf_unfiltered (file, | |
2151 | "gdbarch_dump: %s # %s\n", | |
2152 | "SMASH_TEXT_ADDRESS(addr)", | |
2153 | XSTRING (SMASH_TEXT_ADDRESS (addr))); | |
7996bcec AC |
2154 | fprintf_unfiltered (file, |
2155 | "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n", | |
2156 | (long) current_gdbarch->smash_text_address | |
2157 | /*SMASH_TEXT_ADDRESS ()*/); | |
181c1381 | 2158 | #endif |
1e9f55d0 AC |
2159 | #ifdef SOFTWARE_SINGLE_STEP_P |
2160 | fprintf_unfiltered (file, | |
2161 | "gdbarch_dump: %s # %s\n", | |
2162 | "SOFTWARE_SINGLE_STEP_P()", | |
2163 | XSTRING (SOFTWARE_SINGLE_STEP_P ())); | |
2164 | fprintf_unfiltered (file, | |
2165 | "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n", | |
2166 | SOFTWARE_SINGLE_STEP_P ()); | |
2167 | #endif | |
08e45a40 | 2168 | #ifdef SOFTWARE_SINGLE_STEP |
4b9b3959 AC |
2169 | fprintf_unfiltered (file, |
2170 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2171 | "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)", |
2172 | XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p))); | |
7996bcec AC |
2173 | fprintf_unfiltered (file, |
2174 | "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n", | |
2175 | (long) current_gdbarch->software_single_step | |
2176 | /*SOFTWARE_SINGLE_STEP ()*/); | |
08e45a40 AC |
2177 | #endif |
2178 | #ifdef SP_REGNUM | |
1dd4193b | 2179 | fprintf_unfiltered (file, |
08e45a40 AC |
2180 | "gdbarch_dump: SP_REGNUM # %s\n", |
2181 | XSTRING (SP_REGNUM)); | |
2182 | fprintf_unfiltered (file, | |
06b25f14 AC |
2183 | "gdbarch_dump: SP_REGNUM = %d\n", |
2184 | SP_REGNUM); | |
1dd4193b | 2185 | #endif |
08e45a40 | 2186 | #ifdef STAB_REG_TO_REGNUM |
4b9b3959 AC |
2187 | fprintf_unfiltered (file, |
2188 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
2189 | "STAB_REG_TO_REGNUM(stab_regnr)", |
2190 | XSTRING (STAB_REG_TO_REGNUM (stab_regnr))); | |
7996bcec AC |
2191 | fprintf_unfiltered (file, |
2192 | "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n", | |
2193 | (long) current_gdbarch->stab_reg_to_regnum | |
2194 | /*STAB_REG_TO_REGNUM ()*/); | |
4b9b3959 | 2195 | #endif |
08e45a40 | 2196 | #ifdef STORE_RETURN_VALUE |
f517ea4e PS |
2197 | fprintf_unfiltered (file, |
2198 | "gdbarch_dump: %s # %s\n", | |
ebba8386 AC |
2199 | "STORE_RETURN_VALUE(type, regcache, valbuf)", |
2200 | XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf))); | |
7996bcec AC |
2201 | fprintf_unfiltered (file, |
2202 | "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n", | |
2203 | (long) current_gdbarch->store_return_value | |
2204 | /*STORE_RETURN_VALUE ()*/); | |
875e1767 | 2205 | #endif |
08e45a40 | 2206 | #ifdef TARGET_ADDR_BIT |
bdcd319a | 2207 | fprintf_unfiltered (file, |
08e45a40 AC |
2208 | "gdbarch_dump: TARGET_ADDR_BIT # %s\n", |
2209 | XSTRING (TARGET_ADDR_BIT)); | |
2210 | fprintf_unfiltered (file, | |
06b25f14 AC |
2211 | "gdbarch_dump: TARGET_ADDR_BIT = %d\n", |
2212 | TARGET_ADDR_BIT); | |
bdcd319a | 2213 | #endif |
381323f4 | 2214 | #ifdef TARGET_ARCHITECTURE |
08e45a40 AC |
2215 | fprintf_unfiltered (file, |
2216 | "gdbarch_dump: TARGET_ARCHITECTURE # %s\n", | |
2217 | XSTRING (TARGET_ARCHITECTURE)); | |
0f71a2f6 | 2218 | if (TARGET_ARCHITECTURE != NULL) |
4b9b3959 AC |
2219 | fprintf_unfiltered (file, |
2220 | "gdbarch_dump: TARGET_ARCHITECTURE = %s\n", | |
adf40b2e | 2221 | TARGET_ARCHITECTURE->printable_name); |
381323f4 | 2222 | #endif |
08e45a40 AC |
2223 | #ifdef TARGET_BFD_VMA_BIT |
2224 | fprintf_unfiltered (file, | |
2225 | "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n", | |
2226 | XSTRING (TARGET_BFD_VMA_BIT)); | |
2227 | fprintf_unfiltered (file, | |
06b25f14 AC |
2228 | "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n", |
2229 | TARGET_BFD_VMA_BIT); | |
08e45a40 | 2230 | #endif |
381323f4 | 2231 | #ifdef TARGET_BYTE_ORDER |
08e45a40 AC |
2232 | fprintf_unfiltered (file, |
2233 | "gdbarch_dump: TARGET_BYTE_ORDER # %s\n", | |
2234 | XSTRING (TARGET_BYTE_ORDER)); | |
4b9b3959 AC |
2235 | fprintf_unfiltered (file, |
2236 | "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n", | |
adf40b2e | 2237 | (long) TARGET_BYTE_ORDER); |
381323f4 | 2238 | #endif |
4e409299 JB |
2239 | #ifdef TARGET_CHAR_SIGNED |
2240 | fprintf_unfiltered (file, | |
2241 | "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n", | |
2242 | XSTRING (TARGET_CHAR_SIGNED)); | |
2243 | fprintf_unfiltered (file, | |
06b25f14 AC |
2244 | "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n", |
2245 | TARGET_CHAR_SIGNED); | |
4e409299 | 2246 | #endif |
08e45a40 | 2247 | #ifdef TARGET_DOUBLE_BIT |
4b9b3959 | 2248 | fprintf_unfiltered (file, |
08e45a40 AC |
2249 | "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n", |
2250 | XSTRING (TARGET_DOUBLE_BIT)); | |
4b9b3959 | 2251 | fprintf_unfiltered (file, |
06b25f14 AC |
2252 | "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n", |
2253 | TARGET_DOUBLE_BIT); | |
381323f4 | 2254 | #endif |
08e45a40 | 2255 | #ifdef TARGET_DOUBLE_FORMAT |
4b9b3959 | 2256 | fprintf_unfiltered (file, |
08e45a40 AC |
2257 | "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n", |
2258 | XSTRING (TARGET_DOUBLE_FORMAT)); | |
4b9b3959 | 2259 | fprintf_unfiltered (file, |
f09cffaa | 2260 | "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n", |
52f87c51 | 2261 | (TARGET_DOUBLE_FORMAT)->name); |
381323f4 AC |
2262 | #endif |
2263 | #ifdef TARGET_FLOAT_BIT | |
08e45a40 AC |
2264 | fprintf_unfiltered (file, |
2265 | "gdbarch_dump: TARGET_FLOAT_BIT # %s\n", | |
2266 | XSTRING (TARGET_FLOAT_BIT)); | |
4b9b3959 | 2267 | fprintf_unfiltered (file, |
06b25f14 AC |
2268 | "gdbarch_dump: TARGET_FLOAT_BIT = %d\n", |
2269 | TARGET_FLOAT_BIT); | |
381323f4 | 2270 | #endif |
08e45a40 | 2271 | #ifdef TARGET_FLOAT_FORMAT |
4b9b3959 | 2272 | fprintf_unfiltered (file, |
08e45a40 AC |
2273 | "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n", |
2274 | XSTRING (TARGET_FLOAT_FORMAT)); | |
2275 | fprintf_unfiltered (file, | |
f09cffaa | 2276 | "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n", |
52f87c51 | 2277 | (TARGET_FLOAT_FORMAT)->name); |
08e45a40 AC |
2278 | #endif |
2279 | #ifdef TARGET_INT_BIT | |
2280 | fprintf_unfiltered (file, | |
2281 | "gdbarch_dump: TARGET_INT_BIT # %s\n", | |
2282 | XSTRING (TARGET_INT_BIT)); | |
2283 | fprintf_unfiltered (file, | |
06b25f14 AC |
2284 | "gdbarch_dump: TARGET_INT_BIT = %d\n", |
2285 | TARGET_INT_BIT); | |
08e45a40 AC |
2286 | #endif |
2287 | #ifdef TARGET_LONG_BIT | |
2288 | fprintf_unfiltered (file, | |
2289 | "gdbarch_dump: TARGET_LONG_BIT # %s\n", | |
2290 | XSTRING (TARGET_LONG_BIT)); | |
2291 | fprintf_unfiltered (file, | |
06b25f14 AC |
2292 | "gdbarch_dump: TARGET_LONG_BIT = %d\n", |
2293 | TARGET_LONG_BIT); | |
381323f4 AC |
2294 | #endif |
2295 | #ifdef TARGET_LONG_DOUBLE_BIT | |
08e45a40 AC |
2296 | fprintf_unfiltered (file, |
2297 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n", | |
2298 | XSTRING (TARGET_LONG_DOUBLE_BIT)); | |
4b9b3959 | 2299 | fprintf_unfiltered (file, |
06b25f14 AC |
2300 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n", |
2301 | TARGET_LONG_DOUBLE_BIT); | |
381323f4 | 2302 | #endif |
08e45a40 | 2303 | #ifdef TARGET_LONG_DOUBLE_FORMAT |
66b43ecb | 2304 | fprintf_unfiltered (file, |
08e45a40 AC |
2305 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n", |
2306 | XSTRING (TARGET_LONG_DOUBLE_FORMAT)); | |
52204a0b | 2307 | fprintf_unfiltered (file, |
f09cffaa | 2308 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n", |
52f87c51 | 2309 | (TARGET_LONG_DOUBLE_FORMAT)->name); |
52204a0b | 2310 | #endif |
08e45a40 | 2311 | #ifdef TARGET_LONG_LONG_BIT |
66b43ecb | 2312 | fprintf_unfiltered (file, |
08e45a40 AC |
2313 | "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n", |
2314 | XSTRING (TARGET_LONG_LONG_BIT)); | |
4b9b3959 | 2315 | fprintf_unfiltered (file, |
06b25f14 AC |
2316 | "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n", |
2317 | TARGET_LONG_LONG_BIT); | |
381323f4 | 2318 | #endif |
4be87837 DJ |
2319 | #ifdef TARGET_OSABI |
2320 | fprintf_unfiltered (file, | |
2321 | "gdbarch_dump: TARGET_OSABI # %s\n", | |
2322 | XSTRING (TARGET_OSABI)); | |
2323 | fprintf_unfiltered (file, | |
2324 | "gdbarch_dump: TARGET_OSABI = %ld\n", | |
2325 | (long) TARGET_OSABI); | |
2326 | #endif | |
08e45a40 AC |
2327 | #ifdef TARGET_PRINT_INSN |
2328 | fprintf_unfiltered (file, | |
2329 | "gdbarch_dump: %s # %s\n", | |
2330 | "TARGET_PRINT_INSN(vma, info)", | |
2331 | XSTRING (TARGET_PRINT_INSN (vma, info))); | |
7996bcec AC |
2332 | fprintf_unfiltered (file, |
2333 | "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n", | |
2334 | (long) current_gdbarch->print_insn | |
2335 | /*TARGET_PRINT_INSN ()*/); | |
381323f4 | 2336 | #endif |
08e45a40 AC |
2337 | #ifdef TARGET_PTR_BIT |
2338 | fprintf_unfiltered (file, | |
2339 | "gdbarch_dump: TARGET_PTR_BIT # %s\n", | |
2340 | XSTRING (TARGET_PTR_BIT)); | |
2341 | fprintf_unfiltered (file, | |
06b25f14 AC |
2342 | "gdbarch_dump: TARGET_PTR_BIT = %d\n", |
2343 | TARGET_PTR_BIT); | |
381323f4 | 2344 | #endif |
cde9ea48 AC |
2345 | #ifdef TARGET_READ_PC_P |
2346 | fprintf_unfiltered (file, | |
2347 | "gdbarch_dump: %s # %s\n", | |
2348 | "TARGET_READ_PC_P()", | |
2349 | XSTRING (TARGET_READ_PC_P ())); | |
2350 | fprintf_unfiltered (file, | |
2351 | "gdbarch_dump: TARGET_READ_PC_P() = %d\n", | |
2352 | TARGET_READ_PC_P ()); | |
2353 | #endif | |
08e45a40 AC |
2354 | #ifdef TARGET_READ_PC |
2355 | fprintf_unfiltered (file, | |
2356 | "gdbarch_dump: %s # %s\n", | |
2357 | "TARGET_READ_PC(ptid)", | |
2358 | XSTRING (TARGET_READ_PC (ptid))); | |
7996bcec AC |
2359 | fprintf_unfiltered (file, |
2360 | "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n", | |
2361 | (long) current_gdbarch->read_pc | |
2362 | /*TARGET_READ_PC ()*/); | |
381323f4 | 2363 | #endif |
bd1ce8ba AC |
2364 | #ifdef TARGET_READ_SP_P |
2365 | fprintf_unfiltered (file, | |
2366 | "gdbarch_dump: %s # %s\n", | |
2367 | "TARGET_READ_SP_P()", | |
2368 | XSTRING (TARGET_READ_SP_P ())); | |
2369 | fprintf_unfiltered (file, | |
2370 | "gdbarch_dump: TARGET_READ_SP_P() = %d\n", | |
2371 | TARGET_READ_SP_P ()); | |
2372 | #endif | |
381323f4 | 2373 | #ifdef TARGET_READ_SP |
08e45a40 AC |
2374 | fprintf_unfiltered (file, |
2375 | "gdbarch_dump: %s # %s\n", | |
2376 | "TARGET_READ_SP()", | |
2377 | XSTRING (TARGET_READ_SP ())); | |
7996bcec AC |
2378 | fprintf_unfiltered (file, |
2379 | "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n", | |
2380 | (long) current_gdbarch->read_sp | |
2381 | /*TARGET_READ_SP ()*/); | |
381323f4 | 2382 | #endif |
08e45a40 AC |
2383 | #ifdef TARGET_SHORT_BIT |
2384 | fprintf_unfiltered (file, | |
2385 | "gdbarch_dump: TARGET_SHORT_BIT # %s\n", | |
2386 | XSTRING (TARGET_SHORT_BIT)); | |
2387 | fprintf_unfiltered (file, | |
06b25f14 AC |
2388 | "gdbarch_dump: TARGET_SHORT_BIT = %d\n", |
2389 | TARGET_SHORT_BIT); | |
39d4ef09 AC |
2390 | #endif |
2391 | #ifdef TARGET_VIRTUAL_FRAME_POINTER | |
08e45a40 AC |
2392 | fprintf_unfiltered (file, |
2393 | "gdbarch_dump: %s # %s\n", | |
2394 | "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)", | |
2395 | XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset))); | |
7996bcec AC |
2396 | fprintf_unfiltered (file, |
2397 | "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n", | |
2398 | (long) current_gdbarch->virtual_frame_pointer | |
2399 | /*TARGET_VIRTUAL_FRAME_POINTER ()*/); | |
381323f4 | 2400 | #endif |
08e45a40 | 2401 | #ifdef TARGET_WRITE_PC |
4b9b3959 | 2402 | fprintf_unfiltered (file, |
08e45a40 AC |
2403 | "gdbarch_dump: %s # %s\n", |
2404 | "TARGET_WRITE_PC(val, ptid)", | |
2405 | XSTRING (TARGET_WRITE_PC (val, ptid))); | |
7996bcec AC |
2406 | fprintf_unfiltered (file, |
2407 | "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n", | |
2408 | (long) current_gdbarch->write_pc | |
2409 | /*TARGET_WRITE_PC ()*/); | |
381323f4 | 2410 | #endif |
7996bcec AC |
2411 | fprintf_unfiltered (file, |
2412 | "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n", | |
2413 | gdbarch_unwind_dummy_id_p (current_gdbarch)); | |
2414 | fprintf_unfiltered (file, | |
2415 | "gdbarch_dump: unwind_dummy_id = 0x%08lx\n", | |
2416 | (long) current_gdbarch->unwind_dummy_id); | |
2417 | fprintf_unfiltered (file, | |
2418 | "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n", | |
2419 | gdbarch_unwind_pc_p (current_gdbarch)); | |
2420 | fprintf_unfiltered (file, | |
2421 | "gdbarch_dump: unwind_pc = 0x%08lx\n", | |
2422 | (long) current_gdbarch->unwind_pc); | |
2423 | fprintf_unfiltered (file, | |
2424 | "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n", | |
2425 | gdbarch_unwind_sp_p (current_gdbarch)); | |
2426 | fprintf_unfiltered (file, | |
2427 | "gdbarch_dump: unwind_sp = 0x%08lx\n", | |
2428 | (long) current_gdbarch->unwind_sp); | |
08e45a40 | 2429 | #ifdef USE_STRUCT_CONVENTION |
4b9b3959 | 2430 | fprintf_unfiltered (file, |
08e45a40 AC |
2431 | "gdbarch_dump: %s # %s\n", |
2432 | "USE_STRUCT_CONVENTION(gcc_p, value_type)", | |
2433 | XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type))); | |
7996bcec AC |
2434 | fprintf_unfiltered (file, |
2435 | "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n", | |
2436 | (long) current_gdbarch->use_struct_convention | |
2437 | /*USE_STRUCT_CONVENTION ()*/); | |
13d01224 AC |
2438 | #endif |
2439 | #ifdef VALUE_TO_REGISTER | |
13d01224 AC |
2440 | fprintf_unfiltered (file, |
2441 | "gdbarch_dump: %s # %s\n", | |
ff2e87ac AC |
2442 | "VALUE_TO_REGISTER(frame, regnum, type, buf)", |
2443 | XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf))); | |
7996bcec AC |
2444 | fprintf_unfiltered (file, |
2445 | "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n", | |
2446 | (long) current_gdbarch->value_to_register | |
2447 | /*VALUE_TO_REGISTER ()*/); | |
381323f4 | 2448 | #endif |
4b9b3959 AC |
2449 | if (current_gdbarch->dump_tdep != NULL) |
2450 | current_gdbarch->dump_tdep (current_gdbarch, file); | |
0f71a2f6 JM |
2451 | } |
2452 | ||
2453 | struct gdbarch_tdep * | |
104c1213 | 2454 | gdbarch_tdep (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2455 | { |
2456 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
2457 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
2458 | return gdbarch->tdep; | |
2459 | } | |
2460 | ||
2461 | ||
2462 | const struct bfd_arch_info * | |
104c1213 | 2463 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
0f71a2f6 | 2464 | { |
8de9bdc4 | 2465 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2466 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2467 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
2468 | return gdbarch->bfd_arch_info; | |
2469 | } | |
2470 | ||
2471 | int | |
104c1213 | 2472 | gdbarch_byte_order (struct gdbarch *gdbarch) |
0f71a2f6 | 2473 | { |
8de9bdc4 | 2474 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2475 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2476 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
2477 | return gdbarch->byte_order; | |
2478 | } | |
2479 | ||
4be87837 DJ |
2480 | enum gdb_osabi |
2481 | gdbarch_osabi (struct gdbarch *gdbarch) | |
2482 | { | |
2483 | gdb_assert (gdbarch != NULL); | |
2484 | if (gdbarch_debug >= 2) | |
2485 | fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n"); | |
2486 | return gdbarch->osabi; | |
2487 | } | |
2488 | ||
0f71a2f6 | 2489 | int |
104c1213 | 2490 | gdbarch_short_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2491 | { |
8de9bdc4 | 2492 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2493 | /* Skip verify of short_bit, invalid_p == 0 */ |
0f71a2f6 | 2494 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2495 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
2496 | return gdbarch->short_bit; | |
2497 | } | |
2498 | ||
2499 | void | |
104c1213 JM |
2500 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
2501 | int short_bit) | |
0f71a2f6 JM |
2502 | { |
2503 | gdbarch->short_bit = short_bit; | |
2504 | } | |
2505 | ||
2506 | int | |
104c1213 | 2507 | gdbarch_int_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2508 | { |
8de9bdc4 | 2509 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2510 | /* Skip verify of int_bit, invalid_p == 0 */ |
0f71a2f6 | 2511 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2512 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
2513 | return gdbarch->int_bit; | |
2514 | } | |
2515 | ||
2516 | void | |
104c1213 JM |
2517 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
2518 | int int_bit) | |
0f71a2f6 JM |
2519 | { |
2520 | gdbarch->int_bit = int_bit; | |
2521 | } | |
2522 | ||
2523 | int | |
104c1213 | 2524 | gdbarch_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2525 | { |
8de9bdc4 | 2526 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2527 | /* Skip verify of long_bit, invalid_p == 0 */ |
0f71a2f6 | 2528 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2529 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
2530 | return gdbarch->long_bit; | |
2531 | } | |
2532 | ||
2533 | void | |
104c1213 JM |
2534 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
2535 | int long_bit) | |
0f71a2f6 JM |
2536 | { |
2537 | gdbarch->long_bit = long_bit; | |
2538 | } | |
2539 | ||
2540 | int | |
104c1213 | 2541 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2542 | { |
8de9bdc4 | 2543 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2544 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
0f71a2f6 | 2545 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2546 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
2547 | return gdbarch->long_long_bit; | |
2548 | } | |
2549 | ||
2550 | void | |
104c1213 JM |
2551 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
2552 | int long_long_bit) | |
0f71a2f6 JM |
2553 | { |
2554 | gdbarch->long_long_bit = long_long_bit; | |
2555 | } | |
2556 | ||
2557 | int | |
104c1213 | 2558 | gdbarch_float_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2559 | { |
8de9bdc4 | 2560 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2561 | /* Skip verify of float_bit, invalid_p == 0 */ |
0f71a2f6 | 2562 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2563 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
2564 | return gdbarch->float_bit; | |
2565 | } | |
2566 | ||
2567 | void | |
104c1213 JM |
2568 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
2569 | int float_bit) | |
0f71a2f6 JM |
2570 | { |
2571 | gdbarch->float_bit = float_bit; | |
2572 | } | |
2573 | ||
2574 | int | |
104c1213 | 2575 | gdbarch_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2576 | { |
8de9bdc4 | 2577 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2578 | /* Skip verify of double_bit, invalid_p == 0 */ |
0f71a2f6 | 2579 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2580 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
2581 | return gdbarch->double_bit; | |
2582 | } | |
2583 | ||
2584 | void | |
104c1213 JM |
2585 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
2586 | int double_bit) | |
0f71a2f6 JM |
2587 | { |
2588 | gdbarch->double_bit = double_bit; | |
2589 | } | |
2590 | ||
2591 | int | |
104c1213 | 2592 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2593 | { |
8de9bdc4 | 2594 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2595 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
0f71a2f6 | 2596 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2597 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
2598 | return gdbarch->long_double_bit; | |
2599 | } | |
2600 | ||
2601 | void | |
104c1213 JM |
2602 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
2603 | int long_double_bit) | |
0f71a2f6 JM |
2604 | { |
2605 | gdbarch->long_double_bit = long_double_bit; | |
2606 | } | |
2607 | ||
66b43ecb AC |
2608 | int |
2609 | gdbarch_ptr_bit (struct gdbarch *gdbarch) | |
2610 | { | |
8de9bdc4 | 2611 | gdb_assert (gdbarch != NULL); |
66b43ecb AC |
2612 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
2613 | if (gdbarch_debug >= 2) | |
2614 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); | |
2615 | return gdbarch->ptr_bit; | |
2616 | } | |
2617 | ||
2618 | void | |
2619 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, | |
2620 | int ptr_bit) | |
2621 | { | |
2622 | gdbarch->ptr_bit = ptr_bit; | |
2623 | } | |
2624 | ||
52204a0b DT |
2625 | int |
2626 | gdbarch_addr_bit (struct gdbarch *gdbarch) | |
2627 | { | |
8de9bdc4 | 2628 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2629 | /* Check variable changed from pre-default. */ |
2630 | gdb_assert (gdbarch->addr_bit != 0); | |
52204a0b DT |
2631 | if (gdbarch_debug >= 2) |
2632 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); | |
2633 | return gdbarch->addr_bit; | |
2634 | } | |
2635 | ||
2636 | void | |
2637 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, | |
2638 | int addr_bit) | |
2639 | { | |
2640 | gdbarch->addr_bit = addr_bit; | |
2641 | } | |
2642 | ||
66b43ecb AC |
2643 | int |
2644 | gdbarch_bfd_vma_bit (struct gdbarch *gdbarch) | |
2645 | { | |
8de9bdc4 | 2646 | gdb_assert (gdbarch != NULL); |
66b43ecb AC |
2647 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
2648 | if (gdbarch_debug >= 2) | |
2649 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n"); | |
2650 | return gdbarch->bfd_vma_bit; | |
2651 | } | |
2652 | ||
2653 | void | |
2654 | set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, | |
2655 | int bfd_vma_bit) | |
2656 | { | |
2657 | gdbarch->bfd_vma_bit = bfd_vma_bit; | |
2658 | } | |
2659 | ||
4e409299 JB |
2660 | int |
2661 | gdbarch_char_signed (struct gdbarch *gdbarch) | |
2662 | { | |
8de9bdc4 | 2663 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2664 | /* Check variable changed from pre-default. */ |
2665 | gdb_assert (gdbarch->char_signed != -1); | |
4e409299 JB |
2666 | if (gdbarch_debug >= 2) |
2667 | fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); | |
2668 | return gdbarch->char_signed; | |
2669 | } | |
2670 | ||
2671 | void | |
2672 | set_gdbarch_char_signed (struct gdbarch *gdbarch, | |
2673 | int char_signed) | |
2674 | { | |
2675 | gdbarch->char_signed = char_signed; | |
2676 | } | |
2677 | ||
cde9ea48 AC |
2678 | int |
2679 | gdbarch_read_pc_p (struct gdbarch *gdbarch) | |
2680 | { | |
2681 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2682 | return gdbarch->read_pc != NULL; |
cde9ea48 AC |
2683 | } |
2684 | ||
0f71a2f6 | 2685 | CORE_ADDR |
39f77062 | 2686 | gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid) |
0f71a2f6 | 2687 | { |
8de9bdc4 | 2688 | gdb_assert (gdbarch != NULL); |
956ac328 | 2689 | gdb_assert (gdbarch->read_pc != NULL); |
0f71a2f6 | 2690 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2691 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
39f77062 | 2692 | return gdbarch->read_pc (ptid); |
0f71a2f6 JM |
2693 | } |
2694 | ||
2695 | void | |
104c1213 JM |
2696 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
2697 | gdbarch_read_pc_ftype read_pc) | |
0f71a2f6 JM |
2698 | { |
2699 | gdbarch->read_pc = read_pc; | |
2700 | } | |
2701 | ||
2702 | void | |
39f77062 | 2703 | gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid) |
0f71a2f6 | 2704 | { |
8de9bdc4 | 2705 | gdb_assert (gdbarch != NULL); |
956ac328 | 2706 | gdb_assert (gdbarch->write_pc != NULL); |
0f71a2f6 | 2707 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2708 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
39f77062 | 2709 | gdbarch->write_pc (val, ptid); |
0f71a2f6 JM |
2710 | } |
2711 | ||
2712 | void | |
104c1213 JM |
2713 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
2714 | gdbarch_write_pc_ftype write_pc) | |
0f71a2f6 JM |
2715 | { |
2716 | gdbarch->write_pc = write_pc; | |
2717 | } | |
2718 | ||
bd1ce8ba AC |
2719 | int |
2720 | gdbarch_read_sp_p (struct gdbarch *gdbarch) | |
2721 | { | |
2722 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2723 | return gdbarch->read_sp != NULL; |
bd1ce8ba AC |
2724 | } |
2725 | ||
0f71a2f6 JM |
2726 | CORE_ADDR |
2727 | gdbarch_read_sp (struct gdbarch *gdbarch) | |
2728 | { | |
8de9bdc4 | 2729 | gdb_assert (gdbarch != NULL); |
956ac328 | 2730 | gdb_assert (gdbarch->read_sp != NULL); |
0f71a2f6 | 2731 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2732 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n"); |
2733 | return gdbarch->read_sp (); | |
2734 | } | |
2735 | ||
2736 | void | |
104c1213 JM |
2737 | set_gdbarch_read_sp (struct gdbarch *gdbarch, |
2738 | gdbarch_read_sp_ftype read_sp) | |
0f71a2f6 JM |
2739 | { |
2740 | gdbarch->read_sp = read_sp; | |
2741 | } | |
2742 | ||
39d4ef09 AC |
2743 | void |
2744 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) | |
2745 | { | |
8de9bdc4 | 2746 | gdb_assert (gdbarch != NULL); |
956ac328 | 2747 | gdb_assert (gdbarch->virtual_frame_pointer != NULL); |
39d4ef09 AC |
2748 | if (gdbarch_debug >= 2) |
2749 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); | |
2750 | gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset); | |
2751 | } | |
2752 | ||
2753 | void | |
2754 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, | |
2755 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) | |
2756 | { | |
2757 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; | |
2758 | } | |
2759 | ||
61a0eb5b | 2760 | int |
d8124050 | 2761 | gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch) |
61a0eb5b | 2762 | { |
8de9bdc4 | 2763 | gdb_assert (gdbarch != NULL); |
956ac328 | 2764 | return gdbarch->pseudo_register_read != NULL; |
61a0eb5b AC |
2765 | } |
2766 | ||
2767 | void | |
d8124050 | 2768 | gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf) |
61a0eb5b | 2769 | { |
8de9bdc4 | 2770 | gdb_assert (gdbarch != NULL); |
956ac328 | 2771 | gdb_assert (gdbarch->pseudo_register_read != NULL); |
61a0eb5b | 2772 | if (gdbarch_debug >= 2) |
d8124050 AC |
2773 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); |
2774 | gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); | |
61a0eb5b AC |
2775 | } |
2776 | ||
2777 | void | |
d8124050 AC |
2778 | set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, |
2779 | gdbarch_pseudo_register_read_ftype pseudo_register_read) | |
61a0eb5b | 2780 | { |
d8124050 | 2781 | gdbarch->pseudo_register_read = pseudo_register_read; |
61a0eb5b AC |
2782 | } |
2783 | ||
2784 | int | |
d8124050 | 2785 | gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) |
61a0eb5b | 2786 | { |
8de9bdc4 | 2787 | gdb_assert (gdbarch != NULL); |
956ac328 | 2788 | return gdbarch->pseudo_register_write != NULL; |
61a0eb5b AC |
2789 | } |
2790 | ||
2791 | void | |
d8124050 | 2792 | gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf) |
61a0eb5b | 2793 | { |
8de9bdc4 | 2794 | gdb_assert (gdbarch != NULL); |
956ac328 | 2795 | gdb_assert (gdbarch->pseudo_register_write != NULL); |
61a0eb5b | 2796 | if (gdbarch_debug >= 2) |
d8124050 AC |
2797 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); |
2798 | gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); | |
61a0eb5b AC |
2799 | } |
2800 | ||
2801 | void | |
d8124050 AC |
2802 | set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, |
2803 | gdbarch_pseudo_register_write_ftype pseudo_register_write) | |
61a0eb5b | 2804 | { |
d8124050 | 2805 | gdbarch->pseudo_register_write = pseudo_register_write; |
61a0eb5b AC |
2806 | } |
2807 | ||
0f71a2f6 | 2808 | int |
104c1213 | 2809 | gdbarch_num_regs (struct gdbarch *gdbarch) |
0f71a2f6 | 2810 | { |
8de9bdc4 | 2811 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2812 | /* Check variable changed from pre-default. */ |
2813 | gdb_assert (gdbarch->num_regs != -1); | |
0f71a2f6 | 2814 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2815 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
2816 | return gdbarch->num_regs; | |
2817 | } | |
2818 | ||
2819 | void | |
104c1213 JM |
2820 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
2821 | int num_regs) | |
0f71a2f6 JM |
2822 | { |
2823 | gdbarch->num_regs = num_regs; | |
2824 | } | |
2825 | ||
0aba1244 EZ |
2826 | int |
2827 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) | |
2828 | { | |
8de9bdc4 | 2829 | gdb_assert (gdbarch != NULL); |
0aba1244 EZ |
2830 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
2831 | if (gdbarch_debug >= 2) | |
2832 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); | |
2833 | return gdbarch->num_pseudo_regs; | |
2834 | } | |
2835 | ||
2836 | void | |
2837 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, | |
2838 | int num_pseudo_regs) | |
2839 | { | |
2840 | gdbarch->num_pseudo_regs = num_pseudo_regs; | |
2841 | } | |
2842 | ||
0f71a2f6 | 2843 | int |
104c1213 | 2844 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2845 | { |
8de9bdc4 | 2846 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2847 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
0f71a2f6 | 2848 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2849 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
2850 | return gdbarch->sp_regnum; | |
2851 | } | |
2852 | ||
2853 | void | |
104c1213 JM |
2854 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
2855 | int sp_regnum) | |
0f71a2f6 JM |
2856 | { |
2857 | gdbarch->sp_regnum = sp_regnum; | |
2858 | } | |
2859 | ||
0f71a2f6 | 2860 | int |
104c1213 | 2861 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2862 | { |
8de9bdc4 | 2863 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2864 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
0f71a2f6 | 2865 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2866 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
2867 | return gdbarch->pc_regnum; | |
2868 | } | |
2869 | ||
2870 | void | |
104c1213 JM |
2871 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
2872 | int pc_regnum) | |
0f71a2f6 JM |
2873 | { |
2874 | gdbarch->pc_regnum = pc_regnum; | |
2875 | } | |
2876 | ||
c2169756 AC |
2877 | int |
2878 | gdbarch_ps_regnum (struct gdbarch *gdbarch) | |
2879 | { | |
8de9bdc4 | 2880 | gdb_assert (gdbarch != NULL); |
c2169756 AC |
2881 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
2882 | if (gdbarch_debug >= 2) | |
2883 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); | |
2884 | return gdbarch->ps_regnum; | |
2885 | } | |
2886 | ||
2887 | void | |
2888 | set_gdbarch_ps_regnum (struct gdbarch *gdbarch, | |
2889 | int ps_regnum) | |
2890 | { | |
2891 | gdbarch->ps_regnum = ps_regnum; | |
2892 | } | |
2893 | ||
60054393 MS |
2894 | int |
2895 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) | |
2896 | { | |
8de9bdc4 | 2897 | gdb_assert (gdbarch != NULL); |
60054393 MS |
2898 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
2899 | if (gdbarch_debug >= 2) | |
2900 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); | |
2901 | return gdbarch->fp0_regnum; | |
2902 | } | |
2903 | ||
2904 | void | |
2905 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, | |
2906 | int fp0_regnum) | |
2907 | { | |
2908 | gdbarch->fp0_regnum = fp0_regnum; | |
2909 | } | |
2910 | ||
88c72b7d AC |
2911 | int |
2912 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) | |
2913 | { | |
8de9bdc4 | 2914 | gdb_assert (gdbarch != NULL); |
956ac328 | 2915 | gdb_assert (gdbarch->stab_reg_to_regnum != NULL); |
88c72b7d AC |
2916 | if (gdbarch_debug >= 2) |
2917 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); | |
2918 | return gdbarch->stab_reg_to_regnum (stab_regnr); | |
2919 | } | |
2920 | ||
2921 | void | |
2922 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, | |
2923 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) | |
2924 | { | |
2925 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; | |
2926 | } | |
2927 | ||
2928 | int | |
2929 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) | |
2930 | { | |
8de9bdc4 | 2931 | gdb_assert (gdbarch != NULL); |
956ac328 | 2932 | gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); |
88c72b7d AC |
2933 | if (gdbarch_debug >= 2) |
2934 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); | |
2935 | return gdbarch->ecoff_reg_to_regnum (ecoff_regnr); | |
2936 | } | |
2937 | ||
2938 | void | |
2939 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, | |
2940 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) | |
2941 | { | |
2942 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; | |
2943 | } | |
2944 | ||
2945 | int | |
2946 | gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr) | |
2947 | { | |
8de9bdc4 | 2948 | gdb_assert (gdbarch != NULL); |
956ac328 | 2949 | gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL); |
88c72b7d AC |
2950 | if (gdbarch_debug >= 2) |
2951 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n"); | |
2952 | return gdbarch->dwarf_reg_to_regnum (dwarf_regnr); | |
2953 | } | |
2954 | ||
2955 | void | |
2956 | set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, | |
2957 | gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum) | |
2958 | { | |
2959 | gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum; | |
2960 | } | |
2961 | ||
2962 | int | |
2963 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) | |
2964 | { | |
8de9bdc4 | 2965 | gdb_assert (gdbarch != NULL); |
956ac328 | 2966 | gdb_assert (gdbarch->sdb_reg_to_regnum != NULL); |
88c72b7d AC |
2967 | if (gdbarch_debug >= 2) |
2968 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); | |
2969 | return gdbarch->sdb_reg_to_regnum (sdb_regnr); | |
2970 | } | |
2971 | ||
2972 | void | |
2973 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, | |
2974 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) | |
2975 | { | |
2976 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; | |
2977 | } | |
2978 | ||
2979 | int | |
2980 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) | |
2981 | { | |
8de9bdc4 | 2982 | gdb_assert (gdbarch != NULL); |
956ac328 | 2983 | gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL); |
88c72b7d AC |
2984 | if (gdbarch_debug >= 2) |
2985 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); | |
2986 | return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr); | |
2987 | } | |
2988 | ||
2989 | void | |
2990 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, | |
2991 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) | |
2992 | { | |
2993 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; | |
2994 | } | |
2995 | ||
fa88f677 | 2996 | const char * |
0f71a2f6 JM |
2997 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) |
2998 | { | |
8de9bdc4 | 2999 | gdb_assert (gdbarch != NULL); |
956ac328 | 3000 | gdb_assert (gdbarch->register_name != NULL); |
0f71a2f6 | 3001 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3002 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
3003 | return gdbarch->register_name (regnr); | |
3004 | } | |
3005 | ||
3006 | void | |
104c1213 JM |
3007 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
3008 | gdbarch_register_name_ftype register_name) | |
0f71a2f6 JM |
3009 | { |
3010 | gdbarch->register_name = register_name; | |
3011 | } | |
3012 | ||
0f71a2f6 | 3013 | int |
9c04cab7 | 3014 | gdbarch_register_type_p (struct gdbarch *gdbarch) |
0f71a2f6 | 3015 | { |
8de9bdc4 | 3016 | gdb_assert (gdbarch != NULL); |
956ac328 | 3017 | return gdbarch->register_type != NULL; |
9c04cab7 AC |
3018 | } |
3019 | ||
3020 | struct type * | |
3021 | gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr) | |
3022 | { | |
3023 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3024 | gdb_assert (gdbarch->register_type != NULL); |
0f71a2f6 | 3025 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
3026 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n"); |
3027 | return gdbarch->register_type (gdbarch, reg_nr); | |
0f71a2f6 JM |
3028 | } |
3029 | ||
3030 | void | |
9c04cab7 AC |
3031 | set_gdbarch_register_type (struct gdbarch *gdbarch, |
3032 | gdbarch_register_type_ftype register_type) | |
0f71a2f6 | 3033 | { |
9c04cab7 | 3034 | gdbarch->register_type = register_type; |
0f71a2f6 JM |
3035 | } |
3036 | ||
46654a5b | 3037 | int |
9c04cab7 | 3038 | gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch) |
46654a5b AC |
3039 | { |
3040 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3041 | return gdbarch->deprecated_register_virtual_type != NULL; |
46654a5b AC |
3042 | } |
3043 | ||
9c04cab7 AC |
3044 | struct type * |
3045 | gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr) | |
0f71a2f6 | 3046 | { |
8de9bdc4 | 3047 | gdb_assert (gdbarch != NULL); |
956ac328 | 3048 | gdb_assert (gdbarch->deprecated_register_virtual_type != NULL); |
0f71a2f6 | 3049 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
3050 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n"); |
3051 | return gdbarch->deprecated_register_virtual_type (reg_nr); | |
0f71a2f6 JM |
3052 | } |
3053 | ||
3054 | void | |
9c04cab7 AC |
3055 | set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, |
3056 | gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type) | |
0f71a2f6 | 3057 | { |
9c04cab7 | 3058 | gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type; |
0f71a2f6 JM |
3059 | } |
3060 | ||
3061 | int | |
9c04cab7 | 3062 | gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch) |
0f71a2f6 | 3063 | { |
8de9bdc4 | 3064 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3065 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
3066 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n"); |
3067 | return gdbarch->deprecated_register_bytes; | |
0f71a2f6 JM |
3068 | } |
3069 | ||
3070 | void | |
9c04cab7 AC |
3071 | set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, |
3072 | int deprecated_register_bytes) | |
0f71a2f6 | 3073 | { |
9c04cab7 | 3074 | gdbarch->deprecated_register_bytes = deprecated_register_bytes; |
0f71a2f6 JM |
3075 | } |
3076 | ||
3077 | int | |
9c04cab7 | 3078 | gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch) |
a0ed5532 AC |
3079 | { |
3080 | gdb_assert (gdbarch != NULL); | |
9c04cab7 | 3081 | return gdbarch->deprecated_register_byte != generic_register_byte; |
a0ed5532 AC |
3082 | } |
3083 | ||
3084 | int | |
9c04cab7 | 3085 | gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 3086 | { |
8de9bdc4 | 3087 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
3088 | gdb_assert (gdbarch->deprecated_register_byte != NULL); |
3089 | /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */ | |
0f71a2f6 | 3090 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
3091 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n"); |
3092 | return gdbarch->deprecated_register_byte (reg_nr); | |
0f71a2f6 JM |
3093 | } |
3094 | ||
3095 | void | |
9c04cab7 AC |
3096 | set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, |
3097 | gdbarch_deprecated_register_byte_ftype deprecated_register_byte) | |
0f71a2f6 | 3098 | { |
9c04cab7 | 3099 | gdbarch->deprecated_register_byte = deprecated_register_byte; |
0f71a2f6 JM |
3100 | } |
3101 | ||
dadd712e AC |
3102 | int |
3103 | gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch) | |
3104 | { | |
3105 | gdb_assert (gdbarch != NULL); | |
3106 | return gdbarch->deprecated_register_raw_size != generic_register_size; | |
3107 | } | |
3108 | ||
0f71a2f6 | 3109 | int |
9c04cab7 | 3110 | gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 3111 | { |
8de9bdc4 | 3112 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
3113 | gdb_assert (gdbarch->deprecated_register_raw_size != NULL); |
3114 | /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */ | |
0f71a2f6 | 3115 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
3116 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n"); |
3117 | return gdbarch->deprecated_register_raw_size (reg_nr); | |
0f71a2f6 JM |
3118 | } |
3119 | ||
3120 | void | |
9c04cab7 AC |
3121 | set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, |
3122 | gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size) | |
0f71a2f6 | 3123 | { |
9c04cab7 | 3124 | gdbarch->deprecated_register_raw_size = deprecated_register_raw_size; |
0f71a2f6 JM |
3125 | } |
3126 | ||
dadd712e AC |
3127 | int |
3128 | gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch) | |
3129 | { | |
3130 | gdb_assert (gdbarch != NULL); | |
3131 | return gdbarch->deprecated_register_virtual_size != generic_register_size; | |
3132 | } | |
3133 | ||
0f71a2f6 | 3134 | int |
9c04cab7 | 3135 | gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 3136 | { |
8de9bdc4 | 3137 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
3138 | gdb_assert (gdbarch->deprecated_register_virtual_size != NULL); |
3139 | /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */ | |
0f71a2f6 | 3140 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
3141 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n"); |
3142 | return gdbarch->deprecated_register_virtual_size (reg_nr); | |
0f71a2f6 JM |
3143 | } |
3144 | ||
3145 | void | |
9c04cab7 AC |
3146 | set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, |
3147 | gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size) | |
0f71a2f6 | 3148 | { |
9c04cab7 | 3149 | gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size; |
0f71a2f6 JM |
3150 | } |
3151 | ||
35cac7cf | 3152 | int |
9c04cab7 | 3153 | gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch) |
35cac7cf AC |
3154 | { |
3155 | gdb_assert (gdbarch != NULL); | |
ae99b398 | 3156 | return gdbarch->deprecated_max_register_raw_size != 0; |
35cac7cf AC |
3157 | } |
3158 | ||
9c04cab7 AC |
3159 | int |
3160 | gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch) | |
0f71a2f6 | 3161 | { |
8de9bdc4 | 3162 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3163 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
3164 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n"); |
3165 | return gdbarch->deprecated_max_register_raw_size; | |
0f71a2f6 JM |
3166 | } |
3167 | ||
3168 | void | |
9c04cab7 AC |
3169 | set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch, |
3170 | int deprecated_max_register_raw_size) | |
0f71a2f6 | 3171 | { |
9c04cab7 | 3172 | gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size; |
0f71a2f6 JM |
3173 | } |
3174 | ||
35cac7cf | 3175 | int |
9c04cab7 | 3176 | gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch) |
35cac7cf AC |
3177 | { |
3178 | gdb_assert (gdbarch != NULL); | |
ae99b398 | 3179 | return gdbarch->deprecated_max_register_virtual_size != 0; |
35cac7cf AC |
3180 | } |
3181 | ||
9c04cab7 AC |
3182 | int |
3183 | gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch) | |
35cac7cf AC |
3184 | { |
3185 | gdb_assert (gdbarch != NULL); | |
35cac7cf | 3186 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
3187 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n"); |
3188 | return gdbarch->deprecated_max_register_virtual_size; | |
35cac7cf AC |
3189 | } |
3190 | ||
3191 | void | |
9c04cab7 AC |
3192 | set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch, |
3193 | int deprecated_max_register_virtual_size) | |
35cac7cf | 3194 | { |
9c04cab7 | 3195 | gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size; |
35cac7cf AC |
3196 | } |
3197 | ||
f3be58bc AC |
3198 | int |
3199 | gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch) | |
3200 | { | |
3201 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3202 | return gdbarch->unwind_dummy_id != NULL; |
f3be58bc AC |
3203 | } |
3204 | ||
3205 | struct frame_id | |
3206 | gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info) | |
3207 | { | |
3208 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3209 | gdb_assert (gdbarch->unwind_dummy_id != NULL); |
f3be58bc AC |
3210 | if (gdbarch_debug >= 2) |
3211 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n"); | |
3212 | return gdbarch->unwind_dummy_id (gdbarch, info); | |
3213 | } | |
3214 | ||
3215 | void | |
3216 | set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, | |
3217 | gdbarch_unwind_dummy_id_ftype unwind_dummy_id) | |
3218 | { | |
3219 | gdbarch->unwind_dummy_id = unwind_dummy_id; | |
3220 | } | |
3221 | ||
3222 | int | |
a59fe496 | 3223 | gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch) |
f3be58bc AC |
3224 | { |
3225 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3226 | return gdbarch->deprecated_save_dummy_frame_tos != NULL; |
f3be58bc AC |
3227 | } |
3228 | ||
3229 | void | |
a59fe496 | 3230 | gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) |
f3be58bc AC |
3231 | { |
3232 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3233 | gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL); |
f3be58bc | 3234 | if (gdbarch_debug >= 2) |
a59fe496 AC |
3235 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n"); |
3236 | gdbarch->deprecated_save_dummy_frame_tos (sp); | |
f3be58bc AC |
3237 | } |
3238 | ||
3239 | void | |
a59fe496 AC |
3240 | set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, |
3241 | gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos) | |
f3be58bc | 3242 | { |
a59fe496 | 3243 | gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos; |
f3be58bc AC |
3244 | } |
3245 | ||
3246 | int | |
3247 | gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch) | |
3248 | { | |
3249 | gdb_assert (gdbarch != NULL); | |
3250 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ | |
3251 | if (gdbarch_debug >= 2) | |
3252 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); | |
3253 | return gdbarch->deprecated_fp_regnum; | |
3254 | } | |
3255 | ||
3256 | void | |
3257 | set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, | |
3258 | int deprecated_fp_regnum) | |
3259 | { | |
3260 | gdbarch->deprecated_fp_regnum = deprecated_fp_regnum; | |
3261 | } | |
3262 | ||
3263 | int | |
3264 | gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch) | |
3265 | { | |
3266 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3267 | return gdbarch->deprecated_target_read_fp != NULL; |
f3be58bc AC |
3268 | } |
3269 | ||
3270 | CORE_ADDR | |
3271 | gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch) | |
3272 | { | |
3273 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3274 | gdb_assert (gdbarch->deprecated_target_read_fp != NULL); |
f3be58bc AC |
3275 | if (gdbarch_debug >= 2) |
3276 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n"); | |
3277 | return gdbarch->deprecated_target_read_fp (); | |
3278 | } | |
3279 | ||
3280 | void | |
3281 | set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, | |
3282 | gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp) | |
3283 | { | |
3284 | gdbarch->deprecated_target_read_fp = deprecated_target_read_fp; | |
3285 | } | |
3286 | ||
0ab7a791 | 3287 | int |
b8de8283 | 3288 | gdbarch_push_dummy_call_p (struct gdbarch *gdbarch) |
0ab7a791 AC |
3289 | { |
3290 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3291 | return gdbarch->push_dummy_call != NULL; |
0ab7a791 AC |
3292 | } |
3293 | ||
b8de8283 AC |
3294 | CORE_ADDR |
3295 | gdbarch_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) | |
666e11c5 | 3296 | { |
8de9bdc4 | 3297 | gdb_assert (gdbarch != NULL); |
956ac328 | 3298 | gdb_assert (gdbarch->push_dummy_call != NULL); |
666e11c5 | 3299 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3300 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n"); |
3301 | return gdbarch->push_dummy_call (gdbarch, func_addr, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr); | |
666e11c5 EZ |
3302 | } |
3303 | ||
3304 | void | |
b8de8283 AC |
3305 | set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, |
3306 | gdbarch_push_dummy_call_ftype push_dummy_call) | |
666e11c5 | 3307 | { |
b8de8283 | 3308 | gdbarch->push_dummy_call = push_dummy_call; |
666e11c5 EZ |
3309 | } |
3310 | ||
b8de8283 AC |
3311 | int |
3312 | gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch) | |
0ab7a791 AC |
3313 | { |
3314 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3315 | return gdbarch->deprecated_push_arguments != NULL; |
b8de8283 AC |
3316 | } |
3317 | ||
3318 | CORE_ADDR | |
3319 | gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) | |
3320 | { | |
3321 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3322 | gdb_assert (gdbarch->deprecated_push_arguments != NULL); |
0ab7a791 | 3323 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3324 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n"); |
3325 | return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr); | |
0ab7a791 AC |
3326 | } |
3327 | ||
3328 | void | |
b8de8283 AC |
3329 | set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, |
3330 | gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments) | |
0ab7a791 | 3331 | { |
b8de8283 | 3332 | gdbarch->deprecated_push_arguments = deprecated_push_arguments; |
0ab7a791 AC |
3333 | } |
3334 | ||
23e3a7ac | 3335 | int |
b8de8283 | 3336 | gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch) |
23e3a7ac AC |
3337 | { |
3338 | gdb_assert (gdbarch != NULL); | |
b8de8283 AC |
3339 | /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */ |
3340 | if (gdbarch_debug >= 2) | |
3341 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n"); | |
3342 | return gdbarch->deprecated_use_generic_dummy_frames; | |
23e3a7ac AC |
3343 | } |
3344 | ||
5e74b15c | 3345 | void |
b8de8283 AC |
3346 | set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch, |
3347 | int deprecated_use_generic_dummy_frames) | |
3348 | { | |
3349 | gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames; | |
3350 | } | |
3351 | ||
3352 | int | |
3353 | gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch) | |
5e74b15c | 3354 | { |
8de9bdc4 | 3355 | gdb_assert (gdbarch != NULL); |
956ac328 | 3356 | return gdbarch->deprecated_push_return_address != NULL; |
b8de8283 AC |
3357 | } |
3358 | ||
3359 | CORE_ADDR | |
3360 | gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp) | |
3361 | { | |
3362 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3363 | gdb_assert (gdbarch->deprecated_push_return_address != NULL); |
5e74b15c | 3364 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3365 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n"); |
3366 | return gdbarch->deprecated_push_return_address (pc, sp); | |
5e74b15c RE |
3367 | } |
3368 | ||
3369 | void | |
b8de8283 AC |
3370 | set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, |
3371 | gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address) | |
5e74b15c | 3372 | { |
b8de8283 | 3373 | gdbarch->deprecated_push_return_address = deprecated_push_return_address; |
5e74b15c RE |
3374 | } |
3375 | ||
e76f1f2e | 3376 | int |
b8de8283 | 3377 | gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch) |
e76f1f2e AC |
3378 | { |
3379 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3380 | return gdbarch->deprecated_dummy_write_sp != NULL; |
e76f1f2e AC |
3381 | } |
3382 | ||
3383 | void | |
b8de8283 | 3384 | gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val) |
e76f1f2e AC |
3385 | { |
3386 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3387 | gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL); |
e76f1f2e | 3388 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3389 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n"); |
3390 | gdbarch->deprecated_dummy_write_sp (val); | |
e76f1f2e AC |
3391 | } |
3392 | ||
3393 | void | |
b8de8283 AC |
3394 | set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, |
3395 | gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp) | |
e76f1f2e | 3396 | { |
b8de8283 | 3397 | gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp; |
e76f1f2e AC |
3398 | } |
3399 | ||
7c7651b2 | 3400 | int |
b8de8283 | 3401 | gdbarch_deprecated_register_size (struct gdbarch *gdbarch) |
7c7651b2 | 3402 | { |
8de9bdc4 | 3403 | gdb_assert (gdbarch != NULL); |
7c7651b2 | 3404 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3405 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n"); |
3406 | return gdbarch->deprecated_register_size; | |
7c7651b2 AC |
3407 | } |
3408 | ||
3409 | void | |
b8de8283 AC |
3410 | set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, |
3411 | int deprecated_register_size) | |
7c7651b2 | 3412 | { |
b8de8283 | 3413 | gdbarch->deprecated_register_size = deprecated_register_size; |
7c7651b2 AC |
3414 | } |
3415 | ||
2649061d | 3416 | int |
b8de8283 | 3417 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
2649061d | 3418 | { |
8de9bdc4 | 3419 | gdb_assert (gdbarch != NULL); |
b8de8283 AC |
3420 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
3421 | if (gdbarch_debug >= 2) | |
3422 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); | |
3423 | return gdbarch->call_dummy_location; | |
2649061d AC |
3424 | } |
3425 | ||
b8de8283 AC |
3426 | void |
3427 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, | |
3428 | int call_dummy_location) | |
3429 | { | |
3430 | gdbarch->call_dummy_location = call_dummy_location; | |
3431 | } | |
3432 | ||
b8de8283 AC |
3433 | CORE_ADDR |
3434 | gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch) | |
3435 | { | |
3436 | gdb_assert (gdbarch != NULL); | |
3437 | if (gdbarch_debug >= 2) | |
3438 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n"); | |
3439 | return gdbarch->deprecated_call_dummy_start_offset; | |
3440 | } | |
3441 | ||
3442 | void | |
3443 | set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, | |
3444 | CORE_ADDR deprecated_call_dummy_start_offset) | |
3445 | { | |
3446 | gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset; | |
3447 | } | |
3448 | ||
3449 | CORE_ADDR | |
3450 | gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) | |
3451 | { | |
3452 | gdb_assert (gdbarch != NULL); | |
3453 | if (gdbarch_debug >= 2) | |
3454 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n"); | |
3455 | return gdbarch->deprecated_call_dummy_breakpoint_offset; | |
3456 | } | |
3457 | ||
3458 | void | |
3459 | set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, | |
3460 | CORE_ADDR deprecated_call_dummy_breakpoint_offset) | |
3461 | { | |
3462 | gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset; | |
2649061d AC |
3463 | } |
3464 | ||
01fb7433 | 3465 | int |
b8de8283 | 3466 | gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch) |
01fb7433 | 3467 | { |
8de9bdc4 | 3468 | gdb_assert (gdbarch != NULL); |
01fb7433 | 3469 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3470 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n"); |
3471 | return gdbarch->deprecated_call_dummy_length; | |
01fb7433 AC |
3472 | } |
3473 | ||
3474 | void | |
b8de8283 AC |
3475 | set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, |
3476 | int deprecated_call_dummy_length) | |
01fb7433 | 3477 | { |
b8de8283 AC |
3478 | gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length; |
3479 | } | |
3480 | ||
3481 | LONGEST * | |
3482 | gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch) | |
3483 | { | |
3484 | gdb_assert (gdbarch != NULL); | |
3485 | /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */ | |
3486 | if (gdbarch_debug >= 2) | |
3487 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n"); | |
3488 | return gdbarch->deprecated_call_dummy_words; | |
3489 | } | |
3490 | ||
3491 | void | |
3492 | set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, | |
3493 | LONGEST * deprecated_call_dummy_words) | |
3494 | { | |
3495 | gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words; | |
01fb7433 AC |
3496 | } |
3497 | ||
3498 | int | |
b8de8283 | 3499 | gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch) |
01fb7433 | 3500 | { |
8de9bdc4 | 3501 | gdb_assert (gdbarch != NULL); |
b8de8283 | 3502 | /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */ |
01fb7433 | 3503 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3504 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n"); |
3505 | return gdbarch->deprecated_sizeof_call_dummy_words; | |
01fb7433 AC |
3506 | } |
3507 | ||
3508 | void | |
b8de8283 AC |
3509 | set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, |
3510 | int deprecated_sizeof_call_dummy_words) | |
01fb7433 | 3511 | { |
b8de8283 | 3512 | gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words; |
01fb7433 AC |
3513 | } |
3514 | ||
0f71a2f6 | 3515 | int |
b8de8283 | 3516 | gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch) |
0f71a2f6 | 3517 | { |
8de9bdc4 | 3518 | gdb_assert (gdbarch != NULL); |
956ac328 | 3519 | return gdbarch->deprecated_fix_call_dummy != NULL; |
b8de8283 AC |
3520 | } |
3521 | ||
3522 | void | |
3523 | gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p) | |
3524 | { | |
3525 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3526 | gdb_assert (gdbarch->deprecated_fix_call_dummy != NULL); |
0f71a2f6 | 3527 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3528 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n"); |
3529 | gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p); | |
0f71a2f6 JM |
3530 | } |
3531 | ||
3532 | void | |
b8de8283 AC |
3533 | set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, |
3534 | gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy) | |
0f71a2f6 | 3535 | { |
b8de8283 | 3536 | gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy; |
0f71a2f6 JM |
3537 | } |
3538 | ||
3539 | int | |
b8de8283 | 3540 | gdbarch_push_dummy_code_p (struct gdbarch *gdbarch) |
0f71a2f6 | 3541 | { |
8de9bdc4 | 3542 | gdb_assert (gdbarch != NULL); |
956ac328 | 3543 | return gdbarch->push_dummy_code != NULL; |
b8de8283 AC |
3544 | } |
3545 | ||
3546 | CORE_ADDR | |
3547 | gdbarch_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr) | |
3548 | { | |
3549 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3550 | gdb_assert (gdbarch->push_dummy_code != NULL); |
0f71a2f6 | 3551 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3552 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n"); |
3553 | return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr); | |
0f71a2f6 JM |
3554 | } |
3555 | ||
3556 | void | |
b8de8283 AC |
3557 | set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, |
3558 | gdbarch_push_dummy_code_ftype push_dummy_code) | |
0f71a2f6 | 3559 | { |
b8de8283 | 3560 | gdbarch->push_dummy_code = push_dummy_code; |
0f71a2f6 JM |
3561 | } |
3562 | ||
b8de8283 AC |
3563 | int |
3564 | gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch) | |
0f71a2f6 | 3565 | { |
8de9bdc4 | 3566 | gdb_assert (gdbarch != NULL); |
956ac328 | 3567 | return gdbarch->deprecated_push_dummy_frame != NULL; |
b8de8283 AC |
3568 | } |
3569 | ||
3570 | void | |
3571 | gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch) | |
3572 | { | |
3573 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3574 | gdb_assert (gdbarch->deprecated_push_dummy_frame != NULL); |
0f71a2f6 | 3575 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3576 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n"); |
3577 | gdbarch->deprecated_push_dummy_frame (); | |
0f71a2f6 JM |
3578 | } |
3579 | ||
3580 | void | |
b8de8283 AC |
3581 | set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch, |
3582 | gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame) | |
0f71a2f6 | 3583 | { |
b8de8283 | 3584 | gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame; |
0f71a2f6 JM |
3585 | } |
3586 | ||
b8de8283 AC |
3587 | int |
3588 | gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch) | |
0f71a2f6 | 3589 | { |
8de9bdc4 | 3590 | gdb_assert (gdbarch != NULL); |
956ac328 | 3591 | return gdbarch->deprecated_do_registers_info != NULL; |
b8de8283 AC |
3592 | } |
3593 | ||
3594 | void | |
3595 | gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) | |
3596 | { | |
3597 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3598 | gdb_assert (gdbarch->deprecated_do_registers_info != NULL); |
0f71a2f6 | 3599 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3600 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n"); |
3601 | gdbarch->deprecated_do_registers_info (reg_nr, fpregs); | |
0f71a2f6 JM |
3602 | } |
3603 | ||
3604 | void | |
b8de8283 AC |
3605 | set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, |
3606 | gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info) | |
0f71a2f6 | 3607 | { |
b8de8283 AC |
3608 | gdbarch->deprecated_do_registers_info = deprecated_do_registers_info; |
3609 | } | |
3610 | ||
3611 | void | |
3612 | gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) | |
3613 | { | |
3614 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3615 | gdb_assert (gdbarch->print_registers_info != NULL); |
b8de8283 AC |
3616 | if (gdbarch_debug >= 2) |
3617 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); | |
3618 | gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); | |
3619 | } | |
3620 | ||
3621 | void | |
3622 | set_gdbarch_print_registers_info (struct gdbarch *gdbarch, | |
3623 | gdbarch_print_registers_info_ftype print_registers_info) | |
3624 | { | |
3625 | gdbarch->print_registers_info = print_registers_info; | |
0f71a2f6 JM |
3626 | } |
3627 | ||
0f71a2f6 | 3628 | int |
b8de8283 AC |
3629 | gdbarch_print_float_info_p (struct gdbarch *gdbarch) |
3630 | { | |
3631 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3632 | return gdbarch->print_float_info != NULL; |
b8de8283 AC |
3633 | } |
3634 | ||
3635 | void | |
3636 | gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
0f71a2f6 | 3637 | { |
8de9bdc4 | 3638 | gdb_assert (gdbarch != NULL); |
956ac328 | 3639 | gdb_assert (gdbarch->print_float_info != NULL); |
0f71a2f6 | 3640 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3641 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); |
3642 | gdbarch->print_float_info (gdbarch, file, frame, args); | |
0f71a2f6 JM |
3643 | } |
3644 | ||
3645 | void | |
b8de8283 AC |
3646 | set_gdbarch_print_float_info (struct gdbarch *gdbarch, |
3647 | gdbarch_print_float_info_ftype print_float_info) | |
0f71a2f6 | 3648 | { |
b8de8283 AC |
3649 | gdbarch->print_float_info = print_float_info; |
3650 | } | |
3651 | ||
3652 | int | |
3653 | gdbarch_print_vector_info_p (struct gdbarch *gdbarch) | |
3654 | { | |
3655 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3656 | return gdbarch->print_vector_info != NULL; |
b8de8283 AC |
3657 | } |
3658 | ||
3659 | void | |
3660 | gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
3661 | { | |
3662 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3663 | gdb_assert (gdbarch->print_vector_info != NULL); |
b8de8283 AC |
3664 | if (gdbarch_debug >= 2) |
3665 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); | |
3666 | gdbarch->print_vector_info (gdbarch, file, frame, args); | |
0f71a2f6 JM |
3667 | } |
3668 | ||
b8de8283 AC |
3669 | void |
3670 | set_gdbarch_print_vector_info (struct gdbarch *gdbarch, | |
3671 | gdbarch_print_vector_info_ftype print_vector_info) | |
ae45cd16 | 3672 | { |
b8de8283 | 3673 | gdbarch->print_vector_info = print_vector_info; |
ae45cd16 AC |
3674 | } |
3675 | ||
3676 | int | |
b8de8283 | 3677 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 3678 | { |
8de9bdc4 | 3679 | gdb_assert (gdbarch != NULL); |
956ac328 | 3680 | gdb_assert (gdbarch->register_sim_regno != NULL); |
0f71a2f6 | 3681 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3682 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); |
3683 | return gdbarch->register_sim_regno (reg_nr); | |
0f71a2f6 JM |
3684 | } |
3685 | ||
3686 | void | |
b8de8283 AC |
3687 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, |
3688 | gdbarch_register_sim_regno_ftype register_sim_regno) | |
0f71a2f6 | 3689 | { |
b8de8283 | 3690 | gdbarch->register_sim_regno = register_sim_regno; |
0f71a2f6 JM |
3691 | } |
3692 | ||
b8de8283 AC |
3693 | int |
3694 | gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch) | |
0f71a2f6 | 3695 | { |
8de9bdc4 | 3696 | gdb_assert (gdbarch != NULL); |
956ac328 | 3697 | return gdbarch->register_bytes_ok != NULL; |
0f71a2f6 JM |
3698 | } |
3699 | ||
3700 | int | |
b8de8283 | 3701 | gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes) |
0f71a2f6 | 3702 | { |
8de9bdc4 | 3703 | gdb_assert (gdbarch != NULL); |
956ac328 | 3704 | gdb_assert (gdbarch->register_bytes_ok != NULL); |
0f71a2f6 | 3705 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3706 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n"); |
3707 | return gdbarch->register_bytes_ok (nr_bytes); | |
0f71a2f6 JM |
3708 | } |
3709 | ||
3710 | void | |
b8de8283 AC |
3711 | set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, |
3712 | gdbarch_register_bytes_ok_ftype register_bytes_ok) | |
0f71a2f6 | 3713 | { |
b8de8283 | 3714 | gdbarch->register_bytes_ok = register_bytes_ok; |
0f71a2f6 JM |
3715 | } |
3716 | ||
3717 | int | |
b8de8283 | 3718 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
0f71a2f6 | 3719 | { |
8de9bdc4 | 3720 | gdb_assert (gdbarch != NULL); |
956ac328 | 3721 | gdb_assert (gdbarch->cannot_fetch_register != NULL); |
b8de8283 AC |
3722 | if (gdbarch_debug >= 2) |
3723 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); | |
3724 | return gdbarch->cannot_fetch_register (regnum); | |
3725 | } | |
3726 | ||
3727 | void | |
3728 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, | |
3729 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) | |
3730 | { | |
3731 | gdbarch->cannot_fetch_register = cannot_fetch_register; | |
0f71a2f6 JM |
3732 | } |
3733 | ||
3734 | int | |
b8de8283 | 3735 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
0f71a2f6 | 3736 | { |
8de9bdc4 | 3737 | gdb_assert (gdbarch != NULL); |
956ac328 | 3738 | gdb_assert (gdbarch->cannot_store_register != NULL); |
0f71a2f6 | 3739 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3740 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); |
3741 | return gdbarch->cannot_store_register (regnum); | |
0f71a2f6 JM |
3742 | } |
3743 | ||
3744 | void | |
b8de8283 AC |
3745 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, |
3746 | gdbarch_cannot_store_register_ftype cannot_store_register) | |
0f71a2f6 | 3747 | { |
b8de8283 | 3748 | gdbarch->cannot_store_register = cannot_store_register; |
0f71a2f6 JM |
3749 | } |
3750 | ||
e8ab51f7 | 3751 | int |
b8de8283 | 3752 | gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) |
e8ab51f7 AC |
3753 | { |
3754 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3755 | return gdbarch->get_longjmp_target != NULL; |
e8ab51f7 AC |
3756 | } |
3757 | ||
b8de8283 AC |
3758 | int |
3759 | gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc) | |
0f71a2f6 | 3760 | { |
8de9bdc4 | 3761 | gdb_assert (gdbarch != NULL); |
956ac328 | 3762 | gdb_assert (gdbarch->get_longjmp_target != NULL); |
0f71a2f6 | 3763 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3764 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); |
3765 | return gdbarch->get_longjmp_target (pc); | |
0f71a2f6 JM |
3766 | } |
3767 | ||
3768 | void | |
b8de8283 AC |
3769 | set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, |
3770 | gdbarch_get_longjmp_target_ftype get_longjmp_target) | |
0f71a2f6 | 3771 | { |
b8de8283 | 3772 | gdbarch->get_longjmp_target = get_longjmp_target; |
0f71a2f6 JM |
3773 | } |
3774 | ||
7043d8dc | 3775 | int |
b8de8283 | 3776 | gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch) |
7043d8dc AC |
3777 | { |
3778 | gdb_assert (gdbarch != NULL); | |
90ba813f | 3779 | return gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy; |
7043d8dc AC |
3780 | } |
3781 | ||
b8de8283 AC |
3782 | int |
3783 | gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address) | |
7043d8dc AC |
3784 | { |
3785 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3786 | gdb_assert (gdbarch->deprecated_pc_in_call_dummy != NULL); |
90ba813f | 3787 | /* Do not check predicate: gdbarch->deprecated_pc_in_call_dummy != deprecated_pc_in_call_dummy, allow call. */ |
7043d8dc | 3788 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3789 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n"); |
3790 | return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address); | |
7043d8dc AC |
3791 | } |
3792 | ||
3793 | void | |
b8de8283 AC |
3794 | set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, |
3795 | gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy) | |
7043d8dc | 3796 | { |
b8de8283 | 3797 | gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy; |
7043d8dc AC |
3798 | } |
3799 | ||
2ca6c561 AC |
3800 | int |
3801 | gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch) | |
3802 | { | |
3803 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3804 | return gdbarch->deprecated_init_frame_pc_first != NULL; |
2ca6c561 AC |
3805 | } |
3806 | ||
97f46953 | 3807 | CORE_ADDR |
2ca6c561 | 3808 | gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) |
10312cc4 | 3809 | { |
8de9bdc4 | 3810 | gdb_assert (gdbarch != NULL); |
956ac328 | 3811 | gdb_assert (gdbarch->deprecated_init_frame_pc_first != NULL); |
10312cc4 | 3812 | if (gdbarch_debug >= 2) |
2ca6c561 | 3813 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n"); |
97f46953 | 3814 | return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev); |
10312cc4 AC |
3815 | } |
3816 | ||
3817 | void | |
2ca6c561 AC |
3818 | set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, |
3819 | gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first) | |
10312cc4 | 3820 | { |
2ca6c561 | 3821 | gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first; |
10312cc4 AC |
3822 | } |
3823 | ||
a5afb99f AC |
3824 | int |
3825 | gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch) | |
3826 | { | |
3827 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3828 | return gdbarch->deprecated_init_frame_pc != NULL; |
a5afb99f AC |
3829 | } |
3830 | ||
97f46953 | 3831 | CORE_ADDR |
a5afb99f | 3832 | gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) |
10312cc4 | 3833 | { |
8de9bdc4 | 3834 | gdb_assert (gdbarch != NULL); |
956ac328 | 3835 | gdb_assert (gdbarch->deprecated_init_frame_pc != NULL); |
10312cc4 | 3836 | if (gdbarch_debug >= 2) |
a5afb99f AC |
3837 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n"); |
3838 | return gdbarch->deprecated_init_frame_pc (fromleaf, prev); | |
10312cc4 AC |
3839 | } |
3840 | ||
3841 | void | |
a5afb99f AC |
3842 | set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, |
3843 | gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc) | |
10312cc4 | 3844 | { |
a5afb99f | 3845 | gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc; |
10312cc4 AC |
3846 | } |
3847 | ||
0f71a2f6 | 3848 | int |
104c1213 | 3849 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
0f71a2f6 | 3850 | { |
8de9bdc4 | 3851 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3852 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3853 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
3854 | return gdbarch->believe_pcc_promotion; | |
3855 | } | |
3856 | ||
3857 | void | |
104c1213 JM |
3858 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
3859 | int believe_pcc_promotion) | |
0f71a2f6 JM |
3860 | { |
3861 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; | |
3862 | } | |
3863 | ||
3864 | int | |
104c1213 | 3865 | gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch) |
0f71a2f6 | 3866 | { |
8de9bdc4 | 3867 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3868 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3869 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n"); |
3870 | return gdbarch->believe_pcc_promotion_type; | |
3871 | } | |
3872 | ||
3873 | void | |
104c1213 JM |
3874 | set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, |
3875 | int believe_pcc_promotion_type) | |
0f71a2f6 JM |
3876 | { |
3877 | gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type; | |
3878 | } | |
3879 | ||
a216a322 | 3880 | int |
129c1cd6 | 3881 | gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch) |
a216a322 AC |
3882 | { |
3883 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3884 | return gdbarch->deprecated_get_saved_register != NULL; |
a216a322 AC |
3885 | } |
3886 | ||
0f71a2f6 | 3887 | void |
129c1cd6 | 3888 | gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval) |
0f71a2f6 | 3889 | { |
8de9bdc4 | 3890 | gdb_assert (gdbarch != NULL); |
956ac328 | 3891 | gdb_assert (gdbarch->deprecated_get_saved_register != NULL); |
0f71a2f6 | 3892 | if (gdbarch_debug >= 2) |
129c1cd6 AC |
3893 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n"); |
3894 | gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval); | |
0f71a2f6 JM |
3895 | } |
3896 | ||
3897 | void | |
129c1cd6 AC |
3898 | set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, |
3899 | gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register) | |
0f71a2f6 | 3900 | { |
129c1cd6 | 3901 | gdbarch->deprecated_get_saved_register = deprecated_get_saved_register; |
0f71a2f6 JM |
3902 | } |
3903 | ||
cd0bfa36 AC |
3904 | int |
3905 | gdbarch_deprecated_register_convertible_p (struct gdbarch *gdbarch) | |
3906 | { | |
3907 | gdb_assert (gdbarch != NULL); | |
3908 | return gdbarch->deprecated_register_convertible != NULL; | |
3909 | } | |
3910 | ||
0f71a2f6 | 3911 | int |
781a750d | 3912 | gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, int nr) |
0f71a2f6 | 3913 | { |
8de9bdc4 | 3914 | gdb_assert (gdbarch != NULL); |
956ac328 | 3915 | gdb_assert (gdbarch->deprecated_register_convertible != NULL); |
0f71a2f6 | 3916 | if (gdbarch_debug >= 2) |
781a750d AC |
3917 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convertible called\n"); |
3918 | return gdbarch->deprecated_register_convertible (nr); | |
0f71a2f6 JM |
3919 | } |
3920 | ||
3921 | void | |
781a750d AC |
3922 | set_gdbarch_deprecated_register_convertible (struct gdbarch *gdbarch, |
3923 | gdbarch_deprecated_register_convertible_ftype deprecated_register_convertible) | |
0f71a2f6 | 3924 | { |
781a750d | 3925 | gdbarch->deprecated_register_convertible = deprecated_register_convertible; |
0f71a2f6 JM |
3926 | } |
3927 | ||
3928 | void | |
781a750d | 3929 | gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) |
0f71a2f6 | 3930 | { |
8de9bdc4 | 3931 | gdb_assert (gdbarch != NULL); |
956ac328 | 3932 | gdb_assert (gdbarch->deprecated_register_convert_to_virtual != NULL); |
0f71a2f6 | 3933 | if (gdbarch_debug >= 2) |
781a750d AC |
3934 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_virtual called\n"); |
3935 | gdbarch->deprecated_register_convert_to_virtual (regnum, type, from, to); | |
0f71a2f6 JM |
3936 | } |
3937 | ||
3938 | void | |
781a750d AC |
3939 | set_gdbarch_deprecated_register_convert_to_virtual (struct gdbarch *gdbarch, |
3940 | gdbarch_deprecated_register_convert_to_virtual_ftype deprecated_register_convert_to_virtual) | |
0f71a2f6 | 3941 | { |
781a750d | 3942 | gdbarch->deprecated_register_convert_to_virtual = deprecated_register_convert_to_virtual; |
0f71a2f6 JM |
3943 | } |
3944 | ||
3945 | void | |
781a750d | 3946 | gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, const char *from, char *to) |
0f71a2f6 | 3947 | { |
8de9bdc4 | 3948 | gdb_assert (gdbarch != NULL); |
956ac328 | 3949 | gdb_assert (gdbarch->deprecated_register_convert_to_raw != NULL); |
0f71a2f6 | 3950 | if (gdbarch_debug >= 2) |
781a750d AC |
3951 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_convert_to_raw called\n"); |
3952 | gdbarch->deprecated_register_convert_to_raw (type, regnum, from, to); | |
0f71a2f6 JM |
3953 | } |
3954 | ||
3955 | void | |
781a750d AC |
3956 | set_gdbarch_deprecated_register_convert_to_raw (struct gdbarch *gdbarch, |
3957 | gdbarch_deprecated_register_convert_to_raw_ftype deprecated_register_convert_to_raw) | |
0f71a2f6 | 3958 | { |
781a750d | 3959 | gdbarch->deprecated_register_convert_to_raw = deprecated_register_convert_to_raw; |
0f71a2f6 JM |
3960 | } |
3961 | ||
13d01224 | 3962 | int |
ff2e87ac | 3963 | gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) |
13d01224 AC |
3964 | { |
3965 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3966 | gdb_assert (gdbarch->convert_register_p != NULL); |
13d01224 AC |
3967 | if (gdbarch_debug >= 2) |
3968 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); | |
ff2e87ac | 3969 | return gdbarch->convert_register_p (regnum, type); |
13d01224 AC |
3970 | } |
3971 | ||
3972 | void | |
3973 | set_gdbarch_convert_register_p (struct gdbarch *gdbarch, | |
3974 | gdbarch_convert_register_p_ftype convert_register_p) | |
3975 | { | |
3976 | gdbarch->convert_register_p = convert_register_p; | |
3977 | } | |
3978 | ||
3979 | void | |
ff2e87ac | 3980 | gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf) |
13d01224 AC |
3981 | { |
3982 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3983 | gdb_assert (gdbarch->register_to_value != NULL); |
13d01224 AC |
3984 | if (gdbarch_debug >= 2) |
3985 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); | |
ff2e87ac | 3986 | gdbarch->register_to_value (frame, regnum, type, buf); |
13d01224 AC |
3987 | } |
3988 | ||
3989 | void | |
3990 | set_gdbarch_register_to_value (struct gdbarch *gdbarch, | |
3991 | gdbarch_register_to_value_ftype register_to_value) | |
3992 | { | |
3993 | gdbarch->register_to_value = register_to_value; | |
3994 | } | |
3995 | ||
3996 | void | |
ff2e87ac | 3997 | gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf) |
13d01224 AC |
3998 | { |
3999 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4000 | gdb_assert (gdbarch->value_to_register != NULL); |
13d01224 AC |
4001 | if (gdbarch_debug >= 2) |
4002 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); | |
ff2e87ac | 4003 | gdbarch->value_to_register (frame, regnum, type, buf); |
13d01224 AC |
4004 | } |
4005 | ||
4006 | void | |
4007 | set_gdbarch_value_to_register (struct gdbarch *gdbarch, | |
4008 | gdbarch_value_to_register_ftype value_to_register) | |
4009 | { | |
4010 | gdbarch->value_to_register = value_to_register; | |
4011 | } | |
4012 | ||
4478b372 | 4013 | CORE_ADDR |
66140c26 | 4014 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf) |
4478b372 | 4015 | { |
8de9bdc4 | 4016 | gdb_assert (gdbarch != NULL); |
956ac328 | 4017 | gdb_assert (gdbarch->pointer_to_address != NULL); |
4478b372 JB |
4018 | if (gdbarch_debug >= 2) |
4019 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); | |
4020 | return gdbarch->pointer_to_address (type, buf); | |
4021 | } | |
4022 | ||
4023 | void | |
4024 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, | |
4025 | gdbarch_pointer_to_address_ftype pointer_to_address) | |
4026 | { | |
4027 | gdbarch->pointer_to_address = pointer_to_address; | |
4028 | } | |
4029 | ||
4030 | void | |
ac2e2ef7 | 4031 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr) |
4478b372 | 4032 | { |
8de9bdc4 | 4033 | gdb_assert (gdbarch != NULL); |
956ac328 | 4034 | gdb_assert (gdbarch->address_to_pointer != NULL); |
4478b372 JB |
4035 | if (gdbarch_debug >= 2) |
4036 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); | |
4037 | gdbarch->address_to_pointer (type, buf, addr); | |
4038 | } | |
4039 | ||
4040 | void | |
4041 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, | |
4042 | gdbarch_address_to_pointer_ftype address_to_pointer) | |
4043 | { | |
4044 | gdbarch->address_to_pointer = address_to_pointer; | |
4045 | } | |
4046 | ||
fc0c74b1 AC |
4047 | int |
4048 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) | |
4049 | { | |
8de9bdc4 | 4050 | gdb_assert (gdbarch != NULL); |
956ac328 | 4051 | return gdbarch->integer_to_address != NULL; |
fc0c74b1 AC |
4052 | } |
4053 | ||
4054 | CORE_ADDR | |
4055 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) | |
4056 | { | |
8de9bdc4 | 4057 | gdb_assert (gdbarch != NULL); |
956ac328 | 4058 | gdb_assert (gdbarch->integer_to_address != NULL); |
fc0c74b1 AC |
4059 | if (gdbarch_debug >= 2) |
4060 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); | |
4061 | return gdbarch->integer_to_address (type, buf); | |
4062 | } | |
4063 | ||
4064 | void | |
4065 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, | |
4066 | gdbarch_integer_to_address_ftype integer_to_address) | |
4067 | { | |
4068 | gdbarch->integer_to_address = integer_to_address; | |
4069 | } | |
4070 | ||
dedc2a2b | 4071 | int |
749b82f6 | 4072 | gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch) |
dedc2a2b AC |
4073 | { |
4074 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4075 | return gdbarch->deprecated_pop_frame != NULL; |
dedc2a2b AC |
4076 | } |
4077 | ||
0f71a2f6 | 4078 | void |
749b82f6 | 4079 | gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch) |
0f71a2f6 | 4080 | { |
8de9bdc4 | 4081 | gdb_assert (gdbarch != NULL); |
956ac328 | 4082 | gdb_assert (gdbarch->deprecated_pop_frame != NULL); |
0f71a2f6 | 4083 | if (gdbarch_debug >= 2) |
749b82f6 AC |
4084 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n"); |
4085 | gdbarch->deprecated_pop_frame (); | |
0f71a2f6 JM |
4086 | } |
4087 | ||
4088 | void | |
749b82f6 AC |
4089 | set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, |
4090 | gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame) | |
0f71a2f6 | 4091 | { |
749b82f6 | 4092 | gdbarch->deprecated_pop_frame = deprecated_pop_frame; |
0f71a2f6 JM |
4093 | } |
4094 | ||
4183d812 AC |
4095 | int |
4096 | gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch) | |
4097 | { | |
4098 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4099 | return gdbarch->deprecated_store_struct_return != NULL; |
4183d812 AC |
4100 | } |
4101 | ||
0f71a2f6 | 4102 | void |
4183d812 | 4103 | gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp) |
0f71a2f6 | 4104 | { |
8de9bdc4 | 4105 | gdb_assert (gdbarch != NULL); |
956ac328 | 4106 | gdb_assert (gdbarch->deprecated_store_struct_return != NULL); |
0f71a2f6 | 4107 | if (gdbarch_debug >= 2) |
4183d812 AC |
4108 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n"); |
4109 | gdbarch->deprecated_store_struct_return (addr, sp); | |
0f71a2f6 JM |
4110 | } |
4111 | ||
4112 | void | |
4183d812 AC |
4113 | set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, |
4114 | gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return) | |
0f71a2f6 | 4115 | { |
4183d812 | 4116 | gdbarch->deprecated_store_struct_return = deprecated_store_struct_return; |
0f71a2f6 JM |
4117 | } |
4118 | ||
92ad9cd9 AC |
4119 | int |
4120 | gdbarch_return_value_p (struct gdbarch *gdbarch) | |
4121 | { | |
4122 | gdb_assert (gdbarch != NULL); | |
4123 | return gdbarch->return_value != NULL; | |
4124 | } | |
4125 | ||
4126 | enum return_value_convention | |
963e2bb7 | 4127 | gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf) |
92ad9cd9 AC |
4128 | { |
4129 | gdb_assert (gdbarch != NULL); | |
4130 | gdb_assert (gdbarch->return_value != NULL); | |
4131 | if (gdbarch_debug >= 2) | |
4132 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n"); | |
963e2bb7 | 4133 | return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf); |
92ad9cd9 AC |
4134 | } |
4135 | ||
4136 | void | |
4137 | set_gdbarch_return_value (struct gdbarch *gdbarch, | |
4138 | gdbarch_return_value_ftype return_value) | |
4139 | { | |
4140 | gdbarch->return_value = return_value; | |
4141 | } | |
4142 | ||
4143 | int | |
4144 | gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type) | |
4145 | { | |
4146 | gdb_assert (gdbarch != NULL); | |
4147 | gdb_assert (gdbarch->return_value_on_stack != NULL); | |
4148 | if (gdbarch_debug >= 2) | |
4149 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n"); | |
4150 | return gdbarch->return_value_on_stack (type); | |
4151 | } | |
4152 | ||
4153 | void | |
4154 | set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, | |
4155 | gdbarch_return_value_on_stack_ftype return_value_on_stack) | |
4156 | { | |
4157 | gdbarch->return_value_on_stack = return_value_on_stack; | |
4158 | } | |
4159 | ||
0f71a2f6 | 4160 | void |
ebba8386 AC |
4161 | gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf) |
4162 | { | |
4163 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4164 | gdb_assert (gdbarch->extract_return_value != NULL); |
ebba8386 AC |
4165 | if (gdbarch_debug >= 2) |
4166 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n"); | |
4167 | gdbarch->extract_return_value (type, regcache, valbuf); | |
4168 | } | |
4169 | ||
4170 | void | |
4171 | set_gdbarch_extract_return_value (struct gdbarch *gdbarch, | |
4172 | gdbarch_extract_return_value_ftype extract_return_value) | |
4173 | { | |
4174 | gdbarch->extract_return_value = extract_return_value; | |
4175 | } | |
4176 | ||
4177 | void | |
4178 | gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf) | |
0f71a2f6 | 4179 | { |
8de9bdc4 | 4180 | gdb_assert (gdbarch != NULL); |
956ac328 | 4181 | gdb_assert (gdbarch->store_return_value != NULL); |
0f71a2f6 | 4182 | if (gdbarch_debug >= 2) |
0f71a2f6 | 4183 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n"); |
ebba8386 | 4184 | gdbarch->store_return_value (type, regcache, valbuf); |
0f71a2f6 JM |
4185 | } |
4186 | ||
4187 | void | |
104c1213 JM |
4188 | set_gdbarch_store_return_value (struct gdbarch *gdbarch, |
4189 | gdbarch_store_return_value_ftype store_return_value) | |
0f71a2f6 JM |
4190 | { |
4191 | gdbarch->store_return_value = store_return_value; | |
4192 | } | |
4193 | ||
ebba8386 AC |
4194 | void |
4195 | gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) | |
4196 | { | |
4197 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4198 | gdb_assert (gdbarch->deprecated_extract_return_value != NULL); |
ebba8386 AC |
4199 | if (gdbarch_debug >= 2) |
4200 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n"); | |
4201 | gdbarch->deprecated_extract_return_value (type, regbuf, valbuf); | |
4202 | } | |
4203 | ||
4204 | void | |
4205 | set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, | |
4206 | gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value) | |
4207 | { | |
4208 | gdbarch->deprecated_extract_return_value = deprecated_extract_return_value; | |
4209 | } | |
4210 | ||
4211 | void | |
4212 | gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf) | |
4213 | { | |
4214 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4215 | gdb_assert (gdbarch->deprecated_store_return_value != NULL); |
ebba8386 AC |
4216 | if (gdbarch_debug >= 2) |
4217 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n"); | |
4218 | gdbarch->deprecated_store_return_value (type, valbuf); | |
4219 | } | |
4220 | ||
4221 | void | |
4222 | set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, | |
4223 | gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value) | |
4224 | { | |
4225 | gdbarch->deprecated_store_return_value = deprecated_store_return_value; | |
4226 | } | |
4227 | ||
92ad9cd9 AC |
4228 | int |
4229 | gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type) | |
4230 | { | |
4231 | gdb_assert (gdbarch != NULL); | |
4232 | gdb_assert (gdbarch->use_struct_convention != NULL); | |
4233 | if (gdbarch_debug >= 2) | |
4234 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n"); | |
4235 | return gdbarch->use_struct_convention (gcc_p, value_type); | |
4236 | } | |
4237 | ||
4238 | void | |
4239 | set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, | |
4240 | gdbarch_use_struct_convention_ftype use_struct_convention) | |
4241 | { | |
4242 | gdbarch->use_struct_convention = use_struct_convention; | |
4243 | } | |
4244 | ||
049ee0e4 | 4245 | int |
74055713 | 4246 | gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch) |
049ee0e4 AC |
4247 | { |
4248 | gdb_assert (gdbarch != NULL); | |
74055713 | 4249 | return gdbarch->deprecated_extract_struct_value_address != NULL; |
049ee0e4 AC |
4250 | } |
4251 | ||
4252 | CORE_ADDR | |
74055713 | 4253 | gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache) |
049ee0e4 AC |
4254 | { |
4255 | gdb_assert (gdbarch != NULL); | |
74055713 | 4256 | gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL); |
049ee0e4 | 4257 | if (gdbarch_debug >= 2) |
74055713 AC |
4258 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n"); |
4259 | return gdbarch->deprecated_extract_struct_value_address (regcache); | |
049ee0e4 AC |
4260 | } |
4261 | ||
4262 | void | |
74055713 AC |
4263 | set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, |
4264 | gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address) | |
049ee0e4 | 4265 | { |
74055713 | 4266 | gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address; |
049ee0e4 AC |
4267 | } |
4268 | ||
8f871025 | 4269 | int |
f30ee0bc | 4270 | gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch) |
8f871025 AC |
4271 | { |
4272 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4273 | return gdbarch->deprecated_frame_init_saved_regs != NULL; |
8f871025 AC |
4274 | } |
4275 | ||
0f71a2f6 | 4276 | void |
f30ee0bc | 4277 | gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame) |
0f71a2f6 | 4278 | { |
8de9bdc4 | 4279 | gdb_assert (gdbarch != NULL); |
956ac328 | 4280 | gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL); |
0f71a2f6 | 4281 | if (gdbarch_debug >= 2) |
f30ee0bc AC |
4282 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n"); |
4283 | gdbarch->deprecated_frame_init_saved_regs (frame); | |
0f71a2f6 JM |
4284 | } |
4285 | ||
4286 | void | |
f30ee0bc AC |
4287 | set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, |
4288 | gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs) | |
0f71a2f6 | 4289 | { |
f30ee0bc | 4290 | gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs; |
0f71a2f6 JM |
4291 | } |
4292 | ||
5fdff426 | 4293 | int |
e9582e71 | 4294 | gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch) |
5fdff426 | 4295 | { |
8de9bdc4 | 4296 | gdb_assert (gdbarch != NULL); |
956ac328 | 4297 | return gdbarch->deprecated_init_extra_frame_info != NULL; |
5fdff426 AC |
4298 | } |
4299 | ||
0f71a2f6 | 4300 | void |
e9582e71 | 4301 | gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame) |
0f71a2f6 | 4302 | { |
8de9bdc4 | 4303 | gdb_assert (gdbarch != NULL); |
956ac328 | 4304 | gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL); |
0f71a2f6 | 4305 | if (gdbarch_debug >= 2) |
e9582e71 AC |
4306 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n"); |
4307 | gdbarch->deprecated_init_extra_frame_info (fromleaf, frame); | |
0f71a2f6 JM |
4308 | } |
4309 | ||
4310 | void | |
e9582e71 AC |
4311 | set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, |
4312 | gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info) | |
0f71a2f6 | 4313 | { |
e9582e71 | 4314 | gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info; |
0f71a2f6 JM |
4315 | } |
4316 | ||
4317 | CORE_ADDR | |
4318 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
4319 | { | |
8de9bdc4 | 4320 | gdb_assert (gdbarch != NULL); |
956ac328 | 4321 | gdb_assert (gdbarch->skip_prologue != NULL); |
0f71a2f6 | 4322 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4323 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
4324 | return gdbarch->skip_prologue (ip); | |
4325 | } | |
4326 | ||
4327 | void | |
104c1213 JM |
4328 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
4329 | gdbarch_skip_prologue_ftype skip_prologue) | |
0f71a2f6 JM |
4330 | { |
4331 | gdbarch->skip_prologue = skip_prologue; | |
4332 | } | |
4333 | ||
4334 | int | |
4335 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) | |
4336 | { | |
8de9bdc4 | 4337 | gdb_assert (gdbarch != NULL); |
956ac328 | 4338 | gdb_assert (gdbarch->inner_than != NULL); |
0f71a2f6 | 4339 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4340 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
4341 | return gdbarch->inner_than (lhs, rhs); | |
4342 | } | |
4343 | ||
4344 | void | |
104c1213 JM |
4345 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
4346 | gdbarch_inner_than_ftype inner_than) | |
0f71a2f6 JM |
4347 | { |
4348 | gdbarch->inner_than = inner_than; | |
4349 | } | |
4350 | ||
f4f9705a | 4351 | const unsigned char * |
adf40b2e | 4352 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
0f71a2f6 | 4353 | { |
8de9bdc4 | 4354 | gdb_assert (gdbarch != NULL); |
956ac328 | 4355 | gdb_assert (gdbarch->breakpoint_from_pc != NULL); |
0f71a2f6 | 4356 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4357 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
4358 | return gdbarch->breakpoint_from_pc (pcptr, lenptr); | |
4359 | } | |
4360 | ||
4361 | void | |
104c1213 JM |
4362 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
4363 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) | |
0f71a2f6 JM |
4364 | { |
4365 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; | |
4366 | } | |
4367 | ||
a1131521 KB |
4368 | int |
4369 | gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch) | |
4370 | { | |
4371 | gdb_assert (gdbarch != NULL); | |
4372 | return gdbarch->adjust_breakpoint_address != NULL; | |
4373 | } | |
4374 | ||
4375 | CORE_ADDR | |
4376 | gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr) | |
4377 | { | |
4378 | gdb_assert (gdbarch != NULL); | |
4379 | gdb_assert (gdbarch->adjust_breakpoint_address != NULL); | |
4380 | if (gdbarch_debug >= 2) | |
4381 | fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n"); | |
4382 | return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr); | |
4383 | } | |
4384 | ||
4385 | void | |
4386 | set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, | |
4387 | gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address) | |
4388 | { | |
4389 | gdbarch->adjust_breakpoint_address = adjust_breakpoint_address; | |
4390 | } | |
4391 | ||
917317f4 JM |
4392 | int |
4393 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
4394 | { | |
8de9bdc4 | 4395 | gdb_assert (gdbarch != NULL); |
956ac328 | 4396 | gdb_assert (gdbarch->memory_insert_breakpoint != NULL); |
917317f4 | 4397 | if (gdbarch_debug >= 2) |
917317f4 JM |
4398 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
4399 | return gdbarch->memory_insert_breakpoint (addr, contents_cache); | |
4400 | } | |
4401 | ||
4402 | void | |
4403 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, | |
4404 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) | |
4405 | { | |
4406 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; | |
4407 | } | |
4408 | ||
4409 | int | |
4410 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
4411 | { | |
8de9bdc4 | 4412 | gdb_assert (gdbarch != NULL); |
956ac328 | 4413 | gdb_assert (gdbarch->memory_remove_breakpoint != NULL); |
917317f4 | 4414 | if (gdbarch_debug >= 2) |
917317f4 JM |
4415 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
4416 | return gdbarch->memory_remove_breakpoint (addr, contents_cache); | |
4417 | } | |
4418 | ||
4419 | void | |
4420 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, | |
4421 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) | |
4422 | { | |
4423 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; | |
4424 | } | |
4425 | ||
0f71a2f6 | 4426 | CORE_ADDR |
104c1213 | 4427 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
0f71a2f6 | 4428 | { |
8de9bdc4 | 4429 | gdb_assert (gdbarch != NULL); |
71bd6bd4 | 4430 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
0f71a2f6 | 4431 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4432 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
4433 | return gdbarch->decr_pc_after_break; | |
4434 | } | |
4435 | ||
4436 | void | |
104c1213 JM |
4437 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
4438 | CORE_ADDR decr_pc_after_break) | |
0f71a2f6 JM |
4439 | { |
4440 | gdbarch->decr_pc_after_break = decr_pc_after_break; | |
4441 | } | |
4442 | ||
4443 | CORE_ADDR | |
104c1213 | 4444 | gdbarch_function_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 | 4445 | { |
8de9bdc4 | 4446 | gdb_assert (gdbarch != NULL); |
6503b91e | 4447 | /* Skip verify of function_start_offset, invalid_p == 0 */ |
0f71a2f6 | 4448 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4449 | fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n"); |
4450 | return gdbarch->function_start_offset; | |
4451 | } | |
4452 | ||
4453 | void | |
104c1213 JM |
4454 | set_gdbarch_function_start_offset (struct gdbarch *gdbarch, |
4455 | CORE_ADDR function_start_offset) | |
0f71a2f6 JM |
4456 | { |
4457 | gdbarch->function_start_offset = function_start_offset; | |
4458 | } | |
4459 | ||
4460 | void | |
f6684c31 | 4461 | gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len) |
0f71a2f6 | 4462 | { |
8de9bdc4 | 4463 | gdb_assert (gdbarch != NULL); |
956ac328 | 4464 | gdb_assert (gdbarch->remote_translate_xfer_address != NULL); |
0f71a2f6 | 4465 | if (gdbarch_debug >= 2) |
0f71a2f6 | 4466 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n"); |
f6684c31 | 4467 | gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len); |
0f71a2f6 JM |
4468 | } |
4469 | ||
4470 | void | |
104c1213 JM |
4471 | set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, |
4472 | gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address) | |
0f71a2f6 JM |
4473 | { |
4474 | gdbarch->remote_translate_xfer_address = remote_translate_xfer_address; | |
4475 | } | |
4476 | ||
4477 | CORE_ADDR | |
104c1213 | 4478 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
0f71a2f6 | 4479 | { |
8de9bdc4 | 4480 | gdb_assert (gdbarch != NULL); |
5867a2fb | 4481 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
0f71a2f6 | 4482 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4483 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
4484 | return gdbarch->frame_args_skip; | |
4485 | } | |
4486 | ||
4487 | void | |
104c1213 JM |
4488 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
4489 | CORE_ADDR frame_args_skip) | |
0f71a2f6 JM |
4490 | { |
4491 | gdbarch->frame_args_skip = frame_args_skip; | |
4492 | } | |
4493 | ||
4494 | int | |
19772a2c AC |
4495 | gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch) |
4496 | { | |
4497 | gdb_assert (gdbarch != NULL); | |
4498 | return gdbarch->deprecated_frameless_function_invocation != NULL; | |
4499 | } | |
4500 | ||
4501 | int | |
4502 | gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi) | |
0f71a2f6 | 4503 | { |
8de9bdc4 | 4504 | gdb_assert (gdbarch != NULL); |
19772a2c | 4505 | gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL); |
0f71a2f6 | 4506 | if (gdbarch_debug >= 2) |
19772a2c AC |
4507 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n"); |
4508 | return gdbarch->deprecated_frameless_function_invocation (fi); | |
0f71a2f6 JM |
4509 | } |
4510 | ||
4511 | void | |
19772a2c AC |
4512 | set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, |
4513 | gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation) | |
0f71a2f6 | 4514 | { |
19772a2c | 4515 | gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation; |
0f71a2f6 JM |
4516 | } |
4517 | ||
d62d1979 | 4518 | int |
618ce49f | 4519 | gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch) |
d62d1979 AC |
4520 | { |
4521 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4522 | return gdbarch->deprecated_frame_chain != NULL; |
d62d1979 AC |
4523 | } |
4524 | ||
0f71a2f6 | 4525 | CORE_ADDR |
618ce49f | 4526 | gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame) |
0f71a2f6 | 4527 | { |
8de9bdc4 | 4528 | gdb_assert (gdbarch != NULL); |
956ac328 | 4529 | gdb_assert (gdbarch->deprecated_frame_chain != NULL); |
0f71a2f6 | 4530 | if (gdbarch_debug >= 2) |
618ce49f AC |
4531 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n"); |
4532 | return gdbarch->deprecated_frame_chain (frame); | |
0f71a2f6 JM |
4533 | } |
4534 | ||
4535 | void | |
618ce49f AC |
4536 | set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, |
4537 | gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain) | |
0f71a2f6 | 4538 | { |
618ce49f | 4539 | gdbarch->deprecated_frame_chain = deprecated_frame_chain; |
0f71a2f6 JM |
4540 | } |
4541 | ||
51603483 | 4542 | int |
618ce49f | 4543 | gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch) |
51603483 DJ |
4544 | { |
4545 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4546 | return gdbarch->deprecated_frame_chain_valid != NULL; |
51603483 DJ |
4547 | } |
4548 | ||
0f71a2f6 | 4549 | int |
618ce49f | 4550 | gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe) |
0f71a2f6 | 4551 | { |
8de9bdc4 | 4552 | gdb_assert (gdbarch != NULL); |
956ac328 | 4553 | gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL); |
0f71a2f6 | 4554 | if (gdbarch_debug >= 2) |
618ce49f AC |
4555 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n"); |
4556 | return gdbarch->deprecated_frame_chain_valid (chain, thisframe); | |
0f71a2f6 JM |
4557 | } |
4558 | ||
4559 | void | |
618ce49f AC |
4560 | set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, |
4561 | gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid) | |
0f71a2f6 | 4562 | { |
618ce49f | 4563 | gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid; |
0f71a2f6 JM |
4564 | } |
4565 | ||
d62d1979 | 4566 | int |
8bedc050 | 4567 | gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch) |
d62d1979 AC |
4568 | { |
4569 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4570 | return gdbarch->deprecated_frame_saved_pc != NULL; |
d62d1979 AC |
4571 | } |
4572 | ||
0f71a2f6 | 4573 | CORE_ADDR |
8bedc050 | 4574 | gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi) |
0f71a2f6 | 4575 | { |
8de9bdc4 | 4576 | gdb_assert (gdbarch != NULL); |
956ac328 | 4577 | gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL); |
0f71a2f6 | 4578 | if (gdbarch_debug >= 2) |
8bedc050 AC |
4579 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n"); |
4580 | return gdbarch->deprecated_frame_saved_pc (fi); | |
0f71a2f6 JM |
4581 | } |
4582 | ||
4583 | void | |
8bedc050 AC |
4584 | set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, |
4585 | gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc) | |
0f71a2f6 | 4586 | { |
8bedc050 | 4587 | gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc; |
0f71a2f6 JM |
4588 | } |
4589 | ||
12cc2063 AC |
4590 | int |
4591 | gdbarch_unwind_pc_p (struct gdbarch *gdbarch) | |
4592 | { | |
4593 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4594 | return gdbarch->unwind_pc != NULL; |
12cc2063 AC |
4595 | } |
4596 | ||
4597 | CORE_ADDR | |
4598 | gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) | |
4599 | { | |
4600 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4601 | gdb_assert (gdbarch->unwind_pc != NULL); |
12cc2063 AC |
4602 | if (gdbarch_debug >= 2) |
4603 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n"); | |
4604 | return gdbarch->unwind_pc (gdbarch, next_frame); | |
4605 | } | |
4606 | ||
4607 | void | |
4608 | set_gdbarch_unwind_pc (struct gdbarch *gdbarch, | |
4609 | gdbarch_unwind_pc_ftype unwind_pc) | |
4610 | { | |
4611 | gdbarch->unwind_pc = unwind_pc; | |
4612 | } | |
4613 | ||
a9e5fdc2 AC |
4614 | int |
4615 | gdbarch_unwind_sp_p (struct gdbarch *gdbarch) | |
4616 | { | |
4617 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4618 | return gdbarch->unwind_sp != NULL; |
a9e5fdc2 AC |
4619 | } |
4620 | ||
4621 | CORE_ADDR | |
4622 | gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) | |
4623 | { | |
4624 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4625 | gdb_assert (gdbarch->unwind_sp != NULL); |
a9e5fdc2 AC |
4626 | if (gdbarch_debug >= 2) |
4627 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n"); | |
4628 | return gdbarch->unwind_sp (gdbarch, next_frame); | |
4629 | } | |
4630 | ||
4631 | void | |
4632 | set_gdbarch_unwind_sp (struct gdbarch *gdbarch, | |
4633 | gdbarch_unwind_sp_ftype unwind_sp) | |
4634 | { | |
4635 | gdbarch->unwind_sp = unwind_sp; | |
4636 | } | |
4637 | ||
42efa47a AC |
4638 | int |
4639 | gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch) | |
4640 | { | |
4641 | gdb_assert (gdbarch != NULL); | |
4642 | return gdbarch->deprecated_frame_args_address != get_frame_base; | |
4643 | } | |
4644 | ||
0f71a2f6 | 4645 | CORE_ADDR |
42efa47a | 4646 | gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi) |
0f71a2f6 | 4647 | { |
8de9bdc4 | 4648 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
4649 | gdb_assert (gdbarch->deprecated_frame_args_address != NULL); |
4650 | /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */ | |
0f71a2f6 | 4651 | if (gdbarch_debug >= 2) |
42efa47a AC |
4652 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n"); |
4653 | return gdbarch->deprecated_frame_args_address (fi); | |
0f71a2f6 JM |
4654 | } |
4655 | ||
4656 | void | |
42efa47a AC |
4657 | set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, |
4658 | gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address) | |
0f71a2f6 | 4659 | { |
42efa47a AC |
4660 | gdbarch->deprecated_frame_args_address = deprecated_frame_args_address; |
4661 | } | |
4662 | ||
4663 | int | |
4664 | gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch) | |
4665 | { | |
4666 | gdb_assert (gdbarch != NULL); | |
4667 | return gdbarch->deprecated_frame_locals_address != get_frame_base; | |
0f71a2f6 JM |
4668 | } |
4669 | ||
4670 | CORE_ADDR | |
42efa47a | 4671 | gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi) |
0f71a2f6 | 4672 | { |
8de9bdc4 | 4673 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
4674 | gdb_assert (gdbarch->deprecated_frame_locals_address != NULL); |
4675 | /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */ | |
0f71a2f6 | 4676 | if (gdbarch_debug >= 2) |
42efa47a AC |
4677 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n"); |
4678 | return gdbarch->deprecated_frame_locals_address (fi); | |
0f71a2f6 JM |
4679 | } |
4680 | ||
4681 | void | |
42efa47a AC |
4682 | set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, |
4683 | gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address) | |
0f71a2f6 | 4684 | { |
42efa47a | 4685 | gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address; |
0f71a2f6 JM |
4686 | } |
4687 | ||
4443bd83 | 4688 | int |
6913c89a | 4689 | gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch) |
4443bd83 AC |
4690 | { |
4691 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4692 | return gdbarch->deprecated_saved_pc_after_call != NULL; |
4443bd83 AC |
4693 | } |
4694 | ||
0f71a2f6 | 4695 | CORE_ADDR |
6913c89a | 4696 | gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame) |
0f71a2f6 | 4697 | { |
8de9bdc4 | 4698 | gdb_assert (gdbarch != NULL); |
956ac328 | 4699 | gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL); |
0f71a2f6 | 4700 | if (gdbarch_debug >= 2) |
6913c89a AC |
4701 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n"); |
4702 | return gdbarch->deprecated_saved_pc_after_call (frame); | |
0f71a2f6 JM |
4703 | } |
4704 | ||
4705 | void | |
6913c89a AC |
4706 | set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, |
4707 | gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call) | |
0f71a2f6 | 4708 | { |
6913c89a | 4709 | gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call; |
0f71a2f6 JM |
4710 | } |
4711 | ||
983a287a AC |
4712 | int |
4713 | gdbarch_frame_num_args_p (struct gdbarch *gdbarch) | |
4714 | { | |
4715 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4716 | return gdbarch->frame_num_args != NULL; |
983a287a AC |
4717 | } |
4718 | ||
0f71a2f6 JM |
4719 | int |
4720 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) | |
4721 | { | |
8de9bdc4 | 4722 | gdb_assert (gdbarch != NULL); |
956ac328 | 4723 | gdb_assert (gdbarch->frame_num_args != NULL); |
0f71a2f6 | 4724 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4725 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
4726 | return gdbarch->frame_num_args (frame); | |
4727 | } | |
4728 | ||
4729 | void | |
104c1213 JM |
4730 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
4731 | gdbarch_frame_num_args_ftype frame_num_args) | |
0f71a2f6 JM |
4732 | { |
4733 | gdbarch->frame_num_args = frame_num_args; | |
4734 | } | |
4735 | ||
2ada493a | 4736 | int |
f27dd7fd | 4737 | gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch) |
2ada493a | 4738 | { |
8de9bdc4 | 4739 | gdb_assert (gdbarch != NULL); |
f27dd7fd | 4740 | return gdbarch->deprecated_stack_align != NULL; |
2ada493a AC |
4741 | } |
4742 | ||
4743 | CORE_ADDR | |
f27dd7fd | 4744 | gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp) |
2ada493a | 4745 | { |
8de9bdc4 | 4746 | gdb_assert (gdbarch != NULL); |
f27dd7fd | 4747 | gdb_assert (gdbarch->deprecated_stack_align != NULL); |
2ada493a | 4748 | if (gdbarch_debug >= 2) |
f27dd7fd AC |
4749 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n"); |
4750 | return gdbarch->deprecated_stack_align (sp); | |
2ada493a AC |
4751 | } |
4752 | ||
4753 | void | |
f27dd7fd AC |
4754 | set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, |
4755 | gdbarch_deprecated_stack_align_ftype deprecated_stack_align) | |
2ada493a | 4756 | { |
f27dd7fd | 4757 | gdbarch->deprecated_stack_align = deprecated_stack_align; |
2ada493a AC |
4758 | } |
4759 | ||
dc604539 AC |
4760 | int |
4761 | gdbarch_frame_align_p (struct gdbarch *gdbarch) | |
4762 | { | |
4763 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4764 | return gdbarch->frame_align != NULL; |
dc604539 AC |
4765 | } |
4766 | ||
4767 | CORE_ADDR | |
4768 | gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) | |
4769 | { | |
4770 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4771 | gdb_assert (gdbarch->frame_align != NULL); |
dc604539 AC |
4772 | if (gdbarch_debug >= 2) |
4773 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n"); | |
4774 | return gdbarch->frame_align (gdbarch, address); | |
4775 | } | |
4776 | ||
4777 | void | |
4778 | set_gdbarch_frame_align (struct gdbarch *gdbarch, | |
4779 | gdbarch_frame_align_ftype frame_align) | |
4780 | { | |
4781 | gdbarch->frame_align = frame_align; | |
4782 | } | |
4783 | ||
d03e67c9 | 4784 | int |
88d89dbb | 4785 | gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch) |
d03e67c9 | 4786 | { |
8de9bdc4 | 4787 | gdb_assert (gdbarch != NULL); |
88d89dbb | 4788 | return gdbarch->deprecated_reg_struct_has_addr != NULL; |
d03e67c9 AC |
4789 | } |
4790 | ||
4791 | int | |
88d89dbb | 4792 | gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type) |
d03e67c9 | 4793 | { |
8de9bdc4 | 4794 | gdb_assert (gdbarch != NULL); |
88d89dbb | 4795 | gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL); |
d03e67c9 | 4796 | if (gdbarch_debug >= 2) |
88d89dbb MK |
4797 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n"); |
4798 | return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type); | |
d03e67c9 AC |
4799 | } |
4800 | ||
4801 | void | |
88d89dbb MK |
4802 | set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, |
4803 | gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr) | |
d03e67c9 | 4804 | { |
88d89dbb | 4805 | gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr; |
d03e67c9 AC |
4806 | } |
4807 | ||
192cb3d4 MK |
4808 | int |
4809 | gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) | |
4810 | { | |
4811 | gdb_assert (gdbarch != NULL); | |
4812 | gdb_assert (gdbarch->stabs_argument_has_addr != NULL); | |
4813 | if (gdbarch_debug >= 2) | |
4814 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n"); | |
4815 | return gdbarch->stabs_argument_has_addr (gdbarch, type); | |
4816 | } | |
4817 | ||
4818 | void | |
4819 | set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, | |
4820 | gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr) | |
4821 | { | |
4822 | gdbarch->stabs_argument_has_addr = stabs_argument_has_addr; | |
4823 | } | |
4824 | ||
8b148df9 AC |
4825 | int |
4826 | gdbarch_frame_red_zone_size (struct gdbarch *gdbarch) | |
4827 | { | |
4828 | gdb_assert (gdbarch != NULL); | |
4829 | if (gdbarch_debug >= 2) | |
4830 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n"); | |
4831 | return gdbarch->frame_red_zone_size; | |
4832 | } | |
4833 | ||
4834 | void | |
4835 | set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, | |
4836 | int frame_red_zone_size) | |
4837 | { | |
4838 | gdbarch->frame_red_zone_size = frame_red_zone_size; | |
4839 | } | |
4840 | ||
58d5518e ND |
4841 | int |
4842 | gdbarch_parm_boundary (struct gdbarch *gdbarch) | |
4843 | { | |
8de9bdc4 | 4844 | gdb_assert (gdbarch != NULL); |
58d5518e ND |
4845 | if (gdbarch_debug >= 2) |
4846 | fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n"); | |
4847 | return gdbarch->parm_boundary; | |
4848 | } | |
4849 | ||
4850 | void | |
4851 | set_gdbarch_parm_boundary (struct gdbarch *gdbarch, | |
4852 | int parm_boundary) | |
4853 | { | |
4854 | gdbarch->parm_boundary = parm_boundary; | |
4855 | } | |
4856 | ||
f0d4cc9e AC |
4857 | const struct floatformat * |
4858 | gdbarch_float_format (struct gdbarch *gdbarch) | |
4859 | { | |
8de9bdc4 | 4860 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4861 | if (gdbarch_debug >= 2) |
4862 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); | |
4863 | return gdbarch->float_format; | |
4864 | } | |
4865 | ||
4866 | void | |
4867 | set_gdbarch_float_format (struct gdbarch *gdbarch, | |
4868 | const struct floatformat * float_format) | |
4869 | { | |
4870 | gdbarch->float_format = float_format; | |
4871 | } | |
4872 | ||
4873 | const struct floatformat * | |
4874 | gdbarch_double_format (struct gdbarch *gdbarch) | |
4875 | { | |
8de9bdc4 | 4876 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4877 | if (gdbarch_debug >= 2) |
4878 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); | |
4879 | return gdbarch->double_format; | |
4880 | } | |
4881 | ||
4882 | void | |
4883 | set_gdbarch_double_format (struct gdbarch *gdbarch, | |
4884 | const struct floatformat * double_format) | |
4885 | { | |
4886 | gdbarch->double_format = double_format; | |
4887 | } | |
4888 | ||
4889 | const struct floatformat * | |
4890 | gdbarch_long_double_format (struct gdbarch *gdbarch) | |
4891 | { | |
8de9bdc4 | 4892 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4893 | if (gdbarch_debug >= 2) |
4894 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); | |
4895 | return gdbarch->long_double_format; | |
4896 | } | |
4897 | ||
4898 | void | |
4899 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, | |
4900 | const struct floatformat * long_double_format) | |
4901 | { | |
4902 | gdbarch->long_double_format = long_double_format; | |
4903 | } | |
4904 | ||
f517ea4e | 4905 | CORE_ADDR |
e2d0e7eb | 4906 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ) |
f517ea4e | 4907 | { |
8de9bdc4 | 4908 | gdb_assert (gdbarch != NULL); |
956ac328 | 4909 | gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL); |
f517ea4e PS |
4910 | if (gdbarch_debug >= 2) |
4911 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); | |
e2d0e7eb | 4912 | return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ); |
f517ea4e PS |
4913 | } |
4914 | ||
4915 | void | |
4916 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, | |
4917 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) | |
4918 | { | |
4919 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; | |
4920 | } | |
4921 | ||
875e1767 AC |
4922 | CORE_ADDR |
4923 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4924 | { | |
8de9bdc4 | 4925 | gdb_assert (gdbarch != NULL); |
956ac328 | 4926 | gdb_assert (gdbarch->addr_bits_remove != NULL); |
875e1767 AC |
4927 | if (gdbarch_debug >= 2) |
4928 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); | |
4929 | return gdbarch->addr_bits_remove (addr); | |
4930 | } | |
4931 | ||
4932 | void | |
4933 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, | |
4934 | gdbarch_addr_bits_remove_ftype addr_bits_remove) | |
4935 | { | |
4936 | gdbarch->addr_bits_remove = addr_bits_remove; | |
4937 | } | |
4938 | ||
181c1381 RE |
4939 | CORE_ADDR |
4940 | gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4941 | { | |
8de9bdc4 | 4942 | gdb_assert (gdbarch != NULL); |
956ac328 | 4943 | gdb_assert (gdbarch->smash_text_address != NULL); |
181c1381 RE |
4944 | if (gdbarch_debug >= 2) |
4945 | fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n"); | |
4946 | return gdbarch->smash_text_address (addr); | |
4947 | } | |
4948 | ||
4949 | void | |
4950 | set_gdbarch_smash_text_address (struct gdbarch *gdbarch, | |
4951 | gdbarch_smash_text_address_ftype smash_text_address) | |
4952 | { | |
4953 | gdbarch->smash_text_address = smash_text_address; | |
4954 | } | |
4955 | ||
64c4637f AC |
4956 | int |
4957 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) | |
4958 | { | |
8de9bdc4 | 4959 | gdb_assert (gdbarch != NULL); |
956ac328 | 4960 | return gdbarch->software_single_step != NULL; |
64c4637f AC |
4961 | } |
4962 | ||
4963 | void | |
4964 | gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) | |
4965 | { | |
8de9bdc4 | 4966 | gdb_assert (gdbarch != NULL); |
956ac328 | 4967 | gdb_assert (gdbarch->software_single_step != NULL); |
64c4637f AC |
4968 | if (gdbarch_debug >= 2) |
4969 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); | |
4970 | gdbarch->software_single_step (sig, insert_breakpoints_p); | |
4971 | } | |
4972 | ||
4973 | void | |
4974 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, | |
4975 | gdbarch_software_single_step_ftype software_single_step) | |
4976 | { | |
4977 | gdbarch->software_single_step = software_single_step; | |
4978 | } | |
4979 | ||
2bf0cb65 | 4980 | int |
a89aa300 | 4981 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info) |
2bf0cb65 | 4982 | { |
8de9bdc4 | 4983 | gdb_assert (gdbarch != NULL); |
956ac328 | 4984 | gdb_assert (gdbarch->print_insn != NULL); |
2bf0cb65 EZ |
4985 | if (gdbarch_debug >= 2) |
4986 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); | |
4987 | return gdbarch->print_insn (vma, info); | |
4988 | } | |
4989 | ||
4990 | void | |
4991 | set_gdbarch_print_insn (struct gdbarch *gdbarch, | |
4992 | gdbarch_print_insn_ftype print_insn) | |
4993 | { | |
4994 | gdbarch->print_insn = print_insn; | |
4995 | } | |
4996 | ||
bdcd319a CV |
4997 | CORE_ADDR |
4998 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc) | |
4999 | { | |
8de9bdc4 | 5000 | gdb_assert (gdbarch != NULL); |
956ac328 | 5001 | gdb_assert (gdbarch->skip_trampoline_code != NULL); |
bdcd319a CV |
5002 | if (gdbarch_debug >= 2) |
5003 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); | |
5004 | return gdbarch->skip_trampoline_code (pc); | |
5005 | } | |
5006 | ||
5007 | void | |
5008 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, | |
5009 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) | |
5010 | { | |
5011 | gdbarch->skip_trampoline_code = skip_trampoline_code; | |
5012 | } | |
5013 | ||
dea0c52f MK |
5014 | CORE_ADDR |
5015 | gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc) | |
5016 | { | |
5017 | gdb_assert (gdbarch != NULL); | |
5018 | gdb_assert (gdbarch->skip_solib_resolver != NULL); | |
5019 | if (gdbarch_debug >= 2) | |
5020 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n"); | |
4c8c40e6 | 5021 | return gdbarch->skip_solib_resolver (gdbarch, pc); |
dea0c52f MK |
5022 | } |
5023 | ||
5024 | void | |
5025 | set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, | |
5026 | gdbarch_skip_solib_resolver_ftype skip_solib_resolver) | |
5027 | { | |
5028 | gdbarch->skip_solib_resolver = skip_solib_resolver; | |
5029 | } | |
5030 | ||
68e9cc94 CV |
5031 | int |
5032 | gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
5033 | { | |
8de9bdc4 | 5034 | gdb_assert (gdbarch != NULL); |
956ac328 | 5035 | gdb_assert (gdbarch->in_solib_call_trampoline != NULL); |
68e9cc94 CV |
5036 | if (gdbarch_debug >= 2) |
5037 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n"); | |
5038 | return gdbarch->in_solib_call_trampoline (pc, name); | |
5039 | } | |
5040 | ||
5041 | void | |
5042 | set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, | |
5043 | gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline) | |
5044 | { | |
5045 | gdbarch->in_solib_call_trampoline = in_solib_call_trampoline; | |
5046 | } | |
5047 | ||
d50355b6 MS |
5048 | int |
5049 | gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
5050 | { | |
5051 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5052 | gdb_assert (gdbarch->in_solib_return_trampoline != NULL); |
d50355b6 MS |
5053 | if (gdbarch_debug >= 2) |
5054 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); | |
5055 | return gdbarch->in_solib_return_trampoline (pc, name); | |
5056 | } | |
5057 | ||
5058 | void | |
5059 | set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, | |
5060 | gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline) | |
5061 | { | |
5062 | gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; | |
5063 | } | |
5064 | ||
d7bd68ca | 5065 | int |
f561f026 AC |
5066 | gdbarch_deprecated_pc_in_sigtramp_p (struct gdbarch *gdbarch) |
5067 | { | |
5068 | gdb_assert (gdbarch != NULL); | |
5069 | return gdbarch->deprecated_pc_in_sigtramp != legacy_pc_in_sigtramp; | |
5070 | } | |
5071 | ||
5072 | int | |
5073 | gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
d7bd68ca | 5074 | { |
8de9bdc4 | 5075 | gdb_assert (gdbarch != NULL); |
f561f026 AC |
5076 | gdb_assert (gdbarch->deprecated_pc_in_sigtramp != NULL); |
5077 | /* Do not check predicate: gdbarch->deprecated_pc_in_sigtramp != legacy_pc_in_sigtramp, allow call. */ | |
d7bd68ca | 5078 | if (gdbarch_debug >= 2) |
f561f026 AC |
5079 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_sigtramp called\n"); |
5080 | return gdbarch->deprecated_pc_in_sigtramp (pc, name); | |
d7bd68ca AC |
5081 | } |
5082 | ||
5083 | void | |
f561f026 AC |
5084 | set_gdbarch_deprecated_pc_in_sigtramp (struct gdbarch *gdbarch, |
5085 | gdbarch_deprecated_pc_in_sigtramp_ftype deprecated_pc_in_sigtramp) | |
d7bd68ca | 5086 | { |
f561f026 | 5087 | gdbarch->deprecated_pc_in_sigtramp = deprecated_pc_in_sigtramp; |
d7bd68ca AC |
5088 | } |
5089 | ||
43156d82 | 5090 | int |
aa2a3f87 | 5091 | gdbarch_deprecated_sigtramp_start_p (struct gdbarch *gdbarch) |
43156d82 MK |
5092 | { |
5093 | gdb_assert (gdbarch != NULL); | |
aa2a3f87 | 5094 | return gdbarch->deprecated_sigtramp_start != NULL; |
43156d82 MK |
5095 | } |
5096 | ||
5097 | CORE_ADDR | |
aa2a3f87 | 5098 | gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc) |
43156d82 MK |
5099 | { |
5100 | gdb_assert (gdbarch != NULL); | |
aa2a3f87 | 5101 | gdb_assert (gdbarch->deprecated_sigtramp_start != NULL); |
43156d82 | 5102 | if (gdbarch_debug >= 2) |
aa2a3f87 AC |
5103 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_start called\n"); |
5104 | return gdbarch->deprecated_sigtramp_start (pc); | |
43156d82 MK |
5105 | } |
5106 | ||
5107 | void | |
aa2a3f87 AC |
5108 | set_gdbarch_deprecated_sigtramp_start (struct gdbarch *gdbarch, |
5109 | gdbarch_deprecated_sigtramp_start_ftype deprecated_sigtramp_start) | |
43156d82 | 5110 | { |
aa2a3f87 | 5111 | gdbarch->deprecated_sigtramp_start = deprecated_sigtramp_start; |
43156d82 MK |
5112 | } |
5113 | ||
e76cff22 | 5114 | int |
aa2a3f87 | 5115 | gdbarch_deprecated_sigtramp_end_p (struct gdbarch *gdbarch) |
e76cff22 AC |
5116 | { |
5117 | gdb_assert (gdbarch != NULL); | |
aa2a3f87 | 5118 | return gdbarch->deprecated_sigtramp_end != NULL; |
e76cff22 AC |
5119 | } |
5120 | ||
43156d82 | 5121 | CORE_ADDR |
aa2a3f87 | 5122 | gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc) |
43156d82 MK |
5123 | { |
5124 | gdb_assert (gdbarch != NULL); | |
aa2a3f87 | 5125 | gdb_assert (gdbarch->deprecated_sigtramp_end != NULL); |
43156d82 | 5126 | if (gdbarch_debug >= 2) |
aa2a3f87 AC |
5127 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sigtramp_end called\n"); |
5128 | return gdbarch->deprecated_sigtramp_end (pc); | |
43156d82 MK |
5129 | } |
5130 | ||
5131 | void | |
aa2a3f87 AC |
5132 | set_gdbarch_deprecated_sigtramp_end (struct gdbarch *gdbarch, |
5133 | gdbarch_deprecated_sigtramp_end_ftype deprecated_sigtramp_end) | |
43156d82 | 5134 | { |
aa2a3f87 | 5135 | gdbarch->deprecated_sigtramp_end = deprecated_sigtramp_end; |
43156d82 MK |
5136 | } |
5137 | ||
c12260ac CV |
5138 | int |
5139 | gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) | |
5140 | { | |
8de9bdc4 | 5141 | gdb_assert (gdbarch != NULL); |
956ac328 | 5142 | gdb_assert (gdbarch->in_function_epilogue_p != NULL); |
c12260ac CV |
5143 | if (gdbarch_debug >= 2) |
5144 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); | |
5145 | return gdbarch->in_function_epilogue_p (gdbarch, addr); | |
5146 | } | |
5147 | ||
5148 | void | |
5149 | set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, | |
5150 | gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) | |
5151 | { | |
5152 | gdbarch->in_function_epilogue_p = in_function_epilogue_p; | |
5153 | } | |
5154 | ||
552c04a7 TT |
5155 | char * |
5156 | gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv) | |
5157 | { | |
8de9bdc4 | 5158 | gdb_assert (gdbarch != NULL); |
956ac328 | 5159 | gdb_assert (gdbarch->construct_inferior_arguments != NULL); |
552c04a7 TT |
5160 | if (gdbarch_debug >= 2) |
5161 | fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n"); | |
5162 | return gdbarch->construct_inferior_arguments (gdbarch, argc, argv); | |
5163 | } | |
5164 | ||
5165 | void | |
5166 | set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, | |
5167 | gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments) | |
5168 | { | |
5169 | gdbarch->construct_inferior_arguments = construct_inferior_arguments; | |
5170 | } | |
5171 | ||
a2cf933a EZ |
5172 | void |
5173 | gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym) | |
5174 | { | |
8de9bdc4 | 5175 | gdb_assert (gdbarch != NULL); |
956ac328 | 5176 | gdb_assert (gdbarch->elf_make_msymbol_special != NULL); |
a2cf933a EZ |
5177 | if (gdbarch_debug >= 2) |
5178 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); | |
5179 | gdbarch->elf_make_msymbol_special (sym, msym); | |
5180 | } | |
5181 | ||
5182 | void | |
5183 | set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, | |
5184 | gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special) | |
5185 | { | |
5186 | gdbarch->elf_make_msymbol_special = elf_make_msymbol_special; | |
5187 | } | |
5188 | ||
5189 | void | |
5190 | gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym) | |
5191 | { | |
8de9bdc4 | 5192 | gdb_assert (gdbarch != NULL); |
956ac328 | 5193 | gdb_assert (gdbarch->coff_make_msymbol_special != NULL); |
a2cf933a EZ |
5194 | if (gdbarch_debug >= 2) |
5195 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); | |
5196 | gdbarch->coff_make_msymbol_special (val, msym); | |
5197 | } | |
5198 | ||
5199 | void | |
5200 | set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, | |
5201 | gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special) | |
5202 | { | |
5203 | gdbarch->coff_make_msymbol_special = coff_make_msymbol_special; | |
5204 | } | |
5205 | ||
5720643c JB |
5206 | const char * |
5207 | gdbarch_name_of_malloc (struct gdbarch *gdbarch) | |
5208 | { | |
5209 | gdb_assert (gdbarch != NULL); | |
5210 | /* Skip verify of name_of_malloc, invalid_p == 0 */ | |
5211 | if (gdbarch_debug >= 2) | |
5212 | fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n"); | |
5213 | return gdbarch->name_of_malloc; | |
5214 | } | |
5215 | ||
5216 | void | |
5217 | set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, | |
5218 | const char * name_of_malloc) | |
5219 | { | |
5220 | gdbarch->name_of_malloc = name_of_malloc; | |
5221 | } | |
5222 | ||
c4ed33b9 AC |
5223 | int |
5224 | gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) | |
5225 | { | |
5226 | gdb_assert (gdbarch != NULL); | |
5227 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ | |
5228 | if (gdbarch_debug >= 2) | |
5229 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); | |
5230 | return gdbarch->cannot_step_breakpoint; | |
5231 | } | |
5232 | ||
5233 | void | |
5234 | set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, | |
5235 | int cannot_step_breakpoint) | |
5236 | { | |
5237 | gdbarch->cannot_step_breakpoint = cannot_step_breakpoint; | |
5238 | } | |
5239 | ||
f74fa174 MM |
5240 | int |
5241 | gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) | |
5242 | { | |
5243 | gdb_assert (gdbarch != NULL); | |
5244 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ | |
5245 | if (gdbarch_debug >= 2) | |
5246 | fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); | |
5247 | return gdbarch->have_nonsteppable_watchpoint; | |
5248 | } | |
5249 | ||
5250 | void | |
5251 | set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, | |
967c0d83 | 5252 | int have_nonsteppable_watchpoint) |
f74fa174 MM |
5253 | { |
5254 | gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint; | |
5255 | } | |
5256 | ||
8b2dbe47 KB |
5257 | int |
5258 | gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch) | |
5259 | { | |
5260 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5261 | return gdbarch->address_class_type_flags != NULL; |
8b2dbe47 KB |
5262 | } |
5263 | ||
5264 | int | |
5265 | gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class) | |
5266 | { | |
5267 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5268 | gdb_assert (gdbarch->address_class_type_flags != NULL); |
8b2dbe47 KB |
5269 | if (gdbarch_debug >= 2) |
5270 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); | |
5271 | return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class); | |
5272 | } | |
5273 | ||
5274 | void | |
5275 | set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, | |
5276 | gdbarch_address_class_type_flags_ftype address_class_type_flags) | |
5277 | { | |
5278 | gdbarch->address_class_type_flags = address_class_type_flags; | |
5279 | } | |
5280 | ||
5281 | int | |
5282 | gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch) | |
5283 | { | |
5284 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5285 | return gdbarch->address_class_type_flags_to_name != NULL; |
8b2dbe47 KB |
5286 | } |
5287 | ||
321432c0 | 5288 | const char * |
8b2dbe47 KB |
5289 | gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags) |
5290 | { | |
5291 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5292 | gdb_assert (gdbarch->address_class_type_flags_to_name != NULL); |
8b2dbe47 KB |
5293 | if (gdbarch_debug >= 2) |
5294 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); | |
5f11f355 | 5295 | return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags); |
8b2dbe47 KB |
5296 | } |
5297 | ||
5298 | void | |
5299 | set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, | |
5300 | gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name) | |
5301 | { | |
5302 | gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name; | |
5303 | } | |
5304 | ||
5305 | int | |
5306 | gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch) | |
5307 | { | |
5308 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5309 | return gdbarch->address_class_name_to_type_flags != NULL; |
8b2dbe47 KB |
5310 | } |
5311 | ||
5312 | int | |
321432c0 | 5313 | gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr) |
8b2dbe47 KB |
5314 | { |
5315 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5316 | gdb_assert (gdbarch->address_class_name_to_type_flags != NULL); |
8b2dbe47 KB |
5317 | if (gdbarch_debug >= 2) |
5318 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); | |
5f11f355 | 5319 | return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr); |
8b2dbe47 KB |
5320 | } |
5321 | ||
5322 | void | |
5323 | set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, | |
5324 | gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags) | |
5325 | { | |
5326 | gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags; | |
5327 | } | |
5328 | ||
b59ff9d5 AC |
5329 | int |
5330 | gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup) | |
5331 | { | |
5332 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5333 | gdb_assert (gdbarch->register_reggroup_p != NULL); |
b59ff9d5 AC |
5334 | if (gdbarch_debug >= 2) |
5335 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); | |
5336 | return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup); | |
5337 | } | |
5338 | ||
5339 | void | |
5340 | set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, | |
5341 | gdbarch_register_reggroup_p_ftype register_reggroup_p) | |
5342 | { | |
5343 | gdbarch->register_reggroup_p = register_reggroup_p; | |
5344 | } | |
5345 | ||
143985b7 AF |
5346 | int |
5347 | gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch) | |
5348 | { | |
5349 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5350 | return gdbarch->fetch_pointer_argument != NULL; |
143985b7 AF |
5351 | } |
5352 | ||
5353 | CORE_ADDR | |
5354 | gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type) | |
5355 | { | |
5356 | gdb_assert (gdbarch != NULL); | |
956ac328 | 5357 | gdb_assert (gdbarch->fetch_pointer_argument != NULL); |
143985b7 AF |
5358 | if (gdbarch_debug >= 2) |
5359 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n"); | |
5360 | return gdbarch->fetch_pointer_argument (frame, argi, type); | |
5361 | } | |
5362 | ||
5363 | void | |
5364 | set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, | |
5365 | gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument) | |
5366 | { | |
5367 | gdbarch->fetch_pointer_argument = fetch_pointer_argument; | |
5368 | } | |
5369 | ||
6ce6d90f MK |
5370 | int |
5371 | gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch) | |
5372 | { | |
5373 | gdb_assert (gdbarch != NULL); | |
5374 | return gdbarch->regset_from_core_section != NULL; | |
5375 | } | |
5376 | ||
5377 | const struct regset * | |
5378 | gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) | |
5379 | { | |
5380 | gdb_assert (gdbarch != NULL); | |
5381 | gdb_assert (gdbarch->regset_from_core_section != NULL); | |
5382 | if (gdbarch_debug >= 2) | |
5383 | fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n"); | |
5384 | return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size); | |
5385 | } | |
5386 | ||
5387 | void | |
5388 | set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, | |
5389 | gdbarch_regset_from_core_section_ftype regset_from_core_section) | |
5390 | { | |
5391 | gdbarch->regset_from_core_section = regset_from_core_section; | |
5392 | } | |
5393 | ||
0f71a2f6 | 5394 | |
be5a57e1 | 5395 | /* Keep a registry of per-architecture data-pointers required by GDB |
0f71a2f6 JM |
5396 | modules. */ |
5397 | ||
5398 | struct gdbarch_data | |
5399 | { | |
95160752 | 5400 | unsigned index; |
76860b5f | 5401 | int init_p; |
030f20e1 AC |
5402 | gdbarch_data_pre_init_ftype *pre_init; |
5403 | gdbarch_data_post_init_ftype *post_init; | |
0f71a2f6 JM |
5404 | }; |
5405 | ||
5406 | struct gdbarch_data_registration | |
adf40b2e | 5407 | { |
adf40b2e JM |
5408 | struct gdbarch_data *data; |
5409 | struct gdbarch_data_registration *next; | |
5410 | }; | |
0f71a2f6 | 5411 | |
be5a57e1 | 5412 | struct gdbarch_data_registry |
adf40b2e | 5413 | { |
95160752 | 5414 | unsigned nr; |
adf40b2e JM |
5415 | struct gdbarch_data_registration *registrations; |
5416 | }; | |
0f71a2f6 | 5417 | |
be5a57e1 | 5418 | struct gdbarch_data_registry gdbarch_data_registry = |
0f71a2f6 JM |
5419 | { |
5420 | 0, NULL, | |
5421 | }; | |
5422 | ||
030f20e1 AC |
5423 | static struct gdbarch_data * |
5424 | gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init, | |
5425 | gdbarch_data_post_init_ftype *post_init) | |
0f71a2f6 JM |
5426 | { |
5427 | struct gdbarch_data_registration **curr; | |
76860b5f | 5428 | /* Append the new registraration. */ |
be5a57e1 | 5429 | for (curr = &gdbarch_data_registry.registrations; |
0f71a2f6 JM |
5430 | (*curr) != NULL; |
5431 | curr = &(*curr)->next); | |
5432 | (*curr) = XMALLOC (struct gdbarch_data_registration); | |
5433 | (*curr)->next = NULL; | |
0f71a2f6 | 5434 | (*curr)->data = XMALLOC (struct gdbarch_data); |
be5a57e1 | 5435 | (*curr)->data->index = gdbarch_data_registry.nr++; |
030f20e1 AC |
5436 | (*curr)->data->pre_init = pre_init; |
5437 | (*curr)->data->post_init = post_init; | |
76860b5f | 5438 | (*curr)->data->init_p = 1; |
0f71a2f6 JM |
5439 | return (*curr)->data; |
5440 | } | |
5441 | ||
030f20e1 AC |
5442 | struct gdbarch_data * |
5443 | gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init) | |
5444 | { | |
5445 | return gdbarch_data_register (pre_init, NULL); | |
5446 | } | |
5447 | ||
5448 | struct gdbarch_data * | |
5449 | gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init) | |
5450 | { | |
5451 | return gdbarch_data_register (NULL, post_init); | |
5452 | } | |
0f71a2f6 | 5453 | |
b3cc3077 | 5454 | /* Create/delete the gdbarch data vector. */ |
95160752 AC |
5455 | |
5456 | static void | |
b3cc3077 | 5457 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
95160752 | 5458 | { |
b3cc3077 JB |
5459 | gdb_assert (gdbarch->data == NULL); |
5460 | gdbarch->nr_data = gdbarch_data_registry.nr; | |
aebd7893 | 5461 | gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *); |
0f71a2f6 JM |
5462 | } |
5463 | ||
76860b5f | 5464 | /* Initialize the current value of the specified per-architecture |
b3cc3077 JB |
5465 | data-pointer. */ |
5466 | ||
95160752 | 5467 | void |
030f20e1 AC |
5468 | deprecated_set_gdbarch_data (struct gdbarch *gdbarch, |
5469 | struct gdbarch_data *data, | |
5470 | void *pointer) | |
95160752 AC |
5471 | { |
5472 | gdb_assert (data->index < gdbarch->nr_data); | |
aebd7893 | 5473 | gdb_assert (gdbarch->data[data->index] == NULL); |
030f20e1 | 5474 | gdb_assert (data->pre_init == NULL); |
95160752 AC |
5475 | gdbarch->data[data->index] = pointer; |
5476 | } | |
5477 | ||
0f71a2f6 JM |
5478 | /* Return the current value of the specified per-architecture |
5479 | data-pointer. */ | |
5480 | ||
5481 | void * | |
451fbdda | 5482 | gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data) |
0f71a2f6 | 5483 | { |
451fbdda | 5484 | gdb_assert (data->index < gdbarch->nr_data); |
030f20e1 | 5485 | if (gdbarch->data[data->index] == NULL) |
76860b5f | 5486 | { |
030f20e1 AC |
5487 | /* The data-pointer isn't initialized, call init() to get a |
5488 | value. */ | |
5489 | if (data->pre_init != NULL) | |
5490 | /* Mid architecture creation: pass just the obstack, and not | |
5491 | the entire architecture, as that way it isn't possible for | |
5492 | pre-init code to refer to undefined architecture | |
5493 | fields. */ | |
5494 | gdbarch->data[data->index] = data->pre_init (gdbarch->obstack); | |
5495 | else if (gdbarch->initialized_p | |
5496 | && data->post_init != NULL) | |
5497 | /* Post architecture creation: pass the entire architecture | |
5498 | (as all fields are valid), but be careful to also detect | |
5499 | recursive references. */ | |
5500 | { | |
5501 | gdb_assert (data->init_p); | |
5502 | data->init_p = 0; | |
5503 | gdbarch->data[data->index] = data->post_init (gdbarch); | |
5504 | data->init_p = 1; | |
5505 | } | |
5506 | else | |
5507 | /* The architecture initialization hasn't completed - punt - | |
5508 | hope that the caller knows what they are doing. Once | |
5509 | deprecated_set_gdbarch_data has been initialized, this can be | |
5510 | changed to an internal error. */ | |
5511 | return NULL; | |
76860b5f AC |
5512 | gdb_assert (gdbarch->data[data->index] != NULL); |
5513 | } | |
451fbdda | 5514 | return gdbarch->data[data->index]; |
0f71a2f6 JM |
5515 | } |
5516 | ||
5517 | ||
5518 | ||
be5a57e1 | 5519 | /* Keep a registry of swapped data required by GDB modules. */ |
0f71a2f6 JM |
5520 | |
5521 | struct gdbarch_swap | |
5522 | { | |
5523 | void *swap; | |
5524 | struct gdbarch_swap_registration *source; | |
5525 | struct gdbarch_swap *next; | |
5526 | }; | |
5527 | ||
5528 | struct gdbarch_swap_registration | |
adf40b2e JM |
5529 | { |
5530 | void *data; | |
5531 | unsigned long sizeof_data; | |
5532 | gdbarch_swap_ftype *init; | |
5533 | struct gdbarch_swap_registration *next; | |
5534 | }; | |
0f71a2f6 | 5535 | |
be5a57e1 | 5536 | struct gdbarch_swap_registry |
adf40b2e JM |
5537 | { |
5538 | int nr; | |
5539 | struct gdbarch_swap_registration *registrations; | |
5540 | }; | |
0f71a2f6 | 5541 | |
be5a57e1 | 5542 | struct gdbarch_swap_registry gdbarch_swap_registry = |
0f71a2f6 JM |
5543 | { |
5544 | 0, NULL, | |
5545 | }; | |
5546 | ||
5547 | void | |
046a4708 AC |
5548 | deprecated_register_gdbarch_swap (void *data, |
5549 | unsigned long sizeof_data, | |
5550 | gdbarch_swap_ftype *init) | |
0f71a2f6 JM |
5551 | { |
5552 | struct gdbarch_swap_registration **rego; | |
be5a57e1 | 5553 | for (rego = &gdbarch_swap_registry.registrations; |
0f71a2f6 JM |
5554 | (*rego) != NULL; |
5555 | rego = &(*rego)->next); | |
5556 | (*rego) = XMALLOC (struct gdbarch_swap_registration); | |
5557 | (*rego)->next = NULL; | |
5558 | (*rego)->init = init; | |
5559 | (*rego)->data = data; | |
5560 | (*rego)->sizeof_data = sizeof_data; | |
5561 | } | |
5562 | ||
40af4b0c | 5563 | static void |
7de2341d | 5564 | current_gdbarch_swap_init_hack (void) |
0f71a2f6 JM |
5565 | { |
5566 | struct gdbarch_swap_registration *rego; | |
7de2341d | 5567 | struct gdbarch_swap **curr = ¤t_gdbarch->swap; |
be5a57e1 | 5568 | for (rego = gdbarch_swap_registry.registrations; |
0f71a2f6 JM |
5569 | rego != NULL; |
5570 | rego = rego->next) | |
5571 | { | |
5572 | if (rego->data != NULL) | |
5573 | { | |
7de2341d AC |
5574 | (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch, |
5575 | struct gdbarch_swap); | |
0f71a2f6 | 5576 | (*curr)->source = rego; |
7de2341d AC |
5577 | (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch, |
5578 | rego->sizeof_data); | |
0f71a2f6 | 5579 | (*curr)->next = NULL; |
0f71a2f6 JM |
5580 | curr = &(*curr)->next; |
5581 | } | |
5582 | if (rego->init != NULL) | |
5583 | rego->init (); | |
5584 | } | |
5585 | } | |
5586 | ||
7de2341d AC |
5587 | static struct gdbarch * |
5588 | current_gdbarch_swap_out_hack (void) | |
0f71a2f6 | 5589 | { |
7de2341d | 5590 | struct gdbarch *old_gdbarch = current_gdbarch; |
0f71a2f6 | 5591 | struct gdbarch_swap *curr; |
7de2341d AC |
5592 | |
5593 | gdb_assert (old_gdbarch != NULL); | |
5594 | for (curr = old_gdbarch->swap; | |
0f71a2f6 JM |
5595 | curr != NULL; |
5596 | curr = curr->next) | |
7de2341d AC |
5597 | { |
5598 | memcpy (curr->swap, curr->source->data, curr->source->sizeof_data); | |
5599 | memset (curr->source->data, 0, curr->source->sizeof_data); | |
5600 | } | |
5601 | current_gdbarch = NULL; | |
5602 | return old_gdbarch; | |
0f71a2f6 JM |
5603 | } |
5604 | ||
0f71a2f6 | 5605 | static void |
7de2341d | 5606 | current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch) |
0f71a2f6 JM |
5607 | { |
5608 | struct gdbarch_swap *curr; | |
7de2341d AC |
5609 | |
5610 | gdb_assert (current_gdbarch == NULL); | |
5611 | for (curr = new_gdbarch->swap; | |
0f71a2f6 JM |
5612 | curr != NULL; |
5613 | curr = curr->next) | |
5614 | memcpy (curr->source->data, curr->swap, curr->source->sizeof_data); | |
7de2341d | 5615 | current_gdbarch = new_gdbarch; |
0f71a2f6 JM |
5616 | } |
5617 | ||
5618 | ||
be5a57e1 | 5619 | /* Keep a registry of the architectures known by GDB. */ |
0f71a2f6 | 5620 | |
4b9b3959 | 5621 | struct gdbarch_registration |
0f71a2f6 JM |
5622 | { |
5623 | enum bfd_architecture bfd_architecture; | |
5624 | gdbarch_init_ftype *init; | |
4b9b3959 | 5625 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 5626 | struct gdbarch_list *arches; |
4b9b3959 | 5627 | struct gdbarch_registration *next; |
0f71a2f6 JM |
5628 | }; |
5629 | ||
be5a57e1 | 5630 | static struct gdbarch_registration *gdbarch_registry = NULL; |
0f71a2f6 | 5631 | |
b4a20239 AC |
5632 | static void |
5633 | append_name (const char ***buf, int *nr, const char *name) | |
5634 | { | |
5635 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); | |
5636 | (*buf)[*nr] = name; | |
5637 | *nr += 1; | |
5638 | } | |
5639 | ||
5640 | const char ** | |
5641 | gdbarch_printable_names (void) | |
5642 | { | |
7996bcec AC |
5643 | /* Accumulate a list of names based on the registed list of |
5644 | architectures. */ | |
5645 | enum bfd_architecture a; | |
5646 | int nr_arches = 0; | |
5647 | const char **arches = NULL; | |
5648 | struct gdbarch_registration *rego; | |
5649 | for (rego = gdbarch_registry; | |
5650 | rego != NULL; | |
5651 | rego = rego->next) | |
b4a20239 | 5652 | { |
7996bcec AC |
5653 | const struct bfd_arch_info *ap; |
5654 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); | |
5655 | if (ap == NULL) | |
5656 | internal_error (__FILE__, __LINE__, | |
5657 | "gdbarch_architecture_names: multi-arch unknown"); | |
5658 | do | |
5659 | { | |
5660 | append_name (&arches, &nr_arches, ap->printable_name); | |
5661 | ap = ap->next; | |
5662 | } | |
5663 | while (ap != NULL); | |
b4a20239 | 5664 | } |
7996bcec AC |
5665 | append_name (&arches, &nr_arches, NULL); |
5666 | return arches; | |
b4a20239 AC |
5667 | } |
5668 | ||
5669 | ||
0f71a2f6 | 5670 | void |
4b9b3959 AC |
5671 | gdbarch_register (enum bfd_architecture bfd_architecture, |
5672 | gdbarch_init_ftype *init, | |
5673 | gdbarch_dump_tdep_ftype *dump_tdep) | |
0f71a2f6 | 5674 | { |
4b9b3959 | 5675 | struct gdbarch_registration **curr; |
0f71a2f6 | 5676 | const struct bfd_arch_info *bfd_arch_info; |
ec3d358c | 5677 | /* Check that BFD recognizes this architecture */ |
0f71a2f6 JM |
5678 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
5679 | if (bfd_arch_info == NULL) | |
5680 | { | |
8e65ff28 AC |
5681 | internal_error (__FILE__, __LINE__, |
5682 | "gdbarch: Attempt to register unknown architecture (%d)", | |
5683 | bfd_architecture); | |
0f71a2f6 JM |
5684 | } |
5685 | /* Check that we haven't seen this architecture before */ | |
be5a57e1 | 5686 | for (curr = &gdbarch_registry; |
0f71a2f6 JM |
5687 | (*curr) != NULL; |
5688 | curr = &(*curr)->next) | |
5689 | { | |
5690 | if (bfd_architecture == (*curr)->bfd_architecture) | |
8e65ff28 AC |
5691 | internal_error (__FILE__, __LINE__, |
5692 | "gdbarch: Duplicate registraration of architecture (%s)", | |
5693 | bfd_arch_info->printable_name); | |
0f71a2f6 JM |
5694 | } |
5695 | /* log it */ | |
5696 | if (gdbarch_debug) | |
5697 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n", | |
5698 | bfd_arch_info->printable_name, | |
5699 | (long) init); | |
5700 | /* Append it */ | |
4b9b3959 | 5701 | (*curr) = XMALLOC (struct gdbarch_registration); |
0f71a2f6 JM |
5702 | (*curr)->bfd_architecture = bfd_architecture; |
5703 | (*curr)->init = init; | |
4b9b3959 | 5704 | (*curr)->dump_tdep = dump_tdep; |
0f71a2f6 JM |
5705 | (*curr)->arches = NULL; |
5706 | (*curr)->next = NULL; | |
4b9b3959 AC |
5707 | } |
5708 | ||
5709 | void | |
5710 | register_gdbarch_init (enum bfd_architecture bfd_architecture, | |
5711 | gdbarch_init_ftype *init) | |
5712 | { | |
5713 | gdbarch_register (bfd_architecture, init, NULL); | |
0f71a2f6 | 5714 | } |
0f71a2f6 JM |
5715 | |
5716 | ||
5717 | /* Look for an architecture using gdbarch_info. Base search on only | |
5718 | BFD_ARCH_INFO and BYTE_ORDER. */ | |
5719 | ||
5720 | struct gdbarch_list * | |
104c1213 JM |
5721 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
5722 | const struct gdbarch_info *info) | |
0f71a2f6 JM |
5723 | { |
5724 | for (; arches != NULL; arches = arches->next) | |
5725 | { | |
5726 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) | |
5727 | continue; | |
5728 | if (info->byte_order != arches->gdbarch->byte_order) | |
5729 | continue; | |
4be87837 DJ |
5730 | if (info->osabi != arches->gdbarch->osabi) |
5731 | continue; | |
0f71a2f6 JM |
5732 | return arches; |
5733 | } | |
5734 | return NULL; | |
5735 | } | |
5736 | ||
5737 | ||
ebdba546 AC |
5738 | /* Find an architecture that matches the specified INFO. Create a new |
5739 | architecture if needed. Return that new architecture. Assumes | |
5740 | that there is no current architecture. */ | |
0f71a2f6 | 5741 | |
ebdba546 AC |
5742 | static struct gdbarch * |
5743 | find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info) | |
0f71a2f6 JM |
5744 | { |
5745 | struct gdbarch *new_gdbarch; | |
4b9b3959 | 5746 | struct gdbarch_registration *rego; |
0f71a2f6 | 5747 | |
ebdba546 AC |
5748 | /* The existing architecture has been swapped out - all this code |
5749 | works from a clean slate. */ | |
5750 | gdb_assert (current_gdbarch == NULL); | |
5751 | ||
b732d07d | 5752 | /* Fill in missing parts of the INFO struct using a number of |
ebdba546 AC |
5753 | sources: "set ..."; INFOabfd supplied; and the existing |
5754 | architecture. */ | |
5755 | gdbarch_info_fill (old_gdbarch, &info); | |
4be87837 | 5756 | |
b732d07d AC |
5757 | /* Must have found some sort of architecture. */ |
5758 | gdb_assert (info.bfd_arch_info != NULL); | |
0f71a2f6 JM |
5759 | |
5760 | if (gdbarch_debug) | |
5761 | { | |
0f71a2f6 | 5762 | fprintf_unfiltered (gdb_stdlog, |
ebdba546 | 5763 | "find_arch_by_info: info.bfd_arch_info %s\n", |
0f71a2f6 JM |
5764 | (info.bfd_arch_info != NULL |
5765 | ? info.bfd_arch_info->printable_name | |
5766 | : "(null)")); | |
5767 | fprintf_unfiltered (gdb_stdlog, | |
ebdba546 | 5768 | "find_arch_by_info: info.byte_order %d (%s)\n", |
0f71a2f6 | 5769 | info.byte_order, |
d7449b42 | 5770 | (info.byte_order == BFD_ENDIAN_BIG ? "big" |
778eb05e | 5771 | : info.byte_order == BFD_ENDIAN_LITTLE ? "little" |
0f71a2f6 | 5772 | : "default")); |
4be87837 | 5773 | fprintf_unfiltered (gdb_stdlog, |
ebdba546 | 5774 | "find_arch_by_info: info.osabi %d (%s)\n", |
4be87837 | 5775 | info.osabi, gdbarch_osabi_name (info.osabi)); |
0f71a2f6 | 5776 | fprintf_unfiltered (gdb_stdlog, |
ebdba546 | 5777 | "find_arch_by_info: info.abfd 0x%lx\n", |
0f71a2f6 JM |
5778 | (long) info.abfd); |
5779 | fprintf_unfiltered (gdb_stdlog, | |
ebdba546 | 5780 | "find_arch_by_info: info.tdep_info 0x%lx\n", |
0f71a2f6 JM |
5781 | (long) info.tdep_info); |
5782 | } | |
5783 | ||
ebdba546 | 5784 | /* Find the tdep code that knows about this architecture. */ |
b732d07d AC |
5785 | for (rego = gdbarch_registry; |
5786 | rego != NULL; | |
5787 | rego = rego->next) | |
5788 | if (rego->bfd_architecture == info.bfd_arch_info->arch) | |
5789 | break; | |
5790 | if (rego == NULL) | |
5791 | { | |
5792 | if (gdbarch_debug) | |
ebdba546 AC |
5793 | fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: " |
5794 | "No matching architecture\n"); | |
b732d07d AC |
5795 | return 0; |
5796 | } | |
5797 | ||
ebdba546 | 5798 | /* Ask the tdep code for an architecture that matches "info". */ |
0f71a2f6 JM |
5799 | new_gdbarch = rego->init (info, rego->arches); |
5800 | ||
ebdba546 AC |
5801 | /* Did the tdep code like it? No. Reject the change and revert to |
5802 | the old architecture. */ | |
0f71a2f6 JM |
5803 | if (new_gdbarch == NULL) |
5804 | { | |
5805 | if (gdbarch_debug) | |
ebdba546 AC |
5806 | fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: " |
5807 | "Target rejected architecture\n"); | |
5808 | return NULL; | |
0f71a2f6 JM |
5809 | } |
5810 | ||
ebdba546 AC |
5811 | /* Is this a pre-existing architecture (as determined by already |
5812 | being initialized)? Move it to the front of the architecture | |
5813 | list (keeping the list sorted Most Recently Used). */ | |
5814 | if (new_gdbarch->initialized_p) | |
0f71a2f6 | 5815 | { |
ebdba546 AC |
5816 | struct gdbarch_list **list; |
5817 | struct gdbarch_list *this; | |
0f71a2f6 | 5818 | if (gdbarch_debug) |
ebdba546 AC |
5819 | fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: " |
5820 | "Previous architecture 0x%08lx (%s) selected\n", | |
0f71a2f6 JM |
5821 | (long) new_gdbarch, |
5822 | new_gdbarch->bfd_arch_info->printable_name); | |
ebdba546 AC |
5823 | /* Find the existing arch in the list. */ |
5824 | for (list = ®o->arches; | |
5825 | (*list) != NULL && (*list)->gdbarch != new_gdbarch; | |
5826 | list = &(*list)->next); | |
5827 | /* It had better be in the list of architectures. */ | |
5828 | gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch); | |
5829 | /* Unlink THIS. */ | |
5830 | this = (*list); | |
5831 | (*list) = this->next; | |
5832 | /* Insert THIS at the front. */ | |
5833 | this->next = rego->arches; | |
5834 | rego->arches = this; | |
5835 | /* Return it. */ | |
5836 | return new_gdbarch; | |
0f71a2f6 JM |
5837 | } |
5838 | ||
ebdba546 AC |
5839 | /* It's a new architecture. */ |
5840 | if (gdbarch_debug) | |
5841 | fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: " | |
5842 | "New architecture 0x%08lx (%s) selected\n", | |
5843 | (long) new_gdbarch, | |
5844 | new_gdbarch->bfd_arch_info->printable_name); | |
5845 | ||
5846 | /* Insert the new architecture into the front of the architecture | |
5847 | list (keep the list sorted Most Recently Used). */ | |
0f79675b AC |
5848 | { |
5849 | struct gdbarch_list *this = XMALLOC (struct gdbarch_list); | |
5850 | this->next = rego->arches; | |
5851 | this->gdbarch = new_gdbarch; | |
5852 | rego->arches = this; | |
5853 | } | |
0f71a2f6 | 5854 | |
4b9b3959 AC |
5855 | /* Check that the newly installed architecture is valid. Plug in |
5856 | any post init values. */ | |
5857 | new_gdbarch->dump_tdep = rego->dump_tdep; | |
0f71a2f6 | 5858 | verify_gdbarch (new_gdbarch); |
ebdba546 | 5859 | new_gdbarch->initialized_p = 1; |
0f71a2f6 | 5860 | |
ebdba546 AC |
5861 | /* Initialize any per-architecture swap areas. This phase requires |
5862 | a valid global CURRENT_GDBARCH. Set it momentarially, and then | |
5863 | swap the entire architecture out. */ | |
5864 | current_gdbarch = new_gdbarch; | |
7de2341d | 5865 | current_gdbarch_swap_init_hack (); |
ebdba546 | 5866 | current_gdbarch_swap_out_hack (); |
67c2c32c | 5867 | |
4b9b3959 | 5868 | if (gdbarch_debug) |
ebdba546 | 5869 | gdbarch_dump (new_gdbarch, gdb_stdlog); |
4b9b3959 | 5870 | |
ebdba546 | 5871 | return new_gdbarch; |
0f71a2f6 | 5872 | } |
c906108c | 5873 | |
ebdba546 AC |
5874 | struct gdbarch * |
5875 | gdbarch_find_by_info (struct gdbarch_info info) | |
5876 | { | |
5877 | /* Save the previously selected architecture, setting the global to | |
5878 | NULL. This stops things like gdbarch->init() trying to use the | |
5879 | previous architecture's configuration. The previous architecture | |
5880 | may not even be of the same architecture family. The most recent | |
5881 | architecture of the same family is found at the head of the | |
5882 | rego->arches list. */ | |
5883 | struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack (); | |
5884 | ||
5885 | /* Find the specified architecture. */ | |
5886 | struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info); | |
5887 | ||
5888 | /* Restore the existing architecture. */ | |
5889 | gdb_assert (current_gdbarch == NULL); | |
5890 | current_gdbarch_swap_in_hack (old_gdbarch); | |
5891 | ||
5892 | return new_gdbarch; | |
5893 | } | |
5894 | ||
5895 | /* Make the specified architecture current, swapping the existing one | |
5896 | out. */ | |
5897 | ||
5898 | void | |
5899 | deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch) | |
5900 | { | |
5901 | gdb_assert (new_gdbarch != NULL); | |
5902 | gdb_assert (current_gdbarch != NULL); | |
5903 | gdb_assert (new_gdbarch->initialized_p); | |
5904 | current_gdbarch_swap_out_hack (); | |
5905 | current_gdbarch_swap_in_hack (new_gdbarch); | |
5906 | architecture_changed_event (); | |
5907 | } | |
c906108c | 5908 | |
104c1213 | 5909 | extern void _initialize_gdbarch (void); |
b4a20239 | 5910 | |
c906108c | 5911 | void |
7c7651b2 | 5912 | _initialize_gdbarch (void) |
c906108c | 5913 | { |
5d161b24 DB |
5914 | struct cmd_list_element *c; |
5915 | ||
5d161b24 | 5916 | add_show_from_set (add_set_cmd ("arch", |
c906108c SS |
5917 | class_maintenance, |
5918 | var_zinteger, | |
adf40b2e | 5919 | (char *)&gdbarch_debug, |
c906108c | 5920 | "Set architecture debugging.\n\ |
5d161b24 DB |
5921 | When non-zero, architecture debugging is enabled.", &setdebuglist), |
5922 | &showdebuglist); | |
59233f88 AC |
5923 | c = add_set_cmd ("archdebug", |
5924 | class_maintenance, | |
5925 | var_zinteger, | |
5926 | (char *)&gdbarch_debug, | |
5927 | "Set architecture debugging.\n\ | |
5d161b24 DB |
5928 | When non-zero, architecture debugging is enabled.", &setlist); |
5929 | ||
59233f88 AC |
5930 | deprecate_cmd (c, "set debug arch"); |
5931 | deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch"); | |
c906108c | 5932 | } |