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