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