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