Commit | Line | Data |
---|---|---|
59233f88 AC |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
2 | ||
adf40b2e | 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
79d45cd4 AC |
4 | |
5 | Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free | |
6 | Software Foundation, Inc. | |
c906108c | 7 | |
96baa820 JM |
8 | This file is part of GDB. |
9 | ||
10 | This program is free software; you can redistribute it and/or modify | |
11 | it under the terms of the GNU General Public License as published by | |
12 | the Free Software Foundation; either version 2 of the License, or | |
13 | (at your option) any later version. | |
c906108c | 14 | |
96baa820 JM |
15 | This program is distributed in the hope that it will be useful, |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | GNU General Public License for more details. | |
c906108c | 19 | |
96baa820 JM |
20 | You should have received a copy of the GNU General Public License |
21 | along with this program; if not, write to the Free Software | |
22 | Foundation, Inc., 59 Temple Place - Suite 330, | |
23 | Boston, MA 02111-1307, USA. */ | |
adf40b2e | 24 | |
104c1213 JM |
25 | /* This file was created with the aid of ``gdbarch.sh''. |
26 | ||
52204a0b | 27 | The Bourne shell script ``gdbarch.sh'' creates the files |
104c1213 JM |
28 | ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them |
29 | against the existing ``gdbarch.[hc]''. Any differences found | |
30 | being reported. | |
31 | ||
32 | If editing this file, please also run gdbarch.sh and merge any | |
52204a0b | 33 | changes into that script. Conversely, when making sweeping changes |
104c1213 JM |
34 | to this file, modifying gdbarch.sh and using its output may prove |
35 | easier. */ | |
c906108c | 36 | |
c906108c SS |
37 | |
38 | #include "defs.h" | |
1ad03bde | 39 | #include "arch-utils.h" |
c906108c | 40 | |
0f71a2f6 | 41 | #include "gdbcmd.h" |
adf40b2e | 42 | #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */ |
7a292a7a | 43 | #include "symcat.h" |
c906108c | 44 | |
f0d4cc9e | 45 | #include "floatformat.h" |
c906108c | 46 | |
95160752 | 47 | #include "gdb_assert.h" |
b66d6d2e | 48 | #include "gdb_string.h" |
67c2c32c | 49 | #include "gdb-events.h" |
b59ff9d5 | 50 | #include "reggroups.h" |
4be87837 | 51 | #include "osabi.h" |
aebd7893 | 52 | #include "gdb_obstack.h" |
95160752 | 53 | |
104c1213 JM |
54 | /* Static function declarations */ |
55 | ||
b3cc3077 | 56 | static void alloc_gdbarch_data (struct gdbarch *); |
104c1213 | 57 | |
0f71a2f6 JM |
58 | /* Non-zero if we want to trace architecture code. */ |
59 | ||
60 | #ifndef GDBARCH_DEBUG | |
61 | #define GDBARCH_DEBUG 0 | |
62 | #endif | |
63 | int gdbarch_debug = GDBARCH_DEBUG; | |
64 | ||
65 | ||
66 | /* Maintain the struct gdbarch object */ | |
67 | ||
68 | struct gdbarch | |
adf40b2e | 69 | { |
76860b5f AC |
70 | /* Has this architecture been fully initialized? */ |
71 | int initialized_p; | |
aebd7893 AC |
72 | |
73 | /* An obstack bound to the lifetime of the architecture. */ | |
74 | struct obstack *obstack; | |
75 | ||
adf40b2e JM |
76 | /* basic architectural information */ |
77 | const struct bfd_arch_info * bfd_arch_info; | |
78 | int byte_order; | |
4be87837 | 79 | enum gdb_osabi osabi; |
0f71a2f6 | 80 | |
adf40b2e JM |
81 | /* target specific vector. */ |
82 | struct gdbarch_tdep *tdep; | |
4b9b3959 | 83 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 84 | |
adf40b2e | 85 | /* per-architecture data-pointers */ |
95160752 | 86 | unsigned nr_data; |
adf40b2e | 87 | void **data; |
0f71a2f6 | 88 | |
adf40b2e JM |
89 | /* per-architecture swap-regions */ |
90 | struct gdbarch_swap *swap; | |
0f71a2f6 | 91 | |
adf40b2e | 92 | /* Multi-arch values. |
0f71a2f6 | 93 | |
adf40b2e | 94 | When extending this structure you must: |
0f71a2f6 | 95 | |
adf40b2e | 96 | Add the field below. |
0f71a2f6 | 97 | |
adf40b2e JM |
98 | Declare set/get functions and define the corresponding |
99 | macro in gdbarch.h. | |
0f71a2f6 | 100 | |
adf40b2e JM |
101 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
102 | initialize the new field. | |
0f71a2f6 | 103 | |
adf40b2e JM |
104 | verify_gdbarch(): Confirm that the target updated the field |
105 | correctly. | |
0f71a2f6 | 106 | |
7e73cedf | 107 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
adf40b2e | 108 | field is dumped out |
0f71a2f6 | 109 | |
c0e8c252 | 110 | ``startup_gdbarch()'': Append an initial value to the static |
adf40b2e | 111 | variable (base values on the host's c-type system). |
0f71a2f6 | 112 | |
adf40b2e JM |
113 | get_gdbarch(): Implement the set/get functions (probably using |
114 | the macro's as shortcuts). | |
0f71a2f6 JM |
115 | |
116 | */ | |
117 | ||
adf40b2e JM |
118 | int short_bit; |
119 | int int_bit; | |
120 | int long_bit; | |
121 | int long_long_bit; | |
122 | int float_bit; | |
123 | int double_bit; | |
124 | int long_double_bit; | |
66b43ecb | 125 | int ptr_bit; |
52204a0b | 126 | int addr_bit; |
66b43ecb | 127 | int bfd_vma_bit; |
4e409299 | 128 | int char_signed; |
adf40b2e JM |
129 | gdbarch_read_pc_ftype *read_pc; |
130 | gdbarch_write_pc_ftype *write_pc; | |
adf40b2e | 131 | gdbarch_read_sp_ftype *read_sp; |
39d4ef09 | 132 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
d8124050 AC |
133 | gdbarch_pseudo_register_read_ftype *pseudo_register_read; |
134 | gdbarch_pseudo_register_write_ftype *pseudo_register_write; | |
adf40b2e | 135 | int num_regs; |
0aba1244 | 136 | int num_pseudo_regs; |
adf40b2e | 137 | int sp_regnum; |
adf40b2e | 138 | int pc_regnum; |
c2169756 | 139 | int ps_regnum; |
60054393 | 140 | int fp0_regnum; |
88c72b7d AC |
141 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
142 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; | |
143 | gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum; | |
144 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; | |
145 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; | |
adf40b2e | 146 | gdbarch_register_name_ftype *register_name; |
9c04cab7 AC |
147 | gdbarch_register_type_ftype *register_type; |
148 | gdbarch_deprecated_register_virtual_type_ftype *deprecated_register_virtual_type; | |
b8b527c5 | 149 | int deprecated_register_bytes; |
9c04cab7 AC |
150 | gdbarch_deprecated_register_byte_ftype *deprecated_register_byte; |
151 | gdbarch_deprecated_register_raw_size_ftype *deprecated_register_raw_size; | |
152 | gdbarch_deprecated_register_virtual_size_ftype *deprecated_register_virtual_size; | |
f3be58bc | 153 | gdbarch_unwind_dummy_id_ftype *unwind_dummy_id; |
a59fe496 | 154 | gdbarch_deprecated_save_dummy_frame_tos_ftype *deprecated_save_dummy_frame_tos; |
f3be58bc AC |
155 | int deprecated_fp_regnum; |
156 | gdbarch_deprecated_target_read_fp_ftype *deprecated_target_read_fp; | |
b8de8283 AC |
157 | gdbarch_push_dummy_call_ftype *push_dummy_call; |
158 | gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments; | |
b8de8283 AC |
159 | gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address; |
160 | gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp; | |
161 | int deprecated_register_size; | |
adf40b2e | 162 | int call_dummy_location; |
7043d8dc | 163 | gdbarch_push_dummy_code_ftype *push_dummy_code; |
b8de8283 AC |
164 | gdbarch_deprecated_do_registers_info_ftype *deprecated_do_registers_info; |
165 | gdbarch_print_registers_info_ftype *print_registers_info; | |
166 | gdbarch_print_float_info_ftype *print_float_info; | |
167 | gdbarch_print_vector_info_ftype *print_vector_info; | |
168 | gdbarch_register_sim_regno_ftype *register_sim_regno; | |
169 | gdbarch_register_bytes_ok_ftype *register_bytes_ok; | |
170 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; | |
171 | gdbarch_cannot_store_register_ftype *cannot_store_register; | |
172 | gdbarch_get_longjmp_target_ftype *get_longjmp_target; | |
a5afb99f | 173 | gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc; |
adf40b2e | 174 | int believe_pcc_promotion; |
129c1cd6 | 175 | gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register; |
13d01224 AC |
176 | gdbarch_convert_register_p_ftype *convert_register_p; |
177 | gdbarch_register_to_value_ftype *register_to_value; | |
178 | gdbarch_value_to_register_ftype *value_to_register; | |
4478b372 JB |
179 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
180 | gdbarch_address_to_pointer_ftype *address_to_pointer; | |
fc0c74b1 | 181 | gdbarch_integer_to_address_ftype *integer_to_address; |
749b82f6 | 182 | gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame; |
4183d812 | 183 | gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return; |
92ad9cd9 | 184 | gdbarch_return_value_ftype *return_value; |
ebba8386 | 185 | gdbarch_extract_return_value_ftype *extract_return_value; |
adf40b2e | 186 | gdbarch_store_return_value_ftype *store_return_value; |
ebba8386 AC |
187 | gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value; |
188 | gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value; | |
92ad9cd9 | 189 | gdbarch_use_struct_convention_ftype *use_struct_convention; |
74055713 | 190 | gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address; |
f30ee0bc | 191 | gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs; |
e9582e71 | 192 | gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info; |
adf40b2e JM |
193 | gdbarch_skip_prologue_ftype *skip_prologue; |
194 | gdbarch_inner_than_ftype *inner_than; | |
195 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; | |
a1131521 | 196 | gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address; |
917317f4 JM |
197 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
198 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; | |
adf40b2e JM |
199 | CORE_ADDR decr_pc_after_break; |
200 | CORE_ADDR function_start_offset; | |
201 | gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; | |
202 | CORE_ADDR frame_args_skip; | |
19772a2c | 203 | gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation; |
618ce49f AC |
204 | gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain; |
205 | gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid; | |
8bedc050 | 206 | gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc; |
12cc2063 | 207 | gdbarch_unwind_pc_ftype *unwind_pc; |
a9e5fdc2 | 208 | gdbarch_unwind_sp_ftype *unwind_sp; |
42efa47a AC |
209 | gdbarch_deprecated_frame_args_address_ftype *deprecated_frame_args_address; |
210 | gdbarch_deprecated_frame_locals_address_ftype *deprecated_frame_locals_address; | |
6913c89a | 211 | gdbarch_deprecated_saved_pc_after_call_ftype *deprecated_saved_pc_after_call; |
adf40b2e | 212 | gdbarch_frame_num_args_ftype *frame_num_args; |
f27dd7fd | 213 | gdbarch_deprecated_stack_align_ftype *deprecated_stack_align; |
dc604539 | 214 | gdbarch_frame_align_ftype *frame_align; |
88d89dbb | 215 | gdbarch_deprecated_reg_struct_has_addr_ftype *deprecated_reg_struct_has_addr; |
192cb3d4 | 216 | gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr; |
8b148df9 | 217 | int frame_red_zone_size; |
f0d4cc9e AC |
218 | const struct floatformat * float_format; |
219 | const struct floatformat * double_format; | |
220 | const struct floatformat * long_double_format; | |
f517ea4e | 221 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
875e1767 | 222 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
181c1381 | 223 | gdbarch_smash_text_address_ftype *smash_text_address; |
64c4637f | 224 | gdbarch_software_single_step_ftype *software_single_step; |
2bf0cb65 | 225 | gdbarch_print_insn_ftype *print_insn; |
bdcd319a | 226 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
dea0c52f | 227 | gdbarch_skip_solib_resolver_ftype *skip_solib_resolver; |
68e9cc94 | 228 | gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; |
d50355b6 | 229 | gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline; |
c12260ac | 230 | gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; |
552c04a7 | 231 | gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; |
a2cf933a EZ |
232 | gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special; |
233 | gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special; | |
5720643c | 234 | const char * name_of_malloc; |
c4ed33b9 | 235 | int cannot_step_breakpoint; |
f74fa174 | 236 | int have_nonsteppable_watchpoint; |
8b2dbe47 KB |
237 | gdbarch_address_class_type_flags_ftype *address_class_type_flags; |
238 | gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name; | |
239 | gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags; | |
b59ff9d5 | 240 | gdbarch_register_reggroup_p_ftype *register_reggroup_p; |
143985b7 | 241 | gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument; |
6ce6d90f | 242 | gdbarch_regset_from_core_section_ftype *regset_from_core_section; |
adf40b2e | 243 | }; |
0f71a2f6 JM |
244 | |
245 | ||
246 | /* The default architecture uses host values (for want of a better | |
247 | choice). */ | |
248 | ||
249 | extern const struct bfd_arch_info bfd_default_arch_struct; | |
250 | ||
4b9b3959 AC |
251 | struct gdbarch startup_gdbarch = |
252 | { | |
76860b5f | 253 | 1, /* Always initialized. */ |
aebd7893 | 254 | NULL, /* The obstack. */ |
0f71a2f6 | 255 | /* basic architecture information */ |
ec5cbaec AC |
256 | &bfd_default_arch_struct, /* bfd_arch_info */ |
257 | BFD_ENDIAN_BIG, /* byte_order */ | |
258 | GDB_OSABI_UNKNOWN, /* osabi */ | |
4b9b3959 AC |
259 | /* target specific vector and its dump routine */ |
260 | NULL, NULL, | |
0f71a2f6 JM |
261 | /*per-architecture data-pointers and swap regions */ |
262 | 0, NULL, NULL, | |
263 | /* Multi-arch values */ | |
ec5cbaec AC |
264 | 8 * sizeof (short), /* short_bit */ |
265 | 8 * sizeof (int), /* int_bit */ | |
266 | 8 * sizeof (long), /* long_bit */ | |
267 | 8 * sizeof (LONGEST), /* long_long_bit */ | |
268 | 8 * sizeof (float), /* float_bit */ | |
269 | 8 * sizeof (double), /* double_bit */ | |
270 | 8 * sizeof (long double), /* long_double_bit */ | |
271 | 8 * sizeof (void*), /* ptr_bit */ | |
272 | 8 * sizeof (void*), /* addr_bit */ | |
273 | 8 * sizeof (void*), /* bfd_vma_bit */ | |
274 | 1, /* char_signed */ | |
275 | 0, /* read_pc */ | |
276 | 0, /* write_pc */ | |
ec5cbaec | 277 | 0, /* read_sp */ |
ec5cbaec AC |
278 | 0, /* virtual_frame_pointer */ |
279 | 0, /* pseudo_register_read */ | |
280 | 0, /* pseudo_register_write */ | |
281 | 0, /* num_regs */ | |
282 | 0, /* num_pseudo_regs */ | |
283 | -1, /* sp_regnum */ | |
ec5cbaec AC |
284 | -1, /* pc_regnum */ |
285 | -1, /* ps_regnum */ | |
286 | 0, /* fp0_regnum */ | |
ec5cbaec AC |
287 | 0, /* stab_reg_to_regnum */ |
288 | 0, /* ecoff_reg_to_regnum */ | |
289 | 0, /* dwarf_reg_to_regnum */ | |
290 | 0, /* sdb_reg_to_regnum */ | |
291 | 0, /* dwarf2_reg_to_regnum */ | |
292 | 0, /* register_name */ | |
9c04cab7 AC |
293 | 0, /* register_type */ |
294 | 0, /* deprecated_register_virtual_type */ | |
ec5cbaec | 295 | 0, /* deprecated_register_bytes */ |
9c04cab7 AC |
296 | generic_register_byte, /* deprecated_register_byte */ |
297 | generic_register_size, /* deprecated_register_raw_size */ | |
298 | generic_register_size, /* deprecated_register_virtual_size */ | |
f3be58bc | 299 | 0, /* unwind_dummy_id */ |
a59fe496 | 300 | 0, /* deprecated_save_dummy_frame_tos */ |
f3be58bc AC |
301 | -1, /* deprecated_fp_regnum */ |
302 | 0, /* deprecated_target_read_fp */ | |
b8de8283 AC |
303 | 0, /* push_dummy_call */ |
304 | 0, /* deprecated_push_arguments */ | |
b8de8283 AC |
305 | 0, /* deprecated_push_return_address */ |
306 | 0, /* deprecated_dummy_write_sp */ | |
307 | 0, /* deprecated_register_size */ | |
ec5cbaec | 308 | 0, /* call_dummy_location */ |
ec5cbaec | 309 | 0, /* push_dummy_code */ |
b8de8283 AC |
310 | 0, /* deprecated_do_registers_info */ |
311 | default_print_registers_info, /* print_registers_info */ | |
312 | 0, /* print_float_info */ | |
313 | 0, /* print_vector_info */ | |
314 | 0, /* register_sim_regno */ | |
315 | 0, /* register_bytes_ok */ | |
316 | 0, /* cannot_fetch_register */ | |
317 | 0, /* cannot_store_register */ | |
318 | 0, /* get_longjmp_target */ | |
ec5cbaec AC |
319 | 0, /* deprecated_init_frame_pc */ |
320 | 0, /* believe_pcc_promotion */ | |
ec5cbaec | 321 | 0, /* deprecated_get_saved_register */ |
ec5cbaec AC |
322 | 0, /* convert_register_p */ |
323 | 0, /* register_to_value */ | |
324 | 0, /* value_to_register */ | |
325 | 0, /* pointer_to_address */ | |
326 | 0, /* address_to_pointer */ | |
327 | 0, /* integer_to_address */ | |
ec5cbaec AC |
328 | 0, /* deprecated_pop_frame */ |
329 | 0, /* deprecated_store_struct_return */ | |
92ad9cd9 | 330 | 0, /* return_value */ |
ec5cbaec AC |
331 | 0, /* extract_return_value */ |
332 | 0, /* store_return_value */ | |
333 | 0, /* deprecated_extract_return_value */ | |
334 | 0, /* deprecated_store_return_value */ | |
92ad9cd9 | 335 | 0, /* use_struct_convention */ |
74055713 | 336 | 0, /* deprecated_extract_struct_value_address */ |
ec5cbaec AC |
337 | 0, /* deprecated_frame_init_saved_regs */ |
338 | 0, /* deprecated_init_extra_frame_info */ | |
339 | 0, /* skip_prologue */ | |
ec5cbaec AC |
340 | 0, /* inner_than */ |
341 | 0, /* breakpoint_from_pc */ | |
a1131521 | 342 | 0, /* adjust_breakpoint_address */ |
ec5cbaec AC |
343 | 0, /* memory_insert_breakpoint */ |
344 | 0, /* memory_remove_breakpoint */ | |
345 | 0, /* decr_pc_after_break */ | |
ec5cbaec AC |
346 | 0, /* function_start_offset */ |
347 | generic_remote_translate_xfer_address, /* remote_translate_xfer_address */ | |
348 | 0, /* frame_args_skip */ | |
19772a2c | 349 | 0, /* deprecated_frameless_function_invocation */ |
ec5cbaec AC |
350 | 0, /* deprecated_frame_chain */ |
351 | 0, /* deprecated_frame_chain_valid */ | |
352 | 0, /* deprecated_frame_saved_pc */ | |
353 | 0, /* unwind_pc */ | |
a9e5fdc2 | 354 | 0, /* unwind_sp */ |
42efa47a AC |
355 | get_frame_base, /* deprecated_frame_args_address */ |
356 | get_frame_base, /* deprecated_frame_locals_address */ | |
ec5cbaec AC |
357 | 0, /* deprecated_saved_pc_after_call */ |
358 | 0, /* frame_num_args */ | |
f27dd7fd | 359 | 0, /* deprecated_stack_align */ |
ec5cbaec | 360 | 0, /* frame_align */ |
88d89dbb | 361 | 0, /* deprecated_reg_struct_has_addr */ |
192cb3d4 | 362 | default_stabs_argument_has_addr, /* stabs_argument_has_addr */ |
8b148df9 | 363 | 0, /* frame_red_zone_size */ |
ec5cbaec AC |
364 | 0, /* float_format */ |
365 | 0, /* double_format */ | |
366 | 0, /* long_double_format */ | |
e2d0e7eb | 367 | convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */ |
ec5cbaec AC |
368 | 0, /* addr_bits_remove */ |
369 | 0, /* smash_text_address */ | |
370 | 0, /* software_single_step */ | |
371 | 0, /* print_insn */ | |
372 | 0, /* skip_trampoline_code */ | |
4c8c40e6 | 373 | generic_skip_solib_resolver, /* skip_solib_resolver */ |
ec5cbaec AC |
374 | 0, /* in_solib_call_trampoline */ |
375 | 0, /* in_solib_return_trampoline */ | |
ec5cbaec AC |
376 | generic_in_function_epilogue_p, /* in_function_epilogue_p */ |
377 | construct_inferior_arguments, /* construct_inferior_arguments */ | |
ec5cbaec AC |
378 | 0, /* elf_make_msymbol_special */ |
379 | 0, /* coff_make_msymbol_special */ | |
380 | "malloc", /* name_of_malloc */ | |
381 | 0, /* cannot_step_breakpoint */ | |
382 | 0, /* have_nonsteppable_watchpoint */ | |
383 | 0, /* address_class_type_flags */ | |
384 | 0, /* address_class_type_flags_to_name */ | |
385 | 0, /* address_class_name_to_type_flags */ | |
386 | default_register_reggroup_p, /* register_reggroup_p */ | |
387 | 0, /* fetch_pointer_argument */ | |
6ce6d90f | 388 | 0, /* regset_from_core_section */ |
c0e8c252 | 389 | /* startup_gdbarch() */ |
0f71a2f6 | 390 | }; |
4b9b3959 | 391 | |
c0e8c252 | 392 | struct gdbarch *current_gdbarch = &startup_gdbarch; |
0f71a2f6 | 393 | |
66b43ecb | 394 | /* Create a new ``struct gdbarch'' based on information provided by |
0f71a2f6 JM |
395 | ``struct gdbarch_info''. */ |
396 | ||
397 | struct gdbarch * | |
104c1213 JM |
398 | gdbarch_alloc (const struct gdbarch_info *info, |
399 | struct gdbarch_tdep *tdep) | |
0f71a2f6 | 400 | { |
85de9627 AC |
401 | /* NOTE: The new architecture variable is named ``current_gdbarch'' |
402 | so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to | |
403 | the current local architecture and not the previous global | |
404 | architecture. This ensures that the new architectures initial | |
405 | values are not influenced by the previous architecture. Once | |
406 | everything is parameterised with gdbarch, this will go away. */ | |
aebd7893 AC |
407 | struct gdbarch *current_gdbarch; |
408 | ||
409 | /* Create an obstack for allocating all the per-architecture memory, | |
410 | then use that to allocate the architecture vector. */ | |
411 | struct obstack *obstack = XMALLOC (struct obstack); | |
412 | obstack_init (obstack); | |
413 | current_gdbarch = obstack_alloc (obstack, sizeof (*current_gdbarch)); | |
85de9627 | 414 | memset (current_gdbarch, 0, sizeof (*current_gdbarch)); |
aebd7893 | 415 | current_gdbarch->obstack = obstack; |
0f71a2f6 | 416 | |
85de9627 | 417 | alloc_gdbarch_data (current_gdbarch); |
b3cc3077 | 418 | |
85de9627 | 419 | current_gdbarch->tdep = tdep; |
0f71a2f6 | 420 | |
85de9627 AC |
421 | current_gdbarch->bfd_arch_info = info->bfd_arch_info; |
422 | current_gdbarch->byte_order = info->byte_order; | |
4be87837 | 423 | current_gdbarch->osabi = info->osabi; |
0f71a2f6 JM |
424 | |
425 | /* Force the explicit initialization of these. */ | |
85de9627 AC |
426 | current_gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
427 | current_gdbarch->int_bit = 4*TARGET_CHAR_BIT; | |
428 | current_gdbarch->long_bit = 4*TARGET_CHAR_BIT; | |
429 | current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT; | |
430 | current_gdbarch->float_bit = 4*TARGET_CHAR_BIT; | |
431 | current_gdbarch->double_bit = 8*TARGET_CHAR_BIT; | |
17ef5d92 | 432 | current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT; |
85de9627 AC |
433 | current_gdbarch->ptr_bit = TARGET_INT_BIT; |
434 | current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address; | |
4e409299 | 435 | current_gdbarch->char_signed = -1; |
85de9627 | 436 | current_gdbarch->write_pc = generic_target_write_pc; |
85de9627 AC |
437 | current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; |
438 | current_gdbarch->num_regs = -1; | |
439 | current_gdbarch->sp_regnum = -1; | |
85de9627 | 440 | current_gdbarch->pc_regnum = -1; |
c2169756 | 441 | current_gdbarch->ps_regnum = -1; |
85de9627 | 442 | current_gdbarch->fp0_regnum = -1; |
85de9627 AC |
443 | current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; |
444 | current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; | |
445 | current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum; | |
446 | current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; | |
447 | current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; | |
9c04cab7 AC |
448 | current_gdbarch->deprecated_register_byte = generic_register_byte; |
449 | current_gdbarch->deprecated_register_raw_size = generic_register_size; | |
450 | current_gdbarch->deprecated_register_virtual_size = generic_register_size; | |
f3be58bc | 451 | current_gdbarch->deprecated_fp_regnum = -1; |
b99fa2d2 | 452 | current_gdbarch->call_dummy_location = AT_ENTRY_POINT; |
b8de8283 AC |
453 | current_gdbarch->print_registers_info = default_print_registers_info; |
454 | current_gdbarch->register_sim_regno = legacy_register_sim_regno; | |
455 | current_gdbarch->cannot_fetch_register = cannot_register_not; | |
456 | current_gdbarch->cannot_store_register = cannot_register_not; | |
a1f4a1b6 | 457 | current_gdbarch->convert_register_p = generic_convert_register_p; |
85de9627 AC |
458 | current_gdbarch->pointer_to_address = unsigned_pointer_to_address; |
459 | current_gdbarch->address_to_pointer = unsigned_address_to_pointer; | |
ebba8386 AC |
460 | current_gdbarch->extract_return_value = legacy_extract_return_value; |
461 | current_gdbarch->store_return_value = legacy_store_return_value; | |
56f12751 | 462 | current_gdbarch->use_struct_convention = generic_use_struct_convention; |
85de9627 AC |
463 | current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; |
464 | current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; | |
85de9627 | 465 | current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address; |
42efa47a AC |
466 | current_gdbarch->deprecated_frame_args_address = get_frame_base; |
467 | current_gdbarch->deprecated_frame_locals_address = get_frame_base; | |
192cb3d4 | 468 | current_gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr; |
e2d0e7eb | 469 | current_gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity; |
85de9627 | 470 | current_gdbarch->addr_bits_remove = core_addr_identity; |
181c1381 | 471 | current_gdbarch->smash_text_address = core_addr_identity; |
85de9627 | 472 | current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code; |
dea0c52f | 473 | current_gdbarch->skip_solib_resolver = generic_skip_solib_resolver; |
68e9cc94 | 474 | current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline; |
d50355b6 | 475 | current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline; |
c12260ac | 476 | current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; |
552c04a7 | 477 | current_gdbarch->construct_inferior_arguments = construct_inferior_arguments; |
a2cf933a EZ |
478 | current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special; |
479 | current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special; | |
5720643c | 480 | current_gdbarch->name_of_malloc = "malloc"; |
b59ff9d5 | 481 | current_gdbarch->register_reggroup_p = default_register_reggroup_p; |
0f71a2f6 JM |
482 | /* gdbarch_alloc() */ |
483 | ||
85de9627 | 484 | return current_gdbarch; |
0f71a2f6 JM |
485 | } |
486 | ||
487 | ||
aebd7893 AC |
488 | /* Allocate extra space using the per-architecture obstack. */ |
489 | ||
490 | void * | |
491 | gdbarch_obstack_zalloc (struct gdbarch *arch, long size) | |
492 | { | |
493 | void *data = obstack_alloc (arch->obstack, size); | |
494 | memset (data, 0, size); | |
495 | return data; | |
496 | } | |
497 | ||
498 | ||
058f20d5 JB |
499 | /* Free a gdbarch struct. This should never happen in normal |
500 | operation --- once you've created a gdbarch, you keep it around. | |
501 | However, if an architecture's init function encounters an error | |
502 | building the structure, it may need to clean up a partially | |
503 | constructed gdbarch. */ | |
4b9b3959 | 504 | |
058f20d5 JB |
505 | void |
506 | gdbarch_free (struct gdbarch *arch) | |
507 | { | |
aebd7893 | 508 | struct obstack *obstack; |
95160752 | 509 | gdb_assert (arch != NULL); |
aebd7893 AC |
510 | gdb_assert (!arch->initialized_p); |
511 | obstack = arch->obstack; | |
512 | obstack_free (obstack, 0); /* Includes the ARCH. */ | |
513 | xfree (obstack); | |
058f20d5 JB |
514 | } |
515 | ||
516 | ||
db446970 AC |
517 | /* Ensure that all values in a GDBARCH are reasonable. */ |
518 | ||
519 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it | |
520 | just happens to match the global variable ``current_gdbarch''. That | |
521 | way macros refering to that variable get the local and not the global | |
522 | version - ulgh. Once everything is parameterised with gdbarch, this | |
523 | will go away. */ | |
0f71a2f6 | 524 | |
0f71a2f6 | 525 | static void |
db446970 | 526 | verify_gdbarch (struct gdbarch *current_gdbarch) |
0f71a2f6 | 527 | { |
f16a1923 AC |
528 | struct ui_file *log; |
529 | struct cleanup *cleanups; | |
530 | long dummy; | |
531 | char *buf; | |
f16a1923 AC |
532 | log = mem_fileopen (); |
533 | cleanups = make_cleanup_ui_file_delete (log); | |
0f71a2f6 | 534 | /* fundamental */ |
db446970 | 535 | if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) |
f16a1923 | 536 | fprintf_unfiltered (log, "\n\tbyte-order"); |
db446970 | 537 | if (current_gdbarch->bfd_arch_info == NULL) |
f16a1923 | 538 | fprintf_unfiltered (log, "\n\tbfd_arch_info"); |
0f71a2f6 | 539 | /* Check those that need to be defined for the given multi-arch level. */ |
66b43ecb AC |
540 | /* Skip verify of short_bit, invalid_p == 0 */ |
541 | /* Skip verify of int_bit, invalid_p == 0 */ | |
542 | /* Skip verify of long_bit, invalid_p == 0 */ | |
543 | /* Skip verify of long_long_bit, invalid_p == 0 */ | |
544 | /* Skip verify of float_bit, invalid_p == 0 */ | |
545 | /* Skip verify of double_bit, invalid_p == 0 */ | |
546 | /* Skip verify of long_double_bit, invalid_p == 0 */ | |
547 | /* Skip verify of ptr_bit, invalid_p == 0 */ | |
db446970 AC |
548 | if (current_gdbarch->addr_bit == 0) |
549 | current_gdbarch->addr_bit = TARGET_PTR_BIT; | |
c0e8c252 | 550 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
db446970 AC |
551 | if (current_gdbarch->char_signed == -1) |
552 | current_gdbarch->char_signed = 1; | |
cde9ea48 | 553 | /* Skip verify of read_pc, has predicate */ |
be8dfb87 | 554 | /* Skip verify of write_pc, invalid_p == 0 */ |
bd1ce8ba | 555 | /* Skip verify of read_sp, has predicate */ |
39d4ef09 | 556 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
d8124050 AC |
557 | /* Skip verify of pseudo_register_read, has predicate */ |
558 | /* Skip verify of pseudo_register_write, has predicate */ | |
50248794 | 559 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 560 | && (current_gdbarch->num_regs == -1)) |
f16a1923 | 561 | fprintf_unfiltered (log, "\n\tnum_regs"); |
0aba1244 | 562 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
1200cd6e | 563 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
1200cd6e | 564 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
c2169756 | 565 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
60054393 | 566 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
88c72b7d AC |
567 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
568 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ | |
569 | /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */ | |
570 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ | |
571 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ | |
9c04cab7 AC |
572 | /* Skip verify of register_type, has predicate */ |
573 | /* Skip verify of deprecated_register_virtual_type, has predicate */ | |
574 | /* Skip verify of deprecated_register_byte, has predicate */ | |
dadd712e AC |
575 | /* Skip verify of deprecated_register_raw_size, has predicate */ |
576 | /* Skip verify of deprecated_register_virtual_size, has predicate */ | |
f3be58bc | 577 | /* Skip verify of unwind_dummy_id, has predicate */ |
a59fe496 | 578 | /* Skip verify of deprecated_save_dummy_frame_tos, has predicate */ |
f3be58bc AC |
579 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ |
580 | /* Skip verify of deprecated_target_read_fp, has predicate */ | |
b8de8283 AC |
581 | /* Skip verify of push_dummy_call, has predicate */ |
582 | /* Skip verify of deprecated_push_arguments, has predicate */ | |
b8de8283 AC |
583 | /* Skip verify of deprecated_push_return_address, has predicate */ |
584 | /* Skip verify of deprecated_dummy_write_sp, has predicate */ | |
585 | /* Skip verify of call_dummy_location, invalid_p == 0 */ | |
b8de8283 | 586 | /* Skip verify of push_dummy_code, has predicate */ |
903ad3a6 | 587 | /* Skip verify of deprecated_do_registers_info, has predicate */ |
0ab7a791 | 588 | /* Skip verify of print_registers_info, invalid_p == 0 */ |
23e3a7ac | 589 | /* Skip verify of print_float_info, has predicate */ |
e76f1f2e | 590 | /* Skip verify of print_vector_info, has predicate */ |
7c7651b2 | 591 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
2649061d | 592 | /* Skip verify of register_bytes_ok, has predicate */ |
01fb7433 AC |
593 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
594 | /* Skip verify of cannot_store_register, invalid_p == 0 */ | |
9df628e0 | 595 | /* Skip verify of get_longjmp_target, has predicate */ |
a5afb99f | 596 | /* Skip verify of deprecated_init_frame_pc, has predicate */ |
129c1cd6 | 597 | /* Skip verify of deprecated_get_saved_register, has predicate */ |
13d01224 | 598 | /* Skip verify of convert_register_p, invalid_p == 0 */ |
4478b372 JB |
599 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
600 | /* Skip verify of address_to_pointer, invalid_p == 0 */ | |
fc0c74b1 | 601 | /* Skip verify of integer_to_address, has predicate */ |
749b82f6 | 602 | /* Skip verify of deprecated_pop_frame, has predicate */ |
4183d812 | 603 | /* Skip verify of deprecated_store_struct_return, has predicate */ |
92ad9cd9 | 604 | /* Skip verify of return_value, has predicate */ |
ebba8386 AC |
605 | /* Skip verify of extract_return_value, invalid_p == 0 */ |
606 | /* Skip verify of store_return_value, invalid_p == 0 */ | |
92ad9cd9 | 607 | /* Skip verify of use_struct_convention, invalid_p == 0 */ |
74055713 | 608 | /* Skip verify of deprecated_extract_struct_value_address, has predicate */ |
f30ee0bc | 609 | /* Skip verify of deprecated_frame_init_saved_regs, has predicate */ |
e9582e71 | 610 | /* Skip verify of deprecated_init_extra_frame_info, has predicate */ |
50248794 | 611 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 612 | && (current_gdbarch->skip_prologue == 0)) |
f16a1923 | 613 | fprintf_unfiltered (log, "\n\tskip_prologue"); |
50248794 | 614 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 615 | && (current_gdbarch->inner_than == 0)) |
f16a1923 | 616 | fprintf_unfiltered (log, "\n\tinner_than"); |
aaab4dba | 617 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 618 | && (current_gdbarch->breakpoint_from_pc == 0)) |
aaab4dba | 619 | fprintf_unfiltered (log, "\n\tbreakpoint_from_pc"); |
a1131521 | 620 | /* Skip verify of adjust_breakpoint_address, has predicate */ |
c0e8c252 AC |
621 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ |
622 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ | |
71bd6bd4 | 623 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
6503b91e | 624 | /* Skip verify of function_start_offset, invalid_p == 0 */ |
c0e8c252 | 625 | /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */ |
5867a2fb | 626 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
19772a2c | 627 | /* Skip verify of deprecated_frameless_function_invocation, has predicate */ |
618ce49f AC |
628 | /* Skip verify of deprecated_frame_chain, has predicate */ |
629 | /* Skip verify of deprecated_frame_chain_valid, has predicate */ | |
8bedc050 | 630 | /* Skip verify of deprecated_frame_saved_pc, has predicate */ |
12cc2063 | 631 | /* Skip verify of unwind_pc, has predicate */ |
a9e5fdc2 | 632 | /* Skip verify of unwind_sp, has predicate */ |
42efa47a AC |
633 | /* Skip verify of deprecated_frame_args_address, has predicate */ |
634 | /* Skip verify of deprecated_frame_locals_address, has predicate */ | |
6913c89a | 635 | /* Skip verify of deprecated_saved_pc_after_call, has predicate */ |
983a287a | 636 | /* Skip verify of frame_num_args, has predicate */ |
f27dd7fd | 637 | /* Skip verify of deprecated_stack_align, has predicate */ |
dc604539 | 638 | /* Skip verify of frame_align, has predicate */ |
88d89dbb | 639 | /* Skip verify of deprecated_reg_struct_has_addr, has predicate */ |
192cb3d4 | 640 | /* Skip verify of stabs_argument_has_addr, invalid_p == 0 */ |
db446970 AC |
641 | if (current_gdbarch->float_format == 0) |
642 | current_gdbarch->float_format = default_float_format (current_gdbarch); | |
643 | if (current_gdbarch->double_format == 0) | |
644 | current_gdbarch->double_format = default_double_format (current_gdbarch); | |
645 | if (current_gdbarch->long_double_format == 0) | |
646 | current_gdbarch->long_double_format = default_double_format (current_gdbarch); | |
f517ea4e | 647 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
875e1767 | 648 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
181c1381 | 649 | /* Skip verify of smash_text_address, invalid_p == 0 */ |
64c4637f | 650 | /* Skip verify of software_single_step, has predicate */ |
f6c40618 | 651 | if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) |
db446970 | 652 | && (current_gdbarch->print_insn == 0)) |
f6c40618 | 653 | fprintf_unfiltered (log, "\n\tprint_insn"); |
bdcd319a | 654 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
dea0c52f | 655 | /* Skip verify of skip_solib_resolver, invalid_p == 0 */ |
68e9cc94 | 656 | /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */ |
d50355b6 | 657 | /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */ |
c12260ac | 658 | /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ |
552c04a7 | 659 | /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ |
a2cf933a EZ |
660 | /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */ |
661 | /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */ | |
5720643c | 662 | /* Skip verify of name_of_malloc, invalid_p == 0 */ |
c4ed33b9 | 663 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ |
f74fa174 | 664 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ |
8b2dbe47 KB |
665 | /* Skip verify of address_class_type_flags, has predicate */ |
666 | /* Skip verify of address_class_type_flags_to_name, has predicate */ | |
667 | /* Skip verify of address_class_name_to_type_flags, has predicate */ | |
7e20f3fb | 668 | /* Skip verify of register_reggroup_p, invalid_p == 0 */ |
143985b7 | 669 | /* Skip verify of fetch_pointer_argument, has predicate */ |
6ce6d90f | 670 | /* Skip verify of regset_from_core_section, has predicate */ |
f16a1923 AC |
671 | buf = ui_file_xstrdup (log, &dummy); |
672 | make_cleanup (xfree, buf); | |
673 | if (strlen (buf) > 0) | |
674 | internal_error (__FILE__, __LINE__, | |
675 | "verify_gdbarch: the following are invalid ...%s", | |
676 | buf); | |
677 | do_cleanups (cleanups); | |
0f71a2f6 JM |
678 | } |
679 | ||
680 | ||
681 | /* Print out the details of the current architecture. */ | |
682 | ||
4b9b3959 AC |
683 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it |
684 | just happens to match the global variable ``current_gdbarch''. That | |
685 | way macros refering to that variable get the local and not the global | |
686 | version - ulgh. Once everything is parameterised with gdbarch, this | |
687 | will go away. */ | |
688 | ||
0f71a2f6 | 689 | void |
db446970 | 690 | gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) |
0f71a2f6 | 691 | { |
4b9b3959 AC |
692 | fprintf_unfiltered (file, |
693 | "gdbarch_dump: GDB_MULTI_ARCH = %d\n", | |
694 | GDB_MULTI_ARCH); | |
e2d0e7eb AC |
695 | fprintf_unfiltered (file, |
696 | "gdbarch_dump: convert_from_func_ptr_addr = 0x%08lx\n", | |
697 | (long) current_gdbarch->convert_from_func_ptr_addr); | |
7996bcec AC |
698 | fprintf_unfiltered (file, |
699 | "gdbarch_dump: gdbarch_frame_align_p() = %d\n", | |
700 | gdbarch_frame_align_p (current_gdbarch)); | |
701 | fprintf_unfiltered (file, | |
702 | "gdbarch_dump: frame_align = 0x%08lx\n", | |
703 | (long) current_gdbarch->frame_align); | |
6ce6d90f MK |
704 | fprintf_unfiltered (file, |
705 | "gdbarch_dump: gdbarch_regset_from_core_section_p() = %d\n", | |
706 | gdbarch_regset_from_core_section_p (current_gdbarch)); | |
707 | fprintf_unfiltered (file, | |
708 | "gdbarch_dump: regset_from_core_section = 0x%08lx\n", | |
709 | (long) current_gdbarch->regset_from_core_section); | |
92ad9cd9 AC |
710 | fprintf_unfiltered (file, |
711 | "gdbarch_dump: gdbarch_return_value_p() = %d\n", | |
712 | gdbarch_return_value_p (current_gdbarch)); | |
713 | fprintf_unfiltered (file, | |
714 | "gdbarch_dump: return_value = 0x%08lx\n", | |
715 | (long) current_gdbarch->return_value); | |
7996bcec AC |
716 | fprintf_unfiltered (file, |
717 | "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n", | |
718 | (long) current_gdbarch->in_function_epilogue_p); | |
719 | fprintf_unfiltered (file, | |
720 | "gdbarch_dump: register_reggroup_p = 0x%08lx\n", | |
721 | (long) current_gdbarch->register_reggroup_p); | |
192cb3d4 MK |
722 | fprintf_unfiltered (file, |
723 | "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n", | |
724 | (long) current_gdbarch->stabs_argument_has_addr); | |
7996bcec AC |
725 | fprintf_unfiltered (file, |
726 | "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n", | |
727 | gdbarch_pseudo_register_read_p (current_gdbarch)); | |
728 | fprintf_unfiltered (file, | |
729 | "gdbarch_dump: pseudo_register_read = 0x%08lx\n", | |
730 | (long) current_gdbarch->pseudo_register_read); | |
731 | fprintf_unfiltered (file, | |
732 | "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n", | |
733 | gdbarch_pseudo_register_write_p (current_gdbarch)); | |
734 | fprintf_unfiltered (file, | |
735 | "gdbarch_dump: pseudo_register_write = 0x%08lx\n", | |
736 | (long) current_gdbarch->pseudo_register_write); | |
737 | fprintf_unfiltered (file, | |
738 | "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n", | |
739 | gdbarch_address_class_name_to_type_flags_p (current_gdbarch)); | |
740 | fprintf_unfiltered (file, | |
741 | "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n", | |
742 | (long) current_gdbarch->address_class_name_to_type_flags); | |
1e9f55d0 AC |
743 | #ifdef ADDRESS_CLASS_TYPE_FLAGS_P |
744 | fprintf_unfiltered (file, | |
745 | "gdbarch_dump: %s # %s\n", | |
746 | "ADDRESS_CLASS_TYPE_FLAGS_P()", | |
747 | XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ())); | |
748 | fprintf_unfiltered (file, | |
749 | "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n", | |
750 | ADDRESS_CLASS_TYPE_FLAGS_P ()); | |
751 | #endif | |
8b2dbe47 KB |
752 | #ifdef ADDRESS_CLASS_TYPE_FLAGS |
753 | fprintf_unfiltered (file, | |
754 | "gdbarch_dump: %s # %s\n", | |
755 | "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)", | |
756 | XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class))); | |
7996bcec AC |
757 | fprintf_unfiltered (file, |
758 | "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n", | |
759 | (long) current_gdbarch->address_class_type_flags | |
760 | /*ADDRESS_CLASS_TYPE_FLAGS ()*/); | |
8b2dbe47 | 761 | #endif |
7996bcec AC |
762 | fprintf_unfiltered (file, |
763 | "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n", | |
764 | gdbarch_address_class_type_flags_to_name_p (current_gdbarch)); | |
765 | fprintf_unfiltered (file, | |
766 | "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n", | |
767 | (long) current_gdbarch->address_class_type_flags_to_name); | |
08e45a40 | 768 | #ifdef ADDRESS_TO_POINTER |
4b9b3959 | 769 | fprintf_unfiltered (file, |
08e45a40 AC |
770 | "gdbarch_dump: %s # %s\n", |
771 | "ADDRESS_TO_POINTER(type, buf, addr)", | |
772 | XSTRING (ADDRESS_TO_POINTER (type, buf, addr))); | |
7996bcec AC |
773 | fprintf_unfiltered (file, |
774 | "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n", | |
775 | (long) current_gdbarch->address_to_pointer | |
776 | /*ADDRESS_TO_POINTER ()*/); | |
4b9b3959 | 777 | #endif |
5e74b15c RE |
778 | #ifdef ADDR_BITS_REMOVE |
779 | fprintf_unfiltered (file, | |
780 | "gdbarch_dump: %s # %s\n", | |
781 | "ADDR_BITS_REMOVE(addr)", | |
782 | XSTRING (ADDR_BITS_REMOVE (addr))); | |
7996bcec AC |
783 | fprintf_unfiltered (file, |
784 | "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n", | |
785 | (long) current_gdbarch->addr_bits_remove | |
786 | /*ADDR_BITS_REMOVE ()*/); | |
5e74b15c | 787 | #endif |
a1131521 KB |
788 | fprintf_unfiltered (file, |
789 | "gdbarch_dump: gdbarch_adjust_breakpoint_address_p() = %d\n", | |
790 | gdbarch_adjust_breakpoint_address_p (current_gdbarch)); | |
791 | fprintf_unfiltered (file, | |
792 | "gdbarch_dump: adjust_breakpoint_address = 0x%08lx\n", | |
793 | (long) current_gdbarch->adjust_breakpoint_address); | |
08e45a40 | 794 | #ifdef BELIEVE_PCC_PROMOTION |
4b9b3959 | 795 | fprintf_unfiltered (file, |
08e45a40 AC |
796 | "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n", |
797 | XSTRING (BELIEVE_PCC_PROMOTION)); | |
798 | fprintf_unfiltered (file, | |
06b25f14 AC |
799 | "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n", |
800 | BELIEVE_PCC_PROMOTION); | |
4b9b3959 | 801 | #endif |
08e45a40 | 802 | #ifdef BREAKPOINT_FROM_PC |
4b9b3959 | 803 | fprintf_unfiltered (file, |
08e45a40 AC |
804 | "gdbarch_dump: %s # %s\n", |
805 | "BREAKPOINT_FROM_PC(pcptr, lenptr)", | |
806 | XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr))); | |
7996bcec AC |
807 | fprintf_unfiltered (file, |
808 | "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n", | |
809 | (long) current_gdbarch->breakpoint_from_pc | |
810 | /*BREAKPOINT_FROM_PC ()*/); | |
4b9b3959 | 811 | #endif |
08e45a40 | 812 | #ifdef CALL_DUMMY_LOCATION |
52204a0b | 813 | fprintf_unfiltered (file, |
08e45a40 AC |
814 | "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", |
815 | XSTRING (CALL_DUMMY_LOCATION)); | |
816 | fprintf_unfiltered (file, | |
06b25f14 AC |
817 | "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n", |
818 | CALL_DUMMY_LOCATION); | |
52204a0b | 819 | #endif |
08e45a40 | 820 | #ifdef CANNOT_FETCH_REGISTER |
4b9b3959 AC |
821 | fprintf_unfiltered (file, |
822 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
823 | "CANNOT_FETCH_REGISTER(regnum)", |
824 | XSTRING (CANNOT_FETCH_REGISTER (regnum))); | |
7996bcec AC |
825 | fprintf_unfiltered (file, |
826 | "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n", | |
827 | (long) current_gdbarch->cannot_fetch_register | |
828 | /*CANNOT_FETCH_REGISTER ()*/); | |
4b9b3959 | 829 | #endif |
c4ed33b9 AC |
830 | #ifdef CANNOT_STEP_BREAKPOINT |
831 | fprintf_unfiltered (file, | |
832 | "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n", | |
833 | XSTRING (CANNOT_STEP_BREAKPOINT)); | |
834 | fprintf_unfiltered (file, | |
835 | "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n", | |
836 | CANNOT_STEP_BREAKPOINT); | |
837 | #endif | |
08e45a40 | 838 | #ifdef CANNOT_STORE_REGISTER |
4b9b3959 AC |
839 | fprintf_unfiltered (file, |
840 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
841 | "CANNOT_STORE_REGISTER(regnum)", |
842 | XSTRING (CANNOT_STORE_REGISTER (regnum))); | |
7996bcec AC |
843 | fprintf_unfiltered (file, |
844 | "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n", | |
845 | (long) current_gdbarch->cannot_store_register | |
846 | /*CANNOT_STORE_REGISTER ()*/); | |
4b9b3959 | 847 | #endif |
a2cf933a | 848 | #ifdef COFF_MAKE_MSYMBOL_SPECIAL |
a2cf933a EZ |
849 | fprintf_unfiltered (file, |
850 | "gdbarch_dump: %s # %s\n", | |
851 | "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)", | |
852 | XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym))); | |
7996bcec AC |
853 | fprintf_unfiltered (file, |
854 | "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n", | |
855 | (long) current_gdbarch->coff_make_msymbol_special | |
856 | /*COFF_MAKE_MSYMBOL_SPECIAL ()*/); | |
a2cf933a | 857 | #endif |
7996bcec AC |
858 | fprintf_unfiltered (file, |
859 | "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n", | |
860 | (long) current_gdbarch->construct_inferior_arguments); | |
13d01224 AC |
861 | #ifdef CONVERT_REGISTER_P |
862 | fprintf_unfiltered (file, | |
863 | "gdbarch_dump: %s # %s\n", | |
ff2e87ac AC |
864 | "CONVERT_REGISTER_P(regnum, type)", |
865 | XSTRING (CONVERT_REGISTER_P (regnum, type))); | |
7996bcec AC |
866 | fprintf_unfiltered (file, |
867 | "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n", | |
868 | (long) current_gdbarch->convert_register_p | |
869 | /*CONVERT_REGISTER_P ()*/); | |
13d01224 | 870 | #endif |
08e45a40 | 871 | #ifdef DECR_PC_AFTER_BREAK |
4b9b3959 | 872 | fprintf_unfiltered (file, |
08e45a40 AC |
873 | "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n", |
874 | XSTRING (DECR_PC_AFTER_BREAK)); | |
0aba1244 | 875 | fprintf_unfiltered (file, |
08e45a40 AC |
876 | "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", |
877 | (long) DECR_PC_AFTER_BREAK); | |
0aba1244 | 878 | #endif |
1e9f55d0 AC |
879 | #ifdef DEPRECATED_DO_REGISTERS_INFO_P |
880 | fprintf_unfiltered (file, | |
881 | "gdbarch_dump: %s # %s\n", | |
882 | "DEPRECATED_DO_REGISTERS_INFO_P()", | |
883 | XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ())); | |
884 | fprintf_unfiltered (file, | |
885 | "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n", | |
886 | DEPRECATED_DO_REGISTERS_INFO_P ()); | |
887 | #endif | |
903ad3a6 | 888 | #ifdef DEPRECATED_DO_REGISTERS_INFO |
903ad3a6 AC |
889 | fprintf_unfiltered (file, |
890 | "gdbarch_dump: %s # %s\n", | |
891 | "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)", | |
892 | XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs))); | |
7996bcec AC |
893 | fprintf_unfiltered (file, |
894 | "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n", | |
895 | (long) current_gdbarch->deprecated_do_registers_info | |
896 | /*DEPRECATED_DO_REGISTERS_INFO ()*/); | |
903ad3a6 | 897 | #endif |
6c0e89ed AC |
898 | #ifdef DEPRECATED_DUMMY_WRITE_SP_P |
899 | fprintf_unfiltered (file, | |
900 | "gdbarch_dump: %s # %s\n", | |
901 | "DEPRECATED_DUMMY_WRITE_SP_P()", | |
902 | XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ())); | |
903 | fprintf_unfiltered (file, | |
904 | "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n", | |
905 | DEPRECATED_DUMMY_WRITE_SP_P ()); | |
906 | #endif | |
907 | #ifdef DEPRECATED_DUMMY_WRITE_SP | |
6c0e89ed AC |
908 | fprintf_unfiltered (file, |
909 | "gdbarch_dump: %s # %s\n", | |
910 | "DEPRECATED_DUMMY_WRITE_SP(val)", | |
911 | XSTRING (DEPRECATED_DUMMY_WRITE_SP (val))); | |
7996bcec AC |
912 | fprintf_unfiltered (file, |
913 | "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n", | |
914 | (long) current_gdbarch->deprecated_dummy_write_sp | |
915 | /*DEPRECATED_DUMMY_WRITE_SP ()*/); | |
6c0e89ed | 916 | #endif |
26e9b323 | 917 | #ifdef DEPRECATED_EXTRACT_RETURN_VALUE |
26e9b323 AC |
918 | fprintf_unfiltered (file, |
919 | "gdbarch_dump: %s # %s\n", | |
920 | "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", | |
921 | XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); | |
7996bcec AC |
922 | fprintf_unfiltered (file, |
923 | "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n", | |
924 | (long) current_gdbarch->deprecated_extract_return_value | |
925 | /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/); | |
26e9b323 | 926 | #endif |
74055713 AC |
927 | #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P |
928 | fprintf_unfiltered (file, | |
929 | "gdbarch_dump: %s # %s\n", | |
930 | "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()", | |
931 | XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())); | |
932 | fprintf_unfiltered (file, | |
933 | "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n", | |
934 | DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()); | |
935 | #endif | |
936 | #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS | |
937 | fprintf_unfiltered (file, | |
938 | "gdbarch_dump: %s # %s\n", | |
939 | "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regcache)", | |
940 | XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regcache))); | |
941 | fprintf_unfiltered (file, | |
942 | "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n", | |
943 | (long) current_gdbarch->deprecated_extract_struct_value_address | |
944 | /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/); | |
945 | #endif | |
0ba6dca9 AC |
946 | #ifdef DEPRECATED_FP_REGNUM |
947 | fprintf_unfiltered (file, | |
948 | "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n", | |
949 | XSTRING (DEPRECATED_FP_REGNUM)); | |
950 | fprintf_unfiltered (file, | |
951 | "gdbarch_dump: DEPRECATED_FP_REGNUM = %d\n", | |
952 | DEPRECATED_FP_REGNUM); | |
953 | #endif | |
19772a2c AC |
954 | #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P |
955 | fprintf_unfiltered (file, | |
956 | "gdbarch_dump: %s # %s\n", | |
957 | "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()", | |
958 | XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ())); | |
959 | fprintf_unfiltered (file, | |
960 | "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() = %d\n", | |
961 | DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()); | |
962 | #endif | |
963 | #ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION | |
964 | fprintf_unfiltered (file, | |
965 | "gdbarch_dump: %s # %s\n", | |
966 | "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)", | |
967 | XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi))); | |
968 | fprintf_unfiltered (file, | |
969 | "gdbarch_dump: DEPRECATED_FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n", | |
970 | (long) current_gdbarch->deprecated_frameless_function_invocation | |
971 | /*DEPRECATED_FRAMELESS_FUNCTION_INVOCATION ()*/); | |
972 | #endif | |
42efa47a AC |
973 | #ifdef DEPRECATED_FRAME_ARGS_ADDRESS_P |
974 | fprintf_unfiltered (file, | |
975 | "gdbarch_dump: %s # %s\n", | |
976 | "DEPRECATED_FRAME_ARGS_ADDRESS_P()", | |
977 | XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS_P ())); | |
978 | fprintf_unfiltered (file, | |
979 | "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS_P() = %d\n", | |
980 | DEPRECATED_FRAME_ARGS_ADDRESS_P ()); | |
981 | #endif | |
982 | #ifdef DEPRECATED_FRAME_ARGS_ADDRESS | |
983 | fprintf_unfiltered (file, | |
984 | "gdbarch_dump: %s # %s\n", | |
985 | "DEPRECATED_FRAME_ARGS_ADDRESS(fi)", | |
986 | XSTRING (DEPRECATED_FRAME_ARGS_ADDRESS (fi))); | |
7996bcec AC |
987 | fprintf_unfiltered (file, |
988 | "gdbarch_dump: DEPRECATED_FRAME_ARGS_ADDRESS = <0x%08lx>\n", | |
989 | (long) current_gdbarch->deprecated_frame_args_address | |
990 | /*DEPRECATED_FRAME_ARGS_ADDRESS ()*/); | |
42efa47a | 991 | #endif |
618ce49f AC |
992 | #ifdef DEPRECATED_FRAME_CHAIN_P |
993 | fprintf_unfiltered (file, | |
994 | "gdbarch_dump: %s # %s\n", | |
995 | "DEPRECATED_FRAME_CHAIN_P()", | |
996 | XSTRING (DEPRECATED_FRAME_CHAIN_P ())); | |
997 | fprintf_unfiltered (file, | |
998 | "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n", | |
999 | DEPRECATED_FRAME_CHAIN_P ()); | |
1000 | #endif | |
1001 | #ifdef DEPRECATED_FRAME_CHAIN | |
1002 | fprintf_unfiltered (file, | |
1003 | "gdbarch_dump: %s # %s\n", | |
1004 | "DEPRECATED_FRAME_CHAIN(frame)", | |
1005 | XSTRING (DEPRECATED_FRAME_CHAIN (frame))); | |
7996bcec AC |
1006 | fprintf_unfiltered (file, |
1007 | "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n", | |
1008 | (long) current_gdbarch->deprecated_frame_chain | |
1009 | /*DEPRECATED_FRAME_CHAIN ()*/); | |
618ce49f AC |
1010 | #endif |
1011 | #ifdef DEPRECATED_FRAME_CHAIN_VALID_P | |
1012 | fprintf_unfiltered (file, | |
1013 | "gdbarch_dump: %s # %s\n", | |
1014 | "DEPRECATED_FRAME_CHAIN_VALID_P()", | |
1015 | XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ())); | |
1016 | fprintf_unfiltered (file, | |
1017 | "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n", | |
1018 | DEPRECATED_FRAME_CHAIN_VALID_P ()); | |
1019 | #endif | |
1020 | #ifdef DEPRECATED_FRAME_CHAIN_VALID | |
1021 | fprintf_unfiltered (file, | |
1022 | "gdbarch_dump: %s # %s\n", | |
1023 | "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)", | |
1024 | XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe))); | |
7996bcec AC |
1025 | fprintf_unfiltered (file, |
1026 | "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n", | |
1027 | (long) current_gdbarch->deprecated_frame_chain_valid | |
1028 | /*DEPRECATED_FRAME_CHAIN_VALID ()*/); | |
618ce49f | 1029 | #endif |
f30ee0bc AC |
1030 | #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P |
1031 | fprintf_unfiltered (file, | |
1032 | "gdbarch_dump: %s # %s\n", | |
1033 | "DEPRECATED_FRAME_INIT_SAVED_REGS_P()", | |
1034 | XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ())); | |
1035 | fprintf_unfiltered (file, | |
1036 | "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n", | |
1037 | DEPRECATED_FRAME_INIT_SAVED_REGS_P ()); | |
1038 | #endif | |
1039 | #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS | |
f30ee0bc AC |
1040 | fprintf_unfiltered (file, |
1041 | "gdbarch_dump: %s # %s\n", | |
1042 | "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)", | |
1043 | XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame))); | |
7996bcec AC |
1044 | fprintf_unfiltered (file, |
1045 | "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n", | |
1046 | (long) current_gdbarch->deprecated_frame_init_saved_regs | |
1047 | /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/); | |
f30ee0bc | 1048 | #endif |
42efa47a AC |
1049 | #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS_P |
1050 | fprintf_unfiltered (file, | |
1051 | "gdbarch_dump: %s # %s\n", | |
1052 | "DEPRECATED_FRAME_LOCALS_ADDRESS_P()", | |
1053 | XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS_P ())); | |
1054 | fprintf_unfiltered (file, | |
1055 | "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS_P() = %d\n", | |
1056 | DEPRECATED_FRAME_LOCALS_ADDRESS_P ()); | |
1057 | #endif | |
1058 | #ifdef DEPRECATED_FRAME_LOCALS_ADDRESS | |
1059 | fprintf_unfiltered (file, | |
1060 | "gdbarch_dump: %s # %s\n", | |
1061 | "DEPRECATED_FRAME_LOCALS_ADDRESS(fi)", | |
1062 | XSTRING (DEPRECATED_FRAME_LOCALS_ADDRESS (fi))); | |
7996bcec AC |
1063 | fprintf_unfiltered (file, |
1064 | "gdbarch_dump: DEPRECATED_FRAME_LOCALS_ADDRESS = <0x%08lx>\n", | |
1065 | (long) current_gdbarch->deprecated_frame_locals_address | |
1066 | /*DEPRECATED_FRAME_LOCALS_ADDRESS ()*/); | |
42efa47a | 1067 | #endif |
8bedc050 AC |
1068 | #ifdef DEPRECATED_FRAME_SAVED_PC_P |
1069 | fprintf_unfiltered (file, | |
1070 | "gdbarch_dump: %s # %s\n", | |
1071 | "DEPRECATED_FRAME_SAVED_PC_P()", | |
1072 | XSTRING (DEPRECATED_FRAME_SAVED_PC_P ())); | |
1073 | fprintf_unfiltered (file, | |
1074 | "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n", | |
1075 | DEPRECATED_FRAME_SAVED_PC_P ()); | |
1076 | #endif | |
1077 | #ifdef DEPRECATED_FRAME_SAVED_PC | |
1078 | fprintf_unfiltered (file, | |
1079 | "gdbarch_dump: %s # %s\n", | |
1080 | "DEPRECATED_FRAME_SAVED_PC(fi)", | |
1081 | XSTRING (DEPRECATED_FRAME_SAVED_PC (fi))); | |
7996bcec AC |
1082 | fprintf_unfiltered (file, |
1083 | "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n", | |
1084 | (long) current_gdbarch->deprecated_frame_saved_pc | |
1085 | /*DEPRECATED_FRAME_SAVED_PC ()*/); | |
8bedc050 | 1086 | #endif |
129c1cd6 AC |
1087 | #ifdef DEPRECATED_GET_SAVED_REGISTER_P |
1088 | fprintf_unfiltered (file, | |
1089 | "gdbarch_dump: %s # %s\n", | |
1090 | "DEPRECATED_GET_SAVED_REGISTER_P()", | |
1091 | XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ())); | |
1092 | fprintf_unfiltered (file, | |
1093 | "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n", | |
1094 | DEPRECATED_GET_SAVED_REGISTER_P ()); | |
1095 | #endif | |
1096 | #ifdef DEPRECATED_GET_SAVED_REGISTER | |
129c1cd6 AC |
1097 | fprintf_unfiltered (file, |
1098 | "gdbarch_dump: %s # %s\n", | |
1099 | "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)", | |
1100 | XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval))); | |
7996bcec AC |
1101 | fprintf_unfiltered (file, |
1102 | "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n", | |
1103 | (long) current_gdbarch->deprecated_get_saved_register | |
1104 | /*DEPRECATED_GET_SAVED_REGISTER ()*/); | |
129c1cd6 | 1105 | #endif |
e9582e71 AC |
1106 | #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P |
1107 | fprintf_unfiltered (file, | |
1108 | "gdbarch_dump: %s # %s\n", | |
1109 | "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()", | |
1110 | XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ())); | |
1111 | fprintf_unfiltered (file, | |
1112 | "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n", | |
1113 | DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()); | |
1114 | #endif | |
1115 | #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO | |
e9582e71 AC |
1116 | fprintf_unfiltered (file, |
1117 | "gdbarch_dump: %s # %s\n", | |
1118 | "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)", | |
1119 | XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame))); | |
7996bcec AC |
1120 | fprintf_unfiltered (file, |
1121 | "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n", | |
1122 | (long) current_gdbarch->deprecated_init_extra_frame_info | |
1123 | /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/); | |
e9582e71 | 1124 | #endif |
a5afb99f AC |
1125 | #ifdef DEPRECATED_INIT_FRAME_PC_P |
1126 | fprintf_unfiltered (file, | |
1127 | "gdbarch_dump: %s # %s\n", | |
1128 | "DEPRECATED_INIT_FRAME_PC_P()", | |
1129 | XSTRING (DEPRECATED_INIT_FRAME_PC_P ())); | |
1130 | fprintf_unfiltered (file, | |
1131 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n", | |
1132 | DEPRECATED_INIT_FRAME_PC_P ()); | |
1133 | #endif | |
1134 | #ifdef DEPRECATED_INIT_FRAME_PC | |
1135 | fprintf_unfiltered (file, | |
1136 | "gdbarch_dump: %s # %s\n", | |
1137 | "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)", | |
1138 | XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev))); | |
7996bcec AC |
1139 | fprintf_unfiltered (file, |
1140 | "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n", | |
1141 | (long) current_gdbarch->deprecated_init_frame_pc | |
1142 | /*DEPRECATED_INIT_FRAME_PC ()*/); | |
a5afb99f | 1143 | #endif |
749b82f6 AC |
1144 | #ifdef DEPRECATED_POP_FRAME_P |
1145 | fprintf_unfiltered (file, | |
1146 | "gdbarch_dump: %s # %s\n", | |
1147 | "DEPRECATED_POP_FRAME_P()", | |
1148 | XSTRING (DEPRECATED_POP_FRAME_P ())); | |
1149 | fprintf_unfiltered (file, | |
1150 | "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n", | |
1151 | DEPRECATED_POP_FRAME_P ()); | |
1152 | #endif | |
1153 | #ifdef DEPRECATED_POP_FRAME | |
749b82f6 AC |
1154 | fprintf_unfiltered (file, |
1155 | "gdbarch_dump: %s # %s\n", | |
1156 | "DEPRECATED_POP_FRAME(-)", | |
1157 | XSTRING (DEPRECATED_POP_FRAME (-))); | |
7996bcec AC |
1158 | fprintf_unfiltered (file, |
1159 | "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n", | |
1160 | (long) current_gdbarch->deprecated_pop_frame | |
1161 | /*DEPRECATED_POP_FRAME ()*/); | |
749b82f6 | 1162 | #endif |
b81774d8 AC |
1163 | #ifdef DEPRECATED_PUSH_ARGUMENTS_P |
1164 | fprintf_unfiltered (file, | |
1165 | "gdbarch_dump: %s # %s\n", | |
1166 | "DEPRECATED_PUSH_ARGUMENTS_P()", | |
1167 | XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ())); | |
1168 | fprintf_unfiltered (file, | |
1169 | "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n", | |
1170 | DEPRECATED_PUSH_ARGUMENTS_P ()); | |
1171 | #endif | |
1172 | #ifdef DEPRECATED_PUSH_ARGUMENTS | |
1173 | fprintf_unfiltered (file, | |
1174 | "gdbarch_dump: %s # %s\n", | |
1175 | "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)", | |
1176 | XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr))); | |
7996bcec AC |
1177 | fprintf_unfiltered (file, |
1178 | "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n", | |
1179 | (long) current_gdbarch->deprecated_push_arguments | |
1180 | /*DEPRECATED_PUSH_ARGUMENTS ()*/); | |
b81774d8 | 1181 | #endif |
28f617b3 AC |
1182 | #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P |
1183 | fprintf_unfiltered (file, | |
1184 | "gdbarch_dump: %s # %s\n", | |
1185 | "DEPRECATED_PUSH_RETURN_ADDRESS_P()", | |
1186 | XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ())); | |
1187 | fprintf_unfiltered (file, | |
1188 | "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n", | |
1189 | DEPRECATED_PUSH_RETURN_ADDRESS_P ()); | |
1190 | #endif | |
1191 | #ifdef DEPRECATED_PUSH_RETURN_ADDRESS | |
1192 | fprintf_unfiltered (file, | |
1193 | "gdbarch_dump: %s # %s\n", | |
1194 | "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)", | |
1195 | XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp))); | |
7996bcec AC |
1196 | fprintf_unfiltered (file, |
1197 | "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n", | |
1198 | (long) current_gdbarch->deprecated_push_return_address | |
1199 | /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/); | |
28f617b3 | 1200 | #endif |
62700349 AC |
1201 | #ifdef DEPRECATED_REGISTER_BYTE_P |
1202 | fprintf_unfiltered (file, | |
1203 | "gdbarch_dump: %s # %s\n", | |
1204 | "DEPRECATED_REGISTER_BYTE_P()", | |
1205 | XSTRING (DEPRECATED_REGISTER_BYTE_P ())); | |
1206 | fprintf_unfiltered (file, | |
1207 | "gdbarch_dump: DEPRECATED_REGISTER_BYTE_P() = %d\n", | |
1208 | DEPRECATED_REGISTER_BYTE_P ()); | |
1209 | #endif | |
1210 | #ifdef DEPRECATED_REGISTER_BYTE | |
1211 | fprintf_unfiltered (file, | |
1212 | "gdbarch_dump: %s # %s\n", | |
1213 | "DEPRECATED_REGISTER_BYTE(reg_nr)", | |
1214 | XSTRING (DEPRECATED_REGISTER_BYTE (reg_nr))); | |
1215 | fprintf_unfiltered (file, | |
1216 | "gdbarch_dump: DEPRECATED_REGISTER_BYTE = <0x%08lx>\n", | |
1217 | (long) current_gdbarch->deprecated_register_byte | |
1218 | /*DEPRECATED_REGISTER_BYTE ()*/); | |
1219 | #endif | |
b8b527c5 AC |
1220 | #ifdef DEPRECATED_REGISTER_BYTES |
1221 | fprintf_unfiltered (file, | |
1222 | "gdbarch_dump: DEPRECATED_REGISTER_BYTES # %s\n", | |
1223 | XSTRING (DEPRECATED_REGISTER_BYTES)); | |
1224 | fprintf_unfiltered (file, | |
1225 | "gdbarch_dump: DEPRECATED_REGISTER_BYTES = %d\n", | |
1226 | DEPRECATED_REGISTER_BYTES); | |
1227 | #endif | |
12c266ea AC |
1228 | #ifdef DEPRECATED_REGISTER_RAW_SIZE_P |
1229 | fprintf_unfiltered (file, | |
1230 | "gdbarch_dump: %s # %s\n", | |
1231 | "DEPRECATED_REGISTER_RAW_SIZE_P()", | |
1232 | XSTRING (DEPRECATED_REGISTER_RAW_SIZE_P ())); | |
1233 | fprintf_unfiltered (file, | |
1234 | "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE_P() = %d\n", | |
1235 | DEPRECATED_REGISTER_RAW_SIZE_P ()); | |
1236 | #endif | |
1237 | #ifdef DEPRECATED_REGISTER_RAW_SIZE | |
1238 | fprintf_unfiltered (file, | |
1239 | "gdbarch_dump: %s # %s\n", | |
1240 | "DEPRECATED_REGISTER_RAW_SIZE(reg_nr)", | |
1241 | XSTRING (DEPRECATED_REGISTER_RAW_SIZE (reg_nr))); | |
1242 | fprintf_unfiltered (file, | |
1243 | "gdbarch_dump: DEPRECATED_REGISTER_RAW_SIZE = <0x%08lx>\n", | |
1244 | (long) current_gdbarch->deprecated_register_raw_size | |
1245 | /*DEPRECATED_REGISTER_RAW_SIZE ()*/); | |
1246 | #endif | |
b1e29e33 AC |
1247 | #ifdef DEPRECATED_REGISTER_SIZE |
1248 | fprintf_unfiltered (file, | |
1249 | "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n", | |
1250 | XSTRING (DEPRECATED_REGISTER_SIZE)); | |
1251 | fprintf_unfiltered (file, | |
1252 | "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n", | |
1253 | DEPRECATED_REGISTER_SIZE); | |
1254 | #endif | |
f30992d4 AC |
1255 | #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE_P |
1256 | fprintf_unfiltered (file, | |
1257 | "gdbarch_dump: %s # %s\n", | |
1258 | "DEPRECATED_REGISTER_VIRTUAL_SIZE_P()", | |
1259 | XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE_P ())); | |
1260 | fprintf_unfiltered (file, | |
1261 | "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE_P() = %d\n", | |
1262 | DEPRECATED_REGISTER_VIRTUAL_SIZE_P ()); | |
1263 | #endif | |
1264 | #ifdef DEPRECATED_REGISTER_VIRTUAL_SIZE | |
1265 | fprintf_unfiltered (file, | |
1266 | "gdbarch_dump: %s # %s\n", | |
1267 | "DEPRECATED_REGISTER_VIRTUAL_SIZE(reg_nr)", | |
1268 | XSTRING (DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr))); | |
1269 | fprintf_unfiltered (file, | |
1270 | "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_SIZE = <0x%08lx>\n", | |
1271 | (long) current_gdbarch->deprecated_register_virtual_size | |
1272 | /*DEPRECATED_REGISTER_VIRTUAL_SIZE ()*/); | |
1273 | #endif | |
2e092625 AC |
1274 | #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE_P |
1275 | fprintf_unfiltered (file, | |
1276 | "gdbarch_dump: %s # %s\n", | |
1277 | "DEPRECATED_REGISTER_VIRTUAL_TYPE_P()", | |
1278 | XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE_P ())); | |
1279 | fprintf_unfiltered (file, | |
1280 | "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE_P() = %d\n", | |
1281 | DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()); | |
1282 | #endif | |
1283 | #ifdef DEPRECATED_REGISTER_VIRTUAL_TYPE | |
1284 | fprintf_unfiltered (file, | |
1285 | "gdbarch_dump: %s # %s\n", | |
1286 | "DEPRECATED_REGISTER_VIRTUAL_TYPE(reg_nr)", | |
1287 | XSTRING (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr))); | |
1288 | fprintf_unfiltered (file, | |
1289 | "gdbarch_dump: DEPRECATED_REGISTER_VIRTUAL_TYPE = <0x%08lx>\n", | |
1290 | (long) current_gdbarch->deprecated_register_virtual_type | |
1291 | /*DEPRECATED_REGISTER_VIRTUAL_TYPE ()*/); | |
1292 | #endif | |
88d89dbb MK |
1293 | #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR_P |
1294 | fprintf_unfiltered (file, | |
1295 | "gdbarch_dump: %s # %s\n", | |
1296 | "DEPRECATED_REG_STRUCT_HAS_ADDR_P()", | |
1297 | XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR_P ())); | |
1298 | fprintf_unfiltered (file, | |
1299 | "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR_P() = %d\n", | |
1300 | DEPRECATED_REG_STRUCT_HAS_ADDR_P ()); | |
1301 | #endif | |
1302 | #ifdef DEPRECATED_REG_STRUCT_HAS_ADDR | |
1303 | fprintf_unfiltered (file, | |
1304 | "gdbarch_dump: %s # %s\n", | |
1305 | "DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type)", | |
1306 | XSTRING (DEPRECATED_REG_STRUCT_HAS_ADDR (gcc_p, type))); | |
1307 | fprintf_unfiltered (file, | |
1308 | "gdbarch_dump: DEPRECATED_REG_STRUCT_HAS_ADDR = <0x%08lx>\n", | |
1309 | (long) current_gdbarch->deprecated_reg_struct_has_addr | |
1310 | /*DEPRECATED_REG_STRUCT_HAS_ADDR ()*/); | |
1311 | #endif | |
6913c89a AC |
1312 | #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P |
1313 | fprintf_unfiltered (file, | |
1314 | "gdbarch_dump: %s # %s\n", | |
1315 | "DEPRECATED_SAVED_PC_AFTER_CALL_P()", | |
1316 | XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ())); | |
1317 | fprintf_unfiltered (file, | |
1318 | "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n", | |
1319 | DEPRECATED_SAVED_PC_AFTER_CALL_P ()); | |
1320 | #endif | |
1321 | #ifdef DEPRECATED_SAVED_PC_AFTER_CALL | |
1322 | fprintf_unfiltered (file, | |
1323 | "gdbarch_dump: %s # %s\n", | |
1324 | "DEPRECATED_SAVED_PC_AFTER_CALL(frame)", | |
1325 | XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame))); | |
7996bcec AC |
1326 | fprintf_unfiltered (file, |
1327 | "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n", | |
1328 | (long) current_gdbarch->deprecated_saved_pc_after_call | |
1329 | /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/); | |
6913c89a | 1330 | #endif |
a59fe496 AC |
1331 | #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS_P |
1332 | fprintf_unfiltered (file, | |
1333 | "gdbarch_dump: %s # %s\n", | |
1334 | "DEPRECATED_SAVE_DUMMY_FRAME_TOS_P()", | |
1335 | XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ())); | |
1336 | fprintf_unfiltered (file, | |
1337 | "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS_P() = %d\n", | |
1338 | DEPRECATED_SAVE_DUMMY_FRAME_TOS_P ()); | |
1339 | #endif | |
1340 | #ifdef DEPRECATED_SAVE_DUMMY_FRAME_TOS | |
a59fe496 AC |
1341 | fprintf_unfiltered (file, |
1342 | "gdbarch_dump: %s # %s\n", | |
1343 | "DEPRECATED_SAVE_DUMMY_FRAME_TOS(sp)", | |
1344 | XSTRING (DEPRECATED_SAVE_DUMMY_FRAME_TOS (sp))); | |
7996bcec AC |
1345 | fprintf_unfiltered (file, |
1346 | "gdbarch_dump: DEPRECATED_SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n", | |
1347 | (long) current_gdbarch->deprecated_save_dummy_frame_tos | |
1348 | /*DEPRECATED_SAVE_DUMMY_FRAME_TOS ()*/); | |
a59fe496 | 1349 | #endif |
f27dd7fd AC |
1350 | #ifdef DEPRECATED_STACK_ALIGN_P |
1351 | fprintf_unfiltered (file, | |
1352 | "gdbarch_dump: %s # %s\n", | |
1353 | "DEPRECATED_STACK_ALIGN_P()", | |
1354 | XSTRING (DEPRECATED_STACK_ALIGN_P ())); | |
1355 | fprintf_unfiltered (file, | |
1356 | "gdbarch_dump: DEPRECATED_STACK_ALIGN_P() = %d\n", | |
1357 | DEPRECATED_STACK_ALIGN_P ()); | |
1358 | #endif | |
1359 | #ifdef DEPRECATED_STACK_ALIGN | |
1360 | fprintf_unfiltered (file, | |
1361 | "gdbarch_dump: %s # %s\n", | |
1362 | "DEPRECATED_STACK_ALIGN(sp)", | |
1363 | XSTRING (DEPRECATED_STACK_ALIGN (sp))); | |
1364 | fprintf_unfiltered (file, | |
1365 | "gdbarch_dump: DEPRECATED_STACK_ALIGN = <0x%08lx>\n", | |
1366 | (long) current_gdbarch->deprecated_stack_align | |
1367 | /*DEPRECATED_STACK_ALIGN ()*/); | |
1368 | #endif | |
ebba8386 | 1369 | #ifdef DEPRECATED_STORE_RETURN_VALUE |
ebba8386 AC |
1370 | fprintf_unfiltered (file, |
1371 | "gdbarch_dump: %s # %s\n", | |
1372 | "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)", | |
1373 | XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf))); | |
7996bcec AC |
1374 | fprintf_unfiltered (file, |
1375 | "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n", | |
1376 | (long) current_gdbarch->deprecated_store_return_value | |
1377 | /*DEPRECATED_STORE_RETURN_VALUE ()*/); | |
ebba8386 | 1378 | #endif |
4183d812 AC |
1379 | #ifdef DEPRECATED_STORE_STRUCT_RETURN_P |
1380 | fprintf_unfiltered (file, | |
1381 | "gdbarch_dump: %s # %s\n", | |
1382 | "DEPRECATED_STORE_STRUCT_RETURN_P()", | |
1383 | XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ())); | |
1384 | fprintf_unfiltered (file, | |
1385 | "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n", | |
1386 | DEPRECATED_STORE_STRUCT_RETURN_P ()); | |
1387 | #endif | |
1388 | #ifdef DEPRECATED_STORE_STRUCT_RETURN | |
4183d812 AC |
1389 | fprintf_unfiltered (file, |
1390 | "gdbarch_dump: %s # %s\n", | |
1391 | "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)", | |
1392 | XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp))); | |
7996bcec AC |
1393 | fprintf_unfiltered (file, |
1394 | "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n", | |
1395 | (long) current_gdbarch->deprecated_store_struct_return | |
1396 | /*DEPRECATED_STORE_STRUCT_RETURN ()*/); | |
4183d812 | 1397 | #endif |
0ba6dca9 AC |
1398 | #ifdef DEPRECATED_TARGET_READ_FP_P |
1399 | fprintf_unfiltered (file, | |
1400 | "gdbarch_dump: %s # %s\n", | |
1401 | "DEPRECATED_TARGET_READ_FP_P()", | |
1402 | XSTRING (DEPRECATED_TARGET_READ_FP_P ())); | |
1403 | fprintf_unfiltered (file, | |
1404 | "gdbarch_dump: DEPRECATED_TARGET_READ_FP_P() = %d\n", | |
1405 | DEPRECATED_TARGET_READ_FP_P ()); | |
1406 | #endif | |
1407 | #ifdef DEPRECATED_TARGET_READ_FP | |
1408 | fprintf_unfiltered (file, | |
1409 | "gdbarch_dump: %s # %s\n", | |
1410 | "DEPRECATED_TARGET_READ_FP()", | |
1411 | XSTRING (DEPRECATED_TARGET_READ_FP ())); | |
7996bcec AC |
1412 | fprintf_unfiltered (file, |
1413 | "gdbarch_dump: DEPRECATED_TARGET_READ_FP = <0x%08lx>\n", | |
1414 | (long) current_gdbarch->deprecated_target_read_fp | |
1415 | /*DEPRECATED_TARGET_READ_FP ()*/); | |
0ba6dca9 | 1416 | #endif |
08e45a40 | 1417 | #ifdef DWARF2_REG_TO_REGNUM |
4b9b3959 | 1418 | fprintf_unfiltered (file, |
08e45a40 AC |
1419 | "gdbarch_dump: %s # %s\n", |
1420 | "DWARF2_REG_TO_REGNUM(dwarf2_regnr)", | |
1421 | XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr))); | |
7996bcec AC |
1422 | fprintf_unfiltered (file, |
1423 | "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n", | |
1424 | (long) current_gdbarch->dwarf2_reg_to_regnum | |
1425 | /*DWARF2_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1426 | #endif |
08e45a40 | 1427 | #ifdef DWARF_REG_TO_REGNUM |
88c72b7d AC |
1428 | fprintf_unfiltered (file, |
1429 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1430 | "DWARF_REG_TO_REGNUM(dwarf_regnr)", |
1431 | XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr))); | |
7996bcec AC |
1432 | fprintf_unfiltered (file, |
1433 | "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n", | |
1434 | (long) current_gdbarch->dwarf_reg_to_regnum | |
1435 | /*DWARF_REG_TO_REGNUM ()*/); | |
88c72b7d AC |
1436 | #endif |
1437 | #ifdef ECOFF_REG_TO_REGNUM | |
1438 | fprintf_unfiltered (file, | |
1439 | "gdbarch_dump: %s # %s\n", | |
1440 | "ECOFF_REG_TO_REGNUM(ecoff_regnr)", | |
1441 | XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr))); | |
7996bcec AC |
1442 | fprintf_unfiltered (file, |
1443 | "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n", | |
1444 | (long) current_gdbarch->ecoff_reg_to_regnum | |
1445 | /*ECOFF_REG_TO_REGNUM ()*/); | |
88c72b7d | 1446 | #endif |
a2cf933a | 1447 | #ifdef ELF_MAKE_MSYMBOL_SPECIAL |
a2cf933a EZ |
1448 | fprintf_unfiltered (file, |
1449 | "gdbarch_dump: %s # %s\n", | |
1450 | "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)", | |
1451 | XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym))); | |
7996bcec AC |
1452 | fprintf_unfiltered (file, |
1453 | "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n", | |
1454 | (long) current_gdbarch->elf_make_msymbol_special | |
1455 | /*ELF_MAKE_MSYMBOL_SPECIAL ()*/); | |
a2cf933a | 1456 | #endif |
049ee0e4 | 1457 | #ifdef EXTRACT_RETURN_VALUE |
049ee0e4 AC |
1458 | fprintf_unfiltered (file, |
1459 | "gdbarch_dump: %s # %s\n", | |
1460 | "EXTRACT_RETURN_VALUE(type, regcache, valbuf)", | |
1461 | XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf))); | |
7996bcec AC |
1462 | fprintf_unfiltered (file, |
1463 | "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n", | |
1464 | (long) current_gdbarch->extract_return_value | |
1465 | /*EXTRACT_RETURN_VALUE ()*/); | |
049ee0e4 | 1466 | #endif |
143985b7 AF |
1467 | #ifdef FETCH_POINTER_ARGUMENT_P |
1468 | fprintf_unfiltered (file, | |
1469 | "gdbarch_dump: %s # %s\n", | |
1470 | "FETCH_POINTER_ARGUMENT_P()", | |
1471 | XSTRING (FETCH_POINTER_ARGUMENT_P ())); | |
1472 | fprintf_unfiltered (file, | |
1473 | "gdbarch_dump: FETCH_POINTER_ARGUMENT_P() = %d\n", | |
1474 | FETCH_POINTER_ARGUMENT_P ()); | |
1475 | #endif | |
1476 | #ifdef FETCH_POINTER_ARGUMENT | |
1477 | fprintf_unfiltered (file, | |
1478 | "gdbarch_dump: %s # %s\n", | |
1479 | "FETCH_POINTER_ARGUMENT(frame, argi, type)", | |
1480 | XSTRING (FETCH_POINTER_ARGUMENT (frame, argi, type))); | |
7996bcec AC |
1481 | fprintf_unfiltered (file, |
1482 | "gdbarch_dump: FETCH_POINTER_ARGUMENT = <0x%08lx>\n", | |
1483 | (long) current_gdbarch->fetch_pointer_argument | |
1484 | /*FETCH_POINTER_ARGUMENT ()*/); | |
143985b7 | 1485 | #endif |
08e45a40 | 1486 | #ifdef FP0_REGNUM |
4b9b3959 | 1487 | fprintf_unfiltered (file, |
08e45a40 AC |
1488 | "gdbarch_dump: FP0_REGNUM # %s\n", |
1489 | XSTRING (FP0_REGNUM)); | |
1490 | fprintf_unfiltered (file, | |
06b25f14 AC |
1491 | "gdbarch_dump: FP0_REGNUM = %d\n", |
1492 | FP0_REGNUM); | |
4b9b3959 | 1493 | #endif |
08e45a40 | 1494 | #ifdef FRAME_ARGS_SKIP |
4b9b3959 | 1495 | fprintf_unfiltered (file, |
08e45a40 AC |
1496 | "gdbarch_dump: FRAME_ARGS_SKIP # %s\n", |
1497 | XSTRING (FRAME_ARGS_SKIP)); | |
4b9b3959 | 1498 | fprintf_unfiltered (file, |
08e45a40 AC |
1499 | "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n", |
1500 | (long) FRAME_ARGS_SKIP); | |
4b9b3959 | 1501 | #endif |
983a287a AC |
1502 | #ifdef FRAME_NUM_ARGS_P |
1503 | fprintf_unfiltered (file, | |
1504 | "gdbarch_dump: %s # %s\n", | |
1505 | "FRAME_NUM_ARGS_P()", | |
1506 | XSTRING (FRAME_NUM_ARGS_P ())); | |
1507 | fprintf_unfiltered (file, | |
1508 | "gdbarch_dump: FRAME_NUM_ARGS_P() = %d\n", | |
1509 | FRAME_NUM_ARGS_P ()); | |
1510 | #endif | |
08e45a40 | 1511 | #ifdef FRAME_NUM_ARGS |
01fb7433 AC |
1512 | fprintf_unfiltered (file, |
1513 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1514 | "FRAME_NUM_ARGS(frame)", |
1515 | XSTRING (FRAME_NUM_ARGS (frame))); | |
7996bcec AC |
1516 | fprintf_unfiltered (file, |
1517 | "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n", | |
1518 | (long) current_gdbarch->frame_num_args | |
1519 | /*FRAME_NUM_ARGS ()*/); | |
01fb7433 | 1520 | #endif |
8b148df9 AC |
1521 | #ifdef FRAME_RED_ZONE_SIZE |
1522 | fprintf_unfiltered (file, | |
1523 | "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n", | |
1524 | XSTRING (FRAME_RED_ZONE_SIZE)); | |
1525 | fprintf_unfiltered (file, | |
1526 | "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n", | |
1527 | FRAME_RED_ZONE_SIZE); | |
1528 | #endif | |
08e45a40 | 1529 | #ifdef FUNCTION_START_OFFSET |
4b9b3959 | 1530 | fprintf_unfiltered (file, |
08e45a40 AC |
1531 | "gdbarch_dump: FUNCTION_START_OFFSET # %s\n", |
1532 | XSTRING (FUNCTION_START_OFFSET)); | |
4b9b3959 | 1533 | fprintf_unfiltered (file, |
08e45a40 AC |
1534 | "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", |
1535 | (long) FUNCTION_START_OFFSET); | |
4b9b3959 | 1536 | #endif |
1e9f55d0 AC |
1537 | #ifdef GET_LONGJMP_TARGET_P |
1538 | fprintf_unfiltered (file, | |
1539 | "gdbarch_dump: %s # %s\n", | |
1540 | "GET_LONGJMP_TARGET_P()", | |
1541 | XSTRING (GET_LONGJMP_TARGET_P ())); | |
1542 | fprintf_unfiltered (file, | |
1543 | "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n", | |
1544 | GET_LONGJMP_TARGET_P ()); | |
1545 | #endif | |
9df628e0 RE |
1546 | #ifdef GET_LONGJMP_TARGET |
1547 | fprintf_unfiltered (file, | |
1548 | "gdbarch_dump: %s # %s\n", | |
1549 | "GET_LONGJMP_TARGET(pc)", | |
1550 | XSTRING (GET_LONGJMP_TARGET (pc))); | |
7996bcec AC |
1551 | fprintf_unfiltered (file, |
1552 | "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n", | |
1553 | (long) current_gdbarch->get_longjmp_target | |
1554 | /*GET_LONGJMP_TARGET ()*/); | |
9df628e0 | 1555 | #endif |
967c0d83 | 1556 | #ifdef HAVE_NONSTEPPABLE_WATCHPOINT |
f74fa174 | 1557 | fprintf_unfiltered (file, |
967c0d83 MM |
1558 | "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n", |
1559 | XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT)); | |
f74fa174 | 1560 | fprintf_unfiltered (file, |
967c0d83 MM |
1561 | "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n", |
1562 | HAVE_NONSTEPPABLE_WATCHPOINT); | |
f74fa174 | 1563 | #endif |
08e45a40 | 1564 | #ifdef INNER_THAN |
10312cc4 AC |
1565 | fprintf_unfiltered (file, |
1566 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1567 | "INNER_THAN(lhs, rhs)", |
1568 | XSTRING (INNER_THAN (lhs, rhs))); | |
7996bcec AC |
1569 | fprintf_unfiltered (file, |
1570 | "gdbarch_dump: INNER_THAN = <0x%08lx>\n", | |
1571 | (long) current_gdbarch->inner_than | |
1572 | /*INNER_THAN ()*/); | |
10312cc4 | 1573 | #endif |
1e9f55d0 AC |
1574 | #ifdef INTEGER_TO_ADDRESS_P |
1575 | fprintf_unfiltered (file, | |
1576 | "gdbarch_dump: %s # %s\n", | |
1577 | "INTEGER_TO_ADDRESS_P()", | |
1578 | XSTRING (INTEGER_TO_ADDRESS_P ())); | |
1579 | fprintf_unfiltered (file, | |
1580 | "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n", | |
1581 | INTEGER_TO_ADDRESS_P ()); | |
1582 | #endif | |
fc0c74b1 AC |
1583 | #ifdef INTEGER_TO_ADDRESS |
1584 | fprintf_unfiltered (file, | |
1585 | "gdbarch_dump: %s # %s\n", | |
1586 | "INTEGER_TO_ADDRESS(type, buf)", | |
1587 | XSTRING (INTEGER_TO_ADDRESS (type, buf))); | |
7996bcec AC |
1588 | fprintf_unfiltered (file, |
1589 | "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n", | |
1590 | (long) current_gdbarch->integer_to_address | |
1591 | /*INTEGER_TO_ADDRESS ()*/); | |
fc0c74b1 | 1592 | #endif |
5e74b15c RE |
1593 | #ifdef IN_SOLIB_CALL_TRAMPOLINE |
1594 | fprintf_unfiltered (file, | |
1595 | "gdbarch_dump: %s # %s\n", | |
1596 | "IN_SOLIB_CALL_TRAMPOLINE(pc, name)", | |
1597 | XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name))); | |
7996bcec AC |
1598 | fprintf_unfiltered (file, |
1599 | "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n", | |
1600 | (long) current_gdbarch->in_solib_call_trampoline | |
1601 | /*IN_SOLIB_CALL_TRAMPOLINE ()*/); | |
5e74b15c | 1602 | #endif |
d50355b6 MS |
1603 | #ifdef IN_SOLIB_RETURN_TRAMPOLINE |
1604 | fprintf_unfiltered (file, | |
1605 | "gdbarch_dump: %s # %s\n", | |
1606 | "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)", | |
1607 | XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name))); | |
7996bcec AC |
1608 | fprintf_unfiltered (file, |
1609 | "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n", | |
1610 | (long) current_gdbarch->in_solib_return_trampoline | |
1611 | /*IN_SOLIB_RETURN_TRAMPOLINE ()*/); | |
d50355b6 | 1612 | #endif |
08e45a40 | 1613 | #ifdef MEMORY_INSERT_BREAKPOINT |
4b9b3959 AC |
1614 | fprintf_unfiltered (file, |
1615 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1616 | "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)", |
1617 | XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache))); | |
7996bcec AC |
1618 | fprintf_unfiltered (file, |
1619 | "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n", | |
1620 | (long) current_gdbarch->memory_insert_breakpoint | |
1621 | /*MEMORY_INSERT_BREAKPOINT ()*/); | |
4b9b3959 | 1622 | #endif |
08e45a40 | 1623 | #ifdef MEMORY_REMOVE_BREAKPOINT |
4b9b3959 AC |
1624 | fprintf_unfiltered (file, |
1625 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1626 | "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)", |
1627 | XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache))); | |
7996bcec AC |
1628 | fprintf_unfiltered (file, |
1629 | "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n", | |
1630 | (long) current_gdbarch->memory_remove_breakpoint | |
1631 | /*MEMORY_REMOVE_BREAKPOINT ()*/); | |
4b9b3959 | 1632 | #endif |
5720643c JB |
1633 | #ifdef NAME_OF_MALLOC |
1634 | fprintf_unfiltered (file, | |
1635 | "gdbarch_dump: NAME_OF_MALLOC # %s\n", | |
1636 | XSTRING (NAME_OF_MALLOC)); | |
1637 | fprintf_unfiltered (file, | |
31deffe5 AC |
1638 | "gdbarch_dump: NAME_OF_MALLOC = %s\n", |
1639 | NAME_OF_MALLOC); | |
5720643c | 1640 | #endif |
08e45a40 | 1641 | #ifdef NUM_PSEUDO_REGS |
4b9b3959 | 1642 | fprintf_unfiltered (file, |
08e45a40 AC |
1643 | "gdbarch_dump: NUM_PSEUDO_REGS # %s\n", |
1644 | XSTRING (NUM_PSEUDO_REGS)); | |
1645 | fprintf_unfiltered (file, | |
06b25f14 AC |
1646 | "gdbarch_dump: NUM_PSEUDO_REGS = %d\n", |
1647 | NUM_PSEUDO_REGS); | |
4b9b3959 | 1648 | #endif |
08e45a40 | 1649 | #ifdef NUM_REGS |
7f1b2585 | 1650 | fprintf_unfiltered (file, |
08e45a40 AC |
1651 | "gdbarch_dump: NUM_REGS # %s\n", |
1652 | XSTRING (NUM_REGS)); | |
1653 | fprintf_unfiltered (file, | |
06b25f14 AC |
1654 | "gdbarch_dump: NUM_REGS = %d\n", |
1655 | NUM_REGS); | |
7f1b2585 | 1656 | #endif |
08e45a40 AC |
1657 | #ifdef PC_REGNUM |
1658 | fprintf_unfiltered (file, | |
1659 | "gdbarch_dump: PC_REGNUM # %s\n", | |
1660 | XSTRING (PC_REGNUM)); | |
1661 | fprintf_unfiltered (file, | |
06b25f14 AC |
1662 | "gdbarch_dump: PC_REGNUM = %d\n", |
1663 | PC_REGNUM); | |
7f1b2585 | 1664 | #endif |
4b9b3959 AC |
1665 | #ifdef POINTER_TO_ADDRESS |
1666 | fprintf_unfiltered (file, | |
1667 | "gdbarch_dump: %s # %s\n", | |
1668 | "POINTER_TO_ADDRESS(type, buf)", | |
1669 | XSTRING (POINTER_TO_ADDRESS (type, buf))); | |
7996bcec AC |
1670 | fprintf_unfiltered (file, |
1671 | "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n", | |
1672 | (long) current_gdbarch->pointer_to_address | |
1673 | /*POINTER_TO_ADDRESS ()*/); | |
5e74b15c | 1674 | #endif |
7996bcec AC |
1675 | fprintf_unfiltered (file, |
1676 | "gdbarch_dump: gdbarch_print_float_info_p() = %d\n", | |
1677 | gdbarch_print_float_info_p (current_gdbarch)); | |
1678 | fprintf_unfiltered (file, | |
1679 | "gdbarch_dump: print_float_info = 0x%08lx\n", | |
1680 | (long) current_gdbarch->print_float_info); | |
1681 | fprintf_unfiltered (file, | |
1682 | "gdbarch_dump: print_registers_info = 0x%08lx\n", | |
1683 | (long) current_gdbarch->print_registers_info); | |
1684 | fprintf_unfiltered (file, | |
1685 | "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n", | |
1686 | gdbarch_print_vector_info_p (current_gdbarch)); | |
1687 | fprintf_unfiltered (file, | |
1688 | "gdbarch_dump: print_vector_info = 0x%08lx\n", | |
1689 | (long) current_gdbarch->print_vector_info); | |
c2169756 AC |
1690 | #ifdef PS_REGNUM |
1691 | fprintf_unfiltered (file, | |
1692 | "gdbarch_dump: PS_REGNUM # %s\n", | |
1693 | XSTRING (PS_REGNUM)); | |
1694 | fprintf_unfiltered (file, | |
1695 | "gdbarch_dump: PS_REGNUM = %d\n", | |
1696 | PS_REGNUM); | |
1697 | #endif | |
7996bcec AC |
1698 | fprintf_unfiltered (file, |
1699 | "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n", | |
1700 | gdbarch_push_dummy_call_p (current_gdbarch)); | |
1701 | fprintf_unfiltered (file, | |
1702 | "gdbarch_dump: push_dummy_call = 0x%08lx\n", | |
1703 | (long) current_gdbarch->push_dummy_call); | |
1704 | fprintf_unfiltered (file, | |
1705 | "gdbarch_dump: gdbarch_push_dummy_code_p() = %d\n", | |
1706 | gdbarch_push_dummy_code_p (current_gdbarch)); | |
1707 | fprintf_unfiltered (file, | |
1708 | "gdbarch_dump: push_dummy_code = 0x%08lx\n", | |
1709 | (long) current_gdbarch->push_dummy_code); | |
1e9f55d0 AC |
1710 | #ifdef REGISTER_BYTES_OK_P |
1711 | fprintf_unfiltered (file, | |
1712 | "gdbarch_dump: %s # %s\n", | |
1713 | "REGISTER_BYTES_OK_P()", | |
1714 | XSTRING (REGISTER_BYTES_OK_P ())); | |
1715 | fprintf_unfiltered (file, | |
1716 | "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n", | |
1717 | REGISTER_BYTES_OK_P ()); | |
1718 | #endif | |
08e45a40 | 1719 | #ifdef REGISTER_BYTES_OK |
4b9b3959 AC |
1720 | fprintf_unfiltered (file, |
1721 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1722 | "REGISTER_BYTES_OK(nr_bytes)", |
1723 | XSTRING (REGISTER_BYTES_OK (nr_bytes))); | |
7996bcec AC |
1724 | fprintf_unfiltered (file, |
1725 | "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n", | |
1726 | (long) current_gdbarch->register_bytes_ok | |
1727 | /*REGISTER_BYTES_OK ()*/); | |
4b9b3959 | 1728 | #endif |
08e45a40 | 1729 | #ifdef REGISTER_NAME |
4b9b3959 AC |
1730 | fprintf_unfiltered (file, |
1731 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1732 | "REGISTER_NAME(regnr)", |
1733 | XSTRING (REGISTER_NAME (regnr))); | |
7996bcec AC |
1734 | fprintf_unfiltered (file, |
1735 | "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n", | |
1736 | (long) current_gdbarch->register_name | |
1737 | /*REGISTER_NAME ()*/); | |
4b9b3959 | 1738 | #endif |
08e45a40 | 1739 | #ifdef REGISTER_SIM_REGNO |
4b9b3959 AC |
1740 | fprintf_unfiltered (file, |
1741 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1742 | "REGISTER_SIM_REGNO(reg_nr)", |
1743 | XSTRING (REGISTER_SIM_REGNO (reg_nr))); | |
7996bcec AC |
1744 | fprintf_unfiltered (file, |
1745 | "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n", | |
1746 | (long) current_gdbarch->register_sim_regno | |
1747 | /*REGISTER_SIM_REGNO ()*/); | |
4b9b3959 | 1748 | #endif |
13d01224 | 1749 | #ifdef REGISTER_TO_VALUE |
13d01224 AC |
1750 | fprintf_unfiltered (file, |
1751 | "gdbarch_dump: %s # %s\n", | |
ff2e87ac AC |
1752 | "REGISTER_TO_VALUE(frame, regnum, type, buf)", |
1753 | XSTRING (REGISTER_TO_VALUE (frame, regnum, type, buf))); | |
7996bcec AC |
1754 | fprintf_unfiltered (file, |
1755 | "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n", | |
1756 | (long) current_gdbarch->register_to_value | |
1757 | /*REGISTER_TO_VALUE ()*/); | |
13d01224 | 1758 | #endif |
7996bcec AC |
1759 | fprintf_unfiltered (file, |
1760 | "gdbarch_dump: gdbarch_register_type_p() = %d\n", | |
1761 | gdbarch_register_type_p (current_gdbarch)); | |
1762 | fprintf_unfiltered (file, | |
1763 | "gdbarch_dump: register_type = 0x%08lx\n", | |
1764 | (long) current_gdbarch->register_type); | |
7996bcec AC |
1765 | fprintf_unfiltered (file, |
1766 | "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n", | |
1767 | (long) current_gdbarch->remote_translate_xfer_address); | |
08e45a40 | 1768 | #ifdef SDB_REG_TO_REGNUM |
4b9b3959 AC |
1769 | fprintf_unfiltered (file, |
1770 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1771 | "SDB_REG_TO_REGNUM(sdb_regnr)", |
1772 | XSTRING (SDB_REG_TO_REGNUM (sdb_regnr))); | |
7996bcec AC |
1773 | fprintf_unfiltered (file, |
1774 | "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n", | |
1775 | (long) current_gdbarch->sdb_reg_to_regnum | |
1776 | /*SDB_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1777 | #endif |
08e45a40 | 1778 | #ifdef SKIP_PROLOGUE |
4b9b3959 AC |
1779 | fprintf_unfiltered (file, |
1780 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1781 | "SKIP_PROLOGUE(ip)", |
1782 | XSTRING (SKIP_PROLOGUE (ip))); | |
7996bcec AC |
1783 | fprintf_unfiltered (file, |
1784 | "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n", | |
1785 | (long) current_gdbarch->skip_prologue | |
1786 | /*SKIP_PROLOGUE ()*/); | |
4b9b3959 | 1787 | #endif |
dea0c52f | 1788 | fprintf_unfiltered (file, |
4c8c40e6 MK |
1789 | "gdbarch_dump: skip_solib_resolver = 0x%08lx\n", |
1790 | (long) current_gdbarch->skip_solib_resolver); | |
08e45a40 | 1791 | #ifdef SKIP_TRAMPOLINE_CODE |
4b9b3959 AC |
1792 | fprintf_unfiltered (file, |
1793 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1794 | "SKIP_TRAMPOLINE_CODE(pc)", |
1795 | XSTRING (SKIP_TRAMPOLINE_CODE (pc))); | |
7996bcec AC |
1796 | fprintf_unfiltered (file, |
1797 | "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n", | |
1798 | (long) current_gdbarch->skip_trampoline_code | |
1799 | /*SKIP_TRAMPOLINE_CODE ()*/); | |
4b9b3959 | 1800 | #endif |
181c1381 RE |
1801 | #ifdef SMASH_TEXT_ADDRESS |
1802 | fprintf_unfiltered (file, | |
1803 | "gdbarch_dump: %s # %s\n", | |
1804 | "SMASH_TEXT_ADDRESS(addr)", | |
1805 | XSTRING (SMASH_TEXT_ADDRESS (addr))); | |
7996bcec AC |
1806 | fprintf_unfiltered (file, |
1807 | "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n", | |
1808 | (long) current_gdbarch->smash_text_address | |
1809 | /*SMASH_TEXT_ADDRESS ()*/); | |
181c1381 | 1810 | #endif |
1e9f55d0 AC |
1811 | #ifdef SOFTWARE_SINGLE_STEP_P |
1812 | fprintf_unfiltered (file, | |
1813 | "gdbarch_dump: %s # %s\n", | |
1814 | "SOFTWARE_SINGLE_STEP_P()", | |
1815 | XSTRING (SOFTWARE_SINGLE_STEP_P ())); | |
1816 | fprintf_unfiltered (file, | |
1817 | "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n", | |
1818 | SOFTWARE_SINGLE_STEP_P ()); | |
1819 | #endif | |
08e45a40 | 1820 | #ifdef SOFTWARE_SINGLE_STEP |
4b9b3959 AC |
1821 | fprintf_unfiltered (file, |
1822 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1823 | "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)", |
1824 | XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p))); | |
7996bcec AC |
1825 | fprintf_unfiltered (file, |
1826 | "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n", | |
1827 | (long) current_gdbarch->software_single_step | |
1828 | /*SOFTWARE_SINGLE_STEP ()*/); | |
08e45a40 AC |
1829 | #endif |
1830 | #ifdef SP_REGNUM | |
1dd4193b | 1831 | fprintf_unfiltered (file, |
08e45a40 AC |
1832 | "gdbarch_dump: SP_REGNUM # %s\n", |
1833 | XSTRING (SP_REGNUM)); | |
1834 | fprintf_unfiltered (file, | |
06b25f14 AC |
1835 | "gdbarch_dump: SP_REGNUM = %d\n", |
1836 | SP_REGNUM); | |
1dd4193b | 1837 | #endif |
08e45a40 | 1838 | #ifdef STAB_REG_TO_REGNUM |
4b9b3959 AC |
1839 | fprintf_unfiltered (file, |
1840 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1841 | "STAB_REG_TO_REGNUM(stab_regnr)", |
1842 | XSTRING (STAB_REG_TO_REGNUM (stab_regnr))); | |
7996bcec AC |
1843 | fprintf_unfiltered (file, |
1844 | "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n", | |
1845 | (long) current_gdbarch->stab_reg_to_regnum | |
1846 | /*STAB_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1847 | #endif |
08e45a40 | 1848 | #ifdef STORE_RETURN_VALUE |
f517ea4e PS |
1849 | fprintf_unfiltered (file, |
1850 | "gdbarch_dump: %s # %s\n", | |
ebba8386 AC |
1851 | "STORE_RETURN_VALUE(type, regcache, valbuf)", |
1852 | XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf))); | |
7996bcec AC |
1853 | fprintf_unfiltered (file, |
1854 | "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n", | |
1855 | (long) current_gdbarch->store_return_value | |
1856 | /*STORE_RETURN_VALUE ()*/); | |
875e1767 | 1857 | #endif |
08e45a40 | 1858 | #ifdef TARGET_ADDR_BIT |
bdcd319a | 1859 | fprintf_unfiltered (file, |
08e45a40 AC |
1860 | "gdbarch_dump: TARGET_ADDR_BIT # %s\n", |
1861 | XSTRING (TARGET_ADDR_BIT)); | |
1862 | fprintf_unfiltered (file, | |
06b25f14 AC |
1863 | "gdbarch_dump: TARGET_ADDR_BIT = %d\n", |
1864 | TARGET_ADDR_BIT); | |
bdcd319a | 1865 | #endif |
381323f4 | 1866 | #ifdef TARGET_ARCHITECTURE |
08e45a40 AC |
1867 | fprintf_unfiltered (file, |
1868 | "gdbarch_dump: TARGET_ARCHITECTURE # %s\n", | |
1869 | XSTRING (TARGET_ARCHITECTURE)); | |
0f71a2f6 | 1870 | if (TARGET_ARCHITECTURE != NULL) |
4b9b3959 AC |
1871 | fprintf_unfiltered (file, |
1872 | "gdbarch_dump: TARGET_ARCHITECTURE = %s\n", | |
adf40b2e | 1873 | TARGET_ARCHITECTURE->printable_name); |
381323f4 | 1874 | #endif |
08e45a40 AC |
1875 | #ifdef TARGET_BFD_VMA_BIT |
1876 | fprintf_unfiltered (file, | |
1877 | "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n", | |
1878 | XSTRING (TARGET_BFD_VMA_BIT)); | |
1879 | fprintf_unfiltered (file, | |
06b25f14 AC |
1880 | "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n", |
1881 | TARGET_BFD_VMA_BIT); | |
08e45a40 | 1882 | #endif |
381323f4 | 1883 | #ifdef TARGET_BYTE_ORDER |
08e45a40 AC |
1884 | fprintf_unfiltered (file, |
1885 | "gdbarch_dump: TARGET_BYTE_ORDER # %s\n", | |
1886 | XSTRING (TARGET_BYTE_ORDER)); | |
4b9b3959 AC |
1887 | fprintf_unfiltered (file, |
1888 | "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n", | |
adf40b2e | 1889 | (long) TARGET_BYTE_ORDER); |
381323f4 | 1890 | #endif |
4e409299 JB |
1891 | #ifdef TARGET_CHAR_SIGNED |
1892 | fprintf_unfiltered (file, | |
1893 | "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n", | |
1894 | XSTRING (TARGET_CHAR_SIGNED)); | |
1895 | fprintf_unfiltered (file, | |
06b25f14 AC |
1896 | "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n", |
1897 | TARGET_CHAR_SIGNED); | |
4e409299 | 1898 | #endif |
08e45a40 | 1899 | #ifdef TARGET_DOUBLE_BIT |
4b9b3959 | 1900 | fprintf_unfiltered (file, |
08e45a40 AC |
1901 | "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n", |
1902 | XSTRING (TARGET_DOUBLE_BIT)); | |
4b9b3959 | 1903 | fprintf_unfiltered (file, |
06b25f14 AC |
1904 | "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n", |
1905 | TARGET_DOUBLE_BIT); | |
381323f4 | 1906 | #endif |
08e45a40 | 1907 | #ifdef TARGET_DOUBLE_FORMAT |
4b9b3959 | 1908 | fprintf_unfiltered (file, |
08e45a40 AC |
1909 | "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n", |
1910 | XSTRING (TARGET_DOUBLE_FORMAT)); | |
4b9b3959 | 1911 | fprintf_unfiltered (file, |
f09cffaa | 1912 | "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n", |
52f87c51 | 1913 | (TARGET_DOUBLE_FORMAT)->name); |
381323f4 AC |
1914 | #endif |
1915 | #ifdef TARGET_FLOAT_BIT | |
08e45a40 AC |
1916 | fprintf_unfiltered (file, |
1917 | "gdbarch_dump: TARGET_FLOAT_BIT # %s\n", | |
1918 | XSTRING (TARGET_FLOAT_BIT)); | |
4b9b3959 | 1919 | fprintf_unfiltered (file, |
06b25f14 AC |
1920 | "gdbarch_dump: TARGET_FLOAT_BIT = %d\n", |
1921 | TARGET_FLOAT_BIT); | |
381323f4 | 1922 | #endif |
08e45a40 | 1923 | #ifdef TARGET_FLOAT_FORMAT |
4b9b3959 | 1924 | fprintf_unfiltered (file, |
08e45a40 AC |
1925 | "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n", |
1926 | XSTRING (TARGET_FLOAT_FORMAT)); | |
1927 | fprintf_unfiltered (file, | |
f09cffaa | 1928 | "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n", |
52f87c51 | 1929 | (TARGET_FLOAT_FORMAT)->name); |
08e45a40 AC |
1930 | #endif |
1931 | #ifdef TARGET_INT_BIT | |
1932 | fprintf_unfiltered (file, | |
1933 | "gdbarch_dump: TARGET_INT_BIT # %s\n", | |
1934 | XSTRING (TARGET_INT_BIT)); | |
1935 | fprintf_unfiltered (file, | |
06b25f14 AC |
1936 | "gdbarch_dump: TARGET_INT_BIT = %d\n", |
1937 | TARGET_INT_BIT); | |
08e45a40 AC |
1938 | #endif |
1939 | #ifdef TARGET_LONG_BIT | |
1940 | fprintf_unfiltered (file, | |
1941 | "gdbarch_dump: TARGET_LONG_BIT # %s\n", | |
1942 | XSTRING (TARGET_LONG_BIT)); | |
1943 | fprintf_unfiltered (file, | |
06b25f14 AC |
1944 | "gdbarch_dump: TARGET_LONG_BIT = %d\n", |
1945 | TARGET_LONG_BIT); | |
381323f4 AC |
1946 | #endif |
1947 | #ifdef TARGET_LONG_DOUBLE_BIT | |
08e45a40 AC |
1948 | fprintf_unfiltered (file, |
1949 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n", | |
1950 | XSTRING (TARGET_LONG_DOUBLE_BIT)); | |
4b9b3959 | 1951 | fprintf_unfiltered (file, |
06b25f14 AC |
1952 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n", |
1953 | TARGET_LONG_DOUBLE_BIT); | |
381323f4 | 1954 | #endif |
08e45a40 | 1955 | #ifdef TARGET_LONG_DOUBLE_FORMAT |
66b43ecb | 1956 | fprintf_unfiltered (file, |
08e45a40 AC |
1957 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n", |
1958 | XSTRING (TARGET_LONG_DOUBLE_FORMAT)); | |
52204a0b | 1959 | fprintf_unfiltered (file, |
f09cffaa | 1960 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n", |
52f87c51 | 1961 | (TARGET_LONG_DOUBLE_FORMAT)->name); |
52204a0b | 1962 | #endif |
08e45a40 | 1963 | #ifdef TARGET_LONG_LONG_BIT |
66b43ecb | 1964 | fprintf_unfiltered (file, |
08e45a40 AC |
1965 | "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n", |
1966 | XSTRING (TARGET_LONG_LONG_BIT)); | |
4b9b3959 | 1967 | fprintf_unfiltered (file, |
06b25f14 AC |
1968 | "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n", |
1969 | TARGET_LONG_LONG_BIT); | |
381323f4 | 1970 | #endif |
4be87837 DJ |
1971 | #ifdef TARGET_OSABI |
1972 | fprintf_unfiltered (file, | |
1973 | "gdbarch_dump: TARGET_OSABI # %s\n", | |
1974 | XSTRING (TARGET_OSABI)); | |
1975 | fprintf_unfiltered (file, | |
1976 | "gdbarch_dump: TARGET_OSABI = %ld\n", | |
1977 | (long) TARGET_OSABI); | |
1978 | #endif | |
08e45a40 AC |
1979 | #ifdef TARGET_PRINT_INSN |
1980 | fprintf_unfiltered (file, | |
1981 | "gdbarch_dump: %s # %s\n", | |
1982 | "TARGET_PRINT_INSN(vma, info)", | |
1983 | XSTRING (TARGET_PRINT_INSN (vma, info))); | |
7996bcec AC |
1984 | fprintf_unfiltered (file, |
1985 | "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n", | |
1986 | (long) current_gdbarch->print_insn | |
1987 | /*TARGET_PRINT_INSN ()*/); | |
381323f4 | 1988 | #endif |
08e45a40 AC |
1989 | #ifdef TARGET_PTR_BIT |
1990 | fprintf_unfiltered (file, | |
1991 | "gdbarch_dump: TARGET_PTR_BIT # %s\n", | |
1992 | XSTRING (TARGET_PTR_BIT)); | |
1993 | fprintf_unfiltered (file, | |
06b25f14 AC |
1994 | "gdbarch_dump: TARGET_PTR_BIT = %d\n", |
1995 | TARGET_PTR_BIT); | |
381323f4 | 1996 | #endif |
cde9ea48 AC |
1997 | #ifdef TARGET_READ_PC_P |
1998 | fprintf_unfiltered (file, | |
1999 | "gdbarch_dump: %s # %s\n", | |
2000 | "TARGET_READ_PC_P()", | |
2001 | XSTRING (TARGET_READ_PC_P ())); | |
2002 | fprintf_unfiltered (file, | |
2003 | "gdbarch_dump: TARGET_READ_PC_P() = %d\n", | |
2004 | TARGET_READ_PC_P ()); | |
2005 | #endif | |
08e45a40 AC |
2006 | #ifdef TARGET_READ_PC |
2007 | fprintf_unfiltered (file, | |
2008 | "gdbarch_dump: %s # %s\n", | |
2009 | "TARGET_READ_PC(ptid)", | |
2010 | XSTRING (TARGET_READ_PC (ptid))); | |
7996bcec AC |
2011 | fprintf_unfiltered (file, |
2012 | "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n", | |
2013 | (long) current_gdbarch->read_pc | |
2014 | /*TARGET_READ_PC ()*/); | |
381323f4 | 2015 | #endif |
bd1ce8ba AC |
2016 | #ifdef TARGET_READ_SP_P |
2017 | fprintf_unfiltered (file, | |
2018 | "gdbarch_dump: %s # %s\n", | |
2019 | "TARGET_READ_SP_P()", | |
2020 | XSTRING (TARGET_READ_SP_P ())); | |
2021 | fprintf_unfiltered (file, | |
2022 | "gdbarch_dump: TARGET_READ_SP_P() = %d\n", | |
2023 | TARGET_READ_SP_P ()); | |
2024 | #endif | |
381323f4 | 2025 | #ifdef TARGET_READ_SP |
08e45a40 AC |
2026 | fprintf_unfiltered (file, |
2027 | "gdbarch_dump: %s # %s\n", | |
2028 | "TARGET_READ_SP()", | |
2029 | XSTRING (TARGET_READ_SP ())); | |
7996bcec AC |
2030 | fprintf_unfiltered (file, |
2031 | "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n", | |
2032 | (long) current_gdbarch->read_sp | |
2033 | /*TARGET_READ_SP ()*/); | |
381323f4 | 2034 | #endif |
08e45a40 AC |
2035 | #ifdef TARGET_SHORT_BIT |
2036 | fprintf_unfiltered (file, | |
2037 | "gdbarch_dump: TARGET_SHORT_BIT # %s\n", | |
2038 | XSTRING (TARGET_SHORT_BIT)); | |
2039 | fprintf_unfiltered (file, | |
06b25f14 AC |
2040 | "gdbarch_dump: TARGET_SHORT_BIT = %d\n", |
2041 | TARGET_SHORT_BIT); | |
39d4ef09 AC |
2042 | #endif |
2043 | #ifdef TARGET_VIRTUAL_FRAME_POINTER | |
08e45a40 AC |
2044 | fprintf_unfiltered (file, |
2045 | "gdbarch_dump: %s # %s\n", | |
2046 | "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)", | |
2047 | XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset))); | |
7996bcec AC |
2048 | fprintf_unfiltered (file, |
2049 | "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n", | |
2050 | (long) current_gdbarch->virtual_frame_pointer | |
2051 | /*TARGET_VIRTUAL_FRAME_POINTER ()*/); | |
381323f4 | 2052 | #endif |
08e45a40 | 2053 | #ifdef TARGET_WRITE_PC |
4b9b3959 | 2054 | fprintf_unfiltered (file, |
08e45a40 AC |
2055 | "gdbarch_dump: %s # %s\n", |
2056 | "TARGET_WRITE_PC(val, ptid)", | |
2057 | XSTRING (TARGET_WRITE_PC (val, ptid))); | |
7996bcec AC |
2058 | fprintf_unfiltered (file, |
2059 | "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n", | |
2060 | (long) current_gdbarch->write_pc | |
2061 | /*TARGET_WRITE_PC ()*/); | |
381323f4 | 2062 | #endif |
7996bcec AC |
2063 | fprintf_unfiltered (file, |
2064 | "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n", | |
2065 | gdbarch_unwind_dummy_id_p (current_gdbarch)); | |
2066 | fprintf_unfiltered (file, | |
2067 | "gdbarch_dump: unwind_dummy_id = 0x%08lx\n", | |
2068 | (long) current_gdbarch->unwind_dummy_id); | |
2069 | fprintf_unfiltered (file, | |
2070 | "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n", | |
2071 | gdbarch_unwind_pc_p (current_gdbarch)); | |
2072 | fprintf_unfiltered (file, | |
2073 | "gdbarch_dump: unwind_pc = 0x%08lx\n", | |
2074 | (long) current_gdbarch->unwind_pc); | |
2075 | fprintf_unfiltered (file, | |
2076 | "gdbarch_dump: gdbarch_unwind_sp_p() = %d\n", | |
2077 | gdbarch_unwind_sp_p (current_gdbarch)); | |
2078 | fprintf_unfiltered (file, | |
2079 | "gdbarch_dump: unwind_sp = 0x%08lx\n", | |
2080 | (long) current_gdbarch->unwind_sp); | |
08e45a40 | 2081 | #ifdef USE_STRUCT_CONVENTION |
4b9b3959 | 2082 | fprintf_unfiltered (file, |
08e45a40 AC |
2083 | "gdbarch_dump: %s # %s\n", |
2084 | "USE_STRUCT_CONVENTION(gcc_p, value_type)", | |
2085 | XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type))); | |
7996bcec AC |
2086 | fprintf_unfiltered (file, |
2087 | "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n", | |
2088 | (long) current_gdbarch->use_struct_convention | |
2089 | /*USE_STRUCT_CONVENTION ()*/); | |
13d01224 AC |
2090 | #endif |
2091 | #ifdef VALUE_TO_REGISTER | |
13d01224 AC |
2092 | fprintf_unfiltered (file, |
2093 | "gdbarch_dump: %s # %s\n", | |
ff2e87ac AC |
2094 | "VALUE_TO_REGISTER(frame, regnum, type, buf)", |
2095 | XSTRING (VALUE_TO_REGISTER (frame, regnum, type, buf))); | |
7996bcec AC |
2096 | fprintf_unfiltered (file, |
2097 | "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n", | |
2098 | (long) current_gdbarch->value_to_register | |
2099 | /*VALUE_TO_REGISTER ()*/); | |
381323f4 | 2100 | #endif |
4b9b3959 AC |
2101 | if (current_gdbarch->dump_tdep != NULL) |
2102 | current_gdbarch->dump_tdep (current_gdbarch, file); | |
0f71a2f6 JM |
2103 | } |
2104 | ||
2105 | struct gdbarch_tdep * | |
104c1213 | 2106 | gdbarch_tdep (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2107 | { |
2108 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
2109 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
2110 | return gdbarch->tdep; | |
2111 | } | |
2112 | ||
2113 | ||
2114 | const struct bfd_arch_info * | |
104c1213 | 2115 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
0f71a2f6 | 2116 | { |
8de9bdc4 | 2117 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2118 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2119 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
2120 | return gdbarch->bfd_arch_info; | |
2121 | } | |
2122 | ||
2123 | int | |
104c1213 | 2124 | gdbarch_byte_order (struct gdbarch *gdbarch) |
0f71a2f6 | 2125 | { |
8de9bdc4 | 2126 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2127 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2128 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
2129 | return gdbarch->byte_order; | |
2130 | } | |
2131 | ||
4be87837 DJ |
2132 | enum gdb_osabi |
2133 | gdbarch_osabi (struct gdbarch *gdbarch) | |
2134 | { | |
2135 | gdb_assert (gdbarch != NULL); | |
2136 | if (gdbarch_debug >= 2) | |
2137 | fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n"); | |
2138 | return gdbarch->osabi; | |
2139 | } | |
2140 | ||
0f71a2f6 | 2141 | int |
104c1213 | 2142 | gdbarch_short_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2143 | { |
8de9bdc4 | 2144 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2145 | /* Skip verify of short_bit, invalid_p == 0 */ |
0f71a2f6 | 2146 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2147 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
2148 | return gdbarch->short_bit; | |
2149 | } | |
2150 | ||
2151 | void | |
104c1213 JM |
2152 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
2153 | int short_bit) | |
0f71a2f6 JM |
2154 | { |
2155 | gdbarch->short_bit = short_bit; | |
2156 | } | |
2157 | ||
2158 | int | |
104c1213 | 2159 | gdbarch_int_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2160 | { |
8de9bdc4 | 2161 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2162 | /* Skip verify of int_bit, invalid_p == 0 */ |
0f71a2f6 | 2163 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2164 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
2165 | return gdbarch->int_bit; | |
2166 | } | |
2167 | ||
2168 | void | |
104c1213 JM |
2169 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
2170 | int int_bit) | |
0f71a2f6 JM |
2171 | { |
2172 | gdbarch->int_bit = int_bit; | |
2173 | } | |
2174 | ||
2175 | int | |
104c1213 | 2176 | gdbarch_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2177 | { |
8de9bdc4 | 2178 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2179 | /* Skip verify of long_bit, invalid_p == 0 */ |
0f71a2f6 | 2180 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2181 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
2182 | return gdbarch->long_bit; | |
2183 | } | |
2184 | ||
2185 | void | |
104c1213 JM |
2186 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
2187 | int long_bit) | |
0f71a2f6 JM |
2188 | { |
2189 | gdbarch->long_bit = long_bit; | |
2190 | } | |
2191 | ||
2192 | int | |
104c1213 | 2193 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2194 | { |
8de9bdc4 | 2195 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2196 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
0f71a2f6 | 2197 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2198 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
2199 | return gdbarch->long_long_bit; | |
2200 | } | |
2201 | ||
2202 | void | |
104c1213 JM |
2203 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
2204 | int long_long_bit) | |
0f71a2f6 JM |
2205 | { |
2206 | gdbarch->long_long_bit = long_long_bit; | |
2207 | } | |
2208 | ||
2209 | int | |
104c1213 | 2210 | gdbarch_float_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2211 | { |
8de9bdc4 | 2212 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2213 | /* Skip verify of float_bit, invalid_p == 0 */ |
0f71a2f6 | 2214 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2215 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
2216 | return gdbarch->float_bit; | |
2217 | } | |
2218 | ||
2219 | void | |
104c1213 JM |
2220 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
2221 | int float_bit) | |
0f71a2f6 JM |
2222 | { |
2223 | gdbarch->float_bit = float_bit; | |
2224 | } | |
2225 | ||
2226 | int | |
104c1213 | 2227 | gdbarch_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2228 | { |
8de9bdc4 | 2229 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2230 | /* Skip verify of double_bit, invalid_p == 0 */ |
0f71a2f6 | 2231 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2232 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
2233 | return gdbarch->double_bit; | |
2234 | } | |
2235 | ||
2236 | void | |
104c1213 JM |
2237 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
2238 | int double_bit) | |
0f71a2f6 JM |
2239 | { |
2240 | gdbarch->double_bit = double_bit; | |
2241 | } | |
2242 | ||
2243 | int | |
104c1213 | 2244 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2245 | { |
8de9bdc4 | 2246 | gdb_assert (gdbarch != NULL); |
66b43ecb | 2247 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
0f71a2f6 | 2248 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2249 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
2250 | return gdbarch->long_double_bit; | |
2251 | } | |
2252 | ||
2253 | void | |
104c1213 JM |
2254 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
2255 | int long_double_bit) | |
0f71a2f6 JM |
2256 | { |
2257 | gdbarch->long_double_bit = long_double_bit; | |
2258 | } | |
2259 | ||
66b43ecb AC |
2260 | int |
2261 | gdbarch_ptr_bit (struct gdbarch *gdbarch) | |
2262 | { | |
8de9bdc4 | 2263 | gdb_assert (gdbarch != NULL); |
66b43ecb AC |
2264 | /* Skip verify of ptr_bit, invalid_p == 0 */ |
2265 | if (gdbarch_debug >= 2) | |
2266 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); | |
2267 | return gdbarch->ptr_bit; | |
2268 | } | |
2269 | ||
2270 | void | |
2271 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, | |
2272 | int ptr_bit) | |
2273 | { | |
2274 | gdbarch->ptr_bit = ptr_bit; | |
2275 | } | |
2276 | ||
52204a0b DT |
2277 | int |
2278 | gdbarch_addr_bit (struct gdbarch *gdbarch) | |
2279 | { | |
8de9bdc4 | 2280 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2281 | /* Check variable changed from pre-default. */ |
2282 | gdb_assert (gdbarch->addr_bit != 0); | |
52204a0b DT |
2283 | if (gdbarch_debug >= 2) |
2284 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); | |
2285 | return gdbarch->addr_bit; | |
2286 | } | |
2287 | ||
2288 | void | |
2289 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, | |
2290 | int addr_bit) | |
2291 | { | |
2292 | gdbarch->addr_bit = addr_bit; | |
2293 | } | |
2294 | ||
66b43ecb AC |
2295 | int |
2296 | gdbarch_bfd_vma_bit (struct gdbarch *gdbarch) | |
2297 | { | |
8de9bdc4 | 2298 | gdb_assert (gdbarch != NULL); |
66b43ecb AC |
2299 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
2300 | if (gdbarch_debug >= 2) | |
2301 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n"); | |
2302 | return gdbarch->bfd_vma_bit; | |
2303 | } | |
2304 | ||
2305 | void | |
2306 | set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, | |
2307 | int bfd_vma_bit) | |
2308 | { | |
2309 | gdbarch->bfd_vma_bit = bfd_vma_bit; | |
2310 | } | |
2311 | ||
4e409299 JB |
2312 | int |
2313 | gdbarch_char_signed (struct gdbarch *gdbarch) | |
2314 | { | |
8de9bdc4 | 2315 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2316 | /* Check variable changed from pre-default. */ |
2317 | gdb_assert (gdbarch->char_signed != -1); | |
4e409299 JB |
2318 | if (gdbarch_debug >= 2) |
2319 | fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); | |
2320 | return gdbarch->char_signed; | |
2321 | } | |
2322 | ||
2323 | void | |
2324 | set_gdbarch_char_signed (struct gdbarch *gdbarch, | |
2325 | int char_signed) | |
2326 | { | |
2327 | gdbarch->char_signed = char_signed; | |
2328 | } | |
2329 | ||
cde9ea48 AC |
2330 | int |
2331 | gdbarch_read_pc_p (struct gdbarch *gdbarch) | |
2332 | { | |
2333 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2334 | return gdbarch->read_pc != NULL; |
cde9ea48 AC |
2335 | } |
2336 | ||
0f71a2f6 | 2337 | CORE_ADDR |
39f77062 | 2338 | gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid) |
0f71a2f6 | 2339 | { |
8de9bdc4 | 2340 | gdb_assert (gdbarch != NULL); |
956ac328 | 2341 | gdb_assert (gdbarch->read_pc != NULL); |
0f71a2f6 | 2342 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2343 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
39f77062 | 2344 | return gdbarch->read_pc (ptid); |
0f71a2f6 JM |
2345 | } |
2346 | ||
2347 | void | |
104c1213 JM |
2348 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
2349 | gdbarch_read_pc_ftype read_pc) | |
0f71a2f6 JM |
2350 | { |
2351 | gdbarch->read_pc = read_pc; | |
2352 | } | |
2353 | ||
2354 | void | |
39f77062 | 2355 | gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid) |
0f71a2f6 | 2356 | { |
8de9bdc4 | 2357 | gdb_assert (gdbarch != NULL); |
956ac328 | 2358 | gdb_assert (gdbarch->write_pc != NULL); |
0f71a2f6 | 2359 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2360 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
39f77062 | 2361 | gdbarch->write_pc (val, ptid); |
0f71a2f6 JM |
2362 | } |
2363 | ||
2364 | void | |
104c1213 JM |
2365 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
2366 | gdbarch_write_pc_ftype write_pc) | |
0f71a2f6 JM |
2367 | { |
2368 | gdbarch->write_pc = write_pc; | |
2369 | } | |
2370 | ||
bd1ce8ba AC |
2371 | int |
2372 | gdbarch_read_sp_p (struct gdbarch *gdbarch) | |
2373 | { | |
2374 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2375 | return gdbarch->read_sp != NULL; |
bd1ce8ba AC |
2376 | } |
2377 | ||
0f71a2f6 JM |
2378 | CORE_ADDR |
2379 | gdbarch_read_sp (struct gdbarch *gdbarch) | |
2380 | { | |
8de9bdc4 | 2381 | gdb_assert (gdbarch != NULL); |
956ac328 | 2382 | gdb_assert (gdbarch->read_sp != NULL); |
0f71a2f6 | 2383 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2384 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n"); |
2385 | return gdbarch->read_sp (); | |
2386 | } | |
2387 | ||
2388 | void | |
104c1213 JM |
2389 | set_gdbarch_read_sp (struct gdbarch *gdbarch, |
2390 | gdbarch_read_sp_ftype read_sp) | |
0f71a2f6 JM |
2391 | { |
2392 | gdbarch->read_sp = read_sp; | |
2393 | } | |
2394 | ||
39d4ef09 AC |
2395 | void |
2396 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) | |
2397 | { | |
8de9bdc4 | 2398 | gdb_assert (gdbarch != NULL); |
956ac328 | 2399 | gdb_assert (gdbarch->virtual_frame_pointer != NULL); |
39d4ef09 AC |
2400 | if (gdbarch_debug >= 2) |
2401 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); | |
2402 | gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset); | |
2403 | } | |
2404 | ||
2405 | void | |
2406 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, | |
2407 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) | |
2408 | { | |
2409 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; | |
2410 | } | |
2411 | ||
61a0eb5b | 2412 | int |
d8124050 | 2413 | gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch) |
61a0eb5b | 2414 | { |
8de9bdc4 | 2415 | gdb_assert (gdbarch != NULL); |
956ac328 | 2416 | return gdbarch->pseudo_register_read != NULL; |
61a0eb5b AC |
2417 | } |
2418 | ||
2419 | void | |
d8124050 | 2420 | gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf) |
61a0eb5b | 2421 | { |
8de9bdc4 | 2422 | gdb_assert (gdbarch != NULL); |
956ac328 | 2423 | gdb_assert (gdbarch->pseudo_register_read != NULL); |
61a0eb5b | 2424 | if (gdbarch_debug >= 2) |
d8124050 AC |
2425 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n"); |
2426 | gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf); | |
61a0eb5b AC |
2427 | } |
2428 | ||
2429 | void | |
d8124050 AC |
2430 | set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch, |
2431 | gdbarch_pseudo_register_read_ftype pseudo_register_read) | |
61a0eb5b | 2432 | { |
d8124050 | 2433 | gdbarch->pseudo_register_read = pseudo_register_read; |
61a0eb5b AC |
2434 | } |
2435 | ||
2436 | int | |
d8124050 | 2437 | gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch) |
61a0eb5b | 2438 | { |
8de9bdc4 | 2439 | gdb_assert (gdbarch != NULL); |
956ac328 | 2440 | return gdbarch->pseudo_register_write != NULL; |
61a0eb5b AC |
2441 | } |
2442 | ||
2443 | void | |
d8124050 | 2444 | gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf) |
61a0eb5b | 2445 | { |
8de9bdc4 | 2446 | gdb_assert (gdbarch != NULL); |
956ac328 | 2447 | gdb_assert (gdbarch->pseudo_register_write != NULL); |
61a0eb5b | 2448 | if (gdbarch_debug >= 2) |
d8124050 AC |
2449 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n"); |
2450 | gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf); | |
61a0eb5b AC |
2451 | } |
2452 | ||
2453 | void | |
d8124050 AC |
2454 | set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch, |
2455 | gdbarch_pseudo_register_write_ftype pseudo_register_write) | |
61a0eb5b | 2456 | { |
d8124050 | 2457 | gdbarch->pseudo_register_write = pseudo_register_write; |
61a0eb5b AC |
2458 | } |
2459 | ||
0f71a2f6 | 2460 | int |
104c1213 | 2461 | gdbarch_num_regs (struct gdbarch *gdbarch) |
0f71a2f6 | 2462 | { |
8de9bdc4 | 2463 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2464 | /* Check variable changed from pre-default. */ |
2465 | gdb_assert (gdbarch->num_regs != -1); | |
0f71a2f6 | 2466 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2467 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
2468 | return gdbarch->num_regs; | |
2469 | } | |
2470 | ||
2471 | void | |
104c1213 JM |
2472 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
2473 | int num_regs) | |
0f71a2f6 JM |
2474 | { |
2475 | gdbarch->num_regs = num_regs; | |
2476 | } | |
2477 | ||
0aba1244 EZ |
2478 | int |
2479 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) | |
2480 | { | |
8de9bdc4 | 2481 | gdb_assert (gdbarch != NULL); |
0aba1244 EZ |
2482 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
2483 | if (gdbarch_debug >= 2) | |
2484 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); | |
2485 | return gdbarch->num_pseudo_regs; | |
2486 | } | |
2487 | ||
2488 | void | |
2489 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, | |
2490 | int num_pseudo_regs) | |
2491 | { | |
2492 | gdbarch->num_pseudo_regs = num_pseudo_regs; | |
2493 | } | |
2494 | ||
0f71a2f6 | 2495 | int |
104c1213 | 2496 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2497 | { |
8de9bdc4 | 2498 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2499 | /* Skip verify of sp_regnum, invalid_p == 0 */ |
0f71a2f6 | 2500 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2501 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
2502 | return gdbarch->sp_regnum; | |
2503 | } | |
2504 | ||
2505 | void | |
104c1213 JM |
2506 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
2507 | int sp_regnum) | |
0f71a2f6 JM |
2508 | { |
2509 | gdbarch->sp_regnum = sp_regnum; | |
2510 | } | |
2511 | ||
0f71a2f6 | 2512 | int |
104c1213 | 2513 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
0f71a2f6 | 2514 | { |
8de9bdc4 | 2515 | gdb_assert (gdbarch != NULL); |
1200cd6e | 2516 | /* Skip verify of pc_regnum, invalid_p == 0 */ |
0f71a2f6 | 2517 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2518 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
2519 | return gdbarch->pc_regnum; | |
2520 | } | |
2521 | ||
2522 | void | |
104c1213 JM |
2523 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
2524 | int pc_regnum) | |
0f71a2f6 JM |
2525 | { |
2526 | gdbarch->pc_regnum = pc_regnum; | |
2527 | } | |
2528 | ||
c2169756 AC |
2529 | int |
2530 | gdbarch_ps_regnum (struct gdbarch *gdbarch) | |
2531 | { | |
8de9bdc4 | 2532 | gdb_assert (gdbarch != NULL); |
c2169756 AC |
2533 | /* Skip verify of ps_regnum, invalid_p == 0 */ |
2534 | if (gdbarch_debug >= 2) | |
2535 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n"); | |
2536 | return gdbarch->ps_regnum; | |
2537 | } | |
2538 | ||
2539 | void | |
2540 | set_gdbarch_ps_regnum (struct gdbarch *gdbarch, | |
2541 | int ps_regnum) | |
2542 | { | |
2543 | gdbarch->ps_regnum = ps_regnum; | |
2544 | } | |
2545 | ||
60054393 MS |
2546 | int |
2547 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) | |
2548 | { | |
8de9bdc4 | 2549 | gdb_assert (gdbarch != NULL); |
60054393 MS |
2550 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
2551 | if (gdbarch_debug >= 2) | |
2552 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); | |
2553 | return gdbarch->fp0_regnum; | |
2554 | } | |
2555 | ||
2556 | void | |
2557 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, | |
2558 | int fp0_regnum) | |
2559 | { | |
2560 | gdbarch->fp0_regnum = fp0_regnum; | |
2561 | } | |
2562 | ||
88c72b7d AC |
2563 | int |
2564 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) | |
2565 | { | |
8de9bdc4 | 2566 | gdb_assert (gdbarch != NULL); |
956ac328 | 2567 | gdb_assert (gdbarch->stab_reg_to_regnum != NULL); |
88c72b7d AC |
2568 | if (gdbarch_debug >= 2) |
2569 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); | |
2570 | return gdbarch->stab_reg_to_regnum (stab_regnr); | |
2571 | } | |
2572 | ||
2573 | void | |
2574 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, | |
2575 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) | |
2576 | { | |
2577 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; | |
2578 | } | |
2579 | ||
2580 | int | |
2581 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) | |
2582 | { | |
8de9bdc4 | 2583 | gdb_assert (gdbarch != NULL); |
956ac328 | 2584 | gdb_assert (gdbarch->ecoff_reg_to_regnum != NULL); |
88c72b7d AC |
2585 | if (gdbarch_debug >= 2) |
2586 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); | |
2587 | return gdbarch->ecoff_reg_to_regnum (ecoff_regnr); | |
2588 | } | |
2589 | ||
2590 | void | |
2591 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, | |
2592 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) | |
2593 | { | |
2594 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; | |
2595 | } | |
2596 | ||
2597 | int | |
2598 | gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr) | |
2599 | { | |
8de9bdc4 | 2600 | gdb_assert (gdbarch != NULL); |
956ac328 | 2601 | gdb_assert (gdbarch->dwarf_reg_to_regnum != NULL); |
88c72b7d AC |
2602 | if (gdbarch_debug >= 2) |
2603 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n"); | |
2604 | return gdbarch->dwarf_reg_to_regnum (dwarf_regnr); | |
2605 | } | |
2606 | ||
2607 | void | |
2608 | set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, | |
2609 | gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum) | |
2610 | { | |
2611 | gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum; | |
2612 | } | |
2613 | ||
2614 | int | |
2615 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) | |
2616 | { | |
8de9bdc4 | 2617 | gdb_assert (gdbarch != NULL); |
956ac328 | 2618 | gdb_assert (gdbarch->sdb_reg_to_regnum != NULL); |
88c72b7d AC |
2619 | if (gdbarch_debug >= 2) |
2620 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); | |
2621 | return gdbarch->sdb_reg_to_regnum (sdb_regnr); | |
2622 | } | |
2623 | ||
2624 | void | |
2625 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, | |
2626 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) | |
2627 | { | |
2628 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; | |
2629 | } | |
2630 | ||
2631 | int | |
2632 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) | |
2633 | { | |
8de9bdc4 | 2634 | gdb_assert (gdbarch != NULL); |
956ac328 | 2635 | gdb_assert (gdbarch->dwarf2_reg_to_regnum != NULL); |
88c72b7d AC |
2636 | if (gdbarch_debug >= 2) |
2637 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); | |
2638 | return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr); | |
2639 | } | |
2640 | ||
2641 | void | |
2642 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, | |
2643 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) | |
2644 | { | |
2645 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; | |
2646 | } | |
2647 | ||
fa88f677 | 2648 | const char * |
0f71a2f6 JM |
2649 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) |
2650 | { | |
8de9bdc4 | 2651 | gdb_assert (gdbarch != NULL); |
956ac328 | 2652 | gdb_assert (gdbarch->register_name != NULL); |
0f71a2f6 | 2653 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2654 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
2655 | return gdbarch->register_name (regnr); | |
2656 | } | |
2657 | ||
2658 | void | |
104c1213 JM |
2659 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
2660 | gdbarch_register_name_ftype register_name) | |
0f71a2f6 JM |
2661 | { |
2662 | gdbarch->register_name = register_name; | |
2663 | } | |
2664 | ||
0f71a2f6 | 2665 | int |
9c04cab7 | 2666 | gdbarch_register_type_p (struct gdbarch *gdbarch) |
0f71a2f6 | 2667 | { |
8de9bdc4 | 2668 | gdb_assert (gdbarch != NULL); |
956ac328 | 2669 | return gdbarch->register_type != NULL; |
9c04cab7 AC |
2670 | } |
2671 | ||
2672 | struct type * | |
2673 | gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr) | |
2674 | { | |
2675 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2676 | gdb_assert (gdbarch->register_type != NULL); |
0f71a2f6 | 2677 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
2678 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n"); |
2679 | return gdbarch->register_type (gdbarch, reg_nr); | |
0f71a2f6 JM |
2680 | } |
2681 | ||
2682 | void | |
9c04cab7 AC |
2683 | set_gdbarch_register_type (struct gdbarch *gdbarch, |
2684 | gdbarch_register_type_ftype register_type) | |
0f71a2f6 | 2685 | { |
9c04cab7 | 2686 | gdbarch->register_type = register_type; |
0f71a2f6 JM |
2687 | } |
2688 | ||
46654a5b | 2689 | int |
9c04cab7 | 2690 | gdbarch_deprecated_register_virtual_type_p (struct gdbarch *gdbarch) |
46654a5b AC |
2691 | { |
2692 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2693 | return gdbarch->deprecated_register_virtual_type != NULL; |
46654a5b AC |
2694 | } |
2695 | ||
9c04cab7 AC |
2696 | struct type * |
2697 | gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, int reg_nr) | |
0f71a2f6 | 2698 | { |
8de9bdc4 | 2699 | gdb_assert (gdbarch != NULL); |
956ac328 | 2700 | gdb_assert (gdbarch->deprecated_register_virtual_type != NULL); |
0f71a2f6 | 2701 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
2702 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_type called\n"); |
2703 | return gdbarch->deprecated_register_virtual_type (reg_nr); | |
0f71a2f6 JM |
2704 | } |
2705 | ||
2706 | void | |
9c04cab7 AC |
2707 | set_gdbarch_deprecated_register_virtual_type (struct gdbarch *gdbarch, |
2708 | gdbarch_deprecated_register_virtual_type_ftype deprecated_register_virtual_type) | |
0f71a2f6 | 2709 | { |
9c04cab7 | 2710 | gdbarch->deprecated_register_virtual_type = deprecated_register_virtual_type; |
0f71a2f6 JM |
2711 | } |
2712 | ||
2713 | int | |
9c04cab7 | 2714 | gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch) |
0f71a2f6 | 2715 | { |
8de9bdc4 | 2716 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 2717 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
2718 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_bytes called\n"); |
2719 | return gdbarch->deprecated_register_bytes; | |
0f71a2f6 JM |
2720 | } |
2721 | ||
2722 | void | |
9c04cab7 AC |
2723 | set_gdbarch_deprecated_register_bytes (struct gdbarch *gdbarch, |
2724 | int deprecated_register_bytes) | |
0f71a2f6 | 2725 | { |
9c04cab7 | 2726 | gdbarch->deprecated_register_bytes = deprecated_register_bytes; |
0f71a2f6 JM |
2727 | } |
2728 | ||
2729 | int | |
9c04cab7 | 2730 | gdbarch_deprecated_register_byte_p (struct gdbarch *gdbarch) |
a0ed5532 AC |
2731 | { |
2732 | gdb_assert (gdbarch != NULL); | |
9c04cab7 | 2733 | return gdbarch->deprecated_register_byte != generic_register_byte; |
a0ed5532 AC |
2734 | } |
2735 | ||
2736 | int | |
9c04cab7 | 2737 | gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 2738 | { |
8de9bdc4 | 2739 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2740 | gdb_assert (gdbarch->deprecated_register_byte != NULL); |
2741 | /* Do not check predicate: gdbarch->deprecated_register_byte != generic_register_byte, allow call. */ | |
0f71a2f6 | 2742 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
2743 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_byte called\n"); |
2744 | return gdbarch->deprecated_register_byte (reg_nr); | |
0f71a2f6 JM |
2745 | } |
2746 | ||
2747 | void | |
9c04cab7 AC |
2748 | set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, |
2749 | gdbarch_deprecated_register_byte_ftype deprecated_register_byte) | |
0f71a2f6 | 2750 | { |
9c04cab7 | 2751 | gdbarch->deprecated_register_byte = deprecated_register_byte; |
0f71a2f6 JM |
2752 | } |
2753 | ||
dadd712e AC |
2754 | int |
2755 | gdbarch_deprecated_register_raw_size_p (struct gdbarch *gdbarch) | |
2756 | { | |
2757 | gdb_assert (gdbarch != NULL); | |
2758 | return gdbarch->deprecated_register_raw_size != generic_register_size; | |
2759 | } | |
2760 | ||
0f71a2f6 | 2761 | int |
9c04cab7 | 2762 | gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 2763 | { |
8de9bdc4 | 2764 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2765 | gdb_assert (gdbarch->deprecated_register_raw_size != NULL); |
2766 | /* Do not check predicate: gdbarch->deprecated_register_raw_size != generic_register_size, allow call. */ | |
0f71a2f6 | 2767 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
2768 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_raw_size called\n"); |
2769 | return gdbarch->deprecated_register_raw_size (reg_nr); | |
0f71a2f6 JM |
2770 | } |
2771 | ||
2772 | void | |
9c04cab7 AC |
2773 | set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, |
2774 | gdbarch_deprecated_register_raw_size_ftype deprecated_register_raw_size) | |
0f71a2f6 | 2775 | { |
9c04cab7 | 2776 | gdbarch->deprecated_register_raw_size = deprecated_register_raw_size; |
0f71a2f6 JM |
2777 | } |
2778 | ||
dadd712e AC |
2779 | int |
2780 | gdbarch_deprecated_register_virtual_size_p (struct gdbarch *gdbarch) | |
2781 | { | |
2782 | gdb_assert (gdbarch != NULL); | |
2783 | return gdbarch->deprecated_register_virtual_size != generic_register_size; | |
2784 | } | |
2785 | ||
0f71a2f6 | 2786 | int |
9c04cab7 | 2787 | gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 2788 | { |
8de9bdc4 | 2789 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
2790 | gdb_assert (gdbarch->deprecated_register_virtual_size != NULL); |
2791 | /* Do not check predicate: gdbarch->deprecated_register_virtual_size != generic_register_size, allow call. */ | |
0f71a2f6 | 2792 | if (gdbarch_debug >= 2) |
9c04cab7 AC |
2793 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_virtual_size called\n"); |
2794 | return gdbarch->deprecated_register_virtual_size (reg_nr); | |
0f71a2f6 JM |
2795 | } |
2796 | ||
2797 | void | |
9c04cab7 AC |
2798 | set_gdbarch_deprecated_register_virtual_size (struct gdbarch *gdbarch, |
2799 | gdbarch_deprecated_register_virtual_size_ftype deprecated_register_virtual_size) | |
0f71a2f6 | 2800 | { |
9c04cab7 | 2801 | gdbarch->deprecated_register_virtual_size = deprecated_register_virtual_size; |
0f71a2f6 JM |
2802 | } |
2803 | ||
f3be58bc AC |
2804 | int |
2805 | gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch) | |
2806 | { | |
2807 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2808 | return gdbarch->unwind_dummy_id != NULL; |
f3be58bc AC |
2809 | } |
2810 | ||
2811 | struct frame_id | |
2812 | gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info) | |
2813 | { | |
2814 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2815 | gdb_assert (gdbarch->unwind_dummy_id != NULL); |
f3be58bc AC |
2816 | if (gdbarch_debug >= 2) |
2817 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n"); | |
2818 | return gdbarch->unwind_dummy_id (gdbarch, info); | |
2819 | } | |
2820 | ||
2821 | void | |
2822 | set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, | |
2823 | gdbarch_unwind_dummy_id_ftype unwind_dummy_id) | |
2824 | { | |
2825 | gdbarch->unwind_dummy_id = unwind_dummy_id; | |
2826 | } | |
2827 | ||
2828 | int | |
a59fe496 | 2829 | gdbarch_deprecated_save_dummy_frame_tos_p (struct gdbarch *gdbarch) |
f3be58bc AC |
2830 | { |
2831 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2832 | return gdbarch->deprecated_save_dummy_frame_tos != NULL; |
f3be58bc AC |
2833 | } |
2834 | ||
2835 | void | |
a59fe496 | 2836 | gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) |
f3be58bc AC |
2837 | { |
2838 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2839 | gdb_assert (gdbarch->deprecated_save_dummy_frame_tos != NULL); |
f3be58bc | 2840 | if (gdbarch_debug >= 2) |
a59fe496 AC |
2841 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_save_dummy_frame_tos called\n"); |
2842 | gdbarch->deprecated_save_dummy_frame_tos (sp); | |
f3be58bc AC |
2843 | } |
2844 | ||
2845 | void | |
a59fe496 AC |
2846 | set_gdbarch_deprecated_save_dummy_frame_tos (struct gdbarch *gdbarch, |
2847 | gdbarch_deprecated_save_dummy_frame_tos_ftype deprecated_save_dummy_frame_tos) | |
f3be58bc | 2848 | { |
a59fe496 | 2849 | gdbarch->deprecated_save_dummy_frame_tos = deprecated_save_dummy_frame_tos; |
f3be58bc AC |
2850 | } |
2851 | ||
2852 | int | |
2853 | gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch) | |
2854 | { | |
2855 | gdb_assert (gdbarch != NULL); | |
2856 | /* Skip verify of deprecated_fp_regnum, invalid_p == 0 */ | |
2857 | if (gdbarch_debug >= 2) | |
2858 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fp_regnum called\n"); | |
2859 | return gdbarch->deprecated_fp_regnum; | |
2860 | } | |
2861 | ||
2862 | void | |
2863 | set_gdbarch_deprecated_fp_regnum (struct gdbarch *gdbarch, | |
2864 | int deprecated_fp_regnum) | |
2865 | { | |
2866 | gdbarch->deprecated_fp_regnum = deprecated_fp_regnum; | |
2867 | } | |
2868 | ||
2869 | int | |
2870 | gdbarch_deprecated_target_read_fp_p (struct gdbarch *gdbarch) | |
2871 | { | |
2872 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2873 | return gdbarch->deprecated_target_read_fp != NULL; |
f3be58bc AC |
2874 | } |
2875 | ||
2876 | CORE_ADDR | |
2877 | gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch) | |
2878 | { | |
2879 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2880 | gdb_assert (gdbarch->deprecated_target_read_fp != NULL); |
f3be58bc AC |
2881 | if (gdbarch_debug >= 2) |
2882 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_target_read_fp called\n"); | |
2883 | return gdbarch->deprecated_target_read_fp (); | |
2884 | } | |
2885 | ||
2886 | void | |
2887 | set_gdbarch_deprecated_target_read_fp (struct gdbarch *gdbarch, | |
2888 | gdbarch_deprecated_target_read_fp_ftype deprecated_target_read_fp) | |
2889 | { | |
2890 | gdbarch->deprecated_target_read_fp = deprecated_target_read_fp; | |
2891 | } | |
2892 | ||
0ab7a791 | 2893 | int |
b8de8283 | 2894 | gdbarch_push_dummy_call_p (struct gdbarch *gdbarch) |
0ab7a791 AC |
2895 | { |
2896 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2897 | return gdbarch->push_dummy_call != NULL; |
0ab7a791 AC |
2898 | } |
2899 | ||
b8de8283 | 2900 | CORE_ADDR |
7d9b040b | 2901 | gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) |
666e11c5 | 2902 | { |
8de9bdc4 | 2903 | gdb_assert (gdbarch != NULL); |
956ac328 | 2904 | gdb_assert (gdbarch->push_dummy_call != NULL); |
666e11c5 | 2905 | if (gdbarch_debug >= 2) |
b8de8283 | 2906 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n"); |
7d9b040b | 2907 | return gdbarch->push_dummy_call (gdbarch, function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr); |
666e11c5 EZ |
2908 | } |
2909 | ||
2910 | void | |
b8de8283 AC |
2911 | set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, |
2912 | gdbarch_push_dummy_call_ftype push_dummy_call) | |
666e11c5 | 2913 | { |
b8de8283 | 2914 | gdbarch->push_dummy_call = push_dummy_call; |
666e11c5 EZ |
2915 | } |
2916 | ||
b8de8283 AC |
2917 | int |
2918 | gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch) | |
0ab7a791 AC |
2919 | { |
2920 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2921 | return gdbarch->deprecated_push_arguments != NULL; |
b8de8283 AC |
2922 | } |
2923 | ||
2924 | CORE_ADDR | |
2925 | gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) | |
2926 | { | |
2927 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2928 | gdb_assert (gdbarch->deprecated_push_arguments != NULL); |
0ab7a791 | 2929 | if (gdbarch_debug >= 2) |
b8de8283 AC |
2930 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n"); |
2931 | return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr); | |
0ab7a791 AC |
2932 | } |
2933 | ||
2934 | void | |
b8de8283 AC |
2935 | set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, |
2936 | gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments) | |
0ab7a791 | 2937 | { |
b8de8283 | 2938 | gdbarch->deprecated_push_arguments = deprecated_push_arguments; |
0ab7a791 AC |
2939 | } |
2940 | ||
b8de8283 AC |
2941 | int |
2942 | gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch) | |
5e74b15c | 2943 | { |
8de9bdc4 | 2944 | gdb_assert (gdbarch != NULL); |
956ac328 | 2945 | return gdbarch->deprecated_push_return_address != NULL; |
b8de8283 AC |
2946 | } |
2947 | ||
2948 | CORE_ADDR | |
2949 | gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp) | |
2950 | { | |
2951 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2952 | gdb_assert (gdbarch->deprecated_push_return_address != NULL); |
5e74b15c | 2953 | if (gdbarch_debug >= 2) |
b8de8283 AC |
2954 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n"); |
2955 | return gdbarch->deprecated_push_return_address (pc, sp); | |
5e74b15c RE |
2956 | } |
2957 | ||
2958 | void | |
b8de8283 AC |
2959 | set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, |
2960 | gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address) | |
5e74b15c | 2961 | { |
b8de8283 | 2962 | gdbarch->deprecated_push_return_address = deprecated_push_return_address; |
5e74b15c RE |
2963 | } |
2964 | ||
e76f1f2e | 2965 | int |
b8de8283 | 2966 | gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch) |
e76f1f2e AC |
2967 | { |
2968 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2969 | return gdbarch->deprecated_dummy_write_sp != NULL; |
e76f1f2e AC |
2970 | } |
2971 | ||
2972 | void | |
b8de8283 | 2973 | gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val) |
e76f1f2e AC |
2974 | { |
2975 | gdb_assert (gdbarch != NULL); | |
956ac328 | 2976 | gdb_assert (gdbarch->deprecated_dummy_write_sp != NULL); |
e76f1f2e | 2977 | if (gdbarch_debug >= 2) |
b8de8283 AC |
2978 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n"); |
2979 | gdbarch->deprecated_dummy_write_sp (val); | |
e76f1f2e AC |
2980 | } |
2981 | ||
2982 | void | |
b8de8283 AC |
2983 | set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, |
2984 | gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp) | |
e76f1f2e | 2985 | { |
b8de8283 | 2986 | gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp; |
e76f1f2e AC |
2987 | } |
2988 | ||
7c7651b2 | 2989 | int |
b8de8283 | 2990 | gdbarch_deprecated_register_size (struct gdbarch *gdbarch) |
7c7651b2 | 2991 | { |
8de9bdc4 | 2992 | gdb_assert (gdbarch != NULL); |
7c7651b2 | 2993 | if (gdbarch_debug >= 2) |
b8de8283 AC |
2994 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n"); |
2995 | return gdbarch->deprecated_register_size; | |
7c7651b2 AC |
2996 | } |
2997 | ||
2998 | void | |
b8de8283 AC |
2999 | set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, |
3000 | int deprecated_register_size) | |
7c7651b2 | 3001 | { |
b8de8283 | 3002 | gdbarch->deprecated_register_size = deprecated_register_size; |
7c7651b2 AC |
3003 | } |
3004 | ||
2649061d | 3005 | int |
b8de8283 | 3006 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
2649061d | 3007 | { |
8de9bdc4 | 3008 | gdb_assert (gdbarch != NULL); |
b8de8283 AC |
3009 | /* Skip verify of call_dummy_location, invalid_p == 0 */ |
3010 | if (gdbarch_debug >= 2) | |
3011 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); | |
3012 | return gdbarch->call_dummy_location; | |
2649061d AC |
3013 | } |
3014 | ||
b8de8283 AC |
3015 | void |
3016 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, | |
3017 | int call_dummy_location) | |
3018 | { | |
3019 | gdbarch->call_dummy_location = call_dummy_location; | |
3020 | } | |
3021 | ||
0f71a2f6 | 3022 | int |
b8de8283 | 3023 | gdbarch_push_dummy_code_p (struct gdbarch *gdbarch) |
0f71a2f6 | 3024 | { |
8de9bdc4 | 3025 | gdb_assert (gdbarch != NULL); |
956ac328 | 3026 | return gdbarch->push_dummy_code != NULL; |
b8de8283 AC |
3027 | } |
3028 | ||
3029 | CORE_ADDR | |
3030 | 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) | |
3031 | { | |
3032 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3033 | gdb_assert (gdbarch->push_dummy_code != NULL); |
0f71a2f6 | 3034 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3035 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_code called\n"); |
3036 | return gdbarch->push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr); | |
0f71a2f6 JM |
3037 | } |
3038 | ||
3039 | void | |
b8de8283 AC |
3040 | set_gdbarch_push_dummy_code (struct gdbarch *gdbarch, |
3041 | gdbarch_push_dummy_code_ftype push_dummy_code) | |
0f71a2f6 | 3042 | { |
b8de8283 | 3043 | gdbarch->push_dummy_code = push_dummy_code; |
0f71a2f6 JM |
3044 | } |
3045 | ||
b8de8283 AC |
3046 | int |
3047 | gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch) | |
0f71a2f6 | 3048 | { |
8de9bdc4 | 3049 | gdb_assert (gdbarch != NULL); |
956ac328 | 3050 | return gdbarch->deprecated_do_registers_info != NULL; |
b8de8283 AC |
3051 | } |
3052 | ||
3053 | void | |
3054 | gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) | |
3055 | { | |
3056 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3057 | gdb_assert (gdbarch->deprecated_do_registers_info != NULL); |
0f71a2f6 | 3058 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3059 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n"); |
3060 | gdbarch->deprecated_do_registers_info (reg_nr, fpregs); | |
0f71a2f6 JM |
3061 | } |
3062 | ||
3063 | void | |
b8de8283 AC |
3064 | set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, |
3065 | gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info) | |
0f71a2f6 | 3066 | { |
b8de8283 AC |
3067 | gdbarch->deprecated_do_registers_info = deprecated_do_registers_info; |
3068 | } | |
3069 | ||
3070 | void | |
3071 | gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all) | |
3072 | { | |
3073 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3074 | gdb_assert (gdbarch->print_registers_info != NULL); |
b8de8283 AC |
3075 | if (gdbarch_debug >= 2) |
3076 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n"); | |
3077 | gdbarch->print_registers_info (gdbarch, file, frame, regnum, all); | |
3078 | } | |
3079 | ||
3080 | void | |
3081 | set_gdbarch_print_registers_info (struct gdbarch *gdbarch, | |
3082 | gdbarch_print_registers_info_ftype print_registers_info) | |
3083 | { | |
3084 | gdbarch->print_registers_info = print_registers_info; | |
0f71a2f6 JM |
3085 | } |
3086 | ||
0f71a2f6 | 3087 | int |
b8de8283 AC |
3088 | gdbarch_print_float_info_p (struct gdbarch *gdbarch) |
3089 | { | |
3090 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3091 | return gdbarch->print_float_info != NULL; |
b8de8283 AC |
3092 | } |
3093 | ||
3094 | void | |
3095 | gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
0f71a2f6 | 3096 | { |
8de9bdc4 | 3097 | gdb_assert (gdbarch != NULL); |
956ac328 | 3098 | gdb_assert (gdbarch->print_float_info != NULL); |
0f71a2f6 | 3099 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3100 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n"); |
3101 | gdbarch->print_float_info (gdbarch, file, frame, args); | |
0f71a2f6 JM |
3102 | } |
3103 | ||
3104 | void | |
b8de8283 AC |
3105 | set_gdbarch_print_float_info (struct gdbarch *gdbarch, |
3106 | gdbarch_print_float_info_ftype print_float_info) | |
0f71a2f6 | 3107 | { |
b8de8283 AC |
3108 | gdbarch->print_float_info = print_float_info; |
3109 | } | |
3110 | ||
3111 | int | |
3112 | gdbarch_print_vector_info_p (struct gdbarch *gdbarch) | |
3113 | { | |
3114 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3115 | return gdbarch->print_vector_info != NULL; |
b8de8283 AC |
3116 | } |
3117 | ||
3118 | void | |
3119 | gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args) | |
3120 | { | |
3121 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3122 | gdb_assert (gdbarch->print_vector_info != NULL); |
b8de8283 AC |
3123 | if (gdbarch_debug >= 2) |
3124 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n"); | |
3125 | gdbarch->print_vector_info (gdbarch, file, frame, args); | |
0f71a2f6 JM |
3126 | } |
3127 | ||
b8de8283 AC |
3128 | void |
3129 | set_gdbarch_print_vector_info (struct gdbarch *gdbarch, | |
3130 | gdbarch_print_vector_info_ftype print_vector_info) | |
ae45cd16 | 3131 | { |
b8de8283 | 3132 | gdbarch->print_vector_info = print_vector_info; |
ae45cd16 AC |
3133 | } |
3134 | ||
3135 | int | |
b8de8283 | 3136 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) |
0f71a2f6 | 3137 | { |
8de9bdc4 | 3138 | gdb_assert (gdbarch != NULL); |
956ac328 | 3139 | gdb_assert (gdbarch->register_sim_regno != NULL); |
0f71a2f6 | 3140 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3141 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); |
3142 | return gdbarch->register_sim_regno (reg_nr); | |
0f71a2f6 JM |
3143 | } |
3144 | ||
3145 | void | |
b8de8283 AC |
3146 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, |
3147 | gdbarch_register_sim_regno_ftype register_sim_regno) | |
0f71a2f6 | 3148 | { |
b8de8283 | 3149 | gdbarch->register_sim_regno = register_sim_regno; |
0f71a2f6 JM |
3150 | } |
3151 | ||
b8de8283 AC |
3152 | int |
3153 | gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch) | |
0f71a2f6 | 3154 | { |
8de9bdc4 | 3155 | gdb_assert (gdbarch != NULL); |
956ac328 | 3156 | return gdbarch->register_bytes_ok != NULL; |
0f71a2f6 JM |
3157 | } |
3158 | ||
3159 | int | |
b8de8283 | 3160 | gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes) |
0f71a2f6 | 3161 | { |
8de9bdc4 | 3162 | gdb_assert (gdbarch != NULL); |
956ac328 | 3163 | gdb_assert (gdbarch->register_bytes_ok != NULL); |
0f71a2f6 | 3164 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3165 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n"); |
3166 | return gdbarch->register_bytes_ok (nr_bytes); | |
0f71a2f6 JM |
3167 | } |
3168 | ||
3169 | void | |
b8de8283 AC |
3170 | set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, |
3171 | gdbarch_register_bytes_ok_ftype register_bytes_ok) | |
0f71a2f6 | 3172 | { |
b8de8283 | 3173 | gdbarch->register_bytes_ok = register_bytes_ok; |
0f71a2f6 JM |
3174 | } |
3175 | ||
3176 | int | |
b8de8283 | 3177 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
0f71a2f6 | 3178 | { |
8de9bdc4 | 3179 | gdb_assert (gdbarch != NULL); |
956ac328 | 3180 | gdb_assert (gdbarch->cannot_fetch_register != NULL); |
b8de8283 AC |
3181 | if (gdbarch_debug >= 2) |
3182 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); | |
3183 | return gdbarch->cannot_fetch_register (regnum); | |
3184 | } | |
3185 | ||
3186 | void | |
3187 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, | |
3188 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) | |
3189 | { | |
3190 | gdbarch->cannot_fetch_register = cannot_fetch_register; | |
0f71a2f6 JM |
3191 | } |
3192 | ||
3193 | int | |
b8de8283 | 3194 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
0f71a2f6 | 3195 | { |
8de9bdc4 | 3196 | gdb_assert (gdbarch != NULL); |
956ac328 | 3197 | gdb_assert (gdbarch->cannot_store_register != NULL); |
0f71a2f6 | 3198 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3199 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); |
3200 | return gdbarch->cannot_store_register (regnum); | |
0f71a2f6 JM |
3201 | } |
3202 | ||
3203 | void | |
b8de8283 AC |
3204 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, |
3205 | gdbarch_cannot_store_register_ftype cannot_store_register) | |
0f71a2f6 | 3206 | { |
b8de8283 | 3207 | gdbarch->cannot_store_register = cannot_store_register; |
0f71a2f6 JM |
3208 | } |
3209 | ||
e8ab51f7 | 3210 | int |
b8de8283 | 3211 | gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch) |
e8ab51f7 AC |
3212 | { |
3213 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3214 | return gdbarch->get_longjmp_target != NULL; |
e8ab51f7 AC |
3215 | } |
3216 | ||
b8de8283 AC |
3217 | int |
3218 | gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc) | |
0f71a2f6 | 3219 | { |
8de9bdc4 | 3220 | gdb_assert (gdbarch != NULL); |
956ac328 | 3221 | gdb_assert (gdbarch->get_longjmp_target != NULL); |
0f71a2f6 | 3222 | if (gdbarch_debug >= 2) |
b8de8283 AC |
3223 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n"); |
3224 | return gdbarch->get_longjmp_target (pc); | |
0f71a2f6 JM |
3225 | } |
3226 | ||
3227 | void | |
b8de8283 AC |
3228 | set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch, |
3229 | gdbarch_get_longjmp_target_ftype get_longjmp_target) | |
0f71a2f6 | 3230 | { |
b8de8283 | 3231 | gdbarch->get_longjmp_target = get_longjmp_target; |
0f71a2f6 JM |
3232 | } |
3233 | ||
a5afb99f AC |
3234 | int |
3235 | gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch) | |
3236 | { | |
3237 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3238 | return gdbarch->deprecated_init_frame_pc != NULL; |
a5afb99f AC |
3239 | } |
3240 | ||
97f46953 | 3241 | CORE_ADDR |
a5afb99f | 3242 | gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) |
10312cc4 | 3243 | { |
8de9bdc4 | 3244 | gdb_assert (gdbarch != NULL); |
956ac328 | 3245 | gdb_assert (gdbarch->deprecated_init_frame_pc != NULL); |
10312cc4 | 3246 | if (gdbarch_debug >= 2) |
a5afb99f AC |
3247 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n"); |
3248 | return gdbarch->deprecated_init_frame_pc (fromleaf, prev); | |
10312cc4 AC |
3249 | } |
3250 | ||
3251 | void | |
a5afb99f AC |
3252 | set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, |
3253 | gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc) | |
10312cc4 | 3254 | { |
a5afb99f | 3255 | gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc; |
10312cc4 AC |
3256 | } |
3257 | ||
0f71a2f6 | 3258 | int |
104c1213 | 3259 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
0f71a2f6 | 3260 | { |
8de9bdc4 | 3261 | gdb_assert (gdbarch != NULL); |
0f71a2f6 | 3262 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3263 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
3264 | return gdbarch->believe_pcc_promotion; | |
3265 | } | |
3266 | ||
3267 | void | |
104c1213 JM |
3268 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
3269 | int believe_pcc_promotion) | |
0f71a2f6 JM |
3270 | { |
3271 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; | |
3272 | } | |
3273 | ||
a216a322 | 3274 | int |
129c1cd6 | 3275 | gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch) |
a216a322 AC |
3276 | { |
3277 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3278 | return gdbarch->deprecated_get_saved_register != NULL; |
a216a322 AC |
3279 | } |
3280 | ||
0f71a2f6 | 3281 | void |
129c1cd6 | 3282 | 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 | 3283 | { |
8de9bdc4 | 3284 | gdb_assert (gdbarch != NULL); |
956ac328 | 3285 | gdb_assert (gdbarch->deprecated_get_saved_register != NULL); |
0f71a2f6 | 3286 | if (gdbarch_debug >= 2) |
129c1cd6 AC |
3287 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n"); |
3288 | gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval); | |
0f71a2f6 JM |
3289 | } |
3290 | ||
3291 | void | |
129c1cd6 AC |
3292 | set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch, |
3293 | gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register) | |
0f71a2f6 | 3294 | { |
129c1cd6 | 3295 | gdbarch->deprecated_get_saved_register = deprecated_get_saved_register; |
0f71a2f6 JM |
3296 | } |
3297 | ||
13d01224 | 3298 | int |
ff2e87ac | 3299 | gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type) |
13d01224 AC |
3300 | { |
3301 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3302 | gdb_assert (gdbarch->convert_register_p != NULL); |
13d01224 AC |
3303 | if (gdbarch_debug >= 2) |
3304 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n"); | |
ff2e87ac | 3305 | return gdbarch->convert_register_p (regnum, type); |
13d01224 AC |
3306 | } |
3307 | ||
3308 | void | |
3309 | set_gdbarch_convert_register_p (struct gdbarch *gdbarch, | |
3310 | gdbarch_convert_register_p_ftype convert_register_p) | |
3311 | { | |
3312 | gdbarch->convert_register_p = convert_register_p; | |
3313 | } | |
3314 | ||
3315 | void | |
ff2e87ac | 3316 | gdbarch_register_to_value (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, void *buf) |
13d01224 AC |
3317 | { |
3318 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3319 | gdb_assert (gdbarch->register_to_value != NULL); |
13d01224 AC |
3320 | if (gdbarch_debug >= 2) |
3321 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n"); | |
ff2e87ac | 3322 | gdbarch->register_to_value (frame, regnum, type, buf); |
13d01224 AC |
3323 | } |
3324 | ||
3325 | void | |
3326 | set_gdbarch_register_to_value (struct gdbarch *gdbarch, | |
3327 | gdbarch_register_to_value_ftype register_to_value) | |
3328 | { | |
3329 | gdbarch->register_to_value = register_to_value; | |
3330 | } | |
3331 | ||
3332 | void | |
ff2e87ac | 3333 | gdbarch_value_to_register (struct gdbarch *gdbarch, struct frame_info *frame, int regnum, struct type *type, const void *buf) |
13d01224 AC |
3334 | { |
3335 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3336 | gdb_assert (gdbarch->value_to_register != NULL); |
13d01224 AC |
3337 | if (gdbarch_debug >= 2) |
3338 | fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n"); | |
ff2e87ac | 3339 | gdbarch->value_to_register (frame, regnum, type, buf); |
13d01224 AC |
3340 | } |
3341 | ||
3342 | void | |
3343 | set_gdbarch_value_to_register (struct gdbarch *gdbarch, | |
3344 | gdbarch_value_to_register_ftype value_to_register) | |
3345 | { | |
3346 | gdbarch->value_to_register = value_to_register; | |
3347 | } | |
3348 | ||
4478b372 | 3349 | CORE_ADDR |
66140c26 | 3350 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf) |
4478b372 | 3351 | { |
8de9bdc4 | 3352 | gdb_assert (gdbarch != NULL); |
956ac328 | 3353 | gdb_assert (gdbarch->pointer_to_address != NULL); |
4478b372 JB |
3354 | if (gdbarch_debug >= 2) |
3355 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); | |
3356 | return gdbarch->pointer_to_address (type, buf); | |
3357 | } | |
3358 | ||
3359 | void | |
3360 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, | |
3361 | gdbarch_pointer_to_address_ftype pointer_to_address) | |
3362 | { | |
3363 | gdbarch->pointer_to_address = pointer_to_address; | |
3364 | } | |
3365 | ||
3366 | void | |
ac2e2ef7 | 3367 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr) |
4478b372 | 3368 | { |
8de9bdc4 | 3369 | gdb_assert (gdbarch != NULL); |
956ac328 | 3370 | gdb_assert (gdbarch->address_to_pointer != NULL); |
4478b372 JB |
3371 | if (gdbarch_debug >= 2) |
3372 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); | |
3373 | gdbarch->address_to_pointer (type, buf, addr); | |
3374 | } | |
3375 | ||
3376 | void | |
3377 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, | |
3378 | gdbarch_address_to_pointer_ftype address_to_pointer) | |
3379 | { | |
3380 | gdbarch->address_to_pointer = address_to_pointer; | |
3381 | } | |
3382 | ||
fc0c74b1 AC |
3383 | int |
3384 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) | |
3385 | { | |
8de9bdc4 | 3386 | gdb_assert (gdbarch != NULL); |
956ac328 | 3387 | return gdbarch->integer_to_address != NULL; |
fc0c74b1 AC |
3388 | } |
3389 | ||
3390 | CORE_ADDR | |
3391 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) | |
3392 | { | |
8de9bdc4 | 3393 | gdb_assert (gdbarch != NULL); |
956ac328 | 3394 | gdb_assert (gdbarch->integer_to_address != NULL); |
fc0c74b1 AC |
3395 | if (gdbarch_debug >= 2) |
3396 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); | |
3397 | return gdbarch->integer_to_address (type, buf); | |
3398 | } | |
3399 | ||
3400 | void | |
3401 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, | |
3402 | gdbarch_integer_to_address_ftype integer_to_address) | |
3403 | { | |
3404 | gdbarch->integer_to_address = integer_to_address; | |
3405 | } | |
3406 | ||
dedc2a2b | 3407 | int |
749b82f6 | 3408 | gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch) |
dedc2a2b AC |
3409 | { |
3410 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3411 | return gdbarch->deprecated_pop_frame != NULL; |
dedc2a2b AC |
3412 | } |
3413 | ||
0f71a2f6 | 3414 | void |
749b82f6 | 3415 | gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch) |
0f71a2f6 | 3416 | { |
8de9bdc4 | 3417 | gdb_assert (gdbarch != NULL); |
956ac328 | 3418 | gdb_assert (gdbarch->deprecated_pop_frame != NULL); |
0f71a2f6 | 3419 | if (gdbarch_debug >= 2) |
749b82f6 AC |
3420 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n"); |
3421 | gdbarch->deprecated_pop_frame (); | |
0f71a2f6 JM |
3422 | } |
3423 | ||
3424 | void | |
749b82f6 AC |
3425 | set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch, |
3426 | gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame) | |
0f71a2f6 | 3427 | { |
749b82f6 | 3428 | gdbarch->deprecated_pop_frame = deprecated_pop_frame; |
0f71a2f6 JM |
3429 | } |
3430 | ||
4183d812 AC |
3431 | int |
3432 | gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch) | |
3433 | { | |
3434 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3435 | return gdbarch->deprecated_store_struct_return != NULL; |
4183d812 AC |
3436 | } |
3437 | ||
0f71a2f6 | 3438 | void |
4183d812 | 3439 | gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp) |
0f71a2f6 | 3440 | { |
8de9bdc4 | 3441 | gdb_assert (gdbarch != NULL); |
956ac328 | 3442 | gdb_assert (gdbarch->deprecated_store_struct_return != NULL); |
0f71a2f6 | 3443 | if (gdbarch_debug >= 2) |
4183d812 AC |
3444 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n"); |
3445 | gdbarch->deprecated_store_struct_return (addr, sp); | |
0f71a2f6 JM |
3446 | } |
3447 | ||
3448 | void | |
4183d812 AC |
3449 | set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, |
3450 | gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return) | |
0f71a2f6 | 3451 | { |
4183d812 | 3452 | gdbarch->deprecated_store_struct_return = deprecated_store_struct_return; |
0f71a2f6 JM |
3453 | } |
3454 | ||
92ad9cd9 AC |
3455 | int |
3456 | gdbarch_return_value_p (struct gdbarch *gdbarch) | |
3457 | { | |
3458 | gdb_assert (gdbarch != NULL); | |
3459 | return gdbarch->return_value != NULL; | |
3460 | } | |
3461 | ||
3462 | enum return_value_convention | |
963e2bb7 | 3463 | gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf) |
92ad9cd9 AC |
3464 | { |
3465 | gdb_assert (gdbarch != NULL); | |
3466 | gdb_assert (gdbarch->return_value != NULL); | |
3467 | if (gdbarch_debug >= 2) | |
3468 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n"); | |
963e2bb7 | 3469 | return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf); |
92ad9cd9 AC |
3470 | } |
3471 | ||
3472 | void | |
3473 | set_gdbarch_return_value (struct gdbarch *gdbarch, | |
3474 | gdbarch_return_value_ftype return_value) | |
3475 | { | |
3476 | gdbarch->return_value = return_value; | |
3477 | } | |
3478 | ||
0f71a2f6 | 3479 | void |
ebba8386 AC |
3480 | gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf) |
3481 | { | |
3482 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3483 | gdb_assert (gdbarch->extract_return_value != NULL); |
ebba8386 AC |
3484 | if (gdbarch_debug >= 2) |
3485 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n"); | |
3486 | gdbarch->extract_return_value (type, regcache, valbuf); | |
3487 | } | |
3488 | ||
3489 | void | |
3490 | set_gdbarch_extract_return_value (struct gdbarch *gdbarch, | |
3491 | gdbarch_extract_return_value_ftype extract_return_value) | |
3492 | { | |
3493 | gdbarch->extract_return_value = extract_return_value; | |
3494 | } | |
3495 | ||
3496 | void | |
3497 | gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf) | |
0f71a2f6 | 3498 | { |
8de9bdc4 | 3499 | gdb_assert (gdbarch != NULL); |
956ac328 | 3500 | gdb_assert (gdbarch->store_return_value != NULL); |
0f71a2f6 | 3501 | if (gdbarch_debug >= 2) |
0f71a2f6 | 3502 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n"); |
ebba8386 | 3503 | gdbarch->store_return_value (type, regcache, valbuf); |
0f71a2f6 JM |
3504 | } |
3505 | ||
3506 | void | |
104c1213 JM |
3507 | set_gdbarch_store_return_value (struct gdbarch *gdbarch, |
3508 | gdbarch_store_return_value_ftype store_return_value) | |
0f71a2f6 JM |
3509 | { |
3510 | gdbarch->store_return_value = store_return_value; | |
3511 | } | |
3512 | ||
ebba8386 AC |
3513 | void |
3514 | gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) | |
3515 | { | |
3516 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3517 | gdb_assert (gdbarch->deprecated_extract_return_value != NULL); |
ebba8386 AC |
3518 | if (gdbarch_debug >= 2) |
3519 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n"); | |
3520 | gdbarch->deprecated_extract_return_value (type, regbuf, valbuf); | |
3521 | } | |
3522 | ||
3523 | void | |
3524 | set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, | |
3525 | gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value) | |
3526 | { | |
3527 | gdbarch->deprecated_extract_return_value = deprecated_extract_return_value; | |
3528 | } | |
3529 | ||
3530 | void | |
3531 | gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf) | |
3532 | { | |
3533 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3534 | gdb_assert (gdbarch->deprecated_store_return_value != NULL); |
ebba8386 AC |
3535 | if (gdbarch_debug >= 2) |
3536 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n"); | |
3537 | gdbarch->deprecated_store_return_value (type, valbuf); | |
3538 | } | |
3539 | ||
3540 | void | |
3541 | set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, | |
3542 | gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value) | |
3543 | { | |
3544 | gdbarch->deprecated_store_return_value = deprecated_store_return_value; | |
3545 | } | |
3546 | ||
92ad9cd9 AC |
3547 | int |
3548 | gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type) | |
3549 | { | |
3550 | gdb_assert (gdbarch != NULL); | |
3551 | gdb_assert (gdbarch->use_struct_convention != NULL); | |
3552 | if (gdbarch_debug >= 2) | |
3553 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n"); | |
3554 | return gdbarch->use_struct_convention (gcc_p, value_type); | |
3555 | } | |
3556 | ||
3557 | void | |
3558 | set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, | |
3559 | gdbarch_use_struct_convention_ftype use_struct_convention) | |
3560 | { | |
3561 | gdbarch->use_struct_convention = use_struct_convention; | |
3562 | } | |
3563 | ||
049ee0e4 | 3564 | int |
74055713 | 3565 | gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch) |
049ee0e4 AC |
3566 | { |
3567 | gdb_assert (gdbarch != NULL); | |
74055713 | 3568 | return gdbarch->deprecated_extract_struct_value_address != NULL; |
049ee0e4 AC |
3569 | } |
3570 | ||
3571 | CORE_ADDR | |
74055713 | 3572 | gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache) |
049ee0e4 AC |
3573 | { |
3574 | gdb_assert (gdbarch != NULL); | |
74055713 | 3575 | gdb_assert (gdbarch->deprecated_extract_struct_value_address != NULL); |
049ee0e4 | 3576 | if (gdbarch_debug >= 2) |
74055713 AC |
3577 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n"); |
3578 | return gdbarch->deprecated_extract_struct_value_address (regcache); | |
049ee0e4 AC |
3579 | } |
3580 | ||
3581 | void | |
74055713 AC |
3582 | set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, |
3583 | gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address) | |
049ee0e4 | 3584 | { |
74055713 | 3585 | gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address; |
049ee0e4 AC |
3586 | } |
3587 | ||
8f871025 | 3588 | int |
f30ee0bc | 3589 | gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch) |
8f871025 AC |
3590 | { |
3591 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3592 | return gdbarch->deprecated_frame_init_saved_regs != NULL; |
8f871025 AC |
3593 | } |
3594 | ||
0f71a2f6 | 3595 | void |
f30ee0bc | 3596 | gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame) |
0f71a2f6 | 3597 | { |
8de9bdc4 | 3598 | gdb_assert (gdbarch != NULL); |
956ac328 | 3599 | gdb_assert (gdbarch->deprecated_frame_init_saved_regs != NULL); |
0f71a2f6 | 3600 | if (gdbarch_debug >= 2) |
f30ee0bc AC |
3601 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n"); |
3602 | gdbarch->deprecated_frame_init_saved_regs (frame); | |
0f71a2f6 JM |
3603 | } |
3604 | ||
3605 | void | |
f30ee0bc AC |
3606 | set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, |
3607 | gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs) | |
0f71a2f6 | 3608 | { |
f30ee0bc | 3609 | gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs; |
0f71a2f6 JM |
3610 | } |
3611 | ||
5fdff426 | 3612 | int |
e9582e71 | 3613 | gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch) |
5fdff426 | 3614 | { |
8de9bdc4 | 3615 | gdb_assert (gdbarch != NULL); |
956ac328 | 3616 | return gdbarch->deprecated_init_extra_frame_info != NULL; |
5fdff426 AC |
3617 | } |
3618 | ||
0f71a2f6 | 3619 | void |
e9582e71 | 3620 | gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame) |
0f71a2f6 | 3621 | { |
8de9bdc4 | 3622 | gdb_assert (gdbarch != NULL); |
956ac328 | 3623 | gdb_assert (gdbarch->deprecated_init_extra_frame_info != NULL); |
0f71a2f6 | 3624 | if (gdbarch_debug >= 2) |
e9582e71 AC |
3625 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n"); |
3626 | gdbarch->deprecated_init_extra_frame_info (fromleaf, frame); | |
0f71a2f6 JM |
3627 | } |
3628 | ||
3629 | void | |
e9582e71 AC |
3630 | set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, |
3631 | gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info) | |
0f71a2f6 | 3632 | { |
e9582e71 | 3633 | gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info; |
0f71a2f6 JM |
3634 | } |
3635 | ||
3636 | CORE_ADDR | |
3637 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
3638 | { | |
8de9bdc4 | 3639 | gdb_assert (gdbarch != NULL); |
956ac328 | 3640 | gdb_assert (gdbarch->skip_prologue != NULL); |
0f71a2f6 | 3641 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3642 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
3643 | return gdbarch->skip_prologue (ip); | |
3644 | } | |
3645 | ||
3646 | void | |
104c1213 JM |
3647 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
3648 | gdbarch_skip_prologue_ftype skip_prologue) | |
0f71a2f6 JM |
3649 | { |
3650 | gdbarch->skip_prologue = skip_prologue; | |
3651 | } | |
3652 | ||
3653 | int | |
3654 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) | |
3655 | { | |
8de9bdc4 | 3656 | gdb_assert (gdbarch != NULL); |
956ac328 | 3657 | gdb_assert (gdbarch->inner_than != NULL); |
0f71a2f6 | 3658 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3659 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
3660 | return gdbarch->inner_than (lhs, rhs); | |
3661 | } | |
3662 | ||
3663 | void | |
104c1213 JM |
3664 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
3665 | gdbarch_inner_than_ftype inner_than) | |
0f71a2f6 JM |
3666 | { |
3667 | gdbarch->inner_than = inner_than; | |
3668 | } | |
3669 | ||
f4f9705a | 3670 | const unsigned char * |
adf40b2e | 3671 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
0f71a2f6 | 3672 | { |
8de9bdc4 | 3673 | gdb_assert (gdbarch != NULL); |
956ac328 | 3674 | gdb_assert (gdbarch->breakpoint_from_pc != NULL); |
0f71a2f6 | 3675 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3676 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
3677 | return gdbarch->breakpoint_from_pc (pcptr, lenptr); | |
3678 | } | |
3679 | ||
3680 | void | |
104c1213 JM |
3681 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
3682 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) | |
0f71a2f6 JM |
3683 | { |
3684 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; | |
3685 | } | |
3686 | ||
a1131521 KB |
3687 | int |
3688 | gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch) | |
3689 | { | |
3690 | gdb_assert (gdbarch != NULL); | |
3691 | return gdbarch->adjust_breakpoint_address != NULL; | |
3692 | } | |
3693 | ||
3694 | CORE_ADDR | |
3695 | gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr) | |
3696 | { | |
3697 | gdb_assert (gdbarch != NULL); | |
3698 | gdb_assert (gdbarch->adjust_breakpoint_address != NULL); | |
3699 | if (gdbarch_debug >= 2) | |
3700 | fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n"); | |
3701 | return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr); | |
3702 | } | |
3703 | ||
3704 | void | |
3705 | set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, | |
3706 | gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address) | |
3707 | { | |
3708 | gdbarch->adjust_breakpoint_address = adjust_breakpoint_address; | |
3709 | } | |
3710 | ||
917317f4 JM |
3711 | int |
3712 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
3713 | { | |
8de9bdc4 | 3714 | gdb_assert (gdbarch != NULL); |
956ac328 | 3715 | gdb_assert (gdbarch->memory_insert_breakpoint != NULL); |
917317f4 | 3716 | if (gdbarch_debug >= 2) |
917317f4 JM |
3717 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
3718 | return gdbarch->memory_insert_breakpoint (addr, contents_cache); | |
3719 | } | |
3720 | ||
3721 | void | |
3722 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, | |
3723 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) | |
3724 | { | |
3725 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; | |
3726 | } | |
3727 | ||
3728 | int | |
3729 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
3730 | { | |
8de9bdc4 | 3731 | gdb_assert (gdbarch != NULL); |
956ac328 | 3732 | gdb_assert (gdbarch->memory_remove_breakpoint != NULL); |
917317f4 | 3733 | if (gdbarch_debug >= 2) |
917317f4 JM |
3734 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
3735 | return gdbarch->memory_remove_breakpoint (addr, contents_cache); | |
3736 | } | |
3737 | ||
3738 | void | |
3739 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, | |
3740 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) | |
3741 | { | |
3742 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; | |
3743 | } | |
3744 | ||
0f71a2f6 | 3745 | CORE_ADDR |
104c1213 | 3746 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
0f71a2f6 | 3747 | { |
8de9bdc4 | 3748 | gdb_assert (gdbarch != NULL); |
71bd6bd4 | 3749 | /* Skip verify of decr_pc_after_break, invalid_p == 0 */ |
0f71a2f6 | 3750 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3751 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
3752 | return gdbarch->decr_pc_after_break; | |
3753 | } | |
3754 | ||
3755 | void | |
104c1213 JM |
3756 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
3757 | CORE_ADDR decr_pc_after_break) | |
0f71a2f6 JM |
3758 | { |
3759 | gdbarch->decr_pc_after_break = decr_pc_after_break; | |
3760 | } | |
3761 | ||
3762 | CORE_ADDR | |
104c1213 | 3763 | gdbarch_function_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 | 3764 | { |
8de9bdc4 | 3765 | gdb_assert (gdbarch != NULL); |
6503b91e | 3766 | /* Skip verify of function_start_offset, invalid_p == 0 */ |
0f71a2f6 | 3767 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3768 | fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n"); |
3769 | return gdbarch->function_start_offset; | |
3770 | } | |
3771 | ||
3772 | void | |
104c1213 JM |
3773 | set_gdbarch_function_start_offset (struct gdbarch *gdbarch, |
3774 | CORE_ADDR function_start_offset) | |
0f71a2f6 JM |
3775 | { |
3776 | gdbarch->function_start_offset = function_start_offset; | |
3777 | } | |
3778 | ||
3779 | void | |
f6684c31 | 3780 | 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 | 3781 | { |
8de9bdc4 | 3782 | gdb_assert (gdbarch != NULL); |
956ac328 | 3783 | gdb_assert (gdbarch->remote_translate_xfer_address != NULL); |
0f71a2f6 | 3784 | if (gdbarch_debug >= 2) |
0f71a2f6 | 3785 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n"); |
f6684c31 | 3786 | gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len); |
0f71a2f6 JM |
3787 | } |
3788 | ||
3789 | void | |
104c1213 JM |
3790 | set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, |
3791 | gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address) | |
0f71a2f6 JM |
3792 | { |
3793 | gdbarch->remote_translate_xfer_address = remote_translate_xfer_address; | |
3794 | } | |
3795 | ||
3796 | CORE_ADDR | |
104c1213 | 3797 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
0f71a2f6 | 3798 | { |
8de9bdc4 | 3799 | gdb_assert (gdbarch != NULL); |
5867a2fb | 3800 | /* Skip verify of frame_args_skip, invalid_p == 0 */ |
0f71a2f6 | 3801 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3802 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
3803 | return gdbarch->frame_args_skip; | |
3804 | } | |
3805 | ||
3806 | void | |
104c1213 JM |
3807 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
3808 | CORE_ADDR frame_args_skip) | |
0f71a2f6 JM |
3809 | { |
3810 | gdbarch->frame_args_skip = frame_args_skip; | |
3811 | } | |
3812 | ||
3813 | int | |
19772a2c AC |
3814 | gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch) |
3815 | { | |
3816 | gdb_assert (gdbarch != NULL); | |
3817 | return gdbarch->deprecated_frameless_function_invocation != NULL; | |
3818 | } | |
3819 | ||
3820 | int | |
3821 | gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi) | |
0f71a2f6 | 3822 | { |
8de9bdc4 | 3823 | gdb_assert (gdbarch != NULL); |
19772a2c | 3824 | gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL); |
0f71a2f6 | 3825 | if (gdbarch_debug >= 2) |
19772a2c AC |
3826 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n"); |
3827 | return gdbarch->deprecated_frameless_function_invocation (fi); | |
0f71a2f6 JM |
3828 | } |
3829 | ||
3830 | void | |
19772a2c AC |
3831 | set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, |
3832 | gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation) | |
0f71a2f6 | 3833 | { |
19772a2c | 3834 | gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation; |
0f71a2f6 JM |
3835 | } |
3836 | ||
d62d1979 | 3837 | int |
618ce49f | 3838 | gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch) |
d62d1979 AC |
3839 | { |
3840 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3841 | return gdbarch->deprecated_frame_chain != NULL; |
d62d1979 AC |
3842 | } |
3843 | ||
0f71a2f6 | 3844 | CORE_ADDR |
618ce49f | 3845 | gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame) |
0f71a2f6 | 3846 | { |
8de9bdc4 | 3847 | gdb_assert (gdbarch != NULL); |
956ac328 | 3848 | gdb_assert (gdbarch->deprecated_frame_chain != NULL); |
0f71a2f6 | 3849 | if (gdbarch_debug >= 2) |
618ce49f AC |
3850 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n"); |
3851 | return gdbarch->deprecated_frame_chain (frame); | |
0f71a2f6 JM |
3852 | } |
3853 | ||
3854 | void | |
618ce49f AC |
3855 | set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, |
3856 | gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain) | |
0f71a2f6 | 3857 | { |
618ce49f | 3858 | gdbarch->deprecated_frame_chain = deprecated_frame_chain; |
0f71a2f6 JM |
3859 | } |
3860 | ||
51603483 | 3861 | int |
618ce49f | 3862 | gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch) |
51603483 DJ |
3863 | { |
3864 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3865 | return gdbarch->deprecated_frame_chain_valid != NULL; |
51603483 DJ |
3866 | } |
3867 | ||
0f71a2f6 | 3868 | int |
618ce49f | 3869 | gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe) |
0f71a2f6 | 3870 | { |
8de9bdc4 | 3871 | gdb_assert (gdbarch != NULL); |
956ac328 | 3872 | gdb_assert (gdbarch->deprecated_frame_chain_valid != NULL); |
0f71a2f6 | 3873 | if (gdbarch_debug >= 2) |
618ce49f AC |
3874 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n"); |
3875 | return gdbarch->deprecated_frame_chain_valid (chain, thisframe); | |
0f71a2f6 JM |
3876 | } |
3877 | ||
3878 | void | |
618ce49f AC |
3879 | set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, |
3880 | gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid) | |
0f71a2f6 | 3881 | { |
618ce49f | 3882 | gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid; |
0f71a2f6 JM |
3883 | } |
3884 | ||
d62d1979 | 3885 | int |
8bedc050 | 3886 | gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch) |
d62d1979 AC |
3887 | { |
3888 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3889 | return gdbarch->deprecated_frame_saved_pc != NULL; |
d62d1979 AC |
3890 | } |
3891 | ||
0f71a2f6 | 3892 | CORE_ADDR |
8bedc050 | 3893 | gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi) |
0f71a2f6 | 3894 | { |
8de9bdc4 | 3895 | gdb_assert (gdbarch != NULL); |
956ac328 | 3896 | gdb_assert (gdbarch->deprecated_frame_saved_pc != NULL); |
0f71a2f6 | 3897 | if (gdbarch_debug >= 2) |
8bedc050 AC |
3898 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n"); |
3899 | return gdbarch->deprecated_frame_saved_pc (fi); | |
0f71a2f6 JM |
3900 | } |
3901 | ||
3902 | void | |
8bedc050 AC |
3903 | set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, |
3904 | gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc) | |
0f71a2f6 | 3905 | { |
8bedc050 | 3906 | gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc; |
0f71a2f6 JM |
3907 | } |
3908 | ||
12cc2063 AC |
3909 | int |
3910 | gdbarch_unwind_pc_p (struct gdbarch *gdbarch) | |
3911 | { | |
3912 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3913 | return gdbarch->unwind_pc != NULL; |
12cc2063 AC |
3914 | } |
3915 | ||
3916 | CORE_ADDR | |
3917 | gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) | |
3918 | { | |
3919 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3920 | gdb_assert (gdbarch->unwind_pc != NULL); |
12cc2063 AC |
3921 | if (gdbarch_debug >= 2) |
3922 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n"); | |
3923 | return gdbarch->unwind_pc (gdbarch, next_frame); | |
3924 | } | |
3925 | ||
3926 | void | |
3927 | set_gdbarch_unwind_pc (struct gdbarch *gdbarch, | |
3928 | gdbarch_unwind_pc_ftype unwind_pc) | |
3929 | { | |
3930 | gdbarch->unwind_pc = unwind_pc; | |
3931 | } | |
3932 | ||
a9e5fdc2 AC |
3933 | int |
3934 | gdbarch_unwind_sp_p (struct gdbarch *gdbarch) | |
3935 | { | |
3936 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3937 | return gdbarch->unwind_sp != NULL; |
a9e5fdc2 AC |
3938 | } |
3939 | ||
3940 | CORE_ADDR | |
3941 | gdbarch_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) | |
3942 | { | |
3943 | gdb_assert (gdbarch != NULL); | |
956ac328 | 3944 | gdb_assert (gdbarch->unwind_sp != NULL); |
a9e5fdc2 AC |
3945 | if (gdbarch_debug >= 2) |
3946 | fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_sp called\n"); | |
3947 | return gdbarch->unwind_sp (gdbarch, next_frame); | |
3948 | } | |
3949 | ||
3950 | void | |
3951 | set_gdbarch_unwind_sp (struct gdbarch *gdbarch, | |
3952 | gdbarch_unwind_sp_ftype unwind_sp) | |
3953 | { | |
3954 | gdbarch->unwind_sp = unwind_sp; | |
3955 | } | |
3956 | ||
42efa47a AC |
3957 | int |
3958 | gdbarch_deprecated_frame_args_address_p (struct gdbarch *gdbarch) | |
3959 | { | |
3960 | gdb_assert (gdbarch != NULL); | |
3961 | return gdbarch->deprecated_frame_args_address != get_frame_base; | |
3962 | } | |
3963 | ||
0f71a2f6 | 3964 | CORE_ADDR |
42efa47a | 3965 | gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi) |
0f71a2f6 | 3966 | { |
8de9bdc4 | 3967 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
3968 | gdb_assert (gdbarch->deprecated_frame_args_address != NULL); |
3969 | /* Do not check predicate: gdbarch->deprecated_frame_args_address != get_frame_base, allow call. */ | |
0f71a2f6 | 3970 | if (gdbarch_debug >= 2) |
42efa47a AC |
3971 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_args_address called\n"); |
3972 | return gdbarch->deprecated_frame_args_address (fi); | |
0f71a2f6 JM |
3973 | } |
3974 | ||
3975 | void | |
42efa47a AC |
3976 | set_gdbarch_deprecated_frame_args_address (struct gdbarch *gdbarch, |
3977 | gdbarch_deprecated_frame_args_address_ftype deprecated_frame_args_address) | |
0f71a2f6 | 3978 | { |
42efa47a AC |
3979 | gdbarch->deprecated_frame_args_address = deprecated_frame_args_address; |
3980 | } | |
3981 | ||
3982 | int | |
3983 | gdbarch_deprecated_frame_locals_address_p (struct gdbarch *gdbarch) | |
3984 | { | |
3985 | gdb_assert (gdbarch != NULL); | |
3986 | return gdbarch->deprecated_frame_locals_address != get_frame_base; | |
0f71a2f6 JM |
3987 | } |
3988 | ||
3989 | CORE_ADDR | |
42efa47a | 3990 | gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi) |
0f71a2f6 | 3991 | { |
8de9bdc4 | 3992 | gdb_assert (gdbarch != NULL); |
956ac328 AC |
3993 | gdb_assert (gdbarch->deprecated_frame_locals_address != NULL); |
3994 | /* Do not check predicate: gdbarch->deprecated_frame_locals_address != get_frame_base, allow call. */ | |
0f71a2f6 | 3995 | if (gdbarch_debug >= 2) |
42efa47a AC |
3996 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_locals_address called\n"); |
3997 | return gdbarch->deprecated_frame_locals_address (fi); | |
0f71a2f6 JM |
3998 | } |
3999 | ||
4000 | void | |
42efa47a AC |
4001 | set_gdbarch_deprecated_frame_locals_address (struct gdbarch *gdbarch, |
4002 | gdbarch_deprecated_frame_locals_address_ftype deprecated_frame_locals_address) | |
0f71a2f6 | 4003 | { |
42efa47a | 4004 | gdbarch->deprecated_frame_locals_address = deprecated_frame_locals_address; |
0f71a2f6 JM |
4005 | } |
4006 | ||
4443bd83 | 4007 | int |
6913c89a | 4008 | gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch) |
4443bd83 AC |
4009 | { |
4010 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4011 | return gdbarch->deprecated_saved_pc_after_call != NULL; |
4443bd83 AC |
4012 | } |
4013 | ||
0f71a2f6 | 4014 | CORE_ADDR |
6913c89a | 4015 | gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame) |
0f71a2f6 | 4016 | { |
8de9bdc4 | 4017 | gdb_assert (gdbarch != NULL); |
956ac328 | 4018 | gdb_assert (gdbarch->deprecated_saved_pc_after_call != NULL); |
0f71a2f6 | 4019 | if (gdbarch_debug >= 2) |
6913c89a AC |
4020 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n"); |
4021 | return gdbarch->deprecated_saved_pc_after_call (frame); | |
0f71a2f6 JM |
4022 | } |
4023 | ||
4024 | void | |
6913c89a AC |
4025 | set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, |
4026 | gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call) | |
0f71a2f6 | 4027 | { |
6913c89a | 4028 | gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call; |
0f71a2f6 JM |
4029 | } |
4030 | ||
983a287a AC |
4031 | int |
4032 | gdbarch_frame_num_args_p (struct gdbarch *gdbarch) | |
4033 | { | |
4034 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4035 | return gdbarch->frame_num_args != NULL; |
983a287a AC |
4036 | } |
4037 | ||
0f71a2f6 JM |
4038 | int |
4039 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) | |
4040 | { | |
8de9bdc4 | 4041 | gdb_assert (gdbarch != NULL); |
956ac328 | 4042 | gdb_assert (gdbarch->frame_num_args != NULL); |
0f71a2f6 | 4043 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4044 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
4045 | return gdbarch->frame_num_args (frame); | |
4046 | } | |
4047 | ||
4048 | void | |
104c1213 JM |
4049 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
4050 | gdbarch_frame_num_args_ftype frame_num_args) | |
0f71a2f6 JM |
4051 | { |
4052 | gdbarch->frame_num_args = frame_num_args; | |
4053 | } | |
4054 | ||
2ada493a | 4055 | int |
f27dd7fd | 4056 | gdbarch_deprecated_stack_align_p (struct gdbarch *gdbarch) |
2ada493a | 4057 | { |
8de9bdc4 | 4058 | gdb_assert (gdbarch != NULL); |
f27dd7fd | 4059 | return gdbarch->deprecated_stack_align != NULL; |
2ada493a AC |
4060 | } |
4061 | ||
4062 | CORE_ADDR | |
f27dd7fd | 4063 | gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp) |
2ada493a | 4064 | { |
8de9bdc4 | 4065 | gdb_assert (gdbarch != NULL); |
f27dd7fd | 4066 | gdb_assert (gdbarch->deprecated_stack_align != NULL); |
2ada493a | 4067 | if (gdbarch_debug >= 2) |
f27dd7fd AC |
4068 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_stack_align called\n"); |
4069 | return gdbarch->deprecated_stack_align (sp); | |
2ada493a AC |
4070 | } |
4071 | ||
4072 | void | |
f27dd7fd AC |
4073 | set_gdbarch_deprecated_stack_align (struct gdbarch *gdbarch, |
4074 | gdbarch_deprecated_stack_align_ftype deprecated_stack_align) | |
2ada493a | 4075 | { |
f27dd7fd | 4076 | gdbarch->deprecated_stack_align = deprecated_stack_align; |
2ada493a AC |
4077 | } |
4078 | ||
dc604539 AC |
4079 | int |
4080 | gdbarch_frame_align_p (struct gdbarch *gdbarch) | |
4081 | { | |
4082 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4083 | return gdbarch->frame_align != NULL; |
dc604539 AC |
4084 | } |
4085 | ||
4086 | CORE_ADDR | |
4087 | gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) | |
4088 | { | |
4089 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4090 | gdb_assert (gdbarch->frame_align != NULL); |
dc604539 AC |
4091 | if (gdbarch_debug >= 2) |
4092 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n"); | |
4093 | return gdbarch->frame_align (gdbarch, address); | |
4094 | } | |
4095 | ||
4096 | void | |
4097 | set_gdbarch_frame_align (struct gdbarch *gdbarch, | |
4098 | gdbarch_frame_align_ftype frame_align) | |
4099 | { | |
4100 | gdbarch->frame_align = frame_align; | |
4101 | } | |
4102 | ||
d03e67c9 | 4103 | int |
88d89dbb | 4104 | gdbarch_deprecated_reg_struct_has_addr_p (struct gdbarch *gdbarch) |
d03e67c9 | 4105 | { |
8de9bdc4 | 4106 | gdb_assert (gdbarch != NULL); |
88d89dbb | 4107 | return gdbarch->deprecated_reg_struct_has_addr != NULL; |
d03e67c9 AC |
4108 | } |
4109 | ||
4110 | int | |
88d89dbb | 4111 | gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type) |
d03e67c9 | 4112 | { |
8de9bdc4 | 4113 | gdb_assert (gdbarch != NULL); |
88d89dbb | 4114 | gdb_assert (gdbarch->deprecated_reg_struct_has_addr != NULL); |
d03e67c9 | 4115 | if (gdbarch_debug >= 2) |
88d89dbb MK |
4116 | fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_reg_struct_has_addr called\n"); |
4117 | return gdbarch->deprecated_reg_struct_has_addr (gcc_p, type); | |
d03e67c9 AC |
4118 | } |
4119 | ||
4120 | void | |
88d89dbb MK |
4121 | set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch, |
4122 | gdbarch_deprecated_reg_struct_has_addr_ftype deprecated_reg_struct_has_addr) | |
d03e67c9 | 4123 | { |
88d89dbb | 4124 | gdbarch->deprecated_reg_struct_has_addr = deprecated_reg_struct_has_addr; |
d03e67c9 AC |
4125 | } |
4126 | ||
192cb3d4 MK |
4127 | int |
4128 | gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) | |
4129 | { | |
4130 | gdb_assert (gdbarch != NULL); | |
4131 | gdb_assert (gdbarch->stabs_argument_has_addr != NULL); | |
4132 | if (gdbarch_debug >= 2) | |
4133 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n"); | |
4134 | return gdbarch->stabs_argument_has_addr (gdbarch, type); | |
4135 | } | |
4136 | ||
4137 | void | |
4138 | set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, | |
4139 | gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr) | |
4140 | { | |
4141 | gdbarch->stabs_argument_has_addr = stabs_argument_has_addr; | |
4142 | } | |
4143 | ||
8b148df9 AC |
4144 | int |
4145 | gdbarch_frame_red_zone_size (struct gdbarch *gdbarch) | |
4146 | { | |
4147 | gdb_assert (gdbarch != NULL); | |
4148 | if (gdbarch_debug >= 2) | |
4149 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n"); | |
4150 | return gdbarch->frame_red_zone_size; | |
4151 | } | |
4152 | ||
4153 | void | |
4154 | set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch, | |
4155 | int frame_red_zone_size) | |
4156 | { | |
4157 | gdbarch->frame_red_zone_size = frame_red_zone_size; | |
4158 | } | |
4159 | ||
f0d4cc9e AC |
4160 | const struct floatformat * |
4161 | gdbarch_float_format (struct gdbarch *gdbarch) | |
4162 | { | |
8de9bdc4 | 4163 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4164 | if (gdbarch_debug >= 2) |
4165 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); | |
4166 | return gdbarch->float_format; | |
4167 | } | |
4168 | ||
4169 | void | |
4170 | set_gdbarch_float_format (struct gdbarch *gdbarch, | |
4171 | const struct floatformat * float_format) | |
4172 | { | |
4173 | gdbarch->float_format = float_format; | |
4174 | } | |
4175 | ||
4176 | const struct floatformat * | |
4177 | gdbarch_double_format (struct gdbarch *gdbarch) | |
4178 | { | |
8de9bdc4 | 4179 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4180 | if (gdbarch_debug >= 2) |
4181 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); | |
4182 | return gdbarch->double_format; | |
4183 | } | |
4184 | ||
4185 | void | |
4186 | set_gdbarch_double_format (struct gdbarch *gdbarch, | |
4187 | const struct floatformat * double_format) | |
4188 | { | |
4189 | gdbarch->double_format = double_format; | |
4190 | } | |
4191 | ||
4192 | const struct floatformat * | |
4193 | gdbarch_long_double_format (struct gdbarch *gdbarch) | |
4194 | { | |
8de9bdc4 | 4195 | gdb_assert (gdbarch != NULL); |
f0d4cc9e AC |
4196 | if (gdbarch_debug >= 2) |
4197 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); | |
4198 | return gdbarch->long_double_format; | |
4199 | } | |
4200 | ||
4201 | void | |
4202 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, | |
4203 | const struct floatformat * long_double_format) | |
4204 | { | |
4205 | gdbarch->long_double_format = long_double_format; | |
4206 | } | |
4207 | ||
f517ea4e | 4208 | CORE_ADDR |
e2d0e7eb | 4209 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ) |
f517ea4e | 4210 | { |
8de9bdc4 | 4211 | gdb_assert (gdbarch != NULL); |
956ac328 | 4212 | gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL); |
f517ea4e PS |
4213 | if (gdbarch_debug >= 2) |
4214 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); | |
e2d0e7eb | 4215 | return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ); |
f517ea4e PS |
4216 | } |
4217 | ||
4218 | void | |
4219 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, | |
4220 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) | |
4221 | { | |
4222 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; | |
4223 | } | |
4224 | ||
875e1767 AC |
4225 | CORE_ADDR |
4226 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4227 | { | |
8de9bdc4 | 4228 | gdb_assert (gdbarch != NULL); |
956ac328 | 4229 | gdb_assert (gdbarch->addr_bits_remove != NULL); |
875e1767 AC |
4230 | if (gdbarch_debug >= 2) |
4231 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); | |
4232 | return gdbarch->addr_bits_remove (addr); | |
4233 | } | |
4234 | ||
4235 | void | |
4236 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, | |
4237 | gdbarch_addr_bits_remove_ftype addr_bits_remove) | |
4238 | { | |
4239 | gdbarch->addr_bits_remove = addr_bits_remove; | |
4240 | } | |
4241 | ||
181c1381 RE |
4242 | CORE_ADDR |
4243 | gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4244 | { | |
8de9bdc4 | 4245 | gdb_assert (gdbarch != NULL); |
956ac328 | 4246 | gdb_assert (gdbarch->smash_text_address != NULL); |
181c1381 RE |
4247 | if (gdbarch_debug >= 2) |
4248 | fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n"); | |
4249 | return gdbarch->smash_text_address (addr); | |
4250 | } | |
4251 | ||
4252 | void | |
4253 | set_gdbarch_smash_text_address (struct gdbarch *gdbarch, | |
4254 | gdbarch_smash_text_address_ftype smash_text_address) | |
4255 | { | |
4256 | gdbarch->smash_text_address = smash_text_address; | |
4257 | } | |
4258 | ||
64c4637f AC |
4259 | int |
4260 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) | |
4261 | { | |
8de9bdc4 | 4262 | gdb_assert (gdbarch != NULL); |
956ac328 | 4263 | return gdbarch->software_single_step != NULL; |
64c4637f AC |
4264 | } |
4265 | ||
4266 | void | |
4267 | gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) | |
4268 | { | |
8de9bdc4 | 4269 | gdb_assert (gdbarch != NULL); |
956ac328 | 4270 | gdb_assert (gdbarch->software_single_step != NULL); |
64c4637f AC |
4271 | if (gdbarch_debug >= 2) |
4272 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); | |
4273 | gdbarch->software_single_step (sig, insert_breakpoints_p); | |
4274 | } | |
4275 | ||
4276 | void | |
4277 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, | |
4278 | gdbarch_software_single_step_ftype software_single_step) | |
4279 | { | |
4280 | gdbarch->software_single_step = software_single_step; | |
4281 | } | |
4282 | ||
2bf0cb65 | 4283 | int |
a89aa300 | 4284 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info) |
2bf0cb65 | 4285 | { |
8de9bdc4 | 4286 | gdb_assert (gdbarch != NULL); |
956ac328 | 4287 | gdb_assert (gdbarch->print_insn != NULL); |
2bf0cb65 EZ |
4288 | if (gdbarch_debug >= 2) |
4289 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); | |
4290 | return gdbarch->print_insn (vma, info); | |
4291 | } | |
4292 | ||
4293 | void | |
4294 | set_gdbarch_print_insn (struct gdbarch *gdbarch, | |
4295 | gdbarch_print_insn_ftype print_insn) | |
4296 | { | |
4297 | gdbarch->print_insn = print_insn; | |
4298 | } | |
4299 | ||
bdcd319a CV |
4300 | CORE_ADDR |
4301 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc) | |
4302 | { | |
8de9bdc4 | 4303 | gdb_assert (gdbarch != NULL); |
956ac328 | 4304 | gdb_assert (gdbarch->skip_trampoline_code != NULL); |
bdcd319a CV |
4305 | if (gdbarch_debug >= 2) |
4306 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); | |
4307 | return gdbarch->skip_trampoline_code (pc); | |
4308 | } | |
4309 | ||
4310 | void | |
4311 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, | |
4312 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) | |
4313 | { | |
4314 | gdbarch->skip_trampoline_code = skip_trampoline_code; | |
4315 | } | |
4316 | ||
dea0c52f MK |
4317 | CORE_ADDR |
4318 | gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc) | |
4319 | { | |
4320 | gdb_assert (gdbarch != NULL); | |
4321 | gdb_assert (gdbarch->skip_solib_resolver != NULL); | |
4322 | if (gdbarch_debug >= 2) | |
4323 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n"); | |
4c8c40e6 | 4324 | return gdbarch->skip_solib_resolver (gdbarch, pc); |
dea0c52f MK |
4325 | } |
4326 | ||
4327 | void | |
4328 | set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, | |
4329 | gdbarch_skip_solib_resolver_ftype skip_solib_resolver) | |
4330 | { | |
4331 | gdbarch->skip_solib_resolver = skip_solib_resolver; | |
4332 | } | |
4333 | ||
68e9cc94 CV |
4334 | int |
4335 | gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
4336 | { | |
8de9bdc4 | 4337 | gdb_assert (gdbarch != NULL); |
956ac328 | 4338 | gdb_assert (gdbarch->in_solib_call_trampoline != NULL); |
68e9cc94 CV |
4339 | if (gdbarch_debug >= 2) |
4340 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n"); | |
4341 | return gdbarch->in_solib_call_trampoline (pc, name); | |
4342 | } | |
4343 | ||
4344 | void | |
4345 | set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, | |
4346 | gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline) | |
4347 | { | |
4348 | gdbarch->in_solib_call_trampoline = in_solib_call_trampoline; | |
4349 | } | |
4350 | ||
d50355b6 MS |
4351 | int |
4352 | gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
4353 | { | |
4354 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4355 | gdb_assert (gdbarch->in_solib_return_trampoline != NULL); |
d50355b6 MS |
4356 | if (gdbarch_debug >= 2) |
4357 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n"); | |
4358 | return gdbarch->in_solib_return_trampoline (pc, name); | |
4359 | } | |
4360 | ||
4361 | void | |
4362 | set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, | |
4363 | gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline) | |
4364 | { | |
4365 | gdbarch->in_solib_return_trampoline = in_solib_return_trampoline; | |
4366 | } | |
4367 | ||
c12260ac CV |
4368 | int |
4369 | gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4370 | { | |
8de9bdc4 | 4371 | gdb_assert (gdbarch != NULL); |
956ac328 | 4372 | gdb_assert (gdbarch->in_function_epilogue_p != NULL); |
c12260ac CV |
4373 | if (gdbarch_debug >= 2) |
4374 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); | |
4375 | return gdbarch->in_function_epilogue_p (gdbarch, addr); | |
4376 | } | |
4377 | ||
4378 | void | |
4379 | set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, | |
4380 | gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) | |
4381 | { | |
4382 | gdbarch->in_function_epilogue_p = in_function_epilogue_p; | |
4383 | } | |
4384 | ||
552c04a7 TT |
4385 | char * |
4386 | gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv) | |
4387 | { | |
8de9bdc4 | 4388 | gdb_assert (gdbarch != NULL); |
956ac328 | 4389 | gdb_assert (gdbarch->construct_inferior_arguments != NULL); |
552c04a7 TT |
4390 | if (gdbarch_debug >= 2) |
4391 | fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n"); | |
4392 | return gdbarch->construct_inferior_arguments (gdbarch, argc, argv); | |
4393 | } | |
4394 | ||
4395 | void | |
4396 | set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, | |
4397 | gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments) | |
4398 | { | |
4399 | gdbarch->construct_inferior_arguments = construct_inferior_arguments; | |
4400 | } | |
4401 | ||
a2cf933a EZ |
4402 | void |
4403 | gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym) | |
4404 | { | |
8de9bdc4 | 4405 | gdb_assert (gdbarch != NULL); |
956ac328 | 4406 | gdb_assert (gdbarch->elf_make_msymbol_special != NULL); |
a2cf933a EZ |
4407 | if (gdbarch_debug >= 2) |
4408 | fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n"); | |
4409 | gdbarch->elf_make_msymbol_special (sym, msym); | |
4410 | } | |
4411 | ||
4412 | void | |
4413 | set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, | |
4414 | gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special) | |
4415 | { | |
4416 | gdbarch->elf_make_msymbol_special = elf_make_msymbol_special; | |
4417 | } | |
4418 | ||
4419 | void | |
4420 | gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym) | |
4421 | { | |
8de9bdc4 | 4422 | gdb_assert (gdbarch != NULL); |
956ac328 | 4423 | gdb_assert (gdbarch->coff_make_msymbol_special != NULL); |
a2cf933a EZ |
4424 | if (gdbarch_debug >= 2) |
4425 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n"); | |
4426 | gdbarch->coff_make_msymbol_special (val, msym); | |
4427 | } | |
4428 | ||
4429 | void | |
4430 | set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, | |
4431 | gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special) | |
4432 | { | |
4433 | gdbarch->coff_make_msymbol_special = coff_make_msymbol_special; | |
4434 | } | |
4435 | ||
5720643c JB |
4436 | const char * |
4437 | gdbarch_name_of_malloc (struct gdbarch *gdbarch) | |
4438 | { | |
4439 | gdb_assert (gdbarch != NULL); | |
4440 | /* Skip verify of name_of_malloc, invalid_p == 0 */ | |
4441 | if (gdbarch_debug >= 2) | |
4442 | fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n"); | |
4443 | return gdbarch->name_of_malloc; | |
4444 | } | |
4445 | ||
4446 | void | |
4447 | set_gdbarch_name_of_malloc (struct gdbarch *gdbarch, | |
4448 | const char * name_of_malloc) | |
4449 | { | |
4450 | gdbarch->name_of_malloc = name_of_malloc; | |
4451 | } | |
4452 | ||
c4ed33b9 AC |
4453 | int |
4454 | gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch) | |
4455 | { | |
4456 | gdb_assert (gdbarch != NULL); | |
4457 | /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */ | |
4458 | if (gdbarch_debug >= 2) | |
4459 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n"); | |
4460 | return gdbarch->cannot_step_breakpoint; | |
4461 | } | |
4462 | ||
4463 | void | |
4464 | set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, | |
4465 | int cannot_step_breakpoint) | |
4466 | { | |
4467 | gdbarch->cannot_step_breakpoint = cannot_step_breakpoint; | |
4468 | } | |
4469 | ||
f74fa174 MM |
4470 | int |
4471 | gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch) | |
4472 | { | |
4473 | gdb_assert (gdbarch != NULL); | |
4474 | /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */ | |
4475 | if (gdbarch_debug >= 2) | |
4476 | fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n"); | |
4477 | return gdbarch->have_nonsteppable_watchpoint; | |
4478 | } | |
4479 | ||
4480 | void | |
4481 | set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch, | |
967c0d83 | 4482 | int have_nonsteppable_watchpoint) |
f74fa174 MM |
4483 | { |
4484 | gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint; | |
4485 | } | |
4486 | ||
8b2dbe47 KB |
4487 | int |
4488 | gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch) | |
4489 | { | |
4490 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4491 | return gdbarch->address_class_type_flags != NULL; |
8b2dbe47 KB |
4492 | } |
4493 | ||
4494 | int | |
4495 | gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class) | |
4496 | { | |
4497 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4498 | gdb_assert (gdbarch->address_class_type_flags != NULL); |
8b2dbe47 KB |
4499 | if (gdbarch_debug >= 2) |
4500 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n"); | |
4501 | return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class); | |
4502 | } | |
4503 | ||
4504 | void | |
4505 | set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch, | |
4506 | gdbarch_address_class_type_flags_ftype address_class_type_flags) | |
4507 | { | |
4508 | gdbarch->address_class_type_flags = address_class_type_flags; | |
4509 | } | |
4510 | ||
4511 | int | |
4512 | gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch) | |
4513 | { | |
4514 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4515 | return gdbarch->address_class_type_flags_to_name != NULL; |
8b2dbe47 KB |
4516 | } |
4517 | ||
321432c0 | 4518 | const char * |
8b2dbe47 KB |
4519 | gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags) |
4520 | { | |
4521 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4522 | gdb_assert (gdbarch->address_class_type_flags_to_name != NULL); |
8b2dbe47 KB |
4523 | if (gdbarch_debug >= 2) |
4524 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n"); | |
5f11f355 | 4525 | return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags); |
8b2dbe47 KB |
4526 | } |
4527 | ||
4528 | void | |
4529 | set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, | |
4530 | gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name) | |
4531 | { | |
4532 | gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name; | |
4533 | } | |
4534 | ||
4535 | int | |
4536 | gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch) | |
4537 | { | |
4538 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4539 | return gdbarch->address_class_name_to_type_flags != NULL; |
8b2dbe47 KB |
4540 | } |
4541 | ||
4542 | int | |
321432c0 | 4543 | gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr) |
8b2dbe47 KB |
4544 | { |
4545 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4546 | gdb_assert (gdbarch->address_class_name_to_type_flags != NULL); |
8b2dbe47 KB |
4547 | if (gdbarch_debug >= 2) |
4548 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n"); | |
5f11f355 | 4549 | return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr); |
8b2dbe47 KB |
4550 | } |
4551 | ||
4552 | void | |
4553 | set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, | |
4554 | gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags) | |
4555 | { | |
4556 | gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags; | |
4557 | } | |
4558 | ||
b59ff9d5 AC |
4559 | int |
4560 | gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup) | |
4561 | { | |
4562 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4563 | gdb_assert (gdbarch->register_reggroup_p != NULL); |
b59ff9d5 AC |
4564 | if (gdbarch_debug >= 2) |
4565 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n"); | |
4566 | return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup); | |
4567 | } | |
4568 | ||
4569 | void | |
4570 | set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch, | |
4571 | gdbarch_register_reggroup_p_ftype register_reggroup_p) | |
4572 | { | |
4573 | gdbarch->register_reggroup_p = register_reggroup_p; | |
4574 | } | |
4575 | ||
143985b7 AF |
4576 | int |
4577 | gdbarch_fetch_pointer_argument_p (struct gdbarch *gdbarch) | |
4578 | { | |
4579 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4580 | return gdbarch->fetch_pointer_argument != NULL; |
143985b7 AF |
4581 | } |
4582 | ||
4583 | CORE_ADDR | |
4584 | gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, struct frame_info *frame, int argi, struct type *type) | |
4585 | { | |
4586 | gdb_assert (gdbarch != NULL); | |
956ac328 | 4587 | gdb_assert (gdbarch->fetch_pointer_argument != NULL); |
143985b7 AF |
4588 | if (gdbarch_debug >= 2) |
4589 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pointer_argument called\n"); | |
4590 | return gdbarch->fetch_pointer_argument (frame, argi, type); | |
4591 | } | |
4592 | ||
4593 | void | |
4594 | set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, | |
4595 | gdbarch_fetch_pointer_argument_ftype fetch_pointer_argument) | |
4596 | { | |
4597 | gdbarch->fetch_pointer_argument = fetch_pointer_argument; | |
4598 | } | |
4599 | ||
6ce6d90f MK |
4600 | int |
4601 | gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch) | |
4602 | { | |
4603 | gdb_assert (gdbarch != NULL); | |
4604 | return gdbarch->regset_from_core_section != NULL; | |
4605 | } | |
4606 | ||
4607 | const struct regset * | |
4608 | gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size) | |
4609 | { | |
4610 | gdb_assert (gdbarch != NULL); | |
4611 | gdb_assert (gdbarch->regset_from_core_section != NULL); | |
4612 | if (gdbarch_debug >= 2) | |
4613 | fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n"); | |
4614 | return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size); | |
4615 | } | |
4616 | ||
4617 | void | |
4618 | set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, | |
4619 | gdbarch_regset_from_core_section_ftype regset_from_core_section) | |
4620 | { | |
4621 | gdbarch->regset_from_core_section = regset_from_core_section; | |
4622 | } | |
4623 | ||
0f71a2f6 | 4624 | |
be5a57e1 | 4625 | /* Keep a registry of per-architecture data-pointers required by GDB |
0f71a2f6 JM |
4626 | modules. */ |
4627 | ||
4628 | struct gdbarch_data | |
4629 | { | |
95160752 | 4630 | unsigned index; |
76860b5f | 4631 | int init_p; |
030f20e1 AC |
4632 | gdbarch_data_pre_init_ftype *pre_init; |
4633 | gdbarch_data_post_init_ftype *post_init; | |
0f71a2f6 JM |
4634 | }; |
4635 | ||
4636 | struct gdbarch_data_registration | |
adf40b2e | 4637 | { |
adf40b2e JM |
4638 | struct gdbarch_data *data; |
4639 | struct gdbarch_data_registration *next; | |
4640 | }; | |
0f71a2f6 | 4641 | |
be5a57e1 | 4642 | struct gdbarch_data_registry |
adf40b2e | 4643 | { |
95160752 | 4644 | unsigned nr; |
adf40b2e JM |
4645 | struct gdbarch_data_registration *registrations; |
4646 | }; | |
0f71a2f6 | 4647 | |
be5a57e1 | 4648 | struct gdbarch_data_registry gdbarch_data_registry = |
0f71a2f6 JM |
4649 | { |
4650 | 0, NULL, | |
4651 | }; | |
4652 | ||
030f20e1 AC |
4653 | static struct gdbarch_data * |
4654 | gdbarch_data_register (gdbarch_data_pre_init_ftype *pre_init, | |
4655 | gdbarch_data_post_init_ftype *post_init) | |
0f71a2f6 JM |
4656 | { |
4657 | struct gdbarch_data_registration **curr; | |
76860b5f | 4658 | /* Append the new registraration. */ |
be5a57e1 | 4659 | for (curr = &gdbarch_data_registry.registrations; |
0f71a2f6 JM |
4660 | (*curr) != NULL; |
4661 | curr = &(*curr)->next); | |
4662 | (*curr) = XMALLOC (struct gdbarch_data_registration); | |
4663 | (*curr)->next = NULL; | |
0f71a2f6 | 4664 | (*curr)->data = XMALLOC (struct gdbarch_data); |
be5a57e1 | 4665 | (*curr)->data->index = gdbarch_data_registry.nr++; |
030f20e1 AC |
4666 | (*curr)->data->pre_init = pre_init; |
4667 | (*curr)->data->post_init = post_init; | |
76860b5f | 4668 | (*curr)->data->init_p = 1; |
0f71a2f6 JM |
4669 | return (*curr)->data; |
4670 | } | |
4671 | ||
030f20e1 AC |
4672 | struct gdbarch_data * |
4673 | gdbarch_data_register_pre_init (gdbarch_data_pre_init_ftype *pre_init) | |
4674 | { | |
4675 | return gdbarch_data_register (pre_init, NULL); | |
4676 | } | |
4677 | ||
4678 | struct gdbarch_data * | |
4679 | gdbarch_data_register_post_init (gdbarch_data_post_init_ftype *post_init) | |
4680 | { | |
4681 | return gdbarch_data_register (NULL, post_init); | |
4682 | } | |
0f71a2f6 | 4683 | |
b3cc3077 | 4684 | /* Create/delete the gdbarch data vector. */ |
95160752 AC |
4685 | |
4686 | static void | |
b3cc3077 | 4687 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
95160752 | 4688 | { |
b3cc3077 JB |
4689 | gdb_assert (gdbarch->data == NULL); |
4690 | gdbarch->nr_data = gdbarch_data_registry.nr; | |
aebd7893 | 4691 | gdbarch->data = GDBARCH_OBSTACK_CALLOC (gdbarch, gdbarch->nr_data, void *); |
0f71a2f6 JM |
4692 | } |
4693 | ||
76860b5f | 4694 | /* Initialize the current value of the specified per-architecture |
b3cc3077 JB |
4695 | data-pointer. */ |
4696 | ||
95160752 | 4697 | void |
030f20e1 AC |
4698 | deprecated_set_gdbarch_data (struct gdbarch *gdbarch, |
4699 | struct gdbarch_data *data, | |
4700 | void *pointer) | |
95160752 AC |
4701 | { |
4702 | gdb_assert (data->index < gdbarch->nr_data); | |
aebd7893 | 4703 | gdb_assert (gdbarch->data[data->index] == NULL); |
030f20e1 | 4704 | gdb_assert (data->pre_init == NULL); |
95160752 AC |
4705 | gdbarch->data[data->index] = pointer; |
4706 | } | |
4707 | ||
0f71a2f6 JM |
4708 | /* Return the current value of the specified per-architecture |
4709 | data-pointer. */ | |
4710 | ||
4711 | void * | |
451fbdda | 4712 | gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data) |
0f71a2f6 | 4713 | { |
451fbdda | 4714 | gdb_assert (data->index < gdbarch->nr_data); |
030f20e1 | 4715 | if (gdbarch->data[data->index] == NULL) |
76860b5f | 4716 | { |
030f20e1 AC |
4717 | /* The data-pointer isn't initialized, call init() to get a |
4718 | value. */ | |
4719 | if (data->pre_init != NULL) | |
4720 | /* Mid architecture creation: pass just the obstack, and not | |
4721 | the entire architecture, as that way it isn't possible for | |
4722 | pre-init code to refer to undefined architecture | |
4723 | fields. */ | |
4724 | gdbarch->data[data->index] = data->pre_init (gdbarch->obstack); | |
4725 | else if (gdbarch->initialized_p | |
4726 | && data->post_init != NULL) | |
4727 | /* Post architecture creation: pass the entire architecture | |
4728 | (as all fields are valid), but be careful to also detect | |
4729 | recursive references. */ | |
4730 | { | |
4731 | gdb_assert (data->init_p); | |
4732 | data->init_p = 0; | |
4733 | gdbarch->data[data->index] = data->post_init (gdbarch); | |
4734 | data->init_p = 1; | |
4735 | } | |
4736 | else | |
4737 | /* The architecture initialization hasn't completed - punt - | |
4738 | hope that the caller knows what they are doing. Once | |
4739 | deprecated_set_gdbarch_data has been initialized, this can be | |
4740 | changed to an internal error. */ | |
4741 | return NULL; | |
76860b5f AC |
4742 | gdb_assert (gdbarch->data[data->index] != NULL); |
4743 | } | |
451fbdda | 4744 | return gdbarch->data[data->index]; |
0f71a2f6 JM |
4745 | } |
4746 | ||
4747 | ||
4748 | ||
be5a57e1 | 4749 | /* Keep a registry of swapped data required by GDB modules. */ |
0f71a2f6 JM |
4750 | |
4751 | struct gdbarch_swap | |
4752 | { | |
4753 | void *swap; | |
4754 | struct gdbarch_swap_registration *source; | |
4755 | struct gdbarch_swap *next; | |
4756 | }; | |
4757 | ||
4758 | struct gdbarch_swap_registration | |
adf40b2e JM |
4759 | { |
4760 | void *data; | |
4761 | unsigned long sizeof_data; | |
4762 | gdbarch_swap_ftype *init; | |
4763 | struct gdbarch_swap_registration *next; | |
4764 | }; | |
0f71a2f6 | 4765 | |
be5a57e1 | 4766 | struct gdbarch_swap_registry |
adf40b2e JM |
4767 | { |
4768 | int nr; | |
4769 | struct gdbarch_swap_registration *registrations; | |
4770 | }; | |
0f71a2f6 | 4771 | |
be5a57e1 | 4772 | struct gdbarch_swap_registry gdbarch_swap_registry = |
0f71a2f6 JM |
4773 | { |
4774 | 0, NULL, | |
4775 | }; | |
4776 | ||
4777 | void | |
046a4708 AC |
4778 | deprecated_register_gdbarch_swap (void *data, |
4779 | unsigned long sizeof_data, | |
4780 | gdbarch_swap_ftype *init) | |
0f71a2f6 JM |
4781 | { |
4782 | struct gdbarch_swap_registration **rego; | |
be5a57e1 | 4783 | for (rego = &gdbarch_swap_registry.registrations; |
0f71a2f6 JM |
4784 | (*rego) != NULL; |
4785 | rego = &(*rego)->next); | |
4786 | (*rego) = XMALLOC (struct gdbarch_swap_registration); | |
4787 | (*rego)->next = NULL; | |
4788 | (*rego)->init = init; | |
4789 | (*rego)->data = data; | |
4790 | (*rego)->sizeof_data = sizeof_data; | |
4791 | } | |
4792 | ||
40af4b0c | 4793 | static void |
7de2341d | 4794 | current_gdbarch_swap_init_hack (void) |
0f71a2f6 JM |
4795 | { |
4796 | struct gdbarch_swap_registration *rego; | |
7de2341d | 4797 | struct gdbarch_swap **curr = ¤t_gdbarch->swap; |
be5a57e1 | 4798 | for (rego = gdbarch_swap_registry.registrations; |
0f71a2f6 JM |
4799 | rego != NULL; |
4800 | rego = rego->next) | |
4801 | { | |
4802 | if (rego->data != NULL) | |
4803 | { | |
7de2341d AC |
4804 | (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch, |
4805 | struct gdbarch_swap); | |
0f71a2f6 | 4806 | (*curr)->source = rego; |
7de2341d AC |
4807 | (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch, |
4808 | rego->sizeof_data); | |
0f71a2f6 | 4809 | (*curr)->next = NULL; |
0f71a2f6 JM |
4810 | curr = &(*curr)->next; |
4811 | } | |
4812 | if (rego->init != NULL) | |
4813 | rego->init (); | |
4814 | } | |
4815 | } | |
4816 | ||
7de2341d AC |
4817 | static struct gdbarch * |
4818 | current_gdbarch_swap_out_hack (void) | |
0f71a2f6 | 4819 | { |
7de2341d | 4820 | struct gdbarch *old_gdbarch = current_gdbarch; |
0f71a2f6 | 4821 | struct gdbarch_swap *curr; |
7de2341d AC |
4822 | |
4823 | gdb_assert (old_gdbarch != NULL); | |
4824 | for (curr = old_gdbarch->swap; | |
0f71a2f6 JM |
4825 | curr != NULL; |
4826 | curr = curr->next) | |
7de2341d AC |
4827 | { |
4828 | memcpy (curr->swap, curr->source->data, curr->source->sizeof_data); | |
4829 | memset (curr->source->data, 0, curr->source->sizeof_data); | |
4830 | } | |
4831 | current_gdbarch = NULL; | |
4832 | return old_gdbarch; | |
0f71a2f6 JM |
4833 | } |
4834 | ||
0f71a2f6 | 4835 | static void |
7de2341d | 4836 | current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch) |
0f71a2f6 JM |
4837 | { |
4838 | struct gdbarch_swap *curr; | |
7de2341d AC |
4839 | |
4840 | gdb_assert (current_gdbarch == NULL); | |
4841 | for (curr = new_gdbarch->swap; | |
0f71a2f6 JM |
4842 | curr != NULL; |
4843 | curr = curr->next) | |
4844 | memcpy (curr->source->data, curr->swap, curr->source->sizeof_data); | |
7de2341d | 4845 | current_gdbarch = new_gdbarch; |
0f71a2f6 JM |
4846 | } |
4847 | ||
4848 | ||
be5a57e1 | 4849 | /* Keep a registry of the architectures known by GDB. */ |
0f71a2f6 | 4850 | |
4b9b3959 | 4851 | struct gdbarch_registration |
0f71a2f6 JM |
4852 | { |
4853 | enum bfd_architecture bfd_architecture; | |
4854 | gdbarch_init_ftype *init; | |
4b9b3959 | 4855 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 4856 | struct gdbarch_list *arches; |
4b9b3959 | 4857 | struct gdbarch_registration *next; |
0f71a2f6 JM |
4858 | }; |
4859 | ||
be5a57e1 | 4860 | static struct gdbarch_registration *gdbarch_registry = NULL; |
0f71a2f6 | 4861 | |
b4a20239 AC |
4862 | static void |
4863 | append_name (const char ***buf, int *nr, const char *name) | |
4864 | { | |
4865 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); | |
4866 | (*buf)[*nr] = name; | |
4867 | *nr += 1; | |
4868 | } | |
4869 | ||
4870 | const char ** | |
4871 | gdbarch_printable_names (void) | |
4872 | { | |
7996bcec AC |
4873 | /* Accumulate a list of names based on the registed list of |
4874 | architectures. */ | |
4875 | enum bfd_architecture a; | |
4876 | int nr_arches = 0; | |
4877 | const char **arches = NULL; | |
4878 | struct gdbarch_registration *rego; | |
4879 | for (rego = gdbarch_registry; | |
4880 | rego != NULL; | |
4881 | rego = rego->next) | |
b4a20239 | 4882 | { |
7996bcec AC |
4883 | const struct bfd_arch_info *ap; |
4884 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); | |
4885 | if (ap == NULL) | |
4886 | internal_error (__FILE__, __LINE__, | |
4887 | "gdbarch_architecture_names: multi-arch unknown"); | |
4888 | do | |
4889 | { | |
4890 | append_name (&arches, &nr_arches, ap->printable_name); | |
4891 | ap = ap->next; | |
4892 | } | |
4893 | while (ap != NULL); | |
b4a20239 | 4894 | } |
7996bcec AC |
4895 | append_name (&arches, &nr_arches, NULL); |
4896 | return arches; | |
b4a20239 AC |
4897 | } |
4898 | ||
4899 | ||
0f71a2f6 | 4900 | void |
4b9b3959 AC |
4901 | gdbarch_register (enum bfd_architecture bfd_architecture, |
4902 | gdbarch_init_ftype *init, | |
4903 | gdbarch_dump_tdep_ftype *dump_tdep) | |
0f71a2f6 | 4904 | { |
4b9b3959 | 4905 | struct gdbarch_registration **curr; |
0f71a2f6 | 4906 | const struct bfd_arch_info *bfd_arch_info; |
ec3d358c | 4907 | /* Check that BFD recognizes this architecture */ |
0f71a2f6 JM |
4908 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
4909 | if (bfd_arch_info == NULL) | |
4910 | { | |
8e65ff28 AC |
4911 | internal_error (__FILE__, __LINE__, |
4912 | "gdbarch: Attempt to register unknown architecture (%d)", | |
4913 | bfd_architecture); | |
0f71a2f6 JM |
4914 | } |
4915 | /* Check that we haven't seen this architecture before */ | |
be5a57e1 | 4916 | for (curr = &gdbarch_registry; |
0f71a2f6 JM |
4917 | (*curr) != NULL; |
4918 | curr = &(*curr)->next) | |
4919 | { | |
4920 | if (bfd_architecture == (*curr)->bfd_architecture) | |
8e65ff28 AC |
4921 | internal_error (__FILE__, __LINE__, |
4922 | "gdbarch: Duplicate registraration of architecture (%s)", | |
4923 | bfd_arch_info->printable_name); | |
0f71a2f6 JM |
4924 | } |
4925 | /* log it */ | |
4926 | if (gdbarch_debug) | |
4927 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n", | |
4928 | bfd_arch_info->printable_name, | |
4929 | (long) init); | |
4930 | /* Append it */ | |
4b9b3959 | 4931 | (*curr) = XMALLOC (struct gdbarch_registration); |
0f71a2f6 JM |
4932 | (*curr)->bfd_architecture = bfd_architecture; |
4933 | (*curr)->init = init; | |
4b9b3959 | 4934 | (*curr)->dump_tdep = dump_tdep; |
0f71a2f6 JM |
4935 | (*curr)->arches = NULL; |
4936 | (*curr)->next = NULL; | |
4b9b3959 AC |
4937 | } |
4938 | ||
4939 | void | |
4940 | register_gdbarch_init (enum bfd_architecture bfd_architecture, | |
4941 | gdbarch_init_ftype *init) | |
4942 | { | |
4943 | gdbarch_register (bfd_architecture, init, NULL); | |
0f71a2f6 | 4944 | } |
0f71a2f6 JM |
4945 | |
4946 | ||
4947 | /* Look for an architecture using gdbarch_info. Base search on only | |
4948 | BFD_ARCH_INFO and BYTE_ORDER. */ | |
4949 | ||
4950 | struct gdbarch_list * | |
104c1213 JM |
4951 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
4952 | const struct gdbarch_info *info) | |
0f71a2f6 JM |
4953 | { |
4954 | for (; arches != NULL; arches = arches->next) | |
4955 | { | |
4956 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) | |
4957 | continue; | |
4958 | if (info->byte_order != arches->gdbarch->byte_order) | |
4959 | continue; | |
4be87837 DJ |
4960 | if (info->osabi != arches->gdbarch->osabi) |
4961 | continue; | |
0f71a2f6 JM |
4962 | return arches; |
4963 | } | |
4964 | return NULL; | |
4965 | } | |
4966 | ||
4967 | ||
ebdba546 AC |
4968 | /* Find an architecture that matches the specified INFO. Create a new |
4969 | architecture if needed. Return that new architecture. Assumes | |
4970 | that there is no current architecture. */ | |
0f71a2f6 | 4971 | |
ebdba546 AC |
4972 | static struct gdbarch * |
4973 | find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info) | |
0f71a2f6 JM |
4974 | { |
4975 | struct gdbarch *new_gdbarch; | |
4b9b3959 | 4976 | struct gdbarch_registration *rego; |
0f71a2f6 | 4977 | |
ebdba546 AC |
4978 | /* The existing architecture has been swapped out - all this code |
4979 | works from a clean slate. */ | |
4980 | gdb_assert (current_gdbarch == NULL); | |
4981 | ||
b732d07d | 4982 | /* Fill in missing parts of the INFO struct using a number of |
ebdba546 AC |
4983 | sources: "set ..."; INFOabfd supplied; and the existing |
4984 | architecture. */ | |
4985 | gdbarch_info_fill (old_gdbarch, &info); | |
4be87837 | 4986 | |
b732d07d AC |
4987 | /* Must have found some sort of architecture. */ |
4988 | gdb_assert (info.bfd_arch_info != NULL); | |
0f71a2f6 JM |
4989 | |
4990 | if (gdbarch_debug) | |
4991 | { | |
0f71a2f6 | 4992 | fprintf_unfiltered (gdb_stdlog, |
ebdba546 | 4993 | "find_arch_by_info: info.bfd_arch_info %s\n", |
0f71a2f6 JM |
4994 | (info.bfd_arch_info != NULL |
4995 | ? info.bfd_arch_info->printable_name | |
4996 | : "(null)")); | |
4997 | fprintf_unfiltered (gdb_stdlog, | |
ebdba546 | 4998 | "find_arch_by_info: info.byte_order %d (%s)\n", |
0f71a2f6 | 4999 | info.byte_order, |
d7449b42 | 5000 | (info.byte_order == BFD_ENDIAN_BIG ? "big" |
778eb05e | 5001 | : info.byte_order == BFD_ENDIAN_LITTLE ? "little" |
0f71a2f6 | 5002 | : "default")); |
4be87837 | 5003 | fprintf_unfiltered (gdb_stdlog, |
ebdba546 | 5004 | "find_arch_by_info: info.osabi %d (%s)\n", |
4be87837 | 5005 | info.osabi, gdbarch_osabi_name (info.osabi)); |
0f71a2f6 | 5006 | fprintf_unfiltered (gdb_stdlog, |
ebdba546 | 5007 | "find_arch_by_info: info.abfd 0x%lx\n", |
0f71a2f6 JM |
5008 | (long) info.abfd); |
5009 | fprintf_unfiltered (gdb_stdlog, | |
ebdba546 | 5010 | "find_arch_by_info: info.tdep_info 0x%lx\n", |
0f71a2f6 JM |
5011 | (long) info.tdep_info); |
5012 | } | |
5013 | ||
ebdba546 | 5014 | /* Find the tdep code that knows about this architecture. */ |
b732d07d AC |
5015 | for (rego = gdbarch_registry; |
5016 | rego != NULL; | |
5017 | rego = rego->next) | |
5018 | if (rego->bfd_architecture == info.bfd_arch_info->arch) | |
5019 | break; | |
5020 | if (rego == NULL) | |
5021 | { | |
5022 | if (gdbarch_debug) | |
ebdba546 AC |
5023 | fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: " |
5024 | "No matching architecture\n"); | |
b732d07d AC |
5025 | return 0; |
5026 | } | |
5027 | ||
ebdba546 | 5028 | /* Ask the tdep code for an architecture that matches "info". */ |
0f71a2f6 JM |
5029 | new_gdbarch = rego->init (info, rego->arches); |
5030 | ||
ebdba546 AC |
5031 | /* Did the tdep code like it? No. Reject the change and revert to |
5032 | the old architecture. */ | |
0f71a2f6 JM |
5033 | if (new_gdbarch == NULL) |
5034 | { | |
5035 | if (gdbarch_debug) | |
ebdba546 AC |
5036 | fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: " |
5037 | "Target rejected architecture\n"); | |
5038 | return NULL; | |
0f71a2f6 JM |
5039 | } |
5040 | ||
ebdba546 AC |
5041 | /* Is this a pre-existing architecture (as determined by already |
5042 | being initialized)? Move it to the front of the architecture | |
5043 | list (keeping the list sorted Most Recently Used). */ | |
5044 | if (new_gdbarch->initialized_p) | |
0f71a2f6 | 5045 | { |
ebdba546 AC |
5046 | struct gdbarch_list **list; |
5047 | struct gdbarch_list *this; | |
0f71a2f6 | 5048 | if (gdbarch_debug) |
ebdba546 AC |
5049 | fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: " |
5050 | "Previous architecture 0x%08lx (%s) selected\n", | |
0f71a2f6 JM |
5051 | (long) new_gdbarch, |
5052 | new_gdbarch->bfd_arch_info->printable_name); | |
ebdba546 AC |
5053 | /* Find the existing arch in the list. */ |
5054 | for (list = ®o->arches; | |
5055 | (*list) != NULL && (*list)->gdbarch != new_gdbarch; | |
5056 | list = &(*list)->next); | |
5057 | /* It had better be in the list of architectures. */ | |
5058 | gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch); | |
5059 | /* Unlink THIS. */ | |
5060 | this = (*list); | |
5061 | (*list) = this->next; | |
5062 | /* Insert THIS at the front. */ | |
5063 | this->next = rego->arches; | |
5064 | rego->arches = this; | |
5065 | /* Return it. */ | |
5066 | return new_gdbarch; | |
0f71a2f6 JM |
5067 | } |
5068 | ||
ebdba546 AC |
5069 | /* It's a new architecture. */ |
5070 | if (gdbarch_debug) | |
5071 | fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: " | |
5072 | "New architecture 0x%08lx (%s) selected\n", | |
5073 | (long) new_gdbarch, | |
5074 | new_gdbarch->bfd_arch_info->printable_name); | |
5075 | ||
5076 | /* Insert the new architecture into the front of the architecture | |
5077 | list (keep the list sorted Most Recently Used). */ | |
0f79675b AC |
5078 | { |
5079 | struct gdbarch_list *this = XMALLOC (struct gdbarch_list); | |
5080 | this->next = rego->arches; | |
5081 | this->gdbarch = new_gdbarch; | |
5082 | rego->arches = this; | |
5083 | } | |
0f71a2f6 | 5084 | |
4b9b3959 AC |
5085 | /* Check that the newly installed architecture is valid. Plug in |
5086 | any post init values. */ | |
5087 | new_gdbarch->dump_tdep = rego->dump_tdep; | |
0f71a2f6 | 5088 | verify_gdbarch (new_gdbarch); |
ebdba546 | 5089 | new_gdbarch->initialized_p = 1; |
0f71a2f6 | 5090 | |
ebdba546 AC |
5091 | /* Initialize any per-architecture swap areas. This phase requires |
5092 | a valid global CURRENT_GDBARCH. Set it momentarially, and then | |
5093 | swap the entire architecture out. */ | |
5094 | current_gdbarch = new_gdbarch; | |
7de2341d | 5095 | current_gdbarch_swap_init_hack (); |
ebdba546 | 5096 | current_gdbarch_swap_out_hack (); |
67c2c32c | 5097 | |
4b9b3959 | 5098 | if (gdbarch_debug) |
ebdba546 | 5099 | gdbarch_dump (new_gdbarch, gdb_stdlog); |
4b9b3959 | 5100 | |
ebdba546 | 5101 | return new_gdbarch; |
0f71a2f6 | 5102 | } |
c906108c | 5103 | |
ebdba546 AC |
5104 | struct gdbarch * |
5105 | gdbarch_find_by_info (struct gdbarch_info info) | |
5106 | { | |
5107 | /* Save the previously selected architecture, setting the global to | |
5108 | NULL. This stops things like gdbarch->init() trying to use the | |
5109 | previous architecture's configuration. The previous architecture | |
5110 | may not even be of the same architecture family. The most recent | |
5111 | architecture of the same family is found at the head of the | |
5112 | rego->arches list. */ | |
5113 | struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack (); | |
5114 | ||
5115 | /* Find the specified architecture. */ | |
5116 | struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info); | |
5117 | ||
5118 | /* Restore the existing architecture. */ | |
5119 | gdb_assert (current_gdbarch == NULL); | |
5120 | current_gdbarch_swap_in_hack (old_gdbarch); | |
5121 | ||
5122 | return new_gdbarch; | |
5123 | } | |
5124 | ||
5125 | /* Make the specified architecture current, swapping the existing one | |
5126 | out. */ | |
5127 | ||
5128 | void | |
5129 | deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch) | |
5130 | { | |
5131 | gdb_assert (new_gdbarch != NULL); | |
5132 | gdb_assert (current_gdbarch != NULL); | |
5133 | gdb_assert (new_gdbarch->initialized_p); | |
5134 | current_gdbarch_swap_out_hack (); | |
5135 | current_gdbarch_swap_in_hack (new_gdbarch); | |
5136 | architecture_changed_event (); | |
5137 | } | |
c906108c | 5138 | |
104c1213 | 5139 | extern void _initialize_gdbarch (void); |
b4a20239 | 5140 | |
c906108c | 5141 | void |
7c7651b2 | 5142 | _initialize_gdbarch (void) |
c906108c | 5143 | { |
5d161b24 DB |
5144 | struct cmd_list_element *c; |
5145 | ||
5d161b24 | 5146 | add_show_from_set (add_set_cmd ("arch", |
c906108c SS |
5147 | class_maintenance, |
5148 | var_zinteger, | |
adf40b2e | 5149 | (char *)&gdbarch_debug, |
c906108c | 5150 | "Set architecture debugging.\n\ |
5d161b24 DB |
5151 | When non-zero, architecture debugging is enabled.", &setdebuglist), |
5152 | &showdebuglist); | |
59233f88 AC |
5153 | c = add_set_cmd ("archdebug", |
5154 | class_maintenance, | |
5155 | var_zinteger, | |
5156 | (char *)&gdbarch_debug, | |
5157 | "Set architecture debugging.\n\ | |
5d161b24 DB |
5158 | When non-zero, architecture debugging is enabled.", &setlist); |
5159 | ||
59233f88 AC |
5160 | deprecate_cmd (c, "set debug arch"); |
5161 | deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch"); | |
c906108c | 5162 | } |