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