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