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-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch *gdbarch);
70 static void alloc_gdbarch_data (struct gdbarch *);
71 static void init_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 /* basic architectural information */
91 const struct bfd_arch_info * bfd_arch_info;
94 /* target specific vector. */
95 struct gdbarch_tdep *tdep;
96 gdbarch_dump_tdep_ftype *dump_tdep;
98 /* per-architecture data-pointers */
102 /* per-architecture swap-regions */
103 struct gdbarch_swap *swap;
105 /* Multi-arch values.
107 When extending this structure you must:
111 Declare set/get functions and define the corresponding
114 gdbarch_alloc(): If zero/NULL is not a suitable default,
115 initialize the new field.
117 verify_gdbarch(): Confirm that the target updated the field
120 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
123 ``startup_gdbarch()'': Append an initial value to the static
124 variable (base values on the host's c-type system).
126 get_gdbarch(): Implement the set/get functions (probably using
127 the macro's as shortcuts).
142 gdbarch_read_pc_ftype *read_pc;
143 gdbarch_write_pc_ftype *write_pc;
144 gdbarch_read_fp_ftype *read_fp;
145 gdbarch_read_sp_ftype *read_sp;
146 gdbarch_write_sp_ftype *write_sp;
147 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
148 gdbarch_register_read_ftype *register_read;
149 gdbarch_register_write_ftype *register_write;
158 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
159 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
160 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
161 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
162 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
163 gdbarch_register_name_ftype *register_name;
166 gdbarch_register_byte_ftype *register_byte;
167 gdbarch_register_raw_size_ftype *register_raw_size;
168 int max_register_raw_size;
169 gdbarch_register_virtual_size_ftype *register_virtual_size;
170 int max_register_virtual_size;
171 gdbarch_register_virtual_type_ftype *register_virtual_type;
172 gdbarch_do_registers_info_ftype *do_registers_info;
173 gdbarch_print_float_info_ftype *print_float_info;
174 gdbarch_register_sim_regno_ftype *register_sim_regno;
175 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
176 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
177 gdbarch_cannot_store_register_ftype *cannot_store_register;
178 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
179 int use_generic_dummy_frames;
180 int call_dummy_location;
181 gdbarch_call_dummy_address_ftype *call_dummy_address;
182 CORE_ADDR call_dummy_start_offset;
183 CORE_ADDR call_dummy_breakpoint_offset;
184 int call_dummy_breakpoint_offset_p;
185 int call_dummy_length;
186 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
188 LONGEST * call_dummy_words;
189 int sizeof_call_dummy_words;
190 int call_dummy_stack_adjust_p;
191 int call_dummy_stack_adjust;
192 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
193 gdbarch_init_frame_pc_first_ftype *init_frame_pc_first;
194 gdbarch_init_frame_pc_ftype *init_frame_pc;
195 int believe_pcc_promotion;
196 int believe_pcc_promotion_type;
197 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
198 gdbarch_get_saved_register_ftype *get_saved_register;
199 gdbarch_register_convertible_ftype *register_convertible;
200 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
201 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
202 gdbarch_convert_register_p_ftype *convert_register_p;
203 gdbarch_register_to_value_ftype *register_to_value;
204 gdbarch_value_to_register_ftype *value_to_register;
205 gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
206 gdbarch_store_pseudo_register_ftype *store_pseudo_register;
207 gdbarch_pointer_to_address_ftype *pointer_to_address;
208 gdbarch_address_to_pointer_ftype *address_to_pointer;
209 gdbarch_integer_to_address_ftype *integer_to_address;
210 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
211 gdbarch_extract_return_value_ftype *extract_return_value;
212 gdbarch_push_arguments_ftype *push_arguments;
213 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
214 gdbarch_push_return_address_ftype *push_return_address;
215 gdbarch_pop_frame_ftype *pop_frame;
216 gdbarch_store_struct_return_ftype *store_struct_return;
217 gdbarch_store_return_value_ftype *store_return_value;
218 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
219 gdbarch_use_struct_convention_ftype *use_struct_convention;
220 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
221 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
222 gdbarch_skip_prologue_ftype *skip_prologue;
223 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
224 gdbarch_inner_than_ftype *inner_than;
225 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
226 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
227 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
228 CORE_ADDR decr_pc_after_break;
229 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
230 CORE_ADDR function_start_offset;
231 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
232 CORE_ADDR frame_args_skip;
233 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
234 gdbarch_frame_chain_ftype *frame_chain;
235 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
236 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
237 gdbarch_frame_args_address_ftype *frame_args_address;
238 gdbarch_frame_locals_address_ftype *frame_locals_address;
239 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
240 gdbarch_frame_num_args_ftype *frame_num_args;
241 gdbarch_stack_align_ftype *stack_align;
242 int extra_stack_alignment_needed;
243 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
244 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
246 const struct floatformat * float_format;
247 const struct floatformat * double_format;
248 const struct floatformat * long_double_format;
249 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
250 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
251 gdbarch_smash_text_address_ftype *smash_text_address;
252 gdbarch_software_single_step_ftype *software_single_step;
253 gdbarch_print_insn_ftype *print_insn;
254 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
255 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
256 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
257 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
258 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
259 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
260 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
261 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
265 /* The default architecture uses host values (for want of a better
268 extern const struct bfd_arch_info bfd_default_arch_struct;
270 struct gdbarch startup_gdbarch =
272 /* basic architecture information */
273 &bfd_default_arch_struct,
275 /* target specific vector and its dump routine */
277 /*per-architecture data-pointers and swap regions */
279 /* Multi-arch values */
283 8 * sizeof (LONGEST),
286 8 * sizeof (long double),
316 generic_register_size,
318 generic_register_size,
347 generic_get_saved_register,
406 generic_in_function_epilogue_p,
407 construct_inferior_arguments,
411 /* startup_gdbarch() */
414 struct gdbarch *current_gdbarch = &startup_gdbarch;
416 /* Do any initialization needed for a non-multiarch configuration
417 after the _initialize_MODULE functions have been run. */
419 initialize_non_multiarch ()
421 alloc_gdbarch_data (&startup_gdbarch);
422 /* Ensure that all swap areas are zeroed so that they again think
423 they are starting from scratch. */
424 clear_gdbarch_swap (&startup_gdbarch);
425 init_gdbarch_swap (&startup_gdbarch);
426 init_gdbarch_data (&startup_gdbarch);
430 /* Create a new ``struct gdbarch'' based on information provided by
431 ``struct gdbarch_info''. */
434 gdbarch_alloc (const struct gdbarch_info *info,
435 struct gdbarch_tdep *tdep)
437 /* NOTE: The new architecture variable is named ``current_gdbarch''
438 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
439 the current local architecture and not the previous global
440 architecture. This ensures that the new architectures initial
441 values are not influenced by the previous architecture. Once
442 everything is parameterised with gdbarch, this will go away. */
443 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
444 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
446 alloc_gdbarch_data (current_gdbarch);
448 current_gdbarch->tdep = tdep;
450 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
451 current_gdbarch->byte_order = info->byte_order;
453 /* Force the explicit initialization of these. */
454 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
455 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
456 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
457 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
458 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
459 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
460 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
461 current_gdbarch->ptr_bit = TARGET_INT_BIT;
462 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
463 current_gdbarch->char_signed = -1;
464 current_gdbarch->read_pc = generic_target_read_pc;
465 current_gdbarch->write_pc = generic_target_write_pc;
466 current_gdbarch->read_fp = generic_target_read_fp;
467 current_gdbarch->read_sp = generic_target_read_sp;
468 current_gdbarch->write_sp = generic_target_write_sp;
469 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
470 current_gdbarch->num_regs = -1;
471 current_gdbarch->sp_regnum = -1;
472 current_gdbarch->fp_regnum = -1;
473 current_gdbarch->pc_regnum = -1;
474 current_gdbarch->ps_regnum = -1;
475 current_gdbarch->fp0_regnum = -1;
476 current_gdbarch->npc_regnum = -1;
477 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
478 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
479 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
480 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
481 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
482 current_gdbarch->register_name = legacy_register_name;
483 current_gdbarch->register_size = -1;
484 current_gdbarch->register_bytes = -1;
485 current_gdbarch->register_raw_size = generic_register_size;
486 current_gdbarch->max_register_raw_size = -1;
487 current_gdbarch->register_virtual_size = generic_register_size;
488 current_gdbarch->max_register_virtual_size = -1;
489 current_gdbarch->do_registers_info = do_registers_info;
490 current_gdbarch->print_float_info = default_print_float_info;
491 current_gdbarch->register_sim_regno = default_register_sim_regno;
492 current_gdbarch->cannot_fetch_register = cannot_register_not;
493 current_gdbarch->cannot_store_register = cannot_register_not;
494 current_gdbarch->use_generic_dummy_frames = -1;
495 current_gdbarch->call_dummy_start_offset = -1;
496 current_gdbarch->call_dummy_breakpoint_offset = -1;
497 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
498 current_gdbarch->call_dummy_length = -1;
499 current_gdbarch->call_dummy_p = -1;
500 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
501 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
502 current_gdbarch->call_dummy_stack_adjust_p = -1;
503 current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
504 current_gdbarch->init_frame_pc = init_frame_pc_default;
505 current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
506 current_gdbarch->register_convertible = generic_register_convertible_not;
507 current_gdbarch->convert_register_p = legacy_convert_register_p;
508 current_gdbarch->register_to_value = legacy_register_to_value;
509 current_gdbarch->value_to_register = legacy_value_to_register;
510 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
511 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
512 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
513 current_gdbarch->push_arguments = default_push_arguments;
514 current_gdbarch->use_struct_convention = generic_use_struct_convention;
515 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
516 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
517 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
518 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
519 current_gdbarch->decr_pc_after_break = -1;
520 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
521 current_gdbarch->function_start_offset = -1;
522 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
523 current_gdbarch->frame_args_skip = -1;
524 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
525 current_gdbarch->frame_chain_valid = func_frame_chain_valid;
526 current_gdbarch->extra_stack_alignment_needed = 1;
527 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
528 current_gdbarch->addr_bits_remove = core_addr_identity;
529 current_gdbarch->smash_text_address = core_addr_identity;
530 current_gdbarch->print_insn = legacy_print_insn;
531 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
532 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
533 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
534 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
535 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
536 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
537 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
538 /* gdbarch_alloc() */
540 return current_gdbarch;
544 /* Free a gdbarch struct. This should never happen in normal
545 operation --- once you've created a gdbarch, you keep it around.
546 However, if an architecture's init function encounters an error
547 building the structure, it may need to clean up a partially
548 constructed gdbarch. */
551 gdbarch_free (struct gdbarch *arch)
553 gdb_assert (arch != NULL);
554 free_gdbarch_data (arch);
559 /* Ensure that all values in a GDBARCH are reasonable. */
562 verify_gdbarch (struct gdbarch *gdbarch)
565 struct cleanup *cleanups;
568 /* Only perform sanity checks on a multi-arch target. */
571 log = mem_fileopen ();
572 cleanups = make_cleanup_ui_file_delete (log);
574 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
575 fprintf_unfiltered (log, "\n\tbyte-order");
576 if (gdbarch->bfd_arch_info == NULL)
577 fprintf_unfiltered (log, "\n\tbfd_arch_info");
578 /* Check those that need to be defined for the given multi-arch level. */
579 /* Skip verify of short_bit, invalid_p == 0 */
580 /* Skip verify of int_bit, invalid_p == 0 */
581 /* Skip verify of long_bit, invalid_p == 0 */
582 /* Skip verify of long_long_bit, invalid_p == 0 */
583 /* Skip verify of float_bit, invalid_p == 0 */
584 /* Skip verify of double_bit, invalid_p == 0 */
585 /* Skip verify of long_double_bit, invalid_p == 0 */
586 /* Skip verify of ptr_bit, invalid_p == 0 */
587 if (gdbarch->addr_bit == 0)
588 gdbarch->addr_bit = TARGET_PTR_BIT;
589 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
590 if (gdbarch->char_signed == -1)
591 gdbarch->char_signed = 1;
592 /* Skip verify of read_pc, invalid_p == 0 */
593 /* Skip verify of write_pc, invalid_p == 0 */
594 /* Skip verify of read_fp, invalid_p == 0 */
595 /* Skip verify of read_sp, invalid_p == 0 */
596 /* Skip verify of write_sp, invalid_p == 0 */
597 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
598 /* Skip verify of register_read, has predicate */
599 /* Skip verify of register_write, has predicate */
600 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
601 && (gdbarch->num_regs == -1))
602 fprintf_unfiltered (log, "\n\tnum_regs");
603 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
604 /* Skip verify of sp_regnum, invalid_p == 0 */
605 /* Skip verify of fp_regnum, invalid_p == 0 */
606 /* Skip verify of pc_regnum, invalid_p == 0 */
607 /* Skip verify of ps_regnum, invalid_p == 0 */
608 /* Skip verify of fp0_regnum, invalid_p == 0 */
609 /* Skip verify of npc_regnum, invalid_p == 0 */
610 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
611 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
612 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
613 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
614 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
615 /* Skip verify of register_name, invalid_p == 0 */
616 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
617 && (gdbarch->register_size == -1))
618 fprintf_unfiltered (log, "\n\tregister_size");
619 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
620 && (gdbarch->register_bytes == -1))
621 fprintf_unfiltered (log, "\n\tregister_bytes");
622 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
623 && (gdbarch->register_byte == 0))
624 fprintf_unfiltered (log, "\n\tregister_byte");
625 /* Skip verify of register_raw_size, invalid_p == 0 */
626 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
627 && (gdbarch->max_register_raw_size == -1))
628 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
629 /* Skip verify of register_virtual_size, invalid_p == 0 */
630 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
631 && (gdbarch->max_register_virtual_size == -1))
632 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
633 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
634 && (gdbarch->register_virtual_type == 0))
635 fprintf_unfiltered (log, "\n\tregister_virtual_type");
636 /* Skip verify of do_registers_info, invalid_p == 0 */
637 /* Skip verify of print_float_info, invalid_p == 0 */
638 /* Skip verify of register_sim_regno, invalid_p == 0 */
639 /* Skip verify of register_bytes_ok, has predicate */
640 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
641 /* Skip verify of cannot_store_register, invalid_p == 0 */
642 /* Skip verify of get_longjmp_target, has predicate */
643 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
644 && (gdbarch->use_generic_dummy_frames == -1))
645 fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames");
646 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
647 && (gdbarch->call_dummy_location == 0))
648 fprintf_unfiltered (log, "\n\tcall_dummy_location");
649 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
650 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
651 fprintf_unfiltered (log, "\n\tcall_dummy_address");
652 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
653 && (gdbarch->call_dummy_start_offset == -1))
654 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
655 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
656 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
657 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
658 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
659 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
660 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
661 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
662 && (gdbarch->call_dummy_length == -1))
663 fprintf_unfiltered (log, "\n\tcall_dummy_length");
664 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
665 && (gdbarch->pc_in_call_dummy == 0))
666 fprintf_unfiltered (log, "\n\tpc_in_call_dummy");
667 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
668 && (gdbarch->call_dummy_p == -1))
669 fprintf_unfiltered (log, "\n\tcall_dummy_p");
670 /* Skip verify of call_dummy_words, invalid_p == 0 */
671 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
672 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
673 && (gdbarch->call_dummy_stack_adjust_p == -1))
674 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
675 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
676 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
677 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
678 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
679 && (gdbarch->fix_call_dummy == 0))
680 fprintf_unfiltered (log, "\n\tfix_call_dummy");
681 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
682 /* Skip verify of init_frame_pc, invalid_p == 0 */
683 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
684 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
685 && (gdbarch->get_saved_register == 0))
686 fprintf_unfiltered (log, "\n\tget_saved_register");
687 /* Skip verify of register_convertible, invalid_p == 0 */
688 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
689 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
690 /* Skip verify of convert_register_p, invalid_p == 0 */
691 /* Skip verify of register_to_value, invalid_p == 0 */
692 /* Skip verify of value_to_register, invalid_p == 0 */
693 /* Skip verify of fetch_pseudo_register, has predicate */
694 /* Skip verify of store_pseudo_register, has predicate */
695 /* Skip verify of pointer_to_address, invalid_p == 0 */
696 /* Skip verify of address_to_pointer, invalid_p == 0 */
697 /* Skip verify of integer_to_address, has predicate */
698 /* Skip verify of return_value_on_stack, invalid_p == 0 */
699 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
700 && (gdbarch->extract_return_value == 0))
701 fprintf_unfiltered (log, "\n\textract_return_value");
702 /* Skip verify of push_arguments, invalid_p == 0 */
703 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
704 && (gdbarch->push_dummy_frame == 0))
705 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
706 /* Skip verify of push_return_address, has predicate */
707 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
708 && (gdbarch->pop_frame == 0))
709 fprintf_unfiltered (log, "\n\tpop_frame");
710 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
711 && (gdbarch->store_struct_return == 0))
712 fprintf_unfiltered (log, "\n\tstore_struct_return");
713 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
714 && (gdbarch->store_return_value == 0))
715 fprintf_unfiltered (log, "\n\tstore_return_value");
716 /* Skip verify of extract_struct_value_address, has predicate */
717 /* Skip verify of use_struct_convention, invalid_p == 0 */
718 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
719 && (gdbarch->frame_init_saved_regs == 0))
720 fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
721 /* Skip verify of init_extra_frame_info, has predicate */
722 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
723 && (gdbarch->skip_prologue == 0))
724 fprintf_unfiltered (log, "\n\tskip_prologue");
725 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
726 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
727 && (gdbarch->inner_than == 0))
728 fprintf_unfiltered (log, "\n\tinner_than");
729 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
730 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
731 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
733 && (gdbarch->decr_pc_after_break == -1))
734 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
735 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
737 && (gdbarch->function_start_offset == -1))
738 fprintf_unfiltered (log, "\n\tfunction_start_offset");
739 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
741 && (gdbarch->frame_args_skip == -1))
742 fprintf_unfiltered (log, "\n\tframe_args_skip");
743 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
744 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
745 && (gdbarch->frame_chain == 0))
746 fprintf_unfiltered (log, "\n\tframe_chain");
747 /* Skip verify of frame_chain_valid, invalid_p == 0 */
748 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
749 && (gdbarch->frame_saved_pc == 0))
750 fprintf_unfiltered (log, "\n\tframe_saved_pc");
751 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
752 && (gdbarch->frame_args_address == 0))
753 fprintf_unfiltered (log, "\n\tframe_args_address");
754 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
755 && (gdbarch->frame_locals_address == 0))
756 fprintf_unfiltered (log, "\n\tframe_locals_address");
757 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
758 && (gdbarch->saved_pc_after_call == 0))
759 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
760 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
761 && (gdbarch->frame_num_args == 0))
762 fprintf_unfiltered (log, "\n\tframe_num_args");
763 /* Skip verify of stack_align, has predicate */
764 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
765 /* Skip verify of reg_struct_has_addr, has predicate */
766 /* Skip verify of save_dummy_frame_tos, has predicate */
767 if (gdbarch->float_format == 0)
768 gdbarch->float_format = default_float_format (gdbarch);
769 if (gdbarch->double_format == 0)
770 gdbarch->double_format = default_double_format (gdbarch);
771 if (gdbarch->long_double_format == 0)
772 gdbarch->long_double_format = default_double_format (gdbarch);
773 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
774 /* Skip verify of addr_bits_remove, invalid_p == 0 */
775 /* Skip verify of smash_text_address, invalid_p == 0 */
776 /* Skip verify of software_single_step, has predicate */
777 /* Skip verify of print_insn, invalid_p == 0 */
778 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
779 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
780 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
781 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
782 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
783 /* Skip verify of dwarf2_build_frame_info, has predicate */
784 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
785 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
786 buf = ui_file_xstrdup (log, &dummy);
787 make_cleanup (xfree, buf);
788 if (strlen (buf) > 0)
789 internal_error (__FILE__, __LINE__,
790 "verify_gdbarch: the following are invalid ...%s",
792 do_cleanups (cleanups);
796 /* Print out the details of the current architecture. */
798 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
799 just happens to match the global variable ``current_gdbarch''. That
800 way macros refering to that variable get the local and not the global
801 version - ulgh. Once everything is parameterised with gdbarch, this
805 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
807 fprintf_unfiltered (file,
808 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
811 fprintf_unfiltered (file,
812 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
813 (long) current_gdbarch->in_function_epilogue_p);
815 fprintf_unfiltered (file,
816 "gdbarch_dump: register_read = 0x%08lx\n",
817 (long) current_gdbarch->register_read);
819 fprintf_unfiltered (file,
820 "gdbarch_dump: register_write = 0x%08lx\n",
821 (long) current_gdbarch->register_write);
822 #ifdef ADDRESS_TO_POINTER
824 /* Macro might contain `[{}]' when not multi-arch */
825 fprintf_unfiltered (file,
826 "gdbarch_dump: %s # %s\n",
827 "ADDRESS_TO_POINTER(type, buf, addr)",
828 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
831 fprintf_unfiltered (file,
832 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
833 (long) current_gdbarch->address_to_pointer
834 /*ADDRESS_TO_POINTER ()*/);
836 #ifdef ADDR_BITS_REMOVE
837 fprintf_unfiltered (file,
838 "gdbarch_dump: %s # %s\n",
839 "ADDR_BITS_REMOVE(addr)",
840 XSTRING (ADDR_BITS_REMOVE (addr)));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
844 (long) current_gdbarch->addr_bits_remove
845 /*ADDR_BITS_REMOVE ()*/);
847 #ifdef BELIEVE_PCC_PROMOTION
848 fprintf_unfiltered (file,
849 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
850 XSTRING (BELIEVE_PCC_PROMOTION));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
853 BELIEVE_PCC_PROMOTION);
855 #ifdef BELIEVE_PCC_PROMOTION_TYPE
856 fprintf_unfiltered (file,
857 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
858 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
859 fprintf_unfiltered (file,
860 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
861 BELIEVE_PCC_PROMOTION_TYPE);
863 #ifdef BREAKPOINT_FROM_PC
864 fprintf_unfiltered (file,
865 "gdbarch_dump: %s # %s\n",
866 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
867 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
871 (long) current_gdbarch->breakpoint_from_pc
872 /*BREAKPOINT_FROM_PC ()*/);
874 #ifdef CALL_DUMMY_ADDRESS
875 fprintf_unfiltered (file,
876 "gdbarch_dump: %s # %s\n",
877 "CALL_DUMMY_ADDRESS()",
878 XSTRING (CALL_DUMMY_ADDRESS ()));
880 fprintf_unfiltered (file,
881 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
882 (long) current_gdbarch->call_dummy_address
883 /*CALL_DUMMY_ADDRESS ()*/);
885 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
886 fprintf_unfiltered (file,
887 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
888 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
889 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
890 fprintf_unfiltered (file,
891 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
892 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
894 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
895 fprintf_unfiltered (file,
896 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
897 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
900 CALL_DUMMY_BREAKPOINT_OFFSET_P);
902 #ifdef CALL_DUMMY_LENGTH
903 fprintf_unfiltered (file,
904 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
905 XSTRING (CALL_DUMMY_LENGTH));
906 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
907 fprintf_unfiltered (file,
908 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
911 #ifdef CALL_DUMMY_LOCATION
912 fprintf_unfiltered (file,
913 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
914 XSTRING (CALL_DUMMY_LOCATION));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
917 CALL_DUMMY_LOCATION);
920 fprintf_unfiltered (file,
921 "gdbarch_dump: CALL_DUMMY_P # %s\n",
922 XSTRING (CALL_DUMMY_P));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: CALL_DUMMY_P = %d\n",
927 #ifdef CALL_DUMMY_STACK_ADJUST
928 fprintf_unfiltered (file,
929 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
930 XSTRING (CALL_DUMMY_STACK_ADJUST));
931 if (CALL_DUMMY_STACK_ADJUST_P)
932 fprintf_unfiltered (file,
933 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
934 (long) CALL_DUMMY_STACK_ADJUST);
936 #ifdef CALL_DUMMY_STACK_ADJUST_P
937 fprintf_unfiltered (file,
938 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
939 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
940 fprintf_unfiltered (file,
941 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
942 (long) CALL_DUMMY_STACK_ADJUST_P);
944 #ifdef CALL_DUMMY_START_OFFSET
945 fprintf_unfiltered (file,
946 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
947 XSTRING (CALL_DUMMY_START_OFFSET));
948 fprintf_unfiltered (file,
949 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
950 (long) CALL_DUMMY_START_OFFSET);
952 #ifdef CALL_DUMMY_WORDS
953 fprintf_unfiltered (file,
954 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
955 XSTRING (CALL_DUMMY_WORDS));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
958 (long) CALL_DUMMY_WORDS);
960 #ifdef CANNOT_FETCH_REGISTER
961 fprintf_unfiltered (file,
962 "gdbarch_dump: %s # %s\n",
963 "CANNOT_FETCH_REGISTER(regnum)",
964 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
966 fprintf_unfiltered (file,
967 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
968 (long) current_gdbarch->cannot_fetch_register
969 /*CANNOT_FETCH_REGISTER ()*/);
971 #ifdef CANNOT_STORE_REGISTER
972 fprintf_unfiltered (file,
973 "gdbarch_dump: %s # %s\n",
974 "CANNOT_STORE_REGISTER(regnum)",
975 XSTRING (CANNOT_STORE_REGISTER (regnum)));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
979 (long) current_gdbarch->cannot_store_register
980 /*CANNOT_STORE_REGISTER ()*/);
982 #ifdef COERCE_FLOAT_TO_DOUBLE
983 fprintf_unfiltered (file,
984 "gdbarch_dump: %s # %s\n",
985 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
986 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
990 (long) current_gdbarch->coerce_float_to_double
991 /*COERCE_FLOAT_TO_DOUBLE ()*/);
993 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
995 /* Macro might contain `[{}]' when not multi-arch */
996 fprintf_unfiltered (file,
997 "gdbarch_dump: %s # %s\n",
998 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
999 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1004 (long) current_gdbarch->coff_make_msymbol_special
1005 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1008 fprintf_unfiltered (file,
1009 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1010 (long) current_gdbarch->construct_inferior_arguments);
1011 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: %s # %s\n",
1014 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1015 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1019 (long) current_gdbarch->convert_from_func_ptr_addr
1020 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1022 #ifdef CONVERT_REGISTER_P
1023 fprintf_unfiltered (file,
1024 "gdbarch_dump: %s # %s\n",
1025 "CONVERT_REGISTER_P(regnum)",
1026 XSTRING (CONVERT_REGISTER_P (regnum)));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1030 (long) current_gdbarch->convert_register_p
1031 /*CONVERT_REGISTER_P ()*/);
1033 #ifdef DECR_PC_AFTER_BREAK
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1036 XSTRING (DECR_PC_AFTER_BREAK));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1039 (long) DECR_PC_AFTER_BREAK);
1041 #ifdef DO_REGISTERS_INFO
1043 /* Macro might contain `[{}]' when not multi-arch */
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: %s # %s\n",
1046 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1047 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1052 (long) current_gdbarch->do_registers_info
1053 /*DO_REGISTERS_INFO ()*/);
1055 #ifdef DWARF2_BUILD_FRAME_INFO
1057 /* Macro might contain `[{}]' when not multi-arch */
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: %s # %s\n",
1060 "DWARF2_BUILD_FRAME_INFO(objfile)",
1061 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1064 fprintf_unfiltered (file,
1065 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1066 (long) current_gdbarch->dwarf2_build_frame_info
1067 /*DWARF2_BUILD_FRAME_INFO ()*/);
1069 #ifdef DWARF2_REG_TO_REGNUM
1070 fprintf_unfiltered (file,
1071 "gdbarch_dump: %s # %s\n",
1072 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1073 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1077 (long) current_gdbarch->dwarf2_reg_to_regnum
1078 /*DWARF2_REG_TO_REGNUM ()*/);
1080 #ifdef DWARF_REG_TO_REGNUM
1081 fprintf_unfiltered (file,
1082 "gdbarch_dump: %s # %s\n",
1083 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1084 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1086 fprintf_unfiltered (file,
1087 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1088 (long) current_gdbarch->dwarf_reg_to_regnum
1089 /*DWARF_REG_TO_REGNUM ()*/);
1091 #ifdef ECOFF_REG_TO_REGNUM
1092 fprintf_unfiltered (file,
1093 "gdbarch_dump: %s # %s\n",
1094 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1095 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1099 (long) current_gdbarch->ecoff_reg_to_regnum
1100 /*ECOFF_REG_TO_REGNUM ()*/);
1102 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1104 /* Macro might contain `[{}]' when not multi-arch */
1105 fprintf_unfiltered (file,
1106 "gdbarch_dump: %s # %s\n",
1107 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1108 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1113 (long) current_gdbarch->elf_make_msymbol_special
1114 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1116 #ifdef EXTRACT_RETURN_VALUE
1118 /* Macro might contain `[{}]' when not multi-arch */
1119 fprintf_unfiltered (file,
1120 "gdbarch_dump: %s # %s\n",
1121 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1122 XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1125 fprintf_unfiltered (file,
1126 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1127 (long) current_gdbarch->extract_return_value
1128 /*EXTRACT_RETURN_VALUE ()*/);
1130 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1131 fprintf_unfiltered (file,
1132 "gdbarch_dump: %s # %s\n",
1133 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1134 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1138 (long) current_gdbarch->extract_struct_value_address
1139 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1141 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1144 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1147 EXTRA_STACK_ALIGNMENT_NEEDED);
1149 #ifdef FETCH_PSEUDO_REGISTER
1151 /* Macro might contain `[{}]' when not multi-arch */
1152 fprintf_unfiltered (file,
1153 "gdbarch_dump: %s # %s\n",
1154 "FETCH_PSEUDO_REGISTER(regnum)",
1155 XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1160 (long) current_gdbarch->fetch_pseudo_register
1161 /*FETCH_PSEUDO_REGISTER ()*/);
1163 #ifdef FIX_CALL_DUMMY
1165 /* Macro might contain `[{}]' when not multi-arch */
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: %s # %s\n",
1168 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1169 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1174 (long) current_gdbarch->fix_call_dummy
1175 /*FIX_CALL_DUMMY ()*/);
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: FP0_REGNUM # %s\n",
1180 XSTRING (FP0_REGNUM));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: FP0_REGNUM = %d\n",
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: FP_REGNUM # %s\n",
1188 XSTRING (FP_REGNUM));
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: FP_REGNUM = %d\n",
1193 #ifdef FRAMELESS_FUNCTION_INVOCATION
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: %s # %s\n",
1196 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1197 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1201 (long) current_gdbarch->frameless_function_invocation
1202 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1204 #ifdef FRAME_ARGS_ADDRESS
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: %s # %s\n",
1207 "FRAME_ARGS_ADDRESS(fi)",
1208 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1212 (long) current_gdbarch->frame_args_address
1213 /*FRAME_ARGS_ADDRESS ()*/);
1215 #ifdef FRAME_ARGS_SKIP
1216 fprintf_unfiltered (file,
1217 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1218 XSTRING (FRAME_ARGS_SKIP));
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1221 (long) FRAME_ARGS_SKIP);
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: %s # %s\n",
1226 "FRAME_CHAIN(frame)",
1227 XSTRING (FRAME_CHAIN (frame)));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1231 (long) current_gdbarch->frame_chain
1232 /*FRAME_CHAIN ()*/);
1234 #ifdef FRAME_CHAIN_VALID
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: %s # %s\n",
1237 "FRAME_CHAIN_VALID(chain, thisframe)",
1238 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1242 (long) current_gdbarch->frame_chain_valid
1243 /*FRAME_CHAIN_VALID ()*/);
1245 #ifdef FRAME_INIT_SAVED_REGS
1247 /* Macro might contain `[{}]' when not multi-arch */
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: %s # %s\n",
1250 "FRAME_INIT_SAVED_REGS(frame)",
1251 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1256 (long) current_gdbarch->frame_init_saved_regs
1257 /*FRAME_INIT_SAVED_REGS ()*/);
1259 #ifdef FRAME_LOCALS_ADDRESS
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: %s # %s\n",
1262 "FRAME_LOCALS_ADDRESS(fi)",
1263 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1267 (long) current_gdbarch->frame_locals_address
1268 /*FRAME_LOCALS_ADDRESS ()*/);
1270 #ifdef FRAME_NUM_ARGS
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: %s # %s\n",
1273 "FRAME_NUM_ARGS(frame)",
1274 XSTRING (FRAME_NUM_ARGS (frame)));
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1278 (long) current_gdbarch->frame_num_args
1279 /*FRAME_NUM_ARGS ()*/);
1281 #ifdef FRAME_SAVED_PC
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: %s # %s\n",
1284 "FRAME_SAVED_PC(fi)",
1285 XSTRING (FRAME_SAVED_PC (fi)));
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1289 (long) current_gdbarch->frame_saved_pc
1290 /*FRAME_SAVED_PC ()*/);
1292 #ifdef FUNCTION_START_OFFSET
1293 fprintf_unfiltered (file,
1294 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1295 XSTRING (FUNCTION_START_OFFSET));
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1298 (long) FUNCTION_START_OFFSET);
1300 #ifdef GET_LONGJMP_TARGET
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: %s # %s\n",
1303 "GET_LONGJMP_TARGET(pc)",
1304 XSTRING (GET_LONGJMP_TARGET (pc)));
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1308 (long) current_gdbarch->get_longjmp_target
1309 /*GET_LONGJMP_TARGET ()*/);
1311 #ifdef GET_SAVED_REGISTER
1313 /* Macro might contain `[{}]' when not multi-arch */
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: %s # %s\n",
1316 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1317 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1320 fprintf_unfiltered (file,
1321 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1322 (long) current_gdbarch->get_saved_register
1323 /*GET_SAVED_REGISTER ()*/);
1325 #ifdef INIT_EXTRA_FRAME_INFO
1327 /* Macro might contain `[{}]' when not multi-arch */
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: %s # %s\n",
1330 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1331 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1336 (long) current_gdbarch->init_extra_frame_info
1337 /*INIT_EXTRA_FRAME_INFO ()*/);
1339 #ifdef INIT_FRAME_PC
1341 /* Macro might contain `[{}]' when not multi-arch */
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: %s # %s\n",
1344 "INIT_FRAME_PC(fromleaf, prev)",
1345 XSTRING (INIT_FRAME_PC (fromleaf, prev)));
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1350 (long) current_gdbarch->init_frame_pc
1351 /*INIT_FRAME_PC ()*/);
1353 #ifdef INIT_FRAME_PC_FIRST
1355 /* Macro might contain `[{}]' when not multi-arch */
1356 fprintf_unfiltered (file,
1357 "gdbarch_dump: %s # %s\n",
1358 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1359 XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev)));
1362 fprintf_unfiltered (file,
1363 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1364 (long) current_gdbarch->init_frame_pc_first
1365 /*INIT_FRAME_PC_FIRST ()*/);
1368 fprintf_unfiltered (file,
1369 "gdbarch_dump: %s # %s\n",
1370 "INNER_THAN(lhs, rhs)",
1371 XSTRING (INNER_THAN (lhs, rhs)));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1375 (long) current_gdbarch->inner_than
1378 #ifdef INTEGER_TO_ADDRESS
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: %s # %s\n",
1381 "INTEGER_TO_ADDRESS(type, buf)",
1382 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1386 (long) current_gdbarch->integer_to_address
1387 /*INTEGER_TO_ADDRESS ()*/);
1389 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: %s # %s\n",
1392 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1393 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1397 (long) current_gdbarch->in_solib_call_trampoline
1398 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1400 #ifdef MAX_REGISTER_RAW_SIZE
1401 fprintf_unfiltered (file,
1402 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1403 XSTRING (MAX_REGISTER_RAW_SIZE));
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1406 MAX_REGISTER_RAW_SIZE);
1408 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1411 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1414 MAX_REGISTER_VIRTUAL_SIZE);
1416 #ifdef MEMORY_INSERT_BREAKPOINT
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: %s # %s\n",
1419 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1420 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1424 (long) current_gdbarch->memory_insert_breakpoint
1425 /*MEMORY_INSERT_BREAKPOINT ()*/);
1427 #ifdef MEMORY_REMOVE_BREAKPOINT
1428 fprintf_unfiltered (file,
1429 "gdbarch_dump: %s # %s\n",
1430 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1431 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1435 (long) current_gdbarch->memory_remove_breakpoint
1436 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: NPC_REGNUM # %s\n",
1441 XSTRING (NPC_REGNUM));
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: NPC_REGNUM = %d\n",
1446 #ifdef NUM_PSEUDO_REGS
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1449 XSTRING (NUM_PSEUDO_REGS));
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1455 fprintf_unfiltered (file,
1456 "gdbarch_dump: NUM_REGS # %s\n",
1457 XSTRING (NUM_REGS));
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: NUM_REGS = %d\n",
1462 #ifdef PARM_BOUNDARY
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1465 XSTRING (PARM_BOUNDARY));
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1470 #ifdef PC_IN_CALL_DUMMY
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: %s # %s\n",
1473 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1474 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1478 (long) current_gdbarch->pc_in_call_dummy
1479 /*PC_IN_CALL_DUMMY ()*/);
1481 #ifdef PC_IN_SIGTRAMP
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: %s # %s\n",
1484 "PC_IN_SIGTRAMP(pc, name)",
1485 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1489 (long) current_gdbarch->pc_in_sigtramp
1490 /*PC_IN_SIGTRAMP ()*/);
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: PC_REGNUM # %s\n",
1495 XSTRING (PC_REGNUM));
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: PC_REGNUM = %d\n",
1500 #ifdef POINTER_TO_ADDRESS
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: %s # %s\n",
1503 "POINTER_TO_ADDRESS(type, buf)",
1504 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1508 (long) current_gdbarch->pointer_to_address
1509 /*POINTER_TO_ADDRESS ()*/);
1513 /* Macro might contain `[{}]' when not multi-arch */
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: %s # %s\n",
1517 XSTRING (POP_FRAME (-)));
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1522 (long) current_gdbarch->pop_frame
1525 #ifdef PREPARE_TO_PROCEED
1526 fprintf_unfiltered (file,
1527 "gdbarch_dump: %s # %s\n",
1528 "PREPARE_TO_PROCEED(select_it)",
1529 XSTRING (PREPARE_TO_PROCEED (select_it)));
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1533 (long) current_gdbarch->prepare_to_proceed
1534 /*PREPARE_TO_PROCEED ()*/);
1536 #ifdef PRINT_FLOAT_INFO
1538 /* Macro might contain `[{}]' when not multi-arch */
1539 fprintf_unfiltered (file,
1540 "gdbarch_dump: %s # %s\n",
1541 "PRINT_FLOAT_INFO()",
1542 XSTRING (PRINT_FLOAT_INFO ()));
1545 fprintf_unfiltered (file,
1546 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1547 (long) current_gdbarch->print_float_info
1548 /*PRINT_FLOAT_INFO ()*/);
1550 #ifdef PROLOGUE_FRAMELESS_P
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: %s # %s\n",
1553 "PROLOGUE_FRAMELESS_P(ip)",
1554 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1558 (long) current_gdbarch->prologue_frameless_p
1559 /*PROLOGUE_FRAMELESS_P ()*/);
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: PS_REGNUM # %s\n",
1564 XSTRING (PS_REGNUM));
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: PS_REGNUM = %d\n",
1569 #ifdef PUSH_ARGUMENTS
1570 fprintf_unfiltered (file,
1571 "gdbarch_dump: %s # %s\n",
1572 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1573 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1575 fprintf_unfiltered (file,
1576 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1577 (long) current_gdbarch->push_arguments
1578 /*PUSH_ARGUMENTS ()*/);
1580 #ifdef PUSH_DUMMY_FRAME
1582 /* Macro might contain `[{}]' when not multi-arch */
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: %s # %s\n",
1585 "PUSH_DUMMY_FRAME(-)",
1586 XSTRING (PUSH_DUMMY_FRAME (-)));
1589 fprintf_unfiltered (file,
1590 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1591 (long) current_gdbarch->push_dummy_frame
1592 /*PUSH_DUMMY_FRAME ()*/);
1594 #ifdef PUSH_RETURN_ADDRESS
1595 fprintf_unfiltered (file,
1596 "gdbarch_dump: %s # %s\n",
1597 "PUSH_RETURN_ADDRESS(pc, sp)",
1598 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1600 fprintf_unfiltered (file,
1601 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1602 (long) current_gdbarch->push_return_address
1603 /*PUSH_RETURN_ADDRESS ()*/);
1605 #ifdef REGISTER_BYTE
1606 fprintf_unfiltered (file,
1607 "gdbarch_dump: %s # %s\n",
1608 "REGISTER_BYTE(reg_nr)",
1609 XSTRING (REGISTER_BYTE (reg_nr)));
1611 fprintf_unfiltered (file,
1612 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1613 (long) current_gdbarch->register_byte
1614 /*REGISTER_BYTE ()*/);
1616 #ifdef REGISTER_BYTES
1617 fprintf_unfiltered (file,
1618 "gdbarch_dump: REGISTER_BYTES # %s\n",
1619 XSTRING (REGISTER_BYTES));
1620 fprintf_unfiltered (file,
1621 "gdbarch_dump: REGISTER_BYTES = %d\n",
1624 #ifdef REGISTER_BYTES_OK
1625 fprintf_unfiltered (file,
1626 "gdbarch_dump: %s # %s\n",
1627 "REGISTER_BYTES_OK(nr_bytes)",
1628 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1630 fprintf_unfiltered (file,
1631 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1632 (long) current_gdbarch->register_bytes_ok
1633 /*REGISTER_BYTES_OK ()*/);
1635 #ifdef REGISTER_CONVERTIBLE
1636 fprintf_unfiltered (file,
1637 "gdbarch_dump: %s # %s\n",
1638 "REGISTER_CONVERTIBLE(nr)",
1639 XSTRING (REGISTER_CONVERTIBLE (nr)));
1641 fprintf_unfiltered (file,
1642 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1643 (long) current_gdbarch->register_convertible
1644 /*REGISTER_CONVERTIBLE ()*/);
1646 #ifdef REGISTER_CONVERT_TO_RAW
1648 /* Macro might contain `[{}]' when not multi-arch */
1649 fprintf_unfiltered (file,
1650 "gdbarch_dump: %s # %s\n",
1651 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1652 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1655 fprintf_unfiltered (file,
1656 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1657 (long) current_gdbarch->register_convert_to_raw
1658 /*REGISTER_CONVERT_TO_RAW ()*/);
1660 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1662 /* Macro might contain `[{}]' when not multi-arch */
1663 fprintf_unfiltered (file,
1664 "gdbarch_dump: %s # %s\n",
1665 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1666 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1671 (long) current_gdbarch->register_convert_to_virtual
1672 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1674 #ifdef REGISTER_NAME
1675 fprintf_unfiltered (file,
1676 "gdbarch_dump: %s # %s\n",
1677 "REGISTER_NAME(regnr)",
1678 XSTRING (REGISTER_NAME (regnr)));
1680 fprintf_unfiltered (file,
1681 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1682 (long) current_gdbarch->register_name
1683 /*REGISTER_NAME ()*/);
1685 #ifdef REGISTER_RAW_SIZE
1686 fprintf_unfiltered (file,
1687 "gdbarch_dump: %s # %s\n",
1688 "REGISTER_RAW_SIZE(reg_nr)",
1689 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1691 fprintf_unfiltered (file,
1692 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1693 (long) current_gdbarch->register_raw_size
1694 /*REGISTER_RAW_SIZE ()*/);
1696 #ifdef REGISTER_SIM_REGNO
1697 fprintf_unfiltered (file,
1698 "gdbarch_dump: %s # %s\n",
1699 "REGISTER_SIM_REGNO(reg_nr)",
1700 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1702 fprintf_unfiltered (file,
1703 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1704 (long) current_gdbarch->register_sim_regno
1705 /*REGISTER_SIM_REGNO ()*/);
1707 #ifdef REGISTER_SIZE
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: REGISTER_SIZE # %s\n",
1710 XSTRING (REGISTER_SIZE));
1711 fprintf_unfiltered (file,
1712 "gdbarch_dump: REGISTER_SIZE = %d\n",
1715 #ifdef REGISTER_TO_VALUE
1717 /* Macro might contain `[{}]' when not multi-arch */
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: %s # %s\n",
1720 "REGISTER_TO_VALUE(regnum, type, from, to)",
1721 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1726 (long) current_gdbarch->register_to_value
1727 /*REGISTER_TO_VALUE ()*/);
1729 #ifdef REGISTER_VIRTUAL_SIZE
1730 fprintf_unfiltered (file,
1731 "gdbarch_dump: %s # %s\n",
1732 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1733 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
1735 fprintf_unfiltered (file,
1736 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1737 (long) current_gdbarch->register_virtual_size
1738 /*REGISTER_VIRTUAL_SIZE ()*/);
1740 #ifdef REGISTER_VIRTUAL_TYPE
1741 fprintf_unfiltered (file,
1742 "gdbarch_dump: %s # %s\n",
1743 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1744 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
1746 fprintf_unfiltered (file,
1747 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1748 (long) current_gdbarch->register_virtual_type
1749 /*REGISTER_VIRTUAL_TYPE ()*/);
1751 #ifdef REG_STRUCT_HAS_ADDR
1752 fprintf_unfiltered (file,
1753 "gdbarch_dump: %s # %s\n",
1754 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1755 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1757 fprintf_unfiltered (file,
1758 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1759 (long) current_gdbarch->reg_struct_has_addr
1760 /*REG_STRUCT_HAS_ADDR ()*/);
1762 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1764 /* Macro might contain `[{}]' when not multi-arch */
1765 fprintf_unfiltered (file,
1766 "gdbarch_dump: %s # %s\n",
1767 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1768 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1771 fprintf_unfiltered (file,
1772 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1773 (long) current_gdbarch->remote_translate_xfer_address
1774 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1776 #ifdef RETURN_VALUE_ON_STACK
1777 fprintf_unfiltered (file,
1778 "gdbarch_dump: %s # %s\n",
1779 "RETURN_VALUE_ON_STACK(type)",
1780 XSTRING (RETURN_VALUE_ON_STACK (type)));
1782 fprintf_unfiltered (file,
1783 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1784 (long) current_gdbarch->return_value_on_stack
1785 /*RETURN_VALUE_ON_STACK ()*/);
1787 #ifdef SAVED_PC_AFTER_CALL
1788 fprintf_unfiltered (file,
1789 "gdbarch_dump: %s # %s\n",
1790 "SAVED_PC_AFTER_CALL(frame)",
1791 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1793 fprintf_unfiltered (file,
1794 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1795 (long) current_gdbarch->saved_pc_after_call
1796 /*SAVED_PC_AFTER_CALL ()*/);
1798 #ifdef SAVE_DUMMY_FRAME_TOS
1800 /* Macro might contain `[{}]' when not multi-arch */
1801 fprintf_unfiltered (file,
1802 "gdbarch_dump: %s # %s\n",
1803 "SAVE_DUMMY_FRAME_TOS(sp)",
1804 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1807 fprintf_unfiltered (file,
1808 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1809 (long) current_gdbarch->save_dummy_frame_tos
1810 /*SAVE_DUMMY_FRAME_TOS ()*/);
1812 #ifdef SDB_REG_TO_REGNUM
1813 fprintf_unfiltered (file,
1814 "gdbarch_dump: %s # %s\n",
1815 "SDB_REG_TO_REGNUM(sdb_regnr)",
1816 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1818 fprintf_unfiltered (file,
1819 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1820 (long) current_gdbarch->sdb_reg_to_regnum
1821 /*SDB_REG_TO_REGNUM ()*/);
1823 #ifdef SIZEOF_CALL_DUMMY_WORDS
1824 fprintf_unfiltered (file,
1825 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1826 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
1827 fprintf_unfiltered (file,
1828 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1829 (long) SIZEOF_CALL_DUMMY_WORDS);
1831 #ifdef SKIP_PROLOGUE
1832 fprintf_unfiltered (file,
1833 "gdbarch_dump: %s # %s\n",
1834 "SKIP_PROLOGUE(ip)",
1835 XSTRING (SKIP_PROLOGUE (ip)));
1837 fprintf_unfiltered (file,
1838 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1839 (long) current_gdbarch->skip_prologue
1840 /*SKIP_PROLOGUE ()*/);
1842 #ifdef SKIP_TRAMPOLINE_CODE
1843 fprintf_unfiltered (file,
1844 "gdbarch_dump: %s # %s\n",
1845 "SKIP_TRAMPOLINE_CODE(pc)",
1846 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1848 fprintf_unfiltered (file,
1849 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1850 (long) current_gdbarch->skip_trampoline_code
1851 /*SKIP_TRAMPOLINE_CODE ()*/);
1853 #ifdef SMASH_TEXT_ADDRESS
1854 fprintf_unfiltered (file,
1855 "gdbarch_dump: %s # %s\n",
1856 "SMASH_TEXT_ADDRESS(addr)",
1857 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1859 fprintf_unfiltered (file,
1860 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1861 (long) current_gdbarch->smash_text_address
1862 /*SMASH_TEXT_ADDRESS ()*/);
1864 #ifdef SOFTWARE_SINGLE_STEP
1866 /* Macro might contain `[{}]' when not multi-arch */
1867 fprintf_unfiltered (file,
1868 "gdbarch_dump: %s # %s\n",
1869 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1870 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1873 fprintf_unfiltered (file,
1874 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1875 (long) current_gdbarch->software_single_step
1876 /*SOFTWARE_SINGLE_STEP ()*/);
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: SP_REGNUM # %s\n",
1881 XSTRING (SP_REGNUM));
1882 fprintf_unfiltered (file,
1883 "gdbarch_dump: SP_REGNUM = %d\n",
1886 #ifdef STAB_REG_TO_REGNUM
1887 fprintf_unfiltered (file,
1888 "gdbarch_dump: %s # %s\n",
1889 "STAB_REG_TO_REGNUM(stab_regnr)",
1890 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1892 fprintf_unfiltered (file,
1893 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1894 (long) current_gdbarch->stab_reg_to_regnum
1895 /*STAB_REG_TO_REGNUM ()*/);
1898 fprintf_unfiltered (file,
1899 "gdbarch_dump: %s # %s\n",
1901 XSTRING (STACK_ALIGN (sp)));
1903 fprintf_unfiltered (file,
1904 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1905 (long) current_gdbarch->stack_align
1906 /*STACK_ALIGN ()*/);
1908 #ifdef STORE_PSEUDO_REGISTER
1910 /* Macro might contain `[{}]' when not multi-arch */
1911 fprintf_unfiltered (file,
1912 "gdbarch_dump: %s # %s\n",
1913 "STORE_PSEUDO_REGISTER(regnum)",
1914 XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1917 fprintf_unfiltered (file,
1918 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1919 (long) current_gdbarch->store_pseudo_register
1920 /*STORE_PSEUDO_REGISTER ()*/);
1922 #ifdef STORE_RETURN_VALUE
1924 /* Macro might contain `[{}]' when not multi-arch */
1925 fprintf_unfiltered (file,
1926 "gdbarch_dump: %s # %s\n",
1927 "STORE_RETURN_VALUE(type, valbuf)",
1928 XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1931 fprintf_unfiltered (file,
1932 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1933 (long) current_gdbarch->store_return_value
1934 /*STORE_RETURN_VALUE ()*/);
1936 #ifdef STORE_STRUCT_RETURN
1938 /* Macro might contain `[{}]' when not multi-arch */
1939 fprintf_unfiltered (file,
1940 "gdbarch_dump: %s # %s\n",
1941 "STORE_STRUCT_RETURN(addr, sp)",
1942 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1945 fprintf_unfiltered (file,
1946 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1947 (long) current_gdbarch->store_struct_return
1948 /*STORE_STRUCT_RETURN ()*/);
1950 #ifdef TARGET_ADDR_BIT
1951 fprintf_unfiltered (file,
1952 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1953 XSTRING (TARGET_ADDR_BIT));
1954 fprintf_unfiltered (file,
1955 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1958 #ifdef TARGET_ARCHITECTURE
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1961 XSTRING (TARGET_ARCHITECTURE));
1962 if (TARGET_ARCHITECTURE != NULL)
1963 fprintf_unfiltered (file,
1964 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1965 TARGET_ARCHITECTURE->printable_name);
1967 #ifdef TARGET_BFD_VMA_BIT
1968 fprintf_unfiltered (file,
1969 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1970 XSTRING (TARGET_BFD_VMA_BIT));
1971 fprintf_unfiltered (file,
1972 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1973 TARGET_BFD_VMA_BIT);
1975 #ifdef TARGET_BYTE_ORDER
1976 fprintf_unfiltered (file,
1977 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1978 XSTRING (TARGET_BYTE_ORDER));
1979 fprintf_unfiltered (file,
1980 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1981 (long) TARGET_BYTE_ORDER);
1983 #ifdef TARGET_CHAR_SIGNED
1984 fprintf_unfiltered (file,
1985 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1986 XSTRING (TARGET_CHAR_SIGNED));
1987 fprintf_unfiltered (file,
1988 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1989 TARGET_CHAR_SIGNED);
1991 #ifdef TARGET_DOUBLE_BIT
1992 fprintf_unfiltered (file,
1993 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1994 XSTRING (TARGET_DOUBLE_BIT));
1995 fprintf_unfiltered (file,
1996 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1999 #ifdef TARGET_DOUBLE_FORMAT
2000 fprintf_unfiltered (file,
2001 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2002 XSTRING (TARGET_DOUBLE_FORMAT));
2003 fprintf_unfiltered (file,
2004 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2005 (long) TARGET_DOUBLE_FORMAT);
2007 #ifdef TARGET_FLOAT_BIT
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2010 XSTRING (TARGET_FLOAT_BIT));
2011 fprintf_unfiltered (file,
2012 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2015 #ifdef TARGET_FLOAT_FORMAT
2016 fprintf_unfiltered (file,
2017 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2018 XSTRING (TARGET_FLOAT_FORMAT));
2019 fprintf_unfiltered (file,
2020 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2021 (long) TARGET_FLOAT_FORMAT);
2023 #ifdef TARGET_INT_BIT
2024 fprintf_unfiltered (file,
2025 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2026 XSTRING (TARGET_INT_BIT));
2027 fprintf_unfiltered (file,
2028 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2031 #ifdef TARGET_LONG_BIT
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2034 XSTRING (TARGET_LONG_BIT));
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2039 #ifdef TARGET_LONG_DOUBLE_BIT
2040 fprintf_unfiltered (file,
2041 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2042 XSTRING (TARGET_LONG_DOUBLE_BIT));
2043 fprintf_unfiltered (file,
2044 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2045 TARGET_LONG_DOUBLE_BIT);
2047 #ifdef TARGET_LONG_DOUBLE_FORMAT
2048 fprintf_unfiltered (file,
2049 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2050 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2051 fprintf_unfiltered (file,
2052 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2053 (long) TARGET_LONG_DOUBLE_FORMAT);
2055 #ifdef TARGET_LONG_LONG_BIT
2056 fprintf_unfiltered (file,
2057 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2058 XSTRING (TARGET_LONG_LONG_BIT));
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2061 TARGET_LONG_LONG_BIT);
2063 #ifdef TARGET_PRINT_INSN
2064 fprintf_unfiltered (file,
2065 "gdbarch_dump: %s # %s\n",
2066 "TARGET_PRINT_INSN(vma, info)",
2067 XSTRING (TARGET_PRINT_INSN (vma, info)));
2069 fprintf_unfiltered (file,
2070 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2071 (long) current_gdbarch->print_insn
2072 /*TARGET_PRINT_INSN ()*/);
2074 #ifdef TARGET_PTR_BIT
2075 fprintf_unfiltered (file,
2076 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2077 XSTRING (TARGET_PTR_BIT));
2078 fprintf_unfiltered (file,
2079 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2082 #ifdef TARGET_READ_FP
2083 fprintf_unfiltered (file,
2084 "gdbarch_dump: %s # %s\n",
2086 XSTRING (TARGET_READ_FP ()));
2088 fprintf_unfiltered (file,
2089 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2090 (long) current_gdbarch->read_fp
2091 /*TARGET_READ_FP ()*/);
2093 #ifdef TARGET_READ_PC
2094 fprintf_unfiltered (file,
2095 "gdbarch_dump: %s # %s\n",
2096 "TARGET_READ_PC(ptid)",
2097 XSTRING (TARGET_READ_PC (ptid)));
2099 fprintf_unfiltered (file,
2100 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2101 (long) current_gdbarch->read_pc
2102 /*TARGET_READ_PC ()*/);
2104 #ifdef TARGET_READ_SP
2105 fprintf_unfiltered (file,
2106 "gdbarch_dump: %s # %s\n",
2108 XSTRING (TARGET_READ_SP ()));
2110 fprintf_unfiltered (file,
2111 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2112 (long) current_gdbarch->read_sp
2113 /*TARGET_READ_SP ()*/);
2115 #ifdef TARGET_SHORT_BIT
2116 fprintf_unfiltered (file,
2117 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2118 XSTRING (TARGET_SHORT_BIT));
2119 fprintf_unfiltered (file,
2120 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2123 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2125 /* Macro might contain `[{}]' when not multi-arch */
2126 fprintf_unfiltered (file,
2127 "gdbarch_dump: %s # %s\n",
2128 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2129 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2132 fprintf_unfiltered (file,
2133 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2134 (long) current_gdbarch->virtual_frame_pointer
2135 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2137 #ifdef TARGET_WRITE_PC
2139 /* Macro might contain `[{}]' when not multi-arch */
2140 fprintf_unfiltered (file,
2141 "gdbarch_dump: %s # %s\n",
2142 "TARGET_WRITE_PC(val, ptid)",
2143 XSTRING (TARGET_WRITE_PC (val, ptid)));
2146 fprintf_unfiltered (file,
2147 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2148 (long) current_gdbarch->write_pc
2149 /*TARGET_WRITE_PC ()*/);
2151 #ifdef TARGET_WRITE_SP
2153 /* Macro might contain `[{}]' when not multi-arch */
2154 fprintf_unfiltered (file,
2155 "gdbarch_dump: %s # %s\n",
2156 "TARGET_WRITE_SP(val)",
2157 XSTRING (TARGET_WRITE_SP (val)));
2160 fprintf_unfiltered (file,
2161 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2162 (long) current_gdbarch->write_sp
2163 /*TARGET_WRITE_SP ()*/);
2165 #ifdef USE_GENERIC_DUMMY_FRAMES
2166 fprintf_unfiltered (file,
2167 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2168 XSTRING (USE_GENERIC_DUMMY_FRAMES));
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2171 USE_GENERIC_DUMMY_FRAMES);
2173 #ifdef USE_STRUCT_CONVENTION
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: %s # %s\n",
2176 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2177 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2179 fprintf_unfiltered (file,
2180 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2181 (long) current_gdbarch->use_struct_convention
2182 /*USE_STRUCT_CONVENTION ()*/);
2184 #ifdef VALUE_TO_REGISTER
2186 /* Macro might contain `[{}]' when not multi-arch */
2187 fprintf_unfiltered (file,
2188 "gdbarch_dump: %s # %s\n",
2189 "VALUE_TO_REGISTER(type, regnum, from, to)",
2190 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2193 fprintf_unfiltered (file,
2194 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2195 (long) current_gdbarch->value_to_register
2196 /*VALUE_TO_REGISTER ()*/);
2198 if (current_gdbarch->dump_tdep != NULL)
2199 current_gdbarch->dump_tdep (current_gdbarch, file);
2202 struct gdbarch_tdep *
2203 gdbarch_tdep (struct gdbarch *gdbarch)
2205 if (gdbarch_debug >= 2)
2206 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2207 return gdbarch->tdep;
2211 const struct bfd_arch_info *
2212 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2214 gdb_assert (gdbarch != NULL);
2215 if (gdbarch_debug >= 2)
2216 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2217 return gdbarch->bfd_arch_info;
2221 gdbarch_byte_order (struct gdbarch *gdbarch)
2223 gdb_assert (gdbarch != NULL);
2224 if (gdbarch_debug >= 2)
2225 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2226 return gdbarch->byte_order;
2230 gdbarch_short_bit (struct gdbarch *gdbarch)
2232 gdb_assert (gdbarch != NULL);
2233 /* Skip verify of short_bit, invalid_p == 0 */
2234 if (gdbarch_debug >= 2)
2235 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2236 return gdbarch->short_bit;
2240 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2243 gdbarch->short_bit = short_bit;
2247 gdbarch_int_bit (struct gdbarch *gdbarch)
2249 gdb_assert (gdbarch != NULL);
2250 /* Skip verify of int_bit, invalid_p == 0 */
2251 if (gdbarch_debug >= 2)
2252 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2253 return gdbarch->int_bit;
2257 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2260 gdbarch->int_bit = int_bit;
2264 gdbarch_long_bit (struct gdbarch *gdbarch)
2266 gdb_assert (gdbarch != NULL);
2267 /* Skip verify of long_bit, invalid_p == 0 */
2268 if (gdbarch_debug >= 2)
2269 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2270 return gdbarch->long_bit;
2274 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2277 gdbarch->long_bit = long_bit;
2281 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2283 gdb_assert (gdbarch != NULL);
2284 /* Skip verify of long_long_bit, invalid_p == 0 */
2285 if (gdbarch_debug >= 2)
2286 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2287 return gdbarch->long_long_bit;
2291 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2294 gdbarch->long_long_bit = long_long_bit;
2298 gdbarch_float_bit (struct gdbarch *gdbarch)
2300 gdb_assert (gdbarch != NULL);
2301 /* Skip verify of float_bit, invalid_p == 0 */
2302 if (gdbarch_debug >= 2)
2303 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2304 return gdbarch->float_bit;
2308 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2311 gdbarch->float_bit = float_bit;
2315 gdbarch_double_bit (struct gdbarch *gdbarch)
2317 gdb_assert (gdbarch != NULL);
2318 /* Skip verify of double_bit, invalid_p == 0 */
2319 if (gdbarch_debug >= 2)
2320 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2321 return gdbarch->double_bit;
2325 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2328 gdbarch->double_bit = double_bit;
2332 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2334 gdb_assert (gdbarch != NULL);
2335 /* Skip verify of long_double_bit, invalid_p == 0 */
2336 if (gdbarch_debug >= 2)
2337 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2338 return gdbarch->long_double_bit;
2342 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2343 int long_double_bit)
2345 gdbarch->long_double_bit = long_double_bit;
2349 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2351 gdb_assert (gdbarch != NULL);
2352 /* Skip verify of ptr_bit, invalid_p == 0 */
2353 if (gdbarch_debug >= 2)
2354 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2355 return gdbarch->ptr_bit;
2359 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2362 gdbarch->ptr_bit = ptr_bit;
2366 gdbarch_addr_bit (struct gdbarch *gdbarch)
2368 gdb_assert (gdbarch != NULL);
2369 if (gdbarch->addr_bit == 0)
2370 internal_error (__FILE__, __LINE__,
2371 "gdbarch: gdbarch_addr_bit invalid");
2372 if (gdbarch_debug >= 2)
2373 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2374 return gdbarch->addr_bit;
2378 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2381 gdbarch->addr_bit = addr_bit;
2385 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2387 gdb_assert (gdbarch != NULL);
2388 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2389 if (gdbarch_debug >= 2)
2390 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2391 return gdbarch->bfd_vma_bit;
2395 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2398 gdbarch->bfd_vma_bit = bfd_vma_bit;
2402 gdbarch_char_signed (struct gdbarch *gdbarch)
2404 gdb_assert (gdbarch != NULL);
2405 if (gdbarch->char_signed == -1)
2406 internal_error (__FILE__, __LINE__,
2407 "gdbarch: gdbarch_char_signed invalid");
2408 if (gdbarch_debug >= 2)
2409 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2410 return gdbarch->char_signed;
2414 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2417 gdbarch->char_signed = char_signed;
2421 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2423 gdb_assert (gdbarch != NULL);
2424 if (gdbarch->read_pc == 0)
2425 internal_error (__FILE__, __LINE__,
2426 "gdbarch: gdbarch_read_pc invalid");
2427 if (gdbarch_debug >= 2)
2428 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2429 return gdbarch->read_pc (ptid);
2433 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2434 gdbarch_read_pc_ftype read_pc)
2436 gdbarch->read_pc = read_pc;
2440 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2442 gdb_assert (gdbarch != NULL);
2443 if (gdbarch->write_pc == 0)
2444 internal_error (__FILE__, __LINE__,
2445 "gdbarch: gdbarch_write_pc invalid");
2446 if (gdbarch_debug >= 2)
2447 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2448 gdbarch->write_pc (val, ptid);
2452 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2453 gdbarch_write_pc_ftype write_pc)
2455 gdbarch->write_pc = write_pc;
2459 gdbarch_read_fp (struct gdbarch *gdbarch)
2461 gdb_assert (gdbarch != NULL);
2462 if (gdbarch->read_fp == 0)
2463 internal_error (__FILE__, __LINE__,
2464 "gdbarch: gdbarch_read_fp invalid");
2465 if (gdbarch_debug >= 2)
2466 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2467 return gdbarch->read_fp ();
2471 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2472 gdbarch_read_fp_ftype read_fp)
2474 gdbarch->read_fp = read_fp;
2478 gdbarch_read_sp (struct gdbarch *gdbarch)
2480 gdb_assert (gdbarch != NULL);
2481 if (gdbarch->read_sp == 0)
2482 internal_error (__FILE__, __LINE__,
2483 "gdbarch: gdbarch_read_sp invalid");
2484 if (gdbarch_debug >= 2)
2485 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2486 return gdbarch->read_sp ();
2490 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2491 gdbarch_read_sp_ftype read_sp)
2493 gdbarch->read_sp = read_sp;
2497 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2499 gdb_assert (gdbarch != NULL);
2500 if (gdbarch->write_sp == 0)
2501 internal_error (__FILE__, __LINE__,
2502 "gdbarch: gdbarch_write_sp invalid");
2503 if (gdbarch_debug >= 2)
2504 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2505 gdbarch->write_sp (val);
2509 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2510 gdbarch_write_sp_ftype write_sp)
2512 gdbarch->write_sp = write_sp;
2516 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2518 gdb_assert (gdbarch != NULL);
2519 if (gdbarch->virtual_frame_pointer == 0)
2520 internal_error (__FILE__, __LINE__,
2521 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2522 if (gdbarch_debug >= 2)
2523 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2524 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2528 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2529 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2531 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2535 gdbarch_register_read_p (struct gdbarch *gdbarch)
2537 gdb_assert (gdbarch != NULL);
2538 return gdbarch->register_read != 0;
2542 gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf)
2544 gdb_assert (gdbarch != NULL);
2545 if (gdbarch->register_read == 0)
2546 internal_error (__FILE__, __LINE__,
2547 "gdbarch: gdbarch_register_read invalid");
2548 if (gdbarch_debug >= 2)
2549 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n");
2550 gdbarch->register_read (gdbarch, regnum, buf);
2554 set_gdbarch_register_read (struct gdbarch *gdbarch,
2555 gdbarch_register_read_ftype register_read)
2557 gdbarch->register_read = register_read;
2561 gdbarch_register_write_p (struct gdbarch *gdbarch)
2563 gdb_assert (gdbarch != NULL);
2564 return gdbarch->register_write != 0;
2568 gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf)
2570 gdb_assert (gdbarch != NULL);
2571 if (gdbarch->register_write == 0)
2572 internal_error (__FILE__, __LINE__,
2573 "gdbarch: gdbarch_register_write invalid");
2574 if (gdbarch_debug >= 2)
2575 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n");
2576 gdbarch->register_write (gdbarch, regnum, buf);
2580 set_gdbarch_register_write (struct gdbarch *gdbarch,
2581 gdbarch_register_write_ftype register_write)
2583 gdbarch->register_write = register_write;
2587 gdbarch_num_regs (struct gdbarch *gdbarch)
2589 gdb_assert (gdbarch != NULL);
2590 if (gdbarch->num_regs == -1)
2591 internal_error (__FILE__, __LINE__,
2592 "gdbarch: gdbarch_num_regs invalid");
2593 if (gdbarch_debug >= 2)
2594 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2595 return gdbarch->num_regs;
2599 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2602 gdbarch->num_regs = num_regs;
2606 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2608 gdb_assert (gdbarch != NULL);
2609 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2610 if (gdbarch_debug >= 2)
2611 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2612 return gdbarch->num_pseudo_regs;
2616 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2617 int num_pseudo_regs)
2619 gdbarch->num_pseudo_regs = num_pseudo_regs;
2623 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2625 gdb_assert (gdbarch != NULL);
2626 /* Skip verify of sp_regnum, invalid_p == 0 */
2627 if (gdbarch_debug >= 2)
2628 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2629 return gdbarch->sp_regnum;
2633 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2636 gdbarch->sp_regnum = sp_regnum;
2640 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2642 gdb_assert (gdbarch != NULL);
2643 /* Skip verify of fp_regnum, invalid_p == 0 */
2644 if (gdbarch_debug >= 2)
2645 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2646 return gdbarch->fp_regnum;
2650 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2653 gdbarch->fp_regnum = fp_regnum;
2657 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2659 gdb_assert (gdbarch != NULL);
2660 /* Skip verify of pc_regnum, invalid_p == 0 */
2661 if (gdbarch_debug >= 2)
2662 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2663 return gdbarch->pc_regnum;
2667 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2670 gdbarch->pc_regnum = pc_regnum;
2674 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2676 gdb_assert (gdbarch != NULL);
2677 /* Skip verify of ps_regnum, invalid_p == 0 */
2678 if (gdbarch_debug >= 2)
2679 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2680 return gdbarch->ps_regnum;
2684 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2687 gdbarch->ps_regnum = ps_regnum;
2691 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2693 gdb_assert (gdbarch != NULL);
2694 /* Skip verify of fp0_regnum, invalid_p == 0 */
2695 if (gdbarch_debug >= 2)
2696 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2697 return gdbarch->fp0_regnum;
2701 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2704 gdbarch->fp0_regnum = fp0_regnum;
2708 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2710 gdb_assert (gdbarch != NULL);
2711 /* Skip verify of npc_regnum, invalid_p == 0 */
2712 if (gdbarch_debug >= 2)
2713 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2714 return gdbarch->npc_regnum;
2718 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2721 gdbarch->npc_regnum = npc_regnum;
2725 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2727 gdb_assert (gdbarch != NULL);
2728 if (gdbarch->stab_reg_to_regnum == 0)
2729 internal_error (__FILE__, __LINE__,
2730 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2731 if (gdbarch_debug >= 2)
2732 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2733 return gdbarch->stab_reg_to_regnum (stab_regnr);
2737 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2738 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2740 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2744 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2746 gdb_assert (gdbarch != NULL);
2747 if (gdbarch->ecoff_reg_to_regnum == 0)
2748 internal_error (__FILE__, __LINE__,
2749 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2750 if (gdbarch_debug >= 2)
2751 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2752 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2756 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2757 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2759 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2763 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2765 gdb_assert (gdbarch != NULL);
2766 if (gdbarch->dwarf_reg_to_regnum == 0)
2767 internal_error (__FILE__, __LINE__,
2768 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2769 if (gdbarch_debug >= 2)
2770 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2771 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2775 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2776 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2778 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2782 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2784 gdb_assert (gdbarch != NULL);
2785 if (gdbarch->sdb_reg_to_regnum == 0)
2786 internal_error (__FILE__, __LINE__,
2787 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2788 if (gdbarch_debug >= 2)
2789 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2790 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2794 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2795 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2797 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2801 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2803 gdb_assert (gdbarch != NULL);
2804 if (gdbarch->dwarf2_reg_to_regnum == 0)
2805 internal_error (__FILE__, __LINE__,
2806 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2807 if (gdbarch_debug >= 2)
2808 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2809 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2813 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2814 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2816 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2820 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2822 gdb_assert (gdbarch != NULL);
2823 if (gdbarch->register_name == 0)
2824 internal_error (__FILE__, __LINE__,
2825 "gdbarch: gdbarch_register_name invalid");
2826 if (gdbarch_debug >= 2)
2827 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2828 return gdbarch->register_name (regnr);
2832 set_gdbarch_register_name (struct gdbarch *gdbarch,
2833 gdbarch_register_name_ftype register_name)
2835 gdbarch->register_name = register_name;
2839 gdbarch_register_size (struct gdbarch *gdbarch)
2841 gdb_assert (gdbarch != NULL);
2842 if (gdbarch->register_size == -1)
2843 internal_error (__FILE__, __LINE__,
2844 "gdbarch: gdbarch_register_size invalid");
2845 if (gdbarch_debug >= 2)
2846 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2847 return gdbarch->register_size;
2851 set_gdbarch_register_size (struct gdbarch *gdbarch,
2854 gdbarch->register_size = register_size;
2858 gdbarch_register_bytes (struct gdbarch *gdbarch)
2860 gdb_assert (gdbarch != NULL);
2861 if (gdbarch->register_bytes == -1)
2862 internal_error (__FILE__, __LINE__,
2863 "gdbarch: gdbarch_register_bytes invalid");
2864 if (gdbarch_debug >= 2)
2865 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2866 return gdbarch->register_bytes;
2870 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2873 gdbarch->register_bytes = register_bytes;
2877 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2879 gdb_assert (gdbarch != NULL);
2880 if (gdbarch->register_byte == 0)
2881 internal_error (__FILE__, __LINE__,
2882 "gdbarch: gdbarch_register_byte invalid");
2883 if (gdbarch_debug >= 2)
2884 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2885 return gdbarch->register_byte (reg_nr);
2889 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2890 gdbarch_register_byte_ftype register_byte)
2892 gdbarch->register_byte = register_byte;
2896 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2898 gdb_assert (gdbarch != NULL);
2899 if (gdbarch->register_raw_size == 0)
2900 internal_error (__FILE__, __LINE__,
2901 "gdbarch: gdbarch_register_raw_size invalid");
2902 if (gdbarch_debug >= 2)
2903 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2904 return gdbarch->register_raw_size (reg_nr);
2908 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2909 gdbarch_register_raw_size_ftype register_raw_size)
2911 gdbarch->register_raw_size = register_raw_size;
2915 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
2917 gdb_assert (gdbarch != NULL);
2918 if (gdbarch->max_register_raw_size == -1)
2919 internal_error (__FILE__, __LINE__,
2920 "gdbarch: gdbarch_max_register_raw_size invalid");
2921 if (gdbarch_debug >= 2)
2922 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2923 return gdbarch->max_register_raw_size;
2927 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2928 int max_register_raw_size)
2930 gdbarch->max_register_raw_size = max_register_raw_size;
2934 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2936 gdb_assert (gdbarch != NULL);
2937 if (gdbarch->register_virtual_size == 0)
2938 internal_error (__FILE__, __LINE__,
2939 "gdbarch: gdbarch_register_virtual_size invalid");
2940 if (gdbarch_debug >= 2)
2941 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2942 return gdbarch->register_virtual_size (reg_nr);
2946 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2947 gdbarch_register_virtual_size_ftype register_virtual_size)
2949 gdbarch->register_virtual_size = register_virtual_size;
2953 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
2955 gdb_assert (gdbarch != NULL);
2956 if (gdbarch->max_register_virtual_size == -1)
2957 internal_error (__FILE__, __LINE__,
2958 "gdbarch: gdbarch_max_register_virtual_size invalid");
2959 if (gdbarch_debug >= 2)
2960 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2961 return gdbarch->max_register_virtual_size;
2965 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2966 int max_register_virtual_size)
2968 gdbarch->max_register_virtual_size = max_register_virtual_size;
2972 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2974 gdb_assert (gdbarch != NULL);
2975 if (gdbarch->register_virtual_type == 0)
2976 internal_error (__FILE__, __LINE__,
2977 "gdbarch: gdbarch_register_virtual_type invalid");
2978 if (gdbarch_debug >= 2)
2979 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2980 return gdbarch->register_virtual_type (reg_nr);
2984 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2985 gdbarch_register_virtual_type_ftype register_virtual_type)
2987 gdbarch->register_virtual_type = register_virtual_type;
2991 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2993 gdb_assert (gdbarch != NULL);
2994 if (gdbarch->do_registers_info == 0)
2995 internal_error (__FILE__, __LINE__,
2996 "gdbarch: gdbarch_do_registers_info invalid");
2997 if (gdbarch_debug >= 2)
2998 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
2999 gdbarch->do_registers_info (reg_nr, fpregs);
3003 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
3004 gdbarch_do_registers_info_ftype do_registers_info)
3006 gdbarch->do_registers_info = do_registers_info;
3010 gdbarch_print_float_info (struct gdbarch *gdbarch)
3012 gdb_assert (gdbarch != NULL);
3013 if (gdbarch->print_float_info == 0)
3014 internal_error (__FILE__, __LINE__,
3015 "gdbarch: gdbarch_print_float_info invalid");
3016 if (gdbarch_debug >= 2)
3017 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3018 gdbarch->print_float_info ();
3022 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3023 gdbarch_print_float_info_ftype print_float_info)
3025 gdbarch->print_float_info = print_float_info;
3029 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3031 gdb_assert (gdbarch != NULL);
3032 if (gdbarch->register_sim_regno == 0)
3033 internal_error (__FILE__, __LINE__,
3034 "gdbarch: gdbarch_register_sim_regno invalid");
3035 if (gdbarch_debug >= 2)
3036 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3037 return gdbarch->register_sim_regno (reg_nr);
3041 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3042 gdbarch_register_sim_regno_ftype register_sim_regno)
3044 gdbarch->register_sim_regno = register_sim_regno;
3048 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3050 gdb_assert (gdbarch != NULL);
3051 return gdbarch->register_bytes_ok != 0;
3055 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3057 gdb_assert (gdbarch != NULL);
3058 if (gdbarch->register_bytes_ok == 0)
3059 internal_error (__FILE__, __LINE__,
3060 "gdbarch: gdbarch_register_bytes_ok invalid");
3061 if (gdbarch_debug >= 2)
3062 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3063 return gdbarch->register_bytes_ok (nr_bytes);
3067 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3068 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3070 gdbarch->register_bytes_ok = register_bytes_ok;
3074 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3076 gdb_assert (gdbarch != NULL);
3077 if (gdbarch->cannot_fetch_register == 0)
3078 internal_error (__FILE__, __LINE__,
3079 "gdbarch: gdbarch_cannot_fetch_register invalid");
3080 if (gdbarch_debug >= 2)
3081 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3082 return gdbarch->cannot_fetch_register (regnum);
3086 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3087 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3089 gdbarch->cannot_fetch_register = cannot_fetch_register;
3093 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3095 gdb_assert (gdbarch != NULL);
3096 if (gdbarch->cannot_store_register == 0)
3097 internal_error (__FILE__, __LINE__,
3098 "gdbarch: gdbarch_cannot_store_register invalid");
3099 if (gdbarch_debug >= 2)
3100 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3101 return gdbarch->cannot_store_register (regnum);
3105 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3106 gdbarch_cannot_store_register_ftype cannot_store_register)
3108 gdbarch->cannot_store_register = cannot_store_register;
3112 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3114 gdb_assert (gdbarch != NULL);
3115 return gdbarch->get_longjmp_target != 0;
3119 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3121 gdb_assert (gdbarch != NULL);
3122 if (gdbarch->get_longjmp_target == 0)
3123 internal_error (__FILE__, __LINE__,
3124 "gdbarch: gdbarch_get_longjmp_target invalid");
3125 if (gdbarch_debug >= 2)
3126 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3127 return gdbarch->get_longjmp_target (pc);
3131 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3132 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3134 gdbarch->get_longjmp_target = get_longjmp_target;
3138 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
3140 gdb_assert (gdbarch != NULL);
3141 if (gdbarch->use_generic_dummy_frames == -1)
3142 internal_error (__FILE__, __LINE__,
3143 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3144 if (gdbarch_debug >= 2)
3145 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
3146 return gdbarch->use_generic_dummy_frames;
3150 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
3151 int use_generic_dummy_frames)
3153 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
3157 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3159 gdb_assert (gdbarch != NULL);
3160 if (gdbarch->call_dummy_location == 0)
3161 internal_error (__FILE__, __LINE__,
3162 "gdbarch: gdbarch_call_dummy_location invalid");
3163 if (gdbarch_debug >= 2)
3164 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3165 return gdbarch->call_dummy_location;
3169 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3170 int call_dummy_location)
3172 gdbarch->call_dummy_location = call_dummy_location;
3176 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3178 gdb_assert (gdbarch != NULL);
3179 if (gdbarch->call_dummy_address == 0)
3180 internal_error (__FILE__, __LINE__,
3181 "gdbarch: gdbarch_call_dummy_address invalid");
3182 if (gdbarch_debug >= 2)
3183 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3184 return gdbarch->call_dummy_address ();
3188 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3189 gdbarch_call_dummy_address_ftype call_dummy_address)
3191 gdbarch->call_dummy_address = call_dummy_address;
3195 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3197 gdb_assert (gdbarch != NULL);
3198 if (gdbarch->call_dummy_start_offset == -1)
3199 internal_error (__FILE__, __LINE__,
3200 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3201 if (gdbarch_debug >= 2)
3202 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3203 return gdbarch->call_dummy_start_offset;
3207 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3208 CORE_ADDR call_dummy_start_offset)
3210 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3214 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3216 gdb_assert (gdbarch != NULL);
3217 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
3218 internal_error (__FILE__, __LINE__,
3219 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3220 if (gdbarch_debug >= 2)
3221 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3222 return gdbarch->call_dummy_breakpoint_offset;
3226 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3227 CORE_ADDR call_dummy_breakpoint_offset)
3229 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3233 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3235 gdb_assert (gdbarch != NULL);
3236 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3237 internal_error (__FILE__, __LINE__,
3238 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3239 if (gdbarch_debug >= 2)
3240 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3241 return gdbarch->call_dummy_breakpoint_offset_p;
3245 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3246 int call_dummy_breakpoint_offset_p)
3248 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3252 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3254 gdb_assert (gdbarch != NULL);
3255 if (gdbarch->call_dummy_length == -1)
3256 internal_error (__FILE__, __LINE__,
3257 "gdbarch: gdbarch_call_dummy_length invalid");
3258 if (gdbarch_debug >= 2)
3259 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3260 return gdbarch->call_dummy_length;
3264 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3265 int call_dummy_length)
3267 gdbarch->call_dummy_length = call_dummy_length;
3271 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3273 gdb_assert (gdbarch != NULL);
3274 if (gdbarch->pc_in_call_dummy == 0)
3275 internal_error (__FILE__, __LINE__,
3276 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3277 if (gdbarch_debug >= 2)
3278 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
3279 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
3283 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
3284 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
3286 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
3290 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3292 gdb_assert (gdbarch != NULL);
3293 if (gdbarch->call_dummy_p == -1)
3294 internal_error (__FILE__, __LINE__,
3295 "gdbarch: gdbarch_call_dummy_p invalid");
3296 if (gdbarch_debug >= 2)
3297 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3298 return gdbarch->call_dummy_p;
3302 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3305 gdbarch->call_dummy_p = call_dummy_p;
3309 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3311 gdb_assert (gdbarch != NULL);
3312 /* Skip verify of call_dummy_words, invalid_p == 0 */
3313 if (gdbarch_debug >= 2)
3314 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3315 return gdbarch->call_dummy_words;
3319 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3320 LONGEST * call_dummy_words)
3322 gdbarch->call_dummy_words = call_dummy_words;
3326 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3328 gdb_assert (gdbarch != NULL);
3329 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3330 if (gdbarch_debug >= 2)
3331 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3332 return gdbarch->sizeof_call_dummy_words;
3336 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3337 int sizeof_call_dummy_words)
3339 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3343 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3345 gdb_assert (gdbarch != NULL);
3346 if (gdbarch->call_dummy_stack_adjust_p == -1)
3347 internal_error (__FILE__, __LINE__,
3348 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3349 if (gdbarch_debug >= 2)
3350 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3351 return gdbarch->call_dummy_stack_adjust_p;
3355 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3356 int call_dummy_stack_adjust_p)
3358 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3362 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3364 gdb_assert (gdbarch != NULL);
3365 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3366 internal_error (__FILE__, __LINE__,
3367 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3368 if (gdbarch_debug >= 2)
3369 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3370 return gdbarch->call_dummy_stack_adjust;
3374 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3375 int call_dummy_stack_adjust)
3377 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3381 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)
3383 gdb_assert (gdbarch != NULL);
3384 if (gdbarch->fix_call_dummy == 0)
3385 internal_error (__FILE__, __LINE__,
3386 "gdbarch: gdbarch_fix_call_dummy invalid");
3387 if (gdbarch_debug >= 2)
3388 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3389 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3393 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3394 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3396 gdbarch->fix_call_dummy = fix_call_dummy;
3400 gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3402 gdb_assert (gdbarch != NULL);
3403 if (gdbarch->init_frame_pc_first == 0)
3404 internal_error (__FILE__, __LINE__,
3405 "gdbarch: gdbarch_init_frame_pc_first invalid");
3406 if (gdbarch_debug >= 2)
3407 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n");
3408 gdbarch->init_frame_pc_first (fromleaf, prev);
3412 set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch,
3413 gdbarch_init_frame_pc_first_ftype init_frame_pc_first)
3415 gdbarch->init_frame_pc_first = init_frame_pc_first;
3419 gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3421 gdb_assert (gdbarch != NULL);
3422 if (gdbarch->init_frame_pc == 0)
3423 internal_error (__FILE__, __LINE__,
3424 "gdbarch: gdbarch_init_frame_pc invalid");
3425 if (gdbarch_debug >= 2)
3426 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
3427 gdbarch->init_frame_pc (fromleaf, prev);
3431 set_gdbarch_init_frame_pc (struct gdbarch *gdbarch,
3432 gdbarch_init_frame_pc_ftype init_frame_pc)
3434 gdbarch->init_frame_pc = init_frame_pc;
3438 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3440 gdb_assert (gdbarch != NULL);
3441 if (gdbarch_debug >= 2)
3442 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3443 return gdbarch->believe_pcc_promotion;
3447 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3448 int believe_pcc_promotion)
3450 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3454 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3456 gdb_assert (gdbarch != NULL);
3457 if (gdbarch_debug >= 2)
3458 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3459 return gdbarch->believe_pcc_promotion_type;
3463 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3464 int believe_pcc_promotion_type)
3466 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3470 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3472 gdb_assert (gdbarch != NULL);
3473 if (gdbarch->coerce_float_to_double == 0)
3474 internal_error (__FILE__, __LINE__,
3475 "gdbarch: gdbarch_coerce_float_to_double invalid");
3476 if (gdbarch_debug >= 2)
3477 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3478 return gdbarch->coerce_float_to_double (formal, actual);
3482 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3483 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3485 gdbarch->coerce_float_to_double = coerce_float_to_double;
3489 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)
3491 gdb_assert (gdbarch != NULL);
3492 if (gdbarch->get_saved_register == 0)
3493 internal_error (__FILE__, __LINE__,
3494 "gdbarch: gdbarch_get_saved_register invalid");
3495 if (gdbarch_debug >= 2)
3496 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3497 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3501 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3502 gdbarch_get_saved_register_ftype get_saved_register)
3504 gdbarch->get_saved_register = get_saved_register;
3508 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3510 gdb_assert (gdbarch != NULL);
3511 if (gdbarch->register_convertible == 0)
3512 internal_error (__FILE__, __LINE__,
3513 "gdbarch: gdbarch_register_convertible invalid");
3514 if (gdbarch_debug >= 2)
3515 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3516 return gdbarch->register_convertible (nr);
3520 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3521 gdbarch_register_convertible_ftype register_convertible)
3523 gdbarch->register_convertible = register_convertible;
3527 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3529 gdb_assert (gdbarch != NULL);
3530 if (gdbarch->register_convert_to_virtual == 0)
3531 internal_error (__FILE__, __LINE__,
3532 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3533 if (gdbarch_debug >= 2)
3534 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3535 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3539 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3540 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3542 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3546 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3548 gdb_assert (gdbarch != NULL);
3549 if (gdbarch->register_convert_to_raw == 0)
3550 internal_error (__FILE__, __LINE__,
3551 "gdbarch: gdbarch_register_convert_to_raw invalid");
3552 if (gdbarch_debug >= 2)
3553 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3554 gdbarch->register_convert_to_raw (type, regnum, from, to);
3558 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3559 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3561 gdbarch->register_convert_to_raw = register_convert_to_raw;
3565 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
3567 gdb_assert (gdbarch != NULL);
3568 if (gdbarch->convert_register_p == 0)
3569 internal_error (__FILE__, __LINE__,
3570 "gdbarch: gdbarch_convert_register_p invalid");
3571 if (gdbarch_debug >= 2)
3572 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3573 return gdbarch->convert_register_p (regnum);
3577 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3578 gdbarch_convert_register_p_ftype convert_register_p)
3580 gdbarch->convert_register_p = convert_register_p;
3584 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3586 gdb_assert (gdbarch != NULL);
3587 if (gdbarch->register_to_value == 0)
3588 internal_error (__FILE__, __LINE__,
3589 "gdbarch: gdbarch_register_to_value invalid");
3590 if (gdbarch_debug >= 2)
3591 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3592 gdbarch->register_to_value (regnum, type, from, to);
3596 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3597 gdbarch_register_to_value_ftype register_to_value)
3599 gdbarch->register_to_value = register_to_value;
3603 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3605 gdb_assert (gdbarch != NULL);
3606 if (gdbarch->value_to_register == 0)
3607 internal_error (__FILE__, __LINE__,
3608 "gdbarch: gdbarch_value_to_register invalid");
3609 if (gdbarch_debug >= 2)
3610 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3611 gdbarch->value_to_register (type, regnum, from, to);
3615 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3616 gdbarch_value_to_register_ftype value_to_register)
3618 gdbarch->value_to_register = value_to_register;
3622 gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch)
3624 gdb_assert (gdbarch != NULL);
3625 return gdbarch->fetch_pseudo_register != 0;
3629 gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
3631 gdb_assert (gdbarch != NULL);
3632 if (gdbarch->fetch_pseudo_register == 0)
3633 internal_error (__FILE__, __LINE__,
3634 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3635 if (gdbarch_debug >= 2)
3636 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
3637 gdbarch->fetch_pseudo_register (regnum);
3641 set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
3642 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
3644 gdbarch->fetch_pseudo_register = fetch_pseudo_register;
3648 gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch)
3650 gdb_assert (gdbarch != NULL);
3651 return gdbarch->store_pseudo_register != 0;
3655 gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
3657 gdb_assert (gdbarch != NULL);
3658 if (gdbarch->store_pseudo_register == 0)
3659 internal_error (__FILE__, __LINE__,
3660 "gdbarch: gdbarch_store_pseudo_register invalid");
3661 if (gdbarch_debug >= 2)
3662 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
3663 gdbarch->store_pseudo_register (regnum);
3667 set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
3668 gdbarch_store_pseudo_register_ftype store_pseudo_register)
3670 gdbarch->store_pseudo_register = store_pseudo_register;
3674 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3676 gdb_assert (gdbarch != NULL);
3677 if (gdbarch->pointer_to_address == 0)
3678 internal_error (__FILE__, __LINE__,
3679 "gdbarch: gdbarch_pointer_to_address invalid");
3680 if (gdbarch_debug >= 2)
3681 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3682 return gdbarch->pointer_to_address (type, buf);
3686 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3687 gdbarch_pointer_to_address_ftype pointer_to_address)
3689 gdbarch->pointer_to_address = pointer_to_address;
3693 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3695 gdb_assert (gdbarch != NULL);
3696 if (gdbarch->address_to_pointer == 0)
3697 internal_error (__FILE__, __LINE__,
3698 "gdbarch: gdbarch_address_to_pointer invalid");
3699 if (gdbarch_debug >= 2)
3700 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3701 gdbarch->address_to_pointer (type, buf, addr);
3705 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3706 gdbarch_address_to_pointer_ftype address_to_pointer)
3708 gdbarch->address_to_pointer = address_to_pointer;
3712 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3714 gdb_assert (gdbarch != NULL);
3715 return gdbarch->integer_to_address != 0;
3719 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3721 gdb_assert (gdbarch != NULL);
3722 if (gdbarch->integer_to_address == 0)
3723 internal_error (__FILE__, __LINE__,
3724 "gdbarch: gdbarch_integer_to_address invalid");
3725 if (gdbarch_debug >= 2)
3726 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3727 return gdbarch->integer_to_address (type, buf);
3731 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3732 gdbarch_integer_to_address_ftype integer_to_address)
3734 gdbarch->integer_to_address = integer_to_address;
3738 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3740 gdb_assert (gdbarch != NULL);
3741 if (gdbarch->return_value_on_stack == 0)
3742 internal_error (__FILE__, __LINE__,
3743 "gdbarch: gdbarch_return_value_on_stack invalid");
3744 if (gdbarch_debug >= 2)
3745 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3746 return gdbarch->return_value_on_stack (type);
3750 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3751 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3753 gdbarch->return_value_on_stack = return_value_on_stack;
3757 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3759 gdb_assert (gdbarch != NULL);
3760 if (gdbarch->extract_return_value == 0)
3761 internal_error (__FILE__, __LINE__,
3762 "gdbarch: gdbarch_extract_return_value invalid");
3763 if (gdbarch_debug >= 2)
3764 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3765 gdbarch->extract_return_value (type, regbuf, valbuf);
3769 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3770 gdbarch_extract_return_value_ftype extract_return_value)
3772 gdbarch->extract_return_value = extract_return_value;
3776 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3778 gdb_assert (gdbarch != NULL);
3779 if (gdbarch->push_arguments == 0)
3780 internal_error (__FILE__, __LINE__,
3781 "gdbarch: gdbarch_push_arguments invalid");
3782 if (gdbarch_debug >= 2)
3783 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3784 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3788 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3789 gdbarch_push_arguments_ftype push_arguments)
3791 gdbarch->push_arguments = push_arguments;
3795 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3797 gdb_assert (gdbarch != NULL);
3798 if (gdbarch->push_dummy_frame == 0)
3799 internal_error (__FILE__, __LINE__,
3800 "gdbarch: gdbarch_push_dummy_frame invalid");
3801 if (gdbarch_debug >= 2)
3802 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3803 gdbarch->push_dummy_frame ();
3807 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3808 gdbarch_push_dummy_frame_ftype push_dummy_frame)
3810 gdbarch->push_dummy_frame = push_dummy_frame;
3814 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
3816 gdb_assert (gdbarch != NULL);
3817 return gdbarch->push_return_address != 0;
3821 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3823 gdb_assert (gdbarch != NULL);
3824 if (gdbarch->push_return_address == 0)
3825 internal_error (__FILE__, __LINE__,
3826 "gdbarch: gdbarch_push_return_address invalid");
3827 if (gdbarch_debug >= 2)
3828 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3829 return gdbarch->push_return_address (pc, sp);
3833 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3834 gdbarch_push_return_address_ftype push_return_address)
3836 gdbarch->push_return_address = push_return_address;
3840 gdbarch_pop_frame (struct gdbarch *gdbarch)
3842 gdb_assert (gdbarch != NULL);
3843 if (gdbarch->pop_frame == 0)
3844 internal_error (__FILE__, __LINE__,
3845 "gdbarch: gdbarch_pop_frame invalid");
3846 if (gdbarch_debug >= 2)
3847 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3848 gdbarch->pop_frame ();
3852 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3853 gdbarch_pop_frame_ftype pop_frame)
3855 gdbarch->pop_frame = pop_frame;
3859 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3861 gdb_assert (gdbarch != NULL);
3862 if (gdbarch->store_struct_return == 0)
3863 internal_error (__FILE__, __LINE__,
3864 "gdbarch: gdbarch_store_struct_return invalid");
3865 if (gdbarch_debug >= 2)
3866 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3867 gdbarch->store_struct_return (addr, sp);
3871 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3872 gdbarch_store_struct_return_ftype store_struct_return)
3874 gdbarch->store_struct_return = store_struct_return;
3878 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3880 gdb_assert (gdbarch != NULL);
3881 if (gdbarch->store_return_value == 0)
3882 internal_error (__FILE__, __LINE__,
3883 "gdbarch: gdbarch_store_return_value invalid");
3884 if (gdbarch_debug >= 2)
3885 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3886 gdbarch->store_return_value (type, valbuf);
3890 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3891 gdbarch_store_return_value_ftype store_return_value)
3893 gdbarch->store_return_value = store_return_value;
3897 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
3899 gdb_assert (gdbarch != NULL);
3900 return gdbarch->extract_struct_value_address != 0;
3904 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3906 gdb_assert (gdbarch != NULL);
3907 if (gdbarch->extract_struct_value_address == 0)
3908 internal_error (__FILE__, __LINE__,
3909 "gdbarch: gdbarch_extract_struct_value_address invalid");
3910 if (gdbarch_debug >= 2)
3911 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
3912 return gdbarch->extract_struct_value_address (regbuf);
3916 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
3917 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
3919 gdbarch->extract_struct_value_address = extract_struct_value_address;
3923 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3925 gdb_assert (gdbarch != NULL);
3926 if (gdbarch->use_struct_convention == 0)
3927 internal_error (__FILE__, __LINE__,
3928 "gdbarch: gdbarch_use_struct_convention invalid");
3929 if (gdbarch_debug >= 2)
3930 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3931 return gdbarch->use_struct_convention (gcc_p, value_type);
3935 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3936 gdbarch_use_struct_convention_ftype use_struct_convention)
3938 gdbarch->use_struct_convention = use_struct_convention;
3942 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3944 gdb_assert (gdbarch != NULL);
3945 if (gdbarch->frame_init_saved_regs == 0)
3946 internal_error (__FILE__, __LINE__,
3947 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3948 if (gdbarch_debug >= 2)
3949 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3950 gdbarch->frame_init_saved_regs (frame);
3954 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3955 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
3957 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3961 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
3963 gdb_assert (gdbarch != NULL);
3964 return gdbarch->init_extra_frame_info != 0;
3968 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3970 gdb_assert (gdbarch != NULL);
3971 if (gdbarch->init_extra_frame_info == 0)
3972 internal_error (__FILE__, __LINE__,
3973 "gdbarch: gdbarch_init_extra_frame_info invalid");
3974 if (gdbarch_debug >= 2)
3975 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3976 gdbarch->init_extra_frame_info (fromleaf, frame);
3980 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3981 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
3983 gdbarch->init_extra_frame_info = init_extra_frame_info;
3987 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3989 gdb_assert (gdbarch != NULL);
3990 if (gdbarch->skip_prologue == 0)
3991 internal_error (__FILE__, __LINE__,
3992 "gdbarch: gdbarch_skip_prologue invalid");
3993 if (gdbarch_debug >= 2)
3994 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3995 return gdbarch->skip_prologue (ip);
3999 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4000 gdbarch_skip_prologue_ftype skip_prologue)
4002 gdbarch->skip_prologue = skip_prologue;
4006 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4008 gdb_assert (gdbarch != NULL);
4009 if (gdbarch->prologue_frameless_p == 0)
4010 internal_error (__FILE__, __LINE__,
4011 "gdbarch: gdbarch_prologue_frameless_p invalid");
4012 if (gdbarch_debug >= 2)
4013 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4014 return gdbarch->prologue_frameless_p (ip);
4018 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4019 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4021 gdbarch->prologue_frameless_p = prologue_frameless_p;
4025 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4027 gdb_assert (gdbarch != NULL);
4028 if (gdbarch->inner_than == 0)
4029 internal_error (__FILE__, __LINE__,
4030 "gdbarch: gdbarch_inner_than invalid");
4031 if (gdbarch_debug >= 2)
4032 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4033 return gdbarch->inner_than (lhs, rhs);
4037 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4038 gdbarch_inner_than_ftype inner_than)
4040 gdbarch->inner_than = inner_than;
4043 const unsigned char *
4044 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4046 gdb_assert (gdbarch != NULL);
4047 if (gdbarch->breakpoint_from_pc == 0)
4048 internal_error (__FILE__, __LINE__,
4049 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4050 if (gdbarch_debug >= 2)
4051 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4052 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4056 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4057 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4059 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4063 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4065 gdb_assert (gdbarch != NULL);
4066 if (gdbarch->memory_insert_breakpoint == 0)
4067 internal_error (__FILE__, __LINE__,
4068 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4069 if (gdbarch_debug >= 2)
4070 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4071 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4075 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4076 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4078 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4082 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4084 gdb_assert (gdbarch != NULL);
4085 if (gdbarch->memory_remove_breakpoint == 0)
4086 internal_error (__FILE__, __LINE__,
4087 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4088 if (gdbarch_debug >= 2)
4089 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4090 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4094 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4095 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4097 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4101 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4103 gdb_assert (gdbarch != NULL);
4104 if (gdbarch->decr_pc_after_break == -1)
4105 internal_error (__FILE__, __LINE__,
4106 "gdbarch: gdbarch_decr_pc_after_break invalid");
4107 if (gdbarch_debug >= 2)
4108 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4109 return gdbarch->decr_pc_after_break;
4113 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4114 CORE_ADDR decr_pc_after_break)
4116 gdbarch->decr_pc_after_break = decr_pc_after_break;
4120 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4122 gdb_assert (gdbarch != NULL);
4123 if (gdbarch->prepare_to_proceed == 0)
4124 internal_error (__FILE__, __LINE__,
4125 "gdbarch: gdbarch_prepare_to_proceed invalid");
4126 if (gdbarch_debug >= 2)
4127 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4128 return gdbarch->prepare_to_proceed (select_it);
4132 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4133 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4135 gdbarch->prepare_to_proceed = prepare_to_proceed;
4139 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4141 gdb_assert (gdbarch != NULL);
4142 if (gdbarch->function_start_offset == -1)
4143 internal_error (__FILE__, __LINE__,
4144 "gdbarch: gdbarch_function_start_offset invalid");
4145 if (gdbarch_debug >= 2)
4146 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4147 return gdbarch->function_start_offset;
4151 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4152 CORE_ADDR function_start_offset)
4154 gdbarch->function_start_offset = function_start_offset;
4158 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4160 gdb_assert (gdbarch != NULL);
4161 if (gdbarch->remote_translate_xfer_address == 0)
4162 internal_error (__FILE__, __LINE__,
4163 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4164 if (gdbarch_debug >= 2)
4165 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4166 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4170 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4171 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4173 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4177 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4179 gdb_assert (gdbarch != NULL);
4180 if (gdbarch->frame_args_skip == -1)
4181 internal_error (__FILE__, __LINE__,
4182 "gdbarch: gdbarch_frame_args_skip invalid");
4183 if (gdbarch_debug >= 2)
4184 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4185 return gdbarch->frame_args_skip;
4189 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4190 CORE_ADDR frame_args_skip)
4192 gdbarch->frame_args_skip = frame_args_skip;
4196 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4198 gdb_assert (gdbarch != NULL);
4199 if (gdbarch->frameless_function_invocation == 0)
4200 internal_error (__FILE__, __LINE__,
4201 "gdbarch: gdbarch_frameless_function_invocation invalid");
4202 if (gdbarch_debug >= 2)
4203 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4204 return gdbarch->frameless_function_invocation (fi);
4208 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4209 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4211 gdbarch->frameless_function_invocation = frameless_function_invocation;
4215 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4217 gdb_assert (gdbarch != NULL);
4218 if (gdbarch->frame_chain == 0)
4219 internal_error (__FILE__, __LINE__,
4220 "gdbarch: gdbarch_frame_chain invalid");
4221 if (gdbarch_debug >= 2)
4222 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4223 return gdbarch->frame_chain (frame);
4227 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4228 gdbarch_frame_chain_ftype frame_chain)
4230 gdbarch->frame_chain = frame_chain;
4234 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4236 gdb_assert (gdbarch != NULL);
4237 if (gdbarch->frame_chain_valid == 0)
4238 internal_error (__FILE__, __LINE__,
4239 "gdbarch: gdbarch_frame_chain_valid invalid");
4240 if (gdbarch_debug >= 2)
4241 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4242 return gdbarch->frame_chain_valid (chain, thisframe);
4246 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4247 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4249 gdbarch->frame_chain_valid = frame_chain_valid;
4253 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4255 gdb_assert (gdbarch != NULL);
4256 if (gdbarch->frame_saved_pc == 0)
4257 internal_error (__FILE__, __LINE__,
4258 "gdbarch: gdbarch_frame_saved_pc invalid");
4259 if (gdbarch_debug >= 2)
4260 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4261 return gdbarch->frame_saved_pc (fi);
4265 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4266 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4268 gdbarch->frame_saved_pc = frame_saved_pc;
4272 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4274 gdb_assert (gdbarch != NULL);
4275 if (gdbarch->frame_args_address == 0)
4276 internal_error (__FILE__, __LINE__,
4277 "gdbarch: gdbarch_frame_args_address invalid");
4278 if (gdbarch_debug >= 2)
4279 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4280 return gdbarch->frame_args_address (fi);
4284 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4285 gdbarch_frame_args_address_ftype frame_args_address)
4287 gdbarch->frame_args_address = frame_args_address;
4291 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4293 gdb_assert (gdbarch != NULL);
4294 if (gdbarch->frame_locals_address == 0)
4295 internal_error (__FILE__, __LINE__,
4296 "gdbarch: gdbarch_frame_locals_address invalid");
4297 if (gdbarch_debug >= 2)
4298 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4299 return gdbarch->frame_locals_address (fi);
4303 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4304 gdbarch_frame_locals_address_ftype frame_locals_address)
4306 gdbarch->frame_locals_address = frame_locals_address;
4310 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4312 gdb_assert (gdbarch != NULL);
4313 if (gdbarch->saved_pc_after_call == 0)
4314 internal_error (__FILE__, __LINE__,
4315 "gdbarch: gdbarch_saved_pc_after_call invalid");
4316 if (gdbarch_debug >= 2)
4317 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4318 return gdbarch->saved_pc_after_call (frame);
4322 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4323 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4325 gdbarch->saved_pc_after_call = saved_pc_after_call;
4329 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4331 gdb_assert (gdbarch != NULL);
4332 if (gdbarch->frame_num_args == 0)
4333 internal_error (__FILE__, __LINE__,
4334 "gdbarch: gdbarch_frame_num_args invalid");
4335 if (gdbarch_debug >= 2)
4336 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4337 return gdbarch->frame_num_args (frame);
4341 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4342 gdbarch_frame_num_args_ftype frame_num_args)
4344 gdbarch->frame_num_args = frame_num_args;
4348 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4350 gdb_assert (gdbarch != NULL);
4351 return gdbarch->stack_align != 0;
4355 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4357 gdb_assert (gdbarch != NULL);
4358 if (gdbarch->stack_align == 0)
4359 internal_error (__FILE__, __LINE__,
4360 "gdbarch: gdbarch_stack_align invalid");
4361 if (gdbarch_debug >= 2)
4362 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4363 return gdbarch->stack_align (sp);
4367 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4368 gdbarch_stack_align_ftype stack_align)
4370 gdbarch->stack_align = stack_align;
4374 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4376 gdb_assert (gdbarch != NULL);
4377 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4378 if (gdbarch_debug >= 2)
4379 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4380 return gdbarch->extra_stack_alignment_needed;
4384 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4385 int extra_stack_alignment_needed)
4387 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4391 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4393 gdb_assert (gdbarch != NULL);
4394 return gdbarch->reg_struct_has_addr != 0;
4398 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4400 gdb_assert (gdbarch != NULL);
4401 if (gdbarch->reg_struct_has_addr == 0)
4402 internal_error (__FILE__, __LINE__,
4403 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4404 if (gdbarch_debug >= 2)
4405 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4406 return gdbarch->reg_struct_has_addr (gcc_p, type);
4410 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4411 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4413 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4417 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4419 gdb_assert (gdbarch != NULL);
4420 return gdbarch->save_dummy_frame_tos != 0;
4424 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4426 gdb_assert (gdbarch != NULL);
4427 if (gdbarch->save_dummy_frame_tos == 0)
4428 internal_error (__FILE__, __LINE__,
4429 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4430 if (gdbarch_debug >= 2)
4431 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4432 gdbarch->save_dummy_frame_tos (sp);
4436 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4437 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4439 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4443 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4445 gdb_assert (gdbarch != NULL);
4446 if (gdbarch_debug >= 2)
4447 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4448 return gdbarch->parm_boundary;
4452 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4455 gdbarch->parm_boundary = parm_boundary;
4458 const struct floatformat *
4459 gdbarch_float_format (struct gdbarch *gdbarch)
4461 gdb_assert (gdbarch != NULL);
4462 if (gdbarch_debug >= 2)
4463 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4464 return gdbarch->float_format;
4468 set_gdbarch_float_format (struct gdbarch *gdbarch,
4469 const struct floatformat * float_format)
4471 gdbarch->float_format = float_format;
4474 const struct floatformat *
4475 gdbarch_double_format (struct gdbarch *gdbarch)
4477 gdb_assert (gdbarch != NULL);
4478 if (gdbarch_debug >= 2)
4479 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4480 return gdbarch->double_format;
4484 set_gdbarch_double_format (struct gdbarch *gdbarch,
4485 const struct floatformat * double_format)
4487 gdbarch->double_format = double_format;
4490 const struct floatformat *
4491 gdbarch_long_double_format (struct gdbarch *gdbarch)
4493 gdb_assert (gdbarch != NULL);
4494 if (gdbarch_debug >= 2)
4495 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4496 return gdbarch->long_double_format;
4500 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4501 const struct floatformat * long_double_format)
4503 gdbarch->long_double_format = long_double_format;
4507 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4509 gdb_assert (gdbarch != NULL);
4510 if (gdbarch->convert_from_func_ptr_addr == 0)
4511 internal_error (__FILE__, __LINE__,
4512 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4513 if (gdbarch_debug >= 2)
4514 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4515 return gdbarch->convert_from_func_ptr_addr (addr);
4519 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4520 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4522 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4526 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4528 gdb_assert (gdbarch != NULL);
4529 if (gdbarch->addr_bits_remove == 0)
4530 internal_error (__FILE__, __LINE__,
4531 "gdbarch: gdbarch_addr_bits_remove invalid");
4532 if (gdbarch_debug >= 2)
4533 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4534 return gdbarch->addr_bits_remove (addr);
4538 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4539 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4541 gdbarch->addr_bits_remove = addr_bits_remove;
4545 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4547 gdb_assert (gdbarch != NULL);
4548 if (gdbarch->smash_text_address == 0)
4549 internal_error (__FILE__, __LINE__,
4550 "gdbarch: gdbarch_smash_text_address invalid");
4551 if (gdbarch_debug >= 2)
4552 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4553 return gdbarch->smash_text_address (addr);
4557 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4558 gdbarch_smash_text_address_ftype smash_text_address)
4560 gdbarch->smash_text_address = smash_text_address;
4564 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4566 gdb_assert (gdbarch != NULL);
4567 return gdbarch->software_single_step != 0;
4571 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4573 gdb_assert (gdbarch != NULL);
4574 if (gdbarch->software_single_step == 0)
4575 internal_error (__FILE__, __LINE__,
4576 "gdbarch: gdbarch_software_single_step invalid");
4577 if (gdbarch_debug >= 2)
4578 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4579 gdbarch->software_single_step (sig, insert_breakpoints_p);
4583 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4584 gdbarch_software_single_step_ftype software_single_step)
4586 gdbarch->software_single_step = software_single_step;
4590 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
4592 gdb_assert (gdbarch != NULL);
4593 if (gdbarch->print_insn == 0)
4594 internal_error (__FILE__, __LINE__,
4595 "gdbarch: gdbarch_print_insn invalid");
4596 if (gdbarch_debug >= 2)
4597 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4598 return gdbarch->print_insn (vma, info);
4602 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4603 gdbarch_print_insn_ftype print_insn)
4605 gdbarch->print_insn = print_insn;
4609 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4611 gdb_assert (gdbarch != NULL);
4612 if (gdbarch->skip_trampoline_code == 0)
4613 internal_error (__FILE__, __LINE__,
4614 "gdbarch: gdbarch_skip_trampoline_code invalid");
4615 if (gdbarch_debug >= 2)
4616 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4617 return gdbarch->skip_trampoline_code (pc);
4621 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4622 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4624 gdbarch->skip_trampoline_code = skip_trampoline_code;
4628 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4630 gdb_assert (gdbarch != NULL);
4631 if (gdbarch->in_solib_call_trampoline == 0)
4632 internal_error (__FILE__, __LINE__,
4633 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4634 if (gdbarch_debug >= 2)
4635 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4636 return gdbarch->in_solib_call_trampoline (pc, name);
4640 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4641 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4643 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4647 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4649 gdb_assert (gdbarch != NULL);
4650 if (gdbarch->pc_in_sigtramp == 0)
4651 internal_error (__FILE__, __LINE__,
4652 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4653 if (gdbarch_debug >= 2)
4654 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
4655 return gdbarch->pc_in_sigtramp (pc, name);
4659 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
4660 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
4662 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
4666 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4668 gdb_assert (gdbarch != NULL);
4669 if (gdbarch->in_function_epilogue_p == 0)
4670 internal_error (__FILE__, __LINE__,
4671 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4672 if (gdbarch_debug >= 2)
4673 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4674 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4678 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4679 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4681 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4685 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4687 gdb_assert (gdbarch != NULL);
4688 if (gdbarch->construct_inferior_arguments == 0)
4689 internal_error (__FILE__, __LINE__,
4690 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4691 if (gdbarch_debug >= 2)
4692 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4693 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4697 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4698 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4700 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4704 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
4706 gdb_assert (gdbarch != NULL);
4707 return gdbarch->dwarf2_build_frame_info != 0;
4711 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
4713 gdb_assert (gdbarch != NULL);
4714 if (gdbarch->dwarf2_build_frame_info == 0)
4715 internal_error (__FILE__, __LINE__,
4716 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4717 if (gdbarch_debug >= 2)
4718 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
4719 gdbarch->dwarf2_build_frame_info (objfile);
4723 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
4724 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
4726 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
4730 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4732 gdb_assert (gdbarch != NULL);
4733 if (gdbarch->elf_make_msymbol_special == 0)
4734 internal_error (__FILE__, __LINE__,
4735 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4736 if (gdbarch_debug >= 2)
4737 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4738 gdbarch->elf_make_msymbol_special (sym, msym);
4742 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4743 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4745 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4749 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4751 gdb_assert (gdbarch != NULL);
4752 if (gdbarch->coff_make_msymbol_special == 0)
4753 internal_error (__FILE__, __LINE__,
4754 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4755 if (gdbarch_debug >= 2)
4756 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4757 gdbarch->coff_make_msymbol_special (val, msym);
4761 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4762 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4764 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4768 /* Keep a registry of per-architecture data-pointers required by GDB
4774 gdbarch_data_init_ftype *init;
4775 gdbarch_data_free_ftype *free;
4778 struct gdbarch_data_registration
4780 struct gdbarch_data *data;
4781 struct gdbarch_data_registration *next;
4784 struct gdbarch_data_registry
4787 struct gdbarch_data_registration *registrations;
4790 struct gdbarch_data_registry gdbarch_data_registry =
4795 struct gdbarch_data *
4796 register_gdbarch_data (gdbarch_data_init_ftype *init,
4797 gdbarch_data_free_ftype *free)
4799 struct gdbarch_data_registration **curr;
4800 for (curr = &gdbarch_data_registry.registrations;
4802 curr = &(*curr)->next);
4803 (*curr) = XMALLOC (struct gdbarch_data_registration);
4804 (*curr)->next = NULL;
4805 (*curr)->data = XMALLOC (struct gdbarch_data);
4806 (*curr)->data->index = gdbarch_data_registry.nr++;
4807 (*curr)->data->init = init;
4808 (*curr)->data->free = free;
4809 return (*curr)->data;
4813 /* Walk through all the registered users initializing each in turn. */
4816 init_gdbarch_data (struct gdbarch *gdbarch)
4818 struct gdbarch_data_registration *rego;
4819 for (rego = gdbarch_data_registry.registrations;
4823 struct gdbarch_data *data = rego->data;
4824 gdb_assert (data->index < gdbarch->nr_data);
4825 if (data->init != NULL)
4827 void *pointer = data->init (gdbarch);
4828 set_gdbarch_data (gdbarch, data, pointer);
4833 /* Create/delete the gdbarch data vector. */
4836 alloc_gdbarch_data (struct gdbarch *gdbarch)
4838 gdb_assert (gdbarch->data == NULL);
4839 gdbarch->nr_data = gdbarch_data_registry.nr;
4840 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
4844 free_gdbarch_data (struct gdbarch *gdbarch)
4846 struct gdbarch_data_registration *rego;
4847 gdb_assert (gdbarch->data != NULL);
4848 for (rego = gdbarch_data_registry.registrations;
4852 struct gdbarch_data *data = rego->data;
4853 gdb_assert (data->index < gdbarch->nr_data);
4854 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4856 data->free (gdbarch, gdbarch->data[data->index]);
4857 gdbarch->data[data->index] = NULL;
4860 xfree (gdbarch->data);
4861 gdbarch->data = NULL;
4865 /* Initialize the current value of thee specified per-architecture
4869 set_gdbarch_data (struct gdbarch *gdbarch,
4870 struct gdbarch_data *data,
4873 gdb_assert (data->index < gdbarch->nr_data);
4874 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4875 data->free (gdbarch, gdbarch->data[data->index]);
4876 gdbarch->data[data->index] = pointer;
4879 /* Return the current value of the specified per-architecture
4883 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4885 gdb_assert (data->index < gdbarch->nr_data);
4886 return gdbarch->data[data->index];
4891 /* Keep a registry of swapped data required by GDB modules. */
4896 struct gdbarch_swap_registration *source;
4897 struct gdbarch_swap *next;
4900 struct gdbarch_swap_registration
4903 unsigned long sizeof_data;
4904 gdbarch_swap_ftype *init;
4905 struct gdbarch_swap_registration *next;
4908 struct gdbarch_swap_registry
4911 struct gdbarch_swap_registration *registrations;
4914 struct gdbarch_swap_registry gdbarch_swap_registry =
4920 register_gdbarch_swap (void *data,
4921 unsigned long sizeof_data,
4922 gdbarch_swap_ftype *init)
4924 struct gdbarch_swap_registration **rego;
4925 for (rego = &gdbarch_swap_registry.registrations;
4927 rego = &(*rego)->next);
4928 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4929 (*rego)->next = NULL;
4930 (*rego)->init = init;
4931 (*rego)->data = data;
4932 (*rego)->sizeof_data = sizeof_data;
4936 clear_gdbarch_swap (struct gdbarch *gdbarch)
4938 struct gdbarch_swap *curr;
4939 for (curr = gdbarch->swap;
4943 memset (curr->source->data, 0, curr->source->sizeof_data);
4948 init_gdbarch_swap (struct gdbarch *gdbarch)
4950 struct gdbarch_swap_registration *rego;
4951 struct gdbarch_swap **curr = &gdbarch->swap;
4952 for (rego = gdbarch_swap_registry.registrations;
4956 if (rego->data != NULL)
4958 (*curr) = XMALLOC (struct gdbarch_swap);
4959 (*curr)->source = rego;
4960 (*curr)->swap = xmalloc (rego->sizeof_data);
4961 (*curr)->next = NULL;
4962 curr = &(*curr)->next;
4964 if (rego->init != NULL)
4970 swapout_gdbarch_swap (struct gdbarch *gdbarch)
4972 struct gdbarch_swap *curr;
4973 for (curr = gdbarch->swap;
4976 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4980 swapin_gdbarch_swap (struct gdbarch *gdbarch)
4982 struct gdbarch_swap *curr;
4983 for (curr = gdbarch->swap;
4986 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4990 /* Keep a registry of the architectures known by GDB. */
4992 struct gdbarch_registration
4994 enum bfd_architecture bfd_architecture;
4995 gdbarch_init_ftype *init;
4996 gdbarch_dump_tdep_ftype *dump_tdep;
4997 struct gdbarch_list *arches;
4998 struct gdbarch_registration *next;
5001 static struct gdbarch_registration *gdbarch_registry = NULL;
5004 append_name (const char ***buf, int *nr, const char *name)
5006 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5012 gdbarch_printable_names (void)
5016 /* Accumulate a list of names based on the registed list of
5018 enum bfd_architecture a;
5020 const char **arches = NULL;
5021 struct gdbarch_registration *rego;
5022 for (rego = gdbarch_registry;
5026 const struct bfd_arch_info *ap;
5027 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5029 internal_error (__FILE__, __LINE__,
5030 "gdbarch_architecture_names: multi-arch unknown");
5033 append_name (&arches, &nr_arches, ap->printable_name);
5038 append_name (&arches, &nr_arches, NULL);
5042 /* Just return all the architectures that BFD knows. Assume that
5043 the legacy architecture framework supports them. */
5044 return bfd_arch_list ();
5049 gdbarch_register (enum bfd_architecture bfd_architecture,
5050 gdbarch_init_ftype *init,
5051 gdbarch_dump_tdep_ftype *dump_tdep)
5053 struct gdbarch_registration **curr;
5054 const struct bfd_arch_info *bfd_arch_info;
5055 /* Check that BFD recognizes this architecture */
5056 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5057 if (bfd_arch_info == NULL)
5059 internal_error (__FILE__, __LINE__,
5060 "gdbarch: Attempt to register unknown architecture (%d)",
5063 /* Check that we haven't seen this architecture before */
5064 for (curr = &gdbarch_registry;
5066 curr = &(*curr)->next)
5068 if (bfd_architecture == (*curr)->bfd_architecture)
5069 internal_error (__FILE__, __LINE__,
5070 "gdbarch: Duplicate registraration of architecture (%s)",
5071 bfd_arch_info->printable_name);
5075 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5076 bfd_arch_info->printable_name,
5079 (*curr) = XMALLOC (struct gdbarch_registration);
5080 (*curr)->bfd_architecture = bfd_architecture;
5081 (*curr)->init = init;
5082 (*curr)->dump_tdep = dump_tdep;
5083 (*curr)->arches = NULL;
5084 (*curr)->next = NULL;
5085 /* When non- multi-arch, install whatever target dump routine we've
5086 been provided - hopefully that routine has been written correctly
5087 and works regardless of multi-arch. */
5088 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5089 && startup_gdbarch.dump_tdep == NULL)
5090 startup_gdbarch.dump_tdep = dump_tdep;
5094 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5095 gdbarch_init_ftype *init)
5097 gdbarch_register (bfd_architecture, init, NULL);
5101 /* Look for an architecture using gdbarch_info. Base search on only
5102 BFD_ARCH_INFO and BYTE_ORDER. */
5104 struct gdbarch_list *
5105 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5106 const struct gdbarch_info *info)
5108 for (; arches != NULL; arches = arches->next)
5110 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5112 if (info->byte_order != arches->gdbarch->byte_order)
5120 /* Update the current architecture. Return ZERO if the update request
5124 gdbarch_update_p (struct gdbarch_info info)
5126 struct gdbarch *new_gdbarch;
5127 struct gdbarch *old_gdbarch;
5128 struct gdbarch_registration *rego;
5130 /* Fill in missing parts of the INFO struct using a number of
5131 sources: ``set ...''; INFOabfd supplied; existing target. */
5133 /* ``(gdb) set architecture ...'' */
5134 if (info.bfd_arch_info == NULL
5135 && !TARGET_ARCHITECTURE_AUTO)
5136 info.bfd_arch_info = TARGET_ARCHITECTURE;
5137 if (info.bfd_arch_info == NULL
5138 && info.abfd != NULL
5139 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5140 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5141 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5142 if (info.bfd_arch_info == NULL)
5143 info.bfd_arch_info = TARGET_ARCHITECTURE;
5145 /* ``(gdb) set byte-order ...'' */
5146 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5147 && !TARGET_BYTE_ORDER_AUTO)
5148 info.byte_order = TARGET_BYTE_ORDER;
5149 /* From the INFO struct. */
5150 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5151 && info.abfd != NULL)
5152 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5153 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5154 : BFD_ENDIAN_UNKNOWN);
5155 /* From the current target. */
5156 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5157 info.byte_order = TARGET_BYTE_ORDER;
5159 /* Must have found some sort of architecture. */
5160 gdb_assert (info.bfd_arch_info != NULL);
5164 fprintf_unfiltered (gdb_stdlog,
5165 "gdbarch_update: info.bfd_arch_info %s\n",
5166 (info.bfd_arch_info != NULL
5167 ? info.bfd_arch_info->printable_name
5169 fprintf_unfiltered (gdb_stdlog,
5170 "gdbarch_update: info.byte_order %d (%s)\n",
5172 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5173 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5175 fprintf_unfiltered (gdb_stdlog,
5176 "gdbarch_update: info.abfd 0x%lx\n",
5178 fprintf_unfiltered (gdb_stdlog,
5179 "gdbarch_update: info.tdep_info 0x%lx\n",
5180 (long) info.tdep_info);
5183 /* Find the target that knows about this architecture. */
5184 for (rego = gdbarch_registry;
5187 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5192 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
5196 /* Swap the data belonging to the old target out setting the
5197 installed data to zero. This stops the ->init() function trying
5198 to refer to the previous architecture's global data structures. */
5199 swapout_gdbarch_swap (current_gdbarch);
5200 clear_gdbarch_swap (current_gdbarch);
5202 /* Save the previously selected architecture, setting the global to
5203 NULL. This stops ->init() trying to use the previous
5204 architecture's configuration. The previous architecture may not
5205 even be of the same architecture family. The most recent
5206 architecture of the same family is found at the head of the
5207 rego->arches list. */
5208 old_gdbarch = current_gdbarch;
5209 current_gdbarch = NULL;
5211 /* Ask the target for a replacement architecture. */
5212 new_gdbarch = rego->init (info, rego->arches);
5214 /* Did the target like it? No. Reject the change and revert to the
5215 old architecture. */
5216 if (new_gdbarch == NULL)
5219 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
5220 swapin_gdbarch_swap (old_gdbarch);
5221 current_gdbarch = old_gdbarch;
5225 /* Did the architecture change? No. Oops, put the old architecture
5227 if (old_gdbarch == new_gdbarch)
5230 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5232 new_gdbarch->bfd_arch_info->printable_name);
5233 swapin_gdbarch_swap (old_gdbarch);
5234 current_gdbarch = old_gdbarch;
5238 /* Is this a pre-existing architecture? Yes. Move it to the front
5239 of the list of architectures (keeping the list sorted Most
5240 Recently Used) and then copy it in. */
5242 struct gdbarch_list **list;
5243 for (list = ®o->arches;
5245 list = &(*list)->next)
5247 if ((*list)->gdbarch == new_gdbarch)
5249 struct gdbarch_list *this;
5251 fprintf_unfiltered (gdb_stdlog,
5252 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5254 new_gdbarch->bfd_arch_info->printable_name);
5257 (*list) = this->next;
5258 /* Insert in the front. */
5259 this->next = rego->arches;
5260 rego->arches = this;
5261 /* Copy the new architecture in. */
5262 current_gdbarch = new_gdbarch;
5263 swapin_gdbarch_swap (new_gdbarch);
5264 architecture_changed_event ();
5270 /* Prepend this new architecture to the architecture list (keep the
5271 list sorted Most Recently Used). */
5273 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5274 this->next = rego->arches;
5275 this->gdbarch = new_gdbarch;
5276 rego->arches = this;
5279 /* Switch to this new architecture. Dump it out. */
5280 current_gdbarch = new_gdbarch;
5283 fprintf_unfiltered (gdb_stdlog,
5284 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5286 new_gdbarch->bfd_arch_info->printable_name);
5289 /* Check that the newly installed architecture is valid. Plug in
5290 any post init values. */
5291 new_gdbarch->dump_tdep = rego->dump_tdep;
5292 verify_gdbarch (new_gdbarch);
5294 /* Initialize the per-architecture memory (swap) areas.
5295 CURRENT_GDBARCH must be update before these modules are
5297 init_gdbarch_swap (new_gdbarch);
5299 /* Initialize the per-architecture data-pointer of all parties that
5300 registered an interest in this architecture. CURRENT_GDBARCH
5301 must be updated before these modules are called. */
5302 init_gdbarch_data (new_gdbarch);
5303 architecture_changed_event ();
5306 gdbarch_dump (current_gdbarch, gdb_stdlog);
5314 /* Pointer to the target-dependent disassembly function. */
5315 int (*tm_print_insn) (bfd_vma, disassemble_info *);
5316 disassemble_info tm_print_insn_info;
5319 extern void _initialize_gdbarch (void);
5322 _initialize_gdbarch (void)
5324 struct cmd_list_element *c;
5326 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
5327 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
5328 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
5329 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
5330 tm_print_insn_info.print_address_func = dis_asm_print_address;
5332 add_show_from_set (add_set_cmd ("arch",
5335 (char *)&gdbarch_debug,
5336 "Set architecture debugging.\n\
5337 When non-zero, architecture debugging is enabled.", &setdebuglist),
5339 c = add_set_cmd ("archdebug",
5342 (char *)&gdbarch_debug,
5343 "Set architecture debugging.\n\
5344 When non-zero, architecture debugging is enabled.", &setlist);
5346 deprecate_cmd (c, "set debug arch");
5347 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");