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