Commit | Line | Data |
---|---|---|
59233f88 AC |
1 | /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */ |
2 | ||
adf40b2e | 3 | /* Dynamic architecture support for GDB, the GNU debugger. |
338d7c5c | 4 | Copyright 1998, 1999, 2000, 2001 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" |
67c2c32c | 65 | #include "gdb-events.h" |
95160752 | 66 | |
104c1213 JM |
67 | /* Static function declarations */ |
68 | ||
69 | static void verify_gdbarch (struct gdbarch *gdbarch); | |
b3cc3077 JB |
70 | static void alloc_gdbarch_data (struct gdbarch *); |
71 | static void init_gdbarch_data (struct gdbarch *); | |
95160752 | 72 | static void free_gdbarch_data (struct gdbarch *); |
104c1213 JM |
73 | static void init_gdbarch_swap (struct gdbarch *); |
74 | static void swapout_gdbarch_swap (struct gdbarch *); | |
75 | static void swapin_gdbarch_swap (struct gdbarch *); | |
76 | ||
0f71a2f6 JM |
77 | /* Convenience macro for allocting typesafe memory. */ |
78 | ||
79 | #ifndef XMALLOC | |
80 | #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE)) | |
81 | #endif | |
82 | ||
83 | ||
84 | /* Non-zero if we want to trace architecture code. */ | |
85 | ||
86 | #ifndef GDBARCH_DEBUG | |
87 | #define GDBARCH_DEBUG 0 | |
88 | #endif | |
89 | int gdbarch_debug = GDBARCH_DEBUG; | |
90 | ||
91 | ||
92 | /* Maintain the struct gdbarch object */ | |
93 | ||
94 | struct gdbarch | |
adf40b2e JM |
95 | { |
96 | /* basic architectural information */ | |
97 | const struct bfd_arch_info * bfd_arch_info; | |
98 | int byte_order; | |
0f71a2f6 | 99 | |
adf40b2e JM |
100 | /* target specific vector. */ |
101 | struct gdbarch_tdep *tdep; | |
4b9b3959 | 102 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 103 | |
adf40b2e | 104 | /* per-architecture data-pointers */ |
95160752 | 105 | unsigned nr_data; |
adf40b2e | 106 | void **data; |
0f71a2f6 | 107 | |
adf40b2e JM |
108 | /* per-architecture swap-regions */ |
109 | struct gdbarch_swap *swap; | |
0f71a2f6 | 110 | |
adf40b2e | 111 | /* Multi-arch values. |
0f71a2f6 | 112 | |
adf40b2e | 113 | When extending this structure you must: |
0f71a2f6 | 114 | |
adf40b2e | 115 | Add the field below. |
0f71a2f6 | 116 | |
adf40b2e JM |
117 | Declare set/get functions and define the corresponding |
118 | macro in gdbarch.h. | |
0f71a2f6 | 119 | |
adf40b2e JM |
120 | gdbarch_alloc(): If zero/NULL is not a suitable default, |
121 | initialize the new field. | |
0f71a2f6 | 122 | |
adf40b2e JM |
123 | verify_gdbarch(): Confirm that the target updated the field |
124 | correctly. | |
0f71a2f6 | 125 | |
7e73cedf | 126 | gdbarch_dump(): Add a fprintf_unfiltered call so that the new |
adf40b2e | 127 | field is dumped out |
0f71a2f6 | 128 | |
c0e8c252 | 129 | ``startup_gdbarch()'': Append an initial value to the static |
adf40b2e | 130 | variable (base values on the host's c-type system). |
0f71a2f6 | 131 | |
adf40b2e JM |
132 | get_gdbarch(): Implement the set/get functions (probably using |
133 | the macro's as shortcuts). | |
0f71a2f6 JM |
134 | |
135 | */ | |
136 | ||
adf40b2e JM |
137 | int short_bit; |
138 | int int_bit; | |
139 | int long_bit; | |
140 | int long_long_bit; | |
141 | int float_bit; | |
142 | int double_bit; | |
143 | int long_double_bit; | |
66b43ecb | 144 | int ptr_bit; |
52204a0b | 145 | int addr_bit; |
66b43ecb | 146 | int bfd_vma_bit; |
4e409299 | 147 | int char_signed; |
adf40b2e JM |
148 | gdbarch_read_pc_ftype *read_pc; |
149 | gdbarch_write_pc_ftype *write_pc; | |
150 | gdbarch_read_fp_ftype *read_fp; | |
151 | gdbarch_write_fp_ftype *write_fp; | |
152 | gdbarch_read_sp_ftype *read_sp; | |
153 | gdbarch_write_sp_ftype *write_sp; | |
39d4ef09 | 154 | gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer; |
61a0eb5b AC |
155 | gdbarch_register_read_ftype *register_read; |
156 | gdbarch_register_write_ftype *register_write; | |
adf40b2e | 157 | int num_regs; |
0aba1244 | 158 | int num_pseudo_regs; |
adf40b2e JM |
159 | int sp_regnum; |
160 | int fp_regnum; | |
161 | int pc_regnum; | |
60054393 | 162 | int fp0_regnum; |
03863182 AC |
163 | int npc_regnum; |
164 | int nnpc_regnum; | |
88c72b7d AC |
165 | gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum; |
166 | gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum; | |
167 | gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum; | |
168 | gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; | |
169 | gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; | |
adf40b2e JM |
170 | gdbarch_register_name_ftype *register_name; |
171 | int register_size; | |
172 | int register_bytes; | |
173 | gdbarch_register_byte_ftype *register_byte; | |
174 | gdbarch_register_raw_size_ftype *register_raw_size; | |
175 | int max_register_raw_size; | |
176 | gdbarch_register_virtual_size_ftype *register_virtual_size; | |
177 | int max_register_virtual_size; | |
178 | gdbarch_register_virtual_type_ftype *register_virtual_type; | |
666e11c5 | 179 | gdbarch_do_registers_info_ftype *do_registers_info; |
7c7651b2 | 180 | gdbarch_register_sim_regno_ftype *register_sim_regno; |
2649061d | 181 | gdbarch_register_bytes_ok_ftype *register_bytes_ok; |
01fb7433 AC |
182 | gdbarch_cannot_fetch_register_ftype *cannot_fetch_register; |
183 | gdbarch_cannot_store_register_ftype *cannot_store_register; | |
adf40b2e JM |
184 | int use_generic_dummy_frames; |
185 | int call_dummy_location; | |
186 | gdbarch_call_dummy_address_ftype *call_dummy_address; | |
187 | CORE_ADDR call_dummy_start_offset; | |
188 | CORE_ADDR call_dummy_breakpoint_offset; | |
189 | int call_dummy_breakpoint_offset_p; | |
190 | int call_dummy_length; | |
191 | gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy; | |
192 | int call_dummy_p; | |
193 | LONGEST * call_dummy_words; | |
194 | int sizeof_call_dummy_words; | |
195 | int call_dummy_stack_adjust_p; | |
196 | int call_dummy_stack_adjust; | |
197 | gdbarch_fix_call_dummy_ftype *fix_call_dummy; | |
10312cc4 AC |
198 | gdbarch_init_frame_pc_first_ftype *init_frame_pc_first; |
199 | gdbarch_init_frame_pc_ftype *init_frame_pc; | |
adf40b2e JM |
200 | int believe_pcc_promotion; |
201 | int believe_pcc_promotion_type; | |
b9a8e3bf | 202 | gdbarch_coerce_float_to_double_ftype *coerce_float_to_double; |
adf40b2e JM |
203 | gdbarch_get_saved_register_ftype *get_saved_register; |
204 | gdbarch_register_convertible_ftype *register_convertible; | |
205 | gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual; | |
206 | gdbarch_register_convert_to_raw_ftype *register_convert_to_raw; | |
7f1b2585 EZ |
207 | gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register; |
208 | gdbarch_store_pseudo_register_ftype *store_pseudo_register; | |
4478b372 JB |
209 | gdbarch_pointer_to_address_ftype *pointer_to_address; |
210 | gdbarch_address_to_pointer_ftype *address_to_pointer; | |
fc0c74b1 | 211 | gdbarch_integer_to_address_ftype *integer_to_address; |
71a9f22e | 212 | gdbarch_return_value_on_stack_ftype *return_value_on_stack; |
adf40b2e JM |
213 | gdbarch_extract_return_value_ftype *extract_return_value; |
214 | gdbarch_push_arguments_ftype *push_arguments; | |
215 | gdbarch_push_dummy_frame_ftype *push_dummy_frame; | |
216 | gdbarch_push_return_address_ftype *push_return_address; | |
217 | gdbarch_pop_frame_ftype *pop_frame; | |
adf40b2e JM |
218 | gdbarch_store_struct_return_ftype *store_struct_return; |
219 | gdbarch_store_return_value_ftype *store_return_value; | |
220 | gdbarch_extract_struct_value_address_ftype *extract_struct_value_address; | |
221 | gdbarch_use_struct_convention_ftype *use_struct_convention; | |
222 | gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs; | |
223 | gdbarch_init_extra_frame_info_ftype *init_extra_frame_info; | |
224 | gdbarch_skip_prologue_ftype *skip_prologue; | |
dad41f9a | 225 | gdbarch_prologue_frameless_p_ftype *prologue_frameless_p; |
adf40b2e JM |
226 | gdbarch_inner_than_ftype *inner_than; |
227 | gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc; | |
917317f4 JM |
228 | gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint; |
229 | gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint; | |
adf40b2e | 230 | CORE_ADDR decr_pc_after_break; |
e02bc4cc | 231 | gdbarch_prepare_to_proceed_ftype *prepare_to_proceed; |
adf40b2e JM |
232 | CORE_ADDR function_start_offset; |
233 | gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address; | |
234 | CORE_ADDR frame_args_skip; | |
235 | gdbarch_frameless_function_invocation_ftype *frameless_function_invocation; | |
236 | gdbarch_frame_chain_ftype *frame_chain; | |
237 | gdbarch_frame_chain_valid_ftype *frame_chain_valid; | |
238 | gdbarch_frame_saved_pc_ftype *frame_saved_pc; | |
239 | gdbarch_frame_args_address_ftype *frame_args_address; | |
240 | gdbarch_frame_locals_address_ftype *frame_locals_address; | |
241 | gdbarch_saved_pc_after_call_ftype *saved_pc_after_call; | |
242 | gdbarch_frame_num_args_ftype *frame_num_args; | |
2ada493a | 243 | gdbarch_stack_align_ftype *stack_align; |
1dd4193b | 244 | int extra_stack_alignment_needed; |
d03e67c9 | 245 | gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr; |
d1e3cf49 | 246 | gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos; |
58d5518e | 247 | int parm_boundary; |
f0d4cc9e AC |
248 | const struct floatformat * float_format; |
249 | const struct floatformat * double_format; | |
250 | const struct floatformat * long_double_format; | |
f517ea4e | 251 | gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr; |
875e1767 | 252 | gdbarch_addr_bits_remove_ftype *addr_bits_remove; |
64c4637f | 253 | gdbarch_software_single_step_ftype *software_single_step; |
2bf0cb65 | 254 | gdbarch_print_insn_ftype *print_insn; |
bdcd319a | 255 | gdbarch_skip_trampoline_code_ftype *skip_trampoline_code; |
68e9cc94 | 256 | gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline; |
c12260ac | 257 | gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p; |
552c04a7 | 258 | gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments; |
b6af0555 | 259 | gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info; |
adf40b2e | 260 | }; |
0f71a2f6 JM |
261 | |
262 | ||
263 | /* The default architecture uses host values (for want of a better | |
264 | choice). */ | |
265 | ||
266 | extern const struct bfd_arch_info bfd_default_arch_struct; | |
267 | ||
4b9b3959 AC |
268 | struct gdbarch startup_gdbarch = |
269 | { | |
0f71a2f6 JM |
270 | /* basic architecture information */ |
271 | &bfd_default_arch_struct, | |
d7449b42 | 272 | BFD_ENDIAN_BIG, |
4b9b3959 AC |
273 | /* target specific vector and its dump routine */ |
274 | NULL, NULL, | |
0f71a2f6 JM |
275 | /*per-architecture data-pointers and swap regions */ |
276 | 0, NULL, NULL, | |
277 | /* Multi-arch values */ | |
0f71a2f6 JM |
278 | 8 * sizeof (short), |
279 | 8 * sizeof (int), | |
280 | 8 * sizeof (long), | |
281 | 8 * sizeof (LONGEST), | |
282 | 8 * sizeof (float), | |
283 | 8 * sizeof (double), | |
284 | 8 * sizeof (long double), | |
66b43ecb AC |
285 | 8 * sizeof (void*), |
286 | 8 * sizeof (void*), | |
52204a0b | 287 | 8 * sizeof (void*), |
4e409299 | 288 | 1, |
0f71a2f6 JM |
289 | 0, |
290 | 0, | |
291 | 0, | |
292 | 0, | |
293 | 0, | |
294 | 0, | |
295 | 0, | |
296 | 0, | |
297 | 0, | |
298 | 0, | |
299 | 0, | |
300 | 0, | |
301 | 0, | |
302 | 0, | |
303 | 0, | |
304 | 0, | |
305 | 0, | |
306 | 0, | |
307 | 0, | |
308 | 0, | |
309 | 0, | |
310 | 0, | |
311 | 0, | |
312 | 0, | |
313 | 0, | |
314 | 0, | |
46cd78fb | 315 | generic_register_raw_size, |
0f71a2f6 | 316 | 0, |
ce29138a | 317 | generic_register_virtual_size, |
0f71a2f6 JM |
318 | 0, |
319 | 0, | |
320 | 0, | |
321 | 0, | |
322 | 0, | |
b9a8e3bf | 323 | 0, |
7355ddba | 324 | 0, |
03863182 AC |
325 | 0, |
326 | 0, | |
60054393 | 327 | 0, |
0aba1244 | 328 | 0, |
666e11c5 | 329 | 0, |
7c7651b2 | 330 | 0, |
88c72b7d AC |
331 | 0, |
332 | 0, | |
333 | 0, | |
334 | 0, | |
335 | 0, | |
2649061d | 336 | 0, |
61a0eb5b AC |
337 | 0, |
338 | 0, | |
10312cc4 AC |
339 | 0, |
340 | 0, | |
01fb7433 AC |
341 | 0, |
342 | 0, | |
39d4ef09 | 343 | 0, |
0f71a2f6 JM |
344 | generic_get_saved_register, |
345 | 0, | |
346 | 0, | |
347 | 0, | |
348 | 0, | |
349 | 0, | |
350 | 0, | |
351 | 0, | |
352 | 0, | |
353 | 0, | |
354 | 0, | |
355 | 0, | |
356 | 0, | |
357 | 0, | |
358 | 0, | |
359 | 0, | |
360 | 0, | |
361 | 0, | |
362 | 0, | |
363 | 0, | |
364 | 0, | |
365 | 0, | |
366 | 0, | |
367 | 0, | |
368 | 0, | |
369 | 0, | |
370 | 0, | |
371 | 0, | |
372 | 0, | |
373 | 0, | |
374 | 0, | |
375 | 0, | |
376 | 0, | |
377 | 0, | |
378 | 0, | |
379 | 0, | |
917317f4 JM |
380 | 0, |
381 | 0, | |
4478b372 JB |
382 | 0, |
383 | 0, | |
71a9f22e | 384 | 0, |
2ada493a | 385 | 0, |
d03e67c9 | 386 | 0, |
dad41f9a | 387 | 0, |
d1e3cf49 | 388 | 0, |
f0d4cc9e AC |
389 | 0, |
390 | 0, | |
391 | 0, | |
7f1b2585 EZ |
392 | 0, |
393 | 0, | |
bdcd319a | 394 | 0, |
2bf0cb65 | 395 | 0, |
fc0c74b1 | 396 | 0, |
68e9cc94 | 397 | 0, |
a72293e2 | 398 | generic_in_function_epilogue_p, |
552c04a7 | 399 | construct_inferior_arguments, |
b6af0555 | 400 | 0, |
c0e8c252 | 401 | /* startup_gdbarch() */ |
0f71a2f6 | 402 | }; |
4b9b3959 | 403 | |
c0e8c252 | 404 | struct gdbarch *current_gdbarch = &startup_gdbarch; |
0f71a2f6 | 405 | |
ceaa8edf JB |
406 | /* Do any initialization needed for a non-multiarch configuration |
407 | after the _initialize_MODULE functions have been run. */ | |
408 | void | |
409 | initialize_non_multiarch () | |
410 | { | |
411 | alloc_gdbarch_data (&startup_gdbarch); | |
412 | init_gdbarch_data (&startup_gdbarch); | |
413 | } | |
414 | ||
0f71a2f6 | 415 | |
66b43ecb | 416 | /* Create a new ``struct gdbarch'' based on information provided by |
0f71a2f6 JM |
417 | ``struct gdbarch_info''. */ |
418 | ||
419 | struct gdbarch * | |
104c1213 JM |
420 | gdbarch_alloc (const struct gdbarch_info *info, |
421 | struct gdbarch_tdep *tdep) | |
0f71a2f6 | 422 | { |
85de9627 AC |
423 | /* NOTE: The new architecture variable is named ``current_gdbarch'' |
424 | so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to | |
425 | the current local architecture and not the previous global | |
426 | architecture. This ensures that the new architectures initial | |
427 | values are not influenced by the previous architecture. Once | |
428 | everything is parameterised with gdbarch, this will go away. */ | |
429 | struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch); | |
430 | memset (current_gdbarch, 0, sizeof (*current_gdbarch)); | |
0f71a2f6 | 431 | |
85de9627 | 432 | alloc_gdbarch_data (current_gdbarch); |
b3cc3077 | 433 | |
85de9627 | 434 | current_gdbarch->tdep = tdep; |
0f71a2f6 | 435 | |
85de9627 AC |
436 | current_gdbarch->bfd_arch_info = info->bfd_arch_info; |
437 | current_gdbarch->byte_order = info->byte_order; | |
0f71a2f6 JM |
438 | |
439 | /* Force the explicit initialization of these. */ | |
85de9627 AC |
440 | current_gdbarch->short_bit = 2*TARGET_CHAR_BIT; |
441 | current_gdbarch->int_bit = 4*TARGET_CHAR_BIT; | |
442 | current_gdbarch->long_bit = 4*TARGET_CHAR_BIT; | |
443 | current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT; | |
444 | current_gdbarch->float_bit = 4*TARGET_CHAR_BIT; | |
445 | current_gdbarch->double_bit = 8*TARGET_CHAR_BIT; | |
446 | current_gdbarch->long_double_bit = 2*TARGET_DOUBLE_BIT; | |
447 | current_gdbarch->ptr_bit = TARGET_INT_BIT; | |
448 | current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address; | |
4e409299 | 449 | current_gdbarch->char_signed = -1; |
85de9627 AC |
450 | current_gdbarch->read_pc = generic_target_read_pc; |
451 | current_gdbarch->write_pc = generic_target_write_pc; | |
452 | current_gdbarch->read_fp = generic_target_read_fp; | |
453 | current_gdbarch->write_fp = generic_target_write_fp; | |
454 | current_gdbarch->read_sp = generic_target_read_sp; | |
455 | current_gdbarch->write_sp = generic_target_write_sp; | |
456 | current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer; | |
457 | current_gdbarch->num_regs = -1; | |
458 | current_gdbarch->sp_regnum = -1; | |
459 | current_gdbarch->fp_regnum = -1; | |
460 | current_gdbarch->pc_regnum = -1; | |
461 | current_gdbarch->fp0_regnum = -1; | |
462 | current_gdbarch->npc_regnum = -1; | |
463 | current_gdbarch->nnpc_regnum = -1; | |
464 | current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum; | |
465 | current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum; | |
466 | current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum; | |
467 | current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum; | |
468 | current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum; | |
469 | current_gdbarch->register_name = legacy_register_name; | |
470 | current_gdbarch->register_size = -1; | |
471 | current_gdbarch->register_bytes = -1; | |
472 | current_gdbarch->max_register_raw_size = -1; | |
473 | current_gdbarch->max_register_virtual_size = -1; | |
474 | current_gdbarch->do_registers_info = do_registers_info; | |
475 | current_gdbarch->register_sim_regno = default_register_sim_regno; | |
476 | current_gdbarch->cannot_fetch_register = cannot_register_not; | |
477 | current_gdbarch->cannot_store_register = cannot_register_not; | |
478 | current_gdbarch->use_generic_dummy_frames = -1; | |
479 | current_gdbarch->call_dummy_start_offset = -1; | |
480 | current_gdbarch->call_dummy_breakpoint_offset = -1; | |
481 | current_gdbarch->call_dummy_breakpoint_offset_p = -1; | |
482 | current_gdbarch->call_dummy_length = -1; | |
483 | current_gdbarch->call_dummy_p = -1; | |
484 | current_gdbarch->call_dummy_words = legacy_call_dummy_words; | |
485 | current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; | |
486 | current_gdbarch->call_dummy_stack_adjust_p = -1; | |
487 | current_gdbarch->init_frame_pc_first = init_frame_pc_noop; | |
488 | current_gdbarch->init_frame_pc = init_frame_pc_default; | |
489 | current_gdbarch->coerce_float_to_double = default_coerce_float_to_double; | |
490 | current_gdbarch->register_convertible = generic_register_convertible_not; | |
491 | current_gdbarch->pointer_to_address = unsigned_pointer_to_address; | |
492 | current_gdbarch->address_to_pointer = unsigned_address_to_pointer; | |
493 | current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not; | |
56f12751 | 494 | current_gdbarch->use_struct_convention = generic_use_struct_convention; |
85de9627 AC |
495 | current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p; |
496 | current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc; | |
497 | current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; | |
498 | current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; | |
499 | current_gdbarch->decr_pc_after_break = -1; | |
500 | current_gdbarch->prepare_to_proceed = default_prepare_to_proceed; | |
501 | current_gdbarch->function_start_offset = -1; | |
502 | current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address; | |
503 | current_gdbarch->frame_args_skip = -1; | |
504 | current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not; | |
505 | current_gdbarch->extra_stack_alignment_needed = 1; | |
506 | current_gdbarch->convert_from_func_ptr_addr = core_addr_identity; | |
507 | current_gdbarch->addr_bits_remove = core_addr_identity; | |
508 | current_gdbarch->print_insn = legacy_print_insn; | |
509 | current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code; | |
68e9cc94 | 510 | current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline; |
c12260ac | 511 | current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p; |
552c04a7 | 512 | current_gdbarch->construct_inferior_arguments = construct_inferior_arguments; |
0f71a2f6 JM |
513 | /* gdbarch_alloc() */ |
514 | ||
85de9627 | 515 | return current_gdbarch; |
0f71a2f6 JM |
516 | } |
517 | ||
518 | ||
058f20d5 JB |
519 | /* Free a gdbarch struct. This should never happen in normal |
520 | operation --- once you've created a gdbarch, you keep it around. | |
521 | However, if an architecture's init function encounters an error | |
522 | building the structure, it may need to clean up a partially | |
523 | constructed gdbarch. */ | |
4b9b3959 | 524 | |
058f20d5 JB |
525 | void |
526 | gdbarch_free (struct gdbarch *arch) | |
527 | { | |
95160752 AC |
528 | gdb_assert (arch != NULL); |
529 | free_gdbarch_data (arch); | |
338d7c5c | 530 | xfree (arch); |
058f20d5 JB |
531 | } |
532 | ||
533 | ||
0f71a2f6 JM |
534 | /* Ensure that all values in a GDBARCH are reasonable. */ |
535 | ||
0f71a2f6 | 536 | static void |
104c1213 | 537 | verify_gdbarch (struct gdbarch *gdbarch) |
0f71a2f6 | 538 | { |
f16a1923 AC |
539 | struct ui_file *log; |
540 | struct cleanup *cleanups; | |
541 | long dummy; | |
542 | char *buf; | |
0f71a2f6 | 543 | /* Only perform sanity checks on a multi-arch target. */ |
6166d547 | 544 | if (!GDB_MULTI_ARCH) |
0f71a2f6 | 545 | return; |
f16a1923 AC |
546 | log = mem_fileopen (); |
547 | cleanups = make_cleanup_ui_file_delete (log); | |
0f71a2f6 | 548 | /* fundamental */ |
428721aa | 549 | if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN) |
f16a1923 | 550 | fprintf_unfiltered (log, "\n\tbyte-order"); |
0f71a2f6 | 551 | if (gdbarch->bfd_arch_info == NULL) |
f16a1923 | 552 | fprintf_unfiltered (log, "\n\tbfd_arch_info"); |
0f71a2f6 | 553 | /* Check those that need to be defined for the given multi-arch level. */ |
66b43ecb AC |
554 | /* Skip verify of short_bit, invalid_p == 0 */ |
555 | /* Skip verify of int_bit, invalid_p == 0 */ | |
556 | /* Skip verify of long_bit, invalid_p == 0 */ | |
557 | /* Skip verify of long_long_bit, invalid_p == 0 */ | |
558 | /* Skip verify of float_bit, invalid_p == 0 */ | |
559 | /* Skip verify of double_bit, invalid_p == 0 */ | |
560 | /* Skip verify of long_double_bit, invalid_p == 0 */ | |
561 | /* Skip verify of ptr_bit, invalid_p == 0 */ | |
52204a0b DT |
562 | if (gdbarch->addr_bit == 0) |
563 | gdbarch->addr_bit = TARGET_PTR_BIT; | |
c0e8c252 | 564 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ |
4e409299 JB |
565 | if (gdbarch->char_signed == -1) |
566 | gdbarch->char_signed = 1; | |
be8dfb87 AC |
567 | /* Skip verify of read_pc, invalid_p == 0 */ |
568 | /* Skip verify of write_pc, invalid_p == 0 */ | |
569 | /* Skip verify of read_fp, invalid_p == 0 */ | |
570 | /* Skip verify of write_fp, invalid_p == 0 */ | |
571 | /* Skip verify of read_sp, invalid_p == 0 */ | |
572 | /* Skip verify of write_sp, invalid_p == 0 */ | |
39d4ef09 | 573 | /* Skip verify of virtual_frame_pointer, invalid_p == 0 */ |
61a0eb5b AC |
574 | /* Skip verify of register_read, has predicate */ |
575 | /* Skip verify of register_write, has predicate */ | |
0f71a2f6 JM |
576 | if ((GDB_MULTI_ARCH >= 2) |
577 | && (gdbarch->num_regs == -1)) | |
f16a1923 | 578 | fprintf_unfiltered (log, "\n\tnum_regs"); |
0aba1244 | 579 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ |
0f71a2f6 JM |
580 | if ((GDB_MULTI_ARCH >= 2) |
581 | && (gdbarch->sp_regnum == -1)) | |
f16a1923 | 582 | fprintf_unfiltered (log, "\n\tsp_regnum"); |
0f71a2f6 JM |
583 | if ((GDB_MULTI_ARCH >= 2) |
584 | && (gdbarch->fp_regnum == -1)) | |
f16a1923 | 585 | fprintf_unfiltered (log, "\n\tfp_regnum"); |
0f71a2f6 JM |
586 | if ((GDB_MULTI_ARCH >= 2) |
587 | && (gdbarch->pc_regnum == -1)) | |
f16a1923 | 588 | fprintf_unfiltered (log, "\n\tpc_regnum"); |
60054393 | 589 | /* Skip verify of fp0_regnum, invalid_p == 0 */ |
03863182 AC |
590 | /* Skip verify of npc_regnum, invalid_p == 0 */ |
591 | /* Skip verify of nnpc_regnum, invalid_p == 0 */ | |
88c72b7d AC |
592 | /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */ |
593 | /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */ | |
594 | /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */ | |
595 | /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */ | |
596 | /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */ | |
c0e8c252 | 597 | /* Skip verify of register_name, invalid_p == 0 */ |
0f71a2f6 JM |
598 | if ((GDB_MULTI_ARCH >= 2) |
599 | && (gdbarch->register_size == -1)) | |
f16a1923 | 600 | fprintf_unfiltered (log, "\n\tregister_size"); |
0f71a2f6 JM |
601 | if ((GDB_MULTI_ARCH >= 2) |
602 | && (gdbarch->register_bytes == -1)) | |
f16a1923 | 603 | fprintf_unfiltered (log, "\n\tregister_bytes"); |
0f71a2f6 JM |
604 | if ((GDB_MULTI_ARCH >= 2) |
605 | && (gdbarch->register_byte == 0)) | |
f16a1923 | 606 | fprintf_unfiltered (log, "\n\tregister_byte"); |
0f71a2f6 JM |
607 | if ((GDB_MULTI_ARCH >= 2) |
608 | && (gdbarch->register_raw_size == 0)) | |
f16a1923 | 609 | fprintf_unfiltered (log, "\n\tregister_raw_size"); |
0f71a2f6 JM |
610 | if ((GDB_MULTI_ARCH >= 2) |
611 | && (gdbarch->max_register_raw_size == -1)) | |
f16a1923 | 612 | fprintf_unfiltered (log, "\n\tmax_register_raw_size"); |
0f71a2f6 JM |
613 | if ((GDB_MULTI_ARCH >= 2) |
614 | && (gdbarch->register_virtual_size == 0)) | |
f16a1923 | 615 | fprintf_unfiltered (log, "\n\tregister_virtual_size"); |
0f71a2f6 JM |
616 | if ((GDB_MULTI_ARCH >= 2) |
617 | && (gdbarch->max_register_virtual_size == -1)) | |
f16a1923 | 618 | fprintf_unfiltered (log, "\n\tmax_register_virtual_size"); |
0f71a2f6 JM |
619 | if ((GDB_MULTI_ARCH >= 2) |
620 | && (gdbarch->register_virtual_type == 0)) | |
f16a1923 | 621 | fprintf_unfiltered (log, "\n\tregister_virtual_type"); |
666e11c5 | 622 | /* Skip verify of do_registers_info, invalid_p == 0 */ |
7c7651b2 | 623 | /* Skip verify of register_sim_regno, invalid_p == 0 */ |
2649061d | 624 | /* Skip verify of register_bytes_ok, has predicate */ |
01fb7433 AC |
625 | /* Skip verify of cannot_fetch_register, invalid_p == 0 */ |
626 | /* Skip verify of cannot_store_register, invalid_p == 0 */ | |
0f71a2f6 JM |
627 | if ((GDB_MULTI_ARCH >= 1) |
628 | && (gdbarch->use_generic_dummy_frames == -1)) | |
f16a1923 | 629 | fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames"); |
a985cd41 | 630 | if ((GDB_MULTI_ARCH >= 1) |
0f71a2f6 | 631 | && (gdbarch->call_dummy_location == 0)) |
f16a1923 | 632 | fprintf_unfiltered (log, "\n\tcall_dummy_location"); |
0f71a2f6 JM |
633 | if ((GDB_MULTI_ARCH >= 2) |
634 | && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0)) | |
f16a1923 | 635 | fprintf_unfiltered (log, "\n\tcall_dummy_address"); |
0f71a2f6 JM |
636 | if ((GDB_MULTI_ARCH >= 2) |
637 | && (gdbarch->call_dummy_start_offset == -1)) | |
f16a1923 | 638 | fprintf_unfiltered (log, "\n\tcall_dummy_start_offset"); |
0f71a2f6 | 639 | if ((GDB_MULTI_ARCH >= 2) |
83e6b173 | 640 | && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)) |
f16a1923 | 641 | fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset"); |
0f71a2f6 JM |
642 | if ((GDB_MULTI_ARCH >= 1) |
643 | && (gdbarch->call_dummy_breakpoint_offset_p == -1)) | |
f16a1923 | 644 | fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p"); |
0f71a2f6 JM |
645 | if ((GDB_MULTI_ARCH >= 2) |
646 | && (gdbarch->call_dummy_length == -1)) | |
f16a1923 | 647 | fprintf_unfiltered (log, "\n\tcall_dummy_length"); |
a4a7d16f | 648 | if ((GDB_MULTI_ARCH >= 1) |
0f71a2f6 | 649 | && (gdbarch->pc_in_call_dummy == 0)) |
f16a1923 | 650 | fprintf_unfiltered (log, "\n\tpc_in_call_dummy"); |
0f71a2f6 JM |
651 | if ((GDB_MULTI_ARCH >= 1) |
652 | && (gdbarch->call_dummy_p == -1)) | |
f16a1923 | 653 | fprintf_unfiltered (log, "\n\tcall_dummy_p"); |
c0e8c252 AC |
654 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
655 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ | |
0f71a2f6 JM |
656 | if ((GDB_MULTI_ARCH >= 1) |
657 | && (gdbarch->call_dummy_stack_adjust_p == -1)) | |
f16a1923 | 658 | fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p"); |
0f71a2f6 JM |
659 | if ((GDB_MULTI_ARCH >= 2) |
660 | && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)) | |
f16a1923 | 661 | fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust"); |
0f71a2f6 JM |
662 | if ((GDB_MULTI_ARCH >= 2) |
663 | && (gdbarch->fix_call_dummy == 0)) | |
f16a1923 | 664 | fprintf_unfiltered (log, "\n\tfix_call_dummy"); |
10312cc4 AC |
665 | /* Skip verify of init_frame_pc_first, invalid_p == 0 */ |
666 | /* Skip verify of init_frame_pc, invalid_p == 0 */ | |
c0e8c252 | 667 | /* Skip verify of coerce_float_to_double, invalid_p == 0 */ |
0f71a2f6 JM |
668 | if ((GDB_MULTI_ARCH >= 1) |
669 | && (gdbarch->get_saved_register == 0)) | |
f16a1923 | 670 | fprintf_unfiltered (log, "\n\tget_saved_register"); |
c0e8c252 AC |
671 | /* Skip verify of register_convertible, invalid_p == 0 */ |
672 | /* Skip verify of register_convert_to_virtual, invalid_p == 0 */ | |
673 | /* Skip verify of register_convert_to_raw, invalid_p == 0 */ | |
31e9866e AC |
674 | /* Skip verify of fetch_pseudo_register, has predicate */ |
675 | /* Skip verify of store_pseudo_register, has predicate */ | |
4478b372 JB |
676 | /* Skip verify of pointer_to_address, invalid_p == 0 */ |
677 | /* Skip verify of address_to_pointer, invalid_p == 0 */ | |
fc0c74b1 | 678 | /* Skip verify of integer_to_address, has predicate */ |
71a9f22e | 679 | /* Skip verify of return_value_on_stack, invalid_p == 0 */ |
0f71a2f6 JM |
680 | if ((GDB_MULTI_ARCH >= 2) |
681 | && (gdbarch->extract_return_value == 0)) | |
f16a1923 | 682 | fprintf_unfiltered (log, "\n\textract_return_value"); |
0f71a2f6 JM |
683 | if ((GDB_MULTI_ARCH >= 1) |
684 | && (gdbarch->push_arguments == 0)) | |
f16a1923 | 685 | fprintf_unfiltered (log, "\n\tpush_arguments"); |
0f71a2f6 JM |
686 | if ((GDB_MULTI_ARCH >= 2) |
687 | && (gdbarch->push_dummy_frame == 0)) | |
f16a1923 | 688 | fprintf_unfiltered (log, "\n\tpush_dummy_frame"); |
69a0d5f4 | 689 | /* Skip verify of push_return_address, has predicate */ |
0f71a2f6 JM |
690 | if ((GDB_MULTI_ARCH >= 2) |
691 | && (gdbarch->pop_frame == 0)) | |
f16a1923 | 692 | fprintf_unfiltered (log, "\n\tpop_frame"); |
0f71a2f6 JM |
693 | if ((GDB_MULTI_ARCH >= 2) |
694 | && (gdbarch->store_struct_return == 0)) | |
f16a1923 | 695 | fprintf_unfiltered (log, "\n\tstore_struct_return"); |
0f71a2f6 JM |
696 | if ((GDB_MULTI_ARCH >= 2) |
697 | && (gdbarch->store_return_value == 0)) | |
f16a1923 | 698 | fprintf_unfiltered (log, "\n\tstore_return_value"); |
d6dd581e | 699 | /* Skip verify of extract_struct_value_address, has predicate */ |
56f12751 | 700 | /* Skip verify of use_struct_convention, invalid_p == 0 */ |
0f71a2f6 JM |
701 | if ((GDB_MULTI_ARCH >= 2) |
702 | && (gdbarch->frame_init_saved_regs == 0)) | |
f16a1923 | 703 | fprintf_unfiltered (log, "\n\tframe_init_saved_regs"); |
5fdff426 | 704 | /* Skip verify of init_extra_frame_info, has predicate */ |
0f71a2f6 JM |
705 | if ((GDB_MULTI_ARCH >= 2) |
706 | && (gdbarch->skip_prologue == 0)) | |
f16a1923 | 707 | fprintf_unfiltered (log, "\n\tskip_prologue"); |
dad41f9a | 708 | /* Skip verify of prologue_frameless_p, invalid_p == 0 */ |
0f71a2f6 JM |
709 | if ((GDB_MULTI_ARCH >= 2) |
710 | && (gdbarch->inner_than == 0)) | |
f16a1923 | 711 | fprintf_unfiltered (log, "\n\tinner_than"); |
c0e8c252 AC |
712 | /* Skip verify of breakpoint_from_pc, invalid_p == 0 */ |
713 | /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */ | |
714 | /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */ | |
0f71a2f6 JM |
715 | if ((GDB_MULTI_ARCH >= 2) |
716 | && (gdbarch->decr_pc_after_break == -1)) | |
f16a1923 | 717 | fprintf_unfiltered (log, "\n\tdecr_pc_after_break"); |
e02bc4cc | 718 | /* Skip verify of prepare_to_proceed, invalid_p == 0 */ |
0f71a2f6 JM |
719 | if ((GDB_MULTI_ARCH >= 2) |
720 | && (gdbarch->function_start_offset == -1)) | |
f16a1923 | 721 | fprintf_unfiltered (log, "\n\tfunction_start_offset"); |
c0e8c252 | 722 | /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */ |
0f71a2f6 JM |
723 | if ((GDB_MULTI_ARCH >= 2) |
724 | && (gdbarch->frame_args_skip == -1)) | |
f16a1923 | 725 | fprintf_unfiltered (log, "\n\tframe_args_skip"); |
c0e8c252 | 726 | /* Skip verify of frameless_function_invocation, invalid_p == 0 */ |
0f71a2f6 JM |
727 | if ((GDB_MULTI_ARCH >= 2) |
728 | && (gdbarch->frame_chain == 0)) | |
f16a1923 | 729 | fprintf_unfiltered (log, "\n\tframe_chain"); |
0f71a2f6 JM |
730 | if ((GDB_MULTI_ARCH >= 1) |
731 | && (gdbarch->frame_chain_valid == 0)) | |
f16a1923 | 732 | fprintf_unfiltered (log, "\n\tframe_chain_valid"); |
0f71a2f6 JM |
733 | if ((GDB_MULTI_ARCH >= 2) |
734 | && (gdbarch->frame_saved_pc == 0)) | |
f16a1923 | 735 | fprintf_unfiltered (log, "\n\tframe_saved_pc"); |
0f71a2f6 JM |
736 | if ((GDB_MULTI_ARCH >= 2) |
737 | && (gdbarch->frame_args_address == 0)) | |
f16a1923 | 738 | fprintf_unfiltered (log, "\n\tframe_args_address"); |
0f71a2f6 JM |
739 | if ((GDB_MULTI_ARCH >= 2) |
740 | && (gdbarch->frame_locals_address == 0)) | |
f16a1923 | 741 | fprintf_unfiltered (log, "\n\tframe_locals_address"); |
0f71a2f6 JM |
742 | if ((GDB_MULTI_ARCH >= 2) |
743 | && (gdbarch->saved_pc_after_call == 0)) | |
f16a1923 | 744 | fprintf_unfiltered (log, "\n\tsaved_pc_after_call"); |
0f71a2f6 JM |
745 | if ((GDB_MULTI_ARCH >= 2) |
746 | && (gdbarch->frame_num_args == 0)) | |
f16a1923 | 747 | fprintf_unfiltered (log, "\n\tframe_num_args"); |
2ada493a | 748 | /* Skip verify of stack_align, has predicate */ |
1dd4193b | 749 | /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ |
d03e67c9 | 750 | /* Skip verify of reg_struct_has_addr, has predicate */ |
d1e3cf49 | 751 | /* Skip verify of save_dummy_frame_tos, has predicate */ |
f0d4cc9e AC |
752 | if (gdbarch->float_format == 0) |
753 | gdbarch->float_format = default_float_format (gdbarch); | |
754 | if (gdbarch->double_format == 0) | |
755 | gdbarch->double_format = default_double_format (gdbarch); | |
756 | if (gdbarch->long_double_format == 0) | |
757 | gdbarch->long_double_format = &floatformat_unknown; | |
f517ea4e | 758 | /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */ |
875e1767 | 759 | /* Skip verify of addr_bits_remove, invalid_p == 0 */ |
64c4637f | 760 | /* Skip verify of software_single_step, has predicate */ |
2bf0cb65 | 761 | /* Skip verify of print_insn, invalid_p == 0 */ |
bdcd319a | 762 | /* Skip verify of skip_trampoline_code, invalid_p == 0 */ |
68e9cc94 | 763 | /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */ |
c12260ac | 764 | /* Skip verify of in_function_epilogue_p, invalid_p == 0 */ |
552c04a7 | 765 | /* Skip verify of construct_inferior_arguments, invalid_p == 0 */ |
b6af0555 | 766 | /* Skip verify of dwarf2_build_frame_info, has predicate */ |
f16a1923 AC |
767 | buf = ui_file_xstrdup (log, &dummy); |
768 | make_cleanup (xfree, buf); | |
769 | if (strlen (buf) > 0) | |
770 | internal_error (__FILE__, __LINE__, | |
771 | "verify_gdbarch: the following are invalid ...%s", | |
772 | buf); | |
773 | do_cleanups (cleanups); | |
0f71a2f6 JM |
774 | } |
775 | ||
776 | ||
777 | /* Print out the details of the current architecture. */ | |
778 | ||
4b9b3959 AC |
779 | /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it |
780 | just happens to match the global variable ``current_gdbarch''. That | |
781 | way macros refering to that variable get the local and not the global | |
782 | version - ulgh. Once everything is parameterised with gdbarch, this | |
783 | will go away. */ | |
784 | ||
0f71a2f6 | 785 | void |
4b9b3959 | 786 | gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) |
0f71a2f6 | 787 | { |
4b9b3959 AC |
788 | fprintf_unfiltered (file, |
789 | "gdbarch_dump: GDB_MULTI_ARCH = %d\n", | |
790 | GDB_MULTI_ARCH); | |
c12260ac CV |
791 | if (GDB_MULTI_ARCH) |
792 | fprintf_unfiltered (file, | |
793 | "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n", | |
794 | (long) current_gdbarch->in_function_epilogue_p); | |
08e45a40 AC |
795 | if (GDB_MULTI_ARCH) |
796 | fprintf_unfiltered (file, | |
797 | "gdbarch_dump: register_read = 0x%08lx\n", | |
798 | (long) current_gdbarch->register_read); | |
799 | if (GDB_MULTI_ARCH) | |
800 | fprintf_unfiltered (file, | |
801 | "gdbarch_dump: register_write = 0x%08lx\n", | |
802 | (long) current_gdbarch->register_write); | |
803 | #ifdef ADDRESS_TO_POINTER | |
804 | #if GDB_MULTI_ARCH | |
805 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 806 | fprintf_unfiltered (file, |
08e45a40 AC |
807 | "gdbarch_dump: %s # %s\n", |
808 | "ADDRESS_TO_POINTER(type, buf, addr)", | |
809 | XSTRING (ADDRESS_TO_POINTER (type, buf, addr))); | |
4b9b3959 | 810 | #endif |
08e45a40 AC |
811 | if (GDB_MULTI_ARCH) |
812 | fprintf_unfiltered (file, | |
813 | "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n", | |
814 | (long) current_gdbarch->address_to_pointer | |
815 | /*ADDRESS_TO_POINTER ()*/); | |
4b9b3959 | 816 | #endif |
08e45a40 | 817 | #ifdef ADDR_BITS_REMOVE |
4b9b3959 | 818 | fprintf_unfiltered (file, |
08e45a40 AC |
819 | "gdbarch_dump: %s # %s\n", |
820 | "ADDR_BITS_REMOVE(addr)", | |
821 | XSTRING (ADDR_BITS_REMOVE (addr))); | |
822 | if (GDB_MULTI_ARCH) | |
823 | fprintf_unfiltered (file, | |
824 | "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n", | |
825 | (long) current_gdbarch->addr_bits_remove | |
826 | /*ADDR_BITS_REMOVE ()*/); | |
4b9b3959 | 827 | #endif |
08e45a40 | 828 | #ifdef BELIEVE_PCC_PROMOTION |
4b9b3959 | 829 | fprintf_unfiltered (file, |
08e45a40 AC |
830 | "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n", |
831 | XSTRING (BELIEVE_PCC_PROMOTION)); | |
832 | fprintf_unfiltered (file, | |
06b25f14 AC |
833 | "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n", |
834 | BELIEVE_PCC_PROMOTION); | |
4b9b3959 | 835 | #endif |
08e45a40 | 836 | #ifdef BELIEVE_PCC_PROMOTION_TYPE |
4b9b3959 | 837 | fprintf_unfiltered (file, |
08e45a40 AC |
838 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n", |
839 | XSTRING (BELIEVE_PCC_PROMOTION_TYPE)); | |
840 | fprintf_unfiltered (file, | |
06b25f14 AC |
841 | "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n", |
842 | BELIEVE_PCC_PROMOTION_TYPE); | |
4b9b3959 | 843 | #endif |
08e45a40 | 844 | #ifdef BREAKPOINT_FROM_PC |
4b9b3959 | 845 | fprintf_unfiltered (file, |
08e45a40 AC |
846 | "gdbarch_dump: %s # %s\n", |
847 | "BREAKPOINT_FROM_PC(pcptr, lenptr)", | |
848 | XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr))); | |
849 | if (GDB_MULTI_ARCH) | |
850 | fprintf_unfiltered (file, | |
851 | "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n", | |
852 | (long) current_gdbarch->breakpoint_from_pc | |
853 | /*BREAKPOINT_FROM_PC ()*/); | |
4b9b3959 | 854 | #endif |
08e45a40 | 855 | #ifdef CALL_DUMMY_ADDRESS |
4b9b3959 | 856 | fprintf_unfiltered (file, |
08e45a40 AC |
857 | "gdbarch_dump: %s # %s\n", |
858 | "CALL_DUMMY_ADDRESS()", | |
859 | XSTRING (CALL_DUMMY_ADDRESS ())); | |
860 | if (GDB_MULTI_ARCH) | |
861 | fprintf_unfiltered (file, | |
862 | "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n", | |
863 | (long) current_gdbarch->call_dummy_address | |
864 | /*CALL_DUMMY_ADDRESS ()*/); | |
4b9b3959 | 865 | #endif |
08e45a40 | 866 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET |
4b9b3959 | 867 | fprintf_unfiltered (file, |
08e45a40 AC |
868 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", |
869 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET)); | |
870 | if (CALL_DUMMY_BREAKPOINT_OFFSET_P) | |
871 | fprintf_unfiltered (file, | |
872 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n", | |
873 | (long) CALL_DUMMY_BREAKPOINT_OFFSET); | |
4b9b3959 | 874 | #endif |
08e45a40 | 875 | #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P |
4b9b3959 | 876 | fprintf_unfiltered (file, |
08e45a40 AC |
877 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n", |
878 | XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P)); | |
879 | fprintf_unfiltered (file, | |
06b25f14 AC |
880 | "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n", |
881 | CALL_DUMMY_BREAKPOINT_OFFSET_P); | |
4b9b3959 | 882 | #endif |
08e45a40 | 883 | #ifdef CALL_DUMMY_LENGTH |
66b43ecb | 884 | fprintf_unfiltered (file, |
08e45a40 AC |
885 | "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n", |
886 | XSTRING (CALL_DUMMY_LENGTH)); | |
887 | if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END) | |
888 | fprintf_unfiltered (file, | |
06b25f14 AC |
889 | "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n", |
890 | CALL_DUMMY_LENGTH); | |
66b43ecb | 891 | #endif |
08e45a40 | 892 | #ifdef CALL_DUMMY_LOCATION |
52204a0b | 893 | fprintf_unfiltered (file, |
08e45a40 AC |
894 | "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", |
895 | XSTRING (CALL_DUMMY_LOCATION)); | |
896 | fprintf_unfiltered (file, | |
06b25f14 AC |
897 | "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n", |
898 | CALL_DUMMY_LOCATION); | |
52204a0b | 899 | #endif |
08e45a40 | 900 | #ifdef CALL_DUMMY_P |
66b43ecb | 901 | fprintf_unfiltered (file, |
08e45a40 AC |
902 | "gdbarch_dump: CALL_DUMMY_P # %s\n", |
903 | XSTRING (CALL_DUMMY_P)); | |
904 | fprintf_unfiltered (file, | |
06b25f14 AC |
905 | "gdbarch_dump: CALL_DUMMY_P = %d\n", |
906 | CALL_DUMMY_P); | |
66b43ecb | 907 | #endif |
08e45a40 | 908 | #ifdef CALL_DUMMY_STACK_ADJUST |
4b9b3959 | 909 | fprintf_unfiltered (file, |
08e45a40 AC |
910 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n", |
911 | XSTRING (CALL_DUMMY_STACK_ADJUST)); | |
912 | if (CALL_DUMMY_STACK_ADJUST_P) | |
913 | fprintf_unfiltered (file, | |
914 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n", | |
915 | (long) CALL_DUMMY_STACK_ADJUST); | |
4b9b3959 | 916 | #endif |
08e45a40 | 917 | #ifdef CALL_DUMMY_STACK_ADJUST_P |
4b9b3959 | 918 | fprintf_unfiltered (file, |
08e45a40 AC |
919 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n", |
920 | XSTRING (CALL_DUMMY_STACK_ADJUST_P)); | |
921 | fprintf_unfiltered (file, | |
922 | "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n", | |
923 | (long) CALL_DUMMY_STACK_ADJUST_P); | |
4b9b3959 | 924 | #endif |
08e45a40 | 925 | #ifdef CALL_DUMMY_START_OFFSET |
4b9b3959 | 926 | fprintf_unfiltered (file, |
08e45a40 AC |
927 | "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n", |
928 | XSTRING (CALL_DUMMY_START_OFFSET)); | |
929 | fprintf_unfiltered (file, | |
930 | "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n", | |
931 | (long) CALL_DUMMY_START_OFFSET); | |
4b9b3959 | 932 | #endif |
08e45a40 | 933 | #ifdef CALL_DUMMY_WORDS |
4b9b3959 | 934 | fprintf_unfiltered (file, |
08e45a40 AC |
935 | "gdbarch_dump: CALL_DUMMY_WORDS # %s\n", |
936 | XSTRING (CALL_DUMMY_WORDS)); | |
937 | fprintf_unfiltered (file, | |
938 | "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n", | |
939 | (long) CALL_DUMMY_WORDS); | |
4b9b3959 | 940 | #endif |
08e45a40 | 941 | #ifdef CANNOT_FETCH_REGISTER |
4b9b3959 AC |
942 | fprintf_unfiltered (file, |
943 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
944 | "CANNOT_FETCH_REGISTER(regnum)", |
945 | XSTRING (CANNOT_FETCH_REGISTER (regnum))); | |
946 | if (GDB_MULTI_ARCH) | |
947 | fprintf_unfiltered (file, | |
948 | "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n", | |
949 | (long) current_gdbarch->cannot_fetch_register | |
950 | /*CANNOT_FETCH_REGISTER ()*/); | |
4b9b3959 | 951 | #endif |
08e45a40 | 952 | #ifdef CANNOT_STORE_REGISTER |
4b9b3959 AC |
953 | fprintf_unfiltered (file, |
954 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
955 | "CANNOT_STORE_REGISTER(regnum)", |
956 | XSTRING (CANNOT_STORE_REGISTER (regnum))); | |
957 | if (GDB_MULTI_ARCH) | |
958 | fprintf_unfiltered (file, | |
959 | "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n", | |
960 | (long) current_gdbarch->cannot_store_register | |
961 | /*CANNOT_STORE_REGISTER ()*/); | |
4b9b3959 | 962 | #endif |
08e45a40 | 963 | #ifdef COERCE_FLOAT_TO_DOUBLE |
4b9b3959 AC |
964 | fprintf_unfiltered (file, |
965 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
966 | "COERCE_FLOAT_TO_DOUBLE(formal, actual)", |
967 | XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual))); | |
968 | if (GDB_MULTI_ARCH) | |
969 | fprintf_unfiltered (file, | |
970 | "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n", | |
971 | (long) current_gdbarch->coerce_float_to_double | |
972 | /*COERCE_FLOAT_TO_DOUBLE ()*/); | |
4b9b3959 | 973 | #endif |
552c04a7 TT |
974 | if (GDB_MULTI_ARCH) |
975 | fprintf_unfiltered (file, | |
976 | "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n", | |
977 | (long) current_gdbarch->construct_inferior_arguments); | |
08e45a40 | 978 | #ifdef CONVERT_FROM_FUNC_PTR_ADDR |
39d4ef09 AC |
979 | fprintf_unfiltered (file, |
980 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
981 | "CONVERT_FROM_FUNC_PTR_ADDR(addr)", |
982 | XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr))); | |
983 | if (GDB_MULTI_ARCH) | |
984 | fprintf_unfiltered (file, | |
985 | "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n", | |
986 | (long) current_gdbarch->convert_from_func_ptr_addr | |
987 | /*CONVERT_FROM_FUNC_PTR_ADDR ()*/); | |
39d4ef09 | 988 | #endif |
08e45a40 | 989 | #ifdef DECR_PC_AFTER_BREAK |
4b9b3959 | 990 | fprintf_unfiltered (file, |
08e45a40 AC |
991 | "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n", |
992 | XSTRING (DECR_PC_AFTER_BREAK)); | |
0aba1244 | 993 | fprintf_unfiltered (file, |
08e45a40 AC |
994 | "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", |
995 | (long) DECR_PC_AFTER_BREAK); | |
0aba1244 | 996 | #endif |
08e45a40 AC |
997 | #ifdef DO_REGISTERS_INFO |
998 | #if GDB_MULTI_ARCH | |
999 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 1000 | fprintf_unfiltered (file, |
08e45a40 AC |
1001 | "gdbarch_dump: %s # %s\n", |
1002 | "DO_REGISTERS_INFO(reg_nr, fpregs)", | |
1003 | XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs))); | |
4b9b3959 | 1004 | #endif |
08e45a40 AC |
1005 | if (GDB_MULTI_ARCH) |
1006 | fprintf_unfiltered (file, | |
1007 | "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n", | |
1008 | (long) current_gdbarch->do_registers_info | |
1009 | /*DO_REGISTERS_INFO ()*/); | |
4b9b3959 | 1010 | #endif |
b6af0555 JS |
1011 | #ifdef DWARF2_BUILD_FRAME_INFO |
1012 | #if GDB_MULTI_ARCH | |
1013 | /* Macro might contain `[{}]' when not multi-arch */ | |
1014 | fprintf_unfiltered (file, | |
1015 | "gdbarch_dump: %s # %s\n", | |
1016 | "DWARF2_BUILD_FRAME_INFO(objfile)", | |
1017 | XSTRING (DWARF2_BUILD_FRAME_INFO (objfile))); | |
1018 | #endif | |
1019 | if (GDB_MULTI_ARCH) | |
1020 | fprintf_unfiltered (file, | |
1021 | "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n", | |
1022 | (long) current_gdbarch->dwarf2_build_frame_info | |
1023 | /*DWARF2_BUILD_FRAME_INFO ()*/); | |
1024 | #endif | |
08e45a40 | 1025 | #ifdef DWARF2_REG_TO_REGNUM |
4b9b3959 | 1026 | fprintf_unfiltered (file, |
08e45a40 AC |
1027 | "gdbarch_dump: %s # %s\n", |
1028 | "DWARF2_REG_TO_REGNUM(dwarf2_regnr)", | |
1029 | XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr))); | |
1030 | if (GDB_MULTI_ARCH) | |
1031 | fprintf_unfiltered (file, | |
1032 | "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n", | |
1033 | (long) current_gdbarch->dwarf2_reg_to_regnum | |
1034 | /*DWARF2_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1035 | #endif |
08e45a40 | 1036 | #ifdef DWARF_REG_TO_REGNUM |
88c72b7d AC |
1037 | fprintf_unfiltered (file, |
1038 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1039 | "DWARF_REG_TO_REGNUM(dwarf_regnr)", |
1040 | XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr))); | |
1041 | if (GDB_MULTI_ARCH) | |
1042 | fprintf_unfiltered (file, | |
1043 | "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n", | |
1044 | (long) current_gdbarch->dwarf_reg_to_regnum | |
1045 | /*DWARF_REG_TO_REGNUM ()*/); | |
88c72b7d AC |
1046 | #endif |
1047 | #ifdef ECOFF_REG_TO_REGNUM | |
1048 | fprintf_unfiltered (file, | |
1049 | "gdbarch_dump: %s # %s\n", | |
1050 | "ECOFF_REG_TO_REGNUM(ecoff_regnr)", | |
1051 | XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr))); | |
08e45a40 AC |
1052 | if (GDB_MULTI_ARCH) |
1053 | fprintf_unfiltered (file, | |
1054 | "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n", | |
1055 | (long) current_gdbarch->ecoff_reg_to_regnum | |
1056 | /*ECOFF_REG_TO_REGNUM ()*/); | |
88c72b7d | 1057 | #endif |
08e45a40 AC |
1058 | #ifdef EXTRACT_RETURN_VALUE |
1059 | #if GDB_MULTI_ARCH | |
1060 | /* Macro might contain `[{}]' when not multi-arch */ | |
88c72b7d AC |
1061 | fprintf_unfiltered (file, |
1062 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1063 | "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)", |
1064 | XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf))); | |
88c72b7d | 1065 | #endif |
08e45a40 AC |
1066 | if (GDB_MULTI_ARCH) |
1067 | fprintf_unfiltered (file, | |
1068 | "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n", | |
1069 | (long) current_gdbarch->extract_return_value | |
1070 | /*EXTRACT_RETURN_VALUE ()*/); | |
1071 | #endif | |
1072 | #ifdef EXTRACT_STRUCT_VALUE_ADDRESS | |
88c72b7d AC |
1073 | fprintf_unfiltered (file, |
1074 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1075 | "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)", |
1076 | XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf))); | |
1077 | if (GDB_MULTI_ARCH) | |
1078 | fprintf_unfiltered (file, | |
1079 | "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n", | |
1080 | (long) current_gdbarch->extract_struct_value_address | |
1081 | /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/); | |
88c72b7d | 1082 | #endif |
08e45a40 AC |
1083 | #ifdef EXTRA_STACK_ALIGNMENT_NEEDED |
1084 | fprintf_unfiltered (file, | |
1085 | "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n", | |
1086 | XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED)); | |
1087 | fprintf_unfiltered (file, | |
06b25f14 AC |
1088 | "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n", |
1089 | EXTRA_STACK_ALIGNMENT_NEEDED); | |
08e45a40 AC |
1090 | #endif |
1091 | #ifdef FETCH_PSEUDO_REGISTER | |
1092 | #if GDB_MULTI_ARCH | |
1093 | /* Macro might contain `[{}]' when not multi-arch */ | |
88c72b7d AC |
1094 | fprintf_unfiltered (file, |
1095 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1096 | "FETCH_PSEUDO_REGISTER(regnum)", |
1097 | XSTRING (FETCH_PSEUDO_REGISTER (regnum))); | |
88c72b7d | 1098 | #endif |
08e45a40 AC |
1099 | if (GDB_MULTI_ARCH) |
1100 | fprintf_unfiltered (file, | |
1101 | "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n", | |
1102 | (long) current_gdbarch->fetch_pseudo_register | |
1103 | /*FETCH_PSEUDO_REGISTER ()*/); | |
1104 | #endif | |
1105 | #ifdef FIX_CALL_DUMMY | |
1106 | #if GDB_MULTI_ARCH | |
1107 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1108 | fprintf_unfiltered (file, |
1109 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1110 | "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)", |
1111 | XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p))); | |
4b9b3959 | 1112 | #endif |
08e45a40 AC |
1113 | if (GDB_MULTI_ARCH) |
1114 | fprintf_unfiltered (file, | |
1115 | "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n", | |
1116 | (long) current_gdbarch->fix_call_dummy | |
1117 | /*FIX_CALL_DUMMY ()*/); | |
1118 | #endif | |
1119 | #ifdef FP0_REGNUM | |
4b9b3959 | 1120 | fprintf_unfiltered (file, |
08e45a40 AC |
1121 | "gdbarch_dump: FP0_REGNUM # %s\n", |
1122 | XSTRING (FP0_REGNUM)); | |
1123 | fprintf_unfiltered (file, | |
06b25f14 AC |
1124 | "gdbarch_dump: FP0_REGNUM = %d\n", |
1125 | FP0_REGNUM); | |
4b9b3959 | 1126 | #endif |
08e45a40 | 1127 | #ifdef FP_REGNUM |
4b9b3959 | 1128 | fprintf_unfiltered (file, |
08e45a40 AC |
1129 | "gdbarch_dump: FP_REGNUM # %s\n", |
1130 | XSTRING (FP_REGNUM)); | |
1131 | fprintf_unfiltered (file, | |
06b25f14 AC |
1132 | "gdbarch_dump: FP_REGNUM = %d\n", |
1133 | FP_REGNUM); | |
4b9b3959 | 1134 | #endif |
08e45a40 | 1135 | #ifdef FRAMELESS_FUNCTION_INVOCATION |
4b9b3959 AC |
1136 | fprintf_unfiltered (file, |
1137 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1138 | "FRAMELESS_FUNCTION_INVOCATION(fi)", |
1139 | XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi))); | |
1140 | if (GDB_MULTI_ARCH) | |
1141 | fprintf_unfiltered (file, | |
1142 | "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n", | |
1143 | (long) current_gdbarch->frameless_function_invocation | |
1144 | /*FRAMELESS_FUNCTION_INVOCATION ()*/); | |
4b9b3959 | 1145 | #endif |
08e45a40 | 1146 | #ifdef FRAME_ARGS_ADDRESS |
4b9b3959 AC |
1147 | fprintf_unfiltered (file, |
1148 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1149 | "FRAME_ARGS_ADDRESS(fi)", |
1150 | XSTRING (FRAME_ARGS_ADDRESS (fi))); | |
1151 | if (GDB_MULTI_ARCH) | |
1152 | fprintf_unfiltered (file, | |
1153 | "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n", | |
1154 | (long) current_gdbarch->frame_args_address | |
1155 | /*FRAME_ARGS_ADDRESS ()*/); | |
4b9b3959 | 1156 | #endif |
08e45a40 | 1157 | #ifdef FRAME_ARGS_SKIP |
4b9b3959 | 1158 | fprintf_unfiltered (file, |
08e45a40 AC |
1159 | "gdbarch_dump: FRAME_ARGS_SKIP # %s\n", |
1160 | XSTRING (FRAME_ARGS_SKIP)); | |
4b9b3959 | 1161 | fprintf_unfiltered (file, |
08e45a40 AC |
1162 | "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n", |
1163 | (long) FRAME_ARGS_SKIP); | |
4b9b3959 | 1164 | #endif |
08e45a40 | 1165 | #ifdef FRAME_CHAIN |
4b9b3959 | 1166 | fprintf_unfiltered (file, |
08e45a40 AC |
1167 | "gdbarch_dump: %s # %s\n", |
1168 | "FRAME_CHAIN(frame)", | |
1169 | XSTRING (FRAME_CHAIN (frame))); | |
1170 | if (GDB_MULTI_ARCH) | |
1171 | fprintf_unfiltered (file, | |
1172 | "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n", | |
1173 | (long) current_gdbarch->frame_chain | |
1174 | /*FRAME_CHAIN ()*/); | |
4b9b3959 | 1175 | #endif |
08e45a40 | 1176 | #ifdef FRAME_CHAIN_VALID |
4b9b3959 AC |
1177 | fprintf_unfiltered (file, |
1178 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1179 | "FRAME_CHAIN_VALID(chain, thisframe)", |
1180 | XSTRING (FRAME_CHAIN_VALID (chain, thisframe))); | |
1181 | if (GDB_MULTI_ARCH) | |
1182 | fprintf_unfiltered (file, | |
1183 | "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n", | |
1184 | (long) current_gdbarch->frame_chain_valid | |
1185 | /*FRAME_CHAIN_VALID ()*/); | |
4b9b3959 | 1186 | #endif |
08e45a40 AC |
1187 | #ifdef FRAME_INIT_SAVED_REGS |
1188 | #if GDB_MULTI_ARCH | |
666e11c5 EZ |
1189 | /* Macro might contain `[{}]' when not multi-arch */ |
1190 | fprintf_unfiltered (file, | |
1191 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1192 | "FRAME_INIT_SAVED_REGS(frame)", |
1193 | XSTRING (FRAME_INIT_SAVED_REGS (frame))); | |
666e11c5 | 1194 | #endif |
08e45a40 AC |
1195 | if (GDB_MULTI_ARCH) |
1196 | fprintf_unfiltered (file, | |
1197 | "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n", | |
1198 | (long) current_gdbarch->frame_init_saved_regs | |
1199 | /*FRAME_INIT_SAVED_REGS ()*/); | |
7c7651b2 | 1200 | #endif |
08e45a40 | 1201 | #ifdef FRAME_LOCALS_ADDRESS |
2649061d AC |
1202 | fprintf_unfiltered (file, |
1203 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1204 | "FRAME_LOCALS_ADDRESS(fi)", |
1205 | XSTRING (FRAME_LOCALS_ADDRESS (fi))); | |
1206 | if (GDB_MULTI_ARCH) | |
1207 | fprintf_unfiltered (file, | |
1208 | "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n", | |
1209 | (long) current_gdbarch->frame_locals_address | |
1210 | /*FRAME_LOCALS_ADDRESS ()*/); | |
2649061d | 1211 | #endif |
08e45a40 | 1212 | #ifdef FRAME_NUM_ARGS |
01fb7433 AC |
1213 | fprintf_unfiltered (file, |
1214 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1215 | "FRAME_NUM_ARGS(frame)", |
1216 | XSTRING (FRAME_NUM_ARGS (frame))); | |
1217 | if (GDB_MULTI_ARCH) | |
1218 | fprintf_unfiltered (file, | |
1219 | "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n", | |
1220 | (long) current_gdbarch->frame_num_args | |
1221 | /*FRAME_NUM_ARGS ()*/); | |
01fb7433 | 1222 | #endif |
08e45a40 | 1223 | #ifdef FRAME_SAVED_PC |
01fb7433 AC |
1224 | fprintf_unfiltered (file, |
1225 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1226 | "FRAME_SAVED_PC(fi)", |
1227 | XSTRING (FRAME_SAVED_PC (fi))); | |
1228 | if (GDB_MULTI_ARCH) | |
1229 | fprintf_unfiltered (file, | |
1230 | "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n", | |
1231 | (long) current_gdbarch->frame_saved_pc | |
1232 | /*FRAME_SAVED_PC ()*/); | |
01fb7433 | 1233 | #endif |
08e45a40 | 1234 | #ifdef FUNCTION_START_OFFSET |
4b9b3959 | 1235 | fprintf_unfiltered (file, |
08e45a40 AC |
1236 | "gdbarch_dump: FUNCTION_START_OFFSET # %s\n", |
1237 | XSTRING (FUNCTION_START_OFFSET)); | |
4b9b3959 | 1238 | fprintf_unfiltered (file, |
08e45a40 AC |
1239 | "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n", |
1240 | (long) FUNCTION_START_OFFSET); | |
4b9b3959 | 1241 | #endif |
08e45a40 AC |
1242 | #ifdef GET_SAVED_REGISTER |
1243 | #if GDB_MULTI_ARCH | |
1244 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1245 | fprintf_unfiltered (file, |
1246 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1247 | "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)", |
1248 | XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval))); | |
4b9b3959 | 1249 | #endif |
08e45a40 AC |
1250 | if (GDB_MULTI_ARCH) |
1251 | fprintf_unfiltered (file, | |
1252 | "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n", | |
1253 | (long) current_gdbarch->get_saved_register | |
1254 | /*GET_SAVED_REGISTER ()*/); | |
4b9b3959 | 1255 | #endif |
08e45a40 AC |
1256 | #ifdef INIT_EXTRA_FRAME_INFO |
1257 | #if GDB_MULTI_ARCH | |
1258 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1259 | fprintf_unfiltered (file, |
1260 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1261 | "INIT_EXTRA_FRAME_INFO(fromleaf, frame)", |
1262 | XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame))); | |
4b9b3959 | 1263 | #endif |
08e45a40 AC |
1264 | if (GDB_MULTI_ARCH) |
1265 | fprintf_unfiltered (file, | |
1266 | "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n", | |
1267 | (long) current_gdbarch->init_extra_frame_info | |
1268 | /*INIT_EXTRA_FRAME_INFO ()*/); | |
4b9b3959 | 1269 | #endif |
08e45a40 AC |
1270 | #ifdef INIT_FRAME_PC |
1271 | #if GDB_MULTI_ARCH | |
63e69063 | 1272 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1273 | fprintf_unfiltered (file, |
1274 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1275 | "INIT_FRAME_PC(fromleaf, prev)", |
1276 | XSTRING (INIT_FRAME_PC (fromleaf, prev))); | |
1277 | #endif | |
1278 | if (GDB_MULTI_ARCH) | |
1279 | fprintf_unfiltered (file, | |
1280 | "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n", | |
1281 | (long) current_gdbarch->init_frame_pc | |
1282 | /*INIT_FRAME_PC ()*/); | |
4b9b3959 | 1283 | #endif |
08e45a40 AC |
1284 | #ifdef INIT_FRAME_PC_FIRST |
1285 | #if GDB_MULTI_ARCH | |
10312cc4 AC |
1286 | /* Macro might contain `[{}]' when not multi-arch */ |
1287 | fprintf_unfiltered (file, | |
1288 | "gdbarch_dump: %s # %s\n", | |
1289 | "INIT_FRAME_PC_FIRST(fromleaf, prev)", | |
1290 | XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev))); | |
1291 | #endif | |
08e45a40 AC |
1292 | if (GDB_MULTI_ARCH) |
1293 | fprintf_unfiltered (file, | |
1294 | "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n", | |
1295 | (long) current_gdbarch->init_frame_pc_first | |
1296 | /*INIT_FRAME_PC_FIRST ()*/); | |
1297 | #endif | |
1298 | #ifdef INNER_THAN | |
10312cc4 AC |
1299 | fprintf_unfiltered (file, |
1300 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1301 | "INNER_THAN(lhs, rhs)", |
1302 | XSTRING (INNER_THAN (lhs, rhs))); | |
1303 | if (GDB_MULTI_ARCH) | |
1304 | fprintf_unfiltered (file, | |
1305 | "gdbarch_dump: INNER_THAN = 0x%08lx\n", | |
1306 | (long) current_gdbarch->inner_than | |
1307 | /*INNER_THAN ()*/); | |
10312cc4 | 1308 | #endif |
fc0c74b1 AC |
1309 | #ifdef INTEGER_TO_ADDRESS |
1310 | fprintf_unfiltered (file, | |
1311 | "gdbarch_dump: %s # %s\n", | |
1312 | "INTEGER_TO_ADDRESS(type, buf)", | |
1313 | XSTRING (INTEGER_TO_ADDRESS (type, buf))); | |
1314 | if (GDB_MULTI_ARCH) | |
1315 | fprintf_unfiltered (file, | |
1316 | "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n", | |
1317 | (long) current_gdbarch->integer_to_address | |
1318 | /*INTEGER_TO_ADDRESS ()*/); | |
1319 | #endif | |
68e9cc94 CV |
1320 | #ifdef IN_SOLIB_CALL_TRAMPOLINE |
1321 | fprintf_unfiltered (file, | |
1322 | "gdbarch_dump: %s # %s\n", | |
1323 | "IN_SOLIB_CALL_TRAMPOLINE(pc, name)", | |
1324 | XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name))); | |
1325 | if (GDB_MULTI_ARCH) | |
1326 | fprintf_unfiltered (file, | |
1327 | "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n", | |
1328 | (long) current_gdbarch->in_solib_call_trampoline | |
1329 | /*IN_SOLIB_CALL_TRAMPOLINE ()*/); | |
1330 | #endif | |
08e45a40 | 1331 | #ifdef MAX_REGISTER_RAW_SIZE |
4b9b3959 | 1332 | fprintf_unfiltered (file, |
08e45a40 AC |
1333 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n", |
1334 | XSTRING (MAX_REGISTER_RAW_SIZE)); | |
1335 | fprintf_unfiltered (file, | |
06b25f14 AC |
1336 | "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n", |
1337 | MAX_REGISTER_RAW_SIZE); | |
4b9b3959 | 1338 | #endif |
08e45a40 | 1339 | #ifdef MAX_REGISTER_VIRTUAL_SIZE |
4b9b3959 | 1340 | fprintf_unfiltered (file, |
08e45a40 AC |
1341 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n", |
1342 | XSTRING (MAX_REGISTER_VIRTUAL_SIZE)); | |
1343 | fprintf_unfiltered (file, | |
06b25f14 AC |
1344 | "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n", |
1345 | MAX_REGISTER_VIRTUAL_SIZE); | |
4b9b3959 | 1346 | #endif |
08e45a40 | 1347 | #ifdef MEMORY_INSERT_BREAKPOINT |
4b9b3959 AC |
1348 | fprintf_unfiltered (file, |
1349 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1350 | "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)", |
1351 | XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache))); | |
1352 | if (GDB_MULTI_ARCH) | |
1353 | fprintf_unfiltered (file, | |
1354 | "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n", | |
1355 | (long) current_gdbarch->memory_insert_breakpoint | |
1356 | /*MEMORY_INSERT_BREAKPOINT ()*/); | |
4b9b3959 | 1357 | #endif |
08e45a40 | 1358 | #ifdef MEMORY_REMOVE_BREAKPOINT |
4b9b3959 AC |
1359 | fprintf_unfiltered (file, |
1360 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1361 | "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)", |
1362 | XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache))); | |
1363 | if (GDB_MULTI_ARCH) | |
1364 | fprintf_unfiltered (file, | |
1365 | "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n", | |
1366 | (long) current_gdbarch->memory_remove_breakpoint | |
1367 | /*MEMORY_REMOVE_BREAKPOINT ()*/); | |
4b9b3959 | 1368 | #endif |
08e45a40 | 1369 | #ifdef NNPC_REGNUM |
4b9b3959 | 1370 | fprintf_unfiltered (file, |
08e45a40 AC |
1371 | "gdbarch_dump: NNPC_REGNUM # %s\n", |
1372 | XSTRING (NNPC_REGNUM)); | |
1373 | fprintf_unfiltered (file, | |
06b25f14 AC |
1374 | "gdbarch_dump: NNPC_REGNUM = %d\n", |
1375 | NNPC_REGNUM); | |
4b9b3959 | 1376 | #endif |
08e45a40 | 1377 | #ifdef NPC_REGNUM |
4b9b3959 | 1378 | fprintf_unfiltered (file, |
08e45a40 AC |
1379 | "gdbarch_dump: NPC_REGNUM # %s\n", |
1380 | XSTRING (NPC_REGNUM)); | |
1381 | fprintf_unfiltered (file, | |
06b25f14 AC |
1382 | "gdbarch_dump: NPC_REGNUM = %d\n", |
1383 | NPC_REGNUM); | |
4b9b3959 | 1384 | #endif |
08e45a40 | 1385 | #ifdef NUM_PSEUDO_REGS |
4b9b3959 | 1386 | fprintf_unfiltered (file, |
08e45a40 AC |
1387 | "gdbarch_dump: NUM_PSEUDO_REGS # %s\n", |
1388 | XSTRING (NUM_PSEUDO_REGS)); | |
1389 | fprintf_unfiltered (file, | |
06b25f14 AC |
1390 | "gdbarch_dump: NUM_PSEUDO_REGS = %d\n", |
1391 | NUM_PSEUDO_REGS); | |
4b9b3959 | 1392 | #endif |
08e45a40 | 1393 | #ifdef NUM_REGS |
7f1b2585 | 1394 | fprintf_unfiltered (file, |
08e45a40 AC |
1395 | "gdbarch_dump: NUM_REGS # %s\n", |
1396 | XSTRING (NUM_REGS)); | |
1397 | fprintf_unfiltered (file, | |
06b25f14 AC |
1398 | "gdbarch_dump: NUM_REGS = %d\n", |
1399 | NUM_REGS); | |
7f1b2585 | 1400 | #endif |
08e45a40 AC |
1401 | #ifdef PARM_BOUNDARY |
1402 | fprintf_unfiltered (file, | |
1403 | "gdbarch_dump: PARM_BOUNDARY # %s\n", | |
1404 | XSTRING (PARM_BOUNDARY)); | |
1405 | fprintf_unfiltered (file, | |
06b25f14 AC |
1406 | "gdbarch_dump: PARM_BOUNDARY = %d\n", |
1407 | PARM_BOUNDARY); | |
08e45a40 AC |
1408 | #endif |
1409 | #ifdef PC_IN_CALL_DUMMY | |
7f1b2585 EZ |
1410 | fprintf_unfiltered (file, |
1411 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1412 | "PC_IN_CALL_DUMMY(pc, sp, frame_address)", |
1413 | XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address))); | |
1414 | if (GDB_MULTI_ARCH) | |
1415 | fprintf_unfiltered (file, | |
1416 | "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n", | |
1417 | (long) current_gdbarch->pc_in_call_dummy | |
1418 | /*PC_IN_CALL_DUMMY ()*/); | |
1419 | #endif | |
1420 | #ifdef PC_REGNUM | |
1421 | fprintf_unfiltered (file, | |
1422 | "gdbarch_dump: PC_REGNUM # %s\n", | |
1423 | XSTRING (PC_REGNUM)); | |
1424 | fprintf_unfiltered (file, | |
06b25f14 AC |
1425 | "gdbarch_dump: PC_REGNUM = %d\n", |
1426 | PC_REGNUM); | |
7f1b2585 | 1427 | #endif |
4b9b3959 AC |
1428 | #ifdef POINTER_TO_ADDRESS |
1429 | fprintf_unfiltered (file, | |
1430 | "gdbarch_dump: %s # %s\n", | |
1431 | "POINTER_TO_ADDRESS(type, buf)", | |
1432 | XSTRING (POINTER_TO_ADDRESS (type, buf))); | |
08e45a40 AC |
1433 | if (GDB_MULTI_ARCH) |
1434 | fprintf_unfiltered (file, | |
1435 | "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n", | |
1436 | (long) current_gdbarch->pointer_to_address | |
1437 | /*POINTER_TO_ADDRESS ()*/); | |
4b9b3959 | 1438 | #endif |
08e45a40 AC |
1439 | #ifdef POP_FRAME |
1440 | #if GDB_MULTI_ARCH | |
63e69063 | 1441 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1442 | fprintf_unfiltered (file, |
1443 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1444 | "POP_FRAME(-)", |
1445 | XSTRING (POP_FRAME (-))); | |
4b9b3959 | 1446 | #endif |
08e45a40 AC |
1447 | if (GDB_MULTI_ARCH) |
1448 | fprintf_unfiltered (file, | |
1449 | "gdbarch_dump: POP_FRAME = 0x%08lx\n", | |
1450 | (long) current_gdbarch->pop_frame | |
1451 | /*POP_FRAME ()*/); | |
1452 | #endif | |
1453 | #ifdef PREPARE_TO_PROCEED | |
4b9b3959 AC |
1454 | fprintf_unfiltered (file, |
1455 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1456 | "PREPARE_TO_PROCEED(select_it)", |
1457 | XSTRING (PREPARE_TO_PROCEED (select_it))); | |
1458 | if (GDB_MULTI_ARCH) | |
1459 | fprintf_unfiltered (file, | |
1460 | "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n", | |
1461 | (long) current_gdbarch->prepare_to_proceed | |
1462 | /*PREPARE_TO_PROCEED ()*/); | |
4b9b3959 | 1463 | #endif |
08e45a40 | 1464 | #ifdef PROLOGUE_FRAMELESS_P |
4b9b3959 AC |
1465 | fprintf_unfiltered (file, |
1466 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1467 | "PROLOGUE_FRAMELESS_P(ip)", |
1468 | XSTRING (PROLOGUE_FRAMELESS_P (ip))); | |
1469 | if (GDB_MULTI_ARCH) | |
1470 | fprintf_unfiltered (file, | |
1471 | "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n", | |
1472 | (long) current_gdbarch->prologue_frameless_p | |
1473 | /*PROLOGUE_FRAMELESS_P ()*/); | |
4b9b3959 AC |
1474 | #endif |
1475 | #ifdef PUSH_ARGUMENTS | |
1476 | fprintf_unfiltered (file, | |
1477 | "gdbarch_dump: %s # %s\n", | |
1478 | "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)", | |
1479 | XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr))); | |
08e45a40 AC |
1480 | if (GDB_MULTI_ARCH) |
1481 | fprintf_unfiltered (file, | |
1482 | "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n", | |
1483 | (long) current_gdbarch->push_arguments | |
1484 | /*PUSH_ARGUMENTS ()*/); | |
4b9b3959 | 1485 | #endif |
08e45a40 AC |
1486 | #ifdef PUSH_DUMMY_FRAME |
1487 | #if GDB_MULTI_ARCH | |
63e69063 | 1488 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1489 | fprintf_unfiltered (file, |
1490 | "gdbarch_dump: %s # %s\n", | |
1491 | "PUSH_DUMMY_FRAME(-)", | |
1492 | XSTRING (PUSH_DUMMY_FRAME (-))); | |
08e45a40 AC |
1493 | #endif |
1494 | if (GDB_MULTI_ARCH) | |
1495 | fprintf_unfiltered (file, | |
1496 | "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n", | |
1497 | (long) current_gdbarch->push_dummy_frame | |
1498 | /*PUSH_DUMMY_FRAME ()*/); | |
4b9b3959 AC |
1499 | #endif |
1500 | #ifdef PUSH_RETURN_ADDRESS | |
1501 | fprintf_unfiltered (file, | |
1502 | "gdbarch_dump: %s # %s\n", | |
1503 | "PUSH_RETURN_ADDRESS(pc, sp)", | |
1504 | XSTRING (PUSH_RETURN_ADDRESS (pc, sp))); | |
08e45a40 AC |
1505 | if (GDB_MULTI_ARCH) |
1506 | fprintf_unfiltered (file, | |
1507 | "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n", | |
1508 | (long) current_gdbarch->push_return_address | |
1509 | /*PUSH_RETURN_ADDRESS ()*/); | |
4b9b3959 | 1510 | #endif |
08e45a40 | 1511 | #ifdef REGISTER_BYTE |
4b9b3959 AC |
1512 | fprintf_unfiltered (file, |
1513 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1514 | "REGISTER_BYTE(reg_nr)", |
1515 | XSTRING (REGISTER_BYTE (reg_nr))); | |
1516 | if (GDB_MULTI_ARCH) | |
1517 | fprintf_unfiltered (file, | |
1518 | "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n", | |
1519 | (long) current_gdbarch->register_byte | |
1520 | /*REGISTER_BYTE ()*/); | |
4b9b3959 | 1521 | #endif |
08e45a40 | 1522 | #ifdef REGISTER_BYTES |
4b9b3959 | 1523 | fprintf_unfiltered (file, |
08e45a40 AC |
1524 | "gdbarch_dump: REGISTER_BYTES # %s\n", |
1525 | XSTRING (REGISTER_BYTES)); | |
4b9b3959 | 1526 | fprintf_unfiltered (file, |
06b25f14 AC |
1527 | "gdbarch_dump: REGISTER_BYTES = %d\n", |
1528 | REGISTER_BYTES); | |
4b9b3959 | 1529 | #endif |
08e45a40 | 1530 | #ifdef REGISTER_BYTES_OK |
4b9b3959 AC |
1531 | fprintf_unfiltered (file, |
1532 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1533 | "REGISTER_BYTES_OK(nr_bytes)", |
1534 | XSTRING (REGISTER_BYTES_OK (nr_bytes))); | |
1535 | if (GDB_MULTI_ARCH) | |
1536 | fprintf_unfiltered (file, | |
1537 | "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n", | |
1538 | (long) current_gdbarch->register_bytes_ok | |
1539 | /*REGISTER_BYTES_OK ()*/); | |
4b9b3959 | 1540 | #endif |
08e45a40 | 1541 | #ifdef REGISTER_CONVERTIBLE |
4b9b3959 AC |
1542 | fprintf_unfiltered (file, |
1543 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1544 | "REGISTER_CONVERTIBLE(nr)", |
1545 | XSTRING (REGISTER_CONVERTIBLE (nr))); | |
1546 | if (GDB_MULTI_ARCH) | |
1547 | fprintf_unfiltered (file, | |
1548 | "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n", | |
1549 | (long) current_gdbarch->register_convertible | |
1550 | /*REGISTER_CONVERTIBLE ()*/); | |
4b9b3959 | 1551 | #endif |
08e45a40 AC |
1552 | #ifdef REGISTER_CONVERT_TO_RAW |
1553 | #if GDB_MULTI_ARCH | |
63e69063 | 1554 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1555 | fprintf_unfiltered (file, |
1556 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1557 | "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)", |
1558 | XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to))); | |
1559 | #endif | |
1560 | if (GDB_MULTI_ARCH) | |
1561 | fprintf_unfiltered (file, | |
1562 | "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n", | |
1563 | (long) current_gdbarch->register_convert_to_raw | |
1564 | /*REGISTER_CONVERT_TO_RAW ()*/); | |
4b9b3959 | 1565 | #endif |
08e45a40 AC |
1566 | #ifdef REGISTER_CONVERT_TO_VIRTUAL |
1567 | #if GDB_MULTI_ARCH | |
63e69063 | 1568 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1569 | fprintf_unfiltered (file, |
1570 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1571 | "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)", |
1572 | XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to))); | |
4b9b3959 | 1573 | #endif |
08e45a40 AC |
1574 | if (GDB_MULTI_ARCH) |
1575 | fprintf_unfiltered (file, | |
1576 | "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n", | |
1577 | (long) current_gdbarch->register_convert_to_virtual | |
1578 | /*REGISTER_CONVERT_TO_VIRTUAL ()*/); | |
4b9b3959 | 1579 | #endif |
08e45a40 | 1580 | #ifdef REGISTER_NAME |
4b9b3959 AC |
1581 | fprintf_unfiltered (file, |
1582 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1583 | "REGISTER_NAME(regnr)", |
1584 | XSTRING (REGISTER_NAME (regnr))); | |
1585 | if (GDB_MULTI_ARCH) | |
1586 | fprintf_unfiltered (file, | |
1587 | "gdbarch_dump: REGISTER_NAME = 0x%08lx\n", | |
1588 | (long) current_gdbarch->register_name | |
1589 | /*REGISTER_NAME ()*/); | |
4b9b3959 | 1590 | #endif |
08e45a40 | 1591 | #ifdef REGISTER_RAW_SIZE |
4b9b3959 AC |
1592 | fprintf_unfiltered (file, |
1593 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1594 | "REGISTER_RAW_SIZE(reg_nr)", |
1595 | XSTRING (REGISTER_RAW_SIZE (reg_nr))); | |
1596 | if (GDB_MULTI_ARCH) | |
1597 | fprintf_unfiltered (file, | |
1598 | "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n", | |
1599 | (long) current_gdbarch->register_raw_size | |
1600 | /*REGISTER_RAW_SIZE ()*/); | |
4b9b3959 | 1601 | #endif |
08e45a40 | 1602 | #ifdef REGISTER_SIM_REGNO |
4b9b3959 AC |
1603 | fprintf_unfiltered (file, |
1604 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1605 | "REGISTER_SIM_REGNO(reg_nr)", |
1606 | XSTRING (REGISTER_SIM_REGNO (reg_nr))); | |
1607 | if (GDB_MULTI_ARCH) | |
1608 | fprintf_unfiltered (file, | |
1609 | "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n", | |
1610 | (long) current_gdbarch->register_sim_regno | |
1611 | /*REGISTER_SIM_REGNO ()*/); | |
4b9b3959 | 1612 | #endif |
08e45a40 | 1613 | #ifdef REGISTER_SIZE |
4b9b3959 | 1614 | fprintf_unfiltered (file, |
08e45a40 AC |
1615 | "gdbarch_dump: REGISTER_SIZE # %s\n", |
1616 | XSTRING (REGISTER_SIZE)); | |
4b9b3959 | 1617 | fprintf_unfiltered (file, |
06b25f14 AC |
1618 | "gdbarch_dump: REGISTER_SIZE = %d\n", |
1619 | REGISTER_SIZE); | |
4b9b3959 | 1620 | #endif |
08e45a40 | 1621 | #ifdef REGISTER_VIRTUAL_SIZE |
4b9b3959 | 1622 | fprintf_unfiltered (file, |
08e45a40 AC |
1623 | "gdbarch_dump: %s # %s\n", |
1624 | "REGISTER_VIRTUAL_SIZE(reg_nr)", | |
1625 | XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr))); | |
1626 | if (GDB_MULTI_ARCH) | |
1627 | fprintf_unfiltered (file, | |
1628 | "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n", | |
1629 | (long) current_gdbarch->register_virtual_size | |
1630 | /*REGISTER_VIRTUAL_SIZE ()*/); | |
4b9b3959 | 1631 | #endif |
08e45a40 | 1632 | #ifdef REGISTER_VIRTUAL_TYPE |
e02bc4cc DS |
1633 | fprintf_unfiltered (file, |
1634 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1635 | "REGISTER_VIRTUAL_TYPE(reg_nr)", |
1636 | XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr))); | |
1637 | if (GDB_MULTI_ARCH) | |
1638 | fprintf_unfiltered (file, | |
1639 | "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n", | |
1640 | (long) current_gdbarch->register_virtual_type | |
1641 | /*REGISTER_VIRTUAL_TYPE ()*/); | |
e02bc4cc | 1642 | #endif |
08e45a40 | 1643 | #ifdef REG_STRUCT_HAS_ADDR |
4b9b3959 | 1644 | fprintf_unfiltered (file, |
08e45a40 AC |
1645 | "gdbarch_dump: %s # %s\n", |
1646 | "REG_STRUCT_HAS_ADDR(gcc_p, type)", | |
1647 | XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type))); | |
1648 | if (GDB_MULTI_ARCH) | |
1649 | fprintf_unfiltered (file, | |
1650 | "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n", | |
1651 | (long) current_gdbarch->reg_struct_has_addr | |
1652 | /*REG_STRUCT_HAS_ADDR ()*/); | |
4b9b3959 | 1653 | #endif |
08e45a40 AC |
1654 | #ifdef REMOTE_TRANSLATE_XFER_ADDRESS |
1655 | #if GDB_MULTI_ARCH | |
63e69063 | 1656 | /* Macro might contain `[{}]' when not multi-arch */ |
4b9b3959 AC |
1657 | fprintf_unfiltered (file, |
1658 | "gdbarch_dump: %s # %s\n", | |
1659 | "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)", | |
1660 | XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len))); | |
1661 | #endif | |
08e45a40 AC |
1662 | if (GDB_MULTI_ARCH) |
1663 | fprintf_unfiltered (file, | |
1664 | "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n", | |
1665 | (long) current_gdbarch->remote_translate_xfer_address | |
1666 | /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/); | |
4b9b3959 | 1667 | #endif |
08e45a40 | 1668 | #ifdef RETURN_VALUE_ON_STACK |
4b9b3959 AC |
1669 | fprintf_unfiltered (file, |
1670 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1671 | "RETURN_VALUE_ON_STACK(type)", |
1672 | XSTRING (RETURN_VALUE_ON_STACK (type))); | |
1673 | if (GDB_MULTI_ARCH) | |
1674 | fprintf_unfiltered (file, | |
1675 | "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n", | |
1676 | (long) current_gdbarch->return_value_on_stack | |
1677 | /*RETURN_VALUE_ON_STACK ()*/); | |
4b9b3959 | 1678 | #endif |
08e45a40 | 1679 | #ifdef SAVED_PC_AFTER_CALL |
4b9b3959 AC |
1680 | fprintf_unfiltered (file, |
1681 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1682 | "SAVED_PC_AFTER_CALL(frame)", |
1683 | XSTRING (SAVED_PC_AFTER_CALL (frame))); | |
1684 | if (GDB_MULTI_ARCH) | |
1685 | fprintf_unfiltered (file, | |
1686 | "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n", | |
1687 | (long) current_gdbarch->saved_pc_after_call | |
1688 | /*SAVED_PC_AFTER_CALL ()*/); | |
4b9b3959 | 1689 | #endif |
08e45a40 AC |
1690 | #ifdef SAVE_DUMMY_FRAME_TOS |
1691 | #if GDB_MULTI_ARCH | |
1692 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1693 | fprintf_unfiltered (file, |
1694 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1695 | "SAVE_DUMMY_FRAME_TOS(sp)", |
1696 | XSTRING (SAVE_DUMMY_FRAME_TOS (sp))); | |
4b9b3959 | 1697 | #endif |
08e45a40 AC |
1698 | if (GDB_MULTI_ARCH) |
1699 | fprintf_unfiltered (file, | |
1700 | "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n", | |
1701 | (long) current_gdbarch->save_dummy_frame_tos | |
1702 | /*SAVE_DUMMY_FRAME_TOS ()*/); | |
4b9b3959 | 1703 | #endif |
08e45a40 | 1704 | #ifdef SDB_REG_TO_REGNUM |
4b9b3959 AC |
1705 | fprintf_unfiltered (file, |
1706 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1707 | "SDB_REG_TO_REGNUM(sdb_regnr)", |
1708 | XSTRING (SDB_REG_TO_REGNUM (sdb_regnr))); | |
1709 | if (GDB_MULTI_ARCH) | |
1710 | fprintf_unfiltered (file, | |
1711 | "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n", | |
1712 | (long) current_gdbarch->sdb_reg_to_regnum | |
1713 | /*SDB_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1714 | #endif |
08e45a40 | 1715 | #ifdef SIZEOF_CALL_DUMMY_WORDS |
4b9b3959 | 1716 | fprintf_unfiltered (file, |
08e45a40 AC |
1717 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n", |
1718 | XSTRING (SIZEOF_CALL_DUMMY_WORDS)); | |
1719 | fprintf_unfiltered (file, | |
1720 | "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n", | |
1721 | (long) SIZEOF_CALL_DUMMY_WORDS); | |
4b9b3959 | 1722 | #endif |
08e45a40 | 1723 | #ifdef SKIP_PROLOGUE |
4b9b3959 AC |
1724 | fprintf_unfiltered (file, |
1725 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1726 | "SKIP_PROLOGUE(ip)", |
1727 | XSTRING (SKIP_PROLOGUE (ip))); | |
1728 | if (GDB_MULTI_ARCH) | |
1729 | fprintf_unfiltered (file, | |
1730 | "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n", | |
1731 | (long) current_gdbarch->skip_prologue | |
1732 | /*SKIP_PROLOGUE ()*/); | |
4b9b3959 | 1733 | #endif |
08e45a40 | 1734 | #ifdef SKIP_TRAMPOLINE_CODE |
4b9b3959 AC |
1735 | fprintf_unfiltered (file, |
1736 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1737 | "SKIP_TRAMPOLINE_CODE(pc)", |
1738 | XSTRING (SKIP_TRAMPOLINE_CODE (pc))); | |
1739 | if (GDB_MULTI_ARCH) | |
1740 | fprintf_unfiltered (file, | |
1741 | "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n", | |
1742 | (long) current_gdbarch->skip_trampoline_code | |
1743 | /*SKIP_TRAMPOLINE_CODE ()*/); | |
4b9b3959 | 1744 | #endif |
08e45a40 AC |
1745 | #ifdef SOFTWARE_SINGLE_STEP |
1746 | #if GDB_MULTI_ARCH | |
1747 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 AC |
1748 | fprintf_unfiltered (file, |
1749 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1750 | "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)", |
1751 | XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p))); | |
4b9b3959 | 1752 | #endif |
08e45a40 AC |
1753 | if (GDB_MULTI_ARCH) |
1754 | fprintf_unfiltered (file, | |
1755 | "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n", | |
1756 | (long) current_gdbarch->software_single_step | |
1757 | /*SOFTWARE_SINGLE_STEP ()*/); | |
1758 | #endif | |
1759 | #ifdef SP_REGNUM | |
1dd4193b | 1760 | fprintf_unfiltered (file, |
08e45a40 AC |
1761 | "gdbarch_dump: SP_REGNUM # %s\n", |
1762 | XSTRING (SP_REGNUM)); | |
1763 | fprintf_unfiltered (file, | |
06b25f14 AC |
1764 | "gdbarch_dump: SP_REGNUM = %d\n", |
1765 | SP_REGNUM); | |
1dd4193b | 1766 | #endif |
08e45a40 | 1767 | #ifdef STAB_REG_TO_REGNUM |
4b9b3959 AC |
1768 | fprintf_unfiltered (file, |
1769 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1770 | "STAB_REG_TO_REGNUM(stab_regnr)", |
1771 | XSTRING (STAB_REG_TO_REGNUM (stab_regnr))); | |
1772 | if (GDB_MULTI_ARCH) | |
1773 | fprintf_unfiltered (file, | |
1774 | "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n", | |
1775 | (long) current_gdbarch->stab_reg_to_regnum | |
1776 | /*STAB_REG_TO_REGNUM ()*/); | |
4b9b3959 | 1777 | #endif |
08e45a40 | 1778 | #ifdef STACK_ALIGN |
4b9b3959 AC |
1779 | fprintf_unfiltered (file, |
1780 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1781 | "STACK_ALIGN(sp)", |
1782 | XSTRING (STACK_ALIGN (sp))); | |
1783 | if (GDB_MULTI_ARCH) | |
1784 | fprintf_unfiltered (file, | |
1785 | "gdbarch_dump: STACK_ALIGN = 0x%08lx\n", | |
1786 | (long) current_gdbarch->stack_align | |
1787 | /*STACK_ALIGN ()*/); | |
4b9b3959 | 1788 | #endif |
08e45a40 AC |
1789 | #ifdef STORE_PSEUDO_REGISTER |
1790 | #if GDB_MULTI_ARCH | |
1791 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 1792 | fprintf_unfiltered (file, |
08e45a40 AC |
1793 | "gdbarch_dump: %s # %s\n", |
1794 | "STORE_PSEUDO_REGISTER(regnum)", | |
1795 | XSTRING (STORE_PSEUDO_REGISTER (regnum))); | |
4b9b3959 | 1796 | #endif |
08e45a40 AC |
1797 | if (GDB_MULTI_ARCH) |
1798 | fprintf_unfiltered (file, | |
1799 | "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n", | |
1800 | (long) current_gdbarch->store_pseudo_register | |
1801 | /*STORE_PSEUDO_REGISTER ()*/); | |
4b9b3959 | 1802 | #endif |
08e45a40 AC |
1803 | #ifdef STORE_RETURN_VALUE |
1804 | #if GDB_MULTI_ARCH | |
1805 | /* Macro might contain `[{}]' when not multi-arch */ | |
f517ea4e PS |
1806 | fprintf_unfiltered (file, |
1807 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1808 | "STORE_RETURN_VALUE(type, valbuf)", |
1809 | XSTRING (STORE_RETURN_VALUE (type, valbuf))); | |
f517ea4e | 1810 | #endif |
08e45a40 AC |
1811 | if (GDB_MULTI_ARCH) |
1812 | fprintf_unfiltered (file, | |
1813 | "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n", | |
1814 | (long) current_gdbarch->store_return_value | |
1815 | /*STORE_RETURN_VALUE ()*/); | |
875e1767 | 1816 | #endif |
08e45a40 AC |
1817 | #ifdef STORE_STRUCT_RETURN |
1818 | #if GDB_MULTI_ARCH | |
64c4637f AC |
1819 | /* Macro might contain `[{}]' when not multi-arch */ |
1820 | fprintf_unfiltered (file, | |
1821 | "gdbarch_dump: %s # %s\n", | |
08e45a40 AC |
1822 | "STORE_STRUCT_RETURN(addr, sp)", |
1823 | XSTRING (STORE_STRUCT_RETURN (addr, sp))); | |
64c4637f | 1824 | #endif |
08e45a40 AC |
1825 | if (GDB_MULTI_ARCH) |
1826 | fprintf_unfiltered (file, | |
1827 | "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n", | |
1828 | (long) current_gdbarch->store_struct_return | |
1829 | /*STORE_STRUCT_RETURN ()*/); | |
2bf0cb65 | 1830 | #endif |
08e45a40 | 1831 | #ifdef TARGET_ADDR_BIT |
bdcd319a | 1832 | fprintf_unfiltered (file, |
08e45a40 AC |
1833 | "gdbarch_dump: TARGET_ADDR_BIT # %s\n", |
1834 | XSTRING (TARGET_ADDR_BIT)); | |
1835 | fprintf_unfiltered (file, | |
06b25f14 AC |
1836 | "gdbarch_dump: TARGET_ADDR_BIT = %d\n", |
1837 | TARGET_ADDR_BIT); | |
bdcd319a | 1838 | #endif |
381323f4 | 1839 | #ifdef TARGET_ARCHITECTURE |
08e45a40 AC |
1840 | fprintf_unfiltered (file, |
1841 | "gdbarch_dump: TARGET_ARCHITECTURE # %s\n", | |
1842 | XSTRING (TARGET_ARCHITECTURE)); | |
0f71a2f6 | 1843 | if (TARGET_ARCHITECTURE != NULL) |
4b9b3959 AC |
1844 | fprintf_unfiltered (file, |
1845 | "gdbarch_dump: TARGET_ARCHITECTURE = %s\n", | |
adf40b2e | 1846 | TARGET_ARCHITECTURE->printable_name); |
381323f4 | 1847 | #endif |
08e45a40 AC |
1848 | #ifdef TARGET_BFD_VMA_BIT |
1849 | fprintf_unfiltered (file, | |
1850 | "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n", | |
1851 | XSTRING (TARGET_BFD_VMA_BIT)); | |
1852 | fprintf_unfiltered (file, | |
06b25f14 AC |
1853 | "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n", |
1854 | TARGET_BFD_VMA_BIT); | |
08e45a40 | 1855 | #endif |
381323f4 | 1856 | #ifdef TARGET_BYTE_ORDER |
08e45a40 AC |
1857 | fprintf_unfiltered (file, |
1858 | "gdbarch_dump: TARGET_BYTE_ORDER # %s\n", | |
1859 | XSTRING (TARGET_BYTE_ORDER)); | |
4b9b3959 AC |
1860 | fprintf_unfiltered (file, |
1861 | "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n", | |
adf40b2e | 1862 | (long) TARGET_BYTE_ORDER); |
381323f4 | 1863 | #endif |
4e409299 JB |
1864 | #ifdef TARGET_CHAR_SIGNED |
1865 | fprintf_unfiltered (file, | |
1866 | "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n", | |
1867 | XSTRING (TARGET_CHAR_SIGNED)); | |
1868 | fprintf_unfiltered (file, | |
06b25f14 AC |
1869 | "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n", |
1870 | TARGET_CHAR_SIGNED); | |
4e409299 | 1871 | #endif |
08e45a40 | 1872 | #ifdef TARGET_DOUBLE_BIT |
4b9b3959 | 1873 | fprintf_unfiltered (file, |
08e45a40 AC |
1874 | "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n", |
1875 | XSTRING (TARGET_DOUBLE_BIT)); | |
4b9b3959 | 1876 | fprintf_unfiltered (file, |
06b25f14 AC |
1877 | "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n", |
1878 | TARGET_DOUBLE_BIT); | |
381323f4 | 1879 | #endif |
08e45a40 | 1880 | #ifdef TARGET_DOUBLE_FORMAT |
4b9b3959 | 1881 | fprintf_unfiltered (file, |
08e45a40 AC |
1882 | "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n", |
1883 | XSTRING (TARGET_DOUBLE_FORMAT)); | |
4b9b3959 | 1884 | fprintf_unfiltered (file, |
08e45a40 AC |
1885 | "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n", |
1886 | (long) TARGET_DOUBLE_FORMAT); | |
381323f4 AC |
1887 | #endif |
1888 | #ifdef TARGET_FLOAT_BIT | |
08e45a40 AC |
1889 | fprintf_unfiltered (file, |
1890 | "gdbarch_dump: TARGET_FLOAT_BIT # %s\n", | |
1891 | XSTRING (TARGET_FLOAT_BIT)); | |
4b9b3959 | 1892 | fprintf_unfiltered (file, |
06b25f14 AC |
1893 | "gdbarch_dump: TARGET_FLOAT_BIT = %d\n", |
1894 | TARGET_FLOAT_BIT); | |
381323f4 | 1895 | #endif |
08e45a40 | 1896 | #ifdef TARGET_FLOAT_FORMAT |
4b9b3959 | 1897 | fprintf_unfiltered (file, |
08e45a40 AC |
1898 | "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n", |
1899 | XSTRING (TARGET_FLOAT_FORMAT)); | |
1900 | fprintf_unfiltered (file, | |
1901 | "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n", | |
1902 | (long) TARGET_FLOAT_FORMAT); | |
1903 | #endif | |
1904 | #ifdef TARGET_INT_BIT | |
1905 | fprintf_unfiltered (file, | |
1906 | "gdbarch_dump: TARGET_INT_BIT # %s\n", | |
1907 | XSTRING (TARGET_INT_BIT)); | |
1908 | fprintf_unfiltered (file, | |
06b25f14 AC |
1909 | "gdbarch_dump: TARGET_INT_BIT = %d\n", |
1910 | TARGET_INT_BIT); | |
08e45a40 AC |
1911 | #endif |
1912 | #ifdef TARGET_LONG_BIT | |
1913 | fprintf_unfiltered (file, | |
1914 | "gdbarch_dump: TARGET_LONG_BIT # %s\n", | |
1915 | XSTRING (TARGET_LONG_BIT)); | |
1916 | fprintf_unfiltered (file, | |
06b25f14 AC |
1917 | "gdbarch_dump: TARGET_LONG_BIT = %d\n", |
1918 | TARGET_LONG_BIT); | |
381323f4 AC |
1919 | #endif |
1920 | #ifdef TARGET_LONG_DOUBLE_BIT | |
08e45a40 AC |
1921 | fprintf_unfiltered (file, |
1922 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n", | |
1923 | XSTRING (TARGET_LONG_DOUBLE_BIT)); | |
4b9b3959 | 1924 | fprintf_unfiltered (file, |
06b25f14 AC |
1925 | "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n", |
1926 | TARGET_LONG_DOUBLE_BIT); | |
381323f4 | 1927 | #endif |
08e45a40 | 1928 | #ifdef TARGET_LONG_DOUBLE_FORMAT |
66b43ecb | 1929 | fprintf_unfiltered (file, |
08e45a40 AC |
1930 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n", |
1931 | XSTRING (TARGET_LONG_DOUBLE_FORMAT)); | |
52204a0b | 1932 | fprintf_unfiltered (file, |
08e45a40 AC |
1933 | "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n", |
1934 | (long) TARGET_LONG_DOUBLE_FORMAT); | |
52204a0b | 1935 | #endif |
08e45a40 | 1936 | #ifdef TARGET_LONG_LONG_BIT |
66b43ecb | 1937 | fprintf_unfiltered (file, |
08e45a40 AC |
1938 | "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n", |
1939 | XSTRING (TARGET_LONG_LONG_BIT)); | |
4b9b3959 | 1940 | fprintf_unfiltered (file, |
06b25f14 AC |
1941 | "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n", |
1942 | TARGET_LONG_LONG_BIT); | |
381323f4 | 1943 | #endif |
08e45a40 AC |
1944 | #ifdef TARGET_PRINT_INSN |
1945 | fprintf_unfiltered (file, | |
1946 | "gdbarch_dump: %s # %s\n", | |
1947 | "TARGET_PRINT_INSN(vma, info)", | |
1948 | XSTRING (TARGET_PRINT_INSN (vma, info))); | |
4b9b3959 AC |
1949 | if (GDB_MULTI_ARCH) |
1950 | fprintf_unfiltered (file, | |
08e45a40 AC |
1951 | "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n", |
1952 | (long) current_gdbarch->print_insn | |
1953 | /*TARGET_PRINT_INSN ()*/); | |
381323f4 | 1954 | #endif |
08e45a40 AC |
1955 | #ifdef TARGET_PTR_BIT |
1956 | fprintf_unfiltered (file, | |
1957 | "gdbarch_dump: TARGET_PTR_BIT # %s\n", | |
1958 | XSTRING (TARGET_PTR_BIT)); | |
1959 | fprintf_unfiltered (file, | |
06b25f14 AC |
1960 | "gdbarch_dump: TARGET_PTR_BIT = %d\n", |
1961 | TARGET_PTR_BIT); | |
381323f4 AC |
1962 | #endif |
1963 | #ifdef TARGET_READ_FP | |
08e45a40 AC |
1964 | fprintf_unfiltered (file, |
1965 | "gdbarch_dump: %s # %s\n", | |
1966 | "TARGET_READ_FP()", | |
1967 | XSTRING (TARGET_READ_FP ())); | |
4b9b3959 AC |
1968 | if (GDB_MULTI_ARCH) |
1969 | fprintf_unfiltered (file, | |
1970 | "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n", | |
1971 | (long) current_gdbarch->read_fp | |
1972 | /*TARGET_READ_FP ()*/); | |
381323f4 | 1973 | #endif |
08e45a40 AC |
1974 | #ifdef TARGET_READ_PC |
1975 | fprintf_unfiltered (file, | |
1976 | "gdbarch_dump: %s # %s\n", | |
1977 | "TARGET_READ_PC(ptid)", | |
1978 | XSTRING (TARGET_READ_PC (ptid))); | |
4b9b3959 AC |
1979 | if (GDB_MULTI_ARCH) |
1980 | fprintf_unfiltered (file, | |
08e45a40 AC |
1981 | "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n", |
1982 | (long) current_gdbarch->read_pc | |
1983 | /*TARGET_READ_PC ()*/); | |
381323f4 AC |
1984 | #endif |
1985 | #ifdef TARGET_READ_SP | |
08e45a40 AC |
1986 | fprintf_unfiltered (file, |
1987 | "gdbarch_dump: %s # %s\n", | |
1988 | "TARGET_READ_SP()", | |
1989 | XSTRING (TARGET_READ_SP ())); | |
4b9b3959 AC |
1990 | if (GDB_MULTI_ARCH) |
1991 | fprintf_unfiltered (file, | |
1992 | "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n", | |
1993 | (long) current_gdbarch->read_sp | |
1994 | /*TARGET_READ_SP ()*/); | |
381323f4 | 1995 | #endif |
08e45a40 AC |
1996 | #ifdef TARGET_SHORT_BIT |
1997 | fprintf_unfiltered (file, | |
1998 | "gdbarch_dump: TARGET_SHORT_BIT # %s\n", | |
1999 | XSTRING (TARGET_SHORT_BIT)); | |
2000 | fprintf_unfiltered (file, | |
06b25f14 AC |
2001 | "gdbarch_dump: TARGET_SHORT_BIT = %d\n", |
2002 | TARGET_SHORT_BIT); | |
39d4ef09 AC |
2003 | #endif |
2004 | #ifdef TARGET_VIRTUAL_FRAME_POINTER | |
08e45a40 AC |
2005 | #if GDB_MULTI_ARCH |
2006 | /* Macro might contain `[{}]' when not multi-arch */ | |
2007 | fprintf_unfiltered (file, | |
2008 | "gdbarch_dump: %s # %s\n", | |
2009 | "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)", | |
2010 | XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset))); | |
2011 | #endif | |
39d4ef09 AC |
2012 | if (GDB_MULTI_ARCH) |
2013 | fprintf_unfiltered (file, | |
2014 | "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n", | |
2015 | (long) current_gdbarch->virtual_frame_pointer | |
2016 | /*TARGET_VIRTUAL_FRAME_POINTER ()*/); | |
381323f4 | 2017 | #endif |
08e45a40 AC |
2018 | #ifdef TARGET_WRITE_FP |
2019 | #if GDB_MULTI_ARCH | |
2020 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 2021 | fprintf_unfiltered (file, |
08e45a40 AC |
2022 | "gdbarch_dump: %s # %s\n", |
2023 | "TARGET_WRITE_FP(val)", | |
2024 | XSTRING (TARGET_WRITE_FP (val))); | |
381323f4 | 2025 | #endif |
4b9b3959 AC |
2026 | if (GDB_MULTI_ARCH) |
2027 | fprintf_unfiltered (file, | |
08e45a40 AC |
2028 | "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n", |
2029 | (long) current_gdbarch->write_fp | |
2030 | /*TARGET_WRITE_FP ()*/); | |
381323f4 | 2031 | #endif |
08e45a40 AC |
2032 | #ifdef TARGET_WRITE_PC |
2033 | #if GDB_MULTI_ARCH | |
2034 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 2035 | fprintf_unfiltered (file, |
08e45a40 AC |
2036 | "gdbarch_dump: %s # %s\n", |
2037 | "TARGET_WRITE_PC(val, ptid)", | |
2038 | XSTRING (TARGET_WRITE_PC (val, ptid))); | |
381323f4 | 2039 | #endif |
4b9b3959 AC |
2040 | if (GDB_MULTI_ARCH) |
2041 | fprintf_unfiltered (file, | |
08e45a40 AC |
2042 | "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n", |
2043 | (long) current_gdbarch->write_pc | |
2044 | /*TARGET_WRITE_PC ()*/); | |
381323f4 | 2045 | #endif |
08e45a40 AC |
2046 | #ifdef TARGET_WRITE_SP |
2047 | #if GDB_MULTI_ARCH | |
2048 | /* Macro might contain `[{}]' when not multi-arch */ | |
4b9b3959 | 2049 | fprintf_unfiltered (file, |
08e45a40 AC |
2050 | "gdbarch_dump: %s # %s\n", |
2051 | "TARGET_WRITE_SP(val)", | |
2052 | XSTRING (TARGET_WRITE_SP (val))); | |
01fb7433 | 2053 | #endif |
01fb7433 AC |
2054 | if (GDB_MULTI_ARCH) |
2055 | fprintf_unfiltered (file, | |
08e45a40 AC |
2056 | "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n", |
2057 | (long) current_gdbarch->write_sp | |
2058 | /*TARGET_WRITE_SP ()*/); | |
01fb7433 | 2059 | #endif |
381323f4 | 2060 | #ifdef USE_GENERIC_DUMMY_FRAMES |
08e45a40 AC |
2061 | fprintf_unfiltered (file, |
2062 | "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n", | |
2063 | XSTRING (USE_GENERIC_DUMMY_FRAMES)); | |
4b9b3959 | 2064 | fprintf_unfiltered (file, |
06b25f14 AC |
2065 | "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n", |
2066 | USE_GENERIC_DUMMY_FRAMES); | |
381323f4 | 2067 | #endif |
08e45a40 | 2068 | #ifdef USE_STRUCT_CONVENTION |
4b9b3959 | 2069 | fprintf_unfiltered (file, |
08e45a40 AC |
2070 | "gdbarch_dump: %s # %s\n", |
2071 | "USE_STRUCT_CONVENTION(gcc_p, value_type)", | |
2072 | XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type))); | |
4b9b3959 AC |
2073 | if (GDB_MULTI_ARCH) |
2074 | fprintf_unfiltered (file, | |
2075 | "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n", | |
2076 | (long) current_gdbarch->use_struct_convention | |
2077 | /*USE_STRUCT_CONVENTION ()*/); | |
381323f4 | 2078 | #endif |
4b9b3959 AC |
2079 | if (current_gdbarch->dump_tdep != NULL) |
2080 | current_gdbarch->dump_tdep (current_gdbarch, file); | |
0f71a2f6 JM |
2081 | } |
2082 | ||
2083 | struct gdbarch_tdep * | |
104c1213 | 2084 | gdbarch_tdep (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2085 | { |
2086 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
2087 | fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n"); |
2088 | return gdbarch->tdep; | |
2089 | } | |
2090 | ||
2091 | ||
2092 | const struct bfd_arch_info * | |
104c1213 | 2093 | gdbarch_bfd_arch_info (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2094 | { |
2095 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
2096 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n"); |
2097 | return gdbarch->bfd_arch_info; | |
2098 | } | |
2099 | ||
2100 | int | |
104c1213 | 2101 | gdbarch_byte_order (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2102 | { |
2103 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
2104 | fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n"); |
2105 | return gdbarch->byte_order; | |
2106 | } | |
2107 | ||
0f71a2f6 | 2108 | int |
104c1213 | 2109 | gdbarch_short_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2110 | { |
66b43ecb | 2111 | /* Skip verify of short_bit, invalid_p == 0 */ |
0f71a2f6 | 2112 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2113 | fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n"); |
2114 | return gdbarch->short_bit; | |
2115 | } | |
2116 | ||
2117 | void | |
104c1213 JM |
2118 | set_gdbarch_short_bit (struct gdbarch *gdbarch, |
2119 | int short_bit) | |
0f71a2f6 JM |
2120 | { |
2121 | gdbarch->short_bit = short_bit; | |
2122 | } | |
2123 | ||
2124 | int | |
104c1213 | 2125 | gdbarch_int_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2126 | { |
66b43ecb | 2127 | /* Skip verify of int_bit, invalid_p == 0 */ |
0f71a2f6 | 2128 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2129 | fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n"); |
2130 | return gdbarch->int_bit; | |
2131 | } | |
2132 | ||
2133 | void | |
104c1213 JM |
2134 | set_gdbarch_int_bit (struct gdbarch *gdbarch, |
2135 | int int_bit) | |
0f71a2f6 JM |
2136 | { |
2137 | gdbarch->int_bit = int_bit; | |
2138 | } | |
2139 | ||
2140 | int | |
104c1213 | 2141 | gdbarch_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2142 | { |
66b43ecb | 2143 | /* Skip verify of long_bit, invalid_p == 0 */ |
0f71a2f6 | 2144 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2145 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n"); |
2146 | return gdbarch->long_bit; | |
2147 | } | |
2148 | ||
2149 | void | |
104c1213 JM |
2150 | set_gdbarch_long_bit (struct gdbarch *gdbarch, |
2151 | int long_bit) | |
0f71a2f6 JM |
2152 | { |
2153 | gdbarch->long_bit = long_bit; | |
2154 | } | |
2155 | ||
2156 | int | |
104c1213 | 2157 | gdbarch_long_long_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2158 | { |
66b43ecb | 2159 | /* Skip verify of long_long_bit, invalid_p == 0 */ |
0f71a2f6 | 2160 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2161 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n"); |
2162 | return gdbarch->long_long_bit; | |
2163 | } | |
2164 | ||
2165 | void | |
104c1213 JM |
2166 | set_gdbarch_long_long_bit (struct gdbarch *gdbarch, |
2167 | int long_long_bit) | |
0f71a2f6 JM |
2168 | { |
2169 | gdbarch->long_long_bit = long_long_bit; | |
2170 | } | |
2171 | ||
2172 | int | |
104c1213 | 2173 | gdbarch_float_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2174 | { |
66b43ecb | 2175 | /* Skip verify of float_bit, invalid_p == 0 */ |
0f71a2f6 | 2176 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2177 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n"); |
2178 | return gdbarch->float_bit; | |
2179 | } | |
2180 | ||
2181 | void | |
104c1213 JM |
2182 | set_gdbarch_float_bit (struct gdbarch *gdbarch, |
2183 | int float_bit) | |
0f71a2f6 JM |
2184 | { |
2185 | gdbarch->float_bit = float_bit; | |
2186 | } | |
2187 | ||
2188 | int | |
104c1213 | 2189 | gdbarch_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2190 | { |
66b43ecb | 2191 | /* Skip verify of double_bit, invalid_p == 0 */ |
0f71a2f6 | 2192 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2193 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n"); |
2194 | return gdbarch->double_bit; | |
2195 | } | |
2196 | ||
2197 | void | |
104c1213 JM |
2198 | set_gdbarch_double_bit (struct gdbarch *gdbarch, |
2199 | int double_bit) | |
0f71a2f6 JM |
2200 | { |
2201 | gdbarch->double_bit = double_bit; | |
2202 | } | |
2203 | ||
2204 | int | |
104c1213 | 2205 | gdbarch_long_double_bit (struct gdbarch *gdbarch) |
0f71a2f6 | 2206 | { |
66b43ecb | 2207 | /* Skip verify of long_double_bit, invalid_p == 0 */ |
0f71a2f6 | 2208 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2209 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n"); |
2210 | return gdbarch->long_double_bit; | |
2211 | } | |
2212 | ||
2213 | void | |
104c1213 JM |
2214 | set_gdbarch_long_double_bit (struct gdbarch *gdbarch, |
2215 | int long_double_bit) | |
0f71a2f6 JM |
2216 | { |
2217 | gdbarch->long_double_bit = long_double_bit; | |
2218 | } | |
2219 | ||
66b43ecb AC |
2220 | int |
2221 | gdbarch_ptr_bit (struct gdbarch *gdbarch) | |
2222 | { | |
2223 | /* Skip verify of ptr_bit, invalid_p == 0 */ | |
2224 | if (gdbarch_debug >= 2) | |
2225 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n"); | |
2226 | return gdbarch->ptr_bit; | |
2227 | } | |
2228 | ||
2229 | void | |
2230 | set_gdbarch_ptr_bit (struct gdbarch *gdbarch, | |
2231 | int ptr_bit) | |
2232 | { | |
2233 | gdbarch->ptr_bit = ptr_bit; | |
2234 | } | |
2235 | ||
52204a0b DT |
2236 | int |
2237 | gdbarch_addr_bit (struct gdbarch *gdbarch) | |
2238 | { | |
2239 | if (gdbarch->addr_bit == 0) | |
8e65ff28 AC |
2240 | internal_error (__FILE__, __LINE__, |
2241 | "gdbarch: gdbarch_addr_bit invalid"); | |
52204a0b DT |
2242 | if (gdbarch_debug >= 2) |
2243 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n"); | |
2244 | return gdbarch->addr_bit; | |
2245 | } | |
2246 | ||
2247 | void | |
2248 | set_gdbarch_addr_bit (struct gdbarch *gdbarch, | |
2249 | int addr_bit) | |
2250 | { | |
2251 | gdbarch->addr_bit = addr_bit; | |
2252 | } | |
2253 | ||
66b43ecb AC |
2254 | int |
2255 | gdbarch_bfd_vma_bit (struct gdbarch *gdbarch) | |
2256 | { | |
2257 | /* Skip verify of bfd_vma_bit, invalid_p == 0 */ | |
2258 | if (gdbarch_debug >= 2) | |
2259 | fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n"); | |
2260 | return gdbarch->bfd_vma_bit; | |
2261 | } | |
2262 | ||
2263 | void | |
2264 | set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch, | |
2265 | int bfd_vma_bit) | |
2266 | { | |
2267 | gdbarch->bfd_vma_bit = bfd_vma_bit; | |
2268 | } | |
2269 | ||
4e409299 JB |
2270 | int |
2271 | gdbarch_char_signed (struct gdbarch *gdbarch) | |
2272 | { | |
2273 | if (gdbarch->char_signed == -1) | |
2274 | internal_error (__FILE__, __LINE__, | |
2275 | "gdbarch: gdbarch_char_signed invalid"); | |
2276 | if (gdbarch_debug >= 2) | |
2277 | fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n"); | |
2278 | return gdbarch->char_signed; | |
2279 | } | |
2280 | ||
2281 | void | |
2282 | set_gdbarch_char_signed (struct gdbarch *gdbarch, | |
2283 | int char_signed) | |
2284 | { | |
2285 | gdbarch->char_signed = char_signed; | |
2286 | } | |
2287 | ||
0f71a2f6 | 2288 | CORE_ADDR |
39f77062 | 2289 | gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid) |
0f71a2f6 JM |
2290 | { |
2291 | if (gdbarch->read_pc == 0) | |
8e65ff28 AC |
2292 | internal_error (__FILE__, __LINE__, |
2293 | "gdbarch: gdbarch_read_pc invalid"); | |
0f71a2f6 | 2294 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2295 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n"); |
39f77062 | 2296 | return gdbarch->read_pc (ptid); |
0f71a2f6 JM |
2297 | } |
2298 | ||
2299 | void | |
104c1213 JM |
2300 | set_gdbarch_read_pc (struct gdbarch *gdbarch, |
2301 | gdbarch_read_pc_ftype read_pc) | |
0f71a2f6 JM |
2302 | { |
2303 | gdbarch->read_pc = read_pc; | |
2304 | } | |
2305 | ||
2306 | void | |
39f77062 | 2307 | gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid) |
0f71a2f6 JM |
2308 | { |
2309 | if (gdbarch->write_pc == 0) | |
8e65ff28 AC |
2310 | internal_error (__FILE__, __LINE__, |
2311 | "gdbarch: gdbarch_write_pc invalid"); | |
0f71a2f6 | 2312 | if (gdbarch_debug >= 2) |
0f71a2f6 | 2313 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n"); |
39f77062 | 2314 | gdbarch->write_pc (val, ptid); |
0f71a2f6 JM |
2315 | } |
2316 | ||
2317 | void | |
104c1213 JM |
2318 | set_gdbarch_write_pc (struct gdbarch *gdbarch, |
2319 | gdbarch_write_pc_ftype write_pc) | |
0f71a2f6 JM |
2320 | { |
2321 | gdbarch->write_pc = write_pc; | |
2322 | } | |
2323 | ||
2324 | CORE_ADDR | |
2325 | gdbarch_read_fp (struct gdbarch *gdbarch) | |
2326 | { | |
2327 | if (gdbarch->read_fp == 0) | |
8e65ff28 AC |
2328 | internal_error (__FILE__, __LINE__, |
2329 | "gdbarch: gdbarch_read_fp invalid"); | |
0f71a2f6 | 2330 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2331 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n"); |
2332 | return gdbarch->read_fp (); | |
2333 | } | |
2334 | ||
2335 | void | |
104c1213 JM |
2336 | set_gdbarch_read_fp (struct gdbarch *gdbarch, |
2337 | gdbarch_read_fp_ftype read_fp) | |
0f71a2f6 JM |
2338 | { |
2339 | gdbarch->read_fp = read_fp; | |
2340 | } | |
2341 | ||
2342 | void | |
2343 | gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val) | |
2344 | { | |
2345 | if (gdbarch->write_fp == 0) | |
8e65ff28 AC |
2346 | internal_error (__FILE__, __LINE__, |
2347 | "gdbarch: gdbarch_write_fp invalid"); | |
0f71a2f6 | 2348 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2349 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n"); |
2350 | gdbarch->write_fp (val); | |
2351 | } | |
2352 | ||
2353 | void | |
104c1213 JM |
2354 | set_gdbarch_write_fp (struct gdbarch *gdbarch, |
2355 | gdbarch_write_fp_ftype write_fp) | |
0f71a2f6 JM |
2356 | { |
2357 | gdbarch->write_fp = write_fp; | |
2358 | } | |
2359 | ||
2360 | CORE_ADDR | |
2361 | gdbarch_read_sp (struct gdbarch *gdbarch) | |
2362 | { | |
2363 | if (gdbarch->read_sp == 0) | |
8e65ff28 AC |
2364 | internal_error (__FILE__, __LINE__, |
2365 | "gdbarch: gdbarch_read_sp invalid"); | |
0f71a2f6 | 2366 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2367 | fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n"); |
2368 | return gdbarch->read_sp (); | |
2369 | } | |
2370 | ||
2371 | void | |
104c1213 JM |
2372 | set_gdbarch_read_sp (struct gdbarch *gdbarch, |
2373 | gdbarch_read_sp_ftype read_sp) | |
0f71a2f6 JM |
2374 | { |
2375 | gdbarch->read_sp = read_sp; | |
2376 | } | |
2377 | ||
2378 | void | |
2379 | gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val) | |
2380 | { | |
2381 | if (gdbarch->write_sp == 0) | |
8e65ff28 AC |
2382 | internal_error (__FILE__, __LINE__, |
2383 | "gdbarch: gdbarch_write_sp invalid"); | |
0f71a2f6 | 2384 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2385 | fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n"); |
2386 | gdbarch->write_sp (val); | |
2387 | } | |
2388 | ||
2389 | void | |
104c1213 JM |
2390 | set_gdbarch_write_sp (struct gdbarch *gdbarch, |
2391 | gdbarch_write_sp_ftype write_sp) | |
0f71a2f6 JM |
2392 | { |
2393 | gdbarch->write_sp = write_sp; | |
2394 | } | |
2395 | ||
39d4ef09 AC |
2396 | void |
2397 | gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset) | |
2398 | { | |
2399 | if (gdbarch->virtual_frame_pointer == 0) | |
2400 | internal_error (__FILE__, __LINE__, | |
2401 | "gdbarch: gdbarch_virtual_frame_pointer invalid"); | |
2402 | if (gdbarch_debug >= 2) | |
2403 | fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n"); | |
2404 | gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset); | |
2405 | } | |
2406 | ||
2407 | void | |
2408 | set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, | |
2409 | gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer) | |
2410 | { | |
2411 | gdbarch->virtual_frame_pointer = virtual_frame_pointer; | |
2412 | } | |
2413 | ||
61a0eb5b AC |
2414 | int |
2415 | gdbarch_register_read_p (struct gdbarch *gdbarch) | |
2416 | { | |
2417 | return gdbarch->register_read != 0; | |
2418 | } | |
2419 | ||
2420 | void | |
2421 | gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf) | |
2422 | { | |
2423 | if (gdbarch->register_read == 0) | |
2424 | internal_error (__FILE__, __LINE__, | |
2425 | "gdbarch: gdbarch_register_read invalid"); | |
2426 | if (gdbarch_debug >= 2) | |
2427 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n"); | |
2428 | gdbarch->register_read (gdbarch, regnum, buf); | |
2429 | } | |
2430 | ||
2431 | void | |
2432 | set_gdbarch_register_read (struct gdbarch *gdbarch, | |
2433 | gdbarch_register_read_ftype register_read) | |
2434 | { | |
2435 | gdbarch->register_read = register_read; | |
2436 | } | |
2437 | ||
2438 | int | |
2439 | gdbarch_register_write_p (struct gdbarch *gdbarch) | |
2440 | { | |
2441 | return gdbarch->register_write != 0; | |
2442 | } | |
2443 | ||
2444 | void | |
2445 | gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf) | |
2446 | { | |
2447 | if (gdbarch->register_write == 0) | |
2448 | internal_error (__FILE__, __LINE__, | |
2449 | "gdbarch: gdbarch_register_write invalid"); | |
2450 | if (gdbarch_debug >= 2) | |
2451 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n"); | |
2452 | gdbarch->register_write (gdbarch, regnum, buf); | |
2453 | } | |
2454 | ||
2455 | void | |
2456 | set_gdbarch_register_write (struct gdbarch *gdbarch, | |
2457 | gdbarch_register_write_ftype register_write) | |
2458 | { | |
2459 | gdbarch->register_write = register_write; | |
2460 | } | |
2461 | ||
0f71a2f6 | 2462 | int |
104c1213 | 2463 | gdbarch_num_regs (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2464 | { |
2465 | if (gdbarch->num_regs == -1) | |
8e65ff28 AC |
2466 | internal_error (__FILE__, __LINE__, |
2467 | "gdbarch: gdbarch_num_regs invalid"); | |
0f71a2f6 | 2468 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2469 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n"); |
2470 | return gdbarch->num_regs; | |
2471 | } | |
2472 | ||
2473 | void | |
104c1213 JM |
2474 | set_gdbarch_num_regs (struct gdbarch *gdbarch, |
2475 | int num_regs) | |
0f71a2f6 JM |
2476 | { |
2477 | gdbarch->num_regs = num_regs; | |
2478 | } | |
2479 | ||
0aba1244 EZ |
2480 | int |
2481 | gdbarch_num_pseudo_regs (struct gdbarch *gdbarch) | |
2482 | { | |
2483 | /* Skip verify of num_pseudo_regs, invalid_p == 0 */ | |
2484 | if (gdbarch_debug >= 2) | |
2485 | fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n"); | |
2486 | return gdbarch->num_pseudo_regs; | |
2487 | } | |
2488 | ||
2489 | void | |
2490 | set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch, | |
2491 | int num_pseudo_regs) | |
2492 | { | |
2493 | gdbarch->num_pseudo_regs = num_pseudo_regs; | |
2494 | } | |
2495 | ||
0f71a2f6 | 2496 | int |
104c1213 | 2497 | gdbarch_sp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2498 | { |
2499 | if (gdbarch->sp_regnum == -1) | |
8e65ff28 AC |
2500 | internal_error (__FILE__, __LINE__, |
2501 | "gdbarch: gdbarch_sp_regnum invalid"); | |
0f71a2f6 | 2502 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2503 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n"); |
2504 | return gdbarch->sp_regnum; | |
2505 | } | |
2506 | ||
2507 | void | |
104c1213 JM |
2508 | set_gdbarch_sp_regnum (struct gdbarch *gdbarch, |
2509 | int sp_regnum) | |
0f71a2f6 JM |
2510 | { |
2511 | gdbarch->sp_regnum = sp_regnum; | |
2512 | } | |
2513 | ||
2514 | int | |
104c1213 | 2515 | gdbarch_fp_regnum (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2516 | { |
2517 | if (gdbarch->fp_regnum == -1) | |
8e65ff28 AC |
2518 | internal_error (__FILE__, __LINE__, |
2519 | "gdbarch: gdbarch_fp_regnum invalid"); | |
0f71a2f6 | 2520 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2521 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n"); |
2522 | return gdbarch->fp_regnum; | |
2523 | } | |
2524 | ||
2525 | void | |
104c1213 JM |
2526 | set_gdbarch_fp_regnum (struct gdbarch *gdbarch, |
2527 | int fp_regnum) | |
0f71a2f6 JM |
2528 | { |
2529 | gdbarch->fp_regnum = fp_regnum; | |
2530 | } | |
2531 | ||
2532 | int | |
104c1213 | 2533 | gdbarch_pc_regnum (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2534 | { |
2535 | if (gdbarch->pc_regnum == -1) | |
8e65ff28 AC |
2536 | internal_error (__FILE__, __LINE__, |
2537 | "gdbarch: gdbarch_pc_regnum invalid"); | |
0f71a2f6 | 2538 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2539 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n"); |
2540 | return gdbarch->pc_regnum; | |
2541 | } | |
2542 | ||
2543 | void | |
104c1213 JM |
2544 | set_gdbarch_pc_regnum (struct gdbarch *gdbarch, |
2545 | int pc_regnum) | |
0f71a2f6 JM |
2546 | { |
2547 | gdbarch->pc_regnum = pc_regnum; | |
2548 | } | |
2549 | ||
60054393 MS |
2550 | int |
2551 | gdbarch_fp0_regnum (struct gdbarch *gdbarch) | |
2552 | { | |
2553 | /* Skip verify of fp0_regnum, invalid_p == 0 */ | |
2554 | if (gdbarch_debug >= 2) | |
2555 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n"); | |
2556 | return gdbarch->fp0_regnum; | |
2557 | } | |
2558 | ||
2559 | void | |
2560 | set_gdbarch_fp0_regnum (struct gdbarch *gdbarch, | |
2561 | int fp0_regnum) | |
2562 | { | |
2563 | gdbarch->fp0_regnum = fp0_regnum; | |
2564 | } | |
2565 | ||
03863182 AC |
2566 | int |
2567 | gdbarch_npc_regnum (struct gdbarch *gdbarch) | |
2568 | { | |
2569 | /* Skip verify of npc_regnum, invalid_p == 0 */ | |
2570 | if (gdbarch_debug >= 2) | |
2571 | fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n"); | |
2572 | return gdbarch->npc_regnum; | |
2573 | } | |
2574 | ||
2575 | void | |
2576 | set_gdbarch_npc_regnum (struct gdbarch *gdbarch, | |
2577 | int npc_regnum) | |
2578 | { | |
2579 | gdbarch->npc_regnum = npc_regnum; | |
2580 | } | |
2581 | ||
2582 | int | |
2583 | gdbarch_nnpc_regnum (struct gdbarch *gdbarch) | |
2584 | { | |
2585 | /* Skip verify of nnpc_regnum, invalid_p == 0 */ | |
2586 | if (gdbarch_debug >= 2) | |
2587 | fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n"); | |
2588 | return gdbarch->nnpc_regnum; | |
2589 | } | |
2590 | ||
2591 | void | |
2592 | set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch, | |
2593 | int nnpc_regnum) | |
2594 | { | |
2595 | gdbarch->nnpc_regnum = nnpc_regnum; | |
2596 | } | |
2597 | ||
88c72b7d AC |
2598 | int |
2599 | gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr) | |
2600 | { | |
2601 | if (gdbarch->stab_reg_to_regnum == 0) | |
8e65ff28 AC |
2602 | internal_error (__FILE__, __LINE__, |
2603 | "gdbarch: gdbarch_stab_reg_to_regnum invalid"); | |
88c72b7d AC |
2604 | if (gdbarch_debug >= 2) |
2605 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n"); | |
2606 | return gdbarch->stab_reg_to_regnum (stab_regnr); | |
2607 | } | |
2608 | ||
2609 | void | |
2610 | set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, | |
2611 | gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum) | |
2612 | { | |
2613 | gdbarch->stab_reg_to_regnum = stab_reg_to_regnum; | |
2614 | } | |
2615 | ||
2616 | int | |
2617 | gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr) | |
2618 | { | |
2619 | if (gdbarch->ecoff_reg_to_regnum == 0) | |
8e65ff28 AC |
2620 | internal_error (__FILE__, __LINE__, |
2621 | "gdbarch: gdbarch_ecoff_reg_to_regnum invalid"); | |
88c72b7d AC |
2622 | if (gdbarch_debug >= 2) |
2623 | fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n"); | |
2624 | return gdbarch->ecoff_reg_to_regnum (ecoff_regnr); | |
2625 | } | |
2626 | ||
2627 | void | |
2628 | set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, | |
2629 | gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum) | |
2630 | { | |
2631 | gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum; | |
2632 | } | |
2633 | ||
2634 | int | |
2635 | gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr) | |
2636 | { | |
2637 | if (gdbarch->dwarf_reg_to_regnum == 0) | |
8e65ff28 AC |
2638 | internal_error (__FILE__, __LINE__, |
2639 | "gdbarch: gdbarch_dwarf_reg_to_regnum invalid"); | |
88c72b7d AC |
2640 | if (gdbarch_debug >= 2) |
2641 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n"); | |
2642 | return gdbarch->dwarf_reg_to_regnum (dwarf_regnr); | |
2643 | } | |
2644 | ||
2645 | void | |
2646 | set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, | |
2647 | gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum) | |
2648 | { | |
2649 | gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum; | |
2650 | } | |
2651 | ||
2652 | int | |
2653 | gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr) | |
2654 | { | |
2655 | if (gdbarch->sdb_reg_to_regnum == 0) | |
8e65ff28 AC |
2656 | internal_error (__FILE__, __LINE__, |
2657 | "gdbarch: gdbarch_sdb_reg_to_regnum invalid"); | |
88c72b7d AC |
2658 | if (gdbarch_debug >= 2) |
2659 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n"); | |
2660 | return gdbarch->sdb_reg_to_regnum (sdb_regnr); | |
2661 | } | |
2662 | ||
2663 | void | |
2664 | set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, | |
2665 | gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum) | |
2666 | { | |
2667 | gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum; | |
2668 | } | |
2669 | ||
2670 | int | |
2671 | gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr) | |
2672 | { | |
2673 | if (gdbarch->dwarf2_reg_to_regnum == 0) | |
8e65ff28 AC |
2674 | internal_error (__FILE__, __LINE__, |
2675 | "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid"); | |
88c72b7d AC |
2676 | if (gdbarch_debug >= 2) |
2677 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n"); | |
2678 | return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr); | |
2679 | } | |
2680 | ||
2681 | void | |
2682 | set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, | |
2683 | gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum) | |
2684 | { | |
2685 | gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum; | |
2686 | } | |
2687 | ||
0f71a2f6 JM |
2688 | char * |
2689 | gdbarch_register_name (struct gdbarch *gdbarch, int regnr) | |
2690 | { | |
7be570e7 | 2691 | if (gdbarch->register_name == 0) |
8e65ff28 AC |
2692 | internal_error (__FILE__, __LINE__, |
2693 | "gdbarch: gdbarch_register_name invalid"); | |
0f71a2f6 | 2694 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2695 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n"); |
2696 | return gdbarch->register_name (regnr); | |
2697 | } | |
2698 | ||
2699 | void | |
104c1213 JM |
2700 | set_gdbarch_register_name (struct gdbarch *gdbarch, |
2701 | gdbarch_register_name_ftype register_name) | |
0f71a2f6 JM |
2702 | { |
2703 | gdbarch->register_name = register_name; | |
2704 | } | |
2705 | ||
2706 | int | |
104c1213 | 2707 | gdbarch_register_size (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2708 | { |
2709 | if (gdbarch->register_size == -1) | |
8e65ff28 AC |
2710 | internal_error (__FILE__, __LINE__, |
2711 | "gdbarch: gdbarch_register_size invalid"); | |
0f71a2f6 | 2712 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2713 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n"); |
2714 | return gdbarch->register_size; | |
2715 | } | |
2716 | ||
2717 | void | |
104c1213 JM |
2718 | set_gdbarch_register_size (struct gdbarch *gdbarch, |
2719 | int register_size) | |
0f71a2f6 JM |
2720 | { |
2721 | gdbarch->register_size = register_size; | |
2722 | } | |
2723 | ||
2724 | int | |
104c1213 | 2725 | gdbarch_register_bytes (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2726 | { |
2727 | if (gdbarch->register_bytes == -1) | |
8e65ff28 AC |
2728 | internal_error (__FILE__, __LINE__, |
2729 | "gdbarch: gdbarch_register_bytes invalid"); | |
0f71a2f6 | 2730 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2731 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n"); |
2732 | return gdbarch->register_bytes; | |
2733 | } | |
2734 | ||
2735 | void | |
104c1213 JM |
2736 | set_gdbarch_register_bytes (struct gdbarch *gdbarch, |
2737 | int register_bytes) | |
0f71a2f6 JM |
2738 | { |
2739 | gdbarch->register_bytes = register_bytes; | |
2740 | } | |
2741 | ||
2742 | int | |
2743 | gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr) | |
2744 | { | |
2745 | if (gdbarch->register_byte == 0) | |
8e65ff28 AC |
2746 | internal_error (__FILE__, __LINE__, |
2747 | "gdbarch: gdbarch_register_byte invalid"); | |
0f71a2f6 | 2748 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2749 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n"); |
2750 | return gdbarch->register_byte (reg_nr); | |
2751 | } | |
2752 | ||
2753 | void | |
104c1213 JM |
2754 | set_gdbarch_register_byte (struct gdbarch *gdbarch, |
2755 | gdbarch_register_byte_ftype register_byte) | |
0f71a2f6 JM |
2756 | { |
2757 | gdbarch->register_byte = register_byte; | |
2758 | } | |
2759 | ||
2760 | int | |
2761 | gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr) | |
2762 | { | |
2763 | if (gdbarch->register_raw_size == 0) | |
8e65ff28 AC |
2764 | internal_error (__FILE__, __LINE__, |
2765 | "gdbarch: gdbarch_register_raw_size invalid"); | |
0f71a2f6 | 2766 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2767 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n"); |
2768 | return gdbarch->register_raw_size (reg_nr); | |
2769 | } | |
2770 | ||
2771 | void | |
104c1213 JM |
2772 | set_gdbarch_register_raw_size (struct gdbarch *gdbarch, |
2773 | gdbarch_register_raw_size_ftype register_raw_size) | |
0f71a2f6 JM |
2774 | { |
2775 | gdbarch->register_raw_size = register_raw_size; | |
2776 | } | |
2777 | ||
2778 | int | |
104c1213 | 2779 | gdbarch_max_register_raw_size (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2780 | { |
2781 | if (gdbarch->max_register_raw_size == -1) | |
8e65ff28 AC |
2782 | internal_error (__FILE__, __LINE__, |
2783 | "gdbarch: gdbarch_max_register_raw_size invalid"); | |
0f71a2f6 | 2784 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2785 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n"); |
2786 | return gdbarch->max_register_raw_size; | |
2787 | } | |
2788 | ||
2789 | void | |
104c1213 JM |
2790 | set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch, |
2791 | int max_register_raw_size) | |
0f71a2f6 JM |
2792 | { |
2793 | gdbarch->max_register_raw_size = max_register_raw_size; | |
2794 | } | |
2795 | ||
2796 | int | |
2797 | gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr) | |
2798 | { | |
2799 | if (gdbarch->register_virtual_size == 0) | |
8e65ff28 AC |
2800 | internal_error (__FILE__, __LINE__, |
2801 | "gdbarch: gdbarch_register_virtual_size invalid"); | |
0f71a2f6 | 2802 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2803 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n"); |
2804 | return gdbarch->register_virtual_size (reg_nr); | |
2805 | } | |
2806 | ||
2807 | void | |
104c1213 JM |
2808 | set_gdbarch_register_virtual_size (struct gdbarch *gdbarch, |
2809 | gdbarch_register_virtual_size_ftype register_virtual_size) | |
0f71a2f6 JM |
2810 | { |
2811 | gdbarch->register_virtual_size = register_virtual_size; | |
2812 | } | |
2813 | ||
2814 | int | |
104c1213 | 2815 | gdbarch_max_register_virtual_size (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2816 | { |
2817 | if (gdbarch->max_register_virtual_size == -1) | |
8e65ff28 AC |
2818 | internal_error (__FILE__, __LINE__, |
2819 | "gdbarch: gdbarch_max_register_virtual_size invalid"); | |
0f71a2f6 | 2820 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2821 | fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n"); |
2822 | return gdbarch->max_register_virtual_size; | |
2823 | } | |
2824 | ||
2825 | void | |
104c1213 JM |
2826 | set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch, |
2827 | int max_register_virtual_size) | |
0f71a2f6 JM |
2828 | { |
2829 | gdbarch->max_register_virtual_size = max_register_virtual_size; | |
2830 | } | |
2831 | ||
2832 | struct type * | |
2833 | gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr) | |
2834 | { | |
2835 | if (gdbarch->register_virtual_type == 0) | |
8e65ff28 AC |
2836 | internal_error (__FILE__, __LINE__, |
2837 | "gdbarch: gdbarch_register_virtual_type invalid"); | |
0f71a2f6 | 2838 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2839 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n"); |
2840 | return gdbarch->register_virtual_type (reg_nr); | |
2841 | } | |
2842 | ||
2843 | void | |
104c1213 JM |
2844 | set_gdbarch_register_virtual_type (struct gdbarch *gdbarch, |
2845 | gdbarch_register_virtual_type_ftype register_virtual_type) | |
0f71a2f6 JM |
2846 | { |
2847 | gdbarch->register_virtual_type = register_virtual_type; | |
2848 | } | |
2849 | ||
666e11c5 EZ |
2850 | void |
2851 | gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs) | |
2852 | { | |
2853 | if (gdbarch->do_registers_info == 0) | |
8e65ff28 AC |
2854 | internal_error (__FILE__, __LINE__, |
2855 | "gdbarch: gdbarch_do_registers_info invalid"); | |
666e11c5 EZ |
2856 | if (gdbarch_debug >= 2) |
2857 | fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n"); | |
2858 | gdbarch->do_registers_info (reg_nr, fpregs); | |
2859 | } | |
2860 | ||
2861 | void | |
2862 | set_gdbarch_do_registers_info (struct gdbarch *gdbarch, | |
2863 | gdbarch_do_registers_info_ftype do_registers_info) | |
2864 | { | |
2865 | gdbarch->do_registers_info = do_registers_info; | |
2866 | } | |
2867 | ||
7c7651b2 AC |
2868 | int |
2869 | gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr) | |
2870 | { | |
2871 | if (gdbarch->register_sim_regno == 0) | |
8e65ff28 AC |
2872 | internal_error (__FILE__, __LINE__, |
2873 | "gdbarch: gdbarch_register_sim_regno invalid"); | |
7c7651b2 AC |
2874 | if (gdbarch_debug >= 2) |
2875 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n"); | |
2876 | return gdbarch->register_sim_regno (reg_nr); | |
2877 | } | |
2878 | ||
2879 | void | |
2880 | set_gdbarch_register_sim_regno (struct gdbarch *gdbarch, | |
2881 | gdbarch_register_sim_regno_ftype register_sim_regno) | |
2882 | { | |
2883 | gdbarch->register_sim_regno = register_sim_regno; | |
2884 | } | |
2885 | ||
2649061d AC |
2886 | int |
2887 | gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch) | |
2888 | { | |
2889 | return gdbarch->register_bytes_ok != 0; | |
2890 | } | |
2891 | ||
2892 | int | |
2893 | gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes) | |
2894 | { | |
2895 | if (gdbarch->register_bytes_ok == 0) | |
8e65ff28 AC |
2896 | internal_error (__FILE__, __LINE__, |
2897 | "gdbarch: gdbarch_register_bytes_ok invalid"); | |
2649061d AC |
2898 | if (gdbarch_debug >= 2) |
2899 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n"); | |
2900 | return gdbarch->register_bytes_ok (nr_bytes); | |
2901 | } | |
2902 | ||
2903 | void | |
2904 | set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch, | |
2905 | gdbarch_register_bytes_ok_ftype register_bytes_ok) | |
2906 | { | |
2907 | gdbarch->register_bytes_ok = register_bytes_ok; | |
2908 | } | |
2909 | ||
01fb7433 | 2910 | int |
1622c8f7 | 2911 | gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum) |
01fb7433 AC |
2912 | { |
2913 | if (gdbarch->cannot_fetch_register == 0) | |
2914 | internal_error (__FILE__, __LINE__, | |
2915 | "gdbarch: gdbarch_cannot_fetch_register invalid"); | |
2916 | if (gdbarch_debug >= 2) | |
2917 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n"); | |
1622c8f7 | 2918 | return gdbarch->cannot_fetch_register (regnum); |
01fb7433 AC |
2919 | } |
2920 | ||
2921 | void | |
2922 | set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, | |
2923 | gdbarch_cannot_fetch_register_ftype cannot_fetch_register) | |
2924 | { | |
2925 | gdbarch->cannot_fetch_register = cannot_fetch_register; | |
2926 | } | |
2927 | ||
2928 | int | |
1622c8f7 | 2929 | gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum) |
01fb7433 AC |
2930 | { |
2931 | if (gdbarch->cannot_store_register == 0) | |
2932 | internal_error (__FILE__, __LINE__, | |
2933 | "gdbarch: gdbarch_cannot_store_register invalid"); | |
2934 | if (gdbarch_debug >= 2) | |
2935 | fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n"); | |
1622c8f7 | 2936 | return gdbarch->cannot_store_register (regnum); |
01fb7433 AC |
2937 | } |
2938 | ||
2939 | void | |
2940 | set_gdbarch_cannot_store_register (struct gdbarch *gdbarch, | |
2941 | gdbarch_cannot_store_register_ftype cannot_store_register) | |
2942 | { | |
2943 | gdbarch->cannot_store_register = cannot_store_register; | |
2944 | } | |
2945 | ||
0f71a2f6 | 2946 | int |
104c1213 | 2947 | gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2948 | { |
2949 | if (gdbarch->use_generic_dummy_frames == -1) | |
8e65ff28 AC |
2950 | internal_error (__FILE__, __LINE__, |
2951 | "gdbarch: gdbarch_use_generic_dummy_frames invalid"); | |
0f71a2f6 | 2952 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2953 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n"); |
2954 | return gdbarch->use_generic_dummy_frames; | |
2955 | } | |
2956 | ||
2957 | void | |
104c1213 JM |
2958 | set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch, |
2959 | int use_generic_dummy_frames) | |
0f71a2f6 JM |
2960 | { |
2961 | gdbarch->use_generic_dummy_frames = use_generic_dummy_frames; | |
2962 | } | |
2963 | ||
2964 | int | |
104c1213 | 2965 | gdbarch_call_dummy_location (struct gdbarch *gdbarch) |
0f71a2f6 JM |
2966 | { |
2967 | if (gdbarch->call_dummy_location == 0) | |
8e65ff28 AC |
2968 | internal_error (__FILE__, __LINE__, |
2969 | "gdbarch: gdbarch_call_dummy_location invalid"); | |
0f71a2f6 | 2970 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2971 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n"); |
2972 | return gdbarch->call_dummy_location; | |
2973 | } | |
2974 | ||
2975 | void | |
104c1213 JM |
2976 | set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, |
2977 | int call_dummy_location) | |
0f71a2f6 JM |
2978 | { |
2979 | gdbarch->call_dummy_location = call_dummy_location; | |
2980 | } | |
2981 | ||
2982 | CORE_ADDR | |
2983 | gdbarch_call_dummy_address (struct gdbarch *gdbarch) | |
2984 | { | |
2985 | if (gdbarch->call_dummy_address == 0) | |
8e65ff28 AC |
2986 | internal_error (__FILE__, __LINE__, |
2987 | "gdbarch: gdbarch_call_dummy_address invalid"); | |
0f71a2f6 | 2988 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
2989 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n"); |
2990 | return gdbarch->call_dummy_address (); | |
2991 | } | |
2992 | ||
2993 | void | |
104c1213 JM |
2994 | set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, |
2995 | gdbarch_call_dummy_address_ftype call_dummy_address) | |
0f71a2f6 JM |
2996 | { |
2997 | gdbarch->call_dummy_address = call_dummy_address; | |
2998 | } | |
2999 | ||
3000 | CORE_ADDR | |
104c1213 | 3001 | gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3002 | { |
3003 | if (gdbarch->call_dummy_start_offset == -1) | |
8e65ff28 AC |
3004 | internal_error (__FILE__, __LINE__, |
3005 | "gdbarch: gdbarch_call_dummy_start_offset invalid"); | |
0f71a2f6 | 3006 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3007 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n"); |
3008 | return gdbarch->call_dummy_start_offset; | |
3009 | } | |
3010 | ||
3011 | void | |
104c1213 JM |
3012 | set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, |
3013 | CORE_ADDR call_dummy_start_offset) | |
0f71a2f6 JM |
3014 | { |
3015 | gdbarch->call_dummy_start_offset = call_dummy_start_offset; | |
3016 | } | |
3017 | ||
3018 | CORE_ADDR | |
104c1213 | 3019 | gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) |
0f71a2f6 | 3020 | { |
83e6b173 | 3021 | if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1) |
8e65ff28 AC |
3022 | internal_error (__FILE__, __LINE__, |
3023 | "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid"); | |
0f71a2f6 | 3024 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3025 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n"); |
3026 | return gdbarch->call_dummy_breakpoint_offset; | |
3027 | } | |
3028 | ||
3029 | void | |
104c1213 JM |
3030 | set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, |
3031 | CORE_ADDR call_dummy_breakpoint_offset) | |
0f71a2f6 JM |
3032 | { |
3033 | gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset; | |
3034 | } | |
3035 | ||
3036 | int | |
104c1213 | 3037 | gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3038 | { |
3039 | if (gdbarch->call_dummy_breakpoint_offset_p == -1) | |
8e65ff28 AC |
3040 | internal_error (__FILE__, __LINE__, |
3041 | "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid"); | |
0f71a2f6 | 3042 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3043 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n"); |
3044 | return gdbarch->call_dummy_breakpoint_offset_p; | |
3045 | } | |
3046 | ||
3047 | void | |
104c1213 JM |
3048 | set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch, |
3049 | int call_dummy_breakpoint_offset_p) | |
0f71a2f6 JM |
3050 | { |
3051 | gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p; | |
3052 | } | |
3053 | ||
3054 | int | |
104c1213 | 3055 | gdbarch_call_dummy_length (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3056 | { |
3057 | if (gdbarch->call_dummy_length == -1) | |
8e65ff28 AC |
3058 | internal_error (__FILE__, __LINE__, |
3059 | "gdbarch: gdbarch_call_dummy_length invalid"); | |
0f71a2f6 | 3060 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3061 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n"); |
3062 | return gdbarch->call_dummy_length; | |
3063 | } | |
3064 | ||
3065 | void | |
104c1213 JM |
3066 | set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, |
3067 | int call_dummy_length) | |
0f71a2f6 JM |
3068 | { |
3069 | gdbarch->call_dummy_length = call_dummy_length; | |
3070 | } | |
3071 | ||
3072 | int | |
3073 | gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address) | |
3074 | { | |
3075 | if (gdbarch->pc_in_call_dummy == 0) | |
8e65ff28 AC |
3076 | internal_error (__FILE__, __LINE__, |
3077 | "gdbarch: gdbarch_pc_in_call_dummy invalid"); | |
0f71a2f6 | 3078 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3079 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n"); |
3080 | return gdbarch->pc_in_call_dummy (pc, sp, frame_address); | |
3081 | } | |
3082 | ||
3083 | void | |
104c1213 JM |
3084 | set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, |
3085 | gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy) | |
0f71a2f6 JM |
3086 | { |
3087 | gdbarch->pc_in_call_dummy = pc_in_call_dummy; | |
3088 | } | |
3089 | ||
3090 | int | |
104c1213 | 3091 | gdbarch_call_dummy_p (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3092 | { |
3093 | if (gdbarch->call_dummy_p == -1) | |
8e65ff28 AC |
3094 | internal_error (__FILE__, __LINE__, |
3095 | "gdbarch: gdbarch_call_dummy_p invalid"); | |
0f71a2f6 | 3096 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3097 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n"); |
3098 | return gdbarch->call_dummy_p; | |
3099 | } | |
3100 | ||
3101 | void | |
104c1213 JM |
3102 | set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, |
3103 | int call_dummy_p) | |
0f71a2f6 JM |
3104 | { |
3105 | gdbarch->call_dummy_p = call_dummy_p; | |
3106 | } | |
3107 | ||
3108 | LONGEST * | |
104c1213 | 3109 | gdbarch_call_dummy_words (struct gdbarch *gdbarch) |
0f71a2f6 | 3110 | { |
c0e8c252 | 3111 | /* Skip verify of call_dummy_words, invalid_p == 0 */ |
0f71a2f6 | 3112 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3113 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n"); |
3114 | return gdbarch->call_dummy_words; | |
3115 | } | |
3116 | ||
3117 | void | |
104c1213 JM |
3118 | set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, |
3119 | LONGEST * call_dummy_words) | |
0f71a2f6 JM |
3120 | { |
3121 | gdbarch->call_dummy_words = call_dummy_words; | |
3122 | } | |
3123 | ||
3124 | int | |
104c1213 | 3125 | gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch) |
0f71a2f6 | 3126 | { |
c0e8c252 | 3127 | /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ |
0f71a2f6 | 3128 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3129 | fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n"); |
3130 | return gdbarch->sizeof_call_dummy_words; | |
3131 | } | |
3132 | ||
3133 | void | |
104c1213 JM |
3134 | set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, |
3135 | int sizeof_call_dummy_words) | |
0f71a2f6 JM |
3136 | { |
3137 | gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words; | |
3138 | } | |
3139 | ||
3140 | int | |
104c1213 | 3141 | gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3142 | { |
3143 | if (gdbarch->call_dummy_stack_adjust_p == -1) | |
8e65ff28 AC |
3144 | internal_error (__FILE__, __LINE__, |
3145 | "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid"); | |
0f71a2f6 | 3146 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3147 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n"); |
3148 | return gdbarch->call_dummy_stack_adjust_p; | |
3149 | } | |
3150 | ||
3151 | void | |
104c1213 JM |
3152 | set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch, |
3153 | int call_dummy_stack_adjust_p) | |
0f71a2f6 JM |
3154 | { |
3155 | gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p; | |
3156 | } | |
3157 | ||
3158 | int | |
104c1213 | 3159 | gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3160 | { |
3161 | if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0) | |
8e65ff28 AC |
3162 | internal_error (__FILE__, __LINE__, |
3163 | "gdbarch: gdbarch_call_dummy_stack_adjust invalid"); | |
0f71a2f6 | 3164 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3165 | fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n"); |
3166 | return gdbarch->call_dummy_stack_adjust; | |
3167 | } | |
3168 | ||
3169 | void | |
104c1213 JM |
3170 | set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch, |
3171 | int call_dummy_stack_adjust) | |
0f71a2f6 JM |
3172 | { |
3173 | gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust; | |
3174 | } | |
3175 | ||
3176 | void | |
3177 | 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) | |
3178 | { | |
3179 | if (gdbarch->fix_call_dummy == 0) | |
8e65ff28 AC |
3180 | internal_error (__FILE__, __LINE__, |
3181 | "gdbarch: gdbarch_fix_call_dummy invalid"); | |
0f71a2f6 | 3182 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3183 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n"); |
3184 | gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p); | |
3185 | } | |
3186 | ||
3187 | void | |
104c1213 JM |
3188 | set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, |
3189 | gdbarch_fix_call_dummy_ftype fix_call_dummy) | |
0f71a2f6 JM |
3190 | { |
3191 | gdbarch->fix_call_dummy = fix_call_dummy; | |
3192 | } | |
3193 | ||
10312cc4 AC |
3194 | void |
3195 | gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) | |
3196 | { | |
3197 | if (gdbarch->init_frame_pc_first == 0) | |
3198 | internal_error (__FILE__, __LINE__, | |
3199 | "gdbarch: gdbarch_init_frame_pc_first invalid"); | |
3200 | if (gdbarch_debug >= 2) | |
3201 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n"); | |
3202 | gdbarch->init_frame_pc_first (fromleaf, prev); | |
3203 | } | |
3204 | ||
3205 | void | |
3206 | set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, | |
3207 | gdbarch_init_frame_pc_first_ftype init_frame_pc_first) | |
3208 | { | |
3209 | gdbarch->init_frame_pc_first = init_frame_pc_first; | |
3210 | } | |
3211 | ||
3212 | void | |
3213 | gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev) | |
3214 | { | |
3215 | if (gdbarch->init_frame_pc == 0) | |
3216 | internal_error (__FILE__, __LINE__, | |
3217 | "gdbarch: gdbarch_init_frame_pc invalid"); | |
3218 | if (gdbarch_debug >= 2) | |
3219 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n"); | |
3220 | gdbarch->init_frame_pc (fromleaf, prev); | |
3221 | } | |
3222 | ||
3223 | void | |
3224 | set_gdbarch_init_frame_pc (struct gdbarch *gdbarch, | |
3225 | gdbarch_init_frame_pc_ftype init_frame_pc) | |
3226 | { | |
3227 | gdbarch->init_frame_pc = init_frame_pc; | |
3228 | } | |
3229 | ||
0f71a2f6 | 3230 | int |
104c1213 | 3231 | gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3232 | { |
3233 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
3234 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n"); |
3235 | return gdbarch->believe_pcc_promotion; | |
3236 | } | |
3237 | ||
3238 | void | |
104c1213 JM |
3239 | set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch, |
3240 | int believe_pcc_promotion) | |
0f71a2f6 JM |
3241 | { |
3242 | gdbarch->believe_pcc_promotion = believe_pcc_promotion; | |
3243 | } | |
3244 | ||
3245 | int | |
104c1213 | 3246 | gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3247 | { |
3248 | if (gdbarch_debug >= 2) | |
0f71a2f6 JM |
3249 | fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n"); |
3250 | return gdbarch->believe_pcc_promotion_type; | |
3251 | } | |
3252 | ||
3253 | void | |
104c1213 JM |
3254 | set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch, |
3255 | int believe_pcc_promotion_type) | |
0f71a2f6 JM |
3256 | { |
3257 | gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type; | |
3258 | } | |
3259 | ||
b9a8e3bf JB |
3260 | int |
3261 | gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual) | |
3262 | { | |
3263 | if (gdbarch->coerce_float_to_double == 0) | |
8e65ff28 AC |
3264 | internal_error (__FILE__, __LINE__, |
3265 | "gdbarch: gdbarch_coerce_float_to_double invalid"); | |
b9a8e3bf | 3266 | if (gdbarch_debug >= 2) |
b9a8e3bf JB |
3267 | fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n"); |
3268 | return gdbarch->coerce_float_to_double (formal, actual); | |
3269 | } | |
3270 | ||
3271 | void | |
3272 | set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, | |
3273 | gdbarch_coerce_float_to_double_ftype coerce_float_to_double) | |
3274 | { | |
3275 | gdbarch->coerce_float_to_double = coerce_float_to_double; | |
3276 | } | |
3277 | ||
0f71a2f6 | 3278 | void |
adf40b2e | 3279 | gdbarch_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 JM |
3280 | { |
3281 | if (gdbarch->get_saved_register == 0) | |
8e65ff28 AC |
3282 | internal_error (__FILE__, __LINE__, |
3283 | "gdbarch: gdbarch_get_saved_register invalid"); | |
0f71a2f6 | 3284 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3285 | fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n"); |
3286 | gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval); | |
3287 | } | |
3288 | ||
3289 | void | |
104c1213 JM |
3290 | set_gdbarch_get_saved_register (struct gdbarch *gdbarch, |
3291 | gdbarch_get_saved_register_ftype get_saved_register) | |
0f71a2f6 JM |
3292 | { |
3293 | gdbarch->get_saved_register = get_saved_register; | |
3294 | } | |
3295 | ||
3296 | int | |
3297 | gdbarch_register_convertible (struct gdbarch *gdbarch, int nr) | |
3298 | { | |
3299 | if (gdbarch->register_convertible == 0) | |
8e65ff28 AC |
3300 | internal_error (__FILE__, __LINE__, |
3301 | "gdbarch: gdbarch_register_convertible invalid"); | |
0f71a2f6 | 3302 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3303 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n"); |
3304 | return gdbarch->register_convertible (nr); | |
3305 | } | |
3306 | ||
3307 | void | |
104c1213 JM |
3308 | set_gdbarch_register_convertible (struct gdbarch *gdbarch, |
3309 | gdbarch_register_convertible_ftype register_convertible) | |
0f71a2f6 JM |
3310 | { |
3311 | gdbarch->register_convertible = register_convertible; | |
3312 | } | |
3313 | ||
3314 | void | |
3315 | gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to) | |
3316 | { | |
3317 | if (gdbarch->register_convert_to_virtual == 0) | |
8e65ff28 AC |
3318 | internal_error (__FILE__, __LINE__, |
3319 | "gdbarch: gdbarch_register_convert_to_virtual invalid"); | |
0f71a2f6 | 3320 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3321 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n"); |
3322 | gdbarch->register_convert_to_virtual (regnum, type, from, to); | |
3323 | } | |
3324 | ||
3325 | void | |
104c1213 JM |
3326 | set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, |
3327 | gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual) | |
0f71a2f6 JM |
3328 | { |
3329 | gdbarch->register_convert_to_virtual = register_convert_to_virtual; | |
3330 | } | |
3331 | ||
3332 | void | |
3333 | gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to) | |
3334 | { | |
3335 | if (gdbarch->register_convert_to_raw == 0) | |
8e65ff28 AC |
3336 | internal_error (__FILE__, __LINE__, |
3337 | "gdbarch: gdbarch_register_convert_to_raw invalid"); | |
0f71a2f6 | 3338 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3339 | fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n"); |
3340 | gdbarch->register_convert_to_raw (type, regnum, from, to); | |
3341 | } | |
3342 | ||
3343 | void | |
104c1213 JM |
3344 | set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, |
3345 | gdbarch_register_convert_to_raw_ftype register_convert_to_raw) | |
0f71a2f6 JM |
3346 | { |
3347 | gdbarch->register_convert_to_raw = register_convert_to_raw; | |
3348 | } | |
3349 | ||
31e9866e AC |
3350 | int |
3351 | gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch) | |
3352 | { | |
3353 | return gdbarch->fetch_pseudo_register != 0; | |
3354 | } | |
3355 | ||
7f1b2585 EZ |
3356 | void |
3357 | gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum) | |
3358 | { | |
3359 | if (gdbarch->fetch_pseudo_register == 0) | |
8e65ff28 AC |
3360 | internal_error (__FILE__, __LINE__, |
3361 | "gdbarch: gdbarch_fetch_pseudo_register invalid"); | |
7f1b2585 EZ |
3362 | if (gdbarch_debug >= 2) |
3363 | fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n"); | |
3364 | gdbarch->fetch_pseudo_register (regnum); | |
3365 | } | |
3366 | ||
3367 | void | |
3368 | set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, | |
3369 | gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register) | |
3370 | { | |
3371 | gdbarch->fetch_pseudo_register = fetch_pseudo_register; | |
3372 | } | |
3373 | ||
31e9866e AC |
3374 | int |
3375 | gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch) | |
3376 | { | |
3377 | return gdbarch->store_pseudo_register != 0; | |
3378 | } | |
3379 | ||
7f1b2585 EZ |
3380 | void |
3381 | gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum) | |
3382 | { | |
3383 | if (gdbarch->store_pseudo_register == 0) | |
8e65ff28 AC |
3384 | internal_error (__FILE__, __LINE__, |
3385 | "gdbarch: gdbarch_store_pseudo_register invalid"); | |
7f1b2585 EZ |
3386 | if (gdbarch_debug >= 2) |
3387 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n"); | |
3388 | gdbarch->store_pseudo_register (regnum); | |
3389 | } | |
3390 | ||
3391 | void | |
3392 | set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch, | |
3393 | gdbarch_store_pseudo_register_ftype store_pseudo_register) | |
3394 | { | |
3395 | gdbarch->store_pseudo_register = store_pseudo_register; | |
3396 | } | |
3397 | ||
4478b372 | 3398 | CORE_ADDR |
ac2e2ef7 | 3399 | gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) |
4478b372 JB |
3400 | { |
3401 | if (gdbarch->pointer_to_address == 0) | |
8e65ff28 AC |
3402 | internal_error (__FILE__, __LINE__, |
3403 | "gdbarch: gdbarch_pointer_to_address invalid"); | |
4478b372 JB |
3404 | if (gdbarch_debug >= 2) |
3405 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n"); | |
3406 | return gdbarch->pointer_to_address (type, buf); | |
3407 | } | |
3408 | ||
3409 | void | |
3410 | set_gdbarch_pointer_to_address (struct gdbarch *gdbarch, | |
3411 | gdbarch_pointer_to_address_ftype pointer_to_address) | |
3412 | { | |
3413 | gdbarch->pointer_to_address = pointer_to_address; | |
3414 | } | |
3415 | ||
3416 | void | |
ac2e2ef7 | 3417 | gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr) |
4478b372 JB |
3418 | { |
3419 | if (gdbarch->address_to_pointer == 0) | |
8e65ff28 AC |
3420 | internal_error (__FILE__, __LINE__, |
3421 | "gdbarch: gdbarch_address_to_pointer invalid"); | |
4478b372 JB |
3422 | if (gdbarch_debug >= 2) |
3423 | fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n"); | |
3424 | gdbarch->address_to_pointer (type, buf, addr); | |
3425 | } | |
3426 | ||
3427 | void | |
3428 | set_gdbarch_address_to_pointer (struct gdbarch *gdbarch, | |
3429 | gdbarch_address_to_pointer_ftype address_to_pointer) | |
3430 | { | |
3431 | gdbarch->address_to_pointer = address_to_pointer; | |
3432 | } | |
3433 | ||
fc0c74b1 AC |
3434 | int |
3435 | gdbarch_integer_to_address_p (struct gdbarch *gdbarch) | |
3436 | { | |
3437 | return gdbarch->integer_to_address != 0; | |
3438 | } | |
3439 | ||
3440 | CORE_ADDR | |
3441 | gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf) | |
3442 | { | |
3443 | if (gdbarch->integer_to_address == 0) | |
3444 | internal_error (__FILE__, __LINE__, | |
3445 | "gdbarch: gdbarch_integer_to_address invalid"); | |
3446 | if (gdbarch_debug >= 2) | |
3447 | fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n"); | |
3448 | return gdbarch->integer_to_address (type, buf); | |
3449 | } | |
3450 | ||
3451 | void | |
3452 | set_gdbarch_integer_to_address (struct gdbarch *gdbarch, | |
3453 | gdbarch_integer_to_address_ftype integer_to_address) | |
3454 | { | |
3455 | gdbarch->integer_to_address = integer_to_address; | |
3456 | } | |
3457 | ||
71a9f22e JB |
3458 | int |
3459 | gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type) | |
3460 | { | |
71a9f22e | 3461 | if (gdbarch->return_value_on_stack == 0) |
8e65ff28 AC |
3462 | internal_error (__FILE__, __LINE__, |
3463 | "gdbarch: gdbarch_return_value_on_stack invalid"); | |
71a9f22e JB |
3464 | if (gdbarch_debug >= 2) |
3465 | fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n"); | |
3466 | return gdbarch->return_value_on_stack (type); | |
3467 | } | |
3468 | ||
3469 | void | |
3470 | set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch, | |
3471 | gdbarch_return_value_on_stack_ftype return_value_on_stack) | |
3472 | { | |
3473 | gdbarch->return_value_on_stack = return_value_on_stack; | |
3474 | } | |
3475 | ||
0f71a2f6 JM |
3476 | void |
3477 | gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf) | |
3478 | { | |
3479 | if (gdbarch->extract_return_value == 0) | |
8e65ff28 AC |
3480 | internal_error (__FILE__, __LINE__, |
3481 | "gdbarch: gdbarch_extract_return_value invalid"); | |
0f71a2f6 | 3482 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3483 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n"); |
3484 | gdbarch->extract_return_value (type, regbuf, valbuf); | |
3485 | } | |
3486 | ||
3487 | void | |
104c1213 JM |
3488 | set_gdbarch_extract_return_value (struct gdbarch *gdbarch, |
3489 | gdbarch_extract_return_value_ftype extract_return_value) | |
0f71a2f6 JM |
3490 | { |
3491 | gdbarch->extract_return_value = extract_return_value; | |
3492 | } | |
3493 | ||
3494 | CORE_ADDR | |
3495 | gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr) | |
3496 | { | |
3497 | if (gdbarch->push_arguments == 0) | |
8e65ff28 AC |
3498 | internal_error (__FILE__, __LINE__, |
3499 | "gdbarch: gdbarch_push_arguments invalid"); | |
0f71a2f6 | 3500 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3501 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n"); |
3502 | return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr); | |
3503 | } | |
3504 | ||
3505 | void | |
104c1213 JM |
3506 | set_gdbarch_push_arguments (struct gdbarch *gdbarch, |
3507 | gdbarch_push_arguments_ftype push_arguments) | |
0f71a2f6 JM |
3508 | { |
3509 | gdbarch->push_arguments = push_arguments; | |
3510 | } | |
3511 | ||
3512 | void | |
3513 | gdbarch_push_dummy_frame (struct gdbarch *gdbarch) | |
3514 | { | |
3515 | if (gdbarch->push_dummy_frame == 0) | |
8e65ff28 AC |
3516 | internal_error (__FILE__, __LINE__, |
3517 | "gdbarch: gdbarch_push_dummy_frame invalid"); | |
0f71a2f6 | 3518 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3519 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n"); |
3520 | gdbarch->push_dummy_frame (); | |
3521 | } | |
3522 | ||
3523 | void | |
104c1213 JM |
3524 | set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch, |
3525 | gdbarch_push_dummy_frame_ftype push_dummy_frame) | |
0f71a2f6 JM |
3526 | { |
3527 | gdbarch->push_dummy_frame = push_dummy_frame; | |
3528 | } | |
3529 | ||
69a0d5f4 AC |
3530 | int |
3531 | gdbarch_push_return_address_p (struct gdbarch *gdbarch) | |
3532 | { | |
3533 | return gdbarch->push_return_address != 0; | |
3534 | } | |
3535 | ||
0f71a2f6 JM |
3536 | CORE_ADDR |
3537 | gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp) | |
3538 | { | |
3539 | if (gdbarch->push_return_address == 0) | |
8e65ff28 AC |
3540 | internal_error (__FILE__, __LINE__, |
3541 | "gdbarch: gdbarch_push_return_address invalid"); | |
0f71a2f6 | 3542 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3543 | fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n"); |
3544 | return gdbarch->push_return_address (pc, sp); | |
3545 | } | |
3546 | ||
3547 | void | |
104c1213 JM |
3548 | set_gdbarch_push_return_address (struct gdbarch *gdbarch, |
3549 | gdbarch_push_return_address_ftype push_return_address) | |
0f71a2f6 JM |
3550 | { |
3551 | gdbarch->push_return_address = push_return_address; | |
3552 | } | |
3553 | ||
3554 | void | |
3555 | gdbarch_pop_frame (struct gdbarch *gdbarch) | |
3556 | { | |
3557 | if (gdbarch->pop_frame == 0) | |
8e65ff28 AC |
3558 | internal_error (__FILE__, __LINE__, |
3559 | "gdbarch: gdbarch_pop_frame invalid"); | |
0f71a2f6 | 3560 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3561 | fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n"); |
3562 | gdbarch->pop_frame (); | |
3563 | } | |
3564 | ||
3565 | void | |
104c1213 JM |
3566 | set_gdbarch_pop_frame (struct gdbarch *gdbarch, |
3567 | gdbarch_pop_frame_ftype pop_frame) | |
0f71a2f6 JM |
3568 | { |
3569 | gdbarch->pop_frame = pop_frame; | |
3570 | } | |
3571 | ||
0f71a2f6 JM |
3572 | void |
3573 | gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp) | |
3574 | { | |
3575 | if (gdbarch->store_struct_return == 0) | |
8e65ff28 AC |
3576 | internal_error (__FILE__, __LINE__, |
3577 | "gdbarch: gdbarch_store_struct_return invalid"); | |
0f71a2f6 | 3578 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3579 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n"); |
3580 | gdbarch->store_struct_return (addr, sp); | |
3581 | } | |
3582 | ||
3583 | void | |
104c1213 JM |
3584 | set_gdbarch_store_struct_return (struct gdbarch *gdbarch, |
3585 | gdbarch_store_struct_return_ftype store_struct_return) | |
0f71a2f6 JM |
3586 | { |
3587 | gdbarch->store_struct_return = store_struct_return; | |
3588 | } | |
3589 | ||
3590 | void | |
3591 | gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf) | |
3592 | { | |
3593 | if (gdbarch->store_return_value == 0) | |
8e65ff28 AC |
3594 | internal_error (__FILE__, __LINE__, |
3595 | "gdbarch: gdbarch_store_return_value invalid"); | |
0f71a2f6 | 3596 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3597 | fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n"); |
3598 | gdbarch->store_return_value (type, valbuf); | |
3599 | } | |
3600 | ||
3601 | void | |
104c1213 JM |
3602 | set_gdbarch_store_return_value (struct gdbarch *gdbarch, |
3603 | gdbarch_store_return_value_ftype store_return_value) | |
0f71a2f6 JM |
3604 | { |
3605 | gdbarch->store_return_value = store_return_value; | |
3606 | } | |
3607 | ||
d6dd581e AC |
3608 | int |
3609 | gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch) | |
3610 | { | |
3611 | return gdbarch->extract_struct_value_address != 0; | |
3612 | } | |
3613 | ||
0f71a2f6 JM |
3614 | CORE_ADDR |
3615 | gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf) | |
3616 | { | |
3617 | if (gdbarch->extract_struct_value_address == 0) | |
8e65ff28 AC |
3618 | internal_error (__FILE__, __LINE__, |
3619 | "gdbarch: gdbarch_extract_struct_value_address invalid"); | |
0f71a2f6 | 3620 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3621 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n"); |
3622 | return gdbarch->extract_struct_value_address (regbuf); | |
3623 | } | |
3624 | ||
3625 | void | |
104c1213 JM |
3626 | set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, |
3627 | gdbarch_extract_struct_value_address_ftype extract_struct_value_address) | |
0f71a2f6 JM |
3628 | { |
3629 | gdbarch->extract_struct_value_address = extract_struct_value_address; | |
3630 | } | |
3631 | ||
3632 | int | |
3633 | gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type) | |
3634 | { | |
3635 | if (gdbarch->use_struct_convention == 0) | |
8e65ff28 AC |
3636 | internal_error (__FILE__, __LINE__, |
3637 | "gdbarch: gdbarch_use_struct_convention invalid"); | |
0f71a2f6 | 3638 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3639 | fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n"); |
3640 | return gdbarch->use_struct_convention (gcc_p, value_type); | |
3641 | } | |
3642 | ||
3643 | void | |
104c1213 JM |
3644 | set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, |
3645 | gdbarch_use_struct_convention_ftype use_struct_convention) | |
0f71a2f6 JM |
3646 | { |
3647 | gdbarch->use_struct_convention = use_struct_convention; | |
3648 | } | |
3649 | ||
3650 | void | |
3651 | gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame) | |
3652 | { | |
3653 | if (gdbarch->frame_init_saved_regs == 0) | |
8e65ff28 AC |
3654 | internal_error (__FILE__, __LINE__, |
3655 | "gdbarch: gdbarch_frame_init_saved_regs invalid"); | |
0f71a2f6 | 3656 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3657 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n"); |
3658 | gdbarch->frame_init_saved_regs (frame); | |
3659 | } | |
3660 | ||
3661 | void | |
104c1213 JM |
3662 | set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, |
3663 | gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs) | |
0f71a2f6 JM |
3664 | { |
3665 | gdbarch->frame_init_saved_regs = frame_init_saved_regs; | |
3666 | } | |
3667 | ||
5fdff426 AC |
3668 | int |
3669 | gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch) | |
3670 | { | |
3671 | return gdbarch->init_extra_frame_info != 0; | |
3672 | } | |
3673 | ||
0f71a2f6 JM |
3674 | void |
3675 | gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame) | |
3676 | { | |
3677 | if (gdbarch->init_extra_frame_info == 0) | |
8e65ff28 AC |
3678 | internal_error (__FILE__, __LINE__, |
3679 | "gdbarch: gdbarch_init_extra_frame_info invalid"); | |
0f71a2f6 | 3680 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3681 | fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n"); |
3682 | gdbarch->init_extra_frame_info (fromleaf, frame); | |
3683 | } | |
3684 | ||
3685 | void | |
104c1213 JM |
3686 | set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, |
3687 | gdbarch_init_extra_frame_info_ftype init_extra_frame_info) | |
0f71a2f6 JM |
3688 | { |
3689 | gdbarch->init_extra_frame_info = init_extra_frame_info; | |
3690 | } | |
3691 | ||
3692 | CORE_ADDR | |
3693 | gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip) | |
3694 | { | |
3695 | if (gdbarch->skip_prologue == 0) | |
8e65ff28 AC |
3696 | internal_error (__FILE__, __LINE__, |
3697 | "gdbarch: gdbarch_skip_prologue invalid"); | |
0f71a2f6 | 3698 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3699 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n"); |
3700 | return gdbarch->skip_prologue (ip); | |
3701 | } | |
3702 | ||
3703 | void | |
104c1213 JM |
3704 | set_gdbarch_skip_prologue (struct gdbarch *gdbarch, |
3705 | gdbarch_skip_prologue_ftype skip_prologue) | |
0f71a2f6 JM |
3706 | { |
3707 | gdbarch->skip_prologue = skip_prologue; | |
3708 | } | |
3709 | ||
dad41f9a AC |
3710 | int |
3711 | gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip) | |
3712 | { | |
dad41f9a | 3713 | if (gdbarch->prologue_frameless_p == 0) |
8e65ff28 AC |
3714 | internal_error (__FILE__, __LINE__, |
3715 | "gdbarch: gdbarch_prologue_frameless_p invalid"); | |
dad41f9a AC |
3716 | if (gdbarch_debug >= 2) |
3717 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n"); | |
3718 | return gdbarch->prologue_frameless_p (ip); | |
3719 | } | |
3720 | ||
3721 | void | |
3722 | set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, | |
3723 | gdbarch_prologue_frameless_p_ftype prologue_frameless_p) | |
3724 | { | |
3725 | gdbarch->prologue_frameless_p = prologue_frameless_p; | |
3726 | } | |
3727 | ||
0f71a2f6 JM |
3728 | int |
3729 | gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs) | |
3730 | { | |
3731 | if (gdbarch->inner_than == 0) | |
8e65ff28 AC |
3732 | internal_error (__FILE__, __LINE__, |
3733 | "gdbarch: gdbarch_inner_than invalid"); | |
0f71a2f6 | 3734 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3735 | fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n"); |
3736 | return gdbarch->inner_than (lhs, rhs); | |
3737 | } | |
3738 | ||
3739 | void | |
104c1213 JM |
3740 | set_gdbarch_inner_than (struct gdbarch *gdbarch, |
3741 | gdbarch_inner_than_ftype inner_than) | |
0f71a2f6 JM |
3742 | { |
3743 | gdbarch->inner_than = inner_than; | |
3744 | } | |
3745 | ||
3746 | unsigned char * | |
adf40b2e | 3747 | gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr) |
0f71a2f6 JM |
3748 | { |
3749 | if (gdbarch->breakpoint_from_pc == 0) | |
8e65ff28 AC |
3750 | internal_error (__FILE__, __LINE__, |
3751 | "gdbarch: gdbarch_breakpoint_from_pc invalid"); | |
0f71a2f6 | 3752 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3753 | fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n"); |
3754 | return gdbarch->breakpoint_from_pc (pcptr, lenptr); | |
3755 | } | |
3756 | ||
3757 | void | |
104c1213 JM |
3758 | set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, |
3759 | gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc) | |
0f71a2f6 JM |
3760 | { |
3761 | gdbarch->breakpoint_from_pc = breakpoint_from_pc; | |
3762 | } | |
3763 | ||
917317f4 JM |
3764 | int |
3765 | gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
3766 | { | |
3767 | if (gdbarch->memory_insert_breakpoint == 0) | |
8e65ff28 AC |
3768 | internal_error (__FILE__, __LINE__, |
3769 | "gdbarch: gdbarch_memory_insert_breakpoint invalid"); | |
917317f4 | 3770 | if (gdbarch_debug >= 2) |
917317f4 JM |
3771 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n"); |
3772 | return gdbarch->memory_insert_breakpoint (addr, contents_cache); | |
3773 | } | |
3774 | ||
3775 | void | |
3776 | set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, | |
3777 | gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint) | |
3778 | { | |
3779 | gdbarch->memory_insert_breakpoint = memory_insert_breakpoint; | |
3780 | } | |
3781 | ||
3782 | int | |
3783 | gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache) | |
3784 | { | |
3785 | if (gdbarch->memory_remove_breakpoint == 0) | |
8e65ff28 AC |
3786 | internal_error (__FILE__, __LINE__, |
3787 | "gdbarch: gdbarch_memory_remove_breakpoint invalid"); | |
917317f4 | 3788 | if (gdbarch_debug >= 2) |
917317f4 JM |
3789 | fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n"); |
3790 | return gdbarch->memory_remove_breakpoint (addr, contents_cache); | |
3791 | } | |
3792 | ||
3793 | void | |
3794 | set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, | |
3795 | gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint) | |
3796 | { | |
3797 | gdbarch->memory_remove_breakpoint = memory_remove_breakpoint; | |
3798 | } | |
3799 | ||
0f71a2f6 | 3800 | CORE_ADDR |
104c1213 | 3801 | gdbarch_decr_pc_after_break (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3802 | { |
3803 | if (gdbarch->decr_pc_after_break == -1) | |
8e65ff28 AC |
3804 | internal_error (__FILE__, __LINE__, |
3805 | "gdbarch: gdbarch_decr_pc_after_break invalid"); | |
0f71a2f6 | 3806 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3807 | fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n"); |
3808 | return gdbarch->decr_pc_after_break; | |
3809 | } | |
3810 | ||
3811 | void | |
104c1213 JM |
3812 | set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, |
3813 | CORE_ADDR decr_pc_after_break) | |
0f71a2f6 JM |
3814 | { |
3815 | gdbarch->decr_pc_after_break = decr_pc_after_break; | |
3816 | } | |
3817 | ||
e02bc4cc DS |
3818 | int |
3819 | gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it) | |
3820 | { | |
3821 | if (gdbarch->prepare_to_proceed == 0) | |
3822 | internal_error (__FILE__, __LINE__, | |
3823 | "gdbarch: gdbarch_prepare_to_proceed invalid"); | |
3824 | if (gdbarch_debug >= 2) | |
3825 | fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n"); | |
3826 | return gdbarch->prepare_to_proceed (select_it); | |
3827 | } | |
3828 | ||
3829 | void | |
3830 | set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, | |
3831 | gdbarch_prepare_to_proceed_ftype prepare_to_proceed) | |
3832 | { | |
3833 | gdbarch->prepare_to_proceed = prepare_to_proceed; | |
3834 | } | |
3835 | ||
0f71a2f6 | 3836 | CORE_ADDR |
104c1213 | 3837 | gdbarch_function_start_offset (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3838 | { |
3839 | if (gdbarch->function_start_offset == -1) | |
8e65ff28 AC |
3840 | internal_error (__FILE__, __LINE__, |
3841 | "gdbarch: gdbarch_function_start_offset invalid"); | |
0f71a2f6 | 3842 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3843 | fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n"); |
3844 | return gdbarch->function_start_offset; | |
3845 | } | |
3846 | ||
3847 | void | |
104c1213 JM |
3848 | set_gdbarch_function_start_offset (struct gdbarch *gdbarch, |
3849 | CORE_ADDR function_start_offset) | |
0f71a2f6 JM |
3850 | { |
3851 | gdbarch->function_start_offset = function_start_offset; | |
3852 | } | |
3853 | ||
3854 | void | |
adf40b2e | 3855 | gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len) |
0f71a2f6 JM |
3856 | { |
3857 | if (gdbarch->remote_translate_xfer_address == 0) | |
8e65ff28 AC |
3858 | internal_error (__FILE__, __LINE__, |
3859 | "gdbarch: gdbarch_remote_translate_xfer_address invalid"); | |
0f71a2f6 | 3860 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3861 | fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n"); |
3862 | gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len); | |
3863 | } | |
3864 | ||
3865 | void | |
104c1213 JM |
3866 | set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, |
3867 | gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address) | |
0f71a2f6 JM |
3868 | { |
3869 | gdbarch->remote_translate_xfer_address = remote_translate_xfer_address; | |
3870 | } | |
3871 | ||
3872 | CORE_ADDR | |
104c1213 | 3873 | gdbarch_frame_args_skip (struct gdbarch *gdbarch) |
0f71a2f6 JM |
3874 | { |
3875 | if (gdbarch->frame_args_skip == -1) | |
8e65ff28 AC |
3876 | internal_error (__FILE__, __LINE__, |
3877 | "gdbarch: gdbarch_frame_args_skip invalid"); | |
0f71a2f6 | 3878 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3879 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n"); |
3880 | return gdbarch->frame_args_skip; | |
3881 | } | |
3882 | ||
3883 | void | |
104c1213 JM |
3884 | set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, |
3885 | CORE_ADDR frame_args_skip) | |
0f71a2f6 JM |
3886 | { |
3887 | gdbarch->frame_args_skip = frame_args_skip; | |
3888 | } | |
3889 | ||
3890 | int | |
3891 | gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi) | |
3892 | { | |
3893 | if (gdbarch->frameless_function_invocation == 0) | |
8e65ff28 AC |
3894 | internal_error (__FILE__, __LINE__, |
3895 | "gdbarch: gdbarch_frameless_function_invocation invalid"); | |
0f71a2f6 | 3896 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3897 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n"); |
3898 | return gdbarch->frameless_function_invocation (fi); | |
3899 | } | |
3900 | ||
3901 | void | |
104c1213 JM |
3902 | set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, |
3903 | gdbarch_frameless_function_invocation_ftype frameless_function_invocation) | |
0f71a2f6 JM |
3904 | { |
3905 | gdbarch->frameless_function_invocation = frameless_function_invocation; | |
3906 | } | |
3907 | ||
3908 | CORE_ADDR | |
3909 | gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame) | |
3910 | { | |
3911 | if (gdbarch->frame_chain == 0) | |
8e65ff28 AC |
3912 | internal_error (__FILE__, __LINE__, |
3913 | "gdbarch: gdbarch_frame_chain invalid"); | |
0f71a2f6 | 3914 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3915 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n"); |
3916 | return gdbarch->frame_chain (frame); | |
3917 | } | |
3918 | ||
3919 | void | |
104c1213 JM |
3920 | set_gdbarch_frame_chain (struct gdbarch *gdbarch, |
3921 | gdbarch_frame_chain_ftype frame_chain) | |
0f71a2f6 JM |
3922 | { |
3923 | gdbarch->frame_chain = frame_chain; | |
3924 | } | |
3925 | ||
3926 | int | |
3927 | gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe) | |
3928 | { | |
3929 | if (gdbarch->frame_chain_valid == 0) | |
8e65ff28 AC |
3930 | internal_error (__FILE__, __LINE__, |
3931 | "gdbarch: gdbarch_frame_chain_valid invalid"); | |
0f71a2f6 | 3932 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3933 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n"); |
3934 | return gdbarch->frame_chain_valid (chain, thisframe); | |
3935 | } | |
3936 | ||
3937 | void | |
104c1213 JM |
3938 | set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, |
3939 | gdbarch_frame_chain_valid_ftype frame_chain_valid) | |
0f71a2f6 JM |
3940 | { |
3941 | gdbarch->frame_chain_valid = frame_chain_valid; | |
3942 | } | |
3943 | ||
3944 | CORE_ADDR | |
3945 | gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi) | |
3946 | { | |
3947 | if (gdbarch->frame_saved_pc == 0) | |
8e65ff28 AC |
3948 | internal_error (__FILE__, __LINE__, |
3949 | "gdbarch: gdbarch_frame_saved_pc invalid"); | |
0f71a2f6 | 3950 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3951 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n"); |
3952 | return gdbarch->frame_saved_pc (fi); | |
3953 | } | |
3954 | ||
3955 | void | |
104c1213 JM |
3956 | set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch, |
3957 | gdbarch_frame_saved_pc_ftype frame_saved_pc) | |
0f71a2f6 JM |
3958 | { |
3959 | gdbarch->frame_saved_pc = frame_saved_pc; | |
3960 | } | |
3961 | ||
3962 | CORE_ADDR | |
3963 | gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi) | |
3964 | { | |
3965 | if (gdbarch->frame_args_address == 0) | |
8e65ff28 AC |
3966 | internal_error (__FILE__, __LINE__, |
3967 | "gdbarch: gdbarch_frame_args_address invalid"); | |
0f71a2f6 | 3968 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3969 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n"); |
3970 | return gdbarch->frame_args_address (fi); | |
3971 | } | |
3972 | ||
3973 | void | |
104c1213 JM |
3974 | set_gdbarch_frame_args_address (struct gdbarch *gdbarch, |
3975 | gdbarch_frame_args_address_ftype frame_args_address) | |
0f71a2f6 JM |
3976 | { |
3977 | gdbarch->frame_args_address = frame_args_address; | |
3978 | } | |
3979 | ||
3980 | CORE_ADDR | |
3981 | gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi) | |
3982 | { | |
3983 | if (gdbarch->frame_locals_address == 0) | |
8e65ff28 AC |
3984 | internal_error (__FILE__, __LINE__, |
3985 | "gdbarch: gdbarch_frame_locals_address invalid"); | |
0f71a2f6 | 3986 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
3987 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n"); |
3988 | return gdbarch->frame_locals_address (fi); | |
3989 | } | |
3990 | ||
3991 | void | |
104c1213 JM |
3992 | set_gdbarch_frame_locals_address (struct gdbarch *gdbarch, |
3993 | gdbarch_frame_locals_address_ftype frame_locals_address) | |
0f71a2f6 JM |
3994 | { |
3995 | gdbarch->frame_locals_address = frame_locals_address; | |
3996 | } | |
3997 | ||
3998 | CORE_ADDR | |
3999 | gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame) | |
4000 | { | |
4001 | if (gdbarch->saved_pc_after_call == 0) | |
8e65ff28 AC |
4002 | internal_error (__FILE__, __LINE__, |
4003 | "gdbarch: gdbarch_saved_pc_after_call invalid"); | |
0f71a2f6 | 4004 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4005 | fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n"); |
4006 | return gdbarch->saved_pc_after_call (frame); | |
4007 | } | |
4008 | ||
4009 | void | |
104c1213 JM |
4010 | set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, |
4011 | gdbarch_saved_pc_after_call_ftype saved_pc_after_call) | |
0f71a2f6 JM |
4012 | { |
4013 | gdbarch->saved_pc_after_call = saved_pc_after_call; | |
4014 | } | |
4015 | ||
4016 | int | |
4017 | gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame) | |
4018 | { | |
4019 | if (gdbarch->frame_num_args == 0) | |
8e65ff28 AC |
4020 | internal_error (__FILE__, __LINE__, |
4021 | "gdbarch: gdbarch_frame_num_args invalid"); | |
0f71a2f6 | 4022 | if (gdbarch_debug >= 2) |
0f71a2f6 JM |
4023 | fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n"); |
4024 | return gdbarch->frame_num_args (frame); | |
4025 | } | |
4026 | ||
4027 | void | |
104c1213 JM |
4028 | set_gdbarch_frame_num_args (struct gdbarch *gdbarch, |
4029 | gdbarch_frame_num_args_ftype frame_num_args) | |
0f71a2f6 JM |
4030 | { |
4031 | gdbarch->frame_num_args = frame_num_args; | |
4032 | } | |
4033 | ||
2ada493a AC |
4034 | int |
4035 | gdbarch_stack_align_p (struct gdbarch *gdbarch) | |
4036 | { | |
4037 | return gdbarch->stack_align != 0; | |
4038 | } | |
4039 | ||
4040 | CORE_ADDR | |
4041 | gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp) | |
4042 | { | |
4043 | if (gdbarch->stack_align == 0) | |
8e65ff28 AC |
4044 | internal_error (__FILE__, __LINE__, |
4045 | "gdbarch: gdbarch_stack_align invalid"); | |
2ada493a AC |
4046 | if (gdbarch_debug >= 2) |
4047 | fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n"); | |
4048 | return gdbarch->stack_align (sp); | |
4049 | } | |
4050 | ||
4051 | void | |
4052 | set_gdbarch_stack_align (struct gdbarch *gdbarch, | |
4053 | gdbarch_stack_align_ftype stack_align) | |
4054 | { | |
4055 | gdbarch->stack_align = stack_align; | |
4056 | } | |
4057 | ||
1dd4193b AC |
4058 | int |
4059 | gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch) | |
4060 | { | |
4061 | /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ | |
4062 | if (gdbarch_debug >= 2) | |
4063 | fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n"); | |
4064 | return gdbarch->extra_stack_alignment_needed; | |
4065 | } | |
4066 | ||
4067 | void | |
4068 | set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch, | |
4069 | int extra_stack_alignment_needed) | |
4070 | { | |
4071 | gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed; | |
4072 | } | |
4073 | ||
d03e67c9 AC |
4074 | int |
4075 | gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch) | |
4076 | { | |
4077 | return gdbarch->reg_struct_has_addr != 0; | |
4078 | } | |
4079 | ||
4080 | int | |
4081 | gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type) | |
4082 | { | |
4083 | if (gdbarch->reg_struct_has_addr == 0) | |
8e65ff28 AC |
4084 | internal_error (__FILE__, __LINE__, |
4085 | "gdbarch: gdbarch_reg_struct_has_addr invalid"); | |
d03e67c9 AC |
4086 | if (gdbarch_debug >= 2) |
4087 | fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n"); | |
4088 | return gdbarch->reg_struct_has_addr (gcc_p, type); | |
4089 | } | |
4090 | ||
4091 | void | |
4092 | set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, | |
4093 | gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr) | |
4094 | { | |
4095 | gdbarch->reg_struct_has_addr = reg_struct_has_addr; | |
4096 | } | |
4097 | ||
d1e3cf49 AC |
4098 | int |
4099 | gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch) | |
4100 | { | |
4101 | return gdbarch->save_dummy_frame_tos != 0; | |
4102 | } | |
4103 | ||
4104 | void | |
4105 | gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp) | |
4106 | { | |
4107 | if (gdbarch->save_dummy_frame_tos == 0) | |
8e65ff28 AC |
4108 | internal_error (__FILE__, __LINE__, |
4109 | "gdbarch: gdbarch_save_dummy_frame_tos invalid"); | |
d1e3cf49 AC |
4110 | if (gdbarch_debug >= 2) |
4111 | fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n"); | |
4112 | gdbarch->save_dummy_frame_tos (sp); | |
4113 | } | |
4114 | ||
4115 | void | |
4116 | set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, | |
4117 | gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos) | |
4118 | { | |
4119 | gdbarch->save_dummy_frame_tos = save_dummy_frame_tos; | |
4120 | } | |
4121 | ||
58d5518e ND |
4122 | int |
4123 | gdbarch_parm_boundary (struct gdbarch *gdbarch) | |
4124 | { | |
4125 | if (gdbarch_debug >= 2) | |
4126 | fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n"); | |
4127 | return gdbarch->parm_boundary; | |
4128 | } | |
4129 | ||
4130 | void | |
4131 | set_gdbarch_parm_boundary (struct gdbarch *gdbarch, | |
4132 | int parm_boundary) | |
4133 | { | |
4134 | gdbarch->parm_boundary = parm_boundary; | |
4135 | } | |
4136 | ||
f0d4cc9e AC |
4137 | const struct floatformat * |
4138 | gdbarch_float_format (struct gdbarch *gdbarch) | |
4139 | { | |
4140 | if (gdbarch_debug >= 2) | |
4141 | fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n"); | |
4142 | return gdbarch->float_format; | |
4143 | } | |
4144 | ||
4145 | void | |
4146 | set_gdbarch_float_format (struct gdbarch *gdbarch, | |
4147 | const struct floatformat * float_format) | |
4148 | { | |
4149 | gdbarch->float_format = float_format; | |
4150 | } | |
4151 | ||
4152 | const struct floatformat * | |
4153 | gdbarch_double_format (struct gdbarch *gdbarch) | |
4154 | { | |
4155 | if (gdbarch_debug >= 2) | |
4156 | fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n"); | |
4157 | return gdbarch->double_format; | |
4158 | } | |
4159 | ||
4160 | void | |
4161 | set_gdbarch_double_format (struct gdbarch *gdbarch, | |
4162 | const struct floatformat * double_format) | |
4163 | { | |
4164 | gdbarch->double_format = double_format; | |
4165 | } | |
4166 | ||
4167 | const struct floatformat * | |
4168 | gdbarch_long_double_format (struct gdbarch *gdbarch) | |
4169 | { | |
4170 | if (gdbarch_debug >= 2) | |
4171 | fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n"); | |
4172 | return gdbarch->long_double_format; | |
4173 | } | |
4174 | ||
4175 | void | |
4176 | set_gdbarch_long_double_format (struct gdbarch *gdbarch, | |
4177 | const struct floatformat * long_double_format) | |
4178 | { | |
4179 | gdbarch->long_double_format = long_double_format; | |
4180 | } | |
4181 | ||
f517ea4e PS |
4182 | CORE_ADDR |
4183 | gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4184 | { | |
4185 | if (gdbarch->convert_from_func_ptr_addr == 0) | |
8e65ff28 AC |
4186 | internal_error (__FILE__, __LINE__, |
4187 | "gdbarch: gdbarch_convert_from_func_ptr_addr invalid"); | |
f517ea4e PS |
4188 | if (gdbarch_debug >= 2) |
4189 | fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n"); | |
4190 | return gdbarch->convert_from_func_ptr_addr (addr); | |
4191 | } | |
4192 | ||
4193 | void | |
4194 | set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, | |
4195 | gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr) | |
4196 | { | |
4197 | gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr; | |
4198 | } | |
4199 | ||
875e1767 AC |
4200 | CORE_ADDR |
4201 | gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4202 | { | |
4203 | if (gdbarch->addr_bits_remove == 0) | |
4204 | internal_error (__FILE__, __LINE__, | |
4205 | "gdbarch: gdbarch_addr_bits_remove invalid"); | |
4206 | if (gdbarch_debug >= 2) | |
4207 | fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n"); | |
4208 | return gdbarch->addr_bits_remove (addr); | |
4209 | } | |
4210 | ||
4211 | void | |
4212 | set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch, | |
4213 | gdbarch_addr_bits_remove_ftype addr_bits_remove) | |
4214 | { | |
4215 | gdbarch->addr_bits_remove = addr_bits_remove; | |
4216 | } | |
4217 | ||
64c4637f AC |
4218 | int |
4219 | gdbarch_software_single_step_p (struct gdbarch *gdbarch) | |
4220 | { | |
4221 | return gdbarch->software_single_step != 0; | |
4222 | } | |
4223 | ||
4224 | void | |
4225 | gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p) | |
4226 | { | |
4227 | if (gdbarch->software_single_step == 0) | |
4228 | internal_error (__FILE__, __LINE__, | |
4229 | "gdbarch: gdbarch_software_single_step invalid"); | |
4230 | if (gdbarch_debug >= 2) | |
4231 | fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n"); | |
4232 | gdbarch->software_single_step (sig, insert_breakpoints_p); | |
4233 | } | |
4234 | ||
4235 | void | |
4236 | set_gdbarch_software_single_step (struct gdbarch *gdbarch, | |
4237 | gdbarch_software_single_step_ftype software_single_step) | |
4238 | { | |
4239 | gdbarch->software_single_step = software_single_step; | |
4240 | } | |
4241 | ||
2bf0cb65 EZ |
4242 | int |
4243 | gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info) | |
4244 | { | |
4245 | if (gdbarch->print_insn == 0) | |
4246 | internal_error (__FILE__, __LINE__, | |
4247 | "gdbarch: gdbarch_print_insn invalid"); | |
4248 | if (gdbarch_debug >= 2) | |
4249 | fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n"); | |
4250 | return gdbarch->print_insn (vma, info); | |
4251 | } | |
4252 | ||
4253 | void | |
4254 | set_gdbarch_print_insn (struct gdbarch *gdbarch, | |
4255 | gdbarch_print_insn_ftype print_insn) | |
4256 | { | |
4257 | gdbarch->print_insn = print_insn; | |
4258 | } | |
4259 | ||
bdcd319a CV |
4260 | CORE_ADDR |
4261 | gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc) | |
4262 | { | |
4263 | if (gdbarch->skip_trampoline_code == 0) | |
4264 | internal_error (__FILE__, __LINE__, | |
4265 | "gdbarch: gdbarch_skip_trampoline_code invalid"); | |
4266 | if (gdbarch_debug >= 2) | |
4267 | fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n"); | |
4268 | return gdbarch->skip_trampoline_code (pc); | |
4269 | } | |
4270 | ||
4271 | void | |
4272 | set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, | |
4273 | gdbarch_skip_trampoline_code_ftype skip_trampoline_code) | |
4274 | { | |
4275 | gdbarch->skip_trampoline_code = skip_trampoline_code; | |
4276 | } | |
4277 | ||
68e9cc94 CV |
4278 | int |
4279 | gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name) | |
4280 | { | |
4281 | if (gdbarch->in_solib_call_trampoline == 0) | |
4282 | internal_error (__FILE__, __LINE__, | |
4283 | "gdbarch: gdbarch_in_solib_call_trampoline invalid"); | |
4284 | if (gdbarch_debug >= 2) | |
4285 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n"); | |
4286 | return gdbarch->in_solib_call_trampoline (pc, name); | |
4287 | } | |
4288 | ||
4289 | void | |
4290 | set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, | |
4291 | gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline) | |
4292 | { | |
4293 | gdbarch->in_solib_call_trampoline = in_solib_call_trampoline; | |
4294 | } | |
4295 | ||
c12260ac CV |
4296 | int |
4297 | gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr) | |
4298 | { | |
4299 | if (gdbarch->in_function_epilogue_p == 0) | |
4300 | internal_error (__FILE__, __LINE__, | |
4301 | "gdbarch: gdbarch_in_function_epilogue_p invalid"); | |
4302 | if (gdbarch_debug >= 2) | |
4303 | fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n"); | |
4304 | return gdbarch->in_function_epilogue_p (gdbarch, addr); | |
4305 | } | |
4306 | ||
4307 | void | |
4308 | set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, | |
4309 | gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p) | |
4310 | { | |
4311 | gdbarch->in_function_epilogue_p = in_function_epilogue_p; | |
4312 | } | |
4313 | ||
552c04a7 TT |
4314 | char * |
4315 | gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv) | |
4316 | { | |
4317 | if (gdbarch->construct_inferior_arguments == 0) | |
4318 | internal_error (__FILE__, __LINE__, | |
4319 | "gdbarch: gdbarch_construct_inferior_arguments invalid"); | |
4320 | if (gdbarch_debug >= 2) | |
4321 | fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n"); | |
4322 | return gdbarch->construct_inferior_arguments (gdbarch, argc, argv); | |
4323 | } | |
4324 | ||
4325 | void | |
4326 | set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, | |
4327 | gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments) | |
4328 | { | |
4329 | gdbarch->construct_inferior_arguments = construct_inferior_arguments; | |
4330 | } | |
4331 | ||
b6af0555 JS |
4332 | int |
4333 | gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch) | |
4334 | { | |
4335 | return gdbarch->dwarf2_build_frame_info != 0; | |
4336 | } | |
4337 | ||
4338 | void | |
4339 | gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile) | |
4340 | { | |
4341 | if (gdbarch->dwarf2_build_frame_info == 0) | |
4342 | internal_error (__FILE__, __LINE__, | |
4343 | "gdbarch: gdbarch_dwarf2_build_frame_info invalid"); | |
4344 | if (gdbarch_debug >= 2) | |
4345 | fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n"); | |
4346 | gdbarch->dwarf2_build_frame_info (objfile); | |
4347 | } | |
4348 | ||
4349 | void | |
4350 | set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, | |
4351 | gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info) | |
4352 | { | |
4353 | gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info; | |
4354 | } | |
4355 | ||
0f71a2f6 | 4356 | |
be5a57e1 | 4357 | /* Keep a registry of per-architecture data-pointers required by GDB |
0f71a2f6 JM |
4358 | modules. */ |
4359 | ||
4360 | struct gdbarch_data | |
4361 | { | |
95160752 AC |
4362 | unsigned index; |
4363 | gdbarch_data_init_ftype *init; | |
4364 | gdbarch_data_free_ftype *free; | |
0f71a2f6 JM |
4365 | }; |
4366 | ||
4367 | struct gdbarch_data_registration | |
adf40b2e | 4368 | { |
adf40b2e JM |
4369 | struct gdbarch_data *data; |
4370 | struct gdbarch_data_registration *next; | |
4371 | }; | |
0f71a2f6 | 4372 | |
be5a57e1 | 4373 | struct gdbarch_data_registry |
adf40b2e | 4374 | { |
95160752 | 4375 | unsigned nr; |
adf40b2e JM |
4376 | struct gdbarch_data_registration *registrations; |
4377 | }; | |
0f71a2f6 | 4378 | |
be5a57e1 | 4379 | struct gdbarch_data_registry gdbarch_data_registry = |
0f71a2f6 JM |
4380 | { |
4381 | 0, NULL, | |
4382 | }; | |
4383 | ||
4384 | struct gdbarch_data * | |
95160752 AC |
4385 | register_gdbarch_data (gdbarch_data_init_ftype *init, |
4386 | gdbarch_data_free_ftype *free) | |
0f71a2f6 JM |
4387 | { |
4388 | struct gdbarch_data_registration **curr; | |
be5a57e1 | 4389 | for (curr = &gdbarch_data_registry.registrations; |
0f71a2f6 JM |
4390 | (*curr) != NULL; |
4391 | curr = &(*curr)->next); | |
4392 | (*curr) = XMALLOC (struct gdbarch_data_registration); | |
4393 | (*curr)->next = NULL; | |
0f71a2f6 | 4394 | (*curr)->data = XMALLOC (struct gdbarch_data); |
be5a57e1 | 4395 | (*curr)->data->index = gdbarch_data_registry.nr++; |
95160752 AC |
4396 | (*curr)->data->init = init; |
4397 | (*curr)->data->free = free; | |
0f71a2f6 JM |
4398 | return (*curr)->data; |
4399 | } | |
4400 | ||
4401 | ||
b3cc3077 | 4402 | /* Walk through all the registered users initializing each in turn. */ |
0f71a2f6 | 4403 | |
0f71a2f6 | 4404 | static void |
b3cc3077 | 4405 | init_gdbarch_data (struct gdbarch *gdbarch) |
0f71a2f6 | 4406 | { |
b3cc3077 JB |
4407 | struct gdbarch_data_registration *rego; |
4408 | for (rego = gdbarch_data_registry.registrations; | |
4409 | rego != NULL; | |
4410 | rego = rego->next) | |
0f71a2f6 | 4411 | { |
b3cc3077 JB |
4412 | struct gdbarch_data *data = rego->data; |
4413 | gdb_assert (data->index < gdbarch->nr_data); | |
4414 | if (data->init != NULL) | |
95160752 | 4415 | { |
b3cc3077 JB |
4416 | void *pointer = data->init (gdbarch); |
4417 | set_gdbarch_data (gdbarch, data, pointer); | |
95160752 AC |
4418 | } |
4419 | } | |
4420 | } | |
4421 | ||
b3cc3077 | 4422 | /* Create/delete the gdbarch data vector. */ |
95160752 AC |
4423 | |
4424 | static void | |
b3cc3077 | 4425 | alloc_gdbarch_data (struct gdbarch *gdbarch) |
95160752 | 4426 | { |
b3cc3077 JB |
4427 | gdb_assert (gdbarch->data == NULL); |
4428 | gdbarch->nr_data = gdbarch_data_registry.nr; | |
4429 | gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*)); | |
4430 | } | |
3c875b6f | 4431 | |
b3cc3077 JB |
4432 | static void |
4433 | free_gdbarch_data (struct gdbarch *gdbarch) | |
4434 | { | |
4435 | struct gdbarch_data_registration *rego; | |
4436 | gdb_assert (gdbarch->data != NULL); | |
4437 | for (rego = gdbarch_data_registry.registrations; | |
4438 | rego != NULL; | |
4439 | rego = rego->next) | |
95160752 | 4440 | { |
b3cc3077 JB |
4441 | struct gdbarch_data *data = rego->data; |
4442 | gdb_assert (data->index < gdbarch->nr_data); | |
4443 | if (data->free != NULL && gdbarch->data[data->index] != NULL) | |
95160752 | 4444 | { |
b3cc3077 JB |
4445 | data->free (gdbarch, gdbarch->data[data->index]); |
4446 | gdbarch->data[data->index] = NULL; | |
95160752 | 4447 | } |
0f71a2f6 | 4448 | } |
b3cc3077 JB |
4449 | xfree (gdbarch->data); |
4450 | gdbarch->data = NULL; | |
0f71a2f6 JM |
4451 | } |
4452 | ||
4453 | ||
b3cc3077 JB |
4454 | /* Initialize the current value of thee specified per-architecture |
4455 | data-pointer. */ | |
4456 | ||
95160752 AC |
4457 | void |
4458 | set_gdbarch_data (struct gdbarch *gdbarch, | |
4459 | struct gdbarch_data *data, | |
4460 | void *pointer) | |
4461 | { | |
4462 | gdb_assert (data->index < gdbarch->nr_data); | |
4463 | if (data->free != NULL && gdbarch->data[data->index] != NULL) | |
4464 | data->free (gdbarch, gdbarch->data[data->index]); | |
4465 | gdbarch->data[data->index] = pointer; | |
4466 | } | |
4467 | ||
0f71a2f6 JM |
4468 | /* Return the current value of the specified per-architecture |
4469 | data-pointer. */ | |
4470 | ||
4471 | void * | |
7c7651b2 | 4472 | gdbarch_data (struct gdbarch_data *data) |
0f71a2f6 | 4473 | { |
95160752 | 4474 | gdb_assert (data->index < current_gdbarch->nr_data); |
0f71a2f6 JM |
4475 | return current_gdbarch->data[data->index]; |
4476 | } | |
4477 | ||
4478 | ||
4479 | ||
be5a57e1 | 4480 | /* Keep a registry of swapped data required by GDB modules. */ |
0f71a2f6 JM |
4481 | |
4482 | struct gdbarch_swap | |
4483 | { | |
4484 | void *swap; | |
4485 | struct gdbarch_swap_registration *source; | |
4486 | struct gdbarch_swap *next; | |
4487 | }; | |
4488 | ||
4489 | struct gdbarch_swap_registration | |
adf40b2e JM |
4490 | { |
4491 | void *data; | |
4492 | unsigned long sizeof_data; | |
4493 | gdbarch_swap_ftype *init; | |
4494 | struct gdbarch_swap_registration *next; | |
4495 | }; | |
0f71a2f6 | 4496 | |
be5a57e1 | 4497 | struct gdbarch_swap_registry |
adf40b2e JM |
4498 | { |
4499 | int nr; | |
4500 | struct gdbarch_swap_registration *registrations; | |
4501 | }; | |
0f71a2f6 | 4502 | |
be5a57e1 | 4503 | struct gdbarch_swap_registry gdbarch_swap_registry = |
0f71a2f6 JM |
4504 | { |
4505 | 0, NULL, | |
4506 | }; | |
4507 | ||
4508 | void | |
104c1213 JM |
4509 | register_gdbarch_swap (void *data, |
4510 | unsigned long sizeof_data, | |
4511 | gdbarch_swap_ftype *init) | |
0f71a2f6 JM |
4512 | { |
4513 | struct gdbarch_swap_registration **rego; | |
be5a57e1 | 4514 | for (rego = &gdbarch_swap_registry.registrations; |
0f71a2f6 JM |
4515 | (*rego) != NULL; |
4516 | rego = &(*rego)->next); | |
4517 | (*rego) = XMALLOC (struct gdbarch_swap_registration); | |
4518 | (*rego)->next = NULL; | |
4519 | (*rego)->init = init; | |
4520 | (*rego)->data = data; | |
4521 | (*rego)->sizeof_data = sizeof_data; | |
4522 | } | |
4523 | ||
4524 | ||
0f71a2f6 | 4525 | static void |
104c1213 | 4526 | init_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
4527 | { |
4528 | struct gdbarch_swap_registration *rego; | |
4529 | struct gdbarch_swap **curr = &gdbarch->swap; | |
be5a57e1 | 4530 | for (rego = gdbarch_swap_registry.registrations; |
0f71a2f6 JM |
4531 | rego != NULL; |
4532 | rego = rego->next) | |
4533 | { | |
4534 | if (rego->data != NULL) | |
4535 | { | |
4536 | (*curr) = XMALLOC (struct gdbarch_swap); | |
4537 | (*curr)->source = rego; | |
4538 | (*curr)->swap = xmalloc (rego->sizeof_data); | |
4539 | (*curr)->next = NULL; | |
4540 | memset (rego->data, 0, rego->sizeof_data); | |
4541 | curr = &(*curr)->next; | |
4542 | } | |
4543 | if (rego->init != NULL) | |
4544 | rego->init (); | |
4545 | } | |
4546 | } | |
4547 | ||
0f71a2f6 | 4548 | static void |
104c1213 | 4549 | swapout_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
4550 | { |
4551 | struct gdbarch_swap *curr; | |
4552 | for (curr = gdbarch->swap; | |
4553 | curr != NULL; | |
4554 | curr = curr->next) | |
4555 | memcpy (curr->swap, curr->source->data, curr->source->sizeof_data); | |
4556 | } | |
4557 | ||
0f71a2f6 | 4558 | static void |
104c1213 | 4559 | swapin_gdbarch_swap (struct gdbarch *gdbarch) |
0f71a2f6 JM |
4560 | { |
4561 | struct gdbarch_swap *curr; | |
4562 | for (curr = gdbarch->swap; | |
4563 | curr != NULL; | |
4564 | curr = curr->next) | |
4565 | memcpy (curr->source->data, curr->swap, curr->source->sizeof_data); | |
4566 | } | |
4567 | ||
4568 | ||
be5a57e1 | 4569 | /* Keep a registry of the architectures known by GDB. */ |
0f71a2f6 | 4570 | |
4b9b3959 | 4571 | struct gdbarch_registration |
0f71a2f6 JM |
4572 | { |
4573 | enum bfd_architecture bfd_architecture; | |
4574 | gdbarch_init_ftype *init; | |
4b9b3959 | 4575 | gdbarch_dump_tdep_ftype *dump_tdep; |
0f71a2f6 | 4576 | struct gdbarch_list *arches; |
4b9b3959 | 4577 | struct gdbarch_registration *next; |
0f71a2f6 JM |
4578 | }; |
4579 | ||
be5a57e1 | 4580 | static struct gdbarch_registration *gdbarch_registry = NULL; |
0f71a2f6 | 4581 | |
b4a20239 AC |
4582 | static void |
4583 | append_name (const char ***buf, int *nr, const char *name) | |
4584 | { | |
4585 | *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1)); | |
4586 | (*buf)[*nr] = name; | |
4587 | *nr += 1; | |
4588 | } | |
4589 | ||
4590 | const char ** | |
4591 | gdbarch_printable_names (void) | |
4592 | { | |
4593 | if (GDB_MULTI_ARCH) | |
4594 | { | |
4595 | /* Accumulate a list of names based on the registed list of | |
4596 | architectures. */ | |
4597 | enum bfd_architecture a; | |
4598 | int nr_arches = 0; | |
4599 | const char **arches = NULL; | |
4b9b3959 | 4600 | struct gdbarch_registration *rego; |
be5a57e1 | 4601 | for (rego = gdbarch_registry; |
b4a20239 AC |
4602 | rego != NULL; |
4603 | rego = rego->next) | |
4604 | { | |
4605 | const struct bfd_arch_info *ap; | |
4606 | ap = bfd_lookup_arch (rego->bfd_architecture, 0); | |
4607 | if (ap == NULL) | |
8e65ff28 AC |
4608 | internal_error (__FILE__, __LINE__, |
4609 | "gdbarch_architecture_names: multi-arch unknown"); | |
b4a20239 AC |
4610 | do |
4611 | { | |
4612 | append_name (&arches, &nr_arches, ap->printable_name); | |
4613 | ap = ap->next; | |
4614 | } | |
4615 | while (ap != NULL); | |
4616 | } | |
4617 | append_name (&arches, &nr_arches, NULL); | |
4618 | return arches; | |
4619 | } | |
4620 | else | |
4621 | /* Just return all the architectures that BFD knows. Assume that | |
4622 | the legacy architecture framework supports them. */ | |
4623 | return bfd_arch_list (); | |
4624 | } | |
4625 | ||
4626 | ||
0f71a2f6 | 4627 | void |
4b9b3959 AC |
4628 | gdbarch_register (enum bfd_architecture bfd_architecture, |
4629 | gdbarch_init_ftype *init, | |
4630 | gdbarch_dump_tdep_ftype *dump_tdep) | |
0f71a2f6 | 4631 | { |
4b9b3959 | 4632 | struct gdbarch_registration **curr; |
0f71a2f6 | 4633 | const struct bfd_arch_info *bfd_arch_info; |
ec3d358c | 4634 | /* Check that BFD recognizes this architecture */ |
0f71a2f6 JM |
4635 | bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0); |
4636 | if (bfd_arch_info == NULL) | |
4637 | { | |
8e65ff28 AC |
4638 | internal_error (__FILE__, __LINE__, |
4639 | "gdbarch: Attempt to register unknown architecture (%d)", | |
4640 | bfd_architecture); | |
0f71a2f6 JM |
4641 | } |
4642 | /* Check that we haven't seen this architecture before */ | |
be5a57e1 | 4643 | for (curr = &gdbarch_registry; |
0f71a2f6 JM |
4644 | (*curr) != NULL; |
4645 | curr = &(*curr)->next) | |
4646 | { | |
4647 | if (bfd_architecture == (*curr)->bfd_architecture) | |
8e65ff28 AC |
4648 | internal_error (__FILE__, __LINE__, |
4649 | "gdbarch: Duplicate registraration of architecture (%s)", | |
4650 | bfd_arch_info->printable_name); | |
0f71a2f6 JM |
4651 | } |
4652 | /* log it */ | |
4653 | if (gdbarch_debug) | |
4654 | fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n", | |
4655 | bfd_arch_info->printable_name, | |
4656 | (long) init); | |
4657 | /* Append it */ | |
4b9b3959 | 4658 | (*curr) = XMALLOC (struct gdbarch_registration); |
0f71a2f6 JM |
4659 | (*curr)->bfd_architecture = bfd_architecture; |
4660 | (*curr)->init = init; | |
4b9b3959 | 4661 | (*curr)->dump_tdep = dump_tdep; |
0f71a2f6 JM |
4662 | (*curr)->arches = NULL; |
4663 | (*curr)->next = NULL; | |
8e1a459b C |
4664 | /* When non- multi-arch, install whatever target dump routine we've |
4665 | been provided - hopefully that routine has been written correctly | |
4b9b3959 AC |
4666 | and works regardless of multi-arch. */ |
4667 | if (!GDB_MULTI_ARCH && dump_tdep != NULL | |
4668 | && startup_gdbarch.dump_tdep == NULL) | |
4669 | startup_gdbarch.dump_tdep = dump_tdep; | |
4670 | } | |
4671 | ||
4672 | void | |
4673 | register_gdbarch_init (enum bfd_architecture bfd_architecture, | |
4674 | gdbarch_init_ftype *init) | |
4675 | { | |
4676 | gdbarch_register (bfd_architecture, init, NULL); | |
0f71a2f6 | 4677 | } |
0f71a2f6 JM |
4678 | |
4679 | ||
4680 | /* Look for an architecture using gdbarch_info. Base search on only | |
4681 | BFD_ARCH_INFO and BYTE_ORDER. */ | |
4682 | ||
4683 | struct gdbarch_list * | |
104c1213 JM |
4684 | gdbarch_list_lookup_by_info (struct gdbarch_list *arches, |
4685 | const struct gdbarch_info *info) | |
0f71a2f6 JM |
4686 | { |
4687 | for (; arches != NULL; arches = arches->next) | |
4688 | { | |
4689 | if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info) | |
4690 | continue; | |
4691 | if (info->byte_order != arches->gdbarch->byte_order) | |
4692 | continue; | |
4693 | return arches; | |
4694 | } | |
4695 | return NULL; | |
4696 | } | |
4697 | ||
4698 | ||
4699 | /* Update the current architecture. Return ZERO if the update request | |
4700 | failed. */ | |
4701 | ||
4702 | int | |
16f33e29 | 4703 | gdbarch_update_p (struct gdbarch_info info) |
0f71a2f6 JM |
4704 | { |
4705 | struct gdbarch *new_gdbarch; | |
4706 | struct gdbarch_list **list; | |
4b9b3959 | 4707 | struct gdbarch_registration *rego; |
0f71a2f6 | 4708 | |
b732d07d AC |
4709 | /* Fill in missing parts of the INFO struct using a number of |
4710 | sources: ``set ...''; INFOabfd supplied; existing target. */ | |
4711 | ||
4712 | /* ``(gdb) set architecture ...'' */ | |
4713 | if (info.bfd_arch_info == NULL | |
4714 | && !TARGET_ARCHITECTURE_AUTO) | |
4715 | info.bfd_arch_info = TARGET_ARCHITECTURE; | |
4716 | if (info.bfd_arch_info == NULL | |
4717 | && info.abfd != NULL | |
4718 | && bfd_get_arch (info.abfd) != bfd_arch_unknown | |
4719 | && bfd_get_arch (info.abfd) != bfd_arch_obscure) | |
4720 | info.bfd_arch_info = bfd_get_arch_info (info.abfd); | |
0f71a2f6 | 4721 | if (info.bfd_arch_info == NULL) |
b732d07d AC |
4722 | info.bfd_arch_info = TARGET_ARCHITECTURE; |
4723 | ||
4724 | /* ``(gdb) set byte-order ...'' */ | |
428721aa | 4725 | if (info.byte_order == BFD_ENDIAN_UNKNOWN |
b732d07d AC |
4726 | && !TARGET_BYTE_ORDER_AUTO) |
4727 | info.byte_order = TARGET_BYTE_ORDER; | |
4728 | /* From the INFO struct. */ | |
428721aa | 4729 | if (info.byte_order == BFD_ENDIAN_UNKNOWN |
b732d07d | 4730 | && info.abfd != NULL) |
d7449b42 | 4731 | info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG |
778eb05e | 4732 | : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE |
428721aa | 4733 | : BFD_ENDIAN_UNKNOWN); |
b732d07d | 4734 | /* From the current target. */ |
428721aa | 4735 | if (info.byte_order == BFD_ENDIAN_UNKNOWN) |
b732d07d | 4736 | info.byte_order = TARGET_BYTE_ORDER; |
0f71a2f6 | 4737 | |
b732d07d AC |
4738 | /* Must have found some sort of architecture. */ |
4739 | gdb_assert (info.bfd_arch_info != NULL); | |
0f71a2f6 JM |
4740 | |
4741 | if (gdbarch_debug) | |
4742 | { | |
0f71a2f6 JM |
4743 | fprintf_unfiltered (gdb_stdlog, |
4744 | "gdbarch_update: info.bfd_arch_info %s\n", | |
4745 | (info.bfd_arch_info != NULL | |
4746 | ? info.bfd_arch_info->printable_name | |
4747 | : "(null)")); | |
4748 | fprintf_unfiltered (gdb_stdlog, | |
4749 | "gdbarch_update: info.byte_order %d (%s)\n", | |
4750 | info.byte_order, | |
d7449b42 | 4751 | (info.byte_order == BFD_ENDIAN_BIG ? "big" |
778eb05e | 4752 | : info.byte_order == BFD_ENDIAN_LITTLE ? "little" |
0f71a2f6 JM |
4753 | : "default")); |
4754 | fprintf_unfiltered (gdb_stdlog, | |
4755 | "gdbarch_update: info.abfd 0x%lx\n", | |
4756 | (long) info.abfd); | |
4757 | fprintf_unfiltered (gdb_stdlog, | |
4758 | "gdbarch_update: info.tdep_info 0x%lx\n", | |
4759 | (long) info.tdep_info); | |
4760 | } | |
4761 | ||
b732d07d AC |
4762 | /* Find the target that knows about this architecture. */ |
4763 | for (rego = gdbarch_registry; | |
4764 | rego != NULL; | |
4765 | rego = rego->next) | |
4766 | if (rego->bfd_architecture == info.bfd_arch_info->arch) | |
4767 | break; | |
4768 | if (rego == NULL) | |
4769 | { | |
4770 | if (gdbarch_debug) | |
4771 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n"); | |
4772 | return 0; | |
4773 | } | |
4774 | ||
0f71a2f6 JM |
4775 | /* Ask the target for a replacement architecture. */ |
4776 | new_gdbarch = rego->init (info, rego->arches); | |
4777 | ||
4778 | /* Did the target like it? No. Reject the change. */ | |
4779 | if (new_gdbarch == NULL) | |
4780 | { | |
4781 | if (gdbarch_debug) | |
4782 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n"); | |
4783 | return 0; | |
4784 | } | |
4785 | ||
4786 | /* Did the architecture change? No. Do nothing. */ | |
4787 | if (current_gdbarch == new_gdbarch) | |
4788 | { | |
4789 | if (gdbarch_debug) | |
4790 | fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n", | |
4791 | (long) new_gdbarch, | |
4792 | new_gdbarch->bfd_arch_info->printable_name); | |
4793 | return 1; | |
4794 | } | |
4795 | ||
4796 | /* Swap all data belonging to the old target out */ | |
4797 | swapout_gdbarch_swap (current_gdbarch); | |
4798 | ||
4799 | /* Is this a pre-existing architecture? Yes. Swap it in. */ | |
4800 | for (list = ®o->arches; | |
4801 | (*list) != NULL; | |
4802 | list = &(*list)->next) | |
4803 | { | |
4804 | if ((*list)->gdbarch == new_gdbarch) | |
4805 | { | |
4806 | if (gdbarch_debug) | |
4b9b3959 AC |
4807 | fprintf_unfiltered (gdb_stdlog, |
4808 | "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n", | |
0f71a2f6 JM |
4809 | (long) new_gdbarch, |
4810 | new_gdbarch->bfd_arch_info->printable_name); | |
4811 | current_gdbarch = new_gdbarch; | |
4812 | swapin_gdbarch_swap (new_gdbarch); | |
67c2c32c | 4813 | architecture_changed_event (); |
0f71a2f6 JM |
4814 | return 1; |
4815 | } | |
4816 | } | |
4b9b3959 | 4817 | |
0f71a2f6 JM |
4818 | /* Append this new architecture to this targets list. */ |
4819 | (*list) = XMALLOC (struct gdbarch_list); | |
4820 | (*list)->next = NULL; | |
4821 | (*list)->gdbarch = new_gdbarch; | |
4822 | ||
4823 | /* Switch to this new architecture. Dump it out. */ | |
4824 | current_gdbarch = new_gdbarch; | |
4825 | if (gdbarch_debug) | |
4826 | { | |
4827 | fprintf_unfiltered (gdb_stdlog, | |
adf40b2e | 4828 | "gdbarch_update: New architecture 0x%08lx (%s) selected\n", |
0f71a2f6 JM |
4829 | (long) new_gdbarch, |
4830 | new_gdbarch->bfd_arch_info->printable_name); | |
0f71a2f6 | 4831 | } |
adf40b2e | 4832 | |
4b9b3959 AC |
4833 | /* Check that the newly installed architecture is valid. Plug in |
4834 | any post init values. */ | |
4835 | new_gdbarch->dump_tdep = rego->dump_tdep; | |
0f71a2f6 JM |
4836 | verify_gdbarch (new_gdbarch); |
4837 | ||
4838 | /* Initialize the per-architecture memory (swap) areas. | |
4839 | CURRENT_GDBARCH must be update before these modules are | |
4840 | called. */ | |
4841 | init_gdbarch_swap (new_gdbarch); | |
adf40b2e | 4842 | |
b3cc3077 JB |
4843 | /* Initialize the per-architecture data-pointer of all parties that |
4844 | registered an interest in this architecture. CURRENT_GDBARCH | |
4845 | must be updated before these modules are called. */ | |
4846 | init_gdbarch_data (new_gdbarch); | |
67c2c32c KS |
4847 | architecture_changed_event (); |
4848 | ||
4b9b3959 AC |
4849 | if (gdbarch_debug) |
4850 | gdbarch_dump (current_gdbarch, gdb_stdlog); | |
4851 | ||
0f71a2f6 JM |
4852 | return 1; |
4853 | } | |
c906108c | 4854 | |
c906108c | 4855 | |
c906108c SS |
4856 | /* Disassembler */ |
4857 | ||
4858 | /* Pointer to the target-dependent disassembly function. */ | |
104c1213 | 4859 | int (*tm_print_insn) (bfd_vma, disassemble_info *); |
c906108c SS |
4860 | disassemble_info tm_print_insn_info; |
4861 | ||
4862 | ||
104c1213 | 4863 | extern void _initialize_gdbarch (void); |
b4a20239 | 4864 | |
c906108c | 4865 | void |
7c7651b2 | 4866 | _initialize_gdbarch (void) |
c906108c | 4867 | { |
5d161b24 DB |
4868 | struct cmd_list_element *c; |
4869 | ||
adf40b2e | 4870 | INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered); |
c906108c SS |
4871 | tm_print_insn_info.flavour = bfd_target_unknown_flavour; |
4872 | tm_print_insn_info.read_memory_func = dis_asm_read_memory; | |
4873 | tm_print_insn_info.memory_error_func = dis_asm_memory_error; | |
4874 | tm_print_insn_info.print_address_func = dis_asm_print_address; | |
4875 | ||
5d161b24 | 4876 | add_show_from_set (add_set_cmd ("arch", |
c906108c SS |
4877 | class_maintenance, |
4878 | var_zinteger, | |
adf40b2e | 4879 | (char *)&gdbarch_debug, |
c906108c | 4880 | "Set architecture debugging.\n\ |
5d161b24 DB |
4881 | When non-zero, architecture debugging is enabled.", &setdebuglist), |
4882 | &showdebuglist); | |
59233f88 AC |
4883 | c = add_set_cmd ("archdebug", |
4884 | class_maintenance, | |
4885 | var_zinteger, | |
4886 | (char *)&gdbarch_debug, | |
4887 | "Set architecture debugging.\n\ | |
5d161b24 DB |
4888 | When non-zero, architecture debugging is enabled.", &setlist); |
4889 | ||
59233f88 AC |
4890 | deprecate_cmd (c, "set debug arch"); |
4891 | deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch"); | |
c906108c | 4892 | } |