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