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