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