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