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