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