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