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