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