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