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