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