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