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