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