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