1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 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"
68 /* Static function declarations */
70 static void verify_gdbarch (struct gdbarch *gdbarch);
71 static void alloc_gdbarch_data (struct gdbarch *);
72 static void free_gdbarch_data (struct gdbarch *);
73 static void init_gdbarch_swap (struct gdbarch *);
74 static void clear_gdbarch_swap (struct gdbarch *);
75 static void swapout_gdbarch_swap (struct gdbarch *);
76 static void swapin_gdbarch_swap (struct gdbarch *);
78 /* Non-zero if we want to trace architecture code. */
81 #define GDBARCH_DEBUG 0
83 int gdbarch_debug = GDBARCH_DEBUG;
86 /* Maintain the struct gdbarch object */
90 /* Has this architecture been fully initialized? */
92 /* basic architectural information */
93 const struct bfd_arch_info * bfd_arch_info;
96 /* target specific vector. */
97 struct gdbarch_tdep *tdep;
98 gdbarch_dump_tdep_ftype *dump_tdep;
100 /* per-architecture data-pointers */
104 /* per-architecture swap-regions */
105 struct gdbarch_swap *swap;
107 /* Multi-arch values.
109 When extending this structure you must:
113 Declare set/get functions and define the corresponding
116 gdbarch_alloc(): If zero/NULL is not a suitable default,
117 initialize the new field.
119 verify_gdbarch(): Confirm that the target updated the field
122 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
125 ``startup_gdbarch()'': Append an initial value to the static
126 variable (base values on the host's c-type system).
128 get_gdbarch(): Implement the set/get functions (probably using
129 the macro's as shortcuts).
144 gdbarch_read_pc_ftype *read_pc;
145 gdbarch_write_pc_ftype *write_pc;
146 gdbarch_read_fp_ftype *read_fp;
147 gdbarch_read_sp_ftype *read_sp;
148 gdbarch_write_sp_ftype *write_sp;
149 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
150 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
151 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
160 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
161 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
162 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
163 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
164 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
165 gdbarch_register_name_ftype *register_name;
168 gdbarch_register_byte_ftype *register_byte;
169 gdbarch_register_raw_size_ftype *register_raw_size;
170 int max_register_raw_size;
171 gdbarch_register_virtual_size_ftype *register_virtual_size;
172 int max_register_virtual_size;
173 gdbarch_register_virtual_type_ftype *register_virtual_type;
174 gdbarch_do_registers_info_ftype *do_registers_info;
175 gdbarch_print_registers_info_ftype *print_registers_info;
176 gdbarch_print_float_info_ftype *print_float_info;
177 gdbarch_print_vector_info_ftype *print_vector_info;
178 gdbarch_register_sim_regno_ftype *register_sim_regno;
179 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
180 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
181 gdbarch_cannot_store_register_ftype *cannot_store_register;
182 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
183 int use_generic_dummy_frames;
184 int call_dummy_location;
185 gdbarch_call_dummy_address_ftype *call_dummy_address;
186 CORE_ADDR call_dummy_start_offset;
187 CORE_ADDR call_dummy_breakpoint_offset;
188 int call_dummy_breakpoint_offset_p;
189 int call_dummy_length;
190 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
192 LONGEST * call_dummy_words;
193 int sizeof_call_dummy_words;
194 int call_dummy_stack_adjust_p;
195 int call_dummy_stack_adjust;
196 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
197 gdbarch_init_frame_pc_first_ftype *init_frame_pc_first;
198 gdbarch_init_frame_pc_ftype *init_frame_pc;
199 int believe_pcc_promotion;
200 int believe_pcc_promotion_type;
201 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
202 gdbarch_get_saved_register_ftype *get_saved_register;
203 gdbarch_register_convertible_ftype *register_convertible;
204 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
205 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
206 gdbarch_convert_register_p_ftype *convert_register_p;
207 gdbarch_register_to_value_ftype *register_to_value;
208 gdbarch_value_to_register_ftype *value_to_register;
209 gdbarch_pointer_to_address_ftype *pointer_to_address;
210 gdbarch_address_to_pointer_ftype *address_to_pointer;
211 gdbarch_integer_to_address_ftype *integer_to_address;
212 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
213 gdbarch_push_arguments_ftype *push_arguments;
214 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
215 gdbarch_push_return_address_ftype *push_return_address;
216 gdbarch_pop_frame_ftype *pop_frame;
217 gdbarch_store_struct_return_ftype *store_struct_return;
218 gdbarch_extract_return_value_ftype *extract_return_value;
219 gdbarch_store_return_value_ftype *store_return_value;
220 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
221 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
222 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
223 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
224 gdbarch_use_struct_convention_ftype *use_struct_convention;
225 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
226 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
227 gdbarch_skip_prologue_ftype *skip_prologue;
228 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
229 gdbarch_inner_than_ftype *inner_than;
230 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
231 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
232 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
233 CORE_ADDR decr_pc_after_break;
234 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
235 CORE_ADDR function_start_offset;
236 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
237 CORE_ADDR frame_args_skip;
238 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
239 gdbarch_frame_chain_ftype *frame_chain;
240 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
241 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
242 gdbarch_frame_args_address_ftype *frame_args_address;
243 gdbarch_frame_locals_address_ftype *frame_locals_address;
244 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
245 gdbarch_frame_num_args_ftype *frame_num_args;
246 gdbarch_stack_align_ftype *stack_align;
247 gdbarch_frame_align_ftype *frame_align;
248 int extra_stack_alignment_needed;
249 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
250 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
252 const struct floatformat * float_format;
253 const struct floatformat * double_format;
254 const struct floatformat * long_double_format;
255 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
256 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
257 gdbarch_smash_text_address_ftype *smash_text_address;
258 gdbarch_software_single_step_ftype *software_single_step;
259 gdbarch_print_insn_ftype *print_insn;
260 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
261 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
262 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
263 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
264 gdbarch_sigtramp_start_ftype *sigtramp_start;
265 gdbarch_sigtramp_end_ftype *sigtramp_end;
266 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
267 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
268 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
269 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
270 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
271 const char * name_of_malloc;
272 int cannot_step_breakpoint;
273 int have_nonsteppable_watchpoint;
274 gdbarch_address_class_type_flags_ftype *address_class_type_flags;
275 gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name;
276 gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
280 /* The default architecture uses host values (for want of a better
283 extern const struct bfd_arch_info bfd_default_arch_struct;
285 struct gdbarch startup_gdbarch =
287 1, /* Always initialized. */
288 /* basic architecture information */
289 &bfd_default_arch_struct,
291 /* target specific vector and its dump routine */
293 /*per-architecture data-pointers and swap regions */
295 /* Multi-arch values */
299 8 * sizeof (LONGEST),
302 8 * sizeof (long double),
331 generic_register_byte,
332 generic_register_size,
334 generic_register_size,
338 default_print_registers_info,
429 generic_in_function_epilogue_p,
430 construct_inferior_arguments,
440 /* startup_gdbarch() */
443 struct gdbarch *current_gdbarch = &startup_gdbarch;
445 /* Do any initialization needed for a non-multiarch configuration
446 after the _initialize_MODULE functions have been run. */
448 initialize_non_multiarch (void)
450 alloc_gdbarch_data (&startup_gdbarch);
451 /* Ensure that all swap areas are zeroed so that they again think
452 they are starting from scratch. */
453 clear_gdbarch_swap (&startup_gdbarch);
454 init_gdbarch_swap (&startup_gdbarch);
458 /* Create a new ``struct gdbarch'' based on information provided by
459 ``struct gdbarch_info''. */
462 gdbarch_alloc (const struct gdbarch_info *info,
463 struct gdbarch_tdep *tdep)
465 /* NOTE: The new architecture variable is named ``current_gdbarch''
466 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
467 the current local architecture and not the previous global
468 architecture. This ensures that the new architectures initial
469 values are not influenced by the previous architecture. Once
470 everything is parameterised with gdbarch, this will go away. */
471 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
472 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
474 alloc_gdbarch_data (current_gdbarch);
476 current_gdbarch->tdep = tdep;
478 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
479 current_gdbarch->byte_order = info->byte_order;
481 /* Force the explicit initialization of these. */
482 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
483 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
484 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
485 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
486 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
487 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
488 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
489 current_gdbarch->ptr_bit = TARGET_INT_BIT;
490 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
491 current_gdbarch->char_signed = -1;
492 current_gdbarch->read_pc = generic_target_read_pc;
493 current_gdbarch->write_pc = generic_target_write_pc;
494 current_gdbarch->read_fp = generic_target_read_fp;
495 current_gdbarch->read_sp = generic_target_read_sp;
496 current_gdbarch->write_sp = generic_target_write_sp;
497 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
498 current_gdbarch->num_regs = -1;
499 current_gdbarch->sp_regnum = -1;
500 current_gdbarch->fp_regnum = -1;
501 current_gdbarch->pc_regnum = -1;
502 current_gdbarch->ps_regnum = -1;
503 current_gdbarch->fp0_regnum = -1;
504 current_gdbarch->npc_regnum = -1;
505 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
506 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
507 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
508 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
509 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
510 current_gdbarch->register_name = legacy_register_name;
511 current_gdbarch->register_size = -1;
512 current_gdbarch->register_bytes = -1;
513 current_gdbarch->register_byte = generic_register_byte;
514 current_gdbarch->register_raw_size = generic_register_size;
515 current_gdbarch->max_register_raw_size = -1;
516 current_gdbarch->register_virtual_size = generic_register_size;
517 current_gdbarch->max_register_virtual_size = -1;
518 current_gdbarch->print_registers_info = default_print_registers_info;
519 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
520 current_gdbarch->cannot_fetch_register = cannot_register_not;
521 current_gdbarch->cannot_store_register = cannot_register_not;
522 current_gdbarch->use_generic_dummy_frames = -1;
523 current_gdbarch->call_dummy_start_offset = -1;
524 current_gdbarch->call_dummy_breakpoint_offset = -1;
525 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
526 current_gdbarch->call_dummy_length = -1;
527 current_gdbarch->call_dummy_p = -1;
528 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
529 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
530 current_gdbarch->call_dummy_stack_adjust_p = -1;
531 current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
532 current_gdbarch->init_frame_pc = init_frame_pc_default;
533 current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
534 current_gdbarch->get_saved_register = generic_unwind_get_saved_register;
535 current_gdbarch->register_convertible = generic_register_convertible_not;
536 current_gdbarch->convert_register_p = legacy_convert_register_p;
537 current_gdbarch->register_to_value = legacy_register_to_value;
538 current_gdbarch->value_to_register = legacy_value_to_register;
539 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
540 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
541 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
542 current_gdbarch->push_arguments = default_push_arguments;
543 current_gdbarch->extract_return_value = legacy_extract_return_value;
544 current_gdbarch->store_return_value = legacy_store_return_value;
545 current_gdbarch->use_struct_convention = generic_use_struct_convention;
546 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
547 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
548 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
549 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
550 current_gdbarch->decr_pc_after_break = -1;
551 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
552 current_gdbarch->function_start_offset = -1;
553 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
554 current_gdbarch->frame_args_skip = -1;
555 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
556 current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
557 current_gdbarch->extra_stack_alignment_needed = 1;
558 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
559 current_gdbarch->addr_bits_remove = core_addr_identity;
560 current_gdbarch->smash_text_address = core_addr_identity;
561 current_gdbarch->print_insn = legacy_print_insn;
562 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
563 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
564 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
565 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
566 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
567 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
568 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
569 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
570 current_gdbarch->name_of_malloc = "malloc";
571 /* gdbarch_alloc() */
573 return current_gdbarch;
577 /* Free a gdbarch struct. This should never happen in normal
578 operation --- once you've created a gdbarch, you keep it around.
579 However, if an architecture's init function encounters an error
580 building the structure, it may need to clean up a partially
581 constructed gdbarch. */
584 gdbarch_free (struct gdbarch *arch)
586 gdb_assert (arch != NULL);
587 free_gdbarch_data (arch);
592 /* Ensure that all values in a GDBARCH are reasonable. */
595 verify_gdbarch (struct gdbarch *gdbarch)
598 struct cleanup *cleanups;
601 /* Only perform sanity checks on a multi-arch target. */
604 log = mem_fileopen ();
605 cleanups = make_cleanup_ui_file_delete (log);
607 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
608 fprintf_unfiltered (log, "\n\tbyte-order");
609 if (gdbarch->bfd_arch_info == NULL)
610 fprintf_unfiltered (log, "\n\tbfd_arch_info");
611 /* Check those that need to be defined for the given multi-arch level. */
612 /* Skip verify of short_bit, invalid_p == 0 */
613 /* Skip verify of int_bit, invalid_p == 0 */
614 /* Skip verify of long_bit, invalid_p == 0 */
615 /* Skip verify of long_long_bit, invalid_p == 0 */
616 /* Skip verify of float_bit, invalid_p == 0 */
617 /* Skip verify of double_bit, invalid_p == 0 */
618 /* Skip verify of long_double_bit, invalid_p == 0 */
619 /* Skip verify of ptr_bit, invalid_p == 0 */
620 if (gdbarch->addr_bit == 0)
621 gdbarch->addr_bit = TARGET_PTR_BIT;
622 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
623 if (gdbarch->char_signed == -1)
624 gdbarch->char_signed = 1;
625 /* Skip verify of read_pc, invalid_p == 0 */
626 /* Skip verify of write_pc, invalid_p == 0 */
627 /* Skip verify of read_fp, invalid_p == 0 */
628 /* Skip verify of read_sp, invalid_p == 0 */
629 /* Skip verify of write_sp, invalid_p == 0 */
630 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
631 /* Skip verify of pseudo_register_read, has predicate */
632 /* Skip verify of pseudo_register_write, has predicate */
633 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
634 && (gdbarch->num_regs == -1))
635 fprintf_unfiltered (log, "\n\tnum_regs");
636 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
637 /* Skip verify of sp_regnum, invalid_p == 0 */
638 /* Skip verify of fp_regnum, invalid_p == 0 */
639 /* Skip verify of pc_regnum, invalid_p == 0 */
640 /* Skip verify of ps_regnum, invalid_p == 0 */
641 /* Skip verify of fp0_regnum, invalid_p == 0 */
642 /* Skip verify of npc_regnum, invalid_p == 0 */
643 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
644 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
645 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
646 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
647 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
648 /* Skip verify of register_name, invalid_p == 0 */
649 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
650 && (gdbarch->register_size == -1))
651 fprintf_unfiltered (log, "\n\tregister_size");
652 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
653 && (gdbarch->register_bytes == -1))
654 fprintf_unfiltered (log, "\n\tregister_bytes");
655 /* Skip verify of register_byte, invalid_p == 0 */
656 /* Skip verify of register_raw_size, invalid_p == 0 */
657 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
658 && (gdbarch->max_register_raw_size == -1))
659 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
660 /* Skip verify of register_virtual_size, invalid_p == 0 */
661 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
662 && (gdbarch->max_register_virtual_size == -1))
663 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
664 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
665 && (gdbarch->register_virtual_type == 0))
666 fprintf_unfiltered (log, "\n\tregister_virtual_type");
667 /* Skip verify of do_registers_info, has predicate */
668 /* Skip verify of print_registers_info, invalid_p == 0 */
669 /* Skip verify of print_float_info, has predicate */
670 /* Skip verify of print_vector_info, has predicate */
671 /* Skip verify of register_sim_regno, invalid_p == 0 */
672 /* Skip verify of register_bytes_ok, has predicate */
673 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
674 /* Skip verify of cannot_store_register, invalid_p == 0 */
675 /* Skip verify of get_longjmp_target, has predicate */
676 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
677 && (gdbarch->use_generic_dummy_frames == -1))
678 fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames");
679 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
680 && (gdbarch->call_dummy_location == 0))
681 fprintf_unfiltered (log, "\n\tcall_dummy_location");
682 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
683 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
684 fprintf_unfiltered (log, "\n\tcall_dummy_address");
685 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
686 && (gdbarch->call_dummy_start_offset == -1))
687 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
688 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
689 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
690 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
691 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
692 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
693 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
694 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
695 && (gdbarch->call_dummy_length == -1))
696 fprintf_unfiltered (log, "\n\tcall_dummy_length");
697 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
698 && (gdbarch->pc_in_call_dummy == 0))
699 fprintf_unfiltered (log, "\n\tpc_in_call_dummy");
700 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
701 && (gdbarch->call_dummy_p == -1))
702 fprintf_unfiltered (log, "\n\tcall_dummy_p");
703 /* Skip verify of call_dummy_words, invalid_p == 0 */
704 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
705 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
706 && (gdbarch->call_dummy_stack_adjust_p == -1))
707 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
708 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
709 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
710 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
711 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
712 && (gdbarch->fix_call_dummy == 0))
713 fprintf_unfiltered (log, "\n\tfix_call_dummy");
714 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
715 /* Skip verify of init_frame_pc, invalid_p == 0 */
716 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
717 /* Skip verify of get_saved_register, invalid_p == 0 */
718 /* Skip verify of register_convertible, invalid_p == 0 */
719 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
720 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
721 /* Skip verify of convert_register_p, invalid_p == 0 */
722 /* Skip verify of register_to_value, invalid_p == 0 */
723 /* Skip verify of value_to_register, invalid_p == 0 */
724 /* Skip verify of pointer_to_address, invalid_p == 0 */
725 /* Skip verify of address_to_pointer, invalid_p == 0 */
726 /* Skip verify of integer_to_address, has predicate */
727 /* Skip verify of return_value_on_stack, invalid_p == 0 */
728 /* Skip verify of push_arguments, invalid_p == 0 */
729 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
730 && (gdbarch->push_dummy_frame == 0))
731 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
732 /* Skip verify of push_return_address, has predicate */
733 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
734 && (gdbarch->pop_frame == 0))
735 fprintf_unfiltered (log, "\n\tpop_frame");
736 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
737 && (gdbarch->store_struct_return == 0))
738 fprintf_unfiltered (log, "\n\tstore_struct_return");
739 /* Skip verify of extract_return_value, invalid_p == 0 */
740 /* Skip verify of store_return_value, invalid_p == 0 */
741 /* Skip verify of extract_struct_value_address, has predicate */
742 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
743 /* Skip verify of use_struct_convention, invalid_p == 0 */
744 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
745 && (gdbarch->frame_init_saved_regs == 0))
746 fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
747 /* Skip verify of init_extra_frame_info, has predicate */
748 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
749 && (gdbarch->skip_prologue == 0))
750 fprintf_unfiltered (log, "\n\tskip_prologue");
751 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
752 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
753 && (gdbarch->inner_than == 0))
754 fprintf_unfiltered (log, "\n\tinner_than");
755 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
756 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
757 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
758 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
759 && (gdbarch->decr_pc_after_break == -1))
760 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
761 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
762 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
763 && (gdbarch->function_start_offset == -1))
764 fprintf_unfiltered (log, "\n\tfunction_start_offset");
765 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
766 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
767 && (gdbarch->frame_args_skip == -1))
768 fprintf_unfiltered (log, "\n\tframe_args_skip");
769 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
770 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
771 && (gdbarch->frame_chain == 0))
772 fprintf_unfiltered (log, "\n\tframe_chain");
773 /* Skip verify of frame_chain_valid, invalid_p == 0 */
774 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
775 && (gdbarch->frame_saved_pc == 0))
776 fprintf_unfiltered (log, "\n\tframe_saved_pc");
777 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
778 && (gdbarch->frame_args_address == 0))
779 fprintf_unfiltered (log, "\n\tframe_args_address");
780 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
781 && (gdbarch->frame_locals_address == 0))
782 fprintf_unfiltered (log, "\n\tframe_locals_address");
783 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
784 && (gdbarch->saved_pc_after_call == 0))
785 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
786 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
787 && (gdbarch->frame_num_args == 0))
788 fprintf_unfiltered (log, "\n\tframe_num_args");
789 /* Skip verify of stack_align, has predicate */
790 /* Skip verify of frame_align, has predicate */
791 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
792 /* Skip verify of reg_struct_has_addr, has predicate */
793 /* Skip verify of save_dummy_frame_tos, has predicate */
794 if (gdbarch->float_format == 0)
795 gdbarch->float_format = default_float_format (gdbarch);
796 if (gdbarch->double_format == 0)
797 gdbarch->double_format = default_double_format (gdbarch);
798 if (gdbarch->long_double_format == 0)
799 gdbarch->long_double_format = default_double_format (gdbarch);
800 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
801 /* Skip verify of addr_bits_remove, invalid_p == 0 */
802 /* Skip verify of smash_text_address, invalid_p == 0 */
803 /* Skip verify of software_single_step, has predicate */
804 /* Skip verify of print_insn, invalid_p == 0 */
805 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
806 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
807 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
808 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
809 /* Skip verify of sigtramp_start, has predicate */
810 /* Skip verify of sigtramp_end, has predicate */
811 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
812 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
813 /* Skip verify of dwarf2_build_frame_info, has predicate */
814 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
815 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
816 /* Skip verify of name_of_malloc, invalid_p == 0 */
817 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
818 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
819 /* Skip verify of address_class_type_flags, has predicate */
820 /* Skip verify of address_class_type_flags_to_name, has predicate */
821 /* Skip verify of address_class_name_to_type_flags, has predicate */
822 buf = ui_file_xstrdup (log, &dummy);
823 make_cleanup (xfree, buf);
824 if (strlen (buf) > 0)
825 internal_error (__FILE__, __LINE__,
826 "verify_gdbarch: the following are invalid ...%s",
828 do_cleanups (cleanups);
832 /* Print out the details of the current architecture. */
834 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
835 just happens to match the global variable ``current_gdbarch''. That
836 way macros refering to that variable get the local and not the global
837 version - ulgh. Once everything is parameterised with gdbarch, this
841 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
843 fprintf_unfiltered (file,
844 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
847 fprintf_unfiltered (file,
848 "gdbarch_dump: frame_align = 0x%08lx\n",
849 (long) current_gdbarch->frame_align);
851 fprintf_unfiltered (file,
852 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
853 (long) current_gdbarch->in_function_epilogue_p);
855 fprintf_unfiltered (file,
856 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
857 (long) current_gdbarch->pseudo_register_read);
859 fprintf_unfiltered (file,
860 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
861 (long) current_gdbarch->pseudo_register_write);
862 #ifdef ADDRESS_CLASS_NAME_TO_TYPE_FLAGS
863 fprintf_unfiltered (file,
864 "gdbarch_dump: %s # %s\n",
865 "ADDRESS_CLASS_NAME_TO_TYPE_FLAGS(name, type_flags_ptr)",
866 XSTRING (ADDRESS_CLASS_NAME_TO_TYPE_FLAGS (name, type_flags_ptr)));
868 fprintf_unfiltered (file,
869 "gdbarch_dump: ADDRESS_CLASS_NAME_TO_TYPE_FLAGS = 0x%08lx\n",
870 (long) current_gdbarch->address_class_name_to_type_flags
871 /*ADDRESS_CLASS_NAME_TO_TYPE_FLAGS ()*/);
873 #ifdef ADDRESS_CLASS_TYPE_FLAGS
874 fprintf_unfiltered (file,
875 "gdbarch_dump: %s # %s\n",
876 "ADDRESS_CLASS_TYPE_FLAGS(byte_size, dwarf2_addr_class)",
877 XSTRING (ADDRESS_CLASS_TYPE_FLAGS (byte_size, dwarf2_addr_class)));
879 fprintf_unfiltered (file,
880 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS = 0x%08lx\n",
881 (long) current_gdbarch->address_class_type_flags
882 /*ADDRESS_CLASS_TYPE_FLAGS ()*/);
884 #ifdef ADDRESS_CLASS_TYPE_FLAGS_TO_NAME
885 fprintf_unfiltered (file,
886 "gdbarch_dump: %s # %s\n",
887 "ADDRESS_CLASS_TYPE_FLAGS_TO_NAME(type_flags)",
888 XSTRING (ADDRESS_CLASS_TYPE_FLAGS_TO_NAME (type_flags)));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: ADDRESS_CLASS_TYPE_FLAGS_TO_NAME = 0x%08lx\n",
892 (long) current_gdbarch->address_class_type_flags_to_name
893 /*ADDRESS_CLASS_TYPE_FLAGS_TO_NAME ()*/);
895 #ifdef ADDRESS_TO_POINTER
897 /* Macro might contain `[{}]' when not multi-arch */
898 fprintf_unfiltered (file,
899 "gdbarch_dump: %s # %s\n",
900 "ADDRESS_TO_POINTER(type, buf, addr)",
901 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
904 fprintf_unfiltered (file,
905 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
906 (long) current_gdbarch->address_to_pointer
907 /*ADDRESS_TO_POINTER ()*/);
909 #ifdef ADDR_BITS_REMOVE
910 fprintf_unfiltered (file,
911 "gdbarch_dump: %s # %s\n",
912 "ADDR_BITS_REMOVE(addr)",
913 XSTRING (ADDR_BITS_REMOVE (addr)));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
917 (long) current_gdbarch->addr_bits_remove
918 /*ADDR_BITS_REMOVE ()*/);
920 #ifdef BELIEVE_PCC_PROMOTION
921 fprintf_unfiltered (file,
922 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
923 XSTRING (BELIEVE_PCC_PROMOTION));
924 fprintf_unfiltered (file,
925 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
926 BELIEVE_PCC_PROMOTION);
928 #ifdef BELIEVE_PCC_PROMOTION_TYPE
929 fprintf_unfiltered (file,
930 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
931 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
932 fprintf_unfiltered (file,
933 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
934 BELIEVE_PCC_PROMOTION_TYPE);
936 #ifdef BREAKPOINT_FROM_PC
937 fprintf_unfiltered (file,
938 "gdbarch_dump: %s # %s\n",
939 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
940 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
942 fprintf_unfiltered (file,
943 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
944 (long) current_gdbarch->breakpoint_from_pc
945 /*BREAKPOINT_FROM_PC ()*/);
947 #ifdef CALL_DUMMY_ADDRESS
948 fprintf_unfiltered (file,
949 "gdbarch_dump: %s # %s\n",
950 "CALL_DUMMY_ADDRESS()",
951 XSTRING (CALL_DUMMY_ADDRESS ()));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
955 (long) current_gdbarch->call_dummy_address
956 /*CALL_DUMMY_ADDRESS ()*/);
958 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
959 fprintf_unfiltered (file,
960 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
961 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
962 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
963 fprintf_unfiltered (file,
964 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
965 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
967 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
968 fprintf_unfiltered (file,
969 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
970 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
971 fprintf_unfiltered (file,
972 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
973 CALL_DUMMY_BREAKPOINT_OFFSET_P);
975 #ifdef CALL_DUMMY_LENGTH
976 fprintf_unfiltered (file,
977 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
978 XSTRING (CALL_DUMMY_LENGTH));
979 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
980 fprintf_unfiltered (file,
981 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
984 #ifdef CALL_DUMMY_LOCATION
985 fprintf_unfiltered (file,
986 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
987 XSTRING (CALL_DUMMY_LOCATION));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
990 CALL_DUMMY_LOCATION);
993 fprintf_unfiltered (file,
994 "gdbarch_dump: CALL_DUMMY_P # %s\n",
995 XSTRING (CALL_DUMMY_P));
996 fprintf_unfiltered (file,
997 "gdbarch_dump: CALL_DUMMY_P = %d\n",
1000 #ifdef CALL_DUMMY_STACK_ADJUST
1001 fprintf_unfiltered (file,
1002 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1003 XSTRING (CALL_DUMMY_STACK_ADJUST));
1004 if (CALL_DUMMY_STACK_ADJUST_P)
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1007 (long) CALL_DUMMY_STACK_ADJUST);
1009 #ifdef CALL_DUMMY_STACK_ADJUST_P
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1012 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
1013 fprintf_unfiltered (file,
1014 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1015 (long) CALL_DUMMY_STACK_ADJUST_P);
1017 #ifdef CALL_DUMMY_START_OFFSET
1018 fprintf_unfiltered (file,
1019 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1020 XSTRING (CALL_DUMMY_START_OFFSET));
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1023 (long) CALL_DUMMY_START_OFFSET);
1025 #ifdef CALL_DUMMY_WORDS
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1028 XSTRING (CALL_DUMMY_WORDS));
1029 fprintf_unfiltered (file,
1030 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1031 (long) CALL_DUMMY_WORDS);
1033 #ifdef CANNOT_FETCH_REGISTER
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: %s # %s\n",
1036 "CANNOT_FETCH_REGISTER(regnum)",
1037 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
1039 fprintf_unfiltered (file,
1040 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
1041 (long) current_gdbarch->cannot_fetch_register
1042 /*CANNOT_FETCH_REGISTER ()*/);
1044 #ifdef CANNOT_STEP_BREAKPOINT
1045 fprintf_unfiltered (file,
1046 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1047 XSTRING (CANNOT_STEP_BREAKPOINT));
1048 fprintf_unfiltered (file,
1049 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1050 CANNOT_STEP_BREAKPOINT);
1052 #ifdef CANNOT_STORE_REGISTER
1053 fprintf_unfiltered (file,
1054 "gdbarch_dump: %s # %s\n",
1055 "CANNOT_STORE_REGISTER(regnum)",
1056 XSTRING (CANNOT_STORE_REGISTER (regnum)));
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1060 (long) current_gdbarch->cannot_store_register
1061 /*CANNOT_STORE_REGISTER ()*/);
1063 #ifdef COERCE_FLOAT_TO_DOUBLE
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: %s # %s\n",
1066 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1067 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1071 (long) current_gdbarch->coerce_float_to_double
1072 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1074 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1076 /* Macro might contain `[{}]' when not multi-arch */
1077 fprintf_unfiltered (file,
1078 "gdbarch_dump: %s # %s\n",
1079 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1080 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1085 (long) current_gdbarch->coff_make_msymbol_special
1086 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1091 (long) current_gdbarch->construct_inferior_arguments);
1092 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1093 fprintf_unfiltered (file,
1094 "gdbarch_dump: %s # %s\n",
1095 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1096 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1098 fprintf_unfiltered (file,
1099 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1100 (long) current_gdbarch->convert_from_func_ptr_addr
1101 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1103 #ifdef CONVERT_REGISTER_P
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: %s # %s\n",
1106 "CONVERT_REGISTER_P(regnum)",
1107 XSTRING (CONVERT_REGISTER_P (regnum)));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1111 (long) current_gdbarch->convert_register_p
1112 /*CONVERT_REGISTER_P ()*/);
1114 #ifdef DECR_PC_AFTER_BREAK
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1117 XSTRING (DECR_PC_AFTER_BREAK));
1118 fprintf_unfiltered (file,
1119 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1120 (long) DECR_PC_AFTER_BREAK);
1122 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1124 /* Macro might contain `[{}]' when not multi-arch */
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: %s # %s\n",
1127 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1128 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1131 fprintf_unfiltered (file,
1132 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1133 (long) current_gdbarch->deprecated_extract_return_value
1134 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1136 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1137 fprintf_unfiltered (file,
1138 "gdbarch_dump: %s # %s\n",
1139 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1140 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1144 (long) current_gdbarch->deprecated_extract_struct_value_address
1145 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1147 #ifdef DEPRECATED_STORE_RETURN_VALUE
1149 /* Macro might contain `[{}]' when not multi-arch */
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: %s # %s\n",
1152 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1153 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1156 fprintf_unfiltered (file,
1157 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n",
1158 (long) current_gdbarch->deprecated_store_return_value
1159 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1161 #ifdef DO_REGISTERS_INFO
1163 /* Macro might contain `[{}]' when not multi-arch */
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: %s # %s\n",
1166 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1167 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
1170 fprintf_unfiltered (file,
1171 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1172 (long) current_gdbarch->do_registers_info
1173 /*DO_REGISTERS_INFO ()*/);
1175 #ifdef DWARF2_BUILD_FRAME_INFO
1177 /* Macro might contain `[{}]' when not multi-arch */
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: %s # %s\n",
1180 "DWARF2_BUILD_FRAME_INFO(objfile)",
1181 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1184 fprintf_unfiltered (file,
1185 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1186 (long) current_gdbarch->dwarf2_build_frame_info
1187 /*DWARF2_BUILD_FRAME_INFO ()*/);
1189 #ifdef DWARF2_REG_TO_REGNUM
1190 fprintf_unfiltered (file,
1191 "gdbarch_dump: %s # %s\n",
1192 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1193 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1195 fprintf_unfiltered (file,
1196 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1197 (long) current_gdbarch->dwarf2_reg_to_regnum
1198 /*DWARF2_REG_TO_REGNUM ()*/);
1200 #ifdef DWARF_REG_TO_REGNUM
1201 fprintf_unfiltered (file,
1202 "gdbarch_dump: %s # %s\n",
1203 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1204 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1208 (long) current_gdbarch->dwarf_reg_to_regnum
1209 /*DWARF_REG_TO_REGNUM ()*/);
1211 #ifdef ECOFF_REG_TO_REGNUM
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: %s # %s\n",
1214 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1215 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1217 fprintf_unfiltered (file,
1218 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1219 (long) current_gdbarch->ecoff_reg_to_regnum
1220 /*ECOFF_REG_TO_REGNUM ()*/);
1222 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1224 /* Macro might contain `[{}]' when not multi-arch */
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: %s # %s\n",
1227 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1228 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1233 (long) current_gdbarch->elf_make_msymbol_special
1234 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1236 #ifdef EXTRACT_RETURN_VALUE
1238 /* Macro might contain `[{}]' when not multi-arch */
1239 fprintf_unfiltered (file,
1240 "gdbarch_dump: %s # %s\n",
1241 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1242 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1245 fprintf_unfiltered (file,
1246 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1247 (long) current_gdbarch->extract_return_value
1248 /*EXTRACT_RETURN_VALUE ()*/);
1250 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1251 fprintf_unfiltered (file,
1252 "gdbarch_dump: %s # %s\n",
1253 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1254 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1256 fprintf_unfiltered (file,
1257 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1258 (long) current_gdbarch->extract_struct_value_address
1259 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1261 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1264 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1267 EXTRA_STACK_ALIGNMENT_NEEDED);
1269 #ifdef FIX_CALL_DUMMY
1271 /* Macro might contain `[{}]' when not multi-arch */
1272 fprintf_unfiltered (file,
1273 "gdbarch_dump: %s # %s\n",
1274 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1275 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1278 fprintf_unfiltered (file,
1279 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1280 (long) current_gdbarch->fix_call_dummy
1281 /*FIX_CALL_DUMMY ()*/);
1284 fprintf_unfiltered (file,
1285 "gdbarch_dump: FP0_REGNUM # %s\n",
1286 XSTRING (FP0_REGNUM));
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: FP0_REGNUM = %d\n",
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: FP_REGNUM # %s\n",
1294 XSTRING (FP_REGNUM));
1295 fprintf_unfiltered (file,
1296 "gdbarch_dump: FP_REGNUM = %d\n",
1299 #ifdef FRAMELESS_FUNCTION_INVOCATION
1300 fprintf_unfiltered (file,
1301 "gdbarch_dump: %s # %s\n",
1302 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1303 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1305 fprintf_unfiltered (file,
1306 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1307 (long) current_gdbarch->frameless_function_invocation
1308 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1310 #ifdef FRAME_ARGS_ADDRESS
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: %s # %s\n",
1313 "FRAME_ARGS_ADDRESS(fi)",
1314 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1318 (long) current_gdbarch->frame_args_address
1319 /*FRAME_ARGS_ADDRESS ()*/);
1321 #ifdef FRAME_ARGS_SKIP
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1324 XSTRING (FRAME_ARGS_SKIP));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1327 (long) FRAME_ARGS_SKIP);
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: %s # %s\n",
1332 "FRAME_CHAIN(frame)",
1333 XSTRING (FRAME_CHAIN (frame)));
1335 fprintf_unfiltered (file,
1336 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1337 (long) current_gdbarch->frame_chain
1338 /*FRAME_CHAIN ()*/);
1340 #ifdef FRAME_CHAIN_VALID
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: %s # %s\n",
1343 "FRAME_CHAIN_VALID(chain, thisframe)",
1344 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1348 (long) current_gdbarch->frame_chain_valid
1349 /*FRAME_CHAIN_VALID ()*/);
1351 #ifdef FRAME_INIT_SAVED_REGS
1353 /* Macro might contain `[{}]' when not multi-arch */
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: %s # %s\n",
1356 "FRAME_INIT_SAVED_REGS(frame)",
1357 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1362 (long) current_gdbarch->frame_init_saved_regs
1363 /*FRAME_INIT_SAVED_REGS ()*/);
1365 #ifdef FRAME_LOCALS_ADDRESS
1366 fprintf_unfiltered (file,
1367 "gdbarch_dump: %s # %s\n",
1368 "FRAME_LOCALS_ADDRESS(fi)",
1369 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1371 fprintf_unfiltered (file,
1372 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1373 (long) current_gdbarch->frame_locals_address
1374 /*FRAME_LOCALS_ADDRESS ()*/);
1376 #ifdef FRAME_NUM_ARGS
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: %s # %s\n",
1379 "FRAME_NUM_ARGS(frame)",
1380 XSTRING (FRAME_NUM_ARGS (frame)));
1382 fprintf_unfiltered (file,
1383 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1384 (long) current_gdbarch->frame_num_args
1385 /*FRAME_NUM_ARGS ()*/);
1387 #ifdef FRAME_SAVED_PC
1388 fprintf_unfiltered (file,
1389 "gdbarch_dump: %s # %s\n",
1390 "FRAME_SAVED_PC(fi)",
1391 XSTRING (FRAME_SAVED_PC (fi)));
1393 fprintf_unfiltered (file,
1394 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1395 (long) current_gdbarch->frame_saved_pc
1396 /*FRAME_SAVED_PC ()*/);
1398 #ifdef FUNCTION_START_OFFSET
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1401 XSTRING (FUNCTION_START_OFFSET));
1402 fprintf_unfiltered (file,
1403 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1404 (long) FUNCTION_START_OFFSET);
1406 #ifdef GET_LONGJMP_TARGET
1407 fprintf_unfiltered (file,
1408 "gdbarch_dump: %s # %s\n",
1409 "GET_LONGJMP_TARGET(pc)",
1410 XSTRING (GET_LONGJMP_TARGET (pc)));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1414 (long) current_gdbarch->get_longjmp_target
1415 /*GET_LONGJMP_TARGET ()*/);
1417 #ifdef GET_SAVED_REGISTER
1419 /* Macro might contain `[{}]' when not multi-arch */
1420 fprintf_unfiltered (file,
1421 "gdbarch_dump: %s # %s\n",
1422 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1423 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1426 fprintf_unfiltered (file,
1427 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1428 (long) current_gdbarch->get_saved_register
1429 /*GET_SAVED_REGISTER ()*/);
1431 #ifdef HAVE_NONSTEPPABLE_WATCHPOINT
1432 fprintf_unfiltered (file,
1433 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT # %s\n",
1434 XSTRING (HAVE_NONSTEPPABLE_WATCHPOINT));
1435 fprintf_unfiltered (file,
1436 "gdbarch_dump: HAVE_NONSTEPPABLE_WATCHPOINT = %d\n",
1437 HAVE_NONSTEPPABLE_WATCHPOINT);
1439 #ifdef INIT_EXTRA_FRAME_INFO
1441 /* Macro might contain `[{}]' when not multi-arch */
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: %s # %s\n",
1444 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1445 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1448 fprintf_unfiltered (file,
1449 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1450 (long) current_gdbarch->init_extra_frame_info
1451 /*INIT_EXTRA_FRAME_INFO ()*/);
1453 #ifdef INIT_FRAME_PC
1455 /* Macro might contain `[{}]' when not multi-arch */
1456 fprintf_unfiltered (file,
1457 "gdbarch_dump: %s # %s\n",
1458 "INIT_FRAME_PC(fromleaf, prev)",
1459 XSTRING (INIT_FRAME_PC (fromleaf, prev)));
1462 fprintf_unfiltered (file,
1463 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1464 (long) current_gdbarch->init_frame_pc
1465 /*INIT_FRAME_PC ()*/);
1467 #ifdef INIT_FRAME_PC_FIRST
1469 /* Macro might contain `[{}]' when not multi-arch */
1470 fprintf_unfiltered (file,
1471 "gdbarch_dump: %s # %s\n",
1472 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1473 XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev)));
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1478 (long) current_gdbarch->init_frame_pc_first
1479 /*INIT_FRAME_PC_FIRST ()*/);
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: %s # %s\n",
1484 "INNER_THAN(lhs, rhs)",
1485 XSTRING (INNER_THAN (lhs, rhs)));
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1489 (long) current_gdbarch->inner_than
1492 #ifdef INTEGER_TO_ADDRESS
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: %s # %s\n",
1495 "INTEGER_TO_ADDRESS(type, buf)",
1496 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1498 fprintf_unfiltered (file,
1499 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1500 (long) current_gdbarch->integer_to_address
1501 /*INTEGER_TO_ADDRESS ()*/);
1503 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1504 fprintf_unfiltered (file,
1505 "gdbarch_dump: %s # %s\n",
1506 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1507 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1509 fprintf_unfiltered (file,
1510 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1511 (long) current_gdbarch->in_solib_call_trampoline
1512 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1514 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: %s # %s\n",
1517 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1518 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
1522 (long) current_gdbarch->in_solib_return_trampoline
1523 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1525 #ifdef MAX_REGISTER_RAW_SIZE
1526 fprintf_unfiltered (file,
1527 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1528 XSTRING (MAX_REGISTER_RAW_SIZE));
1529 fprintf_unfiltered (file,
1530 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1531 MAX_REGISTER_RAW_SIZE);
1533 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1534 fprintf_unfiltered (file,
1535 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1536 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1539 MAX_REGISTER_VIRTUAL_SIZE);
1541 #ifdef MEMORY_INSERT_BREAKPOINT
1542 fprintf_unfiltered (file,
1543 "gdbarch_dump: %s # %s\n",
1544 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1545 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1547 fprintf_unfiltered (file,
1548 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1549 (long) current_gdbarch->memory_insert_breakpoint
1550 /*MEMORY_INSERT_BREAKPOINT ()*/);
1552 #ifdef MEMORY_REMOVE_BREAKPOINT
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: %s # %s\n",
1555 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1556 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1558 fprintf_unfiltered (file,
1559 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1560 (long) current_gdbarch->memory_remove_breakpoint
1561 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1563 #ifdef NAME_OF_MALLOC
1564 fprintf_unfiltered (file,
1565 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1566 XSTRING (NAME_OF_MALLOC));
1567 fprintf_unfiltered (file,
1568 "gdbarch_dump: NAME_OF_MALLOC = %ld\n",
1569 (long) NAME_OF_MALLOC);
1572 fprintf_unfiltered (file,
1573 "gdbarch_dump: NPC_REGNUM # %s\n",
1574 XSTRING (NPC_REGNUM));
1575 fprintf_unfiltered (file,
1576 "gdbarch_dump: NPC_REGNUM = %d\n",
1579 #ifdef NUM_PSEUDO_REGS
1580 fprintf_unfiltered (file,
1581 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1582 XSTRING (NUM_PSEUDO_REGS));
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1588 fprintf_unfiltered (file,
1589 "gdbarch_dump: NUM_REGS # %s\n",
1590 XSTRING (NUM_REGS));
1591 fprintf_unfiltered (file,
1592 "gdbarch_dump: NUM_REGS = %d\n",
1595 #ifdef PARM_BOUNDARY
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1598 XSTRING (PARM_BOUNDARY));
1599 fprintf_unfiltered (file,
1600 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1603 #ifdef PC_IN_CALL_DUMMY
1604 fprintf_unfiltered (file,
1605 "gdbarch_dump: %s # %s\n",
1606 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1607 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1611 (long) current_gdbarch->pc_in_call_dummy
1612 /*PC_IN_CALL_DUMMY ()*/);
1614 #ifdef PC_IN_SIGTRAMP
1615 fprintf_unfiltered (file,
1616 "gdbarch_dump: %s # %s\n",
1617 "PC_IN_SIGTRAMP(pc, name)",
1618 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1620 fprintf_unfiltered (file,
1621 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1622 (long) current_gdbarch->pc_in_sigtramp
1623 /*PC_IN_SIGTRAMP ()*/);
1626 fprintf_unfiltered (file,
1627 "gdbarch_dump: PC_REGNUM # %s\n",
1628 XSTRING (PC_REGNUM));
1629 fprintf_unfiltered (file,
1630 "gdbarch_dump: PC_REGNUM = %d\n",
1633 #ifdef POINTER_TO_ADDRESS
1634 fprintf_unfiltered (file,
1635 "gdbarch_dump: %s # %s\n",
1636 "POINTER_TO_ADDRESS(type, buf)",
1637 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1641 (long) current_gdbarch->pointer_to_address
1642 /*POINTER_TO_ADDRESS ()*/);
1646 /* Macro might contain `[{}]' when not multi-arch */
1647 fprintf_unfiltered (file,
1648 "gdbarch_dump: %s # %s\n",
1650 XSTRING (POP_FRAME (-)));
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1655 (long) current_gdbarch->pop_frame
1658 #ifdef PREPARE_TO_PROCEED
1659 fprintf_unfiltered (file,
1660 "gdbarch_dump: %s # %s\n",
1661 "PREPARE_TO_PROCEED(select_it)",
1662 XSTRING (PREPARE_TO_PROCEED (select_it)));
1664 fprintf_unfiltered (file,
1665 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1666 (long) current_gdbarch->prepare_to_proceed
1667 /*PREPARE_TO_PROCEED ()*/);
1670 fprintf_unfiltered (file,
1671 "gdbarch_dump: print_float_info = 0x%08lx\n",
1672 (long) current_gdbarch->print_float_info);
1674 fprintf_unfiltered (file,
1675 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1676 (long) current_gdbarch->print_registers_info);
1678 fprintf_unfiltered (file,
1679 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1680 (long) current_gdbarch->print_vector_info);
1681 #ifdef PROLOGUE_FRAMELESS_P
1682 fprintf_unfiltered (file,
1683 "gdbarch_dump: %s # %s\n",
1684 "PROLOGUE_FRAMELESS_P(ip)",
1685 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1687 fprintf_unfiltered (file,
1688 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1689 (long) current_gdbarch->prologue_frameless_p
1690 /*PROLOGUE_FRAMELESS_P ()*/);
1693 fprintf_unfiltered (file,
1694 "gdbarch_dump: PS_REGNUM # %s\n",
1695 XSTRING (PS_REGNUM));
1696 fprintf_unfiltered (file,
1697 "gdbarch_dump: PS_REGNUM = %d\n",
1700 #ifdef PUSH_ARGUMENTS
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: %s # %s\n",
1703 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1704 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1708 (long) current_gdbarch->push_arguments
1709 /*PUSH_ARGUMENTS ()*/);
1711 #ifdef PUSH_DUMMY_FRAME
1713 /* Macro might contain `[{}]' when not multi-arch */
1714 fprintf_unfiltered (file,
1715 "gdbarch_dump: %s # %s\n",
1716 "PUSH_DUMMY_FRAME(-)",
1717 XSTRING (PUSH_DUMMY_FRAME (-)));
1720 fprintf_unfiltered (file,
1721 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1722 (long) current_gdbarch->push_dummy_frame
1723 /*PUSH_DUMMY_FRAME ()*/);
1725 #ifdef PUSH_RETURN_ADDRESS
1726 fprintf_unfiltered (file,
1727 "gdbarch_dump: %s # %s\n",
1728 "PUSH_RETURN_ADDRESS(pc, sp)",
1729 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1733 (long) current_gdbarch->push_return_address
1734 /*PUSH_RETURN_ADDRESS ()*/);
1736 #ifdef REGISTER_BYTE
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: %s # %s\n",
1739 "REGISTER_BYTE(reg_nr)",
1740 XSTRING (REGISTER_BYTE (reg_nr)));
1742 fprintf_unfiltered (file,
1743 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1744 (long) current_gdbarch->register_byte
1745 /*REGISTER_BYTE ()*/);
1747 #ifdef REGISTER_BYTES
1748 fprintf_unfiltered (file,
1749 "gdbarch_dump: REGISTER_BYTES # %s\n",
1750 XSTRING (REGISTER_BYTES));
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: REGISTER_BYTES = %d\n",
1755 #ifdef REGISTER_BYTES_OK
1756 fprintf_unfiltered (file,
1757 "gdbarch_dump: %s # %s\n",
1758 "REGISTER_BYTES_OK(nr_bytes)",
1759 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1763 (long) current_gdbarch->register_bytes_ok
1764 /*REGISTER_BYTES_OK ()*/);
1766 #ifdef REGISTER_CONVERTIBLE
1767 fprintf_unfiltered (file,
1768 "gdbarch_dump: %s # %s\n",
1769 "REGISTER_CONVERTIBLE(nr)",
1770 XSTRING (REGISTER_CONVERTIBLE (nr)));
1772 fprintf_unfiltered (file,
1773 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1774 (long) current_gdbarch->register_convertible
1775 /*REGISTER_CONVERTIBLE ()*/);
1777 #ifdef REGISTER_CONVERT_TO_RAW
1779 /* Macro might contain `[{}]' when not multi-arch */
1780 fprintf_unfiltered (file,
1781 "gdbarch_dump: %s # %s\n",
1782 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1783 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1786 fprintf_unfiltered (file,
1787 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1788 (long) current_gdbarch->register_convert_to_raw
1789 /*REGISTER_CONVERT_TO_RAW ()*/);
1791 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1793 /* Macro might contain `[{}]' when not multi-arch */
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: %s # %s\n",
1796 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1797 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1800 fprintf_unfiltered (file,
1801 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1802 (long) current_gdbarch->register_convert_to_virtual
1803 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1805 #ifdef REGISTER_NAME
1806 fprintf_unfiltered (file,
1807 "gdbarch_dump: %s # %s\n",
1808 "REGISTER_NAME(regnr)",
1809 XSTRING (REGISTER_NAME (regnr)));
1811 fprintf_unfiltered (file,
1812 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1813 (long) current_gdbarch->register_name
1814 /*REGISTER_NAME ()*/);
1816 #ifdef REGISTER_RAW_SIZE
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: %s # %s\n",
1819 "REGISTER_RAW_SIZE(reg_nr)",
1820 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1822 fprintf_unfiltered (file,
1823 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1824 (long) current_gdbarch->register_raw_size
1825 /*REGISTER_RAW_SIZE ()*/);
1827 #ifdef REGISTER_SIM_REGNO
1828 fprintf_unfiltered (file,
1829 "gdbarch_dump: %s # %s\n",
1830 "REGISTER_SIM_REGNO(reg_nr)",
1831 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1835 (long) current_gdbarch->register_sim_regno
1836 /*REGISTER_SIM_REGNO ()*/);
1838 #ifdef REGISTER_SIZE
1839 fprintf_unfiltered (file,
1840 "gdbarch_dump: REGISTER_SIZE # %s\n",
1841 XSTRING (REGISTER_SIZE));
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: REGISTER_SIZE = %d\n",
1846 #ifdef REGISTER_TO_VALUE
1848 /* Macro might contain `[{}]' when not multi-arch */
1849 fprintf_unfiltered (file,
1850 "gdbarch_dump: %s # %s\n",
1851 "REGISTER_TO_VALUE(regnum, type, from, to)",
1852 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
1855 fprintf_unfiltered (file,
1856 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1857 (long) current_gdbarch->register_to_value
1858 /*REGISTER_TO_VALUE ()*/);
1860 #ifdef REGISTER_VIRTUAL_SIZE
1861 fprintf_unfiltered (file,
1862 "gdbarch_dump: %s # %s\n",
1863 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1864 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
1866 fprintf_unfiltered (file,
1867 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1868 (long) current_gdbarch->register_virtual_size
1869 /*REGISTER_VIRTUAL_SIZE ()*/);
1871 #ifdef REGISTER_VIRTUAL_TYPE
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: %s # %s\n",
1874 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1875 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
1877 fprintf_unfiltered (file,
1878 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1879 (long) current_gdbarch->register_virtual_type
1880 /*REGISTER_VIRTUAL_TYPE ()*/);
1882 #ifdef REG_STRUCT_HAS_ADDR
1883 fprintf_unfiltered (file,
1884 "gdbarch_dump: %s # %s\n",
1885 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1886 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1890 (long) current_gdbarch->reg_struct_has_addr
1891 /*REG_STRUCT_HAS_ADDR ()*/);
1893 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1895 /* Macro might contain `[{}]' when not multi-arch */
1896 fprintf_unfiltered (file,
1897 "gdbarch_dump: %s # %s\n",
1898 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1899 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1902 fprintf_unfiltered (file,
1903 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1904 (long) current_gdbarch->remote_translate_xfer_address
1905 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1907 #ifdef RETURN_VALUE_ON_STACK
1908 fprintf_unfiltered (file,
1909 "gdbarch_dump: %s # %s\n",
1910 "RETURN_VALUE_ON_STACK(type)",
1911 XSTRING (RETURN_VALUE_ON_STACK (type)));
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1915 (long) current_gdbarch->return_value_on_stack
1916 /*RETURN_VALUE_ON_STACK ()*/);
1918 #ifdef SAVED_PC_AFTER_CALL
1919 fprintf_unfiltered (file,
1920 "gdbarch_dump: %s # %s\n",
1921 "SAVED_PC_AFTER_CALL(frame)",
1922 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1924 fprintf_unfiltered (file,
1925 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1926 (long) current_gdbarch->saved_pc_after_call
1927 /*SAVED_PC_AFTER_CALL ()*/);
1929 #ifdef SAVE_DUMMY_FRAME_TOS
1931 /* Macro might contain `[{}]' when not multi-arch */
1932 fprintf_unfiltered (file,
1933 "gdbarch_dump: %s # %s\n",
1934 "SAVE_DUMMY_FRAME_TOS(sp)",
1935 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1938 fprintf_unfiltered (file,
1939 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1940 (long) current_gdbarch->save_dummy_frame_tos
1941 /*SAVE_DUMMY_FRAME_TOS ()*/);
1943 #ifdef SDB_REG_TO_REGNUM
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: %s # %s\n",
1946 "SDB_REG_TO_REGNUM(sdb_regnr)",
1947 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1951 (long) current_gdbarch->sdb_reg_to_regnum
1952 /*SDB_REG_TO_REGNUM ()*/);
1955 fprintf_unfiltered (file,
1956 "gdbarch_dump: %s # %s\n",
1958 XSTRING (SIGTRAMP_END (pc)));
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: SIGTRAMP_END = 0x%08lx\n",
1962 (long) current_gdbarch->sigtramp_end
1963 /*SIGTRAMP_END ()*/);
1965 #ifdef SIGTRAMP_START
1966 fprintf_unfiltered (file,
1967 "gdbarch_dump: %s # %s\n",
1968 "SIGTRAMP_START(pc)",
1969 XSTRING (SIGTRAMP_START (pc)));
1971 fprintf_unfiltered (file,
1972 "gdbarch_dump: SIGTRAMP_START = 0x%08lx\n",
1973 (long) current_gdbarch->sigtramp_start
1974 /*SIGTRAMP_START ()*/);
1976 #ifdef SIZEOF_CALL_DUMMY_WORDS
1977 fprintf_unfiltered (file,
1978 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1979 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
1980 fprintf_unfiltered (file,
1981 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1982 (long) SIZEOF_CALL_DUMMY_WORDS);
1984 #ifdef SKIP_PROLOGUE
1985 fprintf_unfiltered (file,
1986 "gdbarch_dump: %s # %s\n",
1987 "SKIP_PROLOGUE(ip)",
1988 XSTRING (SKIP_PROLOGUE (ip)));
1990 fprintf_unfiltered (file,
1991 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1992 (long) current_gdbarch->skip_prologue
1993 /*SKIP_PROLOGUE ()*/);
1995 #ifdef SKIP_TRAMPOLINE_CODE
1996 fprintf_unfiltered (file,
1997 "gdbarch_dump: %s # %s\n",
1998 "SKIP_TRAMPOLINE_CODE(pc)",
1999 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
2001 fprintf_unfiltered (file,
2002 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
2003 (long) current_gdbarch->skip_trampoline_code
2004 /*SKIP_TRAMPOLINE_CODE ()*/);
2006 #ifdef SMASH_TEXT_ADDRESS
2007 fprintf_unfiltered (file,
2008 "gdbarch_dump: %s # %s\n",
2009 "SMASH_TEXT_ADDRESS(addr)",
2010 XSTRING (SMASH_TEXT_ADDRESS (addr)));
2012 fprintf_unfiltered (file,
2013 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
2014 (long) current_gdbarch->smash_text_address
2015 /*SMASH_TEXT_ADDRESS ()*/);
2017 #ifdef SOFTWARE_SINGLE_STEP
2019 /* Macro might contain `[{}]' when not multi-arch */
2020 fprintf_unfiltered (file,
2021 "gdbarch_dump: %s # %s\n",
2022 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
2023 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
2026 fprintf_unfiltered (file,
2027 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2028 (long) current_gdbarch->software_single_step
2029 /*SOFTWARE_SINGLE_STEP ()*/);
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: SP_REGNUM # %s\n",
2034 XSTRING (SP_REGNUM));
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: SP_REGNUM = %d\n",
2039 #ifdef STAB_REG_TO_REGNUM
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: %s # %s\n",
2042 "STAB_REG_TO_REGNUM(stab_regnr)",
2043 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2045 fprintf_unfiltered (file,
2046 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
2047 (long) current_gdbarch->stab_reg_to_regnum
2048 /*STAB_REG_TO_REGNUM ()*/);
2051 fprintf_unfiltered (file,
2052 "gdbarch_dump: %s # %s\n",
2054 XSTRING (STACK_ALIGN (sp)));
2056 fprintf_unfiltered (file,
2057 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2058 (long) current_gdbarch->stack_align
2059 /*STACK_ALIGN ()*/);
2061 #ifdef STORE_RETURN_VALUE
2063 /* Macro might contain `[{}]' when not multi-arch */
2064 fprintf_unfiltered (file,
2065 "gdbarch_dump: %s # %s\n",
2066 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2067 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2070 fprintf_unfiltered (file,
2071 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
2072 (long) current_gdbarch->store_return_value
2073 /*STORE_RETURN_VALUE ()*/);
2075 #ifdef STORE_STRUCT_RETURN
2077 /* Macro might contain `[{}]' when not multi-arch */
2078 fprintf_unfiltered (file,
2079 "gdbarch_dump: %s # %s\n",
2080 "STORE_STRUCT_RETURN(addr, sp)",
2081 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
2086 (long) current_gdbarch->store_struct_return
2087 /*STORE_STRUCT_RETURN ()*/);
2089 #ifdef TARGET_ADDR_BIT
2090 fprintf_unfiltered (file,
2091 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2092 XSTRING (TARGET_ADDR_BIT));
2093 fprintf_unfiltered (file,
2094 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2097 #ifdef TARGET_ARCHITECTURE
2098 fprintf_unfiltered (file,
2099 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2100 XSTRING (TARGET_ARCHITECTURE));
2101 if (TARGET_ARCHITECTURE != NULL)
2102 fprintf_unfiltered (file,
2103 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2104 TARGET_ARCHITECTURE->printable_name);
2106 #ifdef TARGET_BFD_VMA_BIT
2107 fprintf_unfiltered (file,
2108 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2109 XSTRING (TARGET_BFD_VMA_BIT));
2110 fprintf_unfiltered (file,
2111 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2112 TARGET_BFD_VMA_BIT);
2114 #ifdef TARGET_BYTE_ORDER
2115 fprintf_unfiltered (file,
2116 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2117 XSTRING (TARGET_BYTE_ORDER));
2118 fprintf_unfiltered (file,
2119 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2120 (long) TARGET_BYTE_ORDER);
2122 #ifdef TARGET_CHAR_SIGNED
2123 fprintf_unfiltered (file,
2124 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2125 XSTRING (TARGET_CHAR_SIGNED));
2126 fprintf_unfiltered (file,
2127 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2128 TARGET_CHAR_SIGNED);
2130 #ifdef TARGET_DOUBLE_BIT
2131 fprintf_unfiltered (file,
2132 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2133 XSTRING (TARGET_DOUBLE_BIT));
2134 fprintf_unfiltered (file,
2135 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2138 #ifdef TARGET_DOUBLE_FORMAT
2139 fprintf_unfiltered (file,
2140 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2141 XSTRING (TARGET_DOUBLE_FORMAT));
2142 fprintf_unfiltered (file,
2143 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2144 (long) TARGET_DOUBLE_FORMAT);
2146 #ifdef TARGET_FLOAT_BIT
2147 fprintf_unfiltered (file,
2148 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2149 XSTRING (TARGET_FLOAT_BIT));
2150 fprintf_unfiltered (file,
2151 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2154 #ifdef TARGET_FLOAT_FORMAT
2155 fprintf_unfiltered (file,
2156 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2157 XSTRING (TARGET_FLOAT_FORMAT));
2158 fprintf_unfiltered (file,
2159 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2160 (long) TARGET_FLOAT_FORMAT);
2162 #ifdef TARGET_INT_BIT
2163 fprintf_unfiltered (file,
2164 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2165 XSTRING (TARGET_INT_BIT));
2166 fprintf_unfiltered (file,
2167 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2170 #ifdef TARGET_LONG_BIT
2171 fprintf_unfiltered (file,
2172 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2173 XSTRING (TARGET_LONG_BIT));
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2178 #ifdef TARGET_LONG_DOUBLE_BIT
2179 fprintf_unfiltered (file,
2180 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2181 XSTRING (TARGET_LONG_DOUBLE_BIT));
2182 fprintf_unfiltered (file,
2183 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2184 TARGET_LONG_DOUBLE_BIT);
2186 #ifdef TARGET_LONG_DOUBLE_FORMAT
2187 fprintf_unfiltered (file,
2188 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2189 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2190 fprintf_unfiltered (file,
2191 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2192 (long) TARGET_LONG_DOUBLE_FORMAT);
2194 #ifdef TARGET_LONG_LONG_BIT
2195 fprintf_unfiltered (file,
2196 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2197 XSTRING (TARGET_LONG_LONG_BIT));
2198 fprintf_unfiltered (file,
2199 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2200 TARGET_LONG_LONG_BIT);
2202 #ifdef TARGET_PRINT_INSN
2203 fprintf_unfiltered (file,
2204 "gdbarch_dump: %s # %s\n",
2205 "TARGET_PRINT_INSN(vma, info)",
2206 XSTRING (TARGET_PRINT_INSN (vma, info)));
2208 fprintf_unfiltered (file,
2209 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2210 (long) current_gdbarch->print_insn
2211 /*TARGET_PRINT_INSN ()*/);
2213 #ifdef TARGET_PTR_BIT
2214 fprintf_unfiltered (file,
2215 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2216 XSTRING (TARGET_PTR_BIT));
2217 fprintf_unfiltered (file,
2218 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2221 #ifdef TARGET_READ_FP
2222 fprintf_unfiltered (file,
2223 "gdbarch_dump: %s # %s\n",
2225 XSTRING (TARGET_READ_FP ()));
2227 fprintf_unfiltered (file,
2228 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2229 (long) current_gdbarch->read_fp
2230 /*TARGET_READ_FP ()*/);
2232 #ifdef TARGET_READ_PC
2233 fprintf_unfiltered (file,
2234 "gdbarch_dump: %s # %s\n",
2235 "TARGET_READ_PC(ptid)",
2236 XSTRING (TARGET_READ_PC (ptid)));
2238 fprintf_unfiltered (file,
2239 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2240 (long) current_gdbarch->read_pc
2241 /*TARGET_READ_PC ()*/);
2243 #ifdef TARGET_READ_SP
2244 fprintf_unfiltered (file,
2245 "gdbarch_dump: %s # %s\n",
2247 XSTRING (TARGET_READ_SP ()));
2249 fprintf_unfiltered (file,
2250 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2251 (long) current_gdbarch->read_sp
2252 /*TARGET_READ_SP ()*/);
2254 #ifdef TARGET_SHORT_BIT
2255 fprintf_unfiltered (file,
2256 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2257 XSTRING (TARGET_SHORT_BIT));
2258 fprintf_unfiltered (file,
2259 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2262 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2264 /* Macro might contain `[{}]' when not multi-arch */
2265 fprintf_unfiltered (file,
2266 "gdbarch_dump: %s # %s\n",
2267 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2268 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2271 fprintf_unfiltered (file,
2272 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2273 (long) current_gdbarch->virtual_frame_pointer
2274 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2276 #ifdef TARGET_WRITE_PC
2278 /* Macro might contain `[{}]' when not multi-arch */
2279 fprintf_unfiltered (file,
2280 "gdbarch_dump: %s # %s\n",
2281 "TARGET_WRITE_PC(val, ptid)",
2282 XSTRING (TARGET_WRITE_PC (val, ptid)));
2285 fprintf_unfiltered (file,
2286 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2287 (long) current_gdbarch->write_pc
2288 /*TARGET_WRITE_PC ()*/);
2290 #ifdef TARGET_WRITE_SP
2292 /* Macro might contain `[{}]' when not multi-arch */
2293 fprintf_unfiltered (file,
2294 "gdbarch_dump: %s # %s\n",
2295 "TARGET_WRITE_SP(val)",
2296 XSTRING (TARGET_WRITE_SP (val)));
2299 fprintf_unfiltered (file,
2300 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2301 (long) current_gdbarch->write_sp
2302 /*TARGET_WRITE_SP ()*/);
2304 #ifdef USE_GENERIC_DUMMY_FRAMES
2305 fprintf_unfiltered (file,
2306 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2307 XSTRING (USE_GENERIC_DUMMY_FRAMES));
2308 fprintf_unfiltered (file,
2309 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2310 USE_GENERIC_DUMMY_FRAMES);
2312 #ifdef USE_STRUCT_CONVENTION
2313 fprintf_unfiltered (file,
2314 "gdbarch_dump: %s # %s\n",
2315 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2316 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2318 fprintf_unfiltered (file,
2319 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2320 (long) current_gdbarch->use_struct_convention
2321 /*USE_STRUCT_CONVENTION ()*/);
2323 #ifdef VALUE_TO_REGISTER
2325 /* Macro might contain `[{}]' when not multi-arch */
2326 fprintf_unfiltered (file,
2327 "gdbarch_dump: %s # %s\n",
2328 "VALUE_TO_REGISTER(type, regnum, from, to)",
2329 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2332 fprintf_unfiltered (file,
2333 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2334 (long) current_gdbarch->value_to_register
2335 /*VALUE_TO_REGISTER ()*/);
2337 if (current_gdbarch->dump_tdep != NULL)
2338 current_gdbarch->dump_tdep (current_gdbarch, file);
2341 struct gdbarch_tdep *
2342 gdbarch_tdep (struct gdbarch *gdbarch)
2344 if (gdbarch_debug >= 2)
2345 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2346 return gdbarch->tdep;
2350 const struct bfd_arch_info *
2351 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2353 gdb_assert (gdbarch != NULL);
2354 if (gdbarch_debug >= 2)
2355 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2356 return gdbarch->bfd_arch_info;
2360 gdbarch_byte_order (struct gdbarch *gdbarch)
2362 gdb_assert (gdbarch != NULL);
2363 if (gdbarch_debug >= 2)
2364 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2365 return gdbarch->byte_order;
2369 gdbarch_short_bit (struct gdbarch *gdbarch)
2371 gdb_assert (gdbarch != NULL);
2372 /* Skip verify of short_bit, invalid_p == 0 */
2373 if (gdbarch_debug >= 2)
2374 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2375 return gdbarch->short_bit;
2379 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2382 gdbarch->short_bit = short_bit;
2386 gdbarch_int_bit (struct gdbarch *gdbarch)
2388 gdb_assert (gdbarch != NULL);
2389 /* Skip verify of int_bit, invalid_p == 0 */
2390 if (gdbarch_debug >= 2)
2391 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2392 return gdbarch->int_bit;
2396 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2399 gdbarch->int_bit = int_bit;
2403 gdbarch_long_bit (struct gdbarch *gdbarch)
2405 gdb_assert (gdbarch != NULL);
2406 /* Skip verify of long_bit, invalid_p == 0 */
2407 if (gdbarch_debug >= 2)
2408 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2409 return gdbarch->long_bit;
2413 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2416 gdbarch->long_bit = long_bit;
2420 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2422 gdb_assert (gdbarch != NULL);
2423 /* Skip verify of long_long_bit, invalid_p == 0 */
2424 if (gdbarch_debug >= 2)
2425 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2426 return gdbarch->long_long_bit;
2430 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2433 gdbarch->long_long_bit = long_long_bit;
2437 gdbarch_float_bit (struct gdbarch *gdbarch)
2439 gdb_assert (gdbarch != NULL);
2440 /* Skip verify of float_bit, invalid_p == 0 */
2441 if (gdbarch_debug >= 2)
2442 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2443 return gdbarch->float_bit;
2447 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2450 gdbarch->float_bit = float_bit;
2454 gdbarch_double_bit (struct gdbarch *gdbarch)
2456 gdb_assert (gdbarch != NULL);
2457 /* Skip verify of double_bit, invalid_p == 0 */
2458 if (gdbarch_debug >= 2)
2459 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2460 return gdbarch->double_bit;
2464 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2467 gdbarch->double_bit = double_bit;
2471 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2473 gdb_assert (gdbarch != NULL);
2474 /* Skip verify of long_double_bit, invalid_p == 0 */
2475 if (gdbarch_debug >= 2)
2476 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2477 return gdbarch->long_double_bit;
2481 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2482 int long_double_bit)
2484 gdbarch->long_double_bit = long_double_bit;
2488 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2490 gdb_assert (gdbarch != NULL);
2491 /* Skip verify of ptr_bit, invalid_p == 0 */
2492 if (gdbarch_debug >= 2)
2493 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2494 return gdbarch->ptr_bit;
2498 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2501 gdbarch->ptr_bit = ptr_bit;
2505 gdbarch_addr_bit (struct gdbarch *gdbarch)
2507 gdb_assert (gdbarch != NULL);
2508 if (gdbarch->addr_bit == 0)
2509 internal_error (__FILE__, __LINE__,
2510 "gdbarch: gdbarch_addr_bit invalid");
2511 if (gdbarch_debug >= 2)
2512 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2513 return gdbarch->addr_bit;
2517 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2520 gdbarch->addr_bit = addr_bit;
2524 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2526 gdb_assert (gdbarch != NULL);
2527 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2528 if (gdbarch_debug >= 2)
2529 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2530 return gdbarch->bfd_vma_bit;
2534 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2537 gdbarch->bfd_vma_bit = bfd_vma_bit;
2541 gdbarch_char_signed (struct gdbarch *gdbarch)
2543 gdb_assert (gdbarch != NULL);
2544 if (gdbarch->char_signed == -1)
2545 internal_error (__FILE__, __LINE__,
2546 "gdbarch: gdbarch_char_signed invalid");
2547 if (gdbarch_debug >= 2)
2548 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2549 return gdbarch->char_signed;
2553 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2556 gdbarch->char_signed = char_signed;
2560 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2562 gdb_assert (gdbarch != NULL);
2563 if (gdbarch->read_pc == 0)
2564 internal_error (__FILE__, __LINE__,
2565 "gdbarch: gdbarch_read_pc invalid");
2566 if (gdbarch_debug >= 2)
2567 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2568 return gdbarch->read_pc (ptid);
2572 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2573 gdbarch_read_pc_ftype read_pc)
2575 gdbarch->read_pc = read_pc;
2579 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2581 gdb_assert (gdbarch != NULL);
2582 if (gdbarch->write_pc == 0)
2583 internal_error (__FILE__, __LINE__,
2584 "gdbarch: gdbarch_write_pc invalid");
2585 if (gdbarch_debug >= 2)
2586 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2587 gdbarch->write_pc (val, ptid);
2591 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2592 gdbarch_write_pc_ftype write_pc)
2594 gdbarch->write_pc = write_pc;
2598 gdbarch_read_fp (struct gdbarch *gdbarch)
2600 gdb_assert (gdbarch != NULL);
2601 if (gdbarch->read_fp == 0)
2602 internal_error (__FILE__, __LINE__,
2603 "gdbarch: gdbarch_read_fp invalid");
2604 if (gdbarch_debug >= 2)
2605 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2606 return gdbarch->read_fp ();
2610 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2611 gdbarch_read_fp_ftype read_fp)
2613 gdbarch->read_fp = read_fp;
2617 gdbarch_read_sp (struct gdbarch *gdbarch)
2619 gdb_assert (gdbarch != NULL);
2620 if (gdbarch->read_sp == 0)
2621 internal_error (__FILE__, __LINE__,
2622 "gdbarch: gdbarch_read_sp invalid");
2623 if (gdbarch_debug >= 2)
2624 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2625 return gdbarch->read_sp ();
2629 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2630 gdbarch_read_sp_ftype read_sp)
2632 gdbarch->read_sp = read_sp;
2636 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2638 gdb_assert (gdbarch != NULL);
2639 if (gdbarch->write_sp == 0)
2640 internal_error (__FILE__, __LINE__,
2641 "gdbarch: gdbarch_write_sp invalid");
2642 if (gdbarch_debug >= 2)
2643 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2644 gdbarch->write_sp (val);
2648 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2649 gdbarch_write_sp_ftype write_sp)
2651 gdbarch->write_sp = write_sp;
2655 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2657 gdb_assert (gdbarch != NULL);
2658 if (gdbarch->virtual_frame_pointer == 0)
2659 internal_error (__FILE__, __LINE__,
2660 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2661 if (gdbarch_debug >= 2)
2662 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2663 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2667 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2668 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2670 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2674 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2676 gdb_assert (gdbarch != NULL);
2677 return gdbarch->pseudo_register_read != 0;
2681 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2683 gdb_assert (gdbarch != NULL);
2684 if (gdbarch->pseudo_register_read == 0)
2685 internal_error (__FILE__, __LINE__,
2686 "gdbarch: gdbarch_pseudo_register_read invalid");
2687 if (gdbarch_debug >= 2)
2688 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2689 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2693 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2694 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2696 gdbarch->pseudo_register_read = pseudo_register_read;
2700 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2702 gdb_assert (gdbarch != NULL);
2703 return gdbarch->pseudo_register_write != 0;
2707 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2709 gdb_assert (gdbarch != NULL);
2710 if (gdbarch->pseudo_register_write == 0)
2711 internal_error (__FILE__, __LINE__,
2712 "gdbarch: gdbarch_pseudo_register_write invalid");
2713 if (gdbarch_debug >= 2)
2714 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2715 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2719 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2720 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2722 gdbarch->pseudo_register_write = pseudo_register_write;
2726 gdbarch_num_regs (struct gdbarch *gdbarch)
2728 gdb_assert (gdbarch != NULL);
2729 if (gdbarch->num_regs == -1)
2730 internal_error (__FILE__, __LINE__,
2731 "gdbarch: gdbarch_num_regs invalid");
2732 if (gdbarch_debug >= 2)
2733 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2734 return gdbarch->num_regs;
2738 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2741 gdbarch->num_regs = num_regs;
2745 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2747 gdb_assert (gdbarch != NULL);
2748 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2749 if (gdbarch_debug >= 2)
2750 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2751 return gdbarch->num_pseudo_regs;
2755 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2756 int num_pseudo_regs)
2758 gdbarch->num_pseudo_regs = num_pseudo_regs;
2762 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2764 gdb_assert (gdbarch != NULL);
2765 /* Skip verify of sp_regnum, invalid_p == 0 */
2766 if (gdbarch_debug >= 2)
2767 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2768 return gdbarch->sp_regnum;
2772 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2775 gdbarch->sp_regnum = sp_regnum;
2779 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2781 gdb_assert (gdbarch != NULL);
2782 /* Skip verify of fp_regnum, invalid_p == 0 */
2783 if (gdbarch_debug >= 2)
2784 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2785 return gdbarch->fp_regnum;
2789 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2792 gdbarch->fp_regnum = fp_regnum;
2796 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2798 gdb_assert (gdbarch != NULL);
2799 /* Skip verify of pc_regnum, invalid_p == 0 */
2800 if (gdbarch_debug >= 2)
2801 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2802 return gdbarch->pc_regnum;
2806 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2809 gdbarch->pc_regnum = pc_regnum;
2813 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2815 gdb_assert (gdbarch != NULL);
2816 /* Skip verify of ps_regnum, invalid_p == 0 */
2817 if (gdbarch_debug >= 2)
2818 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2819 return gdbarch->ps_regnum;
2823 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2826 gdbarch->ps_regnum = ps_regnum;
2830 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2832 gdb_assert (gdbarch != NULL);
2833 /* Skip verify of fp0_regnum, invalid_p == 0 */
2834 if (gdbarch_debug >= 2)
2835 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2836 return gdbarch->fp0_regnum;
2840 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2843 gdbarch->fp0_regnum = fp0_regnum;
2847 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2849 gdb_assert (gdbarch != NULL);
2850 /* Skip verify of npc_regnum, invalid_p == 0 */
2851 if (gdbarch_debug >= 2)
2852 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2853 return gdbarch->npc_regnum;
2857 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2860 gdbarch->npc_regnum = npc_regnum;
2864 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2866 gdb_assert (gdbarch != NULL);
2867 if (gdbarch->stab_reg_to_regnum == 0)
2868 internal_error (__FILE__, __LINE__,
2869 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2870 if (gdbarch_debug >= 2)
2871 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2872 return gdbarch->stab_reg_to_regnum (stab_regnr);
2876 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2877 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2879 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2883 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2885 gdb_assert (gdbarch != NULL);
2886 if (gdbarch->ecoff_reg_to_regnum == 0)
2887 internal_error (__FILE__, __LINE__,
2888 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2889 if (gdbarch_debug >= 2)
2890 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2891 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2895 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2896 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2898 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2902 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2904 gdb_assert (gdbarch != NULL);
2905 if (gdbarch->dwarf_reg_to_regnum == 0)
2906 internal_error (__FILE__, __LINE__,
2907 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2908 if (gdbarch_debug >= 2)
2909 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2910 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2914 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2915 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2917 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2921 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2923 gdb_assert (gdbarch != NULL);
2924 if (gdbarch->sdb_reg_to_regnum == 0)
2925 internal_error (__FILE__, __LINE__,
2926 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2927 if (gdbarch_debug >= 2)
2928 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2929 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2933 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2934 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2936 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2940 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2942 gdb_assert (gdbarch != NULL);
2943 if (gdbarch->dwarf2_reg_to_regnum == 0)
2944 internal_error (__FILE__, __LINE__,
2945 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2946 if (gdbarch_debug >= 2)
2947 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2948 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2952 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2953 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2955 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2959 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2961 gdb_assert (gdbarch != NULL);
2962 if (gdbarch->register_name == 0)
2963 internal_error (__FILE__, __LINE__,
2964 "gdbarch: gdbarch_register_name invalid");
2965 if (gdbarch_debug >= 2)
2966 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2967 return gdbarch->register_name (regnr);
2971 set_gdbarch_register_name (struct gdbarch *gdbarch,
2972 gdbarch_register_name_ftype register_name)
2974 gdbarch->register_name = register_name;
2978 gdbarch_register_size (struct gdbarch *gdbarch)
2980 gdb_assert (gdbarch != NULL);
2981 if (gdbarch->register_size == -1)
2982 internal_error (__FILE__, __LINE__,
2983 "gdbarch: gdbarch_register_size invalid");
2984 if (gdbarch_debug >= 2)
2985 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2986 return gdbarch->register_size;
2990 set_gdbarch_register_size (struct gdbarch *gdbarch,
2993 gdbarch->register_size = register_size;
2997 gdbarch_register_bytes (struct gdbarch *gdbarch)
2999 gdb_assert (gdbarch != NULL);
3000 if (gdbarch->register_bytes == -1)
3001 internal_error (__FILE__, __LINE__,
3002 "gdbarch: gdbarch_register_bytes invalid");
3003 if (gdbarch_debug >= 2)
3004 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
3005 return gdbarch->register_bytes;
3009 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
3012 gdbarch->register_bytes = register_bytes;
3016 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
3018 gdb_assert (gdbarch != NULL);
3019 if (gdbarch->register_byte == 0)
3020 internal_error (__FILE__, __LINE__,
3021 "gdbarch: gdbarch_register_byte invalid");
3022 if (gdbarch_debug >= 2)
3023 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
3024 return gdbarch->register_byte (reg_nr);
3028 set_gdbarch_register_byte (struct gdbarch *gdbarch,
3029 gdbarch_register_byte_ftype register_byte)
3031 gdbarch->register_byte = register_byte;
3035 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
3037 gdb_assert (gdbarch != NULL);
3038 if (gdbarch->register_raw_size == 0)
3039 internal_error (__FILE__, __LINE__,
3040 "gdbarch: gdbarch_register_raw_size invalid");
3041 if (gdbarch_debug >= 2)
3042 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3043 return gdbarch->register_raw_size (reg_nr);
3047 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3048 gdbarch_register_raw_size_ftype register_raw_size)
3050 gdbarch->register_raw_size = register_raw_size;
3054 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
3056 gdb_assert (gdbarch != NULL);
3057 if (gdbarch->max_register_raw_size == -1)
3058 internal_error (__FILE__, __LINE__,
3059 "gdbarch: gdbarch_max_register_raw_size invalid");
3060 if (gdbarch_debug >= 2)
3061 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
3062 return gdbarch->max_register_raw_size;
3066 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
3067 int max_register_raw_size)
3069 gdbarch->max_register_raw_size = max_register_raw_size;
3073 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3075 gdb_assert (gdbarch != NULL);
3076 if (gdbarch->register_virtual_size == 0)
3077 internal_error (__FILE__, __LINE__,
3078 "gdbarch: gdbarch_register_virtual_size invalid");
3079 if (gdbarch_debug >= 2)
3080 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3081 return gdbarch->register_virtual_size (reg_nr);
3085 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3086 gdbarch_register_virtual_size_ftype register_virtual_size)
3088 gdbarch->register_virtual_size = register_virtual_size;
3092 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
3094 gdb_assert (gdbarch != NULL);
3095 if (gdbarch->max_register_virtual_size == -1)
3096 internal_error (__FILE__, __LINE__,
3097 "gdbarch: gdbarch_max_register_virtual_size invalid");
3098 if (gdbarch_debug >= 2)
3099 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
3100 return gdbarch->max_register_virtual_size;
3104 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
3105 int max_register_virtual_size)
3107 gdbarch->max_register_virtual_size = max_register_virtual_size;
3111 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3113 gdb_assert (gdbarch != NULL);
3114 if (gdbarch->register_virtual_type == 0)
3115 internal_error (__FILE__, __LINE__,
3116 "gdbarch: gdbarch_register_virtual_type invalid");
3117 if (gdbarch_debug >= 2)
3118 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3119 return gdbarch->register_virtual_type (reg_nr);
3123 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3124 gdbarch_register_virtual_type_ftype register_virtual_type)
3126 gdbarch->register_virtual_type = register_virtual_type;
3130 gdbarch_do_registers_info_p (struct gdbarch *gdbarch)
3132 gdb_assert (gdbarch != NULL);
3133 return gdbarch->do_registers_info != 0;
3137 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3139 gdb_assert (gdbarch != NULL);
3140 if (gdbarch->do_registers_info == 0)
3141 internal_error (__FILE__, __LINE__,
3142 "gdbarch: gdbarch_do_registers_info invalid");
3143 if (gdbarch_debug >= 2)
3144 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
3145 gdbarch->do_registers_info (reg_nr, fpregs);
3149 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
3150 gdbarch_do_registers_info_ftype do_registers_info)
3152 gdbarch->do_registers_info = do_registers_info;
3156 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3158 gdb_assert (gdbarch != NULL);
3159 if (gdbarch->print_registers_info == 0)
3160 internal_error (__FILE__, __LINE__,
3161 "gdbarch: gdbarch_print_registers_info invalid");
3162 if (gdbarch_debug >= 2)
3163 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3164 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3168 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3169 gdbarch_print_registers_info_ftype print_registers_info)
3171 gdbarch->print_registers_info = print_registers_info;
3175 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3177 gdb_assert (gdbarch != NULL);
3178 return gdbarch->print_float_info != 0;
3182 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3184 gdb_assert (gdbarch != NULL);
3185 if (gdbarch->print_float_info == 0)
3186 internal_error (__FILE__, __LINE__,
3187 "gdbarch: gdbarch_print_float_info invalid");
3188 if (gdbarch_debug >= 2)
3189 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3190 gdbarch->print_float_info (gdbarch, file, frame, args);
3194 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3195 gdbarch_print_float_info_ftype print_float_info)
3197 gdbarch->print_float_info = print_float_info;
3201 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3203 gdb_assert (gdbarch != NULL);
3204 return gdbarch->print_vector_info != 0;
3208 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3210 gdb_assert (gdbarch != NULL);
3211 if (gdbarch->print_vector_info == 0)
3212 internal_error (__FILE__, __LINE__,
3213 "gdbarch: gdbarch_print_vector_info invalid");
3214 if (gdbarch_debug >= 2)
3215 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3216 gdbarch->print_vector_info (gdbarch, file, frame, args);
3220 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3221 gdbarch_print_vector_info_ftype print_vector_info)
3223 gdbarch->print_vector_info = print_vector_info;
3227 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3229 gdb_assert (gdbarch != NULL);
3230 if (gdbarch->register_sim_regno == 0)
3231 internal_error (__FILE__, __LINE__,
3232 "gdbarch: gdbarch_register_sim_regno invalid");
3233 if (gdbarch_debug >= 2)
3234 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3235 return gdbarch->register_sim_regno (reg_nr);
3239 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3240 gdbarch_register_sim_regno_ftype register_sim_regno)
3242 gdbarch->register_sim_regno = register_sim_regno;
3246 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3248 gdb_assert (gdbarch != NULL);
3249 return gdbarch->register_bytes_ok != 0;
3253 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3255 gdb_assert (gdbarch != NULL);
3256 if (gdbarch->register_bytes_ok == 0)
3257 internal_error (__FILE__, __LINE__,
3258 "gdbarch: gdbarch_register_bytes_ok invalid");
3259 if (gdbarch_debug >= 2)
3260 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3261 return gdbarch->register_bytes_ok (nr_bytes);
3265 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3266 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3268 gdbarch->register_bytes_ok = register_bytes_ok;
3272 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3274 gdb_assert (gdbarch != NULL);
3275 if (gdbarch->cannot_fetch_register == 0)
3276 internal_error (__FILE__, __LINE__,
3277 "gdbarch: gdbarch_cannot_fetch_register invalid");
3278 if (gdbarch_debug >= 2)
3279 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3280 return gdbarch->cannot_fetch_register (regnum);
3284 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3285 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3287 gdbarch->cannot_fetch_register = cannot_fetch_register;
3291 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3293 gdb_assert (gdbarch != NULL);
3294 if (gdbarch->cannot_store_register == 0)
3295 internal_error (__FILE__, __LINE__,
3296 "gdbarch: gdbarch_cannot_store_register invalid");
3297 if (gdbarch_debug >= 2)
3298 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3299 return gdbarch->cannot_store_register (regnum);
3303 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3304 gdbarch_cannot_store_register_ftype cannot_store_register)
3306 gdbarch->cannot_store_register = cannot_store_register;
3310 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3312 gdb_assert (gdbarch != NULL);
3313 return gdbarch->get_longjmp_target != 0;
3317 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3319 gdb_assert (gdbarch != NULL);
3320 if (gdbarch->get_longjmp_target == 0)
3321 internal_error (__FILE__, __LINE__,
3322 "gdbarch: gdbarch_get_longjmp_target invalid");
3323 if (gdbarch_debug >= 2)
3324 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3325 return gdbarch->get_longjmp_target (pc);
3329 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3330 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3332 gdbarch->get_longjmp_target = get_longjmp_target;
3336 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
3338 gdb_assert (gdbarch != NULL);
3339 if (gdbarch->use_generic_dummy_frames == -1)
3340 internal_error (__FILE__, __LINE__,
3341 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3342 if (gdbarch_debug >= 2)
3343 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
3344 return gdbarch->use_generic_dummy_frames;
3348 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
3349 int use_generic_dummy_frames)
3351 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
3355 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3357 gdb_assert (gdbarch != NULL);
3358 if (gdbarch->call_dummy_location == 0)
3359 internal_error (__FILE__, __LINE__,
3360 "gdbarch: gdbarch_call_dummy_location invalid");
3361 if (gdbarch_debug >= 2)
3362 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3363 return gdbarch->call_dummy_location;
3367 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3368 int call_dummy_location)
3370 gdbarch->call_dummy_location = call_dummy_location;
3374 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3376 gdb_assert (gdbarch != NULL);
3377 if (gdbarch->call_dummy_address == 0)
3378 internal_error (__FILE__, __LINE__,
3379 "gdbarch: gdbarch_call_dummy_address invalid");
3380 if (gdbarch_debug >= 2)
3381 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3382 return gdbarch->call_dummy_address ();
3386 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3387 gdbarch_call_dummy_address_ftype call_dummy_address)
3389 gdbarch->call_dummy_address = call_dummy_address;
3393 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3395 gdb_assert (gdbarch != NULL);
3396 if (gdbarch->call_dummy_start_offset == -1)
3397 internal_error (__FILE__, __LINE__,
3398 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3399 if (gdbarch_debug >= 2)
3400 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3401 return gdbarch->call_dummy_start_offset;
3405 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3406 CORE_ADDR call_dummy_start_offset)
3408 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3412 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3414 gdb_assert (gdbarch != NULL);
3415 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
3416 internal_error (__FILE__, __LINE__,
3417 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3418 if (gdbarch_debug >= 2)
3419 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3420 return gdbarch->call_dummy_breakpoint_offset;
3424 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3425 CORE_ADDR call_dummy_breakpoint_offset)
3427 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3431 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3433 gdb_assert (gdbarch != NULL);
3434 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3435 internal_error (__FILE__, __LINE__,
3436 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3437 if (gdbarch_debug >= 2)
3438 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3439 return gdbarch->call_dummy_breakpoint_offset_p;
3443 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3444 int call_dummy_breakpoint_offset_p)
3446 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3450 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3452 gdb_assert (gdbarch != NULL);
3453 if (gdbarch->call_dummy_length == -1)
3454 internal_error (__FILE__, __LINE__,
3455 "gdbarch: gdbarch_call_dummy_length invalid");
3456 if (gdbarch_debug >= 2)
3457 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3458 return gdbarch->call_dummy_length;
3462 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3463 int call_dummy_length)
3465 gdbarch->call_dummy_length = call_dummy_length;
3469 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3471 gdb_assert (gdbarch != NULL);
3472 if (gdbarch->pc_in_call_dummy == 0)
3473 internal_error (__FILE__, __LINE__,
3474 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3475 if (gdbarch_debug >= 2)
3476 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
3477 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
3481 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
3482 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
3484 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
3488 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3490 gdb_assert (gdbarch != NULL);
3491 if (gdbarch->call_dummy_p == -1)
3492 internal_error (__FILE__, __LINE__,
3493 "gdbarch: gdbarch_call_dummy_p invalid");
3494 if (gdbarch_debug >= 2)
3495 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3496 return gdbarch->call_dummy_p;
3500 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3503 gdbarch->call_dummy_p = call_dummy_p;
3507 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3509 gdb_assert (gdbarch != NULL);
3510 /* Skip verify of call_dummy_words, invalid_p == 0 */
3511 if (gdbarch_debug >= 2)
3512 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3513 return gdbarch->call_dummy_words;
3517 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3518 LONGEST * call_dummy_words)
3520 gdbarch->call_dummy_words = call_dummy_words;
3524 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3526 gdb_assert (gdbarch != NULL);
3527 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3528 if (gdbarch_debug >= 2)
3529 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3530 return gdbarch->sizeof_call_dummy_words;
3534 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3535 int sizeof_call_dummy_words)
3537 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3541 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3543 gdb_assert (gdbarch != NULL);
3544 if (gdbarch->call_dummy_stack_adjust_p == -1)
3545 internal_error (__FILE__, __LINE__,
3546 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3547 if (gdbarch_debug >= 2)
3548 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3549 return gdbarch->call_dummy_stack_adjust_p;
3553 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3554 int call_dummy_stack_adjust_p)
3556 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3560 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3562 gdb_assert (gdbarch != NULL);
3563 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3564 internal_error (__FILE__, __LINE__,
3565 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3566 if (gdbarch_debug >= 2)
3567 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3568 return gdbarch->call_dummy_stack_adjust;
3572 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3573 int call_dummy_stack_adjust)
3575 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3579 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)
3581 gdb_assert (gdbarch != NULL);
3582 if (gdbarch->fix_call_dummy == 0)
3583 internal_error (__FILE__, __LINE__,
3584 "gdbarch: gdbarch_fix_call_dummy invalid");
3585 if (gdbarch_debug >= 2)
3586 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3587 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3591 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3592 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3594 gdbarch->fix_call_dummy = fix_call_dummy;
3598 gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3600 gdb_assert (gdbarch != NULL);
3601 if (gdbarch->init_frame_pc_first == 0)
3602 internal_error (__FILE__, __LINE__,
3603 "gdbarch: gdbarch_init_frame_pc_first invalid");
3604 if (gdbarch_debug >= 2)
3605 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n");
3606 gdbarch->init_frame_pc_first (fromleaf, prev);
3610 set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch,
3611 gdbarch_init_frame_pc_first_ftype init_frame_pc_first)
3613 gdbarch->init_frame_pc_first = init_frame_pc_first;
3617 gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3619 gdb_assert (gdbarch != NULL);
3620 if (gdbarch->init_frame_pc == 0)
3621 internal_error (__FILE__, __LINE__,
3622 "gdbarch: gdbarch_init_frame_pc invalid");
3623 if (gdbarch_debug >= 2)
3624 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
3625 gdbarch->init_frame_pc (fromleaf, prev);
3629 set_gdbarch_init_frame_pc (struct gdbarch *gdbarch,
3630 gdbarch_init_frame_pc_ftype init_frame_pc)
3632 gdbarch->init_frame_pc = init_frame_pc;
3636 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3638 gdb_assert (gdbarch != NULL);
3639 if (gdbarch_debug >= 2)
3640 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3641 return gdbarch->believe_pcc_promotion;
3645 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3646 int believe_pcc_promotion)
3648 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3652 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3654 gdb_assert (gdbarch != NULL);
3655 if (gdbarch_debug >= 2)
3656 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3657 return gdbarch->believe_pcc_promotion_type;
3661 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3662 int believe_pcc_promotion_type)
3664 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3668 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3670 gdb_assert (gdbarch != NULL);
3671 if (gdbarch->coerce_float_to_double == 0)
3672 internal_error (__FILE__, __LINE__,
3673 "gdbarch: gdbarch_coerce_float_to_double invalid");
3674 if (gdbarch_debug >= 2)
3675 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3676 return gdbarch->coerce_float_to_double (formal, actual);
3680 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3681 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3683 gdbarch->coerce_float_to_double = coerce_float_to_double;
3687 gdbarch_get_saved_register (struct gdbarch *gdbarch, char *raw_buffer, int *optimized, CORE_ADDR *addrp, struct frame_info *frame, int regnum, enum lval_type *lval)
3689 gdb_assert (gdbarch != NULL);
3690 if (gdbarch->get_saved_register == 0)
3691 internal_error (__FILE__, __LINE__,
3692 "gdbarch: gdbarch_get_saved_register invalid");
3693 if (gdbarch_debug >= 2)
3694 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3695 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3699 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3700 gdbarch_get_saved_register_ftype get_saved_register)
3702 gdbarch->get_saved_register = get_saved_register;
3706 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3708 gdb_assert (gdbarch != NULL);
3709 if (gdbarch->register_convertible == 0)
3710 internal_error (__FILE__, __LINE__,
3711 "gdbarch: gdbarch_register_convertible invalid");
3712 if (gdbarch_debug >= 2)
3713 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3714 return gdbarch->register_convertible (nr);
3718 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3719 gdbarch_register_convertible_ftype register_convertible)
3721 gdbarch->register_convertible = register_convertible;
3725 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3727 gdb_assert (gdbarch != NULL);
3728 if (gdbarch->register_convert_to_virtual == 0)
3729 internal_error (__FILE__, __LINE__,
3730 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3731 if (gdbarch_debug >= 2)
3732 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3733 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3737 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3738 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3740 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3744 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3746 gdb_assert (gdbarch != NULL);
3747 if (gdbarch->register_convert_to_raw == 0)
3748 internal_error (__FILE__, __LINE__,
3749 "gdbarch: gdbarch_register_convert_to_raw invalid");
3750 if (gdbarch_debug >= 2)
3751 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3752 gdbarch->register_convert_to_raw (type, regnum, from, to);
3756 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3757 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3759 gdbarch->register_convert_to_raw = register_convert_to_raw;
3763 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
3765 gdb_assert (gdbarch != NULL);
3766 if (gdbarch->convert_register_p == 0)
3767 internal_error (__FILE__, __LINE__,
3768 "gdbarch: gdbarch_convert_register_p invalid");
3769 if (gdbarch_debug >= 2)
3770 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3771 return gdbarch->convert_register_p (regnum);
3775 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3776 gdbarch_convert_register_p_ftype convert_register_p)
3778 gdbarch->convert_register_p = convert_register_p;
3782 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3784 gdb_assert (gdbarch != NULL);
3785 if (gdbarch->register_to_value == 0)
3786 internal_error (__FILE__, __LINE__,
3787 "gdbarch: gdbarch_register_to_value invalid");
3788 if (gdbarch_debug >= 2)
3789 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3790 gdbarch->register_to_value (regnum, type, from, to);
3794 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3795 gdbarch_register_to_value_ftype register_to_value)
3797 gdbarch->register_to_value = register_to_value;
3801 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3803 gdb_assert (gdbarch != NULL);
3804 if (gdbarch->value_to_register == 0)
3805 internal_error (__FILE__, __LINE__,
3806 "gdbarch: gdbarch_value_to_register invalid");
3807 if (gdbarch_debug >= 2)
3808 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3809 gdbarch->value_to_register (type, regnum, from, to);
3813 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3814 gdbarch_value_to_register_ftype value_to_register)
3816 gdbarch->value_to_register = value_to_register;
3820 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3822 gdb_assert (gdbarch != NULL);
3823 if (gdbarch->pointer_to_address == 0)
3824 internal_error (__FILE__, __LINE__,
3825 "gdbarch: gdbarch_pointer_to_address invalid");
3826 if (gdbarch_debug >= 2)
3827 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3828 return gdbarch->pointer_to_address (type, buf);
3832 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3833 gdbarch_pointer_to_address_ftype pointer_to_address)
3835 gdbarch->pointer_to_address = pointer_to_address;
3839 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3841 gdb_assert (gdbarch != NULL);
3842 if (gdbarch->address_to_pointer == 0)
3843 internal_error (__FILE__, __LINE__,
3844 "gdbarch: gdbarch_address_to_pointer invalid");
3845 if (gdbarch_debug >= 2)
3846 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3847 gdbarch->address_to_pointer (type, buf, addr);
3851 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3852 gdbarch_address_to_pointer_ftype address_to_pointer)
3854 gdbarch->address_to_pointer = address_to_pointer;
3858 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3860 gdb_assert (gdbarch != NULL);
3861 return gdbarch->integer_to_address != 0;
3865 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3867 gdb_assert (gdbarch != NULL);
3868 if (gdbarch->integer_to_address == 0)
3869 internal_error (__FILE__, __LINE__,
3870 "gdbarch: gdbarch_integer_to_address invalid");
3871 if (gdbarch_debug >= 2)
3872 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3873 return gdbarch->integer_to_address (type, buf);
3877 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3878 gdbarch_integer_to_address_ftype integer_to_address)
3880 gdbarch->integer_to_address = integer_to_address;
3884 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3886 gdb_assert (gdbarch != NULL);
3887 if (gdbarch->return_value_on_stack == 0)
3888 internal_error (__FILE__, __LINE__,
3889 "gdbarch: gdbarch_return_value_on_stack invalid");
3890 if (gdbarch_debug >= 2)
3891 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3892 return gdbarch->return_value_on_stack (type);
3896 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3897 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3899 gdbarch->return_value_on_stack = return_value_on_stack;
3903 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3905 gdb_assert (gdbarch != NULL);
3906 if (gdbarch->push_arguments == 0)
3907 internal_error (__FILE__, __LINE__,
3908 "gdbarch: gdbarch_push_arguments invalid");
3909 if (gdbarch_debug >= 2)
3910 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3911 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3915 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3916 gdbarch_push_arguments_ftype push_arguments)
3918 gdbarch->push_arguments = push_arguments;
3922 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3924 gdb_assert (gdbarch != NULL);
3925 if (gdbarch->push_dummy_frame == 0)
3926 internal_error (__FILE__, __LINE__,
3927 "gdbarch: gdbarch_push_dummy_frame invalid");
3928 if (gdbarch_debug >= 2)
3929 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3930 gdbarch->push_dummy_frame ();
3934 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3935 gdbarch_push_dummy_frame_ftype push_dummy_frame)
3937 gdbarch->push_dummy_frame = push_dummy_frame;
3941 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
3943 gdb_assert (gdbarch != NULL);
3944 return gdbarch->push_return_address != 0;
3948 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3950 gdb_assert (gdbarch != NULL);
3951 if (gdbarch->push_return_address == 0)
3952 internal_error (__FILE__, __LINE__,
3953 "gdbarch: gdbarch_push_return_address invalid");
3954 if (gdbarch_debug >= 2)
3955 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3956 return gdbarch->push_return_address (pc, sp);
3960 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3961 gdbarch_push_return_address_ftype push_return_address)
3963 gdbarch->push_return_address = push_return_address;
3967 gdbarch_pop_frame (struct gdbarch *gdbarch)
3969 gdb_assert (gdbarch != NULL);
3970 if (gdbarch->pop_frame == 0)
3971 internal_error (__FILE__, __LINE__,
3972 "gdbarch: gdbarch_pop_frame invalid");
3973 if (gdbarch_debug >= 2)
3974 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3975 gdbarch->pop_frame ();
3979 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3980 gdbarch_pop_frame_ftype pop_frame)
3982 gdbarch->pop_frame = pop_frame;
3986 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3988 gdb_assert (gdbarch != NULL);
3989 if (gdbarch->store_struct_return == 0)
3990 internal_error (__FILE__, __LINE__,
3991 "gdbarch: gdbarch_store_struct_return invalid");
3992 if (gdbarch_debug >= 2)
3993 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3994 gdbarch->store_struct_return (addr, sp);
3998 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3999 gdbarch_store_struct_return_ftype store_struct_return)
4001 gdbarch->store_struct_return = store_struct_return;
4005 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
4007 gdb_assert (gdbarch != NULL);
4008 if (gdbarch->extract_return_value == 0)
4009 internal_error (__FILE__, __LINE__,
4010 "gdbarch: gdbarch_extract_return_value invalid");
4011 if (gdbarch_debug >= 2)
4012 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
4013 gdbarch->extract_return_value (type, regcache, valbuf);
4017 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
4018 gdbarch_extract_return_value_ftype extract_return_value)
4020 gdbarch->extract_return_value = extract_return_value;
4024 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
4026 gdb_assert (gdbarch != NULL);
4027 if (gdbarch->store_return_value == 0)
4028 internal_error (__FILE__, __LINE__,
4029 "gdbarch: gdbarch_store_return_value invalid");
4030 if (gdbarch_debug >= 2)
4031 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
4032 gdbarch->store_return_value (type, regcache, valbuf);
4036 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
4037 gdbarch_store_return_value_ftype store_return_value)
4039 gdbarch->store_return_value = store_return_value;
4043 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4045 gdb_assert (gdbarch != NULL);
4046 if (gdbarch->deprecated_extract_return_value == 0)
4047 internal_error (__FILE__, __LINE__,
4048 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4049 if (gdbarch_debug >= 2)
4050 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4051 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4055 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4056 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4058 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4062 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4064 gdb_assert (gdbarch != NULL);
4065 if (gdbarch->deprecated_store_return_value == 0)
4066 internal_error (__FILE__, __LINE__,
4067 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4068 if (gdbarch_debug >= 2)
4069 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4070 gdbarch->deprecated_store_return_value (type, valbuf);
4074 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4075 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4077 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4081 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4083 gdb_assert (gdbarch != NULL);
4084 return gdbarch->extract_struct_value_address != 0;
4088 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4090 gdb_assert (gdbarch != NULL);
4091 if (gdbarch->extract_struct_value_address == 0)
4092 internal_error (__FILE__, __LINE__,
4093 "gdbarch: gdbarch_extract_struct_value_address invalid");
4094 if (gdbarch_debug >= 2)
4095 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4096 return gdbarch->extract_struct_value_address (regcache);
4100 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4101 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4103 gdbarch->extract_struct_value_address = extract_struct_value_address;
4107 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4109 gdb_assert (gdbarch != NULL);
4110 return gdbarch->deprecated_extract_struct_value_address != 0;
4114 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4116 gdb_assert (gdbarch != NULL);
4117 if (gdbarch->deprecated_extract_struct_value_address == 0)
4118 internal_error (__FILE__, __LINE__,
4119 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4120 if (gdbarch_debug >= 2)
4121 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4122 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4126 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4127 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4129 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4133 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4135 gdb_assert (gdbarch != NULL);
4136 if (gdbarch->use_struct_convention == 0)
4137 internal_error (__FILE__, __LINE__,
4138 "gdbarch: gdbarch_use_struct_convention invalid");
4139 if (gdbarch_debug >= 2)
4140 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4141 return gdbarch->use_struct_convention (gcc_p, value_type);
4145 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4146 gdbarch_use_struct_convention_ftype use_struct_convention)
4148 gdbarch->use_struct_convention = use_struct_convention;
4152 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4154 gdb_assert (gdbarch != NULL);
4155 if (gdbarch->frame_init_saved_regs == 0)
4156 internal_error (__FILE__, __LINE__,
4157 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4158 if (gdbarch_debug >= 2)
4159 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
4160 gdbarch->frame_init_saved_regs (frame);
4164 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
4165 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
4167 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
4171 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
4173 gdb_assert (gdbarch != NULL);
4174 return gdbarch->init_extra_frame_info != 0;
4178 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4180 gdb_assert (gdbarch != NULL);
4181 if (gdbarch->init_extra_frame_info == 0)
4182 internal_error (__FILE__, __LINE__,
4183 "gdbarch: gdbarch_init_extra_frame_info invalid");
4184 if (gdbarch_debug >= 2)
4185 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
4186 gdbarch->init_extra_frame_info (fromleaf, frame);
4190 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
4191 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
4193 gdbarch->init_extra_frame_info = init_extra_frame_info;
4197 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4199 gdb_assert (gdbarch != NULL);
4200 if (gdbarch->skip_prologue == 0)
4201 internal_error (__FILE__, __LINE__,
4202 "gdbarch: gdbarch_skip_prologue invalid");
4203 if (gdbarch_debug >= 2)
4204 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4205 return gdbarch->skip_prologue (ip);
4209 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4210 gdbarch_skip_prologue_ftype skip_prologue)
4212 gdbarch->skip_prologue = skip_prologue;
4216 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4218 gdb_assert (gdbarch != NULL);
4219 if (gdbarch->prologue_frameless_p == 0)
4220 internal_error (__FILE__, __LINE__,
4221 "gdbarch: gdbarch_prologue_frameless_p invalid");
4222 if (gdbarch_debug >= 2)
4223 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4224 return gdbarch->prologue_frameless_p (ip);
4228 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4229 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4231 gdbarch->prologue_frameless_p = prologue_frameless_p;
4235 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4237 gdb_assert (gdbarch != NULL);
4238 if (gdbarch->inner_than == 0)
4239 internal_error (__FILE__, __LINE__,
4240 "gdbarch: gdbarch_inner_than invalid");
4241 if (gdbarch_debug >= 2)
4242 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4243 return gdbarch->inner_than (lhs, rhs);
4247 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4248 gdbarch_inner_than_ftype inner_than)
4250 gdbarch->inner_than = inner_than;
4253 const unsigned char *
4254 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4256 gdb_assert (gdbarch != NULL);
4257 if (gdbarch->breakpoint_from_pc == 0)
4258 internal_error (__FILE__, __LINE__,
4259 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4260 if (gdbarch_debug >= 2)
4261 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4262 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4266 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4267 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4269 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4273 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4275 gdb_assert (gdbarch != NULL);
4276 if (gdbarch->memory_insert_breakpoint == 0)
4277 internal_error (__FILE__, __LINE__,
4278 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4279 if (gdbarch_debug >= 2)
4280 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4281 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4285 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4286 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4288 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4292 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4294 gdb_assert (gdbarch != NULL);
4295 if (gdbarch->memory_remove_breakpoint == 0)
4296 internal_error (__FILE__, __LINE__,
4297 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4298 if (gdbarch_debug >= 2)
4299 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4300 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4304 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4305 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4307 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4311 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4313 gdb_assert (gdbarch != NULL);
4314 if (gdbarch->decr_pc_after_break == -1)
4315 internal_error (__FILE__, __LINE__,
4316 "gdbarch: gdbarch_decr_pc_after_break invalid");
4317 if (gdbarch_debug >= 2)
4318 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4319 return gdbarch->decr_pc_after_break;
4323 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4324 CORE_ADDR decr_pc_after_break)
4326 gdbarch->decr_pc_after_break = decr_pc_after_break;
4330 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4332 gdb_assert (gdbarch != NULL);
4333 if (gdbarch->prepare_to_proceed == 0)
4334 internal_error (__FILE__, __LINE__,
4335 "gdbarch: gdbarch_prepare_to_proceed invalid");
4336 if (gdbarch_debug >= 2)
4337 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4338 return gdbarch->prepare_to_proceed (select_it);
4342 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4343 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4345 gdbarch->prepare_to_proceed = prepare_to_proceed;
4349 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4351 gdb_assert (gdbarch != NULL);
4352 if (gdbarch->function_start_offset == -1)
4353 internal_error (__FILE__, __LINE__,
4354 "gdbarch: gdbarch_function_start_offset invalid");
4355 if (gdbarch_debug >= 2)
4356 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4357 return gdbarch->function_start_offset;
4361 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4362 CORE_ADDR function_start_offset)
4364 gdbarch->function_start_offset = function_start_offset;
4368 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4370 gdb_assert (gdbarch != NULL);
4371 if (gdbarch->remote_translate_xfer_address == 0)
4372 internal_error (__FILE__, __LINE__,
4373 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4374 if (gdbarch_debug >= 2)
4375 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4376 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4380 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4381 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4383 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4387 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4389 gdb_assert (gdbarch != NULL);
4390 if (gdbarch->frame_args_skip == -1)
4391 internal_error (__FILE__, __LINE__,
4392 "gdbarch: gdbarch_frame_args_skip invalid");
4393 if (gdbarch_debug >= 2)
4394 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4395 return gdbarch->frame_args_skip;
4399 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4400 CORE_ADDR frame_args_skip)
4402 gdbarch->frame_args_skip = frame_args_skip;
4406 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4408 gdb_assert (gdbarch != NULL);
4409 if (gdbarch->frameless_function_invocation == 0)
4410 internal_error (__FILE__, __LINE__,
4411 "gdbarch: gdbarch_frameless_function_invocation invalid");
4412 if (gdbarch_debug >= 2)
4413 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4414 return gdbarch->frameless_function_invocation (fi);
4418 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4419 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4421 gdbarch->frameless_function_invocation = frameless_function_invocation;
4425 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4427 gdb_assert (gdbarch != NULL);
4428 if (gdbarch->frame_chain == 0)
4429 internal_error (__FILE__, __LINE__,
4430 "gdbarch: gdbarch_frame_chain invalid");
4431 if (gdbarch_debug >= 2)
4432 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4433 return gdbarch->frame_chain (frame);
4437 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4438 gdbarch_frame_chain_ftype frame_chain)
4440 gdbarch->frame_chain = frame_chain;
4444 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4446 gdb_assert (gdbarch != NULL);
4447 if (gdbarch->frame_chain_valid == 0)
4448 internal_error (__FILE__, __LINE__,
4449 "gdbarch: gdbarch_frame_chain_valid invalid");
4450 if (gdbarch_debug >= 2)
4451 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4452 return gdbarch->frame_chain_valid (chain, thisframe);
4456 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4457 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4459 gdbarch->frame_chain_valid = frame_chain_valid;
4463 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4465 gdb_assert (gdbarch != NULL);
4466 if (gdbarch->frame_saved_pc == 0)
4467 internal_error (__FILE__, __LINE__,
4468 "gdbarch: gdbarch_frame_saved_pc invalid");
4469 if (gdbarch_debug >= 2)
4470 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4471 return gdbarch->frame_saved_pc (fi);
4475 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4476 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4478 gdbarch->frame_saved_pc = frame_saved_pc;
4482 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4484 gdb_assert (gdbarch != NULL);
4485 if (gdbarch->frame_args_address == 0)
4486 internal_error (__FILE__, __LINE__,
4487 "gdbarch: gdbarch_frame_args_address invalid");
4488 if (gdbarch_debug >= 2)
4489 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4490 return gdbarch->frame_args_address (fi);
4494 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4495 gdbarch_frame_args_address_ftype frame_args_address)
4497 gdbarch->frame_args_address = frame_args_address;
4501 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4503 gdb_assert (gdbarch != NULL);
4504 if (gdbarch->frame_locals_address == 0)
4505 internal_error (__FILE__, __LINE__,
4506 "gdbarch: gdbarch_frame_locals_address invalid");
4507 if (gdbarch_debug >= 2)
4508 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4509 return gdbarch->frame_locals_address (fi);
4513 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4514 gdbarch_frame_locals_address_ftype frame_locals_address)
4516 gdbarch->frame_locals_address = frame_locals_address;
4520 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4522 gdb_assert (gdbarch != NULL);
4523 if (gdbarch->saved_pc_after_call == 0)
4524 internal_error (__FILE__, __LINE__,
4525 "gdbarch: gdbarch_saved_pc_after_call invalid");
4526 if (gdbarch_debug >= 2)
4527 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4528 return gdbarch->saved_pc_after_call (frame);
4532 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4533 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4535 gdbarch->saved_pc_after_call = saved_pc_after_call;
4539 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4541 gdb_assert (gdbarch != NULL);
4542 if (gdbarch->frame_num_args == 0)
4543 internal_error (__FILE__, __LINE__,
4544 "gdbarch: gdbarch_frame_num_args invalid");
4545 if (gdbarch_debug >= 2)
4546 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4547 return gdbarch->frame_num_args (frame);
4551 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4552 gdbarch_frame_num_args_ftype frame_num_args)
4554 gdbarch->frame_num_args = frame_num_args;
4558 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4560 gdb_assert (gdbarch != NULL);
4561 return gdbarch->stack_align != 0;
4565 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4567 gdb_assert (gdbarch != NULL);
4568 if (gdbarch->stack_align == 0)
4569 internal_error (__FILE__, __LINE__,
4570 "gdbarch: gdbarch_stack_align invalid");
4571 if (gdbarch_debug >= 2)
4572 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4573 return gdbarch->stack_align (sp);
4577 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4578 gdbarch_stack_align_ftype stack_align)
4580 gdbarch->stack_align = stack_align;
4584 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4586 gdb_assert (gdbarch != NULL);
4587 return gdbarch->frame_align != 0;
4591 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4593 gdb_assert (gdbarch != NULL);
4594 if (gdbarch->frame_align == 0)
4595 internal_error (__FILE__, __LINE__,
4596 "gdbarch: gdbarch_frame_align invalid");
4597 if (gdbarch_debug >= 2)
4598 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4599 return gdbarch->frame_align (gdbarch, address);
4603 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4604 gdbarch_frame_align_ftype frame_align)
4606 gdbarch->frame_align = frame_align;
4610 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4612 gdb_assert (gdbarch != NULL);
4613 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4614 if (gdbarch_debug >= 2)
4615 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4616 return gdbarch->extra_stack_alignment_needed;
4620 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4621 int extra_stack_alignment_needed)
4623 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4627 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4629 gdb_assert (gdbarch != NULL);
4630 return gdbarch->reg_struct_has_addr != 0;
4634 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4636 gdb_assert (gdbarch != NULL);
4637 if (gdbarch->reg_struct_has_addr == 0)
4638 internal_error (__FILE__, __LINE__,
4639 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4640 if (gdbarch_debug >= 2)
4641 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4642 return gdbarch->reg_struct_has_addr (gcc_p, type);
4646 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4647 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4649 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4653 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4655 gdb_assert (gdbarch != NULL);
4656 return gdbarch->save_dummy_frame_tos != 0;
4660 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4662 gdb_assert (gdbarch != NULL);
4663 if (gdbarch->save_dummy_frame_tos == 0)
4664 internal_error (__FILE__, __LINE__,
4665 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4666 if (gdbarch_debug >= 2)
4667 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4668 gdbarch->save_dummy_frame_tos (sp);
4672 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4673 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4675 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4679 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4681 gdb_assert (gdbarch != NULL);
4682 if (gdbarch_debug >= 2)
4683 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4684 return gdbarch->parm_boundary;
4688 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4691 gdbarch->parm_boundary = parm_boundary;
4694 const struct floatformat *
4695 gdbarch_float_format (struct gdbarch *gdbarch)
4697 gdb_assert (gdbarch != NULL);
4698 if (gdbarch_debug >= 2)
4699 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4700 return gdbarch->float_format;
4704 set_gdbarch_float_format (struct gdbarch *gdbarch,
4705 const struct floatformat * float_format)
4707 gdbarch->float_format = float_format;
4710 const struct floatformat *
4711 gdbarch_double_format (struct gdbarch *gdbarch)
4713 gdb_assert (gdbarch != NULL);
4714 if (gdbarch_debug >= 2)
4715 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4716 return gdbarch->double_format;
4720 set_gdbarch_double_format (struct gdbarch *gdbarch,
4721 const struct floatformat * double_format)
4723 gdbarch->double_format = double_format;
4726 const struct floatformat *
4727 gdbarch_long_double_format (struct gdbarch *gdbarch)
4729 gdb_assert (gdbarch != NULL);
4730 if (gdbarch_debug >= 2)
4731 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4732 return gdbarch->long_double_format;
4736 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4737 const struct floatformat * long_double_format)
4739 gdbarch->long_double_format = long_double_format;
4743 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4745 gdb_assert (gdbarch != NULL);
4746 if (gdbarch->convert_from_func_ptr_addr == 0)
4747 internal_error (__FILE__, __LINE__,
4748 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4749 if (gdbarch_debug >= 2)
4750 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4751 return gdbarch->convert_from_func_ptr_addr (addr);
4755 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4756 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4758 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4762 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4764 gdb_assert (gdbarch != NULL);
4765 if (gdbarch->addr_bits_remove == 0)
4766 internal_error (__FILE__, __LINE__,
4767 "gdbarch: gdbarch_addr_bits_remove invalid");
4768 if (gdbarch_debug >= 2)
4769 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4770 return gdbarch->addr_bits_remove (addr);
4774 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4775 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4777 gdbarch->addr_bits_remove = addr_bits_remove;
4781 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4783 gdb_assert (gdbarch != NULL);
4784 if (gdbarch->smash_text_address == 0)
4785 internal_error (__FILE__, __LINE__,
4786 "gdbarch: gdbarch_smash_text_address invalid");
4787 if (gdbarch_debug >= 2)
4788 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4789 return gdbarch->smash_text_address (addr);
4793 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4794 gdbarch_smash_text_address_ftype smash_text_address)
4796 gdbarch->smash_text_address = smash_text_address;
4800 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4802 gdb_assert (gdbarch != NULL);
4803 return gdbarch->software_single_step != 0;
4807 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4809 gdb_assert (gdbarch != NULL);
4810 if (gdbarch->software_single_step == 0)
4811 internal_error (__FILE__, __LINE__,
4812 "gdbarch: gdbarch_software_single_step invalid");
4813 if (gdbarch_debug >= 2)
4814 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4815 gdbarch->software_single_step (sig, insert_breakpoints_p);
4819 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4820 gdbarch_software_single_step_ftype software_single_step)
4822 gdbarch->software_single_step = software_single_step;
4826 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
4828 gdb_assert (gdbarch != NULL);
4829 if (gdbarch->print_insn == 0)
4830 internal_error (__FILE__, __LINE__,
4831 "gdbarch: gdbarch_print_insn invalid");
4832 if (gdbarch_debug >= 2)
4833 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4834 return gdbarch->print_insn (vma, info);
4838 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4839 gdbarch_print_insn_ftype print_insn)
4841 gdbarch->print_insn = print_insn;
4845 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4847 gdb_assert (gdbarch != NULL);
4848 if (gdbarch->skip_trampoline_code == 0)
4849 internal_error (__FILE__, __LINE__,
4850 "gdbarch: gdbarch_skip_trampoline_code invalid");
4851 if (gdbarch_debug >= 2)
4852 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4853 return gdbarch->skip_trampoline_code (pc);
4857 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4858 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4860 gdbarch->skip_trampoline_code = skip_trampoline_code;
4864 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4866 gdb_assert (gdbarch != NULL);
4867 if (gdbarch->in_solib_call_trampoline == 0)
4868 internal_error (__FILE__, __LINE__,
4869 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4870 if (gdbarch_debug >= 2)
4871 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4872 return gdbarch->in_solib_call_trampoline (pc, name);
4876 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4877 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4879 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4883 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4885 gdb_assert (gdbarch != NULL);
4886 if (gdbarch->in_solib_return_trampoline == 0)
4887 internal_error (__FILE__, __LINE__,
4888 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
4889 if (gdbarch_debug >= 2)
4890 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4891 return gdbarch->in_solib_return_trampoline (pc, name);
4895 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4896 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4898 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4902 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4904 gdb_assert (gdbarch != NULL);
4905 if (gdbarch->pc_in_sigtramp == 0)
4906 internal_error (__FILE__, __LINE__,
4907 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4908 if (gdbarch_debug >= 2)
4909 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
4910 return gdbarch->pc_in_sigtramp (pc, name);
4914 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
4915 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
4917 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
4921 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
4923 gdb_assert (gdbarch != NULL);
4924 return gdbarch->sigtramp_start != 0;
4928 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
4930 gdb_assert (gdbarch != NULL);
4931 if (gdbarch->sigtramp_start == 0)
4932 internal_error (__FILE__, __LINE__,
4933 "gdbarch: gdbarch_sigtramp_start invalid");
4934 if (gdbarch_debug >= 2)
4935 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
4936 return gdbarch->sigtramp_start (pc);
4940 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
4941 gdbarch_sigtramp_start_ftype sigtramp_start)
4943 gdbarch->sigtramp_start = sigtramp_start;
4947 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
4949 gdb_assert (gdbarch != NULL);
4950 return gdbarch->sigtramp_end != 0;
4954 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
4956 gdb_assert (gdbarch != NULL);
4957 if (gdbarch->sigtramp_end == 0)
4958 internal_error (__FILE__, __LINE__,
4959 "gdbarch: gdbarch_sigtramp_end invalid");
4960 if (gdbarch_debug >= 2)
4961 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
4962 return gdbarch->sigtramp_end (pc);
4966 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
4967 gdbarch_sigtramp_end_ftype sigtramp_end)
4969 gdbarch->sigtramp_end = sigtramp_end;
4973 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4975 gdb_assert (gdbarch != NULL);
4976 if (gdbarch->in_function_epilogue_p == 0)
4977 internal_error (__FILE__, __LINE__,
4978 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4979 if (gdbarch_debug >= 2)
4980 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4981 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4985 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4986 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4988 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4992 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4994 gdb_assert (gdbarch != NULL);
4995 if (gdbarch->construct_inferior_arguments == 0)
4996 internal_error (__FILE__, __LINE__,
4997 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4998 if (gdbarch_debug >= 2)
4999 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
5000 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
5004 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
5005 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
5007 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
5011 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
5013 gdb_assert (gdbarch != NULL);
5014 return gdbarch->dwarf2_build_frame_info != 0;
5018 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
5020 gdb_assert (gdbarch != NULL);
5021 if (gdbarch->dwarf2_build_frame_info == 0)
5022 internal_error (__FILE__, __LINE__,
5023 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
5024 if (gdbarch_debug >= 2)
5025 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
5026 gdbarch->dwarf2_build_frame_info (objfile);
5030 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
5031 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
5033 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
5037 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
5039 gdb_assert (gdbarch != NULL);
5040 if (gdbarch->elf_make_msymbol_special == 0)
5041 internal_error (__FILE__, __LINE__,
5042 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5043 if (gdbarch_debug >= 2)
5044 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5045 gdbarch->elf_make_msymbol_special (sym, msym);
5049 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5050 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5052 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5056 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5058 gdb_assert (gdbarch != NULL);
5059 if (gdbarch->coff_make_msymbol_special == 0)
5060 internal_error (__FILE__, __LINE__,
5061 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5062 if (gdbarch_debug >= 2)
5063 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5064 gdbarch->coff_make_msymbol_special (val, msym);
5068 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5069 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5071 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5075 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5077 gdb_assert (gdbarch != NULL);
5078 /* Skip verify of name_of_malloc, invalid_p == 0 */
5079 if (gdbarch_debug >= 2)
5080 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5081 return gdbarch->name_of_malloc;
5085 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5086 const char * name_of_malloc)
5088 gdbarch->name_of_malloc = name_of_malloc;
5092 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5094 gdb_assert (gdbarch != NULL);
5095 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5096 if (gdbarch_debug >= 2)
5097 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5098 return gdbarch->cannot_step_breakpoint;
5102 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5103 int cannot_step_breakpoint)
5105 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5109 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5111 gdb_assert (gdbarch != NULL);
5112 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5113 if (gdbarch_debug >= 2)
5114 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5115 return gdbarch->have_nonsteppable_watchpoint;
5119 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5120 int have_nonsteppable_watchpoint)
5122 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5126 gdbarch_address_class_type_flags_p (struct gdbarch *gdbarch)
5128 gdb_assert (gdbarch != NULL);
5129 return gdbarch->address_class_type_flags != 0;
5133 gdbarch_address_class_type_flags (struct gdbarch *gdbarch, int byte_size, int dwarf2_addr_class)
5135 gdb_assert (gdbarch != NULL);
5136 if (gdbarch->address_class_type_flags == 0)
5137 internal_error (__FILE__, __LINE__,
5138 "gdbarch: gdbarch_address_class_type_flags invalid");
5139 if (gdbarch_debug >= 2)
5140 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags called\n");
5141 return gdbarch->address_class_type_flags (byte_size, dwarf2_addr_class);
5145 set_gdbarch_address_class_type_flags (struct gdbarch *gdbarch,
5146 gdbarch_address_class_type_flags_ftype address_class_type_flags)
5148 gdbarch->address_class_type_flags = address_class_type_flags;
5152 gdbarch_address_class_type_flags_to_name_p (struct gdbarch *gdbarch)
5154 gdb_assert (gdbarch != NULL);
5155 return gdbarch->address_class_type_flags_to_name != 0;
5159 gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
5161 gdb_assert (gdbarch != NULL);
5162 if (gdbarch->address_class_type_flags_to_name == 0)
5163 internal_error (__FILE__, __LINE__,
5164 "gdbarch: gdbarch_address_class_type_flags_to_name invalid");
5165 if (gdbarch_debug >= 2)
5166 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_type_flags_to_name called\n");
5167 return gdbarch->address_class_type_flags_to_name (type_flags);
5171 set_gdbarch_address_class_type_flags_to_name (struct gdbarch *gdbarch,
5172 gdbarch_address_class_type_flags_to_name_ftype address_class_type_flags_to_name)
5174 gdbarch->address_class_type_flags_to_name = address_class_type_flags_to_name;
5178 gdbarch_address_class_name_to_type_flags_p (struct gdbarch *gdbarch)
5180 gdb_assert (gdbarch != NULL);
5181 return gdbarch->address_class_name_to_type_flags != 0;
5185 gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch, char *name, int *type_flags_ptr)
5187 gdb_assert (gdbarch != NULL);
5188 if (gdbarch->address_class_name_to_type_flags == 0)
5189 internal_error (__FILE__, __LINE__,
5190 "gdbarch: gdbarch_address_class_name_to_type_flags invalid");
5191 if (gdbarch_debug >= 2)
5192 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_class_name_to_type_flags called\n");
5193 return gdbarch->address_class_name_to_type_flags (name, type_flags_ptr);
5197 set_gdbarch_address_class_name_to_type_flags (struct gdbarch *gdbarch,
5198 gdbarch_address_class_name_to_type_flags_ftype address_class_name_to_type_flags)
5200 gdbarch->address_class_name_to_type_flags = address_class_name_to_type_flags;
5204 /* Keep a registry of per-architecture data-pointers required by GDB
5211 gdbarch_data_init_ftype *init;
5212 gdbarch_data_free_ftype *free;
5215 struct gdbarch_data_registration
5217 struct gdbarch_data *data;
5218 struct gdbarch_data_registration *next;
5221 struct gdbarch_data_registry
5224 struct gdbarch_data_registration *registrations;
5227 struct gdbarch_data_registry gdbarch_data_registry =
5232 struct gdbarch_data *
5233 register_gdbarch_data (gdbarch_data_init_ftype *init,
5234 gdbarch_data_free_ftype *free)
5236 struct gdbarch_data_registration **curr;
5237 /* Append the new registraration. */
5238 for (curr = &gdbarch_data_registry.registrations;
5240 curr = &(*curr)->next);
5241 (*curr) = XMALLOC (struct gdbarch_data_registration);
5242 (*curr)->next = NULL;
5243 (*curr)->data = XMALLOC (struct gdbarch_data);
5244 (*curr)->data->index = gdbarch_data_registry.nr++;
5245 (*curr)->data->init = init;
5246 (*curr)->data->init_p = 1;
5247 (*curr)->data->free = free;
5248 return (*curr)->data;
5252 /* Create/delete the gdbarch data vector. */
5255 alloc_gdbarch_data (struct gdbarch *gdbarch)
5257 gdb_assert (gdbarch->data == NULL);
5258 gdbarch->nr_data = gdbarch_data_registry.nr;
5259 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5263 free_gdbarch_data (struct gdbarch *gdbarch)
5265 struct gdbarch_data_registration *rego;
5266 gdb_assert (gdbarch->data != NULL);
5267 for (rego = gdbarch_data_registry.registrations;
5271 struct gdbarch_data *data = rego->data;
5272 gdb_assert (data->index < gdbarch->nr_data);
5273 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5275 data->free (gdbarch, gdbarch->data[data->index]);
5276 gdbarch->data[data->index] = NULL;
5279 xfree (gdbarch->data);
5280 gdbarch->data = NULL;
5284 /* Initialize the current value of the specified per-architecture
5288 set_gdbarch_data (struct gdbarch *gdbarch,
5289 struct gdbarch_data *data,
5292 gdb_assert (data->index < gdbarch->nr_data);
5293 if (gdbarch->data[data->index] != NULL)
5295 gdb_assert (data->free != NULL);
5296 data->free (gdbarch, gdbarch->data[data->index]);
5298 gdbarch->data[data->index] = pointer;
5301 /* Return the current value of the specified per-architecture
5305 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5307 gdb_assert (data->index < gdbarch->nr_data);
5308 /* The data-pointer isn't initialized, call init() to get a value but
5309 only if the architecture initializaiton has completed. Otherwise
5310 punt - hope that the caller knows what they are doing. */
5311 if (gdbarch->data[data->index] == NULL
5312 && gdbarch->initialized_p)
5314 /* Be careful to detect an initialization cycle. */
5315 gdb_assert (data->init_p);
5317 gdb_assert (data->init != NULL);
5318 gdbarch->data[data->index] = data->init (gdbarch);
5320 gdb_assert (gdbarch->data[data->index] != NULL);
5322 return gdbarch->data[data->index];
5327 /* Keep a registry of swapped data required by GDB modules. */
5332 struct gdbarch_swap_registration *source;
5333 struct gdbarch_swap *next;
5336 struct gdbarch_swap_registration
5339 unsigned long sizeof_data;
5340 gdbarch_swap_ftype *init;
5341 struct gdbarch_swap_registration *next;
5344 struct gdbarch_swap_registry
5347 struct gdbarch_swap_registration *registrations;
5350 struct gdbarch_swap_registry gdbarch_swap_registry =
5356 register_gdbarch_swap (void *data,
5357 unsigned long sizeof_data,
5358 gdbarch_swap_ftype *init)
5360 struct gdbarch_swap_registration **rego;
5361 for (rego = &gdbarch_swap_registry.registrations;
5363 rego = &(*rego)->next);
5364 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5365 (*rego)->next = NULL;
5366 (*rego)->init = init;
5367 (*rego)->data = data;
5368 (*rego)->sizeof_data = sizeof_data;
5372 clear_gdbarch_swap (struct gdbarch *gdbarch)
5374 struct gdbarch_swap *curr;
5375 for (curr = gdbarch->swap;
5379 memset (curr->source->data, 0, curr->source->sizeof_data);
5384 init_gdbarch_swap (struct gdbarch *gdbarch)
5386 struct gdbarch_swap_registration *rego;
5387 struct gdbarch_swap **curr = &gdbarch->swap;
5388 for (rego = gdbarch_swap_registry.registrations;
5392 if (rego->data != NULL)
5394 (*curr) = XMALLOC (struct gdbarch_swap);
5395 (*curr)->source = rego;
5396 (*curr)->swap = xmalloc (rego->sizeof_data);
5397 (*curr)->next = NULL;
5398 curr = &(*curr)->next;
5400 if (rego->init != NULL)
5406 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5408 struct gdbarch_swap *curr;
5409 for (curr = gdbarch->swap;
5412 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5416 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5418 struct gdbarch_swap *curr;
5419 for (curr = gdbarch->swap;
5422 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5426 /* Keep a registry of the architectures known by GDB. */
5428 struct gdbarch_registration
5430 enum bfd_architecture bfd_architecture;
5431 gdbarch_init_ftype *init;
5432 gdbarch_dump_tdep_ftype *dump_tdep;
5433 struct gdbarch_list *arches;
5434 struct gdbarch_registration *next;
5437 static struct gdbarch_registration *gdbarch_registry = NULL;
5440 append_name (const char ***buf, int *nr, const char *name)
5442 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5448 gdbarch_printable_names (void)
5452 /* Accumulate a list of names based on the registed list of
5454 enum bfd_architecture a;
5456 const char **arches = NULL;
5457 struct gdbarch_registration *rego;
5458 for (rego = gdbarch_registry;
5462 const struct bfd_arch_info *ap;
5463 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5465 internal_error (__FILE__, __LINE__,
5466 "gdbarch_architecture_names: multi-arch unknown");
5469 append_name (&arches, &nr_arches, ap->printable_name);
5474 append_name (&arches, &nr_arches, NULL);
5478 /* Just return all the architectures that BFD knows. Assume that
5479 the legacy architecture framework supports them. */
5480 return bfd_arch_list ();
5485 gdbarch_register (enum bfd_architecture bfd_architecture,
5486 gdbarch_init_ftype *init,
5487 gdbarch_dump_tdep_ftype *dump_tdep)
5489 struct gdbarch_registration **curr;
5490 const struct bfd_arch_info *bfd_arch_info;
5491 /* Check that BFD recognizes this architecture */
5492 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5493 if (bfd_arch_info == NULL)
5495 internal_error (__FILE__, __LINE__,
5496 "gdbarch: Attempt to register unknown architecture (%d)",
5499 /* Check that we haven't seen this architecture before */
5500 for (curr = &gdbarch_registry;
5502 curr = &(*curr)->next)
5504 if (bfd_architecture == (*curr)->bfd_architecture)
5505 internal_error (__FILE__, __LINE__,
5506 "gdbarch: Duplicate registraration of architecture (%s)",
5507 bfd_arch_info->printable_name);
5511 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5512 bfd_arch_info->printable_name,
5515 (*curr) = XMALLOC (struct gdbarch_registration);
5516 (*curr)->bfd_architecture = bfd_architecture;
5517 (*curr)->init = init;
5518 (*curr)->dump_tdep = dump_tdep;
5519 (*curr)->arches = NULL;
5520 (*curr)->next = NULL;
5521 /* When non- multi-arch, install whatever target dump routine we've
5522 been provided - hopefully that routine has been written correctly
5523 and works regardless of multi-arch. */
5524 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5525 && startup_gdbarch.dump_tdep == NULL)
5526 startup_gdbarch.dump_tdep = dump_tdep;
5530 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5531 gdbarch_init_ftype *init)
5533 gdbarch_register (bfd_architecture, init, NULL);
5537 /* Look for an architecture using gdbarch_info. Base search on only
5538 BFD_ARCH_INFO and BYTE_ORDER. */
5540 struct gdbarch_list *
5541 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5542 const struct gdbarch_info *info)
5544 for (; arches != NULL; arches = arches->next)
5546 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5548 if (info->byte_order != arches->gdbarch->byte_order)
5556 /* Update the current architecture. Return ZERO if the update request
5560 gdbarch_update_p (struct gdbarch_info info)
5562 struct gdbarch *new_gdbarch;
5563 struct gdbarch *old_gdbarch;
5564 struct gdbarch_registration *rego;
5566 /* Fill in missing parts of the INFO struct using a number of
5567 sources: ``set ...''; INFOabfd supplied; existing target. */
5569 /* ``(gdb) set architecture ...'' */
5570 if (info.bfd_arch_info == NULL
5571 && !TARGET_ARCHITECTURE_AUTO)
5572 info.bfd_arch_info = TARGET_ARCHITECTURE;
5573 if (info.bfd_arch_info == NULL
5574 && info.abfd != NULL
5575 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5576 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5577 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5578 if (info.bfd_arch_info == NULL)
5579 info.bfd_arch_info = TARGET_ARCHITECTURE;
5581 /* ``(gdb) set byte-order ...'' */
5582 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5583 && !TARGET_BYTE_ORDER_AUTO)
5584 info.byte_order = TARGET_BYTE_ORDER;
5585 /* From the INFO struct. */
5586 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5587 && info.abfd != NULL)
5588 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5589 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5590 : BFD_ENDIAN_UNKNOWN);
5591 /* From the current target. */
5592 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5593 info.byte_order = TARGET_BYTE_ORDER;
5595 /* Must have found some sort of architecture. */
5596 gdb_assert (info.bfd_arch_info != NULL);
5600 fprintf_unfiltered (gdb_stdlog,
5601 "gdbarch_update: info.bfd_arch_info %s\n",
5602 (info.bfd_arch_info != NULL
5603 ? info.bfd_arch_info->printable_name
5605 fprintf_unfiltered (gdb_stdlog,
5606 "gdbarch_update: info.byte_order %d (%s)\n",
5608 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5609 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5611 fprintf_unfiltered (gdb_stdlog,
5612 "gdbarch_update: info.abfd 0x%lx\n",
5614 fprintf_unfiltered (gdb_stdlog,
5615 "gdbarch_update: info.tdep_info 0x%lx\n",
5616 (long) info.tdep_info);
5619 /* Find the target that knows about this architecture. */
5620 for (rego = gdbarch_registry;
5623 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5628 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
5632 /* Swap the data belonging to the old target out setting the
5633 installed data to zero. This stops the ->init() function trying
5634 to refer to the previous architecture's global data structures. */
5635 swapout_gdbarch_swap (current_gdbarch);
5636 clear_gdbarch_swap (current_gdbarch);
5638 /* Save the previously selected architecture, setting the global to
5639 NULL. This stops ->init() trying to use the previous
5640 architecture's configuration. The previous architecture may not
5641 even be of the same architecture family. The most recent
5642 architecture of the same family is found at the head of the
5643 rego->arches list. */
5644 old_gdbarch = current_gdbarch;
5645 current_gdbarch = NULL;
5647 /* Ask the target for a replacement architecture. */
5648 new_gdbarch = rego->init (info, rego->arches);
5650 /* Did the target like it? No. Reject the change and revert to the
5651 old architecture. */
5652 if (new_gdbarch == NULL)
5655 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
5656 swapin_gdbarch_swap (old_gdbarch);
5657 current_gdbarch = old_gdbarch;
5661 /* Did the architecture change? No. Oops, put the old architecture
5663 if (old_gdbarch == new_gdbarch)
5666 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5668 new_gdbarch->bfd_arch_info->printable_name);
5669 swapin_gdbarch_swap (old_gdbarch);
5670 current_gdbarch = old_gdbarch;
5674 /* Is this a pre-existing architecture? Yes. Move it to the front
5675 of the list of architectures (keeping the list sorted Most
5676 Recently Used) and then copy it in. */
5678 struct gdbarch_list **list;
5679 for (list = ®o->arches;
5681 list = &(*list)->next)
5683 if ((*list)->gdbarch == new_gdbarch)
5685 struct gdbarch_list *this;
5687 fprintf_unfiltered (gdb_stdlog,
5688 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5690 new_gdbarch->bfd_arch_info->printable_name);
5693 (*list) = this->next;
5694 /* Insert in the front. */
5695 this->next = rego->arches;
5696 rego->arches = this;
5697 /* Copy the new architecture in. */
5698 current_gdbarch = new_gdbarch;
5699 swapin_gdbarch_swap (new_gdbarch);
5700 architecture_changed_event ();
5706 /* Prepend this new architecture to the architecture list (keep the
5707 list sorted Most Recently Used). */
5709 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5710 this->next = rego->arches;
5711 this->gdbarch = new_gdbarch;
5712 rego->arches = this;
5715 /* Switch to this new architecture marking it initialized. */
5716 current_gdbarch = new_gdbarch;
5717 current_gdbarch->initialized_p = 1;
5720 fprintf_unfiltered (gdb_stdlog,
5721 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5723 new_gdbarch->bfd_arch_info->printable_name);
5726 /* Check that the newly installed architecture is valid. Plug in
5727 any post init values. */
5728 new_gdbarch->dump_tdep = rego->dump_tdep;
5729 verify_gdbarch (new_gdbarch);
5731 /* Initialize the per-architecture memory (swap) areas.
5732 CURRENT_GDBARCH must be update before these modules are
5734 init_gdbarch_swap (new_gdbarch);
5736 /* Initialize the per-architecture data. CURRENT_GDBARCH
5737 must be updated before these modules are called. */
5738 architecture_changed_event ();
5741 gdbarch_dump (current_gdbarch, gdb_stdlog);
5749 /* Pointer to the target-dependent disassembly function. */
5750 int (*tm_print_insn) (bfd_vma, disassemble_info *);
5751 disassemble_info tm_print_insn_info;
5754 extern void _initialize_gdbarch (void);
5757 _initialize_gdbarch (void)
5759 struct cmd_list_element *c;
5761 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
5762 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
5763 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
5764 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
5765 tm_print_insn_info.print_address_func = dis_asm_print_address;
5767 add_show_from_set (add_set_cmd ("arch",
5770 (char *)&gdbarch_debug,
5771 "Set architecture debugging.\n\
5772 When non-zero, architecture debugging is enabled.", &setdebuglist),
5774 c = add_set_cmd ("archdebug",
5777 (char *)&gdbarch_debug,
5778 "Set architecture debugging.\n\
5779 When non-zero, architecture debugging is enabled.", &setlist);
5781 deprecate_cmd (c, "set debug arch");
5782 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");