1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
6 This file is part of GDB.
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.
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.
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. */
23 /* This file was created with the aid of ``gdbarch.sh''.
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
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
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
67 #include "reggroups.h"
69 #include "symfile.h" /* For entry_point_address. */
71 /* Static function declarations */
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 *);
81 /* Non-zero if we want to trace architecture code. */
84 #define GDBARCH_DEBUG 0
86 int gdbarch_debug = GDBARCH_DEBUG;
89 /* Maintain the struct gdbarch object */
93 /* Has this architecture been fully initialized? */
95 /* basic architectural information */
96 const struct bfd_arch_info * bfd_arch_info;
100 /* target specific vector. */
101 struct gdbarch_tdep *tdep;
102 gdbarch_dump_tdep_ftype *dump_tdep;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap *swap;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype *read_pc;
149 gdbarch_write_pc_ftype *write_pc;
150 gdbarch_read_fp_ftype *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;
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;
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 call_dummy_start_offset;
192 CORE_ADDR call_dummy_breakpoint_offset;
193 int call_dummy_length;
194 gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
195 LONGEST * call_dummy_words;
196 int sizeof_call_dummy_words;
197 int deprecated_call_dummy_stack_adjust;
198 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
199 gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
200 gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
201 int believe_pcc_promotion;
202 int believe_pcc_promotion_type;
203 gdbarch_deprecated_get_saved_register_ftype *deprecated_get_saved_register;
204 gdbarch_register_convertible_ftype *register_convertible;
205 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
206 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
207 gdbarch_convert_register_p_ftype *convert_register_p;
208 gdbarch_register_to_value_ftype *register_to_value;
209 gdbarch_value_to_register_ftype *value_to_register;
210 gdbarch_pointer_to_address_ftype *pointer_to_address;
211 gdbarch_address_to_pointer_ftype *address_to_pointer;
212 gdbarch_integer_to_address_ftype *integer_to_address;
213 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
214 gdbarch_deprecated_push_arguments_ftype *deprecated_push_arguments;
215 gdbarch_push_dummy_call_ftype *push_dummy_call;
216 gdbarch_deprecated_push_dummy_frame_ftype *deprecated_push_dummy_frame;
217 gdbarch_deprecated_push_return_address_ftype *deprecated_push_return_address;
218 gdbarch_deprecated_pop_frame_ftype *deprecated_pop_frame;
219 gdbarch_deprecated_store_struct_return_ftype *deprecated_store_struct_return;
220 gdbarch_extract_return_value_ftype *extract_return_value;
221 gdbarch_store_return_value_ftype *store_return_value;
222 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
223 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
224 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
225 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
226 gdbarch_use_struct_convention_ftype *use_struct_convention;
227 gdbarch_deprecated_frame_init_saved_regs_ftype *deprecated_frame_init_saved_regs;
228 gdbarch_deprecated_init_extra_frame_info_ftype *deprecated_init_extra_frame_info;
229 gdbarch_skip_prologue_ftype *skip_prologue;
230 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
231 gdbarch_inner_than_ftype *inner_than;
232 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
233 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
234 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
235 CORE_ADDR decr_pc_after_break;
236 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
237 CORE_ADDR function_start_offset;
238 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
239 CORE_ADDR frame_args_skip;
240 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
241 gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
242 gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
243 gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
244 gdbarch_unwind_pc_ftype *unwind_pc;
245 gdbarch_frame_args_address_ftype *frame_args_address;
246 gdbarch_frame_locals_address_ftype *frame_locals_address;
247 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
248 gdbarch_frame_num_args_ftype *frame_num_args;
249 gdbarch_stack_align_ftype *stack_align;
250 gdbarch_frame_align_ftype *frame_align;
251 int deprecated_extra_stack_alignment_needed;
252 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
253 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
254 gdbarch_unwind_dummy_id_ftype *unwind_dummy_id;
256 const struct floatformat * float_format;
257 const struct floatformat * double_format;
258 const struct floatformat * long_double_format;
259 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
260 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
261 gdbarch_smash_text_address_ftype *smash_text_address;
262 gdbarch_software_single_step_ftype *software_single_step;
263 gdbarch_print_insn_ftype *print_insn;
264 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
265 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
266 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
267 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
268 gdbarch_sigtramp_start_ftype *sigtramp_start;
269 gdbarch_sigtramp_end_ftype *sigtramp_end;
270 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
271 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
272 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
273 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
274 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
275 const char * name_of_malloc;
276 int cannot_step_breakpoint;
277 int have_nonsteppable_watchpoint;
278 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
279 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
280 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
281 gdbarch_register_reggroup_p_ftype *register_reggroup_p;
285 /* The default architecture uses host values (for want of a better
288 extern const struct bfd_arch_info bfd_default_arch_struct;
290 struct gdbarch startup_gdbarch =
292 1, /* Always initialized. */
293 /* basic architecture information */
294 &bfd_default_arch_struct,
297 /* target specific vector and its dump routine */
299 /*per-architecture data-pointers and swap regions */
301 /* Multi-arch values */
305 8 * sizeof (LONGEST),
308 8 * sizeof (long double),
337 generic_register_byte,
338 generic_register_size,
340 generic_register_size,
345 default_print_registers_info,
359 generic_pc_in_call_dummy,
435 generic_in_function_epilogue_p,
436 construct_inferior_arguments,
446 default_register_reggroup_p,
447 /* startup_gdbarch() */
450 struct gdbarch *current_gdbarch = &startup_gdbarch;
452 /* Do any initialization needed for a non-multiarch configuration
453 after the _initialize_MODULE functions have been run. */
455 initialize_non_multiarch (void)
457 alloc_gdbarch_data (&startup_gdbarch);
458 /* Ensure that all swap areas are zeroed so that they again think
459 they are starting from scratch. */
460 clear_gdbarch_swap (&startup_gdbarch);
461 init_gdbarch_swap (&startup_gdbarch);
465 /* Create a new ``struct gdbarch'' based on information provided by
466 ``struct gdbarch_info''. */
469 gdbarch_alloc (const struct gdbarch_info *info,
470 struct gdbarch_tdep *tdep)
472 /* NOTE: The new architecture variable is named ``current_gdbarch''
473 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
474 the current local architecture and not the previous global
475 architecture. This ensures that the new architectures initial
476 values are not influenced by the previous architecture. Once
477 everything is parameterised with gdbarch, this will go away. */
478 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
479 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
481 alloc_gdbarch_data (current_gdbarch);
483 current_gdbarch->tdep = tdep;
485 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
486 current_gdbarch->byte_order = info->byte_order;
487 current_gdbarch->osabi = info->osabi;
489 /* Force the explicit initialization of these. */
490 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
491 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
492 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
493 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
494 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
495 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
496 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
497 current_gdbarch->ptr_bit = TARGET_INT_BIT;
498 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
499 current_gdbarch->char_signed = -1;
500 current_gdbarch->read_pc = generic_target_read_pc;
501 current_gdbarch->write_pc = generic_target_write_pc;
502 current_gdbarch->read_fp = generic_target_read_fp;
503 current_gdbarch->read_sp = generic_target_read_sp;
504 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
505 current_gdbarch->num_regs = -1;
506 current_gdbarch->sp_regnum = -1;
507 current_gdbarch->fp_regnum = -1;
508 current_gdbarch->pc_regnum = -1;
509 current_gdbarch->ps_regnum = -1;
510 current_gdbarch->fp0_regnum = -1;
511 current_gdbarch->npc_regnum = -1;
512 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
513 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
514 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
515 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
516 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
517 current_gdbarch->register_name = legacy_register_name;
518 current_gdbarch->register_size = -1;
519 current_gdbarch->register_bytes = -1;
520 current_gdbarch->register_byte = generic_register_byte;
521 current_gdbarch->register_raw_size = generic_register_size;
522 current_gdbarch->register_virtual_size = generic_register_size;
523 current_gdbarch->print_registers_info = default_print_registers_info;
524 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
525 current_gdbarch->cannot_fetch_register = cannot_register_not;
526 current_gdbarch->cannot_store_register = cannot_register_not;
527 current_gdbarch->deprecated_use_generic_dummy_frames = 1;
528 current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
529 current_gdbarch->call_dummy_address = entry_point_address;
530 current_gdbarch->call_dummy_start_offset = -1;
531 current_gdbarch->call_dummy_length = -1;
532 current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
533 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
534 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
535 current_gdbarch->register_convertible = generic_register_convertible_not;
536 current_gdbarch->convert_register_p = legacy_convert_register_p;
537 current_gdbarch->register_to_value = legacy_register_to_value;
538 current_gdbarch->value_to_register = legacy_value_to_register;
539 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
540 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
541 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
542 current_gdbarch->extract_return_value = legacy_extract_return_value;
543 current_gdbarch->store_return_value = legacy_store_return_value;
544 current_gdbarch->use_struct_convention = generic_use_struct_convention;
545 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
546 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
547 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
548 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
549 current_gdbarch->decr_pc_after_break = -1;
550 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
551 current_gdbarch->function_start_offset = -1;
552 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
553 current_gdbarch->frame_args_skip = -1;
554 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
555 current_gdbarch->frame_args_address = get_frame_base;
556 current_gdbarch->frame_locals_address = get_frame_base;
557 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
558 current_gdbarch->addr_bits_remove = core_addr_identity;
559 current_gdbarch->smash_text_address = core_addr_identity;
560 current_gdbarch->print_insn = legacy_print_insn;
561 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
562 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
563 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
564 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
565 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
566 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
567 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
568 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
569 current_gdbarch->name_of_malloc = "malloc";
570 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
571 /* gdbarch_alloc() */
573 return current_gdbarch;
577 /* Free a gdbarch struct. This should never happen in normal
578 operation --- once you've created a gdbarch, you keep it around.
579 However, if an architecture's init function encounters an error
580 building the structure, it may need to clean up a partially
581 constructed gdbarch. */
584 gdbarch_free (struct gdbarch *arch)
586 gdb_assert (arch != NULL);
587 free_gdbarch_data (arch);
592 /* Ensure that all values in a GDBARCH are reasonable. */
595 verify_gdbarch (struct gdbarch *gdbarch)
598 struct cleanup *cleanups;
601 /* Only perform sanity checks on a multi-arch target. */
604 log = mem_fileopen ();
605 cleanups = make_cleanup_ui_file_delete (log);
607 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
608 fprintf_unfiltered (log, "\n\tbyte-order");
609 if (gdbarch->bfd_arch_info == NULL)
610 fprintf_unfiltered (log, "\n\tbfd_arch_info");
611 /* Check those that need to be defined for the given multi-arch level. */
612 /* Skip verify of short_bit, invalid_p == 0 */
613 /* Skip verify of int_bit, invalid_p == 0 */
614 /* Skip verify of long_bit, invalid_p == 0 */
615 /* Skip verify of long_long_bit, invalid_p == 0 */
616 /* Skip verify of float_bit, invalid_p == 0 */
617 /* Skip verify of double_bit, invalid_p == 0 */
618 /* Skip verify of long_double_bit, invalid_p == 0 */
619 /* Skip verify of ptr_bit, invalid_p == 0 */
620 if (gdbarch->addr_bit == 0)
621 gdbarch->addr_bit = TARGET_PTR_BIT;
622 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
623 if (gdbarch->char_signed == -1)
624 gdbarch->char_signed = 1;
625 /* Skip verify of read_pc, invalid_p == 0 */
626 /* Skip verify of write_pc, invalid_p == 0 */
627 /* Skip verify of read_fp, invalid_p == 0 */
628 /* Skip verify of read_sp, invalid_p == 0 */
629 /* Skip verify of deprecated_dummy_write_sp, has predicate */
630 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
631 /* Skip verify of pseudo_register_read, has predicate */
632 /* Skip verify of pseudo_register_write, has predicate */
633 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
634 && (gdbarch->num_regs == -1))
635 fprintf_unfiltered (log, "\n\tnum_regs");
636 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
637 /* Skip verify of sp_regnum, invalid_p == 0 */
638 /* Skip verify of fp_regnum, invalid_p == 0 */
639 /* Skip verify of pc_regnum, invalid_p == 0 */
640 /* Skip verify of ps_regnum, invalid_p == 0 */
641 /* Skip verify of fp0_regnum, invalid_p == 0 */
642 /* Skip verify of npc_regnum, invalid_p == 0 */
643 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
644 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
645 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
646 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
647 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
648 /* Skip verify of register_name, invalid_p == 0 */
649 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
650 && (gdbarch->register_size == -1))
651 fprintf_unfiltered (log, "\n\tregister_size");
652 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
653 && (gdbarch->register_bytes == -1))
654 fprintf_unfiltered (log, "\n\tregister_bytes");
655 /* Skip verify of register_byte, invalid_p == 0 */
656 /* Skip verify of register_raw_size, invalid_p == 0 */
657 /* Skip verify of deprecated_max_register_raw_size, has predicate */
658 /* Skip verify of register_virtual_size, invalid_p == 0 */
659 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
660 /* Skip verify of register_virtual_type, has predicate */
661 /* Skip verify of register_type, has predicate */
662 /* Skip verify of deprecated_do_registers_info, has predicate */
663 /* Skip verify of print_registers_info, invalid_p == 0 */
664 /* Skip verify of print_float_info, has predicate */
665 /* Skip verify of print_vector_info, has predicate */
666 /* Skip verify of register_sim_regno, invalid_p == 0 */
667 /* Skip verify of register_bytes_ok, has predicate */
668 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
669 /* Skip verify of cannot_store_register, invalid_p == 0 */
670 /* Skip verify of get_longjmp_target, has predicate */
671 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
672 /* Skip verify of call_dummy_location, invalid_p == 0 */
673 /* Skip verify of call_dummy_address, invalid_p == 0 */
674 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
675 && (gdbarch->call_dummy_start_offset == -1))
676 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
677 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
678 && (gdbarch->call_dummy_length == -1))
679 fprintf_unfiltered (log, "\n\tcall_dummy_length");
680 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
681 /* Skip verify of call_dummy_words, invalid_p == 0 */
682 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
683 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
684 /* Skip verify of fix_call_dummy, has predicate */
685 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
686 /* Skip verify of deprecated_init_frame_pc, has predicate */
687 /* Skip verify of deprecated_get_saved_register, has predicate */
688 /* Skip verify of register_convertible, invalid_p == 0 */
689 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
690 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
691 /* Skip verify of convert_register_p, invalid_p == 0 */
692 /* Skip verify of register_to_value, invalid_p == 0 */
693 /* Skip verify of value_to_register, invalid_p == 0 */
694 /* Skip verify of pointer_to_address, invalid_p == 0 */
695 /* Skip verify of address_to_pointer, invalid_p == 0 */
696 /* Skip verify of integer_to_address, has predicate */
697 /* Skip verify of return_value_on_stack, invalid_p == 0 */
698 /* Skip verify of deprecated_push_arguments, has predicate */
699 /* Skip verify of push_dummy_call, has predicate */
700 /* Skip verify of deprecated_push_dummy_frame, has predicate */
701 /* Skip verify of deprecated_push_return_address, has predicate */
702 /* Skip verify of deprecated_pop_frame, has predicate */
703 /* Skip verify of deprecated_store_struct_return, has predicate */
704 /* Skip verify of extract_return_value, invalid_p == 0 */
705 /* Skip verify of store_return_value, invalid_p == 0 */
706 /* Skip verify of extract_struct_value_address, has predicate */
707 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
708 /* Skip verify of use_struct_convention, invalid_p == 0 */
709 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
710 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
711 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
712 && (gdbarch->skip_prologue == 0))
713 fprintf_unfiltered (log, "\n\tskip_prologue");
714 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
715 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
716 && (gdbarch->inner_than == 0))
717 fprintf_unfiltered (log, "\n\tinner_than");
718 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
719 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
720 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
722 && (gdbarch->decr_pc_after_break == -1))
723 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
724 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
725 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
726 && (gdbarch->function_start_offset == -1))
727 fprintf_unfiltered (log, "\n\tfunction_start_offset");
728 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
729 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
730 && (gdbarch->frame_args_skip == -1))
731 fprintf_unfiltered (log, "\n\tframe_args_skip");
732 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
733 /* Skip verify of deprecated_frame_chain, has predicate */
734 /* Skip verify of deprecated_frame_chain_valid, has predicate */
735 /* Skip verify of deprecated_frame_saved_pc, has predicate */
736 /* Skip verify of unwind_pc, has predicate */
737 /* Skip verify of frame_args_address, invalid_p == 0 */
738 /* Skip verify of frame_locals_address, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
740 && (gdbarch->saved_pc_after_call == 0))
741 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
742 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
743 && (gdbarch->frame_num_args == 0))
744 fprintf_unfiltered (log, "\n\tframe_num_args");
745 /* Skip verify of stack_align, has predicate */
746 /* Skip verify of frame_align, has predicate */
747 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
748 /* Skip verify of reg_struct_has_addr, has predicate */
749 /* Skip verify of save_dummy_frame_tos, has predicate */
750 /* Skip verify of unwind_dummy_id, has predicate */
751 if (gdbarch->float_format == 0)
752 gdbarch->float_format = default_float_format (gdbarch);
753 if (gdbarch->double_format == 0)
754 gdbarch->double_format = default_double_format (gdbarch);
755 if (gdbarch->long_double_format == 0)
756 gdbarch->long_double_format = default_double_format (gdbarch);
757 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
758 /* Skip verify of addr_bits_remove, invalid_p == 0 */
759 /* Skip verify of smash_text_address, invalid_p == 0 */
760 /* Skip verify of software_single_step, has predicate */
761 /* Skip verify of print_insn, invalid_p == 0 */
762 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
763 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
764 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
765 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
766 /* Skip verify of sigtramp_start, has predicate */
767 /* Skip verify of sigtramp_end, has predicate */
768 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
769 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
770 /* Skip verify of dwarf2_build_frame_info, has predicate */
771 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
772 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
773 /* Skip verify of name_of_malloc, invalid_p == 0 */
774 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
775 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
776 /* Skip verify of address_class_type_flags, has predicate */
777 /* Skip verify of address_class_type_flags_to_name, has predicate */
778 /* Skip verify of address_class_name_to_type_flags, has predicate */
779 /* Skip verify of register_reggroup_p, invalid_p == 0 */
780 buf = ui_file_xstrdup (log, &dummy);
781 make_cleanup (xfree, buf);
782 if (strlen (buf) > 0)
783 internal_error (__FILE__, __LINE__,
784 "verify_gdbarch: the following are invalid ...%s",
786 do_cleanups (cleanups);
790 /* Print out the details of the current architecture. */
792 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
793 just happens to match the global variable ``current_gdbarch''. That
794 way macros refering to that variable get the local and not the global
795 version - ulgh. Once everything is parameterised with gdbarch, this
799 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
801 fprintf_unfiltered (file,
802 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
805 fprintf_unfiltered (file,
806 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
807 gdbarch_frame_align_p (current_gdbarch));
809 fprintf_unfiltered (file,
810 "gdbarch_dump: frame_align = 0x%08lx\n",
811 (long) current_gdbarch->frame_align);
813 fprintf_unfiltered (file,
814 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
815 (long) current_gdbarch->in_function_epilogue_p);
817 fprintf_unfiltered (file,
818 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
819 (long) current_gdbarch->register_reggroup_p);
821 fprintf_unfiltered (file,
822 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
823 gdbarch_pseudo_register_read_p (current_gdbarch));
825 fprintf_unfiltered (file,
826 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
827 (long) current_gdbarch->pseudo_register_read);
829 fprintf_unfiltered (file,
830 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
831 gdbarch_pseudo_register_write_p (current_gdbarch));
833 fprintf_unfiltered (file,
834 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
835 (long) current_gdbarch->pseudo_register_write);
837 fprintf_unfiltered (file,
838 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
839 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
841 fprintf_unfiltered (file,
842 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
843 (long) current_gdbarch->address_class_name_to_type_flags);
844 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
845 fprintf_unfiltered (file,
846 "gdbarch_dump: %s # %s\n",
847 "ADDRESS_CLASS_TYPE_FLAGS_P()",
848 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
849 fprintf_unfiltered (file,
850 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
851 ADDRESS_CLASS_TYPE_FLAGS_P ());
853 #ifdef ADDRESS_CLASS_TYPE_FLAGS
854 fprintf_unfiltered (file,
855 "gdbarch_dump: %s # %s\n",
856 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
857 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
859 fprintf_unfiltered (file,
860 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
861 (long) current_gdbarch->address_class_type_flags
862 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
865 fprintf_unfiltered (file,
866 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
867 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
871 (long) current_gdbarch->address_class_type_flags_to_name);
872 #ifdef ADDRESS_TO_POINTER
874 /* Macro might contain `[{}]' when not multi-arch */
875 fprintf_unfiltered (file,
876 "gdbarch_dump: %s # %s\n",
877 "ADDRESS_TO_POINTER(type, buf, addr)",
878 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
883 (long) current_gdbarch->address_to_pointer
884 /*ADDRESS_TO_POINTER ()*/);
886 #ifdef ADDR_BITS_REMOVE
887 fprintf_unfiltered (file,
888 "gdbarch_dump: %s # %s\n",
889 "ADDR_BITS_REMOVE(addr)",
890 XSTRING (ADDR_BITS_REMOVE (addr)));
892 fprintf_unfiltered (file,
893 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
894 (long) current_gdbarch->addr_bits_remove
895 /*ADDR_BITS_REMOVE ()*/);
897 #ifdef BELIEVE_PCC_PROMOTION
898 fprintf_unfiltered (file,
899 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
900 XSTRING (BELIEVE_PCC_PROMOTION));
901 fprintf_unfiltered (file,
902 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
903 BELIEVE_PCC_PROMOTION);
905 #ifdef BELIEVE_PCC_PROMOTION_TYPE
906 fprintf_unfiltered (file,
907 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
908 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
909 fprintf_unfiltered (file,
910 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
911 BELIEVE_PCC_PROMOTION_TYPE);
913 #ifdef BREAKPOINT_FROM_PC
914 fprintf_unfiltered (file,
915 "gdbarch_dump: %s # %s\n",
916 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
917 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
919 fprintf_unfiltered (file,
920 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
921 (long) current_gdbarch->breakpoint_from_pc
922 /*BREAKPOINT_FROM_PC ()*/);
924 #ifdef CALL_DUMMY_ADDRESS
925 fprintf_unfiltered (file,
926 "gdbarch_dump: %s # %s\n",
927 "CALL_DUMMY_ADDRESS()",
928 XSTRING (CALL_DUMMY_ADDRESS ()));
930 fprintf_unfiltered (file,
931 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
932 (long) current_gdbarch->call_dummy_address
933 /*CALL_DUMMY_ADDRESS ()*/);
935 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
936 fprintf_unfiltered (file,
937 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
938 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
939 fprintf_unfiltered (file,
940 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
941 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
943 #ifdef CALL_DUMMY_LENGTH
944 fprintf_unfiltered (file,
945 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
946 XSTRING (CALL_DUMMY_LENGTH));
947 if (gdbarch->call_dummy_length >= 0)
948 fprintf_unfiltered (file,
949 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
952 #ifdef CALL_DUMMY_LOCATION
953 fprintf_unfiltered (file,
954 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
955 XSTRING (CALL_DUMMY_LOCATION));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
958 CALL_DUMMY_LOCATION);
960 #ifdef CALL_DUMMY_START_OFFSET
961 fprintf_unfiltered (file,
962 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
963 XSTRING (CALL_DUMMY_START_OFFSET));
964 fprintf_unfiltered (file,
965 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
966 (long) CALL_DUMMY_START_OFFSET);
968 #ifdef CALL_DUMMY_WORDS
969 fprintf_unfiltered (file,
970 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
971 XSTRING (CALL_DUMMY_WORDS));
972 fprintf_unfiltered (file,
973 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
974 (long) CALL_DUMMY_WORDS);
976 #ifdef CANNOT_FETCH_REGISTER
977 fprintf_unfiltered (file,
978 "gdbarch_dump: %s # %s\n",
979 "CANNOT_FETCH_REGISTER(regnum)",
980 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
982 fprintf_unfiltered (file,
983 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
984 (long) current_gdbarch->cannot_fetch_register
985 /*CANNOT_FETCH_REGISTER ()*/);
987 #ifdef CANNOT_STEP_BREAKPOINT
988 fprintf_unfiltered (file,
989 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
990 XSTRING (CANNOT_STEP_BREAKPOINT));
991 fprintf_unfiltered (file,
992 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
993 CANNOT_STEP_BREAKPOINT);
995 #ifdef CANNOT_STORE_REGISTER
996 fprintf_unfiltered (file,
997 "gdbarch_dump: %s # %s\n",
998 "CANNOT_STORE_REGISTER(regnum)",
999 XSTRING (CANNOT_STORE_REGISTER (regnum)));
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
1003 (long) current_gdbarch->cannot_store_register
1004 /*CANNOT_STORE_REGISTER ()*/);
1006 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1008 /* Macro might contain `[{}]' when not multi-arch */
1009 fprintf_unfiltered (file,
1010 "gdbarch_dump: %s # %s\n",
1011 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1012 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1017 (long) current_gdbarch->coff_make_msymbol_special
1018 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1023 (long) current_gdbarch->construct_inferior_arguments);
1024 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: %s # %s\n",
1027 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1028 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1032 (long) current_gdbarch->convert_from_func_ptr_addr
1033 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1035 #ifdef CONVERT_REGISTER_P
1036 fprintf_unfiltered (file,
1037 "gdbarch_dump: %s # %s\n",
1038 "CONVERT_REGISTER_P(regnum)",
1039 XSTRING (CONVERT_REGISTER_P (regnum)));
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1043 (long) current_gdbarch->convert_register_p
1044 /*CONVERT_REGISTER_P ()*/);
1046 #ifdef DECR_PC_AFTER_BREAK
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1049 XSTRING (DECR_PC_AFTER_BREAK));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1052 (long) DECR_PC_AFTER_BREAK);
1054 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: %s # %s\n",
1057 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1058 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1059 fprintf_unfiltered (file,
1060 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1061 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1063 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1066 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1067 fprintf_unfiltered (file,
1068 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1069 DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1071 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: %s # %s\n",
1074 "DEPRECATED_DO_REGISTERS_INFO_P()",
1075 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1078 DEPRECATED_DO_REGISTERS_INFO_P ());
1080 #ifdef DEPRECATED_DO_REGISTERS_INFO
1082 /* Macro might contain `[{}]' when not multi-arch */
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: %s # %s\n",
1085 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1086 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1091 (long) current_gdbarch->deprecated_do_registers_info
1092 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1094 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1095 fprintf_unfiltered (file,
1096 "gdbarch_dump: %s # %s\n",
1097 "DEPRECATED_DUMMY_WRITE_SP_P()",
1098 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1101 DEPRECATED_DUMMY_WRITE_SP_P ());
1103 #ifdef DEPRECATED_DUMMY_WRITE_SP
1105 /* Macro might contain `[{}]' when not multi-arch */
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: %s # %s\n",
1108 "DEPRECATED_DUMMY_WRITE_SP(val)",
1109 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1112 fprintf_unfiltered (file,
1113 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1114 (long) current_gdbarch->deprecated_dummy_write_sp
1115 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1117 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1119 /* Macro might contain `[{}]' when not multi-arch */
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: %s # %s\n",
1122 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1123 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1128 (long) current_gdbarch->deprecated_extract_return_value
1129 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1131 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: %s # %s\n",
1134 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1135 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1138 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1140 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: %s # %s\n",
1143 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1144 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1146 fprintf_unfiltered (file,
1147 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1148 (long) current_gdbarch->deprecated_extract_struct_value_address
1149 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1151 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1152 fprintf_unfiltered (file,
1153 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1154 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1155 fprintf_unfiltered (file,
1156 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1157 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1159 #ifdef DEPRECATED_FRAME_CHAIN_P
1160 fprintf_unfiltered (file,
1161 "gdbarch_dump: %s # %s\n",
1162 "DEPRECATED_FRAME_CHAIN_P()",
1163 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1166 DEPRECATED_FRAME_CHAIN_P ());
1168 #ifdef DEPRECATED_FRAME_CHAIN
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: %s # %s\n",
1171 "DEPRECATED_FRAME_CHAIN(frame)",
1172 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1176 (long) current_gdbarch->deprecated_frame_chain
1177 /*DEPRECATED_FRAME_CHAIN ()*/);
1179 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1180 fprintf_unfiltered (file,
1181 "gdbarch_dump: %s # %s\n",
1182 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1183 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1186 DEPRECATED_FRAME_CHAIN_VALID_P ());
1188 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: %s # %s\n",
1191 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1192 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1196 (long) current_gdbarch->deprecated_frame_chain_valid
1197 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1199 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: %s # %s\n",
1202 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1203 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1204 fprintf_unfiltered (file,
1205 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1206 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1208 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1210 /* Macro might contain `[{}]' when not multi-arch */
1211 fprintf_unfiltered (file,
1212 "gdbarch_dump: %s # %s\n",
1213 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1214 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1219 (long) current_gdbarch->deprecated_frame_init_saved_regs
1220 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1222 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1223 fprintf_unfiltered (file,
1224 "gdbarch_dump: %s # %s\n",
1225 "DEPRECATED_FRAME_SAVED_PC_P()",
1226 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1227 fprintf_unfiltered (file,
1228 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1229 DEPRECATED_FRAME_SAVED_PC_P ());
1231 #ifdef DEPRECATED_FRAME_SAVED_PC
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: %s # %s\n",
1234 "DEPRECATED_FRAME_SAVED_PC(fi)",
1235 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1237 fprintf_unfiltered (file,
1238 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1239 (long) current_gdbarch->deprecated_frame_saved_pc
1240 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1242 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1243 fprintf_unfiltered (file,
1244 "gdbarch_dump: %s # %s\n",
1245 "DEPRECATED_GET_SAVED_REGISTER_P()",
1246 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1249 DEPRECATED_GET_SAVED_REGISTER_P ());
1251 #ifdef DEPRECATED_GET_SAVED_REGISTER
1253 /* Macro might contain `[{}]' when not multi-arch */
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: %s # %s\n",
1256 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1257 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1262 (long) current_gdbarch->deprecated_get_saved_register
1263 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1265 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: %s # %s\n",
1268 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1269 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1270 fprintf_unfiltered (file,
1271 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1272 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1274 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1276 /* Macro might contain `[{}]' when not multi-arch */
1277 fprintf_unfiltered (file,
1278 "gdbarch_dump: %s # %s\n",
1279 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1280 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1283 fprintf_unfiltered (file,
1284 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1285 (long) current_gdbarch->deprecated_init_extra_frame_info
1286 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1288 #ifdef DEPRECATED_INIT_FRAME_PC_P
1289 fprintf_unfiltered (file,
1290 "gdbarch_dump: %s # %s\n",
1291 "DEPRECATED_INIT_FRAME_PC_P()",
1292 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1293 fprintf_unfiltered (file,
1294 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1295 DEPRECATED_INIT_FRAME_PC_P ());
1297 #ifdef DEPRECATED_INIT_FRAME_PC
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: %s # %s\n",
1300 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1301 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1305 (long) current_gdbarch->deprecated_init_frame_pc
1306 /*DEPRECATED_INIT_FRAME_PC ()*/);
1308 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1309 fprintf_unfiltered (file,
1310 "gdbarch_dump: %s # %s\n",
1311 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1312 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1313 fprintf_unfiltered (file,
1314 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1315 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1317 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: %s # %s\n",
1320 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1321 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1325 (long) current_gdbarch->deprecated_init_frame_pc_first
1326 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1328 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1329 fprintf_unfiltered (file,
1330 "gdbarch_dump: %s # %s\n",
1331 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1332 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1333 fprintf_unfiltered (file,
1334 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1335 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1337 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1338 fprintf_unfiltered (file,
1339 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1340 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1343 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1345 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: %s # %s\n",
1348 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1349 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1352 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1354 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1357 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1358 fprintf_unfiltered (file,
1359 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1360 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1362 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: %s # %s\n",
1365 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1366 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1367 fprintf_unfiltered (file,
1368 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1369 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1371 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: %s # %s\n",
1374 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1375 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1379 (long) current_gdbarch->deprecated_pc_in_call_dummy
1380 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1382 #ifdef DEPRECATED_POP_FRAME_P
1383 fprintf_unfiltered (file,
1384 "gdbarch_dump: %s # %s\n",
1385 "DEPRECATED_POP_FRAME_P()",
1386 XSTRING (DEPRECATED_POP_FRAME_P ()));
1387 fprintf_unfiltered (file,
1388 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1389 DEPRECATED_POP_FRAME_P ());
1391 #ifdef DEPRECATED_POP_FRAME
1393 /* Macro might contain `[{}]' when not multi-arch */
1394 fprintf_unfiltered (file,
1395 "gdbarch_dump: %s # %s\n",
1396 "DEPRECATED_POP_FRAME(-)",
1397 XSTRING (DEPRECATED_POP_FRAME (-)));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1402 (long) current_gdbarch->deprecated_pop_frame
1403 /*DEPRECATED_POP_FRAME ()*/);
1405 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: %s # %s\n",
1408 "DEPRECATED_PUSH_ARGUMENTS_P()",
1409 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1410 fprintf_unfiltered (file,
1411 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1412 DEPRECATED_PUSH_ARGUMENTS_P ());
1414 #ifdef DEPRECATED_PUSH_ARGUMENTS
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: %s # %s\n",
1417 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1418 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1422 (long) current_gdbarch->deprecated_push_arguments
1423 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1425 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: %s # %s\n",
1428 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1429 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1432 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1434 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1436 /* Macro might contain `[{}]' when not multi-arch */
1437 fprintf_unfiltered (file,
1438 "gdbarch_dump: %s # %s\n",
1439 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1440 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1443 fprintf_unfiltered (file,
1444 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1445 (long) current_gdbarch->deprecated_push_dummy_frame
1446 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1448 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1449 fprintf_unfiltered (file,
1450 "gdbarch_dump: %s # %s\n",
1451 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1452 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1453 fprintf_unfiltered (file,
1454 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1455 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1457 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: %s # %s\n",
1460 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1461 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1465 (long) current_gdbarch->deprecated_push_return_address
1466 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1468 #ifdef DEPRECATED_STORE_RETURN_VALUE
1470 /* Macro might contain `[{}]' when not multi-arch */
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: %s # %s\n",
1473 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1474 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1479 (long) current_gdbarch->deprecated_store_return_value
1480 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1482 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: %s # %s\n",
1485 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1486 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1489 DEPRECATED_STORE_STRUCT_RETURN_P ());
1491 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1493 /* Macro might contain `[{}]' when not multi-arch */
1494 fprintf_unfiltered (file,
1495 "gdbarch_dump: %s # %s\n",
1496 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1497 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1500 fprintf_unfiltered (file,
1501 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1502 (long) current_gdbarch->deprecated_store_struct_return
1503 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1505 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1508 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1511 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1513 #ifdef DWARF2_BUILD_FRAME_INFO_P
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: %s # %s\n",
1516 "DWARF2_BUILD_FRAME_INFO_P()",
1517 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1520 DWARF2_BUILD_FRAME_INFO_P ());
1522 #ifdef DWARF2_BUILD_FRAME_INFO
1524 /* Macro might contain `[{}]' when not multi-arch */
1525 fprintf_unfiltered (file,
1526 "gdbarch_dump: %s # %s\n",
1527 "DWARF2_BUILD_FRAME_INFO(objfile)",
1528 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1533 (long) current_gdbarch->dwarf2_build_frame_info
1534 /*DWARF2_BUILD_FRAME_INFO ()*/);
1536 #ifdef DWARF2_REG_TO_REGNUM
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: %s # %s\n",
1539 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1540 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1544 (long) current_gdbarch->dwarf2_reg_to_regnum
1545 /*DWARF2_REG_TO_REGNUM ()*/);
1547 #ifdef DWARF_REG_TO_REGNUM
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: %s # %s\n",
1550 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1551 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1555 (long) current_gdbarch->dwarf_reg_to_regnum
1556 /*DWARF_REG_TO_REGNUM ()*/);
1558 #ifdef ECOFF_REG_TO_REGNUM
1559 fprintf_unfiltered (file,
1560 "gdbarch_dump: %s # %s\n",
1561 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1562 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1564 fprintf_unfiltered (file,
1565 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1566 (long) current_gdbarch->ecoff_reg_to_regnum
1567 /*ECOFF_REG_TO_REGNUM ()*/);
1569 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1571 /* Macro might contain `[{}]' when not multi-arch */
1572 fprintf_unfiltered (file,
1573 "gdbarch_dump: %s # %s\n",
1574 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1575 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1578 fprintf_unfiltered (file,
1579 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1580 (long) current_gdbarch->elf_make_msymbol_special
1581 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1583 #ifdef EXTRACT_RETURN_VALUE
1585 /* Macro might contain `[{}]' when not multi-arch */
1586 fprintf_unfiltered (file,
1587 "gdbarch_dump: %s # %s\n",
1588 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1589 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1592 fprintf_unfiltered (file,
1593 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1594 (long) current_gdbarch->extract_return_value
1595 /*EXTRACT_RETURN_VALUE ()*/);
1597 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1598 fprintf_unfiltered (file,
1599 "gdbarch_dump: %s # %s\n",
1600 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1601 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1602 fprintf_unfiltered (file,
1603 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1604 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1606 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: %s # %s\n",
1609 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1610 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1612 fprintf_unfiltered (file,
1613 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1614 (long) current_gdbarch->extract_struct_value_address
1615 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1617 #ifdef FIX_CALL_DUMMY_P
1618 fprintf_unfiltered (file,
1619 "gdbarch_dump: %s # %s\n",
1620 "FIX_CALL_DUMMY_P()",
1621 XSTRING (FIX_CALL_DUMMY_P ()));
1622 fprintf_unfiltered (file,
1623 "gdbarch_dump: FIX_CALL_DUMMY_P() = %d\n",
1624 FIX_CALL_DUMMY_P ());
1626 #ifdef FIX_CALL_DUMMY
1628 /* Macro might contain `[{}]' when not multi-arch */
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: %s # %s\n",
1631 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1632 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1635 fprintf_unfiltered (file,
1636 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1637 (long) current_gdbarch->fix_call_dummy
1638 /*FIX_CALL_DUMMY ()*/);
1641 fprintf_unfiltered (file,
1642 "gdbarch_dump: FP0_REGNUM # %s\n",
1643 XSTRING (FP0_REGNUM));
1644 fprintf_unfiltered (file,
1645 "gdbarch_dump: FP0_REGNUM = %d\n",
1649 fprintf_unfiltered (file,
1650 "gdbarch_dump: FP_REGNUM # %s\n",
1651 XSTRING (FP_REGNUM));
1652 fprintf_unfiltered (file,
1653 "gdbarch_dump: FP_REGNUM = %d\n",
1656 #ifdef FRAMELESS_FUNCTION_INVOCATION
1657 fprintf_unfiltered (file,
1658 "gdbarch_dump: %s # %s\n",
1659 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1660 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1662 fprintf_unfiltered (file,
1663 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1664 (long) current_gdbarch->frameless_function_invocation
1665 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1667 #ifdef FRAME_ARGS_ADDRESS
1668 fprintf_unfiltered (file,
1669 "gdbarch_dump: %s # %s\n",
1670 "FRAME_ARGS_ADDRESS(fi)",
1671 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1673 fprintf_unfiltered (file,
1674 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1675 (long) current_gdbarch->frame_args_address
1676 /*FRAME_ARGS_ADDRESS ()*/);
1678 #ifdef FRAME_ARGS_SKIP
1679 fprintf_unfiltered (file,
1680 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1681 XSTRING (FRAME_ARGS_SKIP));
1682 fprintf_unfiltered (file,
1683 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1684 (long) FRAME_ARGS_SKIP);
1686 #ifdef FRAME_LOCALS_ADDRESS
1687 fprintf_unfiltered (file,
1688 "gdbarch_dump: %s # %s\n",
1689 "FRAME_LOCALS_ADDRESS(fi)",
1690 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1694 (long) current_gdbarch->frame_locals_address
1695 /*FRAME_LOCALS_ADDRESS ()*/);
1697 #ifdef FRAME_NUM_ARGS
1698 fprintf_unfiltered (file,
1699 "gdbarch_dump: %s # %s\n",
1700 "FRAME_NUM_ARGS(frame)",
1701 XSTRING (FRAME_NUM_ARGS (frame)));
1703 fprintf_unfiltered (file,
1704 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1705 (long) current_gdbarch->frame_num_args
1706 /*FRAME_NUM_ARGS ()*/);
1708 #ifdef FUNCTION_START_OFFSET
1709 fprintf_unfiltered (file,
1710 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1711 XSTRING (FUNCTION_START_OFFSET));
1712 fprintf_unfiltered (file,
1713 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1714 (long) FUNCTION_START_OFFSET);
1716 #ifdef GET_LONGJMP_TARGET_P
1717 fprintf_unfiltered (file,
1718 "gdbarch_dump: %s # %s\n",
1719 "GET_LONGJMP_TARGET_P()",
1720 XSTRING (GET_LONGJMP_TARGET_P ()));
1721 fprintf_unfiltered (file,
1722 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1723 GET_LONGJMP_TARGET_P ());
1725 #ifdef GET_LONGJMP_TARGET
1726 fprintf_unfiltered (file,
1727 "gdbarch_dump: %s # %s\n",
1728 "GET_LONGJMP_TARGET(pc)",
1729 XSTRING (GET_LONGJMP_TARGET (pc)));
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1733 (long) current_gdbarch->get_longjmp_target
1734 /*GET_LONGJMP_TARGET ()*/);
1736 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1739 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1740 fprintf_unfiltered (file,
1741 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1742 HAVE_NONSTEPPABLE_WATCHPOINT);
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: %s # %s\n",
1747 "INNER_THAN(lhs, rhs)",
1748 XSTRING (INNER_THAN (lhs, rhs)));
1750 fprintf_unfiltered (file,
1751 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1752 (long) current_gdbarch->inner_than
1755 #ifdef INTEGER_TO_ADDRESS_P
1756 fprintf_unfiltered (file,
1757 "gdbarch_dump: %s # %s\n",
1758 "INTEGER_TO_ADDRESS_P()",
1759 XSTRING (INTEGER_TO_ADDRESS_P ()));
1760 fprintf_unfiltered (file,
1761 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1762 INTEGER_TO_ADDRESS_P ());
1764 #ifdef INTEGER_TO_ADDRESS
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: %s # %s\n",
1767 "INTEGER_TO_ADDRESS(type, buf)",
1768 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1770 fprintf_unfiltered (file,
1771 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1772 (long) current_gdbarch->integer_to_address
1773 /*INTEGER_TO_ADDRESS ()*/);
1775 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1776 fprintf_unfiltered (file,
1777 "gdbarch_dump: %s # %s\n",
1778 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1779 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1781 fprintf_unfiltered (file,
1782 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1783 (long) current_gdbarch->in_solib_call_trampoline
1784 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1786 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1787 fprintf_unfiltered (file,
1788 "gdbarch_dump: %s # %s\n",
1789 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1790 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1792 fprintf_unfiltered (file,
1793 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1794 (long) current_gdbarch->in_solib_return_trampoline
1795 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1797 #ifdef MEMORY_INSERT_BREAKPOINT
1798 fprintf_unfiltered (file,
1799 "gdbarch_dump: %s # %s\n",
1800 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1801 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1805 (long) current_gdbarch->memory_insert_breakpoint
1806 /*MEMORY_INSERT_BREAKPOINT ()*/);
1808 #ifdef MEMORY_REMOVE_BREAKPOINT
1809 fprintf_unfiltered (file,
1810 "gdbarch_dump: %s # %s\n",
1811 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1812 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1814 fprintf_unfiltered (file,
1815 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1816 (long) current_gdbarch->memory_remove_breakpoint
1817 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1819 #ifdef NAME_OF_MALLOC
1820 fprintf_unfiltered (file,
1821 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1822 XSTRING (NAME_OF_MALLOC));
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1828 fprintf_unfiltered (file,
1829 "gdbarch_dump: NPC_REGNUM # %s\n",
1830 XSTRING (NPC_REGNUM));
1831 fprintf_unfiltered (file,
1832 "gdbarch_dump: NPC_REGNUM = %d\n",
1835 #ifdef NUM_PSEUDO_REGS
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1838 XSTRING (NUM_PSEUDO_REGS));
1839 fprintf_unfiltered (file,
1840 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: NUM_REGS # %s\n",
1846 XSTRING (NUM_REGS));
1847 fprintf_unfiltered (file,
1848 "gdbarch_dump: NUM_REGS = %d\n",
1851 #ifdef PARM_BOUNDARY
1852 fprintf_unfiltered (file,
1853 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1854 XSTRING (PARM_BOUNDARY));
1855 fprintf_unfiltered (file,
1856 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1859 #ifdef PC_IN_SIGTRAMP
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: %s # %s\n",
1862 "PC_IN_SIGTRAMP(pc, name)",
1863 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1865 fprintf_unfiltered (file,
1866 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1867 (long) current_gdbarch->pc_in_sigtramp
1868 /*PC_IN_SIGTRAMP ()*/);
1871 fprintf_unfiltered (file,
1872 "gdbarch_dump: PC_REGNUM # %s\n",
1873 XSTRING (PC_REGNUM));
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: PC_REGNUM = %d\n",
1878 #ifdef POINTER_TO_ADDRESS
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: %s # %s\n",
1881 "POINTER_TO_ADDRESS(type, buf)",
1882 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1884 fprintf_unfiltered (file,
1885 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1886 (long) current_gdbarch->pointer_to_address
1887 /*POINTER_TO_ADDRESS ()*/);
1889 #ifdef PREPARE_TO_PROCEED
1890 fprintf_unfiltered (file,
1891 "gdbarch_dump: %s # %s\n",
1892 "PREPARE_TO_PROCEED(select_it)",
1893 XSTRING (PREPARE_TO_PROCEED (select_it)));
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1897 (long) current_gdbarch->prepare_to_proceed
1898 /*PREPARE_TO_PROCEED ()*/);
1901 fprintf_unfiltered (file,
1902 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1903 gdbarch_print_float_info_p (current_gdbarch));
1905 fprintf_unfiltered (file,
1906 "gdbarch_dump: print_float_info = 0x%08lx\n",
1907 (long) current_gdbarch->print_float_info);
1909 fprintf_unfiltered (file,
1910 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1911 (long) current_gdbarch->print_registers_info);
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1915 gdbarch_print_vector_info_p (current_gdbarch));
1917 fprintf_unfiltered (file,
1918 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1919 (long) current_gdbarch->print_vector_info);
1920 #ifdef PROLOGUE_FRAMELESS_P
1921 fprintf_unfiltered (file,
1922 "gdbarch_dump: %s # %s\n",
1923 "PROLOGUE_FRAMELESS_P(ip)",
1924 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1926 fprintf_unfiltered (file,
1927 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1928 (long) current_gdbarch->prologue_frameless_p
1929 /*PROLOGUE_FRAMELESS_P ()*/);
1932 fprintf_unfiltered (file,
1933 "gdbarch_dump: PS_REGNUM # %s\n",
1934 XSTRING (PS_REGNUM));
1935 fprintf_unfiltered (file,
1936 "gdbarch_dump: PS_REGNUM = %d\n",
1940 fprintf_unfiltered (file,
1941 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1942 gdbarch_push_dummy_call_p (current_gdbarch));
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1946 (long) current_gdbarch->push_dummy_call);
1947 #ifdef REGISTER_BYTE
1948 fprintf_unfiltered (file,
1949 "gdbarch_dump: %s # %s\n",
1950 "REGISTER_BYTE(reg_nr)",
1951 XSTRING (REGISTER_BYTE (reg_nr)));
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1955 (long) current_gdbarch->register_byte
1956 /*REGISTER_BYTE ()*/);
1958 #ifdef REGISTER_BYTES
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: REGISTER_BYTES # %s\n",
1961 XSTRING (REGISTER_BYTES));
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: REGISTER_BYTES = %d\n",
1966 #ifdef REGISTER_BYTES_OK_P
1967 fprintf_unfiltered (file,
1968 "gdbarch_dump: %s # %s\n",
1969 "REGISTER_BYTES_OK_P()",
1970 XSTRING (REGISTER_BYTES_OK_P ()));
1971 fprintf_unfiltered (file,
1972 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1973 REGISTER_BYTES_OK_P ());
1975 #ifdef REGISTER_BYTES_OK
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: %s # %s\n",
1978 "REGISTER_BYTES_OK(nr_bytes)",
1979 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1983 (long) current_gdbarch->register_bytes_ok
1984 /*REGISTER_BYTES_OK ()*/);
1986 #ifdef REGISTER_CONVERTIBLE
1987 fprintf_unfiltered (file,
1988 "gdbarch_dump: %s # %s\n",
1989 "REGISTER_CONVERTIBLE(nr)",
1990 XSTRING (REGISTER_CONVERTIBLE (nr)));
1992 fprintf_unfiltered (file,
1993 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
1994 (long) current_gdbarch->register_convertible
1995 /*REGISTER_CONVERTIBLE ()*/);
1997 #ifdef REGISTER_CONVERT_TO_RAW
1999 /* Macro might contain `[{}]' when not multi-arch */
2000 fprintf_unfiltered (file,
2001 "gdbarch_dump: %s # %s\n",
2002 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2003 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
2006 fprintf_unfiltered (file,
2007 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2008 (long) current_gdbarch->register_convert_to_raw
2009 /*REGISTER_CONVERT_TO_RAW ()*/);
2011 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2013 /* Macro might contain `[{}]' when not multi-arch */
2014 fprintf_unfiltered (file,
2015 "gdbarch_dump: %s # %s\n",
2016 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2017 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
2020 fprintf_unfiltered (file,
2021 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2022 (long) current_gdbarch->register_convert_to_virtual
2023 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2025 #ifdef REGISTER_NAME
2026 fprintf_unfiltered (file,
2027 "gdbarch_dump: %s # %s\n",
2028 "REGISTER_NAME(regnr)",
2029 XSTRING (REGISTER_NAME (regnr)));
2031 fprintf_unfiltered (file,
2032 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2033 (long) current_gdbarch->register_name
2034 /*REGISTER_NAME ()*/);
2036 #ifdef REGISTER_RAW_SIZE
2037 fprintf_unfiltered (file,
2038 "gdbarch_dump: %s # %s\n",
2039 "REGISTER_RAW_SIZE(reg_nr)",
2040 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2042 fprintf_unfiltered (file,
2043 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2044 (long) current_gdbarch->register_raw_size
2045 /*REGISTER_RAW_SIZE ()*/);
2047 #ifdef REGISTER_SIM_REGNO
2048 fprintf_unfiltered (file,
2049 "gdbarch_dump: %s # %s\n",
2050 "REGISTER_SIM_REGNO(reg_nr)",
2051 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2053 fprintf_unfiltered (file,
2054 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2055 (long) current_gdbarch->register_sim_regno
2056 /*REGISTER_SIM_REGNO ()*/);
2058 #ifdef REGISTER_SIZE
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: REGISTER_SIZE # %s\n",
2061 XSTRING (REGISTER_SIZE));
2062 fprintf_unfiltered (file,
2063 "gdbarch_dump: REGISTER_SIZE = %d\n",
2066 #ifdef REGISTER_TO_VALUE
2068 /* Macro might contain `[{}]' when not multi-arch */
2069 fprintf_unfiltered (file,
2070 "gdbarch_dump: %s # %s\n",
2071 "REGISTER_TO_VALUE(regnum, type, from, to)",
2072 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2075 fprintf_unfiltered (file,
2076 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2077 (long) current_gdbarch->register_to_value
2078 /*REGISTER_TO_VALUE ()*/);
2081 fprintf_unfiltered (file,
2082 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2083 gdbarch_register_type_p (current_gdbarch));
2085 fprintf_unfiltered (file,
2086 "gdbarch_dump: register_type = 0x%08lx\n",
2087 (long) current_gdbarch->register_type);
2088 #ifdef REGISTER_VIRTUAL_SIZE
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: %s # %s\n",
2091 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2092 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2094 fprintf_unfiltered (file,
2095 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2096 (long) current_gdbarch->register_virtual_size
2097 /*REGISTER_VIRTUAL_SIZE ()*/);
2099 #ifdef REGISTER_VIRTUAL_TYPE_P
2100 fprintf_unfiltered (file,
2101 "gdbarch_dump: %s # %s\n",
2102 "REGISTER_VIRTUAL_TYPE_P()",
2103 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2104 fprintf_unfiltered (file,
2105 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2106 REGISTER_VIRTUAL_TYPE_P ());
2108 #ifdef REGISTER_VIRTUAL_TYPE
2109 fprintf_unfiltered (file,
2110 "gdbarch_dump: %s # %s\n",
2111 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2112 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2114 fprintf_unfiltered (file,
2115 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2116 (long) current_gdbarch->register_virtual_type
2117 /*REGISTER_VIRTUAL_TYPE ()*/);
2119 #ifdef REG_STRUCT_HAS_ADDR_P
2120 fprintf_unfiltered (file,
2121 "gdbarch_dump: %s # %s\n",
2122 "REG_STRUCT_HAS_ADDR_P()",
2123 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2124 fprintf_unfiltered (file,
2125 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2126 REG_STRUCT_HAS_ADDR_P ());
2128 #ifdef REG_STRUCT_HAS_ADDR
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: %s # %s\n",
2131 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2132 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2134 fprintf_unfiltered (file,
2135 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2136 (long) current_gdbarch->reg_struct_has_addr
2137 /*REG_STRUCT_HAS_ADDR ()*/);
2139 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2141 /* Macro might contain `[{}]' when not multi-arch */
2142 fprintf_unfiltered (file,
2143 "gdbarch_dump: %s # %s\n",
2144 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2145 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2148 fprintf_unfiltered (file,
2149 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2150 (long) current_gdbarch->remote_translate_xfer_address
2151 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2153 #ifdef RETURN_VALUE_ON_STACK
2154 fprintf_unfiltered (file,
2155 "gdbarch_dump: %s # %s\n",
2156 "RETURN_VALUE_ON_STACK(type)",
2157 XSTRING (RETURN_VALUE_ON_STACK (type)));
2159 fprintf_unfiltered (file,
2160 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2161 (long) current_gdbarch->return_value_on_stack
2162 /*RETURN_VALUE_ON_STACK ()*/);
2164 #ifdef SAVED_PC_AFTER_CALL
2165 fprintf_unfiltered (file,
2166 "gdbarch_dump: %s # %s\n",
2167 "SAVED_PC_AFTER_CALL(frame)",
2168 XSTRING (SAVED_PC_AFTER_CALL (frame)));
2170 fprintf_unfiltered (file,
2171 "gdbarch_dump: SAVED_PC_AFTER_CALL = <0x%08lx>\n",
2172 (long) current_gdbarch->saved_pc_after_call
2173 /*SAVED_PC_AFTER_CALL ()*/);
2175 #ifdef SAVE_DUMMY_FRAME_TOS_P
2176 fprintf_unfiltered (file,
2177 "gdbarch_dump: %s # %s\n",
2178 "SAVE_DUMMY_FRAME_TOS_P()",
2179 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2180 fprintf_unfiltered (file,
2181 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2182 SAVE_DUMMY_FRAME_TOS_P ());
2184 #ifdef SAVE_DUMMY_FRAME_TOS
2186 /* Macro might contain `[{}]' when not multi-arch */
2187 fprintf_unfiltered (file,
2188 "gdbarch_dump: %s # %s\n",
2189 "SAVE_DUMMY_FRAME_TOS(sp)",
2190 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2193 fprintf_unfiltered (file,
2194 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2195 (long) current_gdbarch->save_dummy_frame_tos
2196 /*SAVE_DUMMY_FRAME_TOS ()*/);
2198 #ifdef SDB_REG_TO_REGNUM
2199 fprintf_unfiltered (file,
2200 "gdbarch_dump: %s # %s\n",
2201 "SDB_REG_TO_REGNUM(sdb_regnr)",
2202 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2204 fprintf_unfiltered (file,
2205 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2206 (long) current_gdbarch->sdb_reg_to_regnum
2207 /*SDB_REG_TO_REGNUM ()*/);
2209 #ifdef SIGTRAMP_END_P
2210 fprintf_unfiltered (file,
2211 "gdbarch_dump: %s # %s\n",
2213 XSTRING (SIGTRAMP_END_P ()));
2214 fprintf_unfiltered (file,
2215 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2219 fprintf_unfiltered (file,
2220 "gdbarch_dump: %s # %s\n",
2222 XSTRING (SIGTRAMP_END (pc)));
2224 fprintf_unfiltered (file,
2225 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2226 (long) current_gdbarch->sigtramp_end
2227 /*SIGTRAMP_END ()*/);
2229 #ifdef SIGTRAMP_START_P
2230 fprintf_unfiltered (file,
2231 "gdbarch_dump: %s # %s\n",
2232 "SIGTRAMP_START_P()",
2233 XSTRING (SIGTRAMP_START_P ()));
2234 fprintf_unfiltered (file,
2235 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2236 SIGTRAMP_START_P ());
2238 #ifdef SIGTRAMP_START
2239 fprintf_unfiltered (file,
2240 "gdbarch_dump: %s # %s\n",
2241 "SIGTRAMP_START(pc)",
2242 XSTRING (SIGTRAMP_START (pc)));
2244 fprintf_unfiltered (file,
2245 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2246 (long) current_gdbarch->sigtramp_start
2247 /*SIGTRAMP_START ()*/);
2249 #ifdef SIZEOF_CALL_DUMMY_WORDS
2250 fprintf_unfiltered (file,
2251 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2252 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
2253 fprintf_unfiltered (file,
2254 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = %d\n",
2255 SIZEOF_CALL_DUMMY_WORDS);
2257 #ifdef SKIP_PROLOGUE
2258 fprintf_unfiltered (file,
2259 "gdbarch_dump: %s # %s\n",
2260 "SKIP_PROLOGUE(ip)",
2261 XSTRING (SKIP_PROLOGUE (ip)));
2263 fprintf_unfiltered (file,
2264 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2265 (long) current_gdbarch->skip_prologue
2266 /*SKIP_PROLOGUE ()*/);
2268 #ifdef SKIP_TRAMPOLINE_CODE
2269 fprintf_unfiltered (file,
2270 "gdbarch_dump: %s # %s\n",
2271 "SKIP_TRAMPOLINE_CODE(pc)",
2272 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2274 fprintf_unfiltered (file,
2275 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2276 (long) current_gdbarch->skip_trampoline_code
2277 /*SKIP_TRAMPOLINE_CODE ()*/);
2279 #ifdef SMASH_TEXT_ADDRESS
2280 fprintf_unfiltered (file,
2281 "gdbarch_dump: %s # %s\n",
2282 "SMASH_TEXT_ADDRESS(addr)",
2283 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2285 fprintf_unfiltered (file,
2286 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2287 (long) current_gdbarch->smash_text_address
2288 /*SMASH_TEXT_ADDRESS ()*/);
2290 #ifdef SOFTWARE_SINGLE_STEP_P
2291 fprintf_unfiltered (file,
2292 "gdbarch_dump: %s # %s\n",
2293 "SOFTWARE_SINGLE_STEP_P()",
2294 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2295 fprintf_unfiltered (file,
2296 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2297 SOFTWARE_SINGLE_STEP_P ());
2299 #ifdef SOFTWARE_SINGLE_STEP
2301 /* Macro might contain `[{}]' when not multi-arch */
2302 fprintf_unfiltered (file,
2303 "gdbarch_dump: %s # %s\n",
2304 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2305 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2308 fprintf_unfiltered (file,
2309 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2310 (long) current_gdbarch->software_single_step
2311 /*SOFTWARE_SINGLE_STEP ()*/);
2314 fprintf_unfiltered (file,
2315 "gdbarch_dump: SP_REGNUM # %s\n",
2316 XSTRING (SP_REGNUM));
2317 fprintf_unfiltered (file,
2318 "gdbarch_dump: SP_REGNUM = %d\n",
2321 #ifdef STAB_REG_TO_REGNUM
2322 fprintf_unfiltered (file,
2323 "gdbarch_dump: %s # %s\n",
2324 "STAB_REG_TO_REGNUM(stab_regnr)",
2325 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2327 fprintf_unfiltered (file,
2328 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2329 (long) current_gdbarch->stab_reg_to_regnum
2330 /*STAB_REG_TO_REGNUM ()*/);
2332 #ifdef STACK_ALIGN_P
2333 fprintf_unfiltered (file,
2334 "gdbarch_dump: %s # %s\n",
2336 XSTRING (STACK_ALIGN_P ()));
2337 fprintf_unfiltered (file,
2338 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2342 fprintf_unfiltered (file,
2343 "gdbarch_dump: %s # %s\n",
2345 XSTRING (STACK_ALIGN (sp)));
2347 fprintf_unfiltered (file,
2348 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2349 (long) current_gdbarch->stack_align
2350 /*STACK_ALIGN ()*/);
2352 #ifdef STORE_RETURN_VALUE
2354 /* Macro might contain `[{}]' when not multi-arch */
2355 fprintf_unfiltered (file,
2356 "gdbarch_dump: %s # %s\n",
2357 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2358 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2361 fprintf_unfiltered (file,
2362 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2363 (long) current_gdbarch->store_return_value
2364 /*STORE_RETURN_VALUE ()*/);
2366 #ifdef TARGET_ADDR_BIT
2367 fprintf_unfiltered (file,
2368 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2369 XSTRING (TARGET_ADDR_BIT));
2370 fprintf_unfiltered (file,
2371 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2374 #ifdef TARGET_ARCHITECTURE
2375 fprintf_unfiltered (file,
2376 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2377 XSTRING (TARGET_ARCHITECTURE));
2378 if (TARGET_ARCHITECTURE != NULL)
2379 fprintf_unfiltered (file,
2380 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2381 TARGET_ARCHITECTURE->printable_name);
2383 #ifdef TARGET_BFD_VMA_BIT
2384 fprintf_unfiltered (file,
2385 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2386 XSTRING (TARGET_BFD_VMA_BIT));
2387 fprintf_unfiltered (file,
2388 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2389 TARGET_BFD_VMA_BIT);
2391 #ifdef TARGET_BYTE_ORDER
2392 fprintf_unfiltered (file,
2393 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2394 XSTRING (TARGET_BYTE_ORDER));
2395 fprintf_unfiltered (file,
2396 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2397 (long) TARGET_BYTE_ORDER);
2399 #ifdef TARGET_CHAR_SIGNED
2400 fprintf_unfiltered (file,
2401 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2402 XSTRING (TARGET_CHAR_SIGNED));
2403 fprintf_unfiltered (file,
2404 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2405 TARGET_CHAR_SIGNED);
2407 #ifdef TARGET_DOUBLE_BIT
2408 fprintf_unfiltered (file,
2409 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2410 XSTRING (TARGET_DOUBLE_BIT));
2411 fprintf_unfiltered (file,
2412 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2415 #ifdef TARGET_DOUBLE_FORMAT
2416 fprintf_unfiltered (file,
2417 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2418 XSTRING (TARGET_DOUBLE_FORMAT));
2419 fprintf_unfiltered (file,
2420 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2421 (TARGET_DOUBLE_FORMAT)->name);
2423 #ifdef TARGET_FLOAT_BIT
2424 fprintf_unfiltered (file,
2425 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2426 XSTRING (TARGET_FLOAT_BIT));
2427 fprintf_unfiltered (file,
2428 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2431 #ifdef TARGET_FLOAT_FORMAT
2432 fprintf_unfiltered (file,
2433 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2434 XSTRING (TARGET_FLOAT_FORMAT));
2435 fprintf_unfiltered (file,
2436 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2437 (TARGET_FLOAT_FORMAT)->name);
2439 #ifdef TARGET_INT_BIT
2440 fprintf_unfiltered (file,
2441 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2442 XSTRING (TARGET_INT_BIT));
2443 fprintf_unfiltered (file,
2444 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2447 #ifdef TARGET_LONG_BIT
2448 fprintf_unfiltered (file,
2449 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2450 XSTRING (TARGET_LONG_BIT));
2451 fprintf_unfiltered (file,
2452 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2455 #ifdef TARGET_LONG_DOUBLE_BIT
2456 fprintf_unfiltered (file,
2457 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2458 XSTRING (TARGET_LONG_DOUBLE_BIT));
2459 fprintf_unfiltered (file,
2460 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2461 TARGET_LONG_DOUBLE_BIT);
2463 #ifdef TARGET_LONG_DOUBLE_FORMAT
2464 fprintf_unfiltered (file,
2465 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2466 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2467 fprintf_unfiltered (file,
2468 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2469 (TARGET_LONG_DOUBLE_FORMAT)->name);
2471 #ifdef TARGET_LONG_LONG_BIT
2472 fprintf_unfiltered (file,
2473 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2474 XSTRING (TARGET_LONG_LONG_BIT));
2475 fprintf_unfiltered (file,
2476 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2477 TARGET_LONG_LONG_BIT);
2480 fprintf_unfiltered (file,
2481 "gdbarch_dump: TARGET_OSABI # %s\n",
2482 XSTRING (TARGET_OSABI));
2483 fprintf_unfiltered (file,
2484 "gdbarch_dump: TARGET_OSABI = %ld\n",
2485 (long) TARGET_OSABI);
2487 #ifdef TARGET_PRINT_INSN
2488 fprintf_unfiltered (file,
2489 "gdbarch_dump: %s # %s\n",
2490 "TARGET_PRINT_INSN(vma, info)",
2491 XSTRING (TARGET_PRINT_INSN (vma, info)));
2493 fprintf_unfiltered (file,
2494 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2495 (long) current_gdbarch->print_insn
2496 /*TARGET_PRINT_INSN ()*/);
2498 #ifdef TARGET_PTR_BIT
2499 fprintf_unfiltered (file,
2500 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2501 XSTRING (TARGET_PTR_BIT));
2502 fprintf_unfiltered (file,
2503 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2506 #ifdef TARGET_READ_FP
2507 fprintf_unfiltered (file,
2508 "gdbarch_dump: %s # %s\n",
2510 XSTRING (TARGET_READ_FP ()));
2512 fprintf_unfiltered (file,
2513 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2514 (long) current_gdbarch->read_fp
2515 /*TARGET_READ_FP ()*/);
2517 #ifdef TARGET_READ_PC
2518 fprintf_unfiltered (file,
2519 "gdbarch_dump: %s # %s\n",
2520 "TARGET_READ_PC(ptid)",
2521 XSTRING (TARGET_READ_PC (ptid)));
2523 fprintf_unfiltered (file,
2524 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2525 (long) current_gdbarch->read_pc
2526 /*TARGET_READ_PC ()*/);
2528 #ifdef TARGET_READ_SP
2529 fprintf_unfiltered (file,
2530 "gdbarch_dump: %s # %s\n",
2532 XSTRING (TARGET_READ_SP ()));
2534 fprintf_unfiltered (file,
2535 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2536 (long) current_gdbarch->read_sp
2537 /*TARGET_READ_SP ()*/);
2539 #ifdef TARGET_SHORT_BIT
2540 fprintf_unfiltered (file,
2541 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2542 XSTRING (TARGET_SHORT_BIT));
2543 fprintf_unfiltered (file,
2544 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2547 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2549 /* Macro might contain `[{}]' when not multi-arch */
2550 fprintf_unfiltered (file,
2551 "gdbarch_dump: %s # %s\n",
2552 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2553 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2556 fprintf_unfiltered (file,
2557 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2558 (long) current_gdbarch->virtual_frame_pointer
2559 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2561 #ifdef TARGET_WRITE_PC
2563 /* Macro might contain `[{}]' when not multi-arch */
2564 fprintf_unfiltered (file,
2565 "gdbarch_dump: %s # %s\n",
2566 "TARGET_WRITE_PC(val, ptid)",
2567 XSTRING (TARGET_WRITE_PC (val, ptid)));
2570 fprintf_unfiltered (file,
2571 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2572 (long) current_gdbarch->write_pc
2573 /*TARGET_WRITE_PC ()*/);
2576 fprintf_unfiltered (file,
2577 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2578 gdbarch_unwind_dummy_id_p (current_gdbarch));
2580 fprintf_unfiltered (file,
2581 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2582 (long) current_gdbarch->unwind_dummy_id);
2584 fprintf_unfiltered (file,
2585 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2586 gdbarch_unwind_pc_p (current_gdbarch));
2588 fprintf_unfiltered (file,
2589 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2590 (long) current_gdbarch->unwind_pc);
2591 #ifdef USE_STRUCT_CONVENTION
2592 fprintf_unfiltered (file,
2593 "gdbarch_dump: %s # %s\n",
2594 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2595 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2597 fprintf_unfiltered (file,
2598 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2599 (long) current_gdbarch->use_struct_convention
2600 /*USE_STRUCT_CONVENTION ()*/);
2602 #ifdef VALUE_TO_REGISTER
2604 /* Macro might contain `[{}]' when not multi-arch */
2605 fprintf_unfiltered (file,
2606 "gdbarch_dump: %s # %s\n",
2607 "VALUE_TO_REGISTER(type, regnum, from, to)",
2608 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2611 fprintf_unfiltered (file,
2612 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2613 (long) current_gdbarch->value_to_register
2614 /*VALUE_TO_REGISTER ()*/);
2616 if (current_gdbarch->dump_tdep != NULL)
2617 current_gdbarch->dump_tdep (current_gdbarch, file);
2620 struct gdbarch_tdep *
2621 gdbarch_tdep (struct gdbarch *gdbarch)
2623 if (gdbarch_debug >= 2)
2624 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2625 return gdbarch->tdep;
2629 const struct bfd_arch_info *
2630 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2632 gdb_assert (gdbarch != NULL);
2633 if (gdbarch_debug >= 2)
2634 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2635 return gdbarch->bfd_arch_info;
2639 gdbarch_byte_order (struct gdbarch *gdbarch)
2641 gdb_assert (gdbarch != NULL);
2642 if (gdbarch_debug >= 2)
2643 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2644 return gdbarch->byte_order;
2648 gdbarch_osabi (struct gdbarch *gdbarch)
2650 gdb_assert (gdbarch != NULL);
2651 if (gdbarch_debug >= 2)
2652 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2653 return gdbarch->osabi;
2657 gdbarch_short_bit (struct gdbarch *gdbarch)
2659 gdb_assert (gdbarch != NULL);
2660 /* Skip verify of short_bit, invalid_p == 0 */
2661 if (gdbarch_debug >= 2)
2662 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2663 return gdbarch->short_bit;
2667 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2670 gdbarch->short_bit = short_bit;
2674 gdbarch_int_bit (struct gdbarch *gdbarch)
2676 gdb_assert (gdbarch != NULL);
2677 /* Skip verify of int_bit, invalid_p == 0 */
2678 if (gdbarch_debug >= 2)
2679 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2680 return gdbarch->int_bit;
2684 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2687 gdbarch->int_bit = int_bit;
2691 gdbarch_long_bit (struct gdbarch *gdbarch)
2693 gdb_assert (gdbarch != NULL);
2694 /* Skip verify of long_bit, invalid_p == 0 */
2695 if (gdbarch_debug >= 2)
2696 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2697 return gdbarch->long_bit;
2701 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2704 gdbarch->long_bit = long_bit;
2708 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2710 gdb_assert (gdbarch != NULL);
2711 /* Skip verify of long_long_bit, invalid_p == 0 */
2712 if (gdbarch_debug >= 2)
2713 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2714 return gdbarch->long_long_bit;
2718 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2721 gdbarch->long_long_bit = long_long_bit;
2725 gdbarch_float_bit (struct gdbarch *gdbarch)
2727 gdb_assert (gdbarch != NULL);
2728 /* Skip verify of float_bit, invalid_p == 0 */
2729 if (gdbarch_debug >= 2)
2730 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2731 return gdbarch->float_bit;
2735 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2738 gdbarch->float_bit = float_bit;
2742 gdbarch_double_bit (struct gdbarch *gdbarch)
2744 gdb_assert (gdbarch != NULL);
2745 /* Skip verify of double_bit, invalid_p == 0 */
2746 if (gdbarch_debug >= 2)
2747 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2748 return gdbarch->double_bit;
2752 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2755 gdbarch->double_bit = double_bit;
2759 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2761 gdb_assert (gdbarch != NULL);
2762 /* Skip verify of long_double_bit, invalid_p == 0 */
2763 if (gdbarch_debug >= 2)
2764 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2765 return gdbarch->long_double_bit;
2769 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2770 int long_double_bit)
2772 gdbarch->long_double_bit = long_double_bit;
2776 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2778 gdb_assert (gdbarch != NULL);
2779 /* Skip verify of ptr_bit, invalid_p == 0 */
2780 if (gdbarch_debug >= 2)
2781 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2782 return gdbarch->ptr_bit;
2786 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2789 gdbarch->ptr_bit = ptr_bit;
2793 gdbarch_addr_bit (struct gdbarch *gdbarch)
2795 gdb_assert (gdbarch != NULL);
2796 if (gdbarch->addr_bit == 0)
2797 internal_error (__FILE__, __LINE__,
2798 "gdbarch: gdbarch_addr_bit invalid");
2799 if (gdbarch_debug >= 2)
2800 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2801 return gdbarch->addr_bit;
2805 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2808 gdbarch->addr_bit = addr_bit;
2812 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2814 gdb_assert (gdbarch != NULL);
2815 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2816 if (gdbarch_debug >= 2)
2817 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2818 return gdbarch->bfd_vma_bit;
2822 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2825 gdbarch->bfd_vma_bit = bfd_vma_bit;
2829 gdbarch_char_signed (struct gdbarch *gdbarch)
2831 gdb_assert (gdbarch != NULL);
2832 if (gdbarch->char_signed == -1)
2833 internal_error (__FILE__, __LINE__,
2834 "gdbarch: gdbarch_char_signed invalid");
2835 if (gdbarch_debug >= 2)
2836 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2837 return gdbarch->char_signed;
2841 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2844 gdbarch->char_signed = char_signed;
2848 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2850 gdb_assert (gdbarch != NULL);
2851 if (gdbarch->read_pc == 0)
2852 internal_error (__FILE__, __LINE__,
2853 "gdbarch: gdbarch_read_pc invalid");
2854 if (gdbarch_debug >= 2)
2855 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2856 return gdbarch->read_pc (ptid);
2860 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2861 gdbarch_read_pc_ftype read_pc)
2863 gdbarch->read_pc = read_pc;
2867 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2869 gdb_assert (gdbarch != NULL);
2870 if (gdbarch->write_pc == 0)
2871 internal_error (__FILE__, __LINE__,
2872 "gdbarch: gdbarch_write_pc invalid");
2873 if (gdbarch_debug >= 2)
2874 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2875 gdbarch->write_pc (val, ptid);
2879 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2880 gdbarch_write_pc_ftype write_pc)
2882 gdbarch->write_pc = write_pc;
2886 gdbarch_read_fp (struct gdbarch *gdbarch)
2888 gdb_assert (gdbarch != NULL);
2889 if (gdbarch->read_fp == 0)
2890 internal_error (__FILE__, __LINE__,
2891 "gdbarch: gdbarch_read_fp invalid");
2892 if (gdbarch_debug >= 2)
2893 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2894 return gdbarch->read_fp ();
2898 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2899 gdbarch_read_fp_ftype read_fp)
2901 gdbarch->read_fp = read_fp;
2905 gdbarch_read_sp (struct gdbarch *gdbarch)
2907 gdb_assert (gdbarch != NULL);
2908 if (gdbarch->read_sp == 0)
2909 internal_error (__FILE__, __LINE__,
2910 "gdbarch: gdbarch_read_sp invalid");
2911 if (gdbarch_debug >= 2)
2912 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2913 return gdbarch->read_sp ();
2917 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2918 gdbarch_read_sp_ftype read_sp)
2920 gdbarch->read_sp = read_sp;
2924 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2926 gdb_assert (gdbarch != NULL);
2927 return gdbarch->deprecated_dummy_write_sp != 0;
2931 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2933 gdb_assert (gdbarch != NULL);
2934 if (gdbarch->deprecated_dummy_write_sp == 0)
2935 internal_error (__FILE__, __LINE__,
2936 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
2937 if (gdbarch_debug >= 2)
2938 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2939 gdbarch->deprecated_dummy_write_sp (val);
2943 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2944 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
2946 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
2950 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2952 gdb_assert (gdbarch != NULL);
2953 if (gdbarch->virtual_frame_pointer == 0)
2954 internal_error (__FILE__, __LINE__,
2955 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2956 if (gdbarch_debug >= 2)
2957 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2958 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2962 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2963 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2965 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2969 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2971 gdb_assert (gdbarch != NULL);
2972 return gdbarch->pseudo_register_read != 0;
2976 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2978 gdb_assert (gdbarch != NULL);
2979 if (gdbarch->pseudo_register_read == 0)
2980 internal_error (__FILE__, __LINE__,
2981 "gdbarch: gdbarch_pseudo_register_read invalid");
2982 if (gdbarch_debug >= 2)
2983 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2984 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2988 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2989 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2991 gdbarch->pseudo_register_read = pseudo_register_read;
2995 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2997 gdb_assert (gdbarch != NULL);
2998 return gdbarch->pseudo_register_write != 0;
3002 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
3004 gdb_assert (gdbarch != NULL);
3005 if (gdbarch->pseudo_register_write == 0)
3006 internal_error (__FILE__, __LINE__,
3007 "gdbarch: gdbarch_pseudo_register_write invalid");
3008 if (gdbarch_debug >= 2)
3009 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3010 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
3014 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3015 gdbarch_pseudo_register_write_ftype pseudo_register_write)
3017 gdbarch->pseudo_register_write = pseudo_register_write;
3021 gdbarch_num_regs (struct gdbarch *gdbarch)
3023 gdb_assert (gdbarch != NULL);
3024 if (gdbarch->num_regs == -1)
3025 internal_error (__FILE__, __LINE__,
3026 "gdbarch: gdbarch_num_regs invalid");
3027 if (gdbarch_debug >= 2)
3028 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3029 return gdbarch->num_regs;
3033 set_gdbarch_num_regs (struct gdbarch *gdbarch,
3036 gdbarch->num_regs = num_regs;
3040 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3042 gdb_assert (gdbarch != NULL);
3043 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3044 if (gdbarch_debug >= 2)
3045 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3046 return gdbarch->num_pseudo_regs;
3050 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3051 int num_pseudo_regs)
3053 gdbarch->num_pseudo_regs = num_pseudo_regs;
3057 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3059 gdb_assert (gdbarch != NULL);
3060 /* Skip verify of sp_regnum, invalid_p == 0 */
3061 if (gdbarch_debug >= 2)
3062 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3063 return gdbarch->sp_regnum;
3067 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3070 gdbarch->sp_regnum = sp_regnum;
3074 gdbarch_fp_regnum (struct gdbarch *gdbarch)
3076 gdb_assert (gdbarch != NULL);
3077 /* Skip verify of fp_regnum, invalid_p == 0 */
3078 if (gdbarch_debug >= 2)
3079 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
3080 return gdbarch->fp_regnum;
3084 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
3087 gdbarch->fp_regnum = fp_regnum;
3091 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3093 gdb_assert (gdbarch != NULL);
3094 /* Skip verify of pc_regnum, invalid_p == 0 */
3095 if (gdbarch_debug >= 2)
3096 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3097 return gdbarch->pc_regnum;
3101 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3104 gdbarch->pc_regnum = pc_regnum;
3108 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3110 gdb_assert (gdbarch != NULL);
3111 /* Skip verify of ps_regnum, invalid_p == 0 */
3112 if (gdbarch_debug >= 2)
3113 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3114 return gdbarch->ps_regnum;
3118 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3121 gdbarch->ps_regnum = ps_regnum;
3125 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3127 gdb_assert (gdbarch != NULL);
3128 /* Skip verify of fp0_regnum, invalid_p == 0 */
3129 if (gdbarch_debug >= 2)
3130 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3131 return gdbarch->fp0_regnum;
3135 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3138 gdbarch->fp0_regnum = fp0_regnum;
3142 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3144 gdb_assert (gdbarch != NULL);
3145 /* Skip verify of npc_regnum, invalid_p == 0 */
3146 if (gdbarch_debug >= 2)
3147 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3148 return gdbarch->npc_regnum;
3152 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3155 gdbarch->npc_regnum = npc_regnum;
3159 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3161 gdb_assert (gdbarch != NULL);
3162 if (gdbarch->stab_reg_to_regnum == 0)
3163 internal_error (__FILE__, __LINE__,
3164 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3165 if (gdbarch_debug >= 2)
3166 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3167 return gdbarch->stab_reg_to_regnum (stab_regnr);
3171 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3172 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3174 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3178 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3180 gdb_assert (gdbarch != NULL);
3181 if (gdbarch->ecoff_reg_to_regnum == 0)
3182 internal_error (__FILE__, __LINE__,
3183 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3184 if (gdbarch_debug >= 2)
3185 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3186 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3190 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3191 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3193 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3197 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3199 gdb_assert (gdbarch != NULL);
3200 if (gdbarch->dwarf_reg_to_regnum == 0)
3201 internal_error (__FILE__, __LINE__,
3202 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3203 if (gdbarch_debug >= 2)
3204 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3205 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3209 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3210 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3212 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3216 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3218 gdb_assert (gdbarch != NULL);
3219 if (gdbarch->sdb_reg_to_regnum == 0)
3220 internal_error (__FILE__, __LINE__,
3221 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3222 if (gdbarch_debug >= 2)
3223 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3224 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3228 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3229 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3231 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3235 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3237 gdb_assert (gdbarch != NULL);
3238 if (gdbarch->dwarf2_reg_to_regnum == 0)
3239 internal_error (__FILE__, __LINE__,
3240 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3241 if (gdbarch_debug >= 2)
3242 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3243 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3247 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3248 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3250 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3254 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3256 gdb_assert (gdbarch != NULL);
3257 if (gdbarch->register_name == 0)
3258 internal_error (__FILE__, __LINE__,
3259 "gdbarch: gdbarch_register_name invalid");
3260 if (gdbarch_debug >= 2)
3261 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3262 return gdbarch->register_name (regnr);
3266 set_gdbarch_register_name (struct gdbarch *gdbarch,
3267 gdbarch_register_name_ftype register_name)
3269 gdbarch->register_name = register_name;
3273 gdbarch_register_size (struct gdbarch *gdbarch)
3275 gdb_assert (gdbarch != NULL);
3276 if (gdbarch->register_size == -1)
3277 internal_error (__FILE__, __LINE__,
3278 "gdbarch: gdbarch_register_size invalid");
3279 if (gdbarch_debug >= 2)
3280 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
3281 return gdbarch->register_size;
3285 set_gdbarch_register_size (struct gdbarch *gdbarch,
3288 gdbarch->register_size = register_size;
3292 gdbarch_register_bytes (struct gdbarch *gdbarch)
3294 gdb_assert (gdbarch != NULL);
3295 if (gdbarch->register_bytes == -1)
3296 internal_error (__FILE__, __LINE__,
3297 "gdbarch: gdbarch_register_bytes invalid");
3298 if (gdbarch_debug >= 2)
3299 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3300 return gdbarch->register_bytes;
3304 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3307 gdbarch->register_bytes = register_bytes;
3311 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3313 gdb_assert (gdbarch != NULL);
3314 if (gdbarch->register_byte == 0)
3315 internal_error (__FILE__, __LINE__,
3316 "gdbarch: gdbarch_register_byte invalid");
3317 if (gdbarch_debug >= 2)
3318 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3319 return gdbarch->register_byte (reg_nr);
3323 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3324 gdbarch_register_byte_ftype register_byte)
3326 gdbarch->register_byte = register_byte;
3330 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3332 gdb_assert (gdbarch != NULL);
3333 if (gdbarch->register_raw_size == 0)
3334 internal_error (__FILE__, __LINE__,
3335 "gdbarch: gdbarch_register_raw_size invalid");
3336 if (gdbarch_debug >= 2)
3337 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3338 return gdbarch->register_raw_size (reg_nr);
3342 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3343 gdbarch_register_raw_size_ftype register_raw_size)
3345 gdbarch->register_raw_size = register_raw_size;
3349 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3351 gdb_assert (gdbarch != NULL);
3352 return gdbarch->deprecated_max_register_raw_size != 0;
3356 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3358 gdb_assert (gdbarch != NULL);
3359 if (gdbarch_debug >= 2)
3360 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3361 return gdbarch->deprecated_max_register_raw_size;
3365 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3366 int deprecated_max_register_raw_size)
3368 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3372 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3374 gdb_assert (gdbarch != NULL);
3375 if (gdbarch->register_virtual_size == 0)
3376 internal_error (__FILE__, __LINE__,
3377 "gdbarch: gdbarch_register_virtual_size invalid");
3378 if (gdbarch_debug >= 2)
3379 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3380 return gdbarch->register_virtual_size (reg_nr);
3384 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3385 gdbarch_register_virtual_size_ftype register_virtual_size)
3387 gdbarch->register_virtual_size = register_virtual_size;
3391 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3393 gdb_assert (gdbarch != NULL);
3394 return gdbarch->deprecated_max_register_virtual_size != 0;
3398 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3400 gdb_assert (gdbarch != NULL);
3401 if (gdbarch_debug >= 2)
3402 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3403 return gdbarch->deprecated_max_register_virtual_size;
3407 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3408 int deprecated_max_register_virtual_size)
3410 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3414 gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
3416 gdb_assert (gdbarch != NULL);
3417 return gdbarch->register_virtual_type != 0;
3421 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3423 gdb_assert (gdbarch != NULL);
3424 if (gdbarch->register_virtual_type == 0)
3425 internal_error (__FILE__, __LINE__,
3426 "gdbarch: gdbarch_register_virtual_type invalid");
3427 if (gdbarch_debug >= 2)
3428 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3429 return gdbarch->register_virtual_type (reg_nr);
3433 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3434 gdbarch_register_virtual_type_ftype register_virtual_type)
3436 gdbarch->register_virtual_type = register_virtual_type;
3440 gdbarch_register_type_p (struct gdbarch *gdbarch)
3442 gdb_assert (gdbarch != NULL);
3443 return gdbarch->register_type != 0;
3447 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3449 gdb_assert (gdbarch != NULL);
3450 if (gdbarch->register_type == 0)
3451 internal_error (__FILE__, __LINE__,
3452 "gdbarch: gdbarch_register_type invalid");
3453 if (gdbarch_debug >= 2)
3454 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3455 return gdbarch->register_type (gdbarch, reg_nr);
3459 set_gdbarch_register_type (struct gdbarch *gdbarch,
3460 gdbarch_register_type_ftype register_type)
3462 gdbarch->register_type = register_type;
3466 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3468 gdb_assert (gdbarch != NULL);
3469 return gdbarch->deprecated_do_registers_info != 0;
3473 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3475 gdb_assert (gdbarch != NULL);
3476 if (gdbarch->deprecated_do_registers_info == 0)
3477 internal_error (__FILE__, __LINE__,
3478 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3479 if (gdbarch_debug >= 2)
3480 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3481 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3485 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3486 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3488 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3492 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3494 gdb_assert (gdbarch != NULL);
3495 if (gdbarch->print_registers_info == 0)
3496 internal_error (__FILE__, __LINE__,
3497 "gdbarch: gdbarch_print_registers_info invalid");
3498 if (gdbarch_debug >= 2)
3499 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3500 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3504 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3505 gdbarch_print_registers_info_ftype print_registers_info)
3507 gdbarch->print_registers_info = print_registers_info;
3511 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3513 gdb_assert (gdbarch != NULL);
3514 return gdbarch->print_float_info != 0;
3518 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3520 gdb_assert (gdbarch != NULL);
3521 if (gdbarch->print_float_info == 0)
3522 internal_error (__FILE__, __LINE__,
3523 "gdbarch: gdbarch_print_float_info invalid");
3524 if (gdbarch_debug >= 2)
3525 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3526 gdbarch->print_float_info (gdbarch, file, frame, args);
3530 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3531 gdbarch_print_float_info_ftype print_float_info)
3533 gdbarch->print_float_info = print_float_info;
3537 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3539 gdb_assert (gdbarch != NULL);
3540 return gdbarch->print_vector_info != 0;
3544 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3546 gdb_assert (gdbarch != NULL);
3547 if (gdbarch->print_vector_info == 0)
3548 internal_error (__FILE__, __LINE__,
3549 "gdbarch: gdbarch_print_vector_info invalid");
3550 if (gdbarch_debug >= 2)
3551 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3552 gdbarch->print_vector_info (gdbarch, file, frame, args);
3556 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3557 gdbarch_print_vector_info_ftype print_vector_info)
3559 gdbarch->print_vector_info = print_vector_info;
3563 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3565 gdb_assert (gdbarch != NULL);
3566 if (gdbarch->register_sim_regno == 0)
3567 internal_error (__FILE__, __LINE__,
3568 "gdbarch: gdbarch_register_sim_regno invalid");
3569 if (gdbarch_debug >= 2)
3570 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3571 return gdbarch->register_sim_regno (reg_nr);
3575 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3576 gdbarch_register_sim_regno_ftype register_sim_regno)
3578 gdbarch->register_sim_regno = register_sim_regno;
3582 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3584 gdb_assert (gdbarch != NULL);
3585 return gdbarch->register_bytes_ok != 0;
3589 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3591 gdb_assert (gdbarch != NULL);
3592 if (gdbarch->register_bytes_ok == 0)
3593 internal_error (__FILE__, __LINE__,
3594 "gdbarch: gdbarch_register_bytes_ok invalid");
3595 if (gdbarch_debug >= 2)
3596 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3597 return gdbarch->register_bytes_ok (nr_bytes);
3601 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3602 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3604 gdbarch->register_bytes_ok = register_bytes_ok;
3608 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3610 gdb_assert (gdbarch != NULL);
3611 if (gdbarch->cannot_fetch_register == 0)
3612 internal_error (__FILE__, __LINE__,
3613 "gdbarch: gdbarch_cannot_fetch_register invalid");
3614 if (gdbarch_debug >= 2)
3615 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3616 return gdbarch->cannot_fetch_register (regnum);
3620 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3621 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3623 gdbarch->cannot_fetch_register = cannot_fetch_register;
3627 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3629 gdb_assert (gdbarch != NULL);
3630 if (gdbarch->cannot_store_register == 0)
3631 internal_error (__FILE__, __LINE__,
3632 "gdbarch: gdbarch_cannot_store_register invalid");
3633 if (gdbarch_debug >= 2)
3634 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3635 return gdbarch->cannot_store_register (regnum);
3639 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3640 gdbarch_cannot_store_register_ftype cannot_store_register)
3642 gdbarch->cannot_store_register = cannot_store_register;
3646 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3648 gdb_assert (gdbarch != NULL);
3649 return gdbarch->get_longjmp_target != 0;
3653 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3655 gdb_assert (gdbarch != NULL);
3656 if (gdbarch->get_longjmp_target == 0)
3657 internal_error (__FILE__, __LINE__,
3658 "gdbarch: gdbarch_get_longjmp_target invalid");
3659 if (gdbarch_debug >= 2)
3660 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3661 return gdbarch->get_longjmp_target (pc);
3665 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3666 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3668 gdbarch->get_longjmp_target = get_longjmp_target;
3672 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3674 gdb_assert (gdbarch != NULL);
3675 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3676 if (gdbarch_debug >= 2)
3677 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3678 return gdbarch->deprecated_use_generic_dummy_frames;
3682 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3683 int deprecated_use_generic_dummy_frames)
3685 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3689 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3691 gdb_assert (gdbarch != NULL);
3692 /* Skip verify of call_dummy_location, invalid_p == 0 */
3693 if (gdbarch_debug >= 2)
3694 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3695 return gdbarch->call_dummy_location;
3699 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3700 int call_dummy_location)
3702 gdbarch->call_dummy_location = call_dummy_location;
3706 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3708 gdb_assert (gdbarch != NULL);
3709 if (gdbarch->call_dummy_address == 0)
3710 internal_error (__FILE__, __LINE__,
3711 "gdbarch: gdbarch_call_dummy_address invalid");
3712 if (gdbarch_debug >= 2)
3713 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3714 return gdbarch->call_dummy_address ();
3718 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3719 gdbarch_call_dummy_address_ftype call_dummy_address)
3721 gdbarch->call_dummy_address = call_dummy_address;
3725 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3727 gdb_assert (gdbarch != NULL);
3728 if (gdbarch->call_dummy_start_offset == -1)
3729 internal_error (__FILE__, __LINE__,
3730 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3731 if (gdbarch_debug >= 2)
3732 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3733 return gdbarch->call_dummy_start_offset;
3737 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3738 CORE_ADDR call_dummy_start_offset)
3740 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3744 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3746 gdb_assert (gdbarch != NULL);
3747 if (gdbarch_debug >= 2)
3748 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3749 return gdbarch->call_dummy_breakpoint_offset;
3753 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3754 CORE_ADDR call_dummy_breakpoint_offset)
3756 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3760 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3762 gdb_assert (gdbarch != NULL);
3763 if (gdbarch->call_dummy_length == -1)
3764 internal_error (__FILE__, __LINE__,
3765 "gdbarch: gdbarch_call_dummy_length invalid");
3766 if (gdbarch_debug >= 2)
3767 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3768 return gdbarch->call_dummy_length;
3772 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3773 int call_dummy_length)
3775 gdbarch->call_dummy_length = call_dummy_length;
3779 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3781 gdb_assert (gdbarch != NULL);
3782 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3786 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3788 gdb_assert (gdbarch != NULL);
3789 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3790 internal_error (__FILE__, __LINE__,
3791 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3792 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3793 if (gdbarch_debug >= 2)
3794 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3795 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3799 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3800 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3802 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3806 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3808 gdb_assert (gdbarch != NULL);
3809 /* Skip verify of call_dummy_words, invalid_p == 0 */
3810 if (gdbarch_debug >= 2)
3811 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3812 return gdbarch->call_dummy_words;
3816 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3817 LONGEST * call_dummy_words)
3819 gdbarch->call_dummy_words = call_dummy_words;
3823 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3825 gdb_assert (gdbarch != NULL);
3826 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3827 if (gdbarch_debug >= 2)
3828 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3829 return gdbarch->sizeof_call_dummy_words;
3833 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3834 int sizeof_call_dummy_words)
3836 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3840 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3842 gdb_assert (gdbarch != NULL);
3843 return gdbarch->deprecated_call_dummy_stack_adjust != 0;
3847 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3849 gdb_assert (gdbarch != NULL);
3850 if (gdbarch_debug >= 2)
3851 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3852 return gdbarch->deprecated_call_dummy_stack_adjust;
3856 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3857 int deprecated_call_dummy_stack_adjust)
3859 gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
3863 gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch)
3865 gdb_assert (gdbarch != NULL);
3866 return gdbarch->fix_call_dummy != 0;
3870 gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p)
3872 gdb_assert (gdbarch != NULL);
3873 if (gdbarch->fix_call_dummy == 0)
3874 internal_error (__FILE__, __LINE__,
3875 "gdbarch: gdbarch_fix_call_dummy invalid");
3876 if (gdbarch_debug >= 2)
3877 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3878 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3882 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3883 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3885 gdbarch->fix_call_dummy = fix_call_dummy;
3889 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3891 gdb_assert (gdbarch != NULL);
3892 return gdbarch->deprecated_init_frame_pc_first != 0;
3896 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3898 gdb_assert (gdbarch != NULL);
3899 if (gdbarch->deprecated_init_frame_pc_first == 0)
3900 internal_error (__FILE__, __LINE__,
3901 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3902 if (gdbarch_debug >= 2)
3903 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3904 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3908 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3909 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3911 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3915 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3917 gdb_assert (gdbarch != NULL);
3918 return gdbarch->deprecated_init_frame_pc != 0;
3922 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3924 gdb_assert (gdbarch != NULL);
3925 if (gdbarch->deprecated_init_frame_pc == 0)
3926 internal_error (__FILE__, __LINE__,
3927 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3928 if (gdbarch_debug >= 2)
3929 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3930 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3934 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3935 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3937 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3941 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3943 gdb_assert (gdbarch != NULL);
3944 if (gdbarch_debug >= 2)
3945 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3946 return gdbarch->believe_pcc_promotion;
3950 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3951 int believe_pcc_promotion)
3953 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3957 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3959 gdb_assert (gdbarch != NULL);
3960 if (gdbarch_debug >= 2)
3961 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3962 return gdbarch->believe_pcc_promotion_type;
3966 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3967 int believe_pcc_promotion_type)
3969 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3973 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3975 gdb_assert (gdbarch != NULL);
3976 return gdbarch->deprecated_get_saved_register != 0;
3980 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)
3982 gdb_assert (gdbarch != NULL);
3983 if (gdbarch->deprecated_get_saved_register == 0)
3984 internal_error (__FILE__, __LINE__,
3985 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
3986 if (gdbarch_debug >= 2)
3987 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3988 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3992 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3993 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3995 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3999 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
4001 gdb_assert (gdbarch != NULL);
4002 if (gdbarch->register_convertible == 0)
4003 internal_error (__FILE__, __LINE__,
4004 "gdbarch: gdbarch_register_convertible invalid");
4005 if (gdbarch_debug >= 2)
4006 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
4007 return gdbarch->register_convertible (nr);
4011 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
4012 gdbarch_register_convertible_ftype register_convertible)
4014 gdbarch->register_convertible = register_convertible;
4018 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4020 gdb_assert (gdbarch != NULL);
4021 if (gdbarch->register_convert_to_virtual == 0)
4022 internal_error (__FILE__, __LINE__,
4023 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4024 if (gdbarch_debug >= 2)
4025 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
4026 gdbarch->register_convert_to_virtual (regnum, type, from, to);
4030 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
4031 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
4033 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
4037 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4039 gdb_assert (gdbarch != NULL);
4040 if (gdbarch->register_convert_to_raw == 0)
4041 internal_error (__FILE__, __LINE__,
4042 "gdbarch: gdbarch_register_convert_to_raw invalid");
4043 if (gdbarch_debug >= 2)
4044 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
4045 gdbarch->register_convert_to_raw (type, regnum, from, to);
4049 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
4050 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
4052 gdbarch->register_convert_to_raw = register_convert_to_raw;
4056 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4058 gdb_assert (gdbarch != NULL);
4059 if (gdbarch->convert_register_p == 0)
4060 internal_error (__FILE__, __LINE__,
4061 "gdbarch: gdbarch_convert_register_p invalid");
4062 if (gdbarch_debug >= 2)
4063 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4064 return gdbarch->convert_register_p (regnum);
4068 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4069 gdbarch_convert_register_p_ftype convert_register_p)
4071 gdbarch->convert_register_p = convert_register_p;
4075 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4077 gdb_assert (gdbarch != NULL);
4078 if (gdbarch->register_to_value == 0)
4079 internal_error (__FILE__, __LINE__,
4080 "gdbarch: gdbarch_register_to_value invalid");
4081 if (gdbarch_debug >= 2)
4082 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4083 gdbarch->register_to_value (regnum, type, from, to);
4087 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4088 gdbarch_register_to_value_ftype register_to_value)
4090 gdbarch->register_to_value = register_to_value;
4094 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4096 gdb_assert (gdbarch != NULL);
4097 if (gdbarch->value_to_register == 0)
4098 internal_error (__FILE__, __LINE__,
4099 "gdbarch: gdbarch_value_to_register invalid");
4100 if (gdbarch_debug >= 2)
4101 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4102 gdbarch->value_to_register (type, regnum, from, to);
4106 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4107 gdbarch_value_to_register_ftype value_to_register)
4109 gdbarch->value_to_register = value_to_register;
4113 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4115 gdb_assert (gdbarch != NULL);
4116 if (gdbarch->pointer_to_address == 0)
4117 internal_error (__FILE__, __LINE__,
4118 "gdbarch: gdbarch_pointer_to_address invalid");
4119 if (gdbarch_debug >= 2)
4120 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4121 return gdbarch->pointer_to_address (type, buf);
4125 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4126 gdbarch_pointer_to_address_ftype pointer_to_address)
4128 gdbarch->pointer_to_address = pointer_to_address;
4132 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4134 gdb_assert (gdbarch != NULL);
4135 if (gdbarch->address_to_pointer == 0)
4136 internal_error (__FILE__, __LINE__,
4137 "gdbarch: gdbarch_address_to_pointer invalid");
4138 if (gdbarch_debug >= 2)
4139 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4140 gdbarch->address_to_pointer (type, buf, addr);
4144 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4145 gdbarch_address_to_pointer_ftype address_to_pointer)
4147 gdbarch->address_to_pointer = address_to_pointer;
4151 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4153 gdb_assert (gdbarch != NULL);
4154 return gdbarch->integer_to_address != 0;
4158 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4160 gdb_assert (gdbarch != NULL);
4161 if (gdbarch->integer_to_address == 0)
4162 internal_error (__FILE__, __LINE__,
4163 "gdbarch: gdbarch_integer_to_address invalid");
4164 if (gdbarch_debug >= 2)
4165 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4166 return gdbarch->integer_to_address (type, buf);
4170 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4171 gdbarch_integer_to_address_ftype integer_to_address)
4173 gdbarch->integer_to_address = integer_to_address;
4177 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4179 gdb_assert (gdbarch != NULL);
4180 if (gdbarch->return_value_on_stack == 0)
4181 internal_error (__FILE__, __LINE__,
4182 "gdbarch: gdbarch_return_value_on_stack invalid");
4183 if (gdbarch_debug >= 2)
4184 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4185 return gdbarch->return_value_on_stack (type);
4189 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4190 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4192 gdbarch->return_value_on_stack = return_value_on_stack;
4196 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
4198 gdb_assert (gdbarch != NULL);
4199 return gdbarch->deprecated_push_arguments != 0;
4203 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4205 gdb_assert (gdbarch != NULL);
4206 if (gdbarch->deprecated_push_arguments == 0)
4207 internal_error (__FILE__, __LINE__,
4208 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4209 if (gdbarch_debug >= 2)
4210 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
4211 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
4215 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
4216 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
4218 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
4222 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
4224 gdb_assert (gdbarch != NULL);
4225 return gdbarch->push_dummy_call != 0;
4229 gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR dummy_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4231 gdb_assert (gdbarch != NULL);
4232 if (gdbarch->push_dummy_call == 0)
4233 internal_error (__FILE__, __LINE__,
4234 "gdbarch: gdbarch_push_dummy_call invalid");
4235 if (gdbarch_debug >= 2)
4236 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
4237 return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr);
4241 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
4242 gdbarch_push_dummy_call_ftype push_dummy_call)
4244 gdbarch->push_dummy_call = push_dummy_call;
4248 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
4250 gdb_assert (gdbarch != NULL);
4251 return gdbarch->deprecated_push_dummy_frame != 0;
4255 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
4257 gdb_assert (gdbarch != NULL);
4258 if (gdbarch->deprecated_push_dummy_frame == 0)
4259 internal_error (__FILE__, __LINE__,
4260 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4261 if (gdbarch_debug >= 2)
4262 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
4263 gdbarch->deprecated_push_dummy_frame ();
4267 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
4268 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
4270 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
4274 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
4276 gdb_assert (gdbarch != NULL);
4277 return gdbarch->deprecated_push_return_address != 0;
4281 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4283 gdb_assert (gdbarch != NULL);
4284 if (gdbarch->deprecated_push_return_address == 0)
4285 internal_error (__FILE__, __LINE__,
4286 "gdbarch: gdbarch_deprecated_push_return_address invalid");
4287 if (gdbarch_debug >= 2)
4288 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
4289 return gdbarch->deprecated_push_return_address (pc, sp);
4293 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
4294 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
4296 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
4300 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
4302 gdb_assert (gdbarch != NULL);
4303 return gdbarch->deprecated_pop_frame != 0;
4307 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
4309 gdb_assert (gdbarch != NULL);
4310 if (gdbarch->deprecated_pop_frame == 0)
4311 internal_error (__FILE__, __LINE__,
4312 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4313 if (gdbarch_debug >= 2)
4314 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4315 gdbarch->deprecated_pop_frame ();
4319 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4320 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
4322 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
4326 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4328 gdb_assert (gdbarch != NULL);
4329 return gdbarch->deprecated_store_struct_return != 0;
4333 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4335 gdb_assert (gdbarch != NULL);
4336 if (gdbarch->deprecated_store_struct_return == 0)
4337 internal_error (__FILE__, __LINE__,
4338 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4339 if (gdbarch_debug >= 2)
4340 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4341 gdbarch->deprecated_store_struct_return (addr, sp);
4345 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4346 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
4348 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
4352 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4354 gdb_assert (gdbarch != NULL);
4355 if (gdbarch->extract_return_value == 0)
4356 internal_error (__FILE__, __LINE__,
4357 "gdbarch: gdbarch_extract_return_value invalid");
4358 if (gdbarch_debug >= 2)
4359 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4360 gdbarch->extract_return_value (type, regcache, valbuf);
4364 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4365 gdbarch_extract_return_value_ftype extract_return_value)
4367 gdbarch->extract_return_value = extract_return_value;
4371 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4373 gdb_assert (gdbarch != NULL);
4374 if (gdbarch->store_return_value == 0)
4375 internal_error (__FILE__, __LINE__,
4376 "gdbarch: gdbarch_store_return_value invalid");
4377 if (gdbarch_debug >= 2)
4378 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4379 gdbarch->store_return_value (type, regcache, valbuf);
4383 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4384 gdbarch_store_return_value_ftype store_return_value)
4386 gdbarch->store_return_value = store_return_value;
4390 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4392 gdb_assert (gdbarch != NULL);
4393 if (gdbarch->deprecated_extract_return_value == 0)
4394 internal_error (__FILE__, __LINE__,
4395 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4396 if (gdbarch_debug >= 2)
4397 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4398 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4402 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4403 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4405 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4409 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4411 gdb_assert (gdbarch != NULL);
4412 if (gdbarch->deprecated_store_return_value == 0)
4413 internal_error (__FILE__, __LINE__,
4414 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4415 if (gdbarch_debug >= 2)
4416 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4417 gdbarch->deprecated_store_return_value (type, valbuf);
4421 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4422 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4424 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4428 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4430 gdb_assert (gdbarch != NULL);
4431 return gdbarch->extract_struct_value_address != 0;
4435 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4437 gdb_assert (gdbarch != NULL);
4438 if (gdbarch->extract_struct_value_address == 0)
4439 internal_error (__FILE__, __LINE__,
4440 "gdbarch: gdbarch_extract_struct_value_address invalid");
4441 if (gdbarch_debug >= 2)
4442 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4443 return gdbarch->extract_struct_value_address (regcache);
4447 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4448 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4450 gdbarch->extract_struct_value_address = extract_struct_value_address;
4454 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4456 gdb_assert (gdbarch != NULL);
4457 return gdbarch->deprecated_extract_struct_value_address != 0;
4461 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4463 gdb_assert (gdbarch != NULL);
4464 if (gdbarch->deprecated_extract_struct_value_address == 0)
4465 internal_error (__FILE__, __LINE__,
4466 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4467 if (gdbarch_debug >= 2)
4468 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4469 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4473 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4474 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4476 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4480 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4482 gdb_assert (gdbarch != NULL);
4483 if (gdbarch->use_struct_convention == 0)
4484 internal_error (__FILE__, __LINE__,
4485 "gdbarch: gdbarch_use_struct_convention invalid");
4486 if (gdbarch_debug >= 2)
4487 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4488 return gdbarch->use_struct_convention (gcc_p, value_type);
4492 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4493 gdbarch_use_struct_convention_ftype use_struct_convention)
4495 gdbarch->use_struct_convention = use_struct_convention;
4499 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4501 gdb_assert (gdbarch != NULL);
4502 return gdbarch->deprecated_frame_init_saved_regs != 0;
4506 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4508 gdb_assert (gdbarch != NULL);
4509 if (gdbarch->deprecated_frame_init_saved_regs == 0)
4510 internal_error (__FILE__, __LINE__,
4511 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4512 if (gdbarch_debug >= 2)
4513 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4514 gdbarch->deprecated_frame_init_saved_regs (frame);
4518 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4519 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4521 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4525 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4527 gdb_assert (gdbarch != NULL);
4528 return gdbarch->deprecated_init_extra_frame_info != 0;
4532 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4534 gdb_assert (gdbarch != NULL);
4535 if (gdbarch->deprecated_init_extra_frame_info == 0)
4536 internal_error (__FILE__, __LINE__,
4537 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4538 if (gdbarch_debug >= 2)
4539 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4540 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4544 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4545 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4547 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4551 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4553 gdb_assert (gdbarch != NULL);
4554 if (gdbarch->skip_prologue == 0)
4555 internal_error (__FILE__, __LINE__,
4556 "gdbarch: gdbarch_skip_prologue invalid");
4557 if (gdbarch_debug >= 2)
4558 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4559 return gdbarch->skip_prologue (ip);
4563 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4564 gdbarch_skip_prologue_ftype skip_prologue)
4566 gdbarch->skip_prologue = skip_prologue;
4570 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4572 gdb_assert (gdbarch != NULL);
4573 if (gdbarch->prologue_frameless_p == 0)
4574 internal_error (__FILE__, __LINE__,
4575 "gdbarch: gdbarch_prologue_frameless_p invalid");
4576 if (gdbarch_debug >= 2)
4577 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4578 return gdbarch->prologue_frameless_p (ip);
4582 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4583 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4585 gdbarch->prologue_frameless_p = prologue_frameless_p;
4589 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4591 gdb_assert (gdbarch != NULL);
4592 if (gdbarch->inner_than == 0)
4593 internal_error (__FILE__, __LINE__,
4594 "gdbarch: gdbarch_inner_than invalid");
4595 if (gdbarch_debug >= 2)
4596 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4597 return gdbarch->inner_than (lhs, rhs);
4601 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4602 gdbarch_inner_than_ftype inner_than)
4604 gdbarch->inner_than = inner_than;
4607 const unsigned char *
4608 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4610 gdb_assert (gdbarch != NULL);
4611 if (gdbarch->breakpoint_from_pc == 0)
4612 internal_error (__FILE__, __LINE__,
4613 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4614 if (gdbarch_debug >= 2)
4615 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4616 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4620 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4621 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4623 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4627 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4629 gdb_assert (gdbarch != NULL);
4630 if (gdbarch->memory_insert_breakpoint == 0)
4631 internal_error (__FILE__, __LINE__,
4632 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4633 if (gdbarch_debug >= 2)
4634 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4635 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4639 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4640 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4642 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4646 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4648 gdb_assert (gdbarch != NULL);
4649 if (gdbarch->memory_remove_breakpoint == 0)
4650 internal_error (__FILE__, __LINE__,
4651 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4652 if (gdbarch_debug >= 2)
4653 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4654 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4658 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4659 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4661 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4665 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4667 gdb_assert (gdbarch != NULL);
4668 if (gdbarch->decr_pc_after_break == -1)
4669 internal_error (__FILE__, __LINE__,
4670 "gdbarch: gdbarch_decr_pc_after_break invalid");
4671 if (gdbarch_debug >= 2)
4672 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4673 return gdbarch->decr_pc_after_break;
4677 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4678 CORE_ADDR decr_pc_after_break)
4680 gdbarch->decr_pc_after_break = decr_pc_after_break;
4684 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4686 gdb_assert (gdbarch != NULL);
4687 if (gdbarch->prepare_to_proceed == 0)
4688 internal_error (__FILE__, __LINE__,
4689 "gdbarch: gdbarch_prepare_to_proceed invalid");
4690 if (gdbarch_debug >= 2)
4691 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4692 return gdbarch->prepare_to_proceed (select_it);
4696 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4697 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4699 gdbarch->prepare_to_proceed = prepare_to_proceed;
4703 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4705 gdb_assert (gdbarch != NULL);
4706 if (gdbarch->function_start_offset == -1)
4707 internal_error (__FILE__, __LINE__,
4708 "gdbarch: gdbarch_function_start_offset invalid");
4709 if (gdbarch_debug >= 2)
4710 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4711 return gdbarch->function_start_offset;
4715 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4716 CORE_ADDR function_start_offset)
4718 gdbarch->function_start_offset = function_start_offset;
4722 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4724 gdb_assert (gdbarch != NULL);
4725 if (gdbarch->remote_translate_xfer_address == 0)
4726 internal_error (__FILE__, __LINE__,
4727 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4728 if (gdbarch_debug >= 2)
4729 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4730 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4734 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4735 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4737 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4741 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4743 gdb_assert (gdbarch != NULL);
4744 if (gdbarch->frame_args_skip == -1)
4745 internal_error (__FILE__, __LINE__,
4746 "gdbarch: gdbarch_frame_args_skip invalid");
4747 if (gdbarch_debug >= 2)
4748 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4749 return gdbarch->frame_args_skip;
4753 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4754 CORE_ADDR frame_args_skip)
4756 gdbarch->frame_args_skip = frame_args_skip;
4760 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4762 gdb_assert (gdbarch != NULL);
4763 if (gdbarch->frameless_function_invocation == 0)
4764 internal_error (__FILE__, __LINE__,
4765 "gdbarch: gdbarch_frameless_function_invocation invalid");
4766 if (gdbarch_debug >= 2)
4767 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4768 return gdbarch->frameless_function_invocation (fi);
4772 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4773 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4775 gdbarch->frameless_function_invocation = frameless_function_invocation;
4779 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4781 gdb_assert (gdbarch != NULL);
4782 return gdbarch->deprecated_frame_chain != 0;
4786 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4788 gdb_assert (gdbarch != NULL);
4789 if (gdbarch->deprecated_frame_chain == 0)
4790 internal_error (__FILE__, __LINE__,
4791 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4792 if (gdbarch_debug >= 2)
4793 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4794 return gdbarch->deprecated_frame_chain (frame);
4798 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4799 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4801 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4805 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4807 gdb_assert (gdbarch != NULL);
4808 return gdbarch->deprecated_frame_chain_valid != 0;
4812 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4814 gdb_assert (gdbarch != NULL);
4815 if (gdbarch->deprecated_frame_chain_valid == 0)
4816 internal_error (__FILE__, __LINE__,
4817 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4818 if (gdbarch_debug >= 2)
4819 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4820 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4824 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4825 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4827 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4831 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4833 gdb_assert (gdbarch != NULL);
4834 return gdbarch->deprecated_frame_saved_pc != 0;
4838 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4840 gdb_assert (gdbarch != NULL);
4841 if (gdbarch->deprecated_frame_saved_pc == 0)
4842 internal_error (__FILE__, __LINE__,
4843 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4844 if (gdbarch_debug >= 2)
4845 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4846 return gdbarch->deprecated_frame_saved_pc (fi);
4850 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4851 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4853 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4857 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4859 gdb_assert (gdbarch != NULL);
4860 return gdbarch->unwind_pc != 0;
4864 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4866 gdb_assert (gdbarch != NULL);
4867 if (gdbarch->unwind_pc == 0)
4868 internal_error (__FILE__, __LINE__,
4869 "gdbarch: gdbarch_unwind_pc invalid");
4870 if (gdbarch_debug >= 2)
4871 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4872 return gdbarch->unwind_pc (gdbarch, next_frame);
4876 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4877 gdbarch_unwind_pc_ftype unwind_pc)
4879 gdbarch->unwind_pc = unwind_pc;
4883 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4885 gdb_assert (gdbarch != NULL);
4886 if (gdbarch->frame_args_address == 0)
4887 internal_error (__FILE__, __LINE__,
4888 "gdbarch: gdbarch_frame_args_address invalid");
4889 if (gdbarch_debug >= 2)
4890 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4891 return gdbarch->frame_args_address (fi);
4895 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4896 gdbarch_frame_args_address_ftype frame_args_address)
4898 gdbarch->frame_args_address = frame_args_address;
4902 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4904 gdb_assert (gdbarch != NULL);
4905 if (gdbarch->frame_locals_address == 0)
4906 internal_error (__FILE__, __LINE__,
4907 "gdbarch: gdbarch_frame_locals_address invalid");
4908 if (gdbarch_debug >= 2)
4909 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4910 return gdbarch->frame_locals_address (fi);
4914 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4915 gdbarch_frame_locals_address_ftype frame_locals_address)
4917 gdbarch->frame_locals_address = frame_locals_address;
4921 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4923 gdb_assert (gdbarch != NULL);
4924 if (gdbarch->saved_pc_after_call == 0)
4925 internal_error (__FILE__, __LINE__,
4926 "gdbarch: gdbarch_saved_pc_after_call invalid");
4927 if (gdbarch_debug >= 2)
4928 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4929 return gdbarch->saved_pc_after_call (frame);
4933 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4934 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4936 gdbarch->saved_pc_after_call = saved_pc_after_call;
4940 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4942 gdb_assert (gdbarch != NULL);
4943 if (gdbarch->frame_num_args == 0)
4944 internal_error (__FILE__, __LINE__,
4945 "gdbarch: gdbarch_frame_num_args invalid");
4946 if (gdbarch_debug >= 2)
4947 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4948 return gdbarch->frame_num_args (frame);
4952 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4953 gdbarch_frame_num_args_ftype frame_num_args)
4955 gdbarch->frame_num_args = frame_num_args;
4959 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4961 gdb_assert (gdbarch != NULL);
4962 return gdbarch->stack_align != 0;
4966 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4968 gdb_assert (gdbarch != NULL);
4969 if (gdbarch->stack_align == 0)
4970 internal_error (__FILE__, __LINE__,
4971 "gdbarch: gdbarch_stack_align invalid");
4972 if (gdbarch_debug >= 2)
4973 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4974 return gdbarch->stack_align (sp);
4978 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4979 gdbarch_stack_align_ftype stack_align)
4981 gdbarch->stack_align = stack_align;
4985 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4987 gdb_assert (gdbarch != NULL);
4988 return gdbarch->frame_align != 0;
4992 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4994 gdb_assert (gdbarch != NULL);
4995 if (gdbarch->frame_align == 0)
4996 internal_error (__FILE__, __LINE__,
4997 "gdbarch: gdbarch_frame_align invalid");
4998 if (gdbarch_debug >= 2)
4999 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
5000 return gdbarch->frame_align (gdbarch, address);
5004 set_gdbarch_frame_align (struct gdbarch *gdbarch,
5005 gdbarch_frame_align_ftype frame_align)
5007 gdbarch->frame_align = frame_align;
5011 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
5013 gdb_assert (gdbarch != NULL);
5014 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5015 if (gdbarch_debug >= 2)
5016 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5017 return gdbarch->deprecated_extra_stack_alignment_needed;
5021 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
5022 int deprecated_extra_stack_alignment_needed)
5024 gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
5028 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
5030 gdb_assert (gdbarch != NULL);
5031 return gdbarch->reg_struct_has_addr != 0;
5035 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
5037 gdb_assert (gdbarch != NULL);
5038 if (gdbarch->reg_struct_has_addr == 0)
5039 internal_error (__FILE__, __LINE__,
5040 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5041 if (gdbarch_debug >= 2)
5042 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
5043 return gdbarch->reg_struct_has_addr (gcc_p, type);
5047 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
5048 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
5050 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
5054 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
5056 gdb_assert (gdbarch != NULL);
5057 return gdbarch->save_dummy_frame_tos != 0;
5061 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
5063 gdb_assert (gdbarch != NULL);
5064 if (gdbarch->save_dummy_frame_tos == 0)
5065 internal_error (__FILE__, __LINE__,
5066 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5067 if (gdbarch_debug >= 2)
5068 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
5069 gdbarch->save_dummy_frame_tos (sp);
5073 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
5074 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
5076 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
5080 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
5082 gdb_assert (gdbarch != NULL);
5083 return gdbarch->unwind_dummy_id != 0;
5087 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
5089 gdb_assert (gdbarch != NULL);
5090 if (gdbarch->unwind_dummy_id == 0)
5091 internal_error (__FILE__, __LINE__,
5092 "gdbarch: gdbarch_unwind_dummy_id invalid");
5093 if (gdbarch_debug >= 2)
5094 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
5095 return gdbarch->unwind_dummy_id (gdbarch, info);
5099 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
5100 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
5102 gdbarch->unwind_dummy_id = unwind_dummy_id;
5106 gdbarch_parm_boundary (struct gdbarch *gdbarch)
5108 gdb_assert (gdbarch != NULL);
5109 if (gdbarch_debug >= 2)
5110 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5111 return gdbarch->parm_boundary;
5115 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5118 gdbarch->parm_boundary = parm_boundary;
5121 const struct floatformat *
5122 gdbarch_float_format (struct gdbarch *gdbarch)
5124 gdb_assert (gdbarch != NULL);
5125 if (gdbarch_debug >= 2)
5126 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5127 return gdbarch->float_format;
5131 set_gdbarch_float_format (struct gdbarch *gdbarch,
5132 const struct floatformat * float_format)
5134 gdbarch->float_format = float_format;
5137 const struct floatformat *
5138 gdbarch_double_format (struct gdbarch *gdbarch)
5140 gdb_assert (gdbarch != NULL);
5141 if (gdbarch_debug >= 2)
5142 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5143 return gdbarch->double_format;
5147 set_gdbarch_double_format (struct gdbarch *gdbarch,
5148 const struct floatformat * double_format)
5150 gdbarch->double_format = double_format;
5153 const struct floatformat *
5154 gdbarch_long_double_format (struct gdbarch *gdbarch)
5156 gdb_assert (gdbarch != NULL);
5157 if (gdbarch_debug >= 2)
5158 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5159 return gdbarch->long_double_format;
5163 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5164 const struct floatformat * long_double_format)
5166 gdbarch->long_double_format = long_double_format;
5170 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5172 gdb_assert (gdbarch != NULL);
5173 if (gdbarch->convert_from_func_ptr_addr == 0)
5174 internal_error (__FILE__, __LINE__,
5175 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5176 if (gdbarch_debug >= 2)
5177 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5178 return gdbarch->convert_from_func_ptr_addr (addr);
5182 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5183 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5185 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5189 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5191 gdb_assert (gdbarch != NULL);
5192 if (gdbarch->addr_bits_remove == 0)
5193 internal_error (__FILE__, __LINE__,
5194 "gdbarch: gdbarch_addr_bits_remove invalid");
5195 if (gdbarch_debug >= 2)
5196 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5197 return gdbarch->addr_bits_remove (addr);
5201 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5202 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5204 gdbarch->addr_bits_remove = addr_bits_remove;
5208 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5210 gdb_assert (gdbarch != NULL);
5211 if (gdbarch->smash_text_address == 0)
5212 internal_error (__FILE__, __LINE__,
5213 "gdbarch: gdbarch_smash_text_address invalid");
5214 if (gdbarch_debug >= 2)
5215 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5216 return gdbarch->smash_text_address (addr);
5220 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5221 gdbarch_smash_text_address_ftype smash_text_address)
5223 gdbarch->smash_text_address = smash_text_address;
5227 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5229 gdb_assert (gdbarch != NULL);
5230 return gdbarch->software_single_step != 0;
5234 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5236 gdb_assert (gdbarch != NULL);
5237 if (gdbarch->software_single_step == 0)
5238 internal_error (__FILE__, __LINE__,
5239 "gdbarch: gdbarch_software_single_step invalid");
5240 if (gdbarch_debug >= 2)
5241 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5242 gdbarch->software_single_step (sig, insert_breakpoints_p);
5246 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5247 gdbarch_software_single_step_ftype software_single_step)
5249 gdbarch->software_single_step = software_single_step;
5253 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5255 gdb_assert (gdbarch != NULL);
5256 if (gdbarch->print_insn == 0)
5257 internal_error (__FILE__, __LINE__,
5258 "gdbarch: gdbarch_print_insn invalid");
5259 if (gdbarch_debug >= 2)
5260 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5261 return gdbarch->print_insn (vma, info);
5265 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5266 gdbarch_print_insn_ftype print_insn)
5268 gdbarch->print_insn = print_insn;
5272 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5274 gdb_assert (gdbarch != NULL);
5275 if (gdbarch->skip_trampoline_code == 0)
5276 internal_error (__FILE__, __LINE__,
5277 "gdbarch: gdbarch_skip_trampoline_code invalid");
5278 if (gdbarch_debug >= 2)
5279 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5280 return gdbarch->skip_trampoline_code (pc);
5284 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5285 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5287 gdbarch->skip_trampoline_code = skip_trampoline_code;
5291 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5293 gdb_assert (gdbarch != NULL);
5294 if (gdbarch->in_solib_call_trampoline == 0)
5295 internal_error (__FILE__, __LINE__,
5296 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5297 if (gdbarch_debug >= 2)
5298 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5299 return gdbarch->in_solib_call_trampoline (pc, name);
5303 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5304 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5306 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5310 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5312 gdb_assert (gdbarch != NULL);
5313 if (gdbarch->in_solib_return_trampoline == 0)
5314 internal_error (__FILE__, __LINE__,
5315 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5316 if (gdbarch_debug >= 2)
5317 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5318 return gdbarch->in_solib_return_trampoline (pc, name);
5322 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5323 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5325 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5329 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5331 gdb_assert (gdbarch != NULL);
5332 if (gdbarch->pc_in_sigtramp == 0)
5333 internal_error (__FILE__, __LINE__,
5334 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5335 if (gdbarch_debug >= 2)
5336 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5337 return gdbarch->pc_in_sigtramp (pc, name);
5341 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5342 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5344 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5348 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5350 gdb_assert (gdbarch != NULL);
5351 return gdbarch->sigtramp_start != 0;
5355 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5357 gdb_assert (gdbarch != NULL);
5358 if (gdbarch->sigtramp_start == 0)
5359 internal_error (__FILE__, __LINE__,
5360 "gdbarch: gdbarch_sigtramp_start invalid");
5361 if (gdbarch_debug >= 2)
5362 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5363 return gdbarch->sigtramp_start (pc);
5367 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5368 gdbarch_sigtramp_start_ftype sigtramp_start)
5370 gdbarch->sigtramp_start = sigtramp_start;
5374 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5376 gdb_assert (gdbarch != NULL);
5377 return gdbarch->sigtramp_end != 0;
5381 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5383 gdb_assert (gdbarch != NULL);
5384 if (gdbarch->sigtramp_end == 0)
5385 internal_error (__FILE__, __LINE__,
5386 "gdbarch: gdbarch_sigtramp_end invalid");
5387 if (gdbarch_debug >= 2)
5388 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5389 return gdbarch->sigtramp_end (pc);
5393 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5394 gdbarch_sigtramp_end_ftype sigtramp_end)
5396 gdbarch->sigtramp_end = sigtramp_end;
5400 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5402 gdb_assert (gdbarch != NULL);
5403 if (gdbarch->in_function_epilogue_p == 0)
5404 internal_error (__FILE__, __LINE__,
5405 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5406 if (gdbarch_debug >= 2)
5407 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5408 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5412 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5413 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5415 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5419 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5421 gdb_assert (gdbarch != NULL);
5422 if (gdbarch->construct_inferior_arguments == 0)
5423 internal_error (__FILE__, __LINE__,
5424 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5425 if (gdbarch_debug >= 2)
5426 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5427 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5431 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5432 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5434 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5438 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5440 gdb_assert (gdbarch != NULL);
5441 return gdbarch->dwarf2_build_frame_info != 0;
5445 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5447 gdb_assert (gdbarch != NULL);
5448 if (gdbarch->dwarf2_build_frame_info == 0)
5449 internal_error (__FILE__, __LINE__,
5450 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5451 if (gdbarch_debug >= 2)
5452 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5453 gdbarch->dwarf2_build_frame_info (objfile);
5457 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5458 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5460 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5464 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5466 gdb_assert (gdbarch != NULL);
5467 if (gdbarch->elf_make_msymbol_special == 0)
5468 internal_error (__FILE__, __LINE__,
5469 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5470 if (gdbarch_debug >= 2)
5471 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5472 gdbarch->elf_make_msymbol_special (sym, msym);
5476 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5477 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5479 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5483 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5485 gdb_assert (gdbarch != NULL);
5486 if (gdbarch->coff_make_msymbol_special == 0)
5487 internal_error (__FILE__, __LINE__,
5488 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5489 if (gdbarch_debug >= 2)
5490 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5491 gdbarch->coff_make_msymbol_special (val, msym);
5495 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5496 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5498 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5502 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5504 gdb_assert (gdbarch != NULL);
5505 /* Skip verify of name_of_malloc, invalid_p == 0 */
5506 if (gdbarch_debug >= 2)
5507 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5508 return gdbarch->name_of_malloc;
5512 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5513 const char * name_of_malloc)
5515 gdbarch->name_of_malloc = name_of_malloc;
5519 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5521 gdb_assert (gdbarch != NULL);
5522 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5523 if (gdbarch_debug >= 2)
5524 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5525 return gdbarch->cannot_step_breakpoint;
5529 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5530 int cannot_step_breakpoint)
5532 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5536 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5538 gdb_assert (gdbarch != NULL);
5539 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5540 if (gdbarch_debug >= 2)
5541 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5542 return gdbarch->have_nonsteppable_watchpoint;
5546 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5547 int have_nonsteppable_watchpoint)
5549 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5553 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5555 gdb_assert (gdbarch != NULL);
5556 return gdbarch->address_class_type_flags != 0;
5560 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5562 gdb_assert (gdbarch != NULL);
5563 if (gdbarch->address_class_type_flags == 0)
5564 internal_error (__FILE__, __LINE__,
5565 "gdbarch: gdbarch_address_class_type_flags invalid");
5566 if (gdbarch_debug >= 2)
5567 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5568 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5572 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5573 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5575 gdbarch->address_class_type_flags = address_class_type_flags;
5579 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5581 gdb_assert (gdbarch != NULL);
5582 return gdbarch->address_class_type_flags_to_name != 0;
5586 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5588 gdb_assert (gdbarch != NULL);
5589 if (gdbarch->address_class_type_flags_to_name == 0)
5590 internal_error (__FILE__, __LINE__,
5591 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5592 if (gdbarch_debug >= 2)
5593 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5594 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5598 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5599 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5601 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5605 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5607 gdb_assert (gdbarch != NULL);
5608 return gdbarch->address_class_name_to_type_flags != 0;
5612 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5614 gdb_assert (gdbarch != NULL);
5615 if (gdbarch->address_class_name_to_type_flags == 0)
5616 internal_error (__FILE__, __LINE__,
5617 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5618 if (gdbarch_debug >= 2)
5619 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5620 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5624 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5625 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5627 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5631 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5633 gdb_assert (gdbarch != NULL);
5634 if (gdbarch->register_reggroup_p == 0)
5635 internal_error (__FILE__, __LINE__,
5636 "gdbarch: gdbarch_register_reggroup_p invalid");
5637 if (gdbarch_debug >= 2)
5638 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5639 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5643 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5644 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5646 gdbarch->register_reggroup_p = register_reggroup_p;
5650 /* Keep a registry of per-architecture data-pointers required by GDB
5657 gdbarch_data_init_ftype *init;
5658 gdbarch_data_free_ftype *free;
5661 struct gdbarch_data_registration
5663 struct gdbarch_data *data;
5664 struct gdbarch_data_registration *next;
5667 struct gdbarch_data_registry
5670 struct gdbarch_data_registration *registrations;
5673 struct gdbarch_data_registry gdbarch_data_registry =
5678 struct gdbarch_data *
5679 register_gdbarch_data (gdbarch_data_init_ftype *init,
5680 gdbarch_data_free_ftype *free)
5682 struct gdbarch_data_registration **curr;
5683 /* Append the new registraration. */
5684 for (curr = &gdbarch_data_registry.registrations;
5686 curr = &(*curr)->next);
5687 (*curr) = XMALLOC (struct gdbarch_data_registration);
5688 (*curr)->next = NULL;
5689 (*curr)->data = XMALLOC (struct gdbarch_data);
5690 (*curr)->data->index = gdbarch_data_registry.nr++;
5691 (*curr)->data->init = init;
5692 (*curr)->data->init_p = 1;
5693 (*curr)->data->free = free;
5694 return (*curr)->data;
5698 /* Create/delete the gdbarch data vector. */
5701 alloc_gdbarch_data (struct gdbarch *gdbarch)
5703 gdb_assert (gdbarch->data == NULL);
5704 gdbarch->nr_data = gdbarch_data_registry.nr;
5705 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5709 free_gdbarch_data (struct gdbarch *gdbarch)
5711 struct gdbarch_data_registration *rego;
5712 gdb_assert (gdbarch->data != NULL);
5713 for (rego = gdbarch_data_registry.registrations;
5717 struct gdbarch_data *data = rego->data;
5718 gdb_assert (data->index < gdbarch->nr_data);
5719 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5721 data->free (gdbarch, gdbarch->data[data->index]);
5722 gdbarch->data[data->index] = NULL;
5725 xfree (gdbarch->data);
5726 gdbarch->data = NULL;
5730 /* Initialize the current value of the specified per-architecture
5734 set_gdbarch_data (struct gdbarch *gdbarch,
5735 struct gdbarch_data *data,
5738 gdb_assert (data->index < gdbarch->nr_data);
5739 if (gdbarch->data[data->index] != NULL)
5741 gdb_assert (data->free != NULL);
5742 data->free (gdbarch, gdbarch->data[data->index]);
5744 gdbarch->data[data->index] = pointer;
5747 /* Return the current value of the specified per-architecture
5751 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5753 gdb_assert (data->index < gdbarch->nr_data);
5754 /* The data-pointer isn't initialized, call init() to get a value but
5755 only if the architecture initializaiton has completed. Otherwise
5756 punt - hope that the caller knows what they are doing. */
5757 if (gdbarch->data[data->index] == NULL
5758 && gdbarch->initialized_p)
5760 /* Be careful to detect an initialization cycle. */
5761 gdb_assert (data->init_p);
5763 gdb_assert (data->init != NULL);
5764 gdbarch->data[data->index] = data->init (gdbarch);
5766 gdb_assert (gdbarch->data[data->index] != NULL);
5768 return gdbarch->data[data->index];
5773 /* Keep a registry of swapped data required by GDB modules. */
5778 struct gdbarch_swap_registration *source;
5779 struct gdbarch_swap *next;
5782 struct gdbarch_swap_registration
5785 unsigned long sizeof_data;
5786 gdbarch_swap_ftype *init;
5787 struct gdbarch_swap_registration *next;
5790 struct gdbarch_swap_registry
5793 struct gdbarch_swap_registration *registrations;
5796 struct gdbarch_swap_registry gdbarch_swap_registry =
5802 register_gdbarch_swap (void *data,
5803 unsigned long sizeof_data,
5804 gdbarch_swap_ftype *init)
5806 struct gdbarch_swap_registration **rego;
5807 for (rego = &gdbarch_swap_registry.registrations;
5809 rego = &(*rego)->next);
5810 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5811 (*rego)->next = NULL;
5812 (*rego)->init = init;
5813 (*rego)->data = data;
5814 (*rego)->sizeof_data = sizeof_data;
5818 clear_gdbarch_swap (struct gdbarch *gdbarch)
5820 struct gdbarch_swap *curr;
5821 for (curr = gdbarch->swap;
5825 memset (curr->source->data, 0, curr->source->sizeof_data);
5830 init_gdbarch_swap (struct gdbarch *gdbarch)
5832 struct gdbarch_swap_registration *rego;
5833 struct gdbarch_swap **curr = &gdbarch->swap;
5834 for (rego = gdbarch_swap_registry.registrations;
5838 if (rego->data != NULL)
5840 (*curr) = XMALLOC (struct gdbarch_swap);
5841 (*curr)->source = rego;
5842 (*curr)->swap = xmalloc (rego->sizeof_data);
5843 (*curr)->next = NULL;
5844 curr = &(*curr)->next;
5846 if (rego->init != NULL)
5852 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5854 struct gdbarch_swap *curr;
5855 for (curr = gdbarch->swap;
5858 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5862 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5864 struct gdbarch_swap *curr;
5865 for (curr = gdbarch->swap;
5868 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5872 /* Keep a registry of the architectures known by GDB. */
5874 struct gdbarch_registration
5876 enum bfd_architecture bfd_architecture;
5877 gdbarch_init_ftype *init;
5878 gdbarch_dump_tdep_ftype *dump_tdep;
5879 struct gdbarch_list *arches;
5880 struct gdbarch_registration *next;
5883 static struct gdbarch_registration *gdbarch_registry = NULL;
5886 append_name (const char ***buf, int *nr, const char *name)
5888 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5894 gdbarch_printable_names (void)
5898 /* Accumulate a list of names based on the registed list of
5900 enum bfd_architecture a;
5902 const char **arches = NULL;
5903 struct gdbarch_registration *rego;
5904 for (rego = gdbarch_registry;
5908 const struct bfd_arch_info *ap;
5909 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5911 internal_error (__FILE__, __LINE__,
5912 "gdbarch_architecture_names: multi-arch unknown");
5915 append_name (&arches, &nr_arches, ap->printable_name);
5920 append_name (&arches, &nr_arches, NULL);
5924 /* Just return all the architectures that BFD knows. Assume that
5925 the legacy architecture framework supports them. */
5926 return bfd_arch_list ();
5931 gdbarch_register (enum bfd_architecture bfd_architecture,
5932 gdbarch_init_ftype *init,
5933 gdbarch_dump_tdep_ftype *dump_tdep)
5935 struct gdbarch_registration **curr;
5936 const struct bfd_arch_info *bfd_arch_info;
5937 /* Check that BFD recognizes this architecture */
5938 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5939 if (bfd_arch_info == NULL)
5941 internal_error (__FILE__, __LINE__,
5942 "gdbarch: Attempt to register unknown architecture (%d)",
5945 /* Check that we haven't seen this architecture before */
5946 for (curr = &gdbarch_registry;
5948 curr = &(*curr)->next)
5950 if (bfd_architecture == (*curr)->bfd_architecture)
5951 internal_error (__FILE__, __LINE__,
5952 "gdbarch: Duplicate registraration of architecture (%s)",
5953 bfd_arch_info->printable_name);
5957 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5958 bfd_arch_info->printable_name,
5961 (*curr) = XMALLOC (struct gdbarch_registration);
5962 (*curr)->bfd_architecture = bfd_architecture;
5963 (*curr)->init = init;
5964 (*curr)->dump_tdep = dump_tdep;
5965 (*curr)->arches = NULL;
5966 (*curr)->next = NULL;
5967 /* When non- multi-arch, install whatever target dump routine we've
5968 been provided - hopefully that routine has been written correctly
5969 and works regardless of multi-arch. */
5970 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5971 && startup_gdbarch.dump_tdep == NULL)
5972 startup_gdbarch.dump_tdep = dump_tdep;
5976 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5977 gdbarch_init_ftype *init)
5979 gdbarch_register (bfd_architecture, init, NULL);
5983 /* Look for an architecture using gdbarch_info. Base search on only
5984 BFD_ARCH_INFO and BYTE_ORDER. */
5986 struct gdbarch_list *
5987 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5988 const struct gdbarch_info *info)
5990 for (; arches != NULL; arches = arches->next)
5992 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5994 if (info->byte_order != arches->gdbarch->byte_order)
5996 if (info->osabi != arches->gdbarch->osabi)
6004 /* Update the current architecture. Return ZERO if the update request
6008 gdbarch_update_p (struct gdbarch_info info)
6010 struct gdbarch *new_gdbarch;
6011 struct gdbarch *old_gdbarch;
6012 struct gdbarch_registration *rego;
6014 /* Fill in missing parts of the INFO struct using a number of
6015 sources: ``set ...''; INFOabfd supplied; existing target. */
6017 /* ``(gdb) set architecture ...'' */
6018 if (info.bfd_arch_info == NULL
6019 && !TARGET_ARCHITECTURE_AUTO)
6020 info.bfd_arch_info = TARGET_ARCHITECTURE;
6021 if (info.bfd_arch_info == NULL
6022 && info.abfd != NULL
6023 && bfd_get_arch (info.abfd) != bfd_arch_unknown
6024 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
6025 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
6026 if (info.bfd_arch_info == NULL)
6027 info.bfd_arch_info = TARGET_ARCHITECTURE;
6029 /* ``(gdb) set byte-order ...'' */
6030 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6031 && !TARGET_BYTE_ORDER_AUTO)
6032 info.byte_order = TARGET_BYTE_ORDER;
6033 /* From the INFO struct. */
6034 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6035 && info.abfd != NULL)
6036 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
6037 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
6038 : BFD_ENDIAN_UNKNOWN);
6039 /* From the current target. */
6040 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
6041 info.byte_order = TARGET_BYTE_ORDER;
6043 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6044 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6045 info.osabi = gdbarch_lookup_osabi (info.abfd);
6046 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6047 info.osabi = current_gdbarch->osabi;
6049 /* Must have found some sort of architecture. */
6050 gdb_assert (info.bfd_arch_info != NULL);
6054 fprintf_unfiltered (gdb_stdlog,
6055 "gdbarch_update: info.bfd_arch_info %s\n",
6056 (info.bfd_arch_info != NULL
6057 ? info.bfd_arch_info->printable_name
6059 fprintf_unfiltered (gdb_stdlog,
6060 "gdbarch_update: info.byte_order %d (%s)\n",
6062 (info.byte_order == BFD_ENDIAN_BIG ? "big"
6063 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
6065 fprintf_unfiltered (gdb_stdlog,
6066 "gdbarch_update: info.osabi %d (%s)\n",
6067 info.osabi, gdbarch_osabi_name (info.osabi));
6068 fprintf_unfiltered (gdb_stdlog,
6069 "gdbarch_update: info.abfd 0x%lx\n",
6071 fprintf_unfiltered (gdb_stdlog,
6072 "gdbarch_update: info.tdep_info 0x%lx\n",
6073 (long) info.tdep_info);
6076 /* Find the target that knows about this architecture. */
6077 for (rego = gdbarch_registry;
6080 if (rego->bfd_architecture == info.bfd_arch_info->arch)
6085 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
6089 /* Swap the data belonging to the old target out setting the
6090 installed data to zero. This stops the ->init() function trying
6091 to refer to the previous architecture's global data structures. */
6092 swapout_gdbarch_swap (current_gdbarch);
6093 clear_gdbarch_swap (current_gdbarch);
6095 /* Save the previously selected architecture, setting the global to
6096 NULL. This stops ->init() trying to use the previous
6097 architecture's configuration. The previous architecture may not
6098 even be of the same architecture family. The most recent
6099 architecture of the same family is found at the head of the
6100 rego->arches list. */
6101 old_gdbarch = current_gdbarch;
6102 current_gdbarch = NULL;
6104 /* Ask the target for a replacement architecture. */
6105 new_gdbarch = rego->init (info, rego->arches);
6107 /* Did the target like it? No. Reject the change and revert to the
6108 old architecture. */
6109 if (new_gdbarch == NULL)
6112 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
6113 swapin_gdbarch_swap (old_gdbarch);
6114 current_gdbarch = old_gdbarch;
6118 /* Did the architecture change? No. Oops, put the old architecture
6120 if (old_gdbarch == new_gdbarch)
6123 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6125 new_gdbarch->bfd_arch_info->printable_name);
6126 swapin_gdbarch_swap (old_gdbarch);
6127 current_gdbarch = old_gdbarch;
6131 /* Is this a pre-existing architecture? Yes. Move it to the front
6132 of the list of architectures (keeping the list sorted Most
6133 Recently Used) and then copy it in. */
6135 struct gdbarch_list **list;
6136 for (list = ®o->arches;
6138 list = &(*list)->next)
6140 if ((*list)->gdbarch == new_gdbarch)
6142 struct gdbarch_list *this;
6144 fprintf_unfiltered (gdb_stdlog,
6145 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6147 new_gdbarch->bfd_arch_info->printable_name);
6150 (*list) = this->next;
6151 /* Insert in the front. */
6152 this->next = rego->arches;
6153 rego->arches = this;
6154 /* Copy the new architecture in. */
6155 current_gdbarch = new_gdbarch;
6156 swapin_gdbarch_swap (new_gdbarch);
6157 architecture_changed_event ();
6163 /* Prepend this new architecture to the architecture list (keep the
6164 list sorted Most Recently Used). */
6166 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6167 this->next = rego->arches;
6168 this->gdbarch = new_gdbarch;
6169 rego->arches = this;
6172 /* Switch to this new architecture marking it initialized. */
6173 current_gdbarch = new_gdbarch;
6174 current_gdbarch->initialized_p = 1;
6177 fprintf_unfiltered (gdb_stdlog,
6178 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6180 new_gdbarch->bfd_arch_info->printable_name);
6183 /* Check that the newly installed architecture is valid. Plug in
6184 any post init values. */
6185 new_gdbarch->dump_tdep = rego->dump_tdep;
6186 verify_gdbarch (new_gdbarch);
6188 /* Initialize the per-architecture memory (swap) areas.
6189 CURRENT_GDBARCH must be update before these modules are
6191 init_gdbarch_swap (new_gdbarch);
6193 /* Initialize the per-architecture data. CURRENT_GDBARCH
6194 must be updated before these modules are called. */
6195 architecture_changed_event ();
6198 gdbarch_dump (current_gdbarch, gdb_stdlog);
6206 /* Pointer to the target-dependent disassembly function. */
6207 int (*tm_print_insn) (bfd_vma, disassemble_info *);
6208 disassemble_info tm_print_insn_info;
6211 extern void _initialize_gdbarch (void);
6214 _initialize_gdbarch (void)
6216 struct cmd_list_element *c;
6218 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
6219 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
6220 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
6221 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
6222 tm_print_insn_info.print_address_func = dis_asm_print_address;
6224 add_show_from_set (add_set_cmd ("arch",
6227 (char *)&gdbarch_debug,
6228 "Set architecture debugging.\n\
6229 When non-zero, architecture debugging is enabled.", &setdebuglist),
6231 c = add_set_cmd ("archdebug",
6234 (char *)&gdbarch_debug,
6235 "Set architecture debugging.\n\
6236 When non-zero, architecture debugging is enabled.", &setlist);
6238 deprecate_cmd (c, "set debug arch");
6239 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");