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