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