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