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