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_deprecated_saved_pc_after_call_ftype *deprecated_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->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
531 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
532 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
533 current_gdbarch->register_convertible = generic_register_convertible_not;
534 current_gdbarch->convert_register_p = legacy_convert_register_p;
535 current_gdbarch->register_to_value = legacy_register_to_value;
536 current_gdbarch->value_to_register = legacy_value_to_register;
537 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
538 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
539 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
540 current_gdbarch->extract_return_value = legacy_extract_return_value;
541 current_gdbarch->store_return_value = legacy_store_return_value;
542 current_gdbarch->use_struct_convention = generic_use_struct_convention;
543 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
544 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
545 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
546 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
547 current_gdbarch->decr_pc_after_break = -1;
548 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
549 current_gdbarch->function_start_offset = -1;
550 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
551 current_gdbarch->frame_args_skip = -1;
552 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
553 current_gdbarch->frame_args_address = get_frame_base;
554 current_gdbarch->frame_locals_address = get_frame_base;
555 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
556 current_gdbarch->addr_bits_remove = core_addr_identity;
557 current_gdbarch->smash_text_address = core_addr_identity;
558 current_gdbarch->print_insn = legacy_print_insn;
559 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
560 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
561 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
562 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
563 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
564 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
565 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
566 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
567 current_gdbarch->name_of_malloc = "malloc";
568 current_gdbarch->register_reggroup_p = default_register_reggroup_p;
569 /* gdbarch_alloc() */
571 return current_gdbarch;
575 /* Free a gdbarch struct. This should never happen in normal
576 operation --- once you've created a gdbarch, you keep it around.
577 However, if an architecture's init function encounters an error
578 building the structure, it may need to clean up a partially
579 constructed gdbarch. */
582 gdbarch_free (struct gdbarch *arch)
584 gdb_assert (arch != NULL);
585 free_gdbarch_data (arch);
590 /* Ensure that all values in a GDBARCH are reasonable. */
593 verify_gdbarch (struct gdbarch *gdbarch)
596 struct cleanup *cleanups;
599 /* Only perform sanity checks on a multi-arch target. */
602 log = mem_fileopen ();
603 cleanups = make_cleanup_ui_file_delete (log);
605 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
606 fprintf_unfiltered (log, "\n\tbyte-order");
607 if (gdbarch->bfd_arch_info == NULL)
608 fprintf_unfiltered (log, "\n\tbfd_arch_info");
609 /* Check those that need to be defined for the given multi-arch level. */
610 /* Skip verify of short_bit, invalid_p == 0 */
611 /* Skip verify of int_bit, invalid_p == 0 */
612 /* Skip verify of long_bit, invalid_p == 0 */
613 /* Skip verify of long_long_bit, invalid_p == 0 */
614 /* Skip verify of float_bit, invalid_p == 0 */
615 /* Skip verify of double_bit, invalid_p == 0 */
616 /* Skip verify of long_double_bit, invalid_p == 0 */
617 /* Skip verify of ptr_bit, invalid_p == 0 */
618 if (gdbarch->addr_bit == 0)
619 gdbarch->addr_bit = TARGET_PTR_BIT;
620 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
621 if (gdbarch->char_signed == -1)
622 gdbarch->char_signed = 1;
623 /* Skip verify of read_pc, invalid_p == 0 */
624 /* Skip verify of write_pc, invalid_p == 0 */
625 /* Skip verify of read_fp, invalid_p == 0 */
626 /* Skip verify of read_sp, invalid_p == 0 */
627 /* Skip verify of deprecated_dummy_write_sp, has predicate */
628 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
629 /* Skip verify of pseudo_register_read, has predicate */
630 /* Skip verify of pseudo_register_write, has predicate */
631 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
632 && (gdbarch->num_regs == -1))
633 fprintf_unfiltered (log, "\n\tnum_regs");
634 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
635 /* Skip verify of sp_regnum, invalid_p == 0 */
636 /* Skip verify of fp_regnum, invalid_p == 0 */
637 /* Skip verify of pc_regnum, invalid_p == 0 */
638 /* Skip verify of ps_regnum, invalid_p == 0 */
639 /* Skip verify of fp0_regnum, invalid_p == 0 */
640 /* Skip verify of npc_regnum, invalid_p == 0 */
641 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
642 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
643 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
644 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
645 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
646 /* Skip verify of register_name, invalid_p == 0 */
647 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
648 && (gdbarch->register_size == -1))
649 fprintf_unfiltered (log, "\n\tregister_size");
650 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
651 && (gdbarch->register_bytes == -1))
652 fprintf_unfiltered (log, "\n\tregister_bytes");
653 /* Skip verify of register_byte, invalid_p == 0 */
654 /* Skip verify of register_raw_size, invalid_p == 0 */
655 /* Skip verify of deprecated_max_register_raw_size, has predicate */
656 /* Skip verify of register_virtual_size, invalid_p == 0 */
657 /* Skip verify of deprecated_max_register_virtual_size, has predicate */
658 /* Skip verify of register_virtual_type, has predicate */
659 /* Skip verify of register_type, has predicate */
660 /* Skip verify of deprecated_do_registers_info, has predicate */
661 /* Skip verify of print_registers_info, invalid_p == 0 */
662 /* Skip verify of print_float_info, has predicate */
663 /* Skip verify of print_vector_info, has predicate */
664 /* Skip verify of register_sim_regno, invalid_p == 0 */
665 /* Skip verify of register_bytes_ok, has predicate */
666 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
667 /* Skip verify of cannot_store_register, invalid_p == 0 */
668 /* Skip verify of get_longjmp_target, has predicate */
669 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
670 /* Skip verify of call_dummy_location, invalid_p == 0 */
671 /* Skip verify of call_dummy_address, invalid_p == 0 */
672 /* Skip verify of deprecated_pc_in_call_dummy, has predicate */
673 /* Skip verify of call_dummy_words, invalid_p == 0 */
674 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
675 /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
676 /* Skip verify of fix_call_dummy, has predicate */
677 /* Skip verify of deprecated_init_frame_pc_first, has predicate */
678 /* Skip verify of deprecated_init_frame_pc, has predicate */
679 /* Skip verify of deprecated_get_saved_register, has predicate */
680 /* Skip verify of register_convertible, invalid_p == 0 */
681 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
682 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
683 /* Skip verify of convert_register_p, invalid_p == 0 */
684 /* Skip verify of register_to_value, invalid_p == 0 */
685 /* Skip verify of value_to_register, invalid_p == 0 */
686 /* Skip verify of pointer_to_address, invalid_p == 0 */
687 /* Skip verify of address_to_pointer, invalid_p == 0 */
688 /* Skip verify of integer_to_address, has predicate */
689 /* Skip verify of return_value_on_stack, invalid_p == 0 */
690 /* Skip verify of deprecated_push_arguments, has predicate */
691 /* Skip verify of push_dummy_call, has predicate */
692 /* Skip verify of deprecated_push_dummy_frame, has predicate */
693 /* Skip verify of deprecated_push_return_address, has predicate */
694 /* Skip verify of deprecated_pop_frame, has predicate */
695 /* Skip verify of deprecated_store_struct_return, has predicate */
696 /* Skip verify of extract_return_value, invalid_p == 0 */
697 /* Skip verify of store_return_value, invalid_p == 0 */
698 /* Skip verify of extract_struct_value_address, has predicate */
699 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
700 /* Skip verify of use_struct_convention, invalid_p == 0 */
701 /* Skip verify of deprecated_frame_init_saved_regs, has predicate */
702 /* Skip verify of deprecated_init_extra_frame_info, has predicate */
703 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
704 && (gdbarch->skip_prologue == 0))
705 fprintf_unfiltered (log, "\n\tskip_prologue");
706 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
707 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
708 && (gdbarch->inner_than == 0))
709 fprintf_unfiltered (log, "\n\tinner_than");
710 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
711 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
712 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
713 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
714 && (gdbarch->decr_pc_after_break == -1))
715 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
716 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
717 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
718 && (gdbarch->function_start_offset == -1))
719 fprintf_unfiltered (log, "\n\tfunction_start_offset");
720 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
722 && (gdbarch->frame_args_skip == -1))
723 fprintf_unfiltered (log, "\n\tframe_args_skip");
724 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
725 /* Skip verify of deprecated_frame_chain, has predicate */
726 /* Skip verify of deprecated_frame_chain_valid, has predicate */
727 /* Skip verify of deprecated_frame_saved_pc, has predicate */
728 /* Skip verify of unwind_pc, has predicate */
729 /* Skip verify of frame_args_address, invalid_p == 0 */
730 /* Skip verify of frame_locals_address, invalid_p == 0 */
731 /* Skip verify of deprecated_saved_pc_after_call, has predicate */
732 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
733 && (gdbarch->frame_num_args == 0))
734 fprintf_unfiltered (log, "\n\tframe_num_args");
735 /* Skip verify of stack_align, has predicate */
736 /* Skip verify of frame_align, has predicate */
737 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
738 /* Skip verify of reg_struct_has_addr, has predicate */
739 /* Skip verify of save_dummy_frame_tos, has predicate */
740 /* Skip verify of unwind_dummy_id, has predicate */
741 if (gdbarch->float_format == 0)
742 gdbarch->float_format = default_float_format (gdbarch);
743 if (gdbarch->double_format == 0)
744 gdbarch->double_format = default_double_format (gdbarch);
745 if (gdbarch->long_double_format == 0)
746 gdbarch->long_double_format = default_double_format (gdbarch);
747 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
748 /* Skip verify of addr_bits_remove, invalid_p == 0 */
749 /* Skip verify of smash_text_address, invalid_p == 0 */
750 /* Skip verify of software_single_step, has predicate */
751 /* Skip verify of print_insn, invalid_p == 0 */
752 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
753 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
754 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
755 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
756 /* Skip verify of sigtramp_start, has predicate */
757 /* Skip verify of sigtramp_end, has predicate */
758 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
759 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
760 /* Skip verify of dwarf2_build_frame_info, has predicate */
761 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
762 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
763 /* Skip verify of name_of_malloc, invalid_p == 0 */
764 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
765 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
766 /* Skip verify of address_class_type_flags, has predicate */
767 /* Skip verify of address_class_type_flags_to_name, has predicate */
768 /* Skip verify of address_class_name_to_type_flags, has predicate */
769 /* Skip verify of register_reggroup_p, invalid_p == 0 */
770 buf = ui_file_xstrdup (log, &dummy);
771 make_cleanup (xfree, buf);
772 if (strlen (buf) > 0)
773 internal_error (__FILE__, __LINE__,
774 "verify_gdbarch: the following are invalid ...%s",
776 do_cleanups (cleanups);
780 /* Print out the details of the current architecture. */
782 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
783 just happens to match the global variable ``current_gdbarch''. That
784 way macros refering to that variable get the local and not the global
785 version - ulgh. Once everything is parameterised with gdbarch, this
789 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
791 fprintf_unfiltered (file,
792 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
795 fprintf_unfiltered (file,
796 "gdbarch_dump: gdbarch_frame_align_p() = %d\n",
797 gdbarch_frame_align_p (current_gdbarch));
799 fprintf_unfiltered (file,
800 "gdbarch_dump: frame_align = 0x%08lx\n",
801 (long) current_gdbarch->frame_align);
803 fprintf_unfiltered (file,
804 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
805 (long) current_gdbarch->in_function_epilogue_p);
807 fprintf_unfiltered (file,
808 "gdbarch_dump: register_reggroup_p = 0x%08lx\n",
809 (long) current_gdbarch->register_reggroup_p);
811 fprintf_unfiltered (file,
812 "gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
813 gdbarch_pseudo_register_read_p (current_gdbarch));
815 fprintf_unfiltered (file,
816 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
817 (long) current_gdbarch->pseudo_register_read);
819 fprintf_unfiltered (file,
820 "gdbarch_dump: gdbarch_pseudo_register_write_p() = %d\n",
821 gdbarch_pseudo_register_write_p (current_gdbarch));
823 fprintf_unfiltered (file,
824 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
825 (long) current_gdbarch->pseudo_register_write);
827 fprintf_unfiltered (file,
828 "gdbarch_dump: gdbarch_address_class_name_to_type_flags_p() = %d\n",
829 gdbarch_address_class_name_to_type_flags_p (current_gdbarch));
831 fprintf_unfiltered (file,
832 "gdbarch_dump: address_class_name_to_type_flags = 0x%08lx\n",
833 (long) current_gdbarch->address_class_name_to_type_flags);
834 #ifdef ADDRESS_CLASS_TYPE_FLAGS_P
835 fprintf_unfiltered (file,
836 "gdbarch_dump: %s # %s\n",
837 "ADDRESS_CLASS_TYPE_FLAGS_P()",
838 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_P ()));
839 fprintf_unfiltered (file,
840 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_P() = %d\n",
841 ADDRESS_CLASS_TYPE_FLAGS_P ());
843 #ifdef ADDRESS_CLASS_TYPE_FLAGS
844 fprintf_unfiltered (file,
845 "gdbarch_dump: %s # %s\n",
846 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
847 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
849 fprintf_unfiltered (file,
850 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = <0x%08lx>\n",
851 (long) current_gdbarch->address_class_type_flags
852 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
855 fprintf_unfiltered (file,
856 "gdbarch_dump: gdbarch_address_class_type_flags_to_name_p() = %d\n",
857 gdbarch_address_class_type_flags_to_name_p (current_gdbarch));
859 fprintf_unfiltered (file,
860 "gdbarch_dump: address_class_type_flags_to_name = 0x%08lx\n",
861 (long) current_gdbarch->address_class_type_flags_to_name);
862 #ifdef ADDRESS_TO_POINTER
864 /* Macro might contain `[{}]' when not multi-arch */
865 fprintf_unfiltered (file,
866 "gdbarch_dump: %s # %s\n",
867 "ADDRESS_TO_POINTER(type, buf, addr)",
868 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
871 fprintf_unfiltered (file,
872 "gdbarch_dump: ADDRESS_TO_POINTER = <0x%08lx>\n",
873 (long) current_gdbarch->address_to_pointer
874 /*ADDRESS_TO_POINTER ()*/);
876 #ifdef ADDR_BITS_REMOVE
877 fprintf_unfiltered (file,
878 "gdbarch_dump: %s # %s\n",
879 "ADDR_BITS_REMOVE(addr)",
880 XSTRING (ADDR_BITS_REMOVE (addr)));
882 fprintf_unfiltered (file,
883 "gdbarch_dump: ADDR_BITS_REMOVE = <0x%08lx>\n",
884 (long) current_gdbarch->addr_bits_remove
885 /*ADDR_BITS_REMOVE ()*/);
887 #ifdef BELIEVE_PCC_PROMOTION
888 fprintf_unfiltered (file,
889 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
890 XSTRING (BELIEVE_PCC_PROMOTION));
891 fprintf_unfiltered (file,
892 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
893 BELIEVE_PCC_PROMOTION);
895 #ifdef BELIEVE_PCC_PROMOTION_TYPE
896 fprintf_unfiltered (file,
897 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
898 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
901 BELIEVE_PCC_PROMOTION_TYPE);
903 #ifdef BREAKPOINT_FROM_PC
904 fprintf_unfiltered (file,
905 "gdbarch_dump: %s # %s\n",
906 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
907 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
909 fprintf_unfiltered (file,
910 "gdbarch_dump: BREAKPOINT_FROM_PC = <0x%08lx>\n",
911 (long) current_gdbarch->breakpoint_from_pc
912 /*BREAKPOINT_FROM_PC ()*/);
914 #ifdef CALL_DUMMY_ADDRESS
915 fprintf_unfiltered (file,
916 "gdbarch_dump: %s # %s\n",
917 "CALL_DUMMY_ADDRESS()",
918 XSTRING (CALL_DUMMY_ADDRESS ()));
920 fprintf_unfiltered (file,
921 "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n",
922 (long) current_gdbarch->call_dummy_address
923 /*CALL_DUMMY_ADDRESS ()*/);
925 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
926 fprintf_unfiltered (file,
927 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
928 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n",
931 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
933 #ifdef CALL_DUMMY_LENGTH
934 fprintf_unfiltered (file,
935 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
936 XSTRING (CALL_DUMMY_LENGTH));
937 fprintf_unfiltered (file,
938 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
941 #ifdef CALL_DUMMY_LOCATION
942 fprintf_unfiltered (file,
943 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
944 XSTRING (CALL_DUMMY_LOCATION));
945 fprintf_unfiltered (file,
946 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
947 CALL_DUMMY_LOCATION);
949 #ifdef CALL_DUMMY_START_OFFSET
950 fprintf_unfiltered (file,
951 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
952 XSTRING (CALL_DUMMY_START_OFFSET));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: CALL_DUMMY_START_OFFSET = %ld\n",
955 (long) CALL_DUMMY_START_OFFSET);
957 #ifdef CALL_DUMMY_WORDS
958 fprintf_unfiltered (file,
959 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
960 XSTRING (CALL_DUMMY_WORDS));
961 fprintf_unfiltered (file,
962 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
963 (long) CALL_DUMMY_WORDS);
965 #ifdef CANNOT_FETCH_REGISTER
966 fprintf_unfiltered (file,
967 "gdbarch_dump: %s # %s\n",
968 "CANNOT_FETCH_REGISTER(regnum)",
969 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: CANNOT_FETCH_REGISTER = <0x%08lx>\n",
973 (long) current_gdbarch->cannot_fetch_register
974 /*CANNOT_FETCH_REGISTER ()*/);
976 #ifdef CANNOT_STEP_BREAKPOINT
977 fprintf_unfiltered (file,
978 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
979 XSTRING (CANNOT_STEP_BREAKPOINT));
980 fprintf_unfiltered (file,
981 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
982 CANNOT_STEP_BREAKPOINT);
984 #ifdef CANNOT_STORE_REGISTER
985 fprintf_unfiltered (file,
986 "gdbarch_dump: %s # %s\n",
987 "CANNOT_STORE_REGISTER(regnum)",
988 XSTRING (CANNOT_STORE_REGISTER (regnum)));
990 fprintf_unfiltered (file,
991 "gdbarch_dump: CANNOT_STORE_REGISTER = <0x%08lx>\n",
992 (long) current_gdbarch->cannot_store_register
993 /*CANNOT_STORE_REGISTER ()*/);
995 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
997 /* Macro might contain `[{}]' when not multi-arch */
998 fprintf_unfiltered (file,
999 "gdbarch_dump: %s # %s\n",
1000 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1001 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1004 fprintf_unfiltered (file,
1005 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1006 (long) current_gdbarch->coff_make_msymbol_special
1007 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1012 (long) current_gdbarch->construct_inferior_arguments);
1013 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1014 fprintf_unfiltered (file,
1015 "gdbarch_dump: %s # %s\n",
1016 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1017 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1019 fprintf_unfiltered (file,
1020 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
1021 (long) current_gdbarch->convert_from_func_ptr_addr
1022 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1024 #ifdef CONVERT_REGISTER_P
1025 fprintf_unfiltered (file,
1026 "gdbarch_dump: %s # %s\n",
1027 "CONVERT_REGISTER_P(regnum)",
1028 XSTRING (CONVERT_REGISTER_P (regnum)));
1030 fprintf_unfiltered (file,
1031 "gdbarch_dump: CONVERT_REGISTER_P = <0x%08lx>\n",
1032 (long) current_gdbarch->convert_register_p
1033 /*CONVERT_REGISTER_P ()*/);
1035 #ifdef DECR_PC_AFTER_BREAK
1036 fprintf_unfiltered (file,
1037 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1038 XSTRING (DECR_PC_AFTER_BREAK));
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1041 (long) DECR_PC_AFTER_BREAK);
1043 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: %s # %s\n",
1046 "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
1047 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
1048 fprintf_unfiltered (file,
1049 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
1050 DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
1052 #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
1055 XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
1058 DEPRECATED_CALL_DUMMY_STACK_ADJUST);
1060 #ifdef DEPRECATED_DO_REGISTERS_INFO_P
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: %s # %s\n",
1063 "DEPRECATED_DO_REGISTERS_INFO_P()",
1064 XSTRING (DEPRECATED_DO_REGISTERS_INFO_P ()));
1065 fprintf_unfiltered (file,
1066 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO_P() = %d\n",
1067 DEPRECATED_DO_REGISTERS_INFO_P ());
1069 #ifdef DEPRECATED_DO_REGISTERS_INFO
1071 /* Macro might contain `[{}]' when not multi-arch */
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: %s # %s\n",
1074 "DEPRECATED_DO_REGISTERS_INFO(reg_nr, fpregs)",
1075 XSTRING (DEPRECATED_DO_REGISTERS_INFO (reg_nr, fpregs)));
1078 fprintf_unfiltered (file,
1079 "gdbarch_dump: DEPRECATED_DO_REGISTERS_INFO = <0x%08lx>\n",
1080 (long) current_gdbarch->deprecated_do_registers_info
1081 /*DEPRECATED_DO_REGISTERS_INFO ()*/);
1083 #ifdef DEPRECATED_DUMMY_WRITE_SP_P
1084 fprintf_unfiltered (file,
1085 "gdbarch_dump: %s # %s\n",
1086 "DEPRECATED_DUMMY_WRITE_SP_P()",
1087 XSTRING (DEPRECATED_DUMMY_WRITE_SP_P ()));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP_P() = %d\n",
1090 DEPRECATED_DUMMY_WRITE_SP_P ());
1092 #ifdef DEPRECATED_DUMMY_WRITE_SP
1094 /* Macro might contain `[{}]' when not multi-arch */
1095 fprintf_unfiltered (file,
1096 "gdbarch_dump: %s # %s\n",
1097 "DEPRECATED_DUMMY_WRITE_SP(val)",
1098 XSTRING (DEPRECATED_DUMMY_WRITE_SP (val)));
1101 fprintf_unfiltered (file,
1102 "gdbarch_dump: DEPRECATED_DUMMY_WRITE_SP = <0x%08lx>\n",
1103 (long) current_gdbarch->deprecated_dummy_write_sp
1104 /*DEPRECATED_DUMMY_WRITE_SP ()*/);
1106 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1108 /* Macro might contain `[{}]' when not multi-arch */
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: %s # %s\n",
1111 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1112 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1117 (long) current_gdbarch->deprecated_extract_return_value
1118 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1120 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: %s # %s\n",
1123 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1124 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1127 DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1129 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: %s # %s\n",
1132 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1133 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1137 (long) current_gdbarch->deprecated_extract_struct_value_address
1138 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1140 #ifdef DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1143 XSTRING (DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED));
1144 fprintf_unfiltered (file,
1145 "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1146 DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED);
1148 #ifdef DEPRECATED_FRAME_CHAIN_P
1149 fprintf_unfiltered (file,
1150 "gdbarch_dump: %s # %s\n",
1151 "DEPRECATED_FRAME_CHAIN_P()",
1152 XSTRING (DEPRECATED_FRAME_CHAIN_P ()));
1153 fprintf_unfiltered (file,
1154 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_P() = %d\n",
1155 DEPRECATED_FRAME_CHAIN_P ());
1157 #ifdef DEPRECATED_FRAME_CHAIN
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: %s # %s\n",
1160 "DEPRECATED_FRAME_CHAIN(frame)",
1161 XSTRING (DEPRECATED_FRAME_CHAIN (frame)));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: DEPRECATED_FRAME_CHAIN = <0x%08lx>\n",
1165 (long) current_gdbarch->deprecated_frame_chain
1166 /*DEPRECATED_FRAME_CHAIN ()*/);
1168 #ifdef DEPRECATED_FRAME_CHAIN_VALID_P
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: %s # %s\n",
1171 "DEPRECATED_FRAME_CHAIN_VALID_P()",
1172 XSTRING (DEPRECATED_FRAME_CHAIN_VALID_P ()));
1173 fprintf_unfiltered (file,
1174 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID_P() = %d\n",
1175 DEPRECATED_FRAME_CHAIN_VALID_P ());
1177 #ifdef DEPRECATED_FRAME_CHAIN_VALID
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: %s # %s\n",
1180 "DEPRECATED_FRAME_CHAIN_VALID(chain, thisframe)",
1181 XSTRING (DEPRECATED_FRAME_CHAIN_VALID (chain, thisframe)));
1183 fprintf_unfiltered (file,
1184 "gdbarch_dump: DEPRECATED_FRAME_CHAIN_VALID = <0x%08lx>\n",
1185 (long) current_gdbarch->deprecated_frame_chain_valid
1186 /*DEPRECATED_FRAME_CHAIN_VALID ()*/);
1188 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS_P
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: %s # %s\n",
1191 "DEPRECATED_FRAME_INIT_SAVED_REGS_P()",
1192 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()));
1193 fprintf_unfiltered (file,
1194 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS_P() = %d\n",
1195 DEPRECATED_FRAME_INIT_SAVED_REGS_P ());
1197 #ifdef DEPRECATED_FRAME_INIT_SAVED_REGS
1199 /* Macro might contain `[{}]' when not multi-arch */
1200 fprintf_unfiltered (file,
1201 "gdbarch_dump: %s # %s\n",
1202 "DEPRECATED_FRAME_INIT_SAVED_REGS(frame)",
1203 XSTRING (DEPRECATED_FRAME_INIT_SAVED_REGS (frame)));
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: DEPRECATED_FRAME_INIT_SAVED_REGS = <0x%08lx>\n",
1208 (long) current_gdbarch->deprecated_frame_init_saved_regs
1209 /*DEPRECATED_FRAME_INIT_SAVED_REGS ()*/);
1211 #ifdef DEPRECATED_FRAME_SAVED_PC_P
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: %s # %s\n",
1214 "DEPRECATED_FRAME_SAVED_PC_P()",
1215 XSTRING (DEPRECATED_FRAME_SAVED_PC_P ()));
1216 fprintf_unfiltered (file,
1217 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC_P() = %d\n",
1218 DEPRECATED_FRAME_SAVED_PC_P ());
1220 #ifdef DEPRECATED_FRAME_SAVED_PC
1221 fprintf_unfiltered (file,
1222 "gdbarch_dump: %s # %s\n",
1223 "DEPRECATED_FRAME_SAVED_PC(fi)",
1224 XSTRING (DEPRECATED_FRAME_SAVED_PC (fi)));
1226 fprintf_unfiltered (file,
1227 "gdbarch_dump: DEPRECATED_FRAME_SAVED_PC = <0x%08lx>\n",
1228 (long) current_gdbarch->deprecated_frame_saved_pc
1229 /*DEPRECATED_FRAME_SAVED_PC ()*/);
1231 #ifdef DEPRECATED_GET_SAVED_REGISTER_P
1232 fprintf_unfiltered (file,
1233 "gdbarch_dump: %s # %s\n",
1234 "DEPRECATED_GET_SAVED_REGISTER_P()",
1235 XSTRING (DEPRECATED_GET_SAVED_REGISTER_P ()));
1236 fprintf_unfiltered (file,
1237 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER_P() = %d\n",
1238 DEPRECATED_GET_SAVED_REGISTER_P ());
1240 #ifdef DEPRECATED_GET_SAVED_REGISTER
1242 /* Macro might contain `[{}]' when not multi-arch */
1243 fprintf_unfiltered (file,
1244 "gdbarch_dump: %s # %s\n",
1245 "DEPRECATED_GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1246 XSTRING (DEPRECATED_GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: DEPRECATED_GET_SAVED_REGISTER = <0x%08lx>\n",
1251 (long) current_gdbarch->deprecated_get_saved_register
1252 /*DEPRECATED_GET_SAVED_REGISTER ()*/);
1254 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO_P
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: %s # %s\n",
1257 "DEPRECATED_INIT_EXTRA_FRAME_INFO_P()",
1258 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO_P ()));
1259 fprintf_unfiltered (file,
1260 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO_P() = %d\n",
1261 DEPRECATED_INIT_EXTRA_FRAME_INFO_P ());
1263 #ifdef DEPRECATED_INIT_EXTRA_FRAME_INFO
1265 /* Macro might contain `[{}]' when not multi-arch */
1266 fprintf_unfiltered (file,
1267 "gdbarch_dump: %s # %s\n",
1268 "DEPRECATED_INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1269 XSTRING (DEPRECATED_INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1272 fprintf_unfiltered (file,
1273 "gdbarch_dump: DEPRECATED_INIT_EXTRA_FRAME_INFO = <0x%08lx>\n",
1274 (long) current_gdbarch->deprecated_init_extra_frame_info
1275 /*DEPRECATED_INIT_EXTRA_FRAME_INFO ()*/);
1277 #ifdef DEPRECATED_INIT_FRAME_PC_P
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: %s # %s\n",
1280 "DEPRECATED_INIT_FRAME_PC_P()",
1281 XSTRING (DEPRECATED_INIT_FRAME_PC_P ()));
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_P() = %d\n",
1284 DEPRECATED_INIT_FRAME_PC_P ());
1286 #ifdef DEPRECATED_INIT_FRAME_PC
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: %s # %s\n",
1289 "DEPRECATED_INIT_FRAME_PC(fromleaf, prev)",
1290 XSTRING (DEPRECATED_INIT_FRAME_PC (fromleaf, prev)));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC = <0x%08lx>\n",
1294 (long) current_gdbarch->deprecated_init_frame_pc
1295 /*DEPRECATED_INIT_FRAME_PC ()*/);
1297 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST_P
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: %s # %s\n",
1300 "DEPRECATED_INIT_FRAME_PC_FIRST_P()",
1301 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST_P ()));
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST_P() = %d\n",
1304 DEPRECATED_INIT_FRAME_PC_FIRST_P ());
1306 #ifdef DEPRECATED_INIT_FRAME_PC_FIRST
1307 fprintf_unfiltered (file,
1308 "gdbarch_dump: %s # %s\n",
1309 "DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev)",
1310 XSTRING (DEPRECATED_INIT_FRAME_PC_FIRST (fromleaf, prev)));
1312 fprintf_unfiltered (file,
1313 "gdbarch_dump: DEPRECATED_INIT_FRAME_PC_FIRST = <0x%08lx>\n",
1314 (long) current_gdbarch->deprecated_init_frame_pc_first
1315 /*DEPRECATED_INIT_FRAME_PC_FIRST ()*/);
1317 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE_P
1318 fprintf_unfiltered (file,
1319 "gdbarch_dump: %s # %s\n",
1320 "DEPRECATED_MAX_REGISTER_RAW_SIZE_P()",
1321 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE_P ()));
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE_P() = %d\n",
1324 DEPRECATED_MAX_REGISTER_RAW_SIZE_P ());
1326 #ifdef DEPRECATED_MAX_REGISTER_RAW_SIZE
1327 fprintf_unfiltered (file,
1328 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE # %s\n",
1329 XSTRING (DEPRECATED_MAX_REGISTER_RAW_SIZE));
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: DEPRECATED_MAX_REGISTER_RAW_SIZE = %d\n",
1332 DEPRECATED_MAX_REGISTER_RAW_SIZE);
1334 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P
1335 fprintf_unfiltered (file,
1336 "gdbarch_dump: %s # %s\n",
1337 "DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P()",
1338 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ()));
1339 fprintf_unfiltered (file,
1340 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P() = %d\n",
1341 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE_P ());
1343 #ifdef DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE
1344 fprintf_unfiltered (file,
1345 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1346 XSTRING (DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE));
1347 fprintf_unfiltered (file,
1348 "gdbarch_dump: DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1349 DEPRECATED_MAX_REGISTER_VIRTUAL_SIZE);
1351 #ifdef DEPRECATED_PC_IN_CALL_DUMMY_P
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: %s # %s\n",
1354 "DEPRECATED_PC_IN_CALL_DUMMY_P()",
1355 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY_P ()));
1356 fprintf_unfiltered (file,
1357 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY_P() = %d\n",
1358 DEPRECATED_PC_IN_CALL_DUMMY_P ());
1360 #ifdef DEPRECATED_PC_IN_CALL_DUMMY
1361 fprintf_unfiltered (file,
1362 "gdbarch_dump: %s # %s\n",
1363 "DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1364 XSTRING (DEPRECATED_PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: DEPRECATED_PC_IN_CALL_DUMMY = <0x%08lx>\n",
1368 (long) current_gdbarch->deprecated_pc_in_call_dummy
1369 /*DEPRECATED_PC_IN_CALL_DUMMY ()*/);
1371 #ifdef DEPRECATED_POP_FRAME_P
1372 fprintf_unfiltered (file,
1373 "gdbarch_dump: %s # %s\n",
1374 "DEPRECATED_POP_FRAME_P()",
1375 XSTRING (DEPRECATED_POP_FRAME_P ()));
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: DEPRECATED_POP_FRAME_P() = %d\n",
1378 DEPRECATED_POP_FRAME_P ());
1380 #ifdef DEPRECATED_POP_FRAME
1382 /* Macro might contain `[{}]' when not multi-arch */
1383 fprintf_unfiltered (file,
1384 "gdbarch_dump: %s # %s\n",
1385 "DEPRECATED_POP_FRAME(-)",
1386 XSTRING (DEPRECATED_POP_FRAME (-)));
1389 fprintf_unfiltered (file,
1390 "gdbarch_dump: DEPRECATED_POP_FRAME = <0x%08lx>\n",
1391 (long) current_gdbarch->deprecated_pop_frame
1392 /*DEPRECATED_POP_FRAME ()*/);
1394 #ifdef DEPRECATED_PUSH_ARGUMENTS_P
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: %s # %s\n",
1397 "DEPRECATED_PUSH_ARGUMENTS_P()",
1398 XSTRING (DEPRECATED_PUSH_ARGUMENTS_P ()));
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS_P() = %d\n",
1401 DEPRECATED_PUSH_ARGUMENTS_P ());
1403 #ifdef DEPRECATED_PUSH_ARGUMENTS
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: %s # %s\n",
1406 "DEPRECATED_PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1407 XSTRING (DEPRECATED_PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: DEPRECATED_PUSH_ARGUMENTS = <0x%08lx>\n",
1411 (long) current_gdbarch->deprecated_push_arguments
1412 /*DEPRECATED_PUSH_ARGUMENTS ()*/);
1414 #ifdef DEPRECATED_PUSH_DUMMY_FRAME_P
1415 fprintf_unfiltered (file,
1416 "gdbarch_dump: %s # %s\n",
1417 "DEPRECATED_PUSH_DUMMY_FRAME_P()",
1418 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME_P ()));
1419 fprintf_unfiltered (file,
1420 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME_P() = %d\n",
1421 DEPRECATED_PUSH_DUMMY_FRAME_P ());
1423 #ifdef DEPRECATED_PUSH_DUMMY_FRAME
1425 /* Macro might contain `[{}]' when not multi-arch */
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: %s # %s\n",
1428 "DEPRECATED_PUSH_DUMMY_FRAME(-)",
1429 XSTRING (DEPRECATED_PUSH_DUMMY_FRAME (-)));
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: DEPRECATED_PUSH_DUMMY_FRAME = <0x%08lx>\n",
1434 (long) current_gdbarch->deprecated_push_dummy_frame
1435 /*DEPRECATED_PUSH_DUMMY_FRAME ()*/);
1437 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS_P
1438 fprintf_unfiltered (file,
1439 "gdbarch_dump: %s # %s\n",
1440 "DEPRECATED_PUSH_RETURN_ADDRESS_P()",
1441 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS_P ()));
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS_P() = %d\n",
1444 DEPRECATED_PUSH_RETURN_ADDRESS_P ());
1446 #ifdef DEPRECATED_PUSH_RETURN_ADDRESS
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: %s # %s\n",
1449 "DEPRECATED_PUSH_RETURN_ADDRESS(pc, sp)",
1450 XSTRING (DEPRECATED_PUSH_RETURN_ADDRESS (pc, sp)));
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: DEPRECATED_PUSH_RETURN_ADDRESS = <0x%08lx>\n",
1454 (long) current_gdbarch->deprecated_push_return_address
1455 /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/);
1457 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: %s # %s\n",
1460 "DEPRECATED_SAVED_PC_AFTER_CALL_P()",
1461 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL_P ()));
1462 fprintf_unfiltered (file,
1463 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL_P() = %d\n",
1464 DEPRECATED_SAVED_PC_AFTER_CALL_P ());
1466 #ifdef DEPRECATED_SAVED_PC_AFTER_CALL
1467 fprintf_unfiltered (file,
1468 "gdbarch_dump: %s # %s\n",
1469 "DEPRECATED_SAVED_PC_AFTER_CALL(frame)",
1470 XSTRING (DEPRECATED_SAVED_PC_AFTER_CALL (frame)));
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: DEPRECATED_SAVED_PC_AFTER_CALL = <0x%08lx>\n",
1474 (long) current_gdbarch->deprecated_saved_pc_after_call
1475 /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/);
1477 #ifdef DEPRECATED_STORE_RETURN_VALUE
1479 /* Macro might contain `[{}]' when not multi-arch */
1480 fprintf_unfiltered (file,
1481 "gdbarch_dump: %s # %s\n",
1482 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1483 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = <0x%08lx>\n",
1488 (long) current_gdbarch->deprecated_store_return_value
1489 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1491 #ifdef DEPRECATED_STORE_STRUCT_RETURN_P
1492 fprintf_unfiltered (file,
1493 "gdbarch_dump: %s # %s\n",
1494 "DEPRECATED_STORE_STRUCT_RETURN_P()",
1495 XSTRING (DEPRECATED_STORE_STRUCT_RETURN_P ()));
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN_P() = %d\n",
1498 DEPRECATED_STORE_STRUCT_RETURN_P ());
1500 #ifdef DEPRECATED_STORE_STRUCT_RETURN
1502 /* Macro might contain `[{}]' when not multi-arch */
1503 fprintf_unfiltered (file,
1504 "gdbarch_dump: %s # %s\n",
1505 "DEPRECATED_STORE_STRUCT_RETURN(addr, sp)",
1506 XSTRING (DEPRECATED_STORE_STRUCT_RETURN (addr, sp)));
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: DEPRECATED_STORE_STRUCT_RETURN = <0x%08lx>\n",
1511 (long) current_gdbarch->deprecated_store_struct_return
1512 /*DEPRECATED_STORE_STRUCT_RETURN ()*/);
1514 #ifdef DEPRECATED_USE_GENERIC_DUMMY_FRAMES
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES # %s\n",
1517 XSTRING (DEPRECATED_USE_GENERIC_DUMMY_FRAMES));
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: DEPRECATED_USE_GENERIC_DUMMY_FRAMES = %d\n",
1520 DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
1522 #ifdef DWARF2_BUILD_FRAME_INFO_P
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: %s # %s\n",
1525 "DWARF2_BUILD_FRAME_INFO_P()",
1526 XSTRING (DWARF2_BUILD_FRAME_INFO_P ()));
1527 fprintf_unfiltered (file,
1528 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO_P() = %d\n",
1529 DWARF2_BUILD_FRAME_INFO_P ());
1531 #ifdef DWARF2_BUILD_FRAME_INFO
1533 /* Macro might contain `[{}]' when not multi-arch */
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: %s # %s\n",
1536 "DWARF2_BUILD_FRAME_INFO(objfile)",
1537 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1540 fprintf_unfiltered (file,
1541 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = <0x%08lx>\n",
1542 (long) current_gdbarch->dwarf2_build_frame_info
1543 /*DWARF2_BUILD_FRAME_INFO ()*/);
1545 #ifdef DWARF2_REG_TO_REGNUM
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: %s # %s\n",
1548 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1549 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: DWARF2_REG_TO_REGNUM = <0x%08lx>\n",
1553 (long) current_gdbarch->dwarf2_reg_to_regnum
1554 /*DWARF2_REG_TO_REGNUM ()*/);
1556 #ifdef DWARF_REG_TO_REGNUM
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: %s # %s\n",
1559 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1560 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: DWARF_REG_TO_REGNUM = <0x%08lx>\n",
1564 (long) current_gdbarch->dwarf_reg_to_regnum
1565 /*DWARF_REG_TO_REGNUM ()*/);
1567 #ifdef ECOFF_REG_TO_REGNUM
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: %s # %s\n",
1570 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1571 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: ECOFF_REG_TO_REGNUM = <0x%08lx>\n",
1575 (long) current_gdbarch->ecoff_reg_to_regnum
1576 /*ECOFF_REG_TO_REGNUM ()*/);
1578 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1580 /* Macro might contain `[{}]' when not multi-arch */
1581 fprintf_unfiltered (file,
1582 "gdbarch_dump: %s # %s\n",
1583 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1584 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1587 fprintf_unfiltered (file,
1588 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = <0x%08lx>\n",
1589 (long) current_gdbarch->elf_make_msymbol_special
1590 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1592 #ifdef EXTRACT_RETURN_VALUE
1594 /* Macro might contain `[{}]' when not multi-arch */
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: %s # %s\n",
1597 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1598 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: EXTRACT_RETURN_VALUE = <0x%08lx>\n",
1603 (long) current_gdbarch->extract_return_value
1604 /*EXTRACT_RETURN_VALUE ()*/);
1606 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS_P
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: %s # %s\n",
1609 "EXTRACT_STRUCT_VALUE_ADDRESS_P()",
1610 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS_P ()));
1611 fprintf_unfiltered (file,
1612 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS_P() = %d\n",
1613 EXTRACT_STRUCT_VALUE_ADDRESS_P ());
1615 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1616 fprintf_unfiltered (file,
1617 "gdbarch_dump: %s # %s\n",
1618 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1619 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1621 fprintf_unfiltered (file,
1622 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = <0x%08lx>\n",
1623 (long) current_gdbarch->extract_struct_value_address
1624 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1626 #ifdef FIX_CALL_DUMMY_P
1627 fprintf_unfiltered (file,
1628 "gdbarch_dump: %s # %s\n",
1629 "FIX_CALL_DUMMY_P()",
1630 XSTRING (FIX_CALL_DUMMY_P ()));
1631 fprintf_unfiltered (file,
1632 "gdbarch_dump: FIX_CALL_DUMMY_P() = %d\n",
1633 FIX_CALL_DUMMY_P ());
1635 #ifdef FIX_CALL_DUMMY
1637 /* Macro might contain `[{}]' when not multi-arch */
1638 fprintf_unfiltered (file,
1639 "gdbarch_dump: %s # %s\n",
1640 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1641 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1644 fprintf_unfiltered (file,
1645 "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n",
1646 (long) current_gdbarch->fix_call_dummy
1647 /*FIX_CALL_DUMMY ()*/);
1650 fprintf_unfiltered (file,
1651 "gdbarch_dump: FP0_REGNUM # %s\n",
1652 XSTRING (FP0_REGNUM));
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: FP0_REGNUM = %d\n",
1658 fprintf_unfiltered (file,
1659 "gdbarch_dump: FP_REGNUM # %s\n",
1660 XSTRING (FP_REGNUM));
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: FP_REGNUM = %d\n",
1665 #ifdef FRAMELESS_FUNCTION_INVOCATION
1666 fprintf_unfiltered (file,
1667 "gdbarch_dump: %s # %s\n",
1668 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1669 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1671 fprintf_unfiltered (file,
1672 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = <0x%08lx>\n",
1673 (long) current_gdbarch->frameless_function_invocation
1674 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1676 #ifdef FRAME_ARGS_ADDRESS
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: %s # %s\n",
1679 "FRAME_ARGS_ADDRESS(fi)",
1680 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1682 fprintf_unfiltered (file,
1683 "gdbarch_dump: FRAME_ARGS_ADDRESS = <0x%08lx>\n",
1684 (long) current_gdbarch->frame_args_address
1685 /*FRAME_ARGS_ADDRESS ()*/);
1687 #ifdef FRAME_ARGS_SKIP
1688 fprintf_unfiltered (file,
1689 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1690 XSTRING (FRAME_ARGS_SKIP));
1691 fprintf_unfiltered (file,
1692 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1693 (long) FRAME_ARGS_SKIP);
1695 #ifdef FRAME_LOCALS_ADDRESS
1696 fprintf_unfiltered (file,
1697 "gdbarch_dump: %s # %s\n",
1698 "FRAME_LOCALS_ADDRESS(fi)",
1699 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: FRAME_LOCALS_ADDRESS = <0x%08lx>\n",
1703 (long) current_gdbarch->frame_locals_address
1704 /*FRAME_LOCALS_ADDRESS ()*/);
1706 #ifdef FRAME_NUM_ARGS
1707 fprintf_unfiltered (file,
1708 "gdbarch_dump: %s # %s\n",
1709 "FRAME_NUM_ARGS(frame)",
1710 XSTRING (FRAME_NUM_ARGS (frame)));
1712 fprintf_unfiltered (file,
1713 "gdbarch_dump: FRAME_NUM_ARGS = <0x%08lx>\n",
1714 (long) current_gdbarch->frame_num_args
1715 /*FRAME_NUM_ARGS ()*/);
1717 #ifdef FUNCTION_START_OFFSET
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1720 XSTRING (FUNCTION_START_OFFSET));
1721 fprintf_unfiltered (file,
1722 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1723 (long) FUNCTION_START_OFFSET);
1725 #ifdef GET_LONGJMP_TARGET_P
1726 fprintf_unfiltered (file,
1727 "gdbarch_dump: %s # %s\n",
1728 "GET_LONGJMP_TARGET_P()",
1729 XSTRING (GET_LONGJMP_TARGET_P ()));
1730 fprintf_unfiltered (file,
1731 "gdbarch_dump: GET_LONGJMP_TARGET_P() = %d\n",
1732 GET_LONGJMP_TARGET_P ());
1734 #ifdef GET_LONGJMP_TARGET
1735 fprintf_unfiltered (file,
1736 "gdbarch_dump: %s # %s\n",
1737 "GET_LONGJMP_TARGET(pc)",
1738 XSTRING (GET_LONGJMP_TARGET (pc)));
1740 fprintf_unfiltered (file,
1741 "gdbarch_dump: GET_LONGJMP_TARGET = <0x%08lx>\n",
1742 (long) current_gdbarch->get_longjmp_target
1743 /*GET_LONGJMP_TARGET ()*/);
1745 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1746 fprintf_unfiltered (file,
1747 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1748 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1749 fprintf_unfiltered (file,
1750 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1751 HAVE_NONSTEPPABLE_WATCHPOINT);
1754 fprintf_unfiltered (file,
1755 "gdbarch_dump: %s # %s\n",
1756 "INNER_THAN(lhs, rhs)",
1757 XSTRING (INNER_THAN (lhs, rhs)));
1759 fprintf_unfiltered (file,
1760 "gdbarch_dump: INNER_THAN = <0x%08lx>\n",
1761 (long) current_gdbarch->inner_than
1764 #ifdef INTEGER_TO_ADDRESS_P
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: %s # %s\n",
1767 "INTEGER_TO_ADDRESS_P()",
1768 XSTRING (INTEGER_TO_ADDRESS_P ()));
1769 fprintf_unfiltered (file,
1770 "gdbarch_dump: INTEGER_TO_ADDRESS_P() = %d\n",
1771 INTEGER_TO_ADDRESS_P ());
1773 #ifdef INTEGER_TO_ADDRESS
1774 fprintf_unfiltered (file,
1775 "gdbarch_dump: %s # %s\n",
1776 "INTEGER_TO_ADDRESS(type, buf)",
1777 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: INTEGER_TO_ADDRESS = <0x%08lx>\n",
1781 (long) current_gdbarch->integer_to_address
1782 /*INTEGER_TO_ADDRESS ()*/);
1784 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1785 fprintf_unfiltered (file,
1786 "gdbarch_dump: %s # %s\n",
1787 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1788 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = <0x%08lx>\n",
1792 (long) current_gdbarch->in_solib_call_trampoline
1793 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1795 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: %s # %s\n",
1798 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1799 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = <0x%08lx>\n",
1803 (long) current_gdbarch->in_solib_return_trampoline
1804 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1806 #ifdef MEMORY_INSERT_BREAKPOINT
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: %s # %s\n",
1809 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1810 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = <0x%08lx>\n",
1814 (long) current_gdbarch->memory_insert_breakpoint
1815 /*MEMORY_INSERT_BREAKPOINT ()*/);
1817 #ifdef MEMORY_REMOVE_BREAKPOINT
1818 fprintf_unfiltered (file,
1819 "gdbarch_dump: %s # %s\n",
1820 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1821 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = <0x%08lx>\n",
1825 (long) current_gdbarch->memory_remove_breakpoint
1826 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1828 #ifdef NAME_OF_MALLOC
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1831 XSTRING (NAME_OF_MALLOC));
1832 fprintf_unfiltered (file,
1833 "gdbarch_dump: NAME_OF_MALLOC = %s\n",
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: NPC_REGNUM # %s\n",
1839 XSTRING (NPC_REGNUM));
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: NPC_REGNUM = %d\n",
1844 #ifdef NUM_PSEUDO_REGS
1845 fprintf_unfiltered (file,
1846 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1847 XSTRING (NUM_PSEUDO_REGS));
1848 fprintf_unfiltered (file,
1849 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: NUM_REGS # %s\n",
1855 XSTRING (NUM_REGS));
1856 fprintf_unfiltered (file,
1857 "gdbarch_dump: NUM_REGS = %d\n",
1860 #ifdef PARM_BOUNDARY
1861 fprintf_unfiltered (file,
1862 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1863 XSTRING (PARM_BOUNDARY));
1864 fprintf_unfiltered (file,
1865 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1868 #ifdef PC_IN_SIGTRAMP
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: %s # %s\n",
1871 "PC_IN_SIGTRAMP(pc, name)",
1872 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: PC_IN_SIGTRAMP = <0x%08lx>\n",
1876 (long) current_gdbarch->pc_in_sigtramp
1877 /*PC_IN_SIGTRAMP ()*/);
1880 fprintf_unfiltered (file,
1881 "gdbarch_dump: PC_REGNUM # %s\n",
1882 XSTRING (PC_REGNUM));
1883 fprintf_unfiltered (file,
1884 "gdbarch_dump: PC_REGNUM = %d\n",
1887 #ifdef POINTER_TO_ADDRESS
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: %s # %s\n",
1890 "POINTER_TO_ADDRESS(type, buf)",
1891 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: POINTER_TO_ADDRESS = <0x%08lx>\n",
1895 (long) current_gdbarch->pointer_to_address
1896 /*POINTER_TO_ADDRESS ()*/);
1898 #ifdef PREPARE_TO_PROCEED
1899 fprintf_unfiltered (file,
1900 "gdbarch_dump: %s # %s\n",
1901 "PREPARE_TO_PROCEED(select_it)",
1902 XSTRING (PREPARE_TO_PROCEED (select_it)));
1904 fprintf_unfiltered (file,
1905 "gdbarch_dump: PREPARE_TO_PROCEED = <0x%08lx>\n",
1906 (long) current_gdbarch->prepare_to_proceed
1907 /*PREPARE_TO_PROCEED ()*/);
1910 fprintf_unfiltered (file,
1911 "gdbarch_dump: gdbarch_print_float_info_p() = %d\n",
1912 gdbarch_print_float_info_p (current_gdbarch));
1914 fprintf_unfiltered (file,
1915 "gdbarch_dump: print_float_info = 0x%08lx\n",
1916 (long) current_gdbarch->print_float_info);
1918 fprintf_unfiltered (file,
1919 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1920 (long) current_gdbarch->print_registers_info);
1922 fprintf_unfiltered (file,
1923 "gdbarch_dump: gdbarch_print_vector_info_p() = %d\n",
1924 gdbarch_print_vector_info_p (current_gdbarch));
1926 fprintf_unfiltered (file,
1927 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1928 (long) current_gdbarch->print_vector_info);
1929 #ifdef PROLOGUE_FRAMELESS_P
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: %s # %s\n",
1932 "PROLOGUE_FRAMELESS_P(ip)",
1933 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1935 fprintf_unfiltered (file,
1936 "gdbarch_dump: PROLOGUE_FRAMELESS_P = <0x%08lx>\n",
1937 (long) current_gdbarch->prologue_frameless_p
1938 /*PROLOGUE_FRAMELESS_P ()*/);
1941 fprintf_unfiltered (file,
1942 "gdbarch_dump: PS_REGNUM # %s\n",
1943 XSTRING (PS_REGNUM));
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: PS_REGNUM = %d\n",
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: gdbarch_push_dummy_call_p() = %d\n",
1951 gdbarch_push_dummy_call_p (current_gdbarch));
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: push_dummy_call = 0x%08lx\n",
1955 (long) current_gdbarch->push_dummy_call);
1956 #ifdef REGISTER_BYTE
1957 fprintf_unfiltered (file,
1958 "gdbarch_dump: %s # %s\n",
1959 "REGISTER_BYTE(reg_nr)",
1960 XSTRING (REGISTER_BYTE (reg_nr)));
1962 fprintf_unfiltered (file,
1963 "gdbarch_dump: REGISTER_BYTE = <0x%08lx>\n",
1964 (long) current_gdbarch->register_byte
1965 /*REGISTER_BYTE ()*/);
1967 #ifdef REGISTER_BYTES
1968 fprintf_unfiltered (file,
1969 "gdbarch_dump: REGISTER_BYTES # %s\n",
1970 XSTRING (REGISTER_BYTES));
1971 fprintf_unfiltered (file,
1972 "gdbarch_dump: REGISTER_BYTES = %d\n",
1975 #ifdef REGISTER_BYTES_OK_P
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: %s # %s\n",
1978 "REGISTER_BYTES_OK_P()",
1979 XSTRING (REGISTER_BYTES_OK_P ()));
1980 fprintf_unfiltered (file,
1981 "gdbarch_dump: REGISTER_BYTES_OK_P() = %d\n",
1982 REGISTER_BYTES_OK_P ());
1984 #ifdef REGISTER_BYTES_OK
1985 fprintf_unfiltered (file,
1986 "gdbarch_dump: %s # %s\n",
1987 "REGISTER_BYTES_OK(nr_bytes)",
1988 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1990 fprintf_unfiltered (file,
1991 "gdbarch_dump: REGISTER_BYTES_OK = <0x%08lx>\n",
1992 (long) current_gdbarch->register_bytes_ok
1993 /*REGISTER_BYTES_OK ()*/);
1995 #ifdef REGISTER_CONVERTIBLE
1996 fprintf_unfiltered (file,
1997 "gdbarch_dump: %s # %s\n",
1998 "REGISTER_CONVERTIBLE(nr)",
1999 XSTRING (REGISTER_CONVERTIBLE (nr)));
2001 fprintf_unfiltered (file,
2002 "gdbarch_dump: REGISTER_CONVERTIBLE = <0x%08lx>\n",
2003 (long) current_gdbarch->register_convertible
2004 /*REGISTER_CONVERTIBLE ()*/);
2006 #ifdef REGISTER_CONVERT_TO_RAW
2008 /* Macro might contain `[{}]' when not multi-arch */
2009 fprintf_unfiltered (file,
2010 "gdbarch_dump: %s # %s\n",
2011 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
2012 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
2015 fprintf_unfiltered (file,
2016 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = <0x%08lx>\n",
2017 (long) current_gdbarch->register_convert_to_raw
2018 /*REGISTER_CONVERT_TO_RAW ()*/);
2020 #ifdef REGISTER_CONVERT_TO_VIRTUAL
2022 /* Macro might contain `[{}]' when not multi-arch */
2023 fprintf_unfiltered (file,
2024 "gdbarch_dump: %s # %s\n",
2025 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
2026 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
2029 fprintf_unfiltered (file,
2030 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = <0x%08lx>\n",
2031 (long) current_gdbarch->register_convert_to_virtual
2032 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
2034 #ifdef REGISTER_NAME
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: %s # %s\n",
2037 "REGISTER_NAME(regnr)",
2038 XSTRING (REGISTER_NAME (regnr)));
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: REGISTER_NAME = <0x%08lx>\n",
2042 (long) current_gdbarch->register_name
2043 /*REGISTER_NAME ()*/);
2045 #ifdef REGISTER_RAW_SIZE
2046 fprintf_unfiltered (file,
2047 "gdbarch_dump: %s # %s\n",
2048 "REGISTER_RAW_SIZE(reg_nr)",
2049 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
2051 fprintf_unfiltered (file,
2052 "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
2053 (long) current_gdbarch->register_raw_size
2054 /*REGISTER_RAW_SIZE ()*/);
2056 #ifdef REGISTER_SIM_REGNO
2057 fprintf_unfiltered (file,
2058 "gdbarch_dump: %s # %s\n",
2059 "REGISTER_SIM_REGNO(reg_nr)",
2060 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
2062 fprintf_unfiltered (file,
2063 "gdbarch_dump: REGISTER_SIM_REGNO = <0x%08lx>\n",
2064 (long) current_gdbarch->register_sim_regno
2065 /*REGISTER_SIM_REGNO ()*/);
2067 #ifdef REGISTER_SIZE
2068 fprintf_unfiltered (file,
2069 "gdbarch_dump: REGISTER_SIZE # %s\n",
2070 XSTRING (REGISTER_SIZE));
2071 fprintf_unfiltered (file,
2072 "gdbarch_dump: REGISTER_SIZE = %d\n",
2075 #ifdef REGISTER_TO_VALUE
2077 /* Macro might contain `[{}]' when not multi-arch */
2078 fprintf_unfiltered (file,
2079 "gdbarch_dump: %s # %s\n",
2080 "REGISTER_TO_VALUE(regnum, type, from, to)",
2081 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: REGISTER_TO_VALUE = <0x%08lx>\n",
2086 (long) current_gdbarch->register_to_value
2087 /*REGISTER_TO_VALUE ()*/);
2090 fprintf_unfiltered (file,
2091 "gdbarch_dump: gdbarch_register_type_p() = %d\n",
2092 gdbarch_register_type_p (current_gdbarch));
2094 fprintf_unfiltered (file,
2095 "gdbarch_dump: register_type = 0x%08lx\n",
2096 (long) current_gdbarch->register_type);
2097 #ifdef REGISTER_VIRTUAL_SIZE
2098 fprintf_unfiltered (file,
2099 "gdbarch_dump: %s # %s\n",
2100 "REGISTER_VIRTUAL_SIZE(reg_nr)",
2101 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
2103 fprintf_unfiltered (file,
2104 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
2105 (long) current_gdbarch->register_virtual_size
2106 /*REGISTER_VIRTUAL_SIZE ()*/);
2108 #ifdef REGISTER_VIRTUAL_TYPE_P
2109 fprintf_unfiltered (file,
2110 "gdbarch_dump: %s # %s\n",
2111 "REGISTER_VIRTUAL_TYPE_P()",
2112 XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
2113 fprintf_unfiltered (file,
2114 "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
2115 REGISTER_VIRTUAL_TYPE_P ());
2117 #ifdef REGISTER_VIRTUAL_TYPE
2118 fprintf_unfiltered (file,
2119 "gdbarch_dump: %s # %s\n",
2120 "REGISTER_VIRTUAL_TYPE(reg_nr)",
2121 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
2123 fprintf_unfiltered (file,
2124 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
2125 (long) current_gdbarch->register_virtual_type
2126 /*REGISTER_VIRTUAL_TYPE ()*/);
2128 #ifdef REG_STRUCT_HAS_ADDR_P
2129 fprintf_unfiltered (file,
2130 "gdbarch_dump: %s # %s\n",
2131 "REG_STRUCT_HAS_ADDR_P()",
2132 XSTRING (REG_STRUCT_HAS_ADDR_P ()));
2133 fprintf_unfiltered (file,
2134 "gdbarch_dump: REG_STRUCT_HAS_ADDR_P() = %d\n",
2135 REG_STRUCT_HAS_ADDR_P ());
2137 #ifdef REG_STRUCT_HAS_ADDR
2138 fprintf_unfiltered (file,
2139 "gdbarch_dump: %s # %s\n",
2140 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
2141 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
2143 fprintf_unfiltered (file,
2144 "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
2145 (long) current_gdbarch->reg_struct_has_addr
2146 /*REG_STRUCT_HAS_ADDR ()*/);
2148 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2150 /* Macro might contain `[{}]' when not multi-arch */
2151 fprintf_unfiltered (file,
2152 "gdbarch_dump: %s # %s\n",
2153 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
2154 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
2157 fprintf_unfiltered (file,
2158 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
2159 (long) current_gdbarch->remote_translate_xfer_address
2160 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2162 #ifdef RETURN_VALUE_ON_STACK
2163 fprintf_unfiltered (file,
2164 "gdbarch_dump: %s # %s\n",
2165 "RETURN_VALUE_ON_STACK(type)",
2166 XSTRING (RETURN_VALUE_ON_STACK (type)));
2168 fprintf_unfiltered (file,
2169 "gdbarch_dump: RETURN_VALUE_ON_STACK = <0x%08lx>\n",
2170 (long) current_gdbarch->return_value_on_stack
2171 /*RETURN_VALUE_ON_STACK ()*/);
2173 #ifdef SAVE_DUMMY_FRAME_TOS_P
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: %s # %s\n",
2176 "SAVE_DUMMY_FRAME_TOS_P()",
2177 XSTRING (SAVE_DUMMY_FRAME_TOS_P ()));
2178 fprintf_unfiltered (file,
2179 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS_P() = %d\n",
2180 SAVE_DUMMY_FRAME_TOS_P ());
2182 #ifdef SAVE_DUMMY_FRAME_TOS
2184 /* Macro might contain `[{}]' when not multi-arch */
2185 fprintf_unfiltered (file,
2186 "gdbarch_dump: %s # %s\n",
2187 "SAVE_DUMMY_FRAME_TOS(sp)",
2188 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
2191 fprintf_unfiltered (file,
2192 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = <0x%08lx>\n",
2193 (long) current_gdbarch->save_dummy_frame_tos
2194 /*SAVE_DUMMY_FRAME_TOS ()*/);
2196 #ifdef SDB_REG_TO_REGNUM
2197 fprintf_unfiltered (file,
2198 "gdbarch_dump: %s # %s\n",
2199 "SDB_REG_TO_REGNUM(sdb_regnr)",
2200 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
2202 fprintf_unfiltered (file,
2203 "gdbarch_dump: SDB_REG_TO_REGNUM = <0x%08lx>\n",
2204 (long) current_gdbarch->sdb_reg_to_regnum
2205 /*SDB_REG_TO_REGNUM ()*/);
2207 #ifdef SIGTRAMP_END_P
2208 fprintf_unfiltered (file,
2209 "gdbarch_dump: %s # %s\n",
2211 XSTRING (SIGTRAMP_END_P ()));
2212 fprintf_unfiltered (file,
2213 "gdbarch_dump: SIGTRAMP_END_P() = %d\n",
2217 fprintf_unfiltered (file,
2218 "gdbarch_dump: %s # %s\n",
2220 XSTRING (SIGTRAMP_END (pc)));
2222 fprintf_unfiltered (file,
2223 "gdbarch_dump: SIGTRAMP_END = <0x%08lx>\n",
2224 (long) current_gdbarch->sigtramp_end
2225 /*SIGTRAMP_END ()*/);
2227 #ifdef SIGTRAMP_START_P
2228 fprintf_unfiltered (file,
2229 "gdbarch_dump: %s # %s\n",
2230 "SIGTRAMP_START_P()",
2231 XSTRING (SIGTRAMP_START_P ()));
2232 fprintf_unfiltered (file,
2233 "gdbarch_dump: SIGTRAMP_START_P() = %d\n",
2234 SIGTRAMP_START_P ());
2236 #ifdef SIGTRAMP_START
2237 fprintf_unfiltered (file,
2238 "gdbarch_dump: %s # %s\n",
2239 "SIGTRAMP_START(pc)",
2240 XSTRING (SIGTRAMP_START (pc)));
2242 fprintf_unfiltered (file,
2243 "gdbarch_dump: SIGTRAMP_START = <0x%08lx>\n",
2244 (long) current_gdbarch->sigtramp_start
2245 /*SIGTRAMP_START ()*/);
2247 #ifdef SIZEOF_CALL_DUMMY_WORDS
2248 fprintf_unfiltered (file,
2249 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
2250 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
2251 fprintf_unfiltered (file,
2252 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = %d\n",
2253 SIZEOF_CALL_DUMMY_WORDS);
2255 #ifdef SKIP_PROLOGUE
2256 fprintf_unfiltered (file,
2257 "gdbarch_dump: %s # %s\n",
2258 "SKIP_PROLOGUE(ip)",
2259 XSTRING (SKIP_PROLOGUE (ip)));
2261 fprintf_unfiltered (file,
2262 "gdbarch_dump: SKIP_PROLOGUE = <0x%08lx>\n",
2263 (long) current_gdbarch->skip_prologue
2264 /*SKIP_PROLOGUE ()*/);
2266 #ifdef SKIP_TRAMPOLINE_CODE
2267 fprintf_unfiltered (file,
2268 "gdbarch_dump: %s # %s\n",
2269 "SKIP_TRAMPOLINE_CODE(pc)",
2270 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2272 fprintf_unfiltered (file,
2273 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = <0x%08lx>\n",
2274 (long) current_gdbarch->skip_trampoline_code
2275 /*SKIP_TRAMPOLINE_CODE ()*/);
2277 #ifdef SMASH_TEXT_ADDRESS
2278 fprintf_unfiltered (file,
2279 "gdbarch_dump: %s # %s\n",
2280 "SMASH_TEXT_ADDRESS(addr)",
2281 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2283 fprintf_unfiltered (file,
2284 "gdbarch_dump: SMASH_TEXT_ADDRESS = <0x%08lx>\n",
2285 (long) current_gdbarch->smash_text_address
2286 /*SMASH_TEXT_ADDRESS ()*/);
2288 #ifdef SOFTWARE_SINGLE_STEP_P
2289 fprintf_unfiltered (file,
2290 "gdbarch_dump: %s # %s\n",
2291 "SOFTWARE_SINGLE_STEP_P()",
2292 XSTRING (SOFTWARE_SINGLE_STEP_P ()));
2293 fprintf_unfiltered (file,
2294 "gdbarch_dump: SOFTWARE_SINGLE_STEP_P() = %d\n",
2295 SOFTWARE_SINGLE_STEP_P ());
2297 #ifdef SOFTWARE_SINGLE_STEP
2299 /* Macro might contain `[{}]' when not multi-arch */
2300 fprintf_unfiltered (file,
2301 "gdbarch_dump: %s # %s\n",
2302 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2303 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2306 fprintf_unfiltered (file,
2307 "gdbarch_dump: SOFTWARE_SINGLE_STEP = <0x%08lx>\n",
2308 (long) current_gdbarch->software_single_step
2309 /*SOFTWARE_SINGLE_STEP ()*/);
2312 fprintf_unfiltered (file,
2313 "gdbarch_dump: SP_REGNUM # %s\n",
2314 XSTRING (SP_REGNUM));
2315 fprintf_unfiltered (file,
2316 "gdbarch_dump: SP_REGNUM = %d\n",
2319 #ifdef STAB_REG_TO_REGNUM
2320 fprintf_unfiltered (file,
2321 "gdbarch_dump: %s # %s\n",
2322 "STAB_REG_TO_REGNUM(stab_regnr)",
2323 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2325 fprintf_unfiltered (file,
2326 "gdbarch_dump: STAB_REG_TO_REGNUM = <0x%08lx>\n",
2327 (long) current_gdbarch->stab_reg_to_regnum
2328 /*STAB_REG_TO_REGNUM ()*/);
2330 #ifdef STACK_ALIGN_P
2331 fprintf_unfiltered (file,
2332 "gdbarch_dump: %s # %s\n",
2334 XSTRING (STACK_ALIGN_P ()));
2335 fprintf_unfiltered (file,
2336 "gdbarch_dump: STACK_ALIGN_P() = %d\n",
2340 fprintf_unfiltered (file,
2341 "gdbarch_dump: %s # %s\n",
2343 XSTRING (STACK_ALIGN (sp)));
2345 fprintf_unfiltered (file,
2346 "gdbarch_dump: STACK_ALIGN = <0x%08lx>\n",
2347 (long) current_gdbarch->stack_align
2348 /*STACK_ALIGN ()*/);
2350 #ifdef STORE_RETURN_VALUE
2352 /* Macro might contain `[{}]' when not multi-arch */
2353 fprintf_unfiltered (file,
2354 "gdbarch_dump: %s # %s\n",
2355 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2356 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2359 fprintf_unfiltered (file,
2360 "gdbarch_dump: STORE_RETURN_VALUE = <0x%08lx>\n",
2361 (long) current_gdbarch->store_return_value
2362 /*STORE_RETURN_VALUE ()*/);
2364 #ifdef TARGET_ADDR_BIT
2365 fprintf_unfiltered (file,
2366 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2367 XSTRING (TARGET_ADDR_BIT));
2368 fprintf_unfiltered (file,
2369 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2372 #ifdef TARGET_ARCHITECTURE
2373 fprintf_unfiltered (file,
2374 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2375 XSTRING (TARGET_ARCHITECTURE));
2376 if (TARGET_ARCHITECTURE != NULL)
2377 fprintf_unfiltered (file,
2378 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2379 TARGET_ARCHITECTURE->printable_name);
2381 #ifdef TARGET_BFD_VMA_BIT
2382 fprintf_unfiltered (file,
2383 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2384 XSTRING (TARGET_BFD_VMA_BIT));
2385 fprintf_unfiltered (file,
2386 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2387 TARGET_BFD_VMA_BIT);
2389 #ifdef TARGET_BYTE_ORDER
2390 fprintf_unfiltered (file,
2391 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2392 XSTRING (TARGET_BYTE_ORDER));
2393 fprintf_unfiltered (file,
2394 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2395 (long) TARGET_BYTE_ORDER);
2397 #ifdef TARGET_CHAR_SIGNED
2398 fprintf_unfiltered (file,
2399 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2400 XSTRING (TARGET_CHAR_SIGNED));
2401 fprintf_unfiltered (file,
2402 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2403 TARGET_CHAR_SIGNED);
2405 #ifdef TARGET_DOUBLE_BIT
2406 fprintf_unfiltered (file,
2407 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2408 XSTRING (TARGET_DOUBLE_BIT));
2409 fprintf_unfiltered (file,
2410 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2413 #ifdef TARGET_DOUBLE_FORMAT
2414 fprintf_unfiltered (file,
2415 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2416 XSTRING (TARGET_DOUBLE_FORMAT));
2417 fprintf_unfiltered (file,
2418 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %s\n",
2419 (TARGET_DOUBLE_FORMAT)->name);
2421 #ifdef TARGET_FLOAT_BIT
2422 fprintf_unfiltered (file,
2423 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2424 XSTRING (TARGET_FLOAT_BIT));
2425 fprintf_unfiltered (file,
2426 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2429 #ifdef TARGET_FLOAT_FORMAT
2430 fprintf_unfiltered (file,
2431 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2432 XSTRING (TARGET_FLOAT_FORMAT));
2433 fprintf_unfiltered (file,
2434 "gdbarch_dump: TARGET_FLOAT_FORMAT = %s\n",
2435 (TARGET_FLOAT_FORMAT)->name);
2437 #ifdef TARGET_INT_BIT
2438 fprintf_unfiltered (file,
2439 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2440 XSTRING (TARGET_INT_BIT));
2441 fprintf_unfiltered (file,
2442 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2445 #ifdef TARGET_LONG_BIT
2446 fprintf_unfiltered (file,
2447 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2448 XSTRING (TARGET_LONG_BIT));
2449 fprintf_unfiltered (file,
2450 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2453 #ifdef TARGET_LONG_DOUBLE_BIT
2454 fprintf_unfiltered (file,
2455 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2456 XSTRING (TARGET_LONG_DOUBLE_BIT));
2457 fprintf_unfiltered (file,
2458 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2459 TARGET_LONG_DOUBLE_BIT);
2461 #ifdef TARGET_LONG_DOUBLE_FORMAT
2462 fprintf_unfiltered (file,
2463 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2464 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2465 fprintf_unfiltered (file,
2466 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %s\n",
2467 (TARGET_LONG_DOUBLE_FORMAT)->name);
2469 #ifdef TARGET_LONG_LONG_BIT
2470 fprintf_unfiltered (file,
2471 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2472 XSTRING (TARGET_LONG_LONG_BIT));
2473 fprintf_unfiltered (file,
2474 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2475 TARGET_LONG_LONG_BIT);
2478 fprintf_unfiltered (file,
2479 "gdbarch_dump: TARGET_OSABI # %s\n",
2480 XSTRING (TARGET_OSABI));
2481 fprintf_unfiltered (file,
2482 "gdbarch_dump: TARGET_OSABI = %ld\n",
2483 (long) TARGET_OSABI);
2485 #ifdef TARGET_PRINT_INSN
2486 fprintf_unfiltered (file,
2487 "gdbarch_dump: %s # %s\n",
2488 "TARGET_PRINT_INSN(vma, info)",
2489 XSTRING (TARGET_PRINT_INSN (vma, info)));
2491 fprintf_unfiltered (file,
2492 "gdbarch_dump: TARGET_PRINT_INSN = <0x%08lx>\n",
2493 (long) current_gdbarch->print_insn
2494 /*TARGET_PRINT_INSN ()*/);
2496 #ifdef TARGET_PTR_BIT
2497 fprintf_unfiltered (file,
2498 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2499 XSTRING (TARGET_PTR_BIT));
2500 fprintf_unfiltered (file,
2501 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2504 #ifdef TARGET_READ_FP
2505 fprintf_unfiltered (file,
2506 "gdbarch_dump: %s # %s\n",
2508 XSTRING (TARGET_READ_FP ()));
2510 fprintf_unfiltered (file,
2511 "gdbarch_dump: TARGET_READ_FP = <0x%08lx>\n",
2512 (long) current_gdbarch->read_fp
2513 /*TARGET_READ_FP ()*/);
2515 #ifdef TARGET_READ_PC
2516 fprintf_unfiltered (file,
2517 "gdbarch_dump: %s # %s\n",
2518 "TARGET_READ_PC(ptid)",
2519 XSTRING (TARGET_READ_PC (ptid)));
2521 fprintf_unfiltered (file,
2522 "gdbarch_dump: TARGET_READ_PC = <0x%08lx>\n",
2523 (long) current_gdbarch->read_pc
2524 /*TARGET_READ_PC ()*/);
2526 #ifdef TARGET_READ_SP
2527 fprintf_unfiltered (file,
2528 "gdbarch_dump: %s # %s\n",
2530 XSTRING (TARGET_READ_SP ()));
2532 fprintf_unfiltered (file,
2533 "gdbarch_dump: TARGET_READ_SP = <0x%08lx>\n",
2534 (long) current_gdbarch->read_sp
2535 /*TARGET_READ_SP ()*/);
2537 #ifdef TARGET_SHORT_BIT
2538 fprintf_unfiltered (file,
2539 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2540 XSTRING (TARGET_SHORT_BIT));
2541 fprintf_unfiltered (file,
2542 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2545 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2547 /* Macro might contain `[{}]' when not multi-arch */
2548 fprintf_unfiltered (file,
2549 "gdbarch_dump: %s # %s\n",
2550 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2551 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2554 fprintf_unfiltered (file,
2555 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = <0x%08lx>\n",
2556 (long) current_gdbarch->virtual_frame_pointer
2557 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2559 #ifdef TARGET_WRITE_PC
2561 /* Macro might contain `[{}]' when not multi-arch */
2562 fprintf_unfiltered (file,
2563 "gdbarch_dump: %s # %s\n",
2564 "TARGET_WRITE_PC(val, ptid)",
2565 XSTRING (TARGET_WRITE_PC (val, ptid)));
2568 fprintf_unfiltered (file,
2569 "gdbarch_dump: TARGET_WRITE_PC = <0x%08lx>\n",
2570 (long) current_gdbarch->write_pc
2571 /*TARGET_WRITE_PC ()*/);
2574 fprintf_unfiltered (file,
2575 "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n",
2576 gdbarch_unwind_dummy_id_p (current_gdbarch));
2578 fprintf_unfiltered (file,
2579 "gdbarch_dump: unwind_dummy_id = 0x%08lx\n",
2580 (long) current_gdbarch->unwind_dummy_id);
2582 fprintf_unfiltered (file,
2583 "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n",
2584 gdbarch_unwind_pc_p (current_gdbarch));
2586 fprintf_unfiltered (file,
2587 "gdbarch_dump: unwind_pc = 0x%08lx\n",
2588 (long) current_gdbarch->unwind_pc);
2589 #ifdef USE_STRUCT_CONVENTION
2590 fprintf_unfiltered (file,
2591 "gdbarch_dump: %s # %s\n",
2592 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2593 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2595 fprintf_unfiltered (file,
2596 "gdbarch_dump: USE_STRUCT_CONVENTION = <0x%08lx>\n",
2597 (long) current_gdbarch->use_struct_convention
2598 /*USE_STRUCT_CONVENTION ()*/);
2600 #ifdef VALUE_TO_REGISTER
2602 /* Macro might contain `[{}]' when not multi-arch */
2603 fprintf_unfiltered (file,
2604 "gdbarch_dump: %s # %s\n",
2605 "VALUE_TO_REGISTER(type, regnum, from, to)",
2606 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2609 fprintf_unfiltered (file,
2610 "gdbarch_dump: VALUE_TO_REGISTER = <0x%08lx>\n",
2611 (long) current_gdbarch->value_to_register
2612 /*VALUE_TO_REGISTER ()*/);
2614 if (current_gdbarch->dump_tdep != NULL)
2615 current_gdbarch->dump_tdep (current_gdbarch, file);
2618 struct gdbarch_tdep *
2619 gdbarch_tdep (struct gdbarch *gdbarch)
2621 if (gdbarch_debug >= 2)
2622 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2623 return gdbarch->tdep;
2627 const struct bfd_arch_info *
2628 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2630 gdb_assert (gdbarch != NULL);
2631 if (gdbarch_debug >= 2)
2632 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2633 return gdbarch->bfd_arch_info;
2637 gdbarch_byte_order (struct gdbarch *gdbarch)
2639 gdb_assert (gdbarch != NULL);
2640 if (gdbarch_debug >= 2)
2641 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2642 return gdbarch->byte_order;
2646 gdbarch_osabi (struct gdbarch *gdbarch)
2648 gdb_assert (gdbarch != NULL);
2649 if (gdbarch_debug >= 2)
2650 fprintf_unfiltered (gdb_stdlog, "gdbarch_osabi called\n");
2651 return gdbarch->osabi;
2655 gdbarch_short_bit (struct gdbarch *gdbarch)
2657 gdb_assert (gdbarch != NULL);
2658 /* Skip verify of short_bit, invalid_p == 0 */
2659 if (gdbarch_debug >= 2)
2660 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2661 return gdbarch->short_bit;
2665 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2668 gdbarch->short_bit = short_bit;
2672 gdbarch_int_bit (struct gdbarch *gdbarch)
2674 gdb_assert (gdbarch != NULL);
2675 /* Skip verify of int_bit, invalid_p == 0 */
2676 if (gdbarch_debug >= 2)
2677 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2678 return gdbarch->int_bit;
2682 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2685 gdbarch->int_bit = int_bit;
2689 gdbarch_long_bit (struct gdbarch *gdbarch)
2691 gdb_assert (gdbarch != NULL);
2692 /* Skip verify of long_bit, invalid_p == 0 */
2693 if (gdbarch_debug >= 2)
2694 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2695 return gdbarch->long_bit;
2699 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2702 gdbarch->long_bit = long_bit;
2706 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2708 gdb_assert (gdbarch != NULL);
2709 /* Skip verify of long_long_bit, invalid_p == 0 */
2710 if (gdbarch_debug >= 2)
2711 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2712 return gdbarch->long_long_bit;
2716 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2719 gdbarch->long_long_bit = long_long_bit;
2723 gdbarch_float_bit (struct gdbarch *gdbarch)
2725 gdb_assert (gdbarch != NULL);
2726 /* Skip verify of float_bit, invalid_p == 0 */
2727 if (gdbarch_debug >= 2)
2728 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2729 return gdbarch->float_bit;
2733 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2736 gdbarch->float_bit = float_bit;
2740 gdbarch_double_bit (struct gdbarch *gdbarch)
2742 gdb_assert (gdbarch != NULL);
2743 /* Skip verify of double_bit, invalid_p == 0 */
2744 if (gdbarch_debug >= 2)
2745 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2746 return gdbarch->double_bit;
2750 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2753 gdbarch->double_bit = double_bit;
2757 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2759 gdb_assert (gdbarch != NULL);
2760 /* Skip verify of long_double_bit, invalid_p == 0 */
2761 if (gdbarch_debug >= 2)
2762 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2763 return gdbarch->long_double_bit;
2767 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2768 int long_double_bit)
2770 gdbarch->long_double_bit = long_double_bit;
2774 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2776 gdb_assert (gdbarch != NULL);
2777 /* Skip verify of ptr_bit, invalid_p == 0 */
2778 if (gdbarch_debug >= 2)
2779 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2780 return gdbarch->ptr_bit;
2784 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2787 gdbarch->ptr_bit = ptr_bit;
2791 gdbarch_addr_bit (struct gdbarch *gdbarch)
2793 gdb_assert (gdbarch != NULL);
2794 if (gdbarch->addr_bit == 0)
2795 internal_error (__FILE__, __LINE__,
2796 "gdbarch: gdbarch_addr_bit invalid");
2797 if (gdbarch_debug >= 2)
2798 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2799 return gdbarch->addr_bit;
2803 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2806 gdbarch->addr_bit = addr_bit;
2810 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2812 gdb_assert (gdbarch != NULL);
2813 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2814 if (gdbarch_debug >= 2)
2815 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2816 return gdbarch->bfd_vma_bit;
2820 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2823 gdbarch->bfd_vma_bit = bfd_vma_bit;
2827 gdbarch_char_signed (struct gdbarch *gdbarch)
2829 gdb_assert (gdbarch != NULL);
2830 if (gdbarch->char_signed == -1)
2831 internal_error (__FILE__, __LINE__,
2832 "gdbarch: gdbarch_char_signed invalid");
2833 if (gdbarch_debug >= 2)
2834 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2835 return gdbarch->char_signed;
2839 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2842 gdbarch->char_signed = char_signed;
2846 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2848 gdb_assert (gdbarch != NULL);
2849 if (gdbarch->read_pc == 0)
2850 internal_error (__FILE__, __LINE__,
2851 "gdbarch: gdbarch_read_pc invalid");
2852 if (gdbarch_debug >= 2)
2853 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2854 return gdbarch->read_pc (ptid);
2858 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2859 gdbarch_read_pc_ftype read_pc)
2861 gdbarch->read_pc = read_pc;
2865 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2867 gdb_assert (gdbarch != NULL);
2868 if (gdbarch->write_pc == 0)
2869 internal_error (__FILE__, __LINE__,
2870 "gdbarch: gdbarch_write_pc invalid");
2871 if (gdbarch_debug >= 2)
2872 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2873 gdbarch->write_pc (val, ptid);
2877 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2878 gdbarch_write_pc_ftype write_pc)
2880 gdbarch->write_pc = write_pc;
2884 gdbarch_read_fp (struct gdbarch *gdbarch)
2886 gdb_assert (gdbarch != NULL);
2887 if (gdbarch->read_fp == 0)
2888 internal_error (__FILE__, __LINE__,
2889 "gdbarch: gdbarch_read_fp invalid");
2890 if (gdbarch_debug >= 2)
2891 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2892 return gdbarch->read_fp ();
2896 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2897 gdbarch_read_fp_ftype read_fp)
2899 gdbarch->read_fp = read_fp;
2903 gdbarch_read_sp (struct gdbarch *gdbarch)
2905 gdb_assert (gdbarch != NULL);
2906 if (gdbarch->read_sp == 0)
2907 internal_error (__FILE__, __LINE__,
2908 "gdbarch: gdbarch_read_sp invalid");
2909 if (gdbarch_debug >= 2)
2910 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2911 return gdbarch->read_sp ();
2915 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2916 gdbarch_read_sp_ftype read_sp)
2918 gdbarch->read_sp = read_sp;
2922 gdbarch_deprecated_dummy_write_sp_p (struct gdbarch *gdbarch)
2924 gdb_assert (gdbarch != NULL);
2925 return gdbarch->deprecated_dummy_write_sp != 0;
2929 gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2931 gdb_assert (gdbarch != NULL);
2932 if (gdbarch->deprecated_dummy_write_sp == 0)
2933 internal_error (__FILE__, __LINE__,
2934 "gdbarch: gdbarch_deprecated_dummy_write_sp invalid");
2935 if (gdbarch_debug >= 2)
2936 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_dummy_write_sp called\n");
2937 gdbarch->deprecated_dummy_write_sp (val);
2941 set_gdbarch_deprecated_dummy_write_sp (struct gdbarch *gdbarch,
2942 gdbarch_deprecated_dummy_write_sp_ftype deprecated_dummy_write_sp)
2944 gdbarch->deprecated_dummy_write_sp = deprecated_dummy_write_sp;
2948 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2950 gdb_assert (gdbarch != NULL);
2951 if (gdbarch->virtual_frame_pointer == 0)
2952 internal_error (__FILE__, __LINE__,
2953 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2954 if (gdbarch_debug >= 2)
2955 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2956 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2960 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2961 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2963 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2967 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2969 gdb_assert (gdbarch != NULL);
2970 return gdbarch->pseudo_register_read != 0;
2974 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2976 gdb_assert (gdbarch != NULL);
2977 if (gdbarch->pseudo_register_read == 0)
2978 internal_error (__FILE__, __LINE__,
2979 "gdbarch: gdbarch_pseudo_register_read invalid");
2980 if (gdbarch_debug >= 2)
2981 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2982 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2986 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2987 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2989 gdbarch->pseudo_register_read = pseudo_register_read;
2993 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2995 gdb_assert (gdbarch != NULL);
2996 return gdbarch->pseudo_register_write != 0;
3000 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
3002 gdb_assert (gdbarch != NULL);
3003 if (gdbarch->pseudo_register_write == 0)
3004 internal_error (__FILE__, __LINE__,
3005 "gdbarch: gdbarch_pseudo_register_write invalid");
3006 if (gdbarch_debug >= 2)
3007 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
3008 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
3012 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
3013 gdbarch_pseudo_register_write_ftype pseudo_register_write)
3015 gdbarch->pseudo_register_write = pseudo_register_write;
3019 gdbarch_num_regs (struct gdbarch *gdbarch)
3021 gdb_assert (gdbarch != NULL);
3022 if (gdbarch->num_regs == -1)
3023 internal_error (__FILE__, __LINE__,
3024 "gdbarch: gdbarch_num_regs invalid");
3025 if (gdbarch_debug >= 2)
3026 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
3027 return gdbarch->num_regs;
3031 set_gdbarch_num_regs (struct gdbarch *gdbarch,
3034 gdbarch->num_regs = num_regs;
3038 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
3040 gdb_assert (gdbarch != NULL);
3041 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
3042 if (gdbarch_debug >= 2)
3043 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
3044 return gdbarch->num_pseudo_regs;
3048 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
3049 int num_pseudo_regs)
3051 gdbarch->num_pseudo_regs = num_pseudo_regs;
3055 gdbarch_sp_regnum (struct gdbarch *gdbarch)
3057 gdb_assert (gdbarch != NULL);
3058 /* Skip verify of sp_regnum, invalid_p == 0 */
3059 if (gdbarch_debug >= 2)
3060 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
3061 return gdbarch->sp_regnum;
3065 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
3068 gdbarch->sp_regnum = sp_regnum;
3072 gdbarch_fp_regnum (struct gdbarch *gdbarch)
3074 gdb_assert (gdbarch != NULL);
3075 /* Skip verify of fp_regnum, invalid_p == 0 */
3076 if (gdbarch_debug >= 2)
3077 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
3078 return gdbarch->fp_regnum;
3082 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
3085 gdbarch->fp_regnum = fp_regnum;
3089 gdbarch_pc_regnum (struct gdbarch *gdbarch)
3091 gdb_assert (gdbarch != NULL);
3092 /* Skip verify of pc_regnum, invalid_p == 0 */
3093 if (gdbarch_debug >= 2)
3094 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
3095 return gdbarch->pc_regnum;
3099 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
3102 gdbarch->pc_regnum = pc_regnum;
3106 gdbarch_ps_regnum (struct gdbarch *gdbarch)
3108 gdb_assert (gdbarch != NULL);
3109 /* Skip verify of ps_regnum, invalid_p == 0 */
3110 if (gdbarch_debug >= 2)
3111 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
3112 return gdbarch->ps_regnum;
3116 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
3119 gdbarch->ps_regnum = ps_regnum;
3123 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
3125 gdb_assert (gdbarch != NULL);
3126 /* Skip verify of fp0_regnum, invalid_p == 0 */
3127 if (gdbarch_debug >= 2)
3128 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
3129 return gdbarch->fp0_regnum;
3133 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
3136 gdbarch->fp0_regnum = fp0_regnum;
3140 gdbarch_npc_regnum (struct gdbarch *gdbarch)
3142 gdb_assert (gdbarch != NULL);
3143 /* Skip verify of npc_regnum, invalid_p == 0 */
3144 if (gdbarch_debug >= 2)
3145 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
3146 return gdbarch->npc_regnum;
3150 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
3153 gdbarch->npc_regnum = npc_regnum;
3157 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
3159 gdb_assert (gdbarch != NULL);
3160 if (gdbarch->stab_reg_to_regnum == 0)
3161 internal_error (__FILE__, __LINE__,
3162 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
3163 if (gdbarch_debug >= 2)
3164 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
3165 return gdbarch->stab_reg_to_regnum (stab_regnr);
3169 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
3170 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
3172 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
3176 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
3178 gdb_assert (gdbarch != NULL);
3179 if (gdbarch->ecoff_reg_to_regnum == 0)
3180 internal_error (__FILE__, __LINE__,
3181 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
3182 if (gdbarch_debug >= 2)
3183 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
3184 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
3188 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
3189 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
3191 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
3195 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
3197 gdb_assert (gdbarch != NULL);
3198 if (gdbarch->dwarf_reg_to_regnum == 0)
3199 internal_error (__FILE__, __LINE__,
3200 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
3201 if (gdbarch_debug >= 2)
3202 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
3203 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
3207 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
3208 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
3210 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
3214 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
3216 gdb_assert (gdbarch != NULL);
3217 if (gdbarch->sdb_reg_to_regnum == 0)
3218 internal_error (__FILE__, __LINE__,
3219 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
3220 if (gdbarch_debug >= 2)
3221 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
3222 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
3226 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
3227 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
3229 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
3233 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
3235 gdb_assert (gdbarch != NULL);
3236 if (gdbarch->dwarf2_reg_to_regnum == 0)
3237 internal_error (__FILE__, __LINE__,
3238 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
3239 if (gdbarch_debug >= 2)
3240 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
3241 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
3245 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
3246 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
3248 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
3252 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
3254 gdb_assert (gdbarch != NULL);
3255 if (gdbarch->register_name == 0)
3256 internal_error (__FILE__, __LINE__,
3257 "gdbarch: gdbarch_register_name invalid");
3258 if (gdbarch_debug >= 2)
3259 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
3260 return gdbarch->register_name (regnr);
3264 set_gdbarch_register_name (struct gdbarch *gdbarch,
3265 gdbarch_register_name_ftype register_name)
3267 gdbarch->register_name = register_name;
3271 gdbarch_register_size (struct gdbarch *gdbarch)
3273 gdb_assert (gdbarch != NULL);
3274 if (gdbarch->register_size == -1)
3275 internal_error (__FILE__, __LINE__,
3276 "gdbarch: gdbarch_register_size invalid");
3277 if (gdbarch_debug >= 2)
3278 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
3279 return gdbarch->register_size;
3283 set_gdbarch_register_size (struct gdbarch *gdbarch,
3286 gdbarch->register_size = register_size;
3290 gdbarch_register_bytes (struct gdbarch *gdbarch)
3292 gdb_assert (gdbarch != NULL);
3293 if (gdbarch->register_bytes == -1)
3294 internal_error (__FILE__, __LINE__,
3295 "gdbarch: gdbarch_register_bytes invalid");
3296 if (gdbarch_debug >= 2)
3297 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3298 return gdbarch->register_bytes;
3302 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3305 gdbarch->register_bytes = register_bytes;
3309 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3311 gdb_assert (gdbarch != NULL);
3312 if (gdbarch->register_byte == 0)
3313 internal_error (__FILE__, __LINE__,
3314 "gdbarch: gdbarch_register_byte invalid");
3315 if (gdbarch_debug >= 2)
3316 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3317 return gdbarch->register_byte (reg_nr);
3321 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3322 gdbarch_register_byte_ftype register_byte)
3324 gdbarch->register_byte = register_byte;
3328 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3330 gdb_assert (gdbarch != NULL);
3331 if (gdbarch->register_raw_size == 0)
3332 internal_error (__FILE__, __LINE__,
3333 "gdbarch: gdbarch_register_raw_size invalid");
3334 if (gdbarch_debug >= 2)
3335 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3336 return gdbarch->register_raw_size (reg_nr);
3340 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3341 gdbarch_register_raw_size_ftype register_raw_size)
3343 gdbarch->register_raw_size = register_raw_size;
3347 gdbarch_deprecated_max_register_raw_size_p (struct gdbarch *gdbarch)
3349 gdb_assert (gdbarch != NULL);
3350 return gdbarch->deprecated_max_register_raw_size != 0;
3354 gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch)
3356 gdb_assert (gdbarch != NULL);
3357 if (gdbarch_debug >= 2)
3358 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_raw_size called\n");
3359 return gdbarch->deprecated_max_register_raw_size;
3363 set_gdbarch_deprecated_max_register_raw_size (struct gdbarch *gdbarch,
3364 int deprecated_max_register_raw_size)
3366 gdbarch->deprecated_max_register_raw_size = deprecated_max_register_raw_size;
3370 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3372 gdb_assert (gdbarch != NULL);
3373 if (gdbarch->register_virtual_size == 0)
3374 internal_error (__FILE__, __LINE__,
3375 "gdbarch: gdbarch_register_virtual_size invalid");
3376 if (gdbarch_debug >= 2)
3377 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3378 return gdbarch->register_virtual_size (reg_nr);
3382 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3383 gdbarch_register_virtual_size_ftype register_virtual_size)
3385 gdbarch->register_virtual_size = register_virtual_size;
3389 gdbarch_deprecated_max_register_virtual_size_p (struct gdbarch *gdbarch)
3391 gdb_assert (gdbarch != NULL);
3392 return gdbarch->deprecated_max_register_virtual_size != 0;
3396 gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch)
3398 gdb_assert (gdbarch != NULL);
3399 if (gdbarch_debug >= 2)
3400 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_max_register_virtual_size called\n");
3401 return gdbarch->deprecated_max_register_virtual_size;
3405 set_gdbarch_deprecated_max_register_virtual_size (struct gdbarch *gdbarch,
3406 int deprecated_max_register_virtual_size)
3408 gdbarch->deprecated_max_register_virtual_size = deprecated_max_register_virtual_size;
3412 gdbarch_register_virtual_type_p (struct gdbarch *gdbarch)
3414 gdb_assert (gdbarch != NULL);
3415 return gdbarch->register_virtual_type != 0;
3419 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3421 gdb_assert (gdbarch != NULL);
3422 if (gdbarch->register_virtual_type == 0)
3423 internal_error (__FILE__, __LINE__,
3424 "gdbarch: gdbarch_register_virtual_type invalid");
3425 if (gdbarch_debug >= 2)
3426 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3427 return gdbarch->register_virtual_type (reg_nr);
3431 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3432 gdbarch_register_virtual_type_ftype register_virtual_type)
3434 gdbarch->register_virtual_type = register_virtual_type;
3438 gdbarch_register_type_p (struct gdbarch *gdbarch)
3440 gdb_assert (gdbarch != NULL);
3441 return gdbarch->register_type != 0;
3445 gdbarch_register_type (struct gdbarch *gdbarch, int reg_nr)
3447 gdb_assert (gdbarch != NULL);
3448 if (gdbarch->register_type == 0)
3449 internal_error (__FILE__, __LINE__,
3450 "gdbarch: gdbarch_register_type invalid");
3451 if (gdbarch_debug >= 2)
3452 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_type called\n");
3453 return gdbarch->register_type (gdbarch, reg_nr);
3457 set_gdbarch_register_type (struct gdbarch *gdbarch,
3458 gdbarch_register_type_ftype register_type)
3460 gdbarch->register_type = register_type;
3464 gdbarch_deprecated_do_registers_info_p (struct gdbarch *gdbarch)
3466 gdb_assert (gdbarch != NULL);
3467 return gdbarch->deprecated_do_registers_info != 0;
3471 gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3473 gdb_assert (gdbarch != NULL);
3474 if (gdbarch->deprecated_do_registers_info == 0)
3475 internal_error (__FILE__, __LINE__,
3476 "gdbarch: gdbarch_deprecated_do_registers_info invalid");
3477 if (gdbarch_debug >= 2)
3478 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_do_registers_info called\n");
3479 gdbarch->deprecated_do_registers_info (reg_nr, fpregs);
3483 set_gdbarch_deprecated_do_registers_info (struct gdbarch *gdbarch,
3484 gdbarch_deprecated_do_registers_info_ftype deprecated_do_registers_info)
3486 gdbarch->deprecated_do_registers_info = deprecated_do_registers_info;
3490 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3492 gdb_assert (gdbarch != NULL);
3493 if (gdbarch->print_registers_info == 0)
3494 internal_error (__FILE__, __LINE__,
3495 "gdbarch: gdbarch_print_registers_info invalid");
3496 if (gdbarch_debug >= 2)
3497 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3498 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3502 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3503 gdbarch_print_registers_info_ftype print_registers_info)
3505 gdbarch->print_registers_info = print_registers_info;
3509 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3511 gdb_assert (gdbarch != NULL);
3512 return gdbarch->print_float_info != 0;
3516 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3518 gdb_assert (gdbarch != NULL);
3519 if (gdbarch->print_float_info == 0)
3520 internal_error (__FILE__, __LINE__,
3521 "gdbarch: gdbarch_print_float_info invalid");
3522 if (gdbarch_debug >= 2)
3523 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3524 gdbarch->print_float_info (gdbarch, file, frame, args);
3528 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3529 gdbarch_print_float_info_ftype print_float_info)
3531 gdbarch->print_float_info = print_float_info;
3535 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3537 gdb_assert (gdbarch != NULL);
3538 return gdbarch->print_vector_info != 0;
3542 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3544 gdb_assert (gdbarch != NULL);
3545 if (gdbarch->print_vector_info == 0)
3546 internal_error (__FILE__, __LINE__,
3547 "gdbarch: gdbarch_print_vector_info invalid");
3548 if (gdbarch_debug >= 2)
3549 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3550 gdbarch->print_vector_info (gdbarch, file, frame, args);
3554 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3555 gdbarch_print_vector_info_ftype print_vector_info)
3557 gdbarch->print_vector_info = print_vector_info;
3561 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3563 gdb_assert (gdbarch != NULL);
3564 if (gdbarch->register_sim_regno == 0)
3565 internal_error (__FILE__, __LINE__,
3566 "gdbarch: gdbarch_register_sim_regno invalid");
3567 if (gdbarch_debug >= 2)
3568 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3569 return gdbarch->register_sim_regno (reg_nr);
3573 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3574 gdbarch_register_sim_regno_ftype register_sim_regno)
3576 gdbarch->register_sim_regno = register_sim_regno;
3580 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3582 gdb_assert (gdbarch != NULL);
3583 return gdbarch->register_bytes_ok != 0;
3587 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3589 gdb_assert (gdbarch != NULL);
3590 if (gdbarch->register_bytes_ok == 0)
3591 internal_error (__FILE__, __LINE__,
3592 "gdbarch: gdbarch_register_bytes_ok invalid");
3593 if (gdbarch_debug >= 2)
3594 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3595 return gdbarch->register_bytes_ok (nr_bytes);
3599 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3600 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3602 gdbarch->register_bytes_ok = register_bytes_ok;
3606 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3608 gdb_assert (gdbarch != NULL);
3609 if (gdbarch->cannot_fetch_register == 0)
3610 internal_error (__FILE__, __LINE__,
3611 "gdbarch: gdbarch_cannot_fetch_register invalid");
3612 if (gdbarch_debug >= 2)
3613 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3614 return gdbarch->cannot_fetch_register (regnum);
3618 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3619 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3621 gdbarch->cannot_fetch_register = cannot_fetch_register;
3625 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3627 gdb_assert (gdbarch != NULL);
3628 if (gdbarch->cannot_store_register == 0)
3629 internal_error (__FILE__, __LINE__,
3630 "gdbarch: gdbarch_cannot_store_register invalid");
3631 if (gdbarch_debug >= 2)
3632 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3633 return gdbarch->cannot_store_register (regnum);
3637 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3638 gdbarch_cannot_store_register_ftype cannot_store_register)
3640 gdbarch->cannot_store_register = cannot_store_register;
3644 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3646 gdb_assert (gdbarch != NULL);
3647 return gdbarch->get_longjmp_target != 0;
3651 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3653 gdb_assert (gdbarch != NULL);
3654 if (gdbarch->get_longjmp_target == 0)
3655 internal_error (__FILE__, __LINE__,
3656 "gdbarch: gdbarch_get_longjmp_target invalid");
3657 if (gdbarch_debug >= 2)
3658 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3659 return gdbarch->get_longjmp_target (pc);
3663 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3664 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3666 gdbarch->get_longjmp_target = get_longjmp_target;
3670 gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch)
3672 gdb_assert (gdbarch != NULL);
3673 /* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
3674 if (gdbarch_debug >= 2)
3675 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_use_generic_dummy_frames called\n");
3676 return gdbarch->deprecated_use_generic_dummy_frames;
3680 set_gdbarch_deprecated_use_generic_dummy_frames (struct gdbarch *gdbarch,
3681 int deprecated_use_generic_dummy_frames)
3683 gdbarch->deprecated_use_generic_dummy_frames = deprecated_use_generic_dummy_frames;
3687 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3689 gdb_assert (gdbarch != NULL);
3690 /* Skip verify of call_dummy_location, invalid_p == 0 */
3691 if (gdbarch_debug >= 2)
3692 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3693 return gdbarch->call_dummy_location;
3697 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3698 int call_dummy_location)
3700 gdbarch->call_dummy_location = call_dummy_location;
3704 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3706 gdb_assert (gdbarch != NULL);
3707 if (gdbarch->call_dummy_address == 0)
3708 internal_error (__FILE__, __LINE__,
3709 "gdbarch: gdbarch_call_dummy_address invalid");
3710 if (gdbarch_debug >= 2)
3711 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3712 return gdbarch->call_dummy_address ();
3716 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3717 gdbarch_call_dummy_address_ftype call_dummy_address)
3719 gdbarch->call_dummy_address = call_dummy_address;
3723 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3725 gdb_assert (gdbarch != NULL);
3726 if (gdbarch_debug >= 2)
3727 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3728 return gdbarch->call_dummy_start_offset;
3732 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3733 CORE_ADDR call_dummy_start_offset)
3735 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3739 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3741 gdb_assert (gdbarch != NULL);
3742 if (gdbarch_debug >= 2)
3743 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3744 return gdbarch->call_dummy_breakpoint_offset;
3748 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3749 CORE_ADDR call_dummy_breakpoint_offset)
3751 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3755 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3757 gdb_assert (gdbarch != NULL);
3758 if (gdbarch_debug >= 2)
3759 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3760 return gdbarch->call_dummy_length;
3764 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3765 int call_dummy_length)
3767 gdbarch->call_dummy_length = call_dummy_length;
3771 gdbarch_deprecated_pc_in_call_dummy_p (struct gdbarch *gdbarch)
3773 gdb_assert (gdbarch != NULL);
3774 return gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy;
3778 gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3780 gdb_assert (gdbarch != NULL);
3781 if (gdbarch->deprecated_pc_in_call_dummy == 0)
3782 internal_error (__FILE__, __LINE__,
3783 "gdbarch: gdbarch_deprecated_pc_in_call_dummy invalid");
3784 /* Ignore predicate (gdbarch->deprecated_pc_in_call_dummy != generic_pc_in_call_dummy). */
3785 if (gdbarch_debug >= 2)
3786 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pc_in_call_dummy called\n");
3787 return gdbarch->deprecated_pc_in_call_dummy (pc, sp, frame_address);
3791 set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch,
3792 gdbarch_deprecated_pc_in_call_dummy_ftype deprecated_pc_in_call_dummy)
3794 gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
3798 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3800 gdb_assert (gdbarch != NULL);
3801 /* Skip verify of call_dummy_words, invalid_p == 0 */
3802 if (gdbarch_debug >= 2)
3803 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3804 return gdbarch->call_dummy_words;
3808 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3809 LONGEST * call_dummy_words)
3811 gdbarch->call_dummy_words = call_dummy_words;
3815 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3817 gdb_assert (gdbarch != NULL);
3818 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3819 if (gdbarch_debug >= 2)
3820 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3821 return gdbarch->sizeof_call_dummy_words;
3825 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3826 int sizeof_call_dummy_words)
3828 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3832 gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3834 gdb_assert (gdbarch != NULL);
3835 return gdbarch->deprecated_call_dummy_stack_adjust != 0;
3839 gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3841 gdb_assert (gdbarch != NULL);
3842 if (gdbarch_debug >= 2)
3843 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
3844 return gdbarch->deprecated_call_dummy_stack_adjust;
3848 set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3849 int deprecated_call_dummy_stack_adjust)
3851 gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
3855 gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch)
3857 gdb_assert (gdbarch != NULL);
3858 return gdbarch->fix_call_dummy != 0;
3862 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)
3864 gdb_assert (gdbarch != NULL);
3865 if (gdbarch->fix_call_dummy == 0)
3866 internal_error (__FILE__, __LINE__,
3867 "gdbarch: gdbarch_fix_call_dummy invalid");
3868 if (gdbarch_debug >= 2)
3869 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3870 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3874 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3875 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3877 gdbarch->fix_call_dummy = fix_call_dummy;
3881 gdbarch_deprecated_init_frame_pc_first_p (struct gdbarch *gdbarch)
3883 gdb_assert (gdbarch != NULL);
3884 return gdbarch->deprecated_init_frame_pc_first != 0;
3888 gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3890 gdb_assert (gdbarch != NULL);
3891 if (gdbarch->deprecated_init_frame_pc_first == 0)
3892 internal_error (__FILE__, __LINE__,
3893 "gdbarch: gdbarch_deprecated_init_frame_pc_first invalid");
3894 if (gdbarch_debug >= 2)
3895 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc_first called\n");
3896 return gdbarch->deprecated_init_frame_pc_first (fromleaf, prev);
3900 set_gdbarch_deprecated_init_frame_pc_first (struct gdbarch *gdbarch,
3901 gdbarch_deprecated_init_frame_pc_first_ftype deprecated_init_frame_pc_first)
3903 gdbarch->deprecated_init_frame_pc_first = deprecated_init_frame_pc_first;
3907 gdbarch_deprecated_init_frame_pc_p (struct gdbarch *gdbarch)
3909 gdb_assert (gdbarch != NULL);
3910 return gdbarch->deprecated_init_frame_pc != 0;
3914 gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3916 gdb_assert (gdbarch != NULL);
3917 if (gdbarch->deprecated_init_frame_pc == 0)
3918 internal_error (__FILE__, __LINE__,
3919 "gdbarch: gdbarch_deprecated_init_frame_pc invalid");
3920 if (gdbarch_debug >= 2)
3921 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_frame_pc called\n");
3922 return gdbarch->deprecated_init_frame_pc (fromleaf, prev);
3926 set_gdbarch_deprecated_init_frame_pc (struct gdbarch *gdbarch,
3927 gdbarch_deprecated_init_frame_pc_ftype deprecated_init_frame_pc)
3929 gdbarch->deprecated_init_frame_pc = deprecated_init_frame_pc;
3933 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3935 gdb_assert (gdbarch != NULL);
3936 if (gdbarch_debug >= 2)
3937 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3938 return gdbarch->believe_pcc_promotion;
3942 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3943 int believe_pcc_promotion)
3945 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3949 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3951 gdb_assert (gdbarch != NULL);
3952 if (gdbarch_debug >= 2)
3953 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3954 return gdbarch->believe_pcc_promotion_type;
3958 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3959 int believe_pcc_promotion_type)
3961 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3965 gdbarch_deprecated_get_saved_register_p (struct gdbarch *gdbarch)
3967 gdb_assert (gdbarch != NULL);
3968 return gdbarch->deprecated_get_saved_register != 0;
3972 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)
3974 gdb_assert (gdbarch != NULL);
3975 if (gdbarch->deprecated_get_saved_register == 0)
3976 internal_error (__FILE__, __LINE__,
3977 "gdbarch: gdbarch_deprecated_get_saved_register invalid");
3978 if (gdbarch_debug >= 2)
3979 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_get_saved_register called\n");
3980 gdbarch->deprecated_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3984 set_gdbarch_deprecated_get_saved_register (struct gdbarch *gdbarch,
3985 gdbarch_deprecated_get_saved_register_ftype deprecated_get_saved_register)
3987 gdbarch->deprecated_get_saved_register = deprecated_get_saved_register;
3991 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3993 gdb_assert (gdbarch != NULL);
3994 if (gdbarch->register_convertible == 0)
3995 internal_error (__FILE__, __LINE__,
3996 "gdbarch: gdbarch_register_convertible invalid");
3997 if (gdbarch_debug >= 2)
3998 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3999 return gdbarch->register_convertible (nr);
4003 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
4004 gdbarch_register_convertible_ftype register_convertible)
4006 gdbarch->register_convertible = register_convertible;
4010 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4012 gdb_assert (gdbarch != NULL);
4013 if (gdbarch->register_convert_to_virtual == 0)
4014 internal_error (__FILE__, __LINE__,
4015 "gdbarch: gdbarch_register_convert_to_virtual invalid");
4016 if (gdbarch_debug >= 2)
4017 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
4018 gdbarch->register_convert_to_virtual (regnum, type, from, to);
4022 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
4023 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
4025 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
4029 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4031 gdb_assert (gdbarch != NULL);
4032 if (gdbarch->register_convert_to_raw == 0)
4033 internal_error (__FILE__, __LINE__,
4034 "gdbarch: gdbarch_register_convert_to_raw invalid");
4035 if (gdbarch_debug >= 2)
4036 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
4037 gdbarch->register_convert_to_raw (type, regnum, from, to);
4041 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
4042 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
4044 gdbarch->register_convert_to_raw = register_convert_to_raw;
4048 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
4050 gdb_assert (gdbarch != NULL);
4051 if (gdbarch->convert_register_p == 0)
4052 internal_error (__FILE__, __LINE__,
4053 "gdbarch: gdbarch_convert_register_p invalid");
4054 if (gdbarch_debug >= 2)
4055 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
4056 return gdbarch->convert_register_p (regnum);
4060 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
4061 gdbarch_convert_register_p_ftype convert_register_p)
4063 gdbarch->convert_register_p = convert_register_p;
4067 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
4069 gdb_assert (gdbarch != NULL);
4070 if (gdbarch->register_to_value == 0)
4071 internal_error (__FILE__, __LINE__,
4072 "gdbarch: gdbarch_register_to_value invalid");
4073 if (gdbarch_debug >= 2)
4074 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
4075 gdbarch->register_to_value (regnum, type, from, to);
4079 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
4080 gdbarch_register_to_value_ftype register_to_value)
4082 gdbarch->register_to_value = register_to_value;
4086 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
4088 gdb_assert (gdbarch != NULL);
4089 if (gdbarch->value_to_register == 0)
4090 internal_error (__FILE__, __LINE__,
4091 "gdbarch: gdbarch_value_to_register invalid");
4092 if (gdbarch_debug >= 2)
4093 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
4094 gdbarch->value_to_register (type, regnum, from, to);
4098 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
4099 gdbarch_value_to_register_ftype value_to_register)
4101 gdbarch->value_to_register = value_to_register;
4105 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, const void *buf)
4107 gdb_assert (gdbarch != NULL);
4108 if (gdbarch->pointer_to_address == 0)
4109 internal_error (__FILE__, __LINE__,
4110 "gdbarch: gdbarch_pointer_to_address invalid");
4111 if (gdbarch_debug >= 2)
4112 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
4113 return gdbarch->pointer_to_address (type, buf);
4117 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
4118 gdbarch_pointer_to_address_ftype pointer_to_address)
4120 gdbarch->pointer_to_address = pointer_to_address;
4124 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
4126 gdb_assert (gdbarch != NULL);
4127 if (gdbarch->address_to_pointer == 0)
4128 internal_error (__FILE__, __LINE__,
4129 "gdbarch: gdbarch_address_to_pointer invalid");
4130 if (gdbarch_debug >= 2)
4131 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
4132 gdbarch->address_to_pointer (type, buf, addr);
4136 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
4137 gdbarch_address_to_pointer_ftype address_to_pointer)
4139 gdbarch->address_to_pointer = address_to_pointer;
4143 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
4145 gdb_assert (gdbarch != NULL);
4146 return gdbarch->integer_to_address != 0;
4150 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
4152 gdb_assert (gdbarch != NULL);
4153 if (gdbarch->integer_to_address == 0)
4154 internal_error (__FILE__, __LINE__,
4155 "gdbarch: gdbarch_integer_to_address invalid");
4156 if (gdbarch_debug >= 2)
4157 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
4158 return gdbarch->integer_to_address (type, buf);
4162 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
4163 gdbarch_integer_to_address_ftype integer_to_address)
4165 gdbarch->integer_to_address = integer_to_address;
4169 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
4171 gdb_assert (gdbarch != NULL);
4172 if (gdbarch->return_value_on_stack == 0)
4173 internal_error (__FILE__, __LINE__,
4174 "gdbarch: gdbarch_return_value_on_stack invalid");
4175 if (gdbarch_debug >= 2)
4176 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
4177 return gdbarch->return_value_on_stack (type);
4181 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
4182 gdbarch_return_value_on_stack_ftype return_value_on_stack)
4184 gdbarch->return_value_on_stack = return_value_on_stack;
4188 gdbarch_deprecated_push_arguments_p (struct gdbarch *gdbarch)
4190 gdb_assert (gdbarch != NULL);
4191 return gdbarch->deprecated_push_arguments != 0;
4195 gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
4197 gdb_assert (gdbarch != NULL);
4198 if (gdbarch->deprecated_push_arguments == 0)
4199 internal_error (__FILE__, __LINE__,
4200 "gdbarch: gdbarch_deprecated_push_arguments invalid");
4201 if (gdbarch_debug >= 2)
4202 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_arguments called\n");
4203 return gdbarch->deprecated_push_arguments (nargs, args, sp, struct_return, struct_addr);
4207 set_gdbarch_deprecated_push_arguments (struct gdbarch *gdbarch,
4208 gdbarch_deprecated_push_arguments_ftype deprecated_push_arguments)
4210 gdbarch->deprecated_push_arguments = deprecated_push_arguments;
4214 gdbarch_push_dummy_call_p (struct gdbarch *gdbarch)
4216 gdb_assert (gdbarch != NULL);
4217 return gdbarch->push_dummy_call != 0;
4221 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)
4223 gdb_assert (gdbarch != NULL);
4224 if (gdbarch->push_dummy_call == 0)
4225 internal_error (__FILE__, __LINE__,
4226 "gdbarch: gdbarch_push_dummy_call invalid");
4227 if (gdbarch_debug >= 2)
4228 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_call called\n");
4229 return gdbarch->push_dummy_call (gdbarch, regcache, dummy_addr, nargs, args, sp, struct_return, struct_addr);
4233 set_gdbarch_push_dummy_call (struct gdbarch *gdbarch,
4234 gdbarch_push_dummy_call_ftype push_dummy_call)
4236 gdbarch->push_dummy_call = push_dummy_call;
4240 gdbarch_deprecated_push_dummy_frame_p (struct gdbarch *gdbarch)
4242 gdb_assert (gdbarch != NULL);
4243 return gdbarch->deprecated_push_dummy_frame != 0;
4247 gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch)
4249 gdb_assert (gdbarch != NULL);
4250 if (gdbarch->deprecated_push_dummy_frame == 0)
4251 internal_error (__FILE__, __LINE__,
4252 "gdbarch: gdbarch_deprecated_push_dummy_frame invalid");
4253 if (gdbarch_debug >= 2)
4254 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_dummy_frame called\n");
4255 gdbarch->deprecated_push_dummy_frame ();
4259 set_gdbarch_deprecated_push_dummy_frame (struct gdbarch *gdbarch,
4260 gdbarch_deprecated_push_dummy_frame_ftype deprecated_push_dummy_frame)
4262 gdbarch->deprecated_push_dummy_frame = deprecated_push_dummy_frame;
4266 gdbarch_deprecated_push_return_address_p (struct gdbarch *gdbarch)
4268 gdb_assert (gdbarch != NULL);
4269 return gdbarch->deprecated_push_return_address != 0;
4273 gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
4275 gdb_assert (gdbarch != NULL);
4276 if (gdbarch->deprecated_push_return_address == 0)
4277 internal_error (__FILE__, __LINE__,
4278 "gdbarch: gdbarch_deprecated_push_return_address invalid");
4279 if (gdbarch_debug >= 2)
4280 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_push_return_address called\n");
4281 return gdbarch->deprecated_push_return_address (pc, sp);
4285 set_gdbarch_deprecated_push_return_address (struct gdbarch *gdbarch,
4286 gdbarch_deprecated_push_return_address_ftype deprecated_push_return_address)
4288 gdbarch->deprecated_push_return_address = deprecated_push_return_address;
4292 gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
4294 gdb_assert (gdbarch != NULL);
4295 return gdbarch->deprecated_pop_frame != 0;
4299 gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch)
4301 gdb_assert (gdbarch != NULL);
4302 if (gdbarch->deprecated_pop_frame == 0)
4303 internal_error (__FILE__, __LINE__,
4304 "gdbarch: gdbarch_deprecated_pop_frame invalid");
4305 if (gdbarch_debug >= 2)
4306 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_pop_frame called\n");
4307 gdbarch->deprecated_pop_frame ();
4311 set_gdbarch_deprecated_pop_frame (struct gdbarch *gdbarch,
4312 gdbarch_deprecated_pop_frame_ftype deprecated_pop_frame)
4314 gdbarch->deprecated_pop_frame = deprecated_pop_frame;
4318 gdbarch_deprecated_store_struct_return_p (struct gdbarch *gdbarch)
4320 gdb_assert (gdbarch != NULL);
4321 return gdbarch->deprecated_store_struct_return != 0;
4325 gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
4327 gdb_assert (gdbarch != NULL);
4328 if (gdbarch->deprecated_store_struct_return == 0)
4329 internal_error (__FILE__, __LINE__,
4330 "gdbarch: gdbarch_deprecated_store_struct_return invalid");
4331 if (gdbarch_debug >= 2)
4332 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_struct_return called\n");
4333 gdbarch->deprecated_store_struct_return (addr, sp);
4337 set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
4338 gdbarch_deprecated_store_struct_return_ftype deprecated_store_struct_return)
4340 gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
4344 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4346 gdb_assert (gdbarch != NULL);
4347 if (gdbarch->extract_return_value == 0)
4348 internal_error (__FILE__, __LINE__,
4349 "gdbarch: gdbarch_extract_return_value invalid");
4350 if (gdbarch_debug >= 2)
4351 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4352 gdbarch->extract_return_value (type, regcache, valbuf);
4356 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4357 gdbarch_extract_return_value_ftype extract_return_value)
4359 gdbarch->extract_return_value = extract_return_value;
4363 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4365 gdb_assert (gdbarch != NULL);
4366 if (gdbarch->store_return_value == 0)
4367 internal_error (__FILE__, __LINE__,
4368 "gdbarch: gdbarch_store_return_value invalid");
4369 if (gdbarch_debug >= 2)
4370 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4371 gdbarch->store_return_value (type, regcache, valbuf);
4375 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4376 gdbarch_store_return_value_ftype store_return_value)
4378 gdbarch->store_return_value = store_return_value;
4382 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4384 gdb_assert (gdbarch != NULL);
4385 if (gdbarch->deprecated_extract_return_value == 0)
4386 internal_error (__FILE__, __LINE__,
4387 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4388 if (gdbarch_debug >= 2)
4389 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4390 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4394 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4395 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4397 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4401 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4403 gdb_assert (gdbarch != NULL);
4404 if (gdbarch->deprecated_store_return_value == 0)
4405 internal_error (__FILE__, __LINE__,
4406 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4407 if (gdbarch_debug >= 2)
4408 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4409 gdbarch->deprecated_store_return_value (type, valbuf);
4413 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4414 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4416 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4420 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4422 gdb_assert (gdbarch != NULL);
4423 return gdbarch->extract_struct_value_address != 0;
4427 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4429 gdb_assert (gdbarch != NULL);
4430 if (gdbarch->extract_struct_value_address == 0)
4431 internal_error (__FILE__, __LINE__,
4432 "gdbarch: gdbarch_extract_struct_value_address invalid");
4433 if (gdbarch_debug >= 2)
4434 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4435 return gdbarch->extract_struct_value_address (regcache);
4439 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4440 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4442 gdbarch->extract_struct_value_address = extract_struct_value_address;
4446 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4448 gdb_assert (gdbarch != NULL);
4449 return gdbarch->deprecated_extract_struct_value_address != 0;
4453 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4455 gdb_assert (gdbarch != NULL);
4456 if (gdbarch->deprecated_extract_struct_value_address == 0)
4457 internal_error (__FILE__, __LINE__,
4458 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4459 if (gdbarch_debug >= 2)
4460 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4461 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4465 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4466 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4468 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4472 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4474 gdb_assert (gdbarch != NULL);
4475 if (gdbarch->use_struct_convention == 0)
4476 internal_error (__FILE__, __LINE__,
4477 "gdbarch: gdbarch_use_struct_convention invalid");
4478 if (gdbarch_debug >= 2)
4479 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4480 return gdbarch->use_struct_convention (gcc_p, value_type);
4484 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4485 gdbarch_use_struct_convention_ftype use_struct_convention)
4487 gdbarch->use_struct_convention = use_struct_convention;
4491 gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
4493 gdb_assert (gdbarch != NULL);
4494 return gdbarch->deprecated_frame_init_saved_regs != 0;
4498 gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4500 gdb_assert (gdbarch != NULL);
4501 if (gdbarch->deprecated_frame_init_saved_regs == 0)
4502 internal_error (__FILE__, __LINE__,
4503 "gdbarch: gdbarch_deprecated_frame_init_saved_regs invalid");
4504 if (gdbarch_debug >= 2)
4505 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_init_saved_regs called\n");
4506 gdbarch->deprecated_frame_init_saved_regs (frame);
4510 set_gdbarch_deprecated_frame_init_saved_regs (struct gdbarch *gdbarch,
4511 gdbarch_deprecated_frame_init_saved_regs_ftype deprecated_frame_init_saved_regs)
4513 gdbarch->deprecated_frame_init_saved_regs = deprecated_frame_init_saved_regs;
4517 gdbarch_deprecated_init_extra_frame_info_p (struct gdbarch *gdbarch)
4519 gdb_assert (gdbarch != NULL);
4520 return gdbarch->deprecated_init_extra_frame_info != 0;
4524 gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4526 gdb_assert (gdbarch != NULL);
4527 if (gdbarch->deprecated_init_extra_frame_info == 0)
4528 internal_error (__FILE__, __LINE__,
4529 "gdbarch: gdbarch_deprecated_init_extra_frame_info invalid");
4530 if (gdbarch_debug >= 2)
4531 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_init_extra_frame_info called\n");
4532 gdbarch->deprecated_init_extra_frame_info (fromleaf, frame);
4536 set_gdbarch_deprecated_init_extra_frame_info (struct gdbarch *gdbarch,
4537 gdbarch_deprecated_init_extra_frame_info_ftype deprecated_init_extra_frame_info)
4539 gdbarch->deprecated_init_extra_frame_info = deprecated_init_extra_frame_info;
4543 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4545 gdb_assert (gdbarch != NULL);
4546 if (gdbarch->skip_prologue == 0)
4547 internal_error (__FILE__, __LINE__,
4548 "gdbarch: gdbarch_skip_prologue invalid");
4549 if (gdbarch_debug >= 2)
4550 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4551 return gdbarch->skip_prologue (ip);
4555 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4556 gdbarch_skip_prologue_ftype skip_prologue)
4558 gdbarch->skip_prologue = skip_prologue;
4562 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4564 gdb_assert (gdbarch != NULL);
4565 if (gdbarch->prologue_frameless_p == 0)
4566 internal_error (__FILE__, __LINE__,
4567 "gdbarch: gdbarch_prologue_frameless_p invalid");
4568 if (gdbarch_debug >= 2)
4569 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4570 return gdbarch->prologue_frameless_p (ip);
4574 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4575 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4577 gdbarch->prologue_frameless_p = prologue_frameless_p;
4581 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4583 gdb_assert (gdbarch != NULL);
4584 if (gdbarch->inner_than == 0)
4585 internal_error (__FILE__, __LINE__,
4586 "gdbarch: gdbarch_inner_than invalid");
4587 if (gdbarch_debug >= 2)
4588 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4589 return gdbarch->inner_than (lhs, rhs);
4593 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4594 gdbarch_inner_than_ftype inner_than)
4596 gdbarch->inner_than = inner_than;
4599 const unsigned char *
4600 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4602 gdb_assert (gdbarch != NULL);
4603 if (gdbarch->breakpoint_from_pc == 0)
4604 internal_error (__FILE__, __LINE__,
4605 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4606 if (gdbarch_debug >= 2)
4607 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4608 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4612 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4613 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4615 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4619 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4621 gdb_assert (gdbarch != NULL);
4622 if (gdbarch->memory_insert_breakpoint == 0)
4623 internal_error (__FILE__, __LINE__,
4624 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4625 if (gdbarch_debug >= 2)
4626 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4627 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4631 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4632 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4634 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4638 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4640 gdb_assert (gdbarch != NULL);
4641 if (gdbarch->memory_remove_breakpoint == 0)
4642 internal_error (__FILE__, __LINE__,
4643 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4644 if (gdbarch_debug >= 2)
4645 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4646 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4650 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4651 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4653 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4657 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4659 gdb_assert (gdbarch != NULL);
4660 if (gdbarch->decr_pc_after_break == -1)
4661 internal_error (__FILE__, __LINE__,
4662 "gdbarch: gdbarch_decr_pc_after_break invalid");
4663 if (gdbarch_debug >= 2)
4664 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4665 return gdbarch->decr_pc_after_break;
4669 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4670 CORE_ADDR decr_pc_after_break)
4672 gdbarch->decr_pc_after_break = decr_pc_after_break;
4676 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4678 gdb_assert (gdbarch != NULL);
4679 if (gdbarch->prepare_to_proceed == 0)
4680 internal_error (__FILE__, __LINE__,
4681 "gdbarch: gdbarch_prepare_to_proceed invalid");
4682 if (gdbarch_debug >= 2)
4683 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4684 return gdbarch->prepare_to_proceed (select_it);
4688 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4689 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4691 gdbarch->prepare_to_proceed = prepare_to_proceed;
4695 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4697 gdb_assert (gdbarch != NULL);
4698 if (gdbarch->function_start_offset == -1)
4699 internal_error (__FILE__, __LINE__,
4700 "gdbarch: gdbarch_function_start_offset invalid");
4701 if (gdbarch_debug >= 2)
4702 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4703 return gdbarch->function_start_offset;
4707 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4708 CORE_ADDR function_start_offset)
4710 gdbarch->function_start_offset = function_start_offset;
4714 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4716 gdb_assert (gdbarch != NULL);
4717 if (gdbarch->remote_translate_xfer_address == 0)
4718 internal_error (__FILE__, __LINE__,
4719 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4720 if (gdbarch_debug >= 2)
4721 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4722 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4726 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4727 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4729 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4733 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4735 gdb_assert (gdbarch != NULL);
4736 if (gdbarch->frame_args_skip == -1)
4737 internal_error (__FILE__, __LINE__,
4738 "gdbarch: gdbarch_frame_args_skip invalid");
4739 if (gdbarch_debug >= 2)
4740 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4741 return gdbarch->frame_args_skip;
4745 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4746 CORE_ADDR frame_args_skip)
4748 gdbarch->frame_args_skip = frame_args_skip;
4752 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4754 gdb_assert (gdbarch != NULL);
4755 if (gdbarch->frameless_function_invocation == 0)
4756 internal_error (__FILE__, __LINE__,
4757 "gdbarch: gdbarch_frameless_function_invocation invalid");
4758 if (gdbarch_debug >= 2)
4759 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4760 return gdbarch->frameless_function_invocation (fi);
4764 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4765 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4767 gdbarch->frameless_function_invocation = frameless_function_invocation;
4771 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
4773 gdb_assert (gdbarch != NULL);
4774 return gdbarch->deprecated_frame_chain != 0;
4778 gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4780 gdb_assert (gdbarch != NULL);
4781 if (gdbarch->deprecated_frame_chain == 0)
4782 internal_error (__FILE__, __LINE__,
4783 "gdbarch: gdbarch_deprecated_frame_chain invalid");
4784 if (gdbarch_debug >= 2)
4785 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain called\n");
4786 return gdbarch->deprecated_frame_chain (frame);
4790 set_gdbarch_deprecated_frame_chain (struct gdbarch *gdbarch,
4791 gdbarch_deprecated_frame_chain_ftype deprecated_frame_chain)
4793 gdbarch->deprecated_frame_chain = deprecated_frame_chain;
4797 gdbarch_deprecated_frame_chain_valid_p (struct gdbarch *gdbarch)
4799 gdb_assert (gdbarch != NULL);
4800 return gdbarch->deprecated_frame_chain_valid != 0;
4804 gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4806 gdb_assert (gdbarch != NULL);
4807 if (gdbarch->deprecated_frame_chain_valid == 0)
4808 internal_error (__FILE__, __LINE__,
4809 "gdbarch: gdbarch_deprecated_frame_chain_valid invalid");
4810 if (gdbarch_debug >= 2)
4811 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_chain_valid called\n");
4812 return gdbarch->deprecated_frame_chain_valid (chain, thisframe);
4816 set_gdbarch_deprecated_frame_chain_valid (struct gdbarch *gdbarch,
4817 gdbarch_deprecated_frame_chain_valid_ftype deprecated_frame_chain_valid)
4819 gdbarch->deprecated_frame_chain_valid = deprecated_frame_chain_valid;
4823 gdbarch_deprecated_frame_saved_pc_p (struct gdbarch *gdbarch)
4825 gdb_assert (gdbarch != NULL);
4826 return gdbarch->deprecated_frame_saved_pc != 0;
4830 gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4832 gdb_assert (gdbarch != NULL);
4833 if (gdbarch->deprecated_frame_saved_pc == 0)
4834 internal_error (__FILE__, __LINE__,
4835 "gdbarch: gdbarch_deprecated_frame_saved_pc invalid");
4836 if (gdbarch_debug >= 2)
4837 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frame_saved_pc called\n");
4838 return gdbarch->deprecated_frame_saved_pc (fi);
4842 set_gdbarch_deprecated_frame_saved_pc (struct gdbarch *gdbarch,
4843 gdbarch_deprecated_frame_saved_pc_ftype deprecated_frame_saved_pc)
4845 gdbarch->deprecated_frame_saved_pc = deprecated_frame_saved_pc;
4849 gdbarch_unwind_pc_p (struct gdbarch *gdbarch)
4851 gdb_assert (gdbarch != NULL);
4852 return gdbarch->unwind_pc != 0;
4856 gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
4858 gdb_assert (gdbarch != NULL);
4859 if (gdbarch->unwind_pc == 0)
4860 internal_error (__FILE__, __LINE__,
4861 "gdbarch: gdbarch_unwind_pc invalid");
4862 if (gdbarch_debug >= 2)
4863 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_pc called\n");
4864 return gdbarch->unwind_pc (gdbarch, next_frame);
4868 set_gdbarch_unwind_pc (struct gdbarch *gdbarch,
4869 gdbarch_unwind_pc_ftype unwind_pc)
4871 gdbarch->unwind_pc = unwind_pc;
4875 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4877 gdb_assert (gdbarch != NULL);
4878 if (gdbarch->frame_args_address == 0)
4879 internal_error (__FILE__, __LINE__,
4880 "gdbarch: gdbarch_frame_args_address invalid");
4881 if (gdbarch_debug >= 2)
4882 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4883 return gdbarch->frame_args_address (fi);
4887 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4888 gdbarch_frame_args_address_ftype frame_args_address)
4890 gdbarch->frame_args_address = frame_args_address;
4894 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4896 gdb_assert (gdbarch != NULL);
4897 if (gdbarch->frame_locals_address == 0)
4898 internal_error (__FILE__, __LINE__,
4899 "gdbarch: gdbarch_frame_locals_address invalid");
4900 if (gdbarch_debug >= 2)
4901 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4902 return gdbarch->frame_locals_address (fi);
4906 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4907 gdbarch_frame_locals_address_ftype frame_locals_address)
4909 gdbarch->frame_locals_address = frame_locals_address;
4913 gdbarch_deprecated_saved_pc_after_call_p (struct gdbarch *gdbarch)
4915 gdb_assert (gdbarch != NULL);
4916 return gdbarch->deprecated_saved_pc_after_call != 0;
4920 gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4922 gdb_assert (gdbarch != NULL);
4923 if (gdbarch->deprecated_saved_pc_after_call == 0)
4924 internal_error (__FILE__, __LINE__,
4925 "gdbarch: gdbarch_deprecated_saved_pc_after_call invalid");
4926 if (gdbarch_debug >= 2)
4927 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_saved_pc_after_call called\n");
4928 return gdbarch->deprecated_saved_pc_after_call (frame);
4932 set_gdbarch_deprecated_saved_pc_after_call (struct gdbarch *gdbarch,
4933 gdbarch_deprecated_saved_pc_after_call_ftype deprecated_saved_pc_after_call)
4935 gdbarch->deprecated_saved_pc_after_call = deprecated_saved_pc_after_call;
4939 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4941 gdb_assert (gdbarch != NULL);
4942 if (gdbarch->frame_num_args == 0)
4943 internal_error (__FILE__, __LINE__,
4944 "gdbarch: gdbarch_frame_num_args invalid");
4945 if (gdbarch_debug >= 2)
4946 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4947 return gdbarch->frame_num_args (frame);
4951 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4952 gdbarch_frame_num_args_ftype frame_num_args)
4954 gdbarch->frame_num_args = frame_num_args;
4958 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4960 gdb_assert (gdbarch != NULL);
4961 return gdbarch->stack_align != 0;
4965 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4967 gdb_assert (gdbarch != NULL);
4968 if (gdbarch->stack_align == 0)
4969 internal_error (__FILE__, __LINE__,
4970 "gdbarch: gdbarch_stack_align invalid");
4971 if (gdbarch_debug >= 2)
4972 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4973 return gdbarch->stack_align (sp);
4977 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4978 gdbarch_stack_align_ftype stack_align)
4980 gdbarch->stack_align = stack_align;
4984 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4986 gdb_assert (gdbarch != NULL);
4987 return gdbarch->frame_align != 0;
4991 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4993 gdb_assert (gdbarch != NULL);
4994 if (gdbarch->frame_align == 0)
4995 internal_error (__FILE__, __LINE__,
4996 "gdbarch: gdbarch_frame_align invalid");
4997 if (gdbarch_debug >= 2)
4998 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4999 return gdbarch->frame_align (gdbarch, address);
5003 set_gdbarch_frame_align (struct gdbarch *gdbarch,
5004 gdbarch_frame_align_ftype frame_align)
5006 gdbarch->frame_align = frame_align;
5010 gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch)
5012 gdb_assert (gdbarch != NULL);
5013 /* Skip verify of deprecated_extra_stack_alignment_needed, invalid_p == 0 */
5014 if (gdbarch_debug >= 2)
5015 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extra_stack_alignment_needed called\n");
5016 return gdbarch->deprecated_extra_stack_alignment_needed;
5020 set_gdbarch_deprecated_extra_stack_alignment_needed (struct gdbarch *gdbarch,
5021 int deprecated_extra_stack_alignment_needed)
5023 gdbarch->deprecated_extra_stack_alignment_needed = deprecated_extra_stack_alignment_needed;
5027 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
5029 gdb_assert (gdbarch != NULL);
5030 return gdbarch->reg_struct_has_addr != 0;
5034 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
5036 gdb_assert (gdbarch != NULL);
5037 if (gdbarch->reg_struct_has_addr == 0)
5038 internal_error (__FILE__, __LINE__,
5039 "gdbarch: gdbarch_reg_struct_has_addr invalid");
5040 if (gdbarch_debug >= 2)
5041 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
5042 return gdbarch->reg_struct_has_addr (gcc_p, type);
5046 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
5047 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
5049 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
5053 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
5055 gdb_assert (gdbarch != NULL);
5056 return gdbarch->save_dummy_frame_tos != 0;
5060 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
5062 gdb_assert (gdbarch != NULL);
5063 if (gdbarch->save_dummy_frame_tos == 0)
5064 internal_error (__FILE__, __LINE__,
5065 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
5066 if (gdbarch_debug >= 2)
5067 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
5068 gdbarch->save_dummy_frame_tos (sp);
5072 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
5073 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
5075 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
5079 gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch)
5081 gdb_assert (gdbarch != NULL);
5082 return gdbarch->unwind_dummy_id != 0;
5086 gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info)
5088 gdb_assert (gdbarch != NULL);
5089 if (gdbarch->unwind_dummy_id == 0)
5090 internal_error (__FILE__, __LINE__,
5091 "gdbarch: gdbarch_unwind_dummy_id invalid");
5092 if (gdbarch_debug >= 2)
5093 fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n");
5094 return gdbarch->unwind_dummy_id (gdbarch, info);
5098 set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch,
5099 gdbarch_unwind_dummy_id_ftype unwind_dummy_id)
5101 gdbarch->unwind_dummy_id = unwind_dummy_id;
5105 gdbarch_parm_boundary (struct gdbarch *gdbarch)
5107 gdb_assert (gdbarch != NULL);
5108 if (gdbarch_debug >= 2)
5109 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
5110 return gdbarch->parm_boundary;
5114 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
5117 gdbarch->parm_boundary = parm_boundary;
5120 const struct floatformat *
5121 gdbarch_float_format (struct gdbarch *gdbarch)
5123 gdb_assert (gdbarch != NULL);
5124 if (gdbarch_debug >= 2)
5125 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
5126 return gdbarch->float_format;
5130 set_gdbarch_float_format (struct gdbarch *gdbarch,
5131 const struct floatformat * float_format)
5133 gdbarch->float_format = float_format;
5136 const struct floatformat *
5137 gdbarch_double_format (struct gdbarch *gdbarch)
5139 gdb_assert (gdbarch != NULL);
5140 if (gdbarch_debug >= 2)
5141 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
5142 return gdbarch->double_format;
5146 set_gdbarch_double_format (struct gdbarch *gdbarch,
5147 const struct floatformat * double_format)
5149 gdbarch->double_format = double_format;
5152 const struct floatformat *
5153 gdbarch_long_double_format (struct gdbarch *gdbarch)
5155 gdb_assert (gdbarch != NULL);
5156 if (gdbarch_debug >= 2)
5157 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
5158 return gdbarch->long_double_format;
5162 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
5163 const struct floatformat * long_double_format)
5165 gdbarch->long_double_format = long_double_format;
5169 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
5171 gdb_assert (gdbarch != NULL);
5172 if (gdbarch->convert_from_func_ptr_addr == 0)
5173 internal_error (__FILE__, __LINE__,
5174 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
5175 if (gdbarch_debug >= 2)
5176 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
5177 return gdbarch->convert_from_func_ptr_addr (addr);
5181 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
5182 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
5184 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
5188 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
5190 gdb_assert (gdbarch != NULL);
5191 if (gdbarch->addr_bits_remove == 0)
5192 internal_error (__FILE__, __LINE__,
5193 "gdbarch: gdbarch_addr_bits_remove invalid");
5194 if (gdbarch_debug >= 2)
5195 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
5196 return gdbarch->addr_bits_remove (addr);
5200 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
5201 gdbarch_addr_bits_remove_ftype addr_bits_remove)
5203 gdbarch->addr_bits_remove = addr_bits_remove;
5207 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
5209 gdb_assert (gdbarch != NULL);
5210 if (gdbarch->smash_text_address == 0)
5211 internal_error (__FILE__, __LINE__,
5212 "gdbarch: gdbarch_smash_text_address invalid");
5213 if (gdbarch_debug >= 2)
5214 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
5215 return gdbarch->smash_text_address (addr);
5219 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
5220 gdbarch_smash_text_address_ftype smash_text_address)
5222 gdbarch->smash_text_address = smash_text_address;
5226 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
5228 gdb_assert (gdbarch != NULL);
5229 return gdbarch->software_single_step != 0;
5233 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
5235 gdb_assert (gdbarch != NULL);
5236 if (gdbarch->software_single_step == 0)
5237 internal_error (__FILE__, __LINE__,
5238 "gdbarch: gdbarch_software_single_step invalid");
5239 if (gdbarch_debug >= 2)
5240 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
5241 gdbarch->software_single_step (sig, insert_breakpoints_p);
5245 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
5246 gdbarch_software_single_step_ftype software_single_step)
5248 gdbarch->software_single_step = software_single_step;
5252 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
5254 gdb_assert (gdbarch != NULL);
5255 if (gdbarch->print_insn == 0)
5256 internal_error (__FILE__, __LINE__,
5257 "gdbarch: gdbarch_print_insn invalid");
5258 if (gdbarch_debug >= 2)
5259 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
5260 return gdbarch->print_insn (vma, info);
5264 set_gdbarch_print_insn (struct gdbarch *gdbarch,
5265 gdbarch_print_insn_ftype print_insn)
5267 gdbarch->print_insn = print_insn;
5271 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
5273 gdb_assert (gdbarch != NULL);
5274 if (gdbarch->skip_trampoline_code == 0)
5275 internal_error (__FILE__, __LINE__,
5276 "gdbarch: gdbarch_skip_trampoline_code invalid");
5277 if (gdbarch_debug >= 2)
5278 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
5279 return gdbarch->skip_trampoline_code (pc);
5283 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
5284 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
5286 gdbarch->skip_trampoline_code = skip_trampoline_code;
5290 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5292 gdb_assert (gdbarch != NULL);
5293 if (gdbarch->in_solib_call_trampoline == 0)
5294 internal_error (__FILE__, __LINE__,
5295 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
5296 if (gdbarch_debug >= 2)
5297 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
5298 return gdbarch->in_solib_call_trampoline (pc, name);
5302 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
5303 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
5305 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
5309 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5311 gdb_assert (gdbarch != NULL);
5312 if (gdbarch->in_solib_return_trampoline == 0)
5313 internal_error (__FILE__, __LINE__,
5314 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
5315 if (gdbarch_debug >= 2)
5316 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
5317 return gdbarch->in_solib_return_trampoline (pc, name);
5321 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
5322 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
5324 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
5328 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
5330 gdb_assert (gdbarch != NULL);
5331 if (gdbarch->pc_in_sigtramp == 0)
5332 internal_error (__FILE__, __LINE__,
5333 "gdbarch: gdbarch_pc_in_sigtramp invalid");
5334 if (gdbarch_debug >= 2)
5335 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
5336 return gdbarch->pc_in_sigtramp (pc, name);
5340 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
5341 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
5343 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
5347 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
5349 gdb_assert (gdbarch != NULL);
5350 return gdbarch->sigtramp_start != 0;
5354 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
5356 gdb_assert (gdbarch != NULL);
5357 if (gdbarch->sigtramp_start == 0)
5358 internal_error (__FILE__, __LINE__,
5359 "gdbarch: gdbarch_sigtramp_start invalid");
5360 if (gdbarch_debug >= 2)
5361 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
5362 return gdbarch->sigtramp_start (pc);
5366 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
5367 gdbarch_sigtramp_start_ftype sigtramp_start)
5369 gdbarch->sigtramp_start = sigtramp_start;
5373 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
5375 gdb_assert (gdbarch != NULL);
5376 return gdbarch->sigtramp_end != 0;
5380 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
5382 gdb_assert (gdbarch != NULL);
5383 if (gdbarch->sigtramp_end == 0)
5384 internal_error (__FILE__, __LINE__,
5385 "gdbarch: gdbarch_sigtramp_end invalid");
5386 if (gdbarch_debug >= 2)
5387 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
5388 return gdbarch->sigtramp_end (pc);
5392 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
5393 gdbarch_sigtramp_end_ftype sigtramp_end)
5395 gdbarch->sigtramp_end = sigtramp_end;
5399 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
5401 gdb_assert (gdbarch != NULL);
5402 if (gdbarch->in_function_epilogue_p == 0)
5403 internal_error (__FILE__, __LINE__,
5404 "gdbarch: gdbarch_in_function_epilogue_p invalid");
5405 if (gdbarch_debug >= 2)
5406 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
5407 return gdbarch->in_function_epilogue_p (gdbarch, addr);
5411 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
5412 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
5414 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
5418 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
5420 gdb_assert (gdbarch != NULL);
5421 if (gdbarch->construct_inferior_arguments == 0)
5422 internal_error (__FILE__, __LINE__,
5423 "gdbarch: gdbarch_construct_inferior_arguments invalid");
5424 if (gdbarch_debug >= 2)
5425 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5426 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5430 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5431 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5433 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5437 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5439 gdb_assert (gdbarch != NULL);
5440 return gdbarch->dwarf2_build_frame_info != 0;
5444 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5446 gdb_assert (gdbarch != NULL);
5447 if (gdbarch->dwarf2_build_frame_info == 0)
5448 internal_error (__FILE__, __LINE__,
5449 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5450 if (gdbarch_debug >= 2)
5451 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5452 gdbarch->dwarf2_build_frame_info (objfile);
5456 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5457 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5459 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5463 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5465 gdb_assert (gdbarch != NULL);
5466 if (gdbarch->elf_make_msymbol_special == 0)
5467 internal_error (__FILE__, __LINE__,
5468 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5469 if (gdbarch_debug >= 2)
5470 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5471 gdbarch->elf_make_msymbol_special (sym, msym);
5475 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5476 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5478 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5482 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5484 gdb_assert (gdbarch != NULL);
5485 if (gdbarch->coff_make_msymbol_special == 0)
5486 internal_error (__FILE__, __LINE__,
5487 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5488 if (gdbarch_debug >= 2)
5489 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5490 gdbarch->coff_make_msymbol_special (val, msym);
5494 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5495 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5497 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5501 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5503 gdb_assert (gdbarch != NULL);
5504 /* Skip verify of name_of_malloc, invalid_p == 0 */
5505 if (gdbarch_debug >= 2)
5506 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5507 return gdbarch->name_of_malloc;
5511 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5512 const char * name_of_malloc)
5514 gdbarch->name_of_malloc = name_of_malloc;
5518 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5520 gdb_assert (gdbarch != NULL);
5521 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5522 if (gdbarch_debug >= 2)
5523 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5524 return gdbarch->cannot_step_breakpoint;
5528 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5529 int cannot_step_breakpoint)
5531 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5535 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5537 gdb_assert (gdbarch != NULL);
5538 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5539 if (gdbarch_debug >= 2)
5540 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5541 return gdbarch->have_nonsteppable_watchpoint;
5545 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5546 int have_nonsteppable_watchpoint)
5548 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5552 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5554 gdb_assert (gdbarch != NULL);
5555 return gdbarch->address_class_type_flags != 0;
5559 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5561 gdb_assert (gdbarch != NULL);
5562 if (gdbarch->address_class_type_flags == 0)
5563 internal_error (__FILE__, __LINE__,
5564 "gdbarch: gdbarch_address_class_type_flags invalid");
5565 if (gdbarch_debug >= 2)
5566 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5567 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5571 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5572 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5574 gdbarch->address_class_type_flags = address_class_type_flags;
5578 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5580 gdb_assert (gdbarch != NULL);
5581 return gdbarch->address_class_type_flags_to_name != 0;
5585 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5587 gdb_assert (gdbarch != NULL);
5588 if (gdbarch->address_class_type_flags_to_name == 0)
5589 internal_error (__FILE__, __LINE__,
5590 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5591 if (gdbarch_debug >= 2)
5592 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5593 return gdbarch->address_class_type_flags_to_name (gdbarch, type_flags);
5597 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5598 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5600 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5604 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5606 gdb_assert (gdbarch != NULL);
5607 return gdbarch->address_class_name_to_type_flags != 0;
5611 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name, int *type_flags_ptr)
5613 gdb_assert (gdbarch != NULL);
5614 if (gdbarch->address_class_name_to_type_flags == 0)
5615 internal_error (__FILE__, __LINE__,
5616 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5617 if (gdbarch_debug >= 2)
5618 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5619 return gdbarch->address_class_name_to_type_flags (gdbarch, name, type_flags_ptr);
5623 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5624 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5626 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5630 gdbarch_register_reggroup_p (struct gdbarch *gdbarch, int regnum, struct reggroup *reggroup)
5632 gdb_assert (gdbarch != NULL);
5633 if (gdbarch->register_reggroup_p == 0)
5634 internal_error (__FILE__, __LINE__,
5635 "gdbarch: gdbarch_register_reggroup_p invalid");
5636 if (gdbarch_debug >= 2)
5637 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_reggroup_p called\n");
5638 return gdbarch->register_reggroup_p (gdbarch, regnum, reggroup);
5642 set_gdbarch_register_reggroup_p (struct gdbarch *gdbarch,
5643 gdbarch_register_reggroup_p_ftype register_reggroup_p)
5645 gdbarch->register_reggroup_p = register_reggroup_p;
5649 /* Keep a registry of per-architecture data-pointers required by GDB
5656 gdbarch_data_init_ftype *init;
5657 gdbarch_data_free_ftype *free;
5660 struct gdbarch_data_registration
5662 struct gdbarch_data *data;
5663 struct gdbarch_data_registration *next;
5666 struct gdbarch_data_registry
5669 struct gdbarch_data_registration *registrations;
5672 struct gdbarch_data_registry gdbarch_data_registry =
5677 struct gdbarch_data *
5678 register_gdbarch_data (gdbarch_data_init_ftype *init,
5679 gdbarch_data_free_ftype *free)
5681 struct gdbarch_data_registration **curr;
5682 /* Append the new registraration. */
5683 for (curr = &gdbarch_data_registry.registrations;
5685 curr = &(*curr)->next);
5686 (*curr) = XMALLOC (struct gdbarch_data_registration);
5687 (*curr)->next = NULL;
5688 (*curr)->data = XMALLOC (struct gdbarch_data);
5689 (*curr)->data->index = gdbarch_data_registry.nr++;
5690 (*curr)->data->init = init;
5691 (*curr)->data->init_p = 1;
5692 (*curr)->data->free = free;
5693 return (*curr)->data;
5697 /* Create/delete the gdbarch data vector. */
5700 alloc_gdbarch_data (struct gdbarch *gdbarch)
5702 gdb_assert (gdbarch->data == NULL);
5703 gdbarch->nr_data = gdbarch_data_registry.nr;
5704 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5708 free_gdbarch_data (struct gdbarch *gdbarch)
5710 struct gdbarch_data_registration *rego;
5711 gdb_assert (gdbarch->data != NULL);
5712 for (rego = gdbarch_data_registry.registrations;
5716 struct gdbarch_data *data = rego->data;
5717 gdb_assert (data->index < gdbarch->nr_data);
5718 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5720 data->free (gdbarch, gdbarch->data[data->index]);
5721 gdbarch->data[data->index] = NULL;
5724 xfree (gdbarch->data);
5725 gdbarch->data = NULL;
5729 /* Initialize the current value of the specified per-architecture
5733 set_gdbarch_data (struct gdbarch *gdbarch,
5734 struct gdbarch_data *data,
5737 gdb_assert (data->index < gdbarch->nr_data);
5738 if (gdbarch->data[data->index] != NULL)
5740 gdb_assert (data->free != NULL);
5741 data->free (gdbarch, gdbarch->data[data->index]);
5743 gdbarch->data[data->index] = pointer;
5746 /* Return the current value of the specified per-architecture
5750 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5752 gdb_assert (data->index < gdbarch->nr_data);
5753 /* The data-pointer isn't initialized, call init() to get a value but
5754 only if the architecture initializaiton has completed. Otherwise
5755 punt - hope that the caller knows what they are doing. */
5756 if (gdbarch->data[data->index] == NULL
5757 && gdbarch->initialized_p)
5759 /* Be careful to detect an initialization cycle. */
5760 gdb_assert (data->init_p);
5762 gdb_assert (data->init != NULL);
5763 gdbarch->data[data->index] = data->init (gdbarch);
5765 gdb_assert (gdbarch->data[data->index] != NULL);
5767 return gdbarch->data[data->index];
5772 /* Keep a registry of swapped data required by GDB modules. */
5777 struct gdbarch_swap_registration *source;
5778 struct gdbarch_swap *next;
5781 struct gdbarch_swap_registration
5784 unsigned long sizeof_data;
5785 gdbarch_swap_ftype *init;
5786 struct gdbarch_swap_registration *next;
5789 struct gdbarch_swap_registry
5792 struct gdbarch_swap_registration *registrations;
5795 struct gdbarch_swap_registry gdbarch_swap_registry =
5801 register_gdbarch_swap (void *data,
5802 unsigned long sizeof_data,
5803 gdbarch_swap_ftype *init)
5805 struct gdbarch_swap_registration **rego;
5806 for (rego = &gdbarch_swap_registry.registrations;
5808 rego = &(*rego)->next);
5809 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5810 (*rego)->next = NULL;
5811 (*rego)->init = init;
5812 (*rego)->data = data;
5813 (*rego)->sizeof_data = sizeof_data;
5817 clear_gdbarch_swap (struct gdbarch *gdbarch)
5819 struct gdbarch_swap *curr;
5820 for (curr = gdbarch->swap;
5824 memset (curr->source->data, 0, curr->source->sizeof_data);
5829 init_gdbarch_swap (struct gdbarch *gdbarch)
5831 struct gdbarch_swap_registration *rego;
5832 struct gdbarch_swap **curr = &gdbarch->swap;
5833 for (rego = gdbarch_swap_registry.registrations;
5837 if (rego->data != NULL)
5839 (*curr) = XMALLOC (struct gdbarch_swap);
5840 (*curr)->source = rego;
5841 (*curr)->swap = xmalloc (rego->sizeof_data);
5842 (*curr)->next = NULL;
5843 curr = &(*curr)->next;
5845 if (rego->init != NULL)
5851 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5853 struct gdbarch_swap *curr;
5854 for (curr = gdbarch->swap;
5857 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5861 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5863 struct gdbarch_swap *curr;
5864 for (curr = gdbarch->swap;
5867 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5871 /* Keep a registry of the architectures known by GDB. */
5873 struct gdbarch_registration
5875 enum bfd_architecture bfd_architecture;
5876 gdbarch_init_ftype *init;
5877 gdbarch_dump_tdep_ftype *dump_tdep;
5878 struct gdbarch_list *arches;
5879 struct gdbarch_registration *next;
5882 static struct gdbarch_registration *gdbarch_registry = NULL;
5885 append_name (const char ***buf, int *nr, const char *name)
5887 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5893 gdbarch_printable_names (void)
5897 /* Accumulate a list of names based on the registed list of
5899 enum bfd_architecture a;
5901 const char **arches = NULL;
5902 struct gdbarch_registration *rego;
5903 for (rego = gdbarch_registry;
5907 const struct bfd_arch_info *ap;
5908 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5910 internal_error (__FILE__, __LINE__,
5911 "gdbarch_architecture_names: multi-arch unknown");
5914 append_name (&arches, &nr_arches, ap->printable_name);
5919 append_name (&arches, &nr_arches, NULL);
5923 /* Just return all the architectures that BFD knows. Assume that
5924 the legacy architecture framework supports them. */
5925 return bfd_arch_list ();
5930 gdbarch_register (enum bfd_architecture bfd_architecture,
5931 gdbarch_init_ftype *init,
5932 gdbarch_dump_tdep_ftype *dump_tdep)
5934 struct gdbarch_registration **curr;
5935 const struct bfd_arch_info *bfd_arch_info;
5936 /* Check that BFD recognizes this architecture */
5937 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5938 if (bfd_arch_info == NULL)
5940 internal_error (__FILE__, __LINE__,
5941 "gdbarch: Attempt to register unknown architecture (%d)",
5944 /* Check that we haven't seen this architecture before */
5945 for (curr = &gdbarch_registry;
5947 curr = &(*curr)->next)
5949 if (bfd_architecture == (*curr)->bfd_architecture)
5950 internal_error (__FILE__, __LINE__,
5951 "gdbarch: Duplicate registraration of architecture (%s)",
5952 bfd_arch_info->printable_name);
5956 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5957 bfd_arch_info->printable_name,
5960 (*curr) = XMALLOC (struct gdbarch_registration);
5961 (*curr)->bfd_architecture = bfd_architecture;
5962 (*curr)->init = init;
5963 (*curr)->dump_tdep = dump_tdep;
5964 (*curr)->arches = NULL;
5965 (*curr)->next = NULL;
5966 /* When non- multi-arch, install whatever target dump routine we've
5967 been provided - hopefully that routine has been written correctly
5968 and works regardless of multi-arch. */
5969 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5970 && startup_gdbarch.dump_tdep == NULL)
5971 startup_gdbarch.dump_tdep = dump_tdep;
5975 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5976 gdbarch_init_ftype *init)
5978 gdbarch_register (bfd_architecture, init, NULL);
5982 /* Look for an architecture using gdbarch_info. Base search on only
5983 BFD_ARCH_INFO and BYTE_ORDER. */
5985 struct gdbarch_list *
5986 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5987 const struct gdbarch_info *info)
5989 for (; arches != NULL; arches = arches->next)
5991 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5993 if (info->byte_order != arches->gdbarch->byte_order)
5995 if (info->osabi != arches->gdbarch->osabi)
6003 /* Update the current architecture. Return ZERO if the update request
6007 gdbarch_update_p (struct gdbarch_info info)
6009 struct gdbarch *new_gdbarch;
6010 struct gdbarch *old_gdbarch;
6011 struct gdbarch_registration *rego;
6013 /* Fill in missing parts of the INFO struct using a number of
6014 sources: ``set ...''; INFOabfd supplied; existing target. */
6016 /* ``(gdb) set architecture ...'' */
6017 if (info.bfd_arch_info == NULL
6018 && !TARGET_ARCHITECTURE_AUTO)
6019 info.bfd_arch_info = TARGET_ARCHITECTURE;
6020 if (info.bfd_arch_info == NULL
6021 && info.abfd != NULL
6022 && bfd_get_arch (info.abfd) != bfd_arch_unknown
6023 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
6024 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
6025 if (info.bfd_arch_info == NULL)
6026 info.bfd_arch_info = TARGET_ARCHITECTURE;
6028 /* ``(gdb) set byte-order ...'' */
6029 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6030 && !TARGET_BYTE_ORDER_AUTO)
6031 info.byte_order = TARGET_BYTE_ORDER;
6032 /* From the INFO struct. */
6033 if (info.byte_order == BFD_ENDIAN_UNKNOWN
6034 && info.abfd != NULL)
6035 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
6036 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
6037 : BFD_ENDIAN_UNKNOWN);
6038 /* From the current target. */
6039 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
6040 info.byte_order = TARGET_BYTE_ORDER;
6042 /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
6043 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6044 info.osabi = gdbarch_lookup_osabi (info.abfd);
6045 if (info.osabi == GDB_OSABI_UNINITIALIZED)
6046 info.osabi = current_gdbarch->osabi;
6048 /* Must have found some sort of architecture. */
6049 gdb_assert (info.bfd_arch_info != NULL);
6053 fprintf_unfiltered (gdb_stdlog,
6054 "gdbarch_update: info.bfd_arch_info %s\n",
6055 (info.bfd_arch_info != NULL
6056 ? info.bfd_arch_info->printable_name
6058 fprintf_unfiltered (gdb_stdlog,
6059 "gdbarch_update: info.byte_order %d (%s)\n",
6061 (info.byte_order == BFD_ENDIAN_BIG ? "big"
6062 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
6064 fprintf_unfiltered (gdb_stdlog,
6065 "gdbarch_update: info.osabi %d (%s)\n",
6066 info.osabi, gdbarch_osabi_name (info.osabi));
6067 fprintf_unfiltered (gdb_stdlog,
6068 "gdbarch_update: info.abfd 0x%lx\n",
6070 fprintf_unfiltered (gdb_stdlog,
6071 "gdbarch_update: info.tdep_info 0x%lx\n",
6072 (long) info.tdep_info);
6075 /* Find the target that knows about this architecture. */
6076 for (rego = gdbarch_registry;
6079 if (rego->bfd_architecture == info.bfd_arch_info->arch)
6084 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
6088 /* Swap the data belonging to the old target out setting the
6089 installed data to zero. This stops the ->init() function trying
6090 to refer to the previous architecture's global data structures. */
6091 swapout_gdbarch_swap (current_gdbarch);
6092 clear_gdbarch_swap (current_gdbarch);
6094 /* Save the previously selected architecture, setting the global to
6095 NULL. This stops ->init() trying to use the previous
6096 architecture's configuration. The previous architecture may not
6097 even be of the same architecture family. The most recent
6098 architecture of the same family is found at the head of the
6099 rego->arches list. */
6100 old_gdbarch = current_gdbarch;
6101 current_gdbarch = NULL;
6103 /* Ask the target for a replacement architecture. */
6104 new_gdbarch = rego->init (info, rego->arches);
6106 /* Did the target like it? No. Reject the change and revert to the
6107 old architecture. */
6108 if (new_gdbarch == NULL)
6111 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
6112 swapin_gdbarch_swap (old_gdbarch);
6113 current_gdbarch = old_gdbarch;
6117 /* Did the architecture change? No. Oops, put the old architecture
6119 if (old_gdbarch == new_gdbarch)
6122 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
6124 new_gdbarch->bfd_arch_info->printable_name);
6125 swapin_gdbarch_swap (old_gdbarch);
6126 current_gdbarch = old_gdbarch;
6130 /* Is this a pre-existing architecture? Yes. Move it to the front
6131 of the list of architectures (keeping the list sorted Most
6132 Recently Used) and then copy it in. */
6134 struct gdbarch_list **list;
6135 for (list = ®o->arches;
6137 list = &(*list)->next)
6139 if ((*list)->gdbarch == new_gdbarch)
6141 struct gdbarch_list *this;
6143 fprintf_unfiltered (gdb_stdlog,
6144 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
6146 new_gdbarch->bfd_arch_info->printable_name);
6149 (*list) = this->next;
6150 /* Insert in the front. */
6151 this->next = rego->arches;
6152 rego->arches = this;
6153 /* Copy the new architecture in. */
6154 current_gdbarch = new_gdbarch;
6155 swapin_gdbarch_swap (new_gdbarch);
6156 architecture_changed_event ();
6162 /* Prepend this new architecture to the architecture list (keep the
6163 list sorted Most Recently Used). */
6165 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
6166 this->next = rego->arches;
6167 this->gdbarch = new_gdbarch;
6168 rego->arches = this;
6171 /* Switch to this new architecture marking it initialized. */
6172 current_gdbarch = new_gdbarch;
6173 current_gdbarch->initialized_p = 1;
6176 fprintf_unfiltered (gdb_stdlog,
6177 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
6179 new_gdbarch->bfd_arch_info->printable_name);
6182 /* Check that the newly installed architecture is valid. Plug in
6183 any post init values. */
6184 new_gdbarch->dump_tdep = rego->dump_tdep;
6185 verify_gdbarch (new_gdbarch);
6187 /* Initialize the per-architecture memory (swap) areas.
6188 CURRENT_GDBARCH must be update before these modules are
6190 init_gdbarch_swap (new_gdbarch);
6192 /* Initialize the per-architecture data. CURRENT_GDBARCH
6193 must be updated before these modules are called. */
6194 architecture_changed_event ();
6197 gdbarch_dump (current_gdbarch, gdb_stdlog);
6205 /* Pointer to the target-dependent disassembly function. */
6206 int (*deprecated_tm_print_insn) (bfd_vma, disassemble_info *);
6207 disassemble_info tm_print_insn_info;
6210 extern void _initialize_gdbarch (void);
6213 _initialize_gdbarch (void)
6215 struct cmd_list_element *c;
6217 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
6218 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
6219 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
6220 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
6221 tm_print_insn_info.print_address_func = dis_asm_print_address;
6223 add_show_from_set (add_set_cmd ("arch",
6226 (char *)&gdbarch_debug,
6227 "Set architecture debugging.\n\
6228 When non-zero, architecture debugging is enabled.", &setdebuglist),
6230 c = add_set_cmd ("archdebug",
6233 (char *)&gdbarch_debug,
6234 "Set architecture debugging.\n\
6235 When non-zero, architecture debugging is enabled.", &setlist);
6237 deprecate_cmd (c, "set debug arch");
6238 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");