1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb_string.h"
66 #include "gdb-events.h"
68 /* Static function declarations */
70 static void verify_gdbarch (struct gdbarch *gdbarch);
71 static void alloc_gdbarch_data (struct gdbarch *);
72 static void free_gdbarch_data (struct gdbarch *);
73 static void init_gdbarch_swap (struct gdbarch *);
74 static void clear_gdbarch_swap (struct gdbarch *);
75 static void swapout_gdbarch_swap (struct gdbarch *);
76 static void swapin_gdbarch_swap (struct gdbarch *);
78 /* Non-zero if we want to trace architecture code. */
81 #define GDBARCH_DEBUG 0
83 int gdbarch_debug = GDBARCH_DEBUG;
86 /* Maintain the struct gdbarch object */
90 /* Has this architecture been fully initialized? */
92 /* basic architectural information */
93 const struct bfd_arch_info * bfd_arch_info;
96 /* target specific vector. */
97 struct gdbarch_tdep *tdep;
98 gdbarch_dump_tdep_ftype *dump_tdep;
100 /* per-architecture data-pointers */
104 /* per-architecture swap-regions */
105 struct gdbarch_swap *swap;
107 /* Multi-arch values.
109 When extending this structure you must:
113 Declare set/get functions and define the corresponding
116 gdbarch_alloc(): If zero/NULL is not a suitable default,
117 initialize the new field.
119 verify_gdbarch(): Confirm that the target updated the field
122 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
125 ``startup_gdbarch()'': Append an initial value to the static
126 variable (base values on the host's c-type system).
128 get_gdbarch(): Implement the set/get functions (probably using
129 the macro's as shortcuts).
144 gdbarch_read_pc_ftype *read_pc;
145 gdbarch_write_pc_ftype *write_pc;
146 gdbarch_read_fp_ftype *read_fp;
147 gdbarch_read_sp_ftype *read_sp;
148 gdbarch_write_sp_ftype *write_sp;
149 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
150 gdbarch_pseudo_register_read_ftype *pseudo_register_read;
151 gdbarch_pseudo_register_write_ftype *pseudo_register_write;
160 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
161 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
162 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
163 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
164 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
165 gdbarch_register_name_ftype *register_name;
168 gdbarch_register_byte_ftype *register_byte;
169 gdbarch_register_raw_size_ftype *register_raw_size;
170 int max_register_raw_size;
171 gdbarch_register_virtual_size_ftype *register_virtual_size;
172 int max_register_virtual_size;
173 gdbarch_register_virtual_type_ftype *register_virtual_type;
174 gdbarch_do_registers_info_ftype *do_registers_info;
175 gdbarch_print_registers_info_ftype *print_registers_info;
176 gdbarch_print_float_info_ftype *print_float_info;
177 gdbarch_print_vector_info_ftype *print_vector_info;
178 gdbarch_register_sim_regno_ftype *register_sim_regno;
179 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
180 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
181 gdbarch_cannot_store_register_ftype *cannot_store_register;
182 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
183 int use_generic_dummy_frames;
184 int call_dummy_location;
185 gdbarch_call_dummy_address_ftype *call_dummy_address;
186 CORE_ADDR call_dummy_start_offset;
187 CORE_ADDR call_dummy_breakpoint_offset;
188 int call_dummy_breakpoint_offset_p;
189 int call_dummy_length;
190 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
192 LONGEST * call_dummy_words;
193 int sizeof_call_dummy_words;
194 int call_dummy_stack_adjust_p;
195 int call_dummy_stack_adjust;
196 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
197 gdbarch_init_frame_pc_first_ftype *init_frame_pc_first;
198 gdbarch_init_frame_pc_ftype *init_frame_pc;
199 int believe_pcc_promotion;
200 int believe_pcc_promotion_type;
201 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
202 gdbarch_get_saved_register_ftype *get_saved_register;
203 gdbarch_register_convertible_ftype *register_convertible;
204 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
205 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
206 gdbarch_convert_register_p_ftype *convert_register_p;
207 gdbarch_register_to_value_ftype *register_to_value;
208 gdbarch_value_to_register_ftype *value_to_register;
209 gdbarch_pointer_to_address_ftype *pointer_to_address;
210 gdbarch_address_to_pointer_ftype *address_to_pointer;
211 gdbarch_integer_to_address_ftype *integer_to_address;
212 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
213 gdbarch_push_arguments_ftype *push_arguments;
214 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
215 gdbarch_push_return_address_ftype *push_return_address;
216 gdbarch_pop_frame_ftype *pop_frame;
217 gdbarch_store_struct_return_ftype *store_struct_return;
218 gdbarch_extract_return_value_ftype *extract_return_value;
219 gdbarch_store_return_value_ftype *store_return_value;
220 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
221 gdbarch_deprecated_store_return_value_ftype *deprecated_store_return_value;
222 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
223 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
224 gdbarch_use_struct_convention_ftype *use_struct_convention;
225 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
226 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
227 gdbarch_skip_prologue_ftype *skip_prologue;
228 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
229 gdbarch_inner_than_ftype *inner_than;
230 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
231 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
232 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
233 CORE_ADDR decr_pc_after_break;
234 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
235 CORE_ADDR function_start_offset;
236 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
237 CORE_ADDR frame_args_skip;
238 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
239 gdbarch_frame_chain_ftype *frame_chain;
240 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
241 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
242 gdbarch_frame_args_address_ftype *frame_args_address;
243 gdbarch_frame_locals_address_ftype *frame_locals_address;
244 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
245 gdbarch_frame_num_args_ftype *frame_num_args;
246 gdbarch_stack_align_ftype *stack_align;
247 gdbarch_frame_align_ftype *frame_align;
248 int extra_stack_alignment_needed;
249 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
250 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
252 const struct floatformat * float_format;
253 const struct floatformat * double_format;
254 const struct floatformat * long_double_format;
255 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
256 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
257 gdbarch_smash_text_address_ftype *smash_text_address;
258 gdbarch_software_single_step_ftype *software_single_step;
259 gdbarch_print_insn_ftype *print_insn;
260 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
261 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
262 gdbarch_in_solib_return_trampoline_ftype *in_solib_return_trampoline;
263 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
264 gdbarch_sigtramp_start_ftype *sigtramp_start;
265 gdbarch_sigtramp_end_ftype *sigtramp_end;
266 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
267 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
268 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
269 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
270 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
271 const char * name_of_malloc;
272 int cannot_step_breakpoint;
273 int have_nonsteppable_watchpoint;
277 /* The default architecture uses host values (for want of a better
280 extern const struct bfd_arch_info bfd_default_arch_struct;
282 struct gdbarch startup_gdbarch =
284 1, /* Always initialized. */
285 /* basic architecture information */
286 &bfd_default_arch_struct,
288 /* target specific vector and its dump routine */
290 /*per-architecture data-pointers and swap regions */
292 /* Multi-arch values */
296 8 * sizeof (LONGEST),
299 8 * sizeof (long double),
328 generic_register_byte,
329 generic_register_size,
331 generic_register_size,
335 default_print_registers_info,
426 generic_in_function_epilogue_p,
427 construct_inferior_arguments,
433 /* startup_gdbarch() */
436 struct gdbarch *current_gdbarch = &startup_gdbarch;
438 /* Do any initialization needed for a non-multiarch configuration
439 after the _initialize_MODULE functions have been run. */
441 initialize_non_multiarch (void)
443 alloc_gdbarch_data (&startup_gdbarch);
444 /* Ensure that all swap areas are zeroed so that they again think
445 they are starting from scratch. */
446 clear_gdbarch_swap (&startup_gdbarch);
447 init_gdbarch_swap (&startup_gdbarch);
451 /* Create a new ``struct gdbarch'' based on information provided by
452 ``struct gdbarch_info''. */
455 gdbarch_alloc (const struct gdbarch_info *info,
456 struct gdbarch_tdep *tdep)
458 /* NOTE: The new architecture variable is named ``current_gdbarch''
459 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
460 the current local architecture and not the previous global
461 architecture. This ensures that the new architectures initial
462 values are not influenced by the previous architecture. Once
463 everything is parameterised with gdbarch, this will go away. */
464 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
465 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
467 alloc_gdbarch_data (current_gdbarch);
469 current_gdbarch->tdep = tdep;
471 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
472 current_gdbarch->byte_order = info->byte_order;
474 /* Force the explicit initialization of these. */
475 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
476 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
477 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
478 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
479 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
480 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
481 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
482 current_gdbarch->ptr_bit = TARGET_INT_BIT;
483 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
484 current_gdbarch->char_signed = -1;
485 current_gdbarch->read_pc = generic_target_read_pc;
486 current_gdbarch->write_pc = generic_target_write_pc;
487 current_gdbarch->read_fp = generic_target_read_fp;
488 current_gdbarch->read_sp = generic_target_read_sp;
489 current_gdbarch->write_sp = generic_target_write_sp;
490 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
491 current_gdbarch->num_regs = -1;
492 current_gdbarch->sp_regnum = -1;
493 current_gdbarch->fp_regnum = -1;
494 current_gdbarch->pc_regnum = -1;
495 current_gdbarch->ps_regnum = -1;
496 current_gdbarch->fp0_regnum = -1;
497 current_gdbarch->npc_regnum = -1;
498 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
499 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
500 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
501 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
502 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
503 current_gdbarch->register_name = legacy_register_name;
504 current_gdbarch->register_size = -1;
505 current_gdbarch->register_bytes = -1;
506 current_gdbarch->register_byte = generic_register_byte;
507 current_gdbarch->register_raw_size = generic_register_size;
508 current_gdbarch->max_register_raw_size = -1;
509 current_gdbarch->register_virtual_size = generic_register_size;
510 current_gdbarch->max_register_virtual_size = -1;
511 current_gdbarch->print_registers_info = default_print_registers_info;
512 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
513 current_gdbarch->cannot_fetch_register = cannot_register_not;
514 current_gdbarch->cannot_store_register = cannot_register_not;
515 current_gdbarch->use_generic_dummy_frames = -1;
516 current_gdbarch->call_dummy_start_offset = -1;
517 current_gdbarch->call_dummy_breakpoint_offset = -1;
518 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
519 current_gdbarch->call_dummy_length = -1;
520 current_gdbarch->call_dummy_p = -1;
521 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
522 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
523 current_gdbarch->call_dummy_stack_adjust_p = -1;
524 current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
525 current_gdbarch->init_frame_pc = init_frame_pc_default;
526 current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
527 current_gdbarch->get_saved_register = generic_unwind_get_saved_register;
528 current_gdbarch->register_convertible = generic_register_convertible_not;
529 current_gdbarch->convert_register_p = legacy_convert_register_p;
530 current_gdbarch->register_to_value = legacy_register_to_value;
531 current_gdbarch->value_to_register = legacy_value_to_register;
532 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
533 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
534 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
535 current_gdbarch->push_arguments = default_push_arguments;
536 current_gdbarch->extract_return_value = legacy_extract_return_value;
537 current_gdbarch->store_return_value = legacy_store_return_value;
538 current_gdbarch->use_struct_convention = generic_use_struct_convention;
539 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
540 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
541 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
542 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
543 current_gdbarch->decr_pc_after_break = -1;
544 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
545 current_gdbarch->function_start_offset = -1;
546 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
547 current_gdbarch->frame_args_skip = -1;
548 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
549 current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
550 current_gdbarch->extra_stack_alignment_needed = 1;
551 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
552 current_gdbarch->addr_bits_remove = core_addr_identity;
553 current_gdbarch->smash_text_address = core_addr_identity;
554 current_gdbarch->print_insn = legacy_print_insn;
555 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
556 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
557 current_gdbarch->in_solib_return_trampoline = generic_in_solib_return_trampoline;
558 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
559 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
560 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
561 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
562 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
563 current_gdbarch->name_of_malloc = "malloc";
564 /* gdbarch_alloc() */
566 return current_gdbarch;
570 /* Free a gdbarch struct. This should never happen in normal
571 operation --- once you've created a gdbarch, you keep it around.
572 However, if an architecture's init function encounters an error
573 building the structure, it may need to clean up a partially
574 constructed gdbarch. */
577 gdbarch_free (struct gdbarch *arch)
579 gdb_assert (arch != NULL);
580 free_gdbarch_data (arch);
585 /* Ensure that all values in a GDBARCH are reasonable. */
588 verify_gdbarch (struct gdbarch *gdbarch)
591 struct cleanup *cleanups;
594 /* Only perform sanity checks on a multi-arch target. */
597 log = mem_fileopen ();
598 cleanups = make_cleanup_ui_file_delete (log);
600 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
601 fprintf_unfiltered (log, "\n\tbyte-order");
602 if (gdbarch->bfd_arch_info == NULL)
603 fprintf_unfiltered (log, "\n\tbfd_arch_info");
604 /* Check those that need to be defined for the given multi-arch level. */
605 /* Skip verify of short_bit, invalid_p == 0 */
606 /* Skip verify of int_bit, invalid_p == 0 */
607 /* Skip verify of long_bit, invalid_p == 0 */
608 /* Skip verify of long_long_bit, invalid_p == 0 */
609 /* Skip verify of float_bit, invalid_p == 0 */
610 /* Skip verify of double_bit, invalid_p == 0 */
611 /* Skip verify of long_double_bit, invalid_p == 0 */
612 /* Skip verify of ptr_bit, invalid_p == 0 */
613 if (gdbarch->addr_bit == 0)
614 gdbarch->addr_bit = TARGET_PTR_BIT;
615 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
616 if (gdbarch->char_signed == -1)
617 gdbarch->char_signed = 1;
618 /* Skip verify of read_pc, invalid_p == 0 */
619 /* Skip verify of write_pc, invalid_p == 0 */
620 /* Skip verify of read_fp, invalid_p == 0 */
621 /* Skip verify of read_sp, invalid_p == 0 */
622 /* Skip verify of write_sp, invalid_p == 0 */
623 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
624 /* Skip verify of pseudo_register_read, has predicate */
625 /* Skip verify of pseudo_register_write, has predicate */
626 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
627 && (gdbarch->num_regs == -1))
628 fprintf_unfiltered (log, "\n\tnum_regs");
629 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
630 /* Skip verify of sp_regnum, invalid_p == 0 */
631 /* Skip verify of fp_regnum, invalid_p == 0 */
632 /* Skip verify of pc_regnum, invalid_p == 0 */
633 /* Skip verify of ps_regnum, invalid_p == 0 */
634 /* Skip verify of fp0_regnum, invalid_p == 0 */
635 /* Skip verify of npc_regnum, invalid_p == 0 */
636 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
637 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
638 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
639 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
640 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
641 /* Skip verify of register_name, invalid_p == 0 */
642 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
643 && (gdbarch->register_size == -1))
644 fprintf_unfiltered (log, "\n\tregister_size");
645 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
646 && (gdbarch->register_bytes == -1))
647 fprintf_unfiltered (log, "\n\tregister_bytes");
648 /* Skip verify of register_byte, invalid_p == 0 */
649 /* Skip verify of register_raw_size, invalid_p == 0 */
650 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
651 && (gdbarch->max_register_raw_size == -1))
652 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
653 /* Skip verify of register_virtual_size, invalid_p == 0 */
654 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
655 && (gdbarch->max_register_virtual_size == -1))
656 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
657 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
658 && (gdbarch->register_virtual_type == 0))
659 fprintf_unfiltered (log, "\n\tregister_virtual_type");
660 /* Skip verify of do_registers_info, has predicate */
661 /* Skip verify of print_registers_info, invalid_p == 0 */
662 /* Skip verify of print_float_info, has predicate */
663 /* Skip verify of print_vector_info, has predicate */
664 /* Skip verify of register_sim_regno, invalid_p == 0 */
665 /* Skip verify of register_bytes_ok, has predicate */
666 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
667 /* Skip verify of cannot_store_register, invalid_p == 0 */
668 /* Skip verify of get_longjmp_target, has predicate */
669 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
670 && (gdbarch->use_generic_dummy_frames == -1))
671 fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames");
672 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
673 && (gdbarch->call_dummy_location == 0))
674 fprintf_unfiltered (log, "\n\tcall_dummy_location");
675 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
676 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
677 fprintf_unfiltered (log, "\n\tcall_dummy_address");
678 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
679 && (gdbarch->call_dummy_start_offset == -1))
680 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
681 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
682 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
683 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
684 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
685 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
686 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
687 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
688 && (gdbarch->call_dummy_length == -1))
689 fprintf_unfiltered (log, "\n\tcall_dummy_length");
690 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
691 && (gdbarch->pc_in_call_dummy == 0))
692 fprintf_unfiltered (log, "\n\tpc_in_call_dummy");
693 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
694 && (gdbarch->call_dummy_p == -1))
695 fprintf_unfiltered (log, "\n\tcall_dummy_p");
696 /* Skip verify of call_dummy_words, invalid_p == 0 */
697 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
698 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
699 && (gdbarch->call_dummy_stack_adjust_p == -1))
700 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
701 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
702 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
703 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
704 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
705 && (gdbarch->fix_call_dummy == 0))
706 fprintf_unfiltered (log, "\n\tfix_call_dummy");
707 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
708 /* Skip verify of init_frame_pc, invalid_p == 0 */
709 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
710 /* Skip verify of get_saved_register, invalid_p == 0 */
711 /* Skip verify of register_convertible, invalid_p == 0 */
712 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
713 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
714 /* Skip verify of convert_register_p, invalid_p == 0 */
715 /* Skip verify of register_to_value, invalid_p == 0 */
716 /* Skip verify of value_to_register, invalid_p == 0 */
717 /* Skip verify of pointer_to_address, invalid_p == 0 */
718 /* Skip verify of address_to_pointer, invalid_p == 0 */
719 /* Skip verify of integer_to_address, has predicate */
720 /* Skip verify of return_value_on_stack, invalid_p == 0 */
721 /* Skip verify of push_arguments, invalid_p == 0 */
722 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
723 && (gdbarch->push_dummy_frame == 0))
724 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
725 /* Skip verify of push_return_address, has predicate */
726 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
727 && (gdbarch->pop_frame == 0))
728 fprintf_unfiltered (log, "\n\tpop_frame");
729 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
730 && (gdbarch->store_struct_return == 0))
731 fprintf_unfiltered (log, "\n\tstore_struct_return");
732 /* Skip verify of extract_return_value, invalid_p == 0 */
733 /* Skip verify of store_return_value, invalid_p == 0 */
734 /* Skip verify of extract_struct_value_address, has predicate */
735 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
736 /* Skip verify of use_struct_convention, invalid_p == 0 */
737 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
738 && (gdbarch->frame_init_saved_regs == 0))
739 fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
740 /* Skip verify of init_extra_frame_info, has predicate */
741 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
742 && (gdbarch->skip_prologue == 0))
743 fprintf_unfiltered (log, "\n\tskip_prologue");
744 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
745 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
746 && (gdbarch->inner_than == 0))
747 fprintf_unfiltered (log, "\n\tinner_than");
748 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
749 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
750 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
751 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
752 && (gdbarch->decr_pc_after_break == -1))
753 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
754 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
755 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
756 && (gdbarch->function_start_offset == -1))
757 fprintf_unfiltered (log, "\n\tfunction_start_offset");
758 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
759 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
760 && (gdbarch->frame_args_skip == -1))
761 fprintf_unfiltered (log, "\n\tframe_args_skip");
762 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
763 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
764 && (gdbarch->frame_chain == 0))
765 fprintf_unfiltered (log, "\n\tframe_chain");
766 /* Skip verify of frame_chain_valid, invalid_p == 0 */
767 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
768 && (gdbarch->frame_saved_pc == 0))
769 fprintf_unfiltered (log, "\n\tframe_saved_pc");
770 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
771 && (gdbarch->frame_args_address == 0))
772 fprintf_unfiltered (log, "\n\tframe_args_address");
773 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
774 && (gdbarch->frame_locals_address == 0))
775 fprintf_unfiltered (log, "\n\tframe_locals_address");
776 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
777 && (gdbarch->saved_pc_after_call == 0))
778 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
779 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
780 && (gdbarch->frame_num_args == 0))
781 fprintf_unfiltered (log, "\n\tframe_num_args");
782 /* Skip verify of stack_align, has predicate */
783 /* Skip verify of frame_align, has predicate */
784 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
785 /* Skip verify of reg_struct_has_addr, has predicate */
786 /* Skip verify of save_dummy_frame_tos, has predicate */
787 if (gdbarch->float_format == 0)
788 gdbarch->float_format = default_float_format (gdbarch);
789 if (gdbarch->double_format == 0)
790 gdbarch->double_format = default_double_format (gdbarch);
791 if (gdbarch->long_double_format == 0)
792 gdbarch->long_double_format = default_double_format (gdbarch);
793 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
794 /* Skip verify of addr_bits_remove, invalid_p == 0 */
795 /* Skip verify of smash_text_address, invalid_p == 0 */
796 /* Skip verify of software_single_step, has predicate */
797 /* Skip verify of print_insn, invalid_p == 0 */
798 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
799 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
800 /* Skip verify of in_solib_return_trampoline, invalid_p == 0 */
801 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
802 /* Skip verify of sigtramp_start, has predicate */
803 /* Skip verify of sigtramp_end, has predicate */
804 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
805 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
806 /* Skip verify of dwarf2_build_frame_info, has predicate */
807 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
808 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
809 /* Skip verify of name_of_malloc, invalid_p == 0 */
810 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
811 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
812 buf = ui_file_xstrdup (log, &dummy);
813 make_cleanup (xfree, buf);
814 if (strlen (buf) > 0)
815 internal_error (__FILE__, __LINE__,
816 "verify_gdbarch: the following are invalid ...%s",
818 do_cleanups (cleanups);
822 /* Print out the details of the current architecture. */
824 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
825 just happens to match the global variable ``current_gdbarch''. That
826 way macros refering to that variable get the local and not the global
827 version - ulgh. Once everything is parameterised with gdbarch, this
831 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
833 fprintf_unfiltered (file,
834 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
837 fprintf_unfiltered (file,
838 "gdbarch_dump: frame_align = 0x%08lx\n",
839 (long) current_gdbarch->frame_align);
841 fprintf_unfiltered (file,
842 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
843 (long) current_gdbarch->in_function_epilogue_p);
845 fprintf_unfiltered (file,
846 "gdbarch_dump: pseudo_register_read = 0x%08lx\n",
847 (long) current_gdbarch->pseudo_register_read);
849 fprintf_unfiltered (file,
850 "gdbarch_dump: pseudo_register_write = 0x%08lx\n",
851 (long) current_gdbarch->pseudo_register_write);
852 #ifdef ADDRESS_TO_POINTER
854 /* Macro might contain `[{}]' when not multi-arch */
855 fprintf_unfiltered (file,
856 "gdbarch_dump: %s # %s\n",
857 "ADDRESS_TO_POINTER(type, buf, addr)",
858 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
861 fprintf_unfiltered (file,
862 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
863 (long) current_gdbarch->address_to_pointer
864 /*ADDRESS_TO_POINTER ()*/);
866 #ifdef ADDR_BITS_REMOVE
867 fprintf_unfiltered (file,
868 "gdbarch_dump: %s # %s\n",
869 "ADDR_BITS_REMOVE(addr)",
870 XSTRING (ADDR_BITS_REMOVE (addr)));
872 fprintf_unfiltered (file,
873 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
874 (long) current_gdbarch->addr_bits_remove
875 /*ADDR_BITS_REMOVE ()*/);
877 #ifdef BELIEVE_PCC_PROMOTION
878 fprintf_unfiltered (file,
879 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
880 XSTRING (BELIEVE_PCC_PROMOTION));
881 fprintf_unfiltered (file,
882 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
883 BELIEVE_PCC_PROMOTION);
885 #ifdef BELIEVE_PCC_PROMOTION_TYPE
886 fprintf_unfiltered (file,
887 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
888 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
889 fprintf_unfiltered (file,
890 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
891 BELIEVE_PCC_PROMOTION_TYPE);
893 #ifdef BREAKPOINT_FROM_PC
894 fprintf_unfiltered (file,
895 "gdbarch_dump: %s # %s\n",
896 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
897 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
899 fprintf_unfiltered (file,
900 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
901 (long) current_gdbarch->breakpoint_from_pc
902 /*BREAKPOINT_FROM_PC ()*/);
904 #ifdef CALL_DUMMY_ADDRESS
905 fprintf_unfiltered (file,
906 "gdbarch_dump: %s # %s\n",
907 "CALL_DUMMY_ADDRESS()",
908 XSTRING (CALL_DUMMY_ADDRESS ()));
910 fprintf_unfiltered (file,
911 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
912 (long) current_gdbarch->call_dummy_address
913 /*CALL_DUMMY_ADDRESS ()*/);
915 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
916 fprintf_unfiltered (file,
917 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
918 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
919 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
920 fprintf_unfiltered (file,
921 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
922 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
924 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
925 fprintf_unfiltered (file,
926 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
927 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
928 fprintf_unfiltered (file,
929 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
930 CALL_DUMMY_BREAKPOINT_OFFSET_P);
932 #ifdef CALL_DUMMY_LENGTH
933 fprintf_unfiltered (file,
934 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
935 XSTRING (CALL_DUMMY_LENGTH));
936 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
937 fprintf_unfiltered (file,
938 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
941 #ifdef CALL_DUMMY_LOCATION
942 fprintf_unfiltered (file,
943 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
944 XSTRING (CALL_DUMMY_LOCATION));
945 fprintf_unfiltered (file,
946 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
947 CALL_DUMMY_LOCATION);
950 fprintf_unfiltered (file,
951 "gdbarch_dump: CALL_DUMMY_P # %s\n",
952 XSTRING (CALL_DUMMY_P));
953 fprintf_unfiltered (file,
954 "gdbarch_dump: CALL_DUMMY_P = %d\n",
957 #ifdef CALL_DUMMY_STACK_ADJUST
958 fprintf_unfiltered (file,
959 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
960 XSTRING (CALL_DUMMY_STACK_ADJUST));
961 if (CALL_DUMMY_STACK_ADJUST_P)
962 fprintf_unfiltered (file,
963 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
964 (long) CALL_DUMMY_STACK_ADJUST);
966 #ifdef CALL_DUMMY_STACK_ADJUST_P
967 fprintf_unfiltered (file,
968 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
969 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
970 fprintf_unfiltered (file,
971 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
972 (long) CALL_DUMMY_STACK_ADJUST_P);
974 #ifdef CALL_DUMMY_START_OFFSET
975 fprintf_unfiltered (file,
976 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
977 XSTRING (CALL_DUMMY_START_OFFSET));
978 fprintf_unfiltered (file,
979 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
980 (long) CALL_DUMMY_START_OFFSET);
982 #ifdef CALL_DUMMY_WORDS
983 fprintf_unfiltered (file,
984 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
985 XSTRING (CALL_DUMMY_WORDS));
986 fprintf_unfiltered (file,
987 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
988 (long) CALL_DUMMY_WORDS);
990 #ifdef CANNOT_FETCH_REGISTER
991 fprintf_unfiltered (file,
992 "gdbarch_dump: %s # %s\n",
993 "CANNOT_FETCH_REGISTER(regnum)",
994 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
996 fprintf_unfiltered (file,
997 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
998 (long) current_gdbarch->cannot_fetch_register
999 /*CANNOT_FETCH_REGISTER ()*/);
1001 #ifdef CANNOT_STEP_BREAKPOINT
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: CANNOT_STEP_BREAKPOINT # %s\n",
1004 XSTRING (CANNOT_STEP_BREAKPOINT));
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: CANNOT_STEP_BREAKPOINT = %d\n",
1007 CANNOT_STEP_BREAKPOINT);
1009 #ifdef CANNOT_STORE_REGISTER
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: %s # %s\n",
1012 "CANNOT_STORE_REGISTER(regnum)",
1013 XSTRING (CANNOT_STORE_REGISTER (regnum)));
1015 fprintf_unfiltered (file,
1016 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1017 (long) current_gdbarch->cannot_store_register
1018 /*CANNOT_STORE_REGISTER ()*/);
1020 #ifdef COERCE_FLOAT_TO_DOUBLE
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: %s # %s\n",
1023 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1024 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
1026 fprintf_unfiltered (file,
1027 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1028 (long) current_gdbarch->coerce_float_to_double
1029 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1031 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
1033 /* Macro might contain `[{}]' when not multi-arch */
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: %s # %s\n",
1036 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
1037 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1040 fprintf_unfiltered (file,
1041 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1042 (long) current_gdbarch->coff_make_msymbol_special
1043 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1048 (long) current_gdbarch->construct_inferior_arguments);
1049 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: %s # %s\n",
1052 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1053 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1057 (long) current_gdbarch->convert_from_func_ptr_addr
1058 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1060 #ifdef CONVERT_REGISTER_P
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: %s # %s\n",
1063 "CONVERT_REGISTER_P(regnum)",
1064 XSTRING (CONVERT_REGISTER_P (regnum)));
1066 fprintf_unfiltered (file,
1067 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1068 (long) current_gdbarch->convert_register_p
1069 /*CONVERT_REGISTER_P ()*/);
1071 #ifdef DECR_PC_AFTER_BREAK
1072 fprintf_unfiltered (file,
1073 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1074 XSTRING (DECR_PC_AFTER_BREAK));
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1077 (long) DECR_PC_AFTER_BREAK);
1079 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1081 /* Macro might contain `[{}]' when not multi-arch */
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: %s # %s\n",
1084 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1085 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1090 (long) current_gdbarch->deprecated_extract_return_value
1091 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1093 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: %s # %s\n",
1096 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1097 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1101 (long) current_gdbarch->deprecated_extract_struct_value_address
1102 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1104 #ifdef DEPRECATED_STORE_RETURN_VALUE
1106 /* Macro might contain `[{}]' when not multi-arch */
1107 fprintf_unfiltered (file,
1108 "gdbarch_dump: %s # %s\n",
1109 "DEPRECATED_STORE_RETURN_VALUE(type, valbuf)",
1110 XSTRING (DEPRECATED_STORE_RETURN_VALUE (type, valbuf)));
1113 fprintf_unfiltered (file,
1114 "gdbarch_dump: DEPRECATED_STORE_RETURN_VALUE = 0x%08lx\n",
1115 (long) current_gdbarch->deprecated_store_return_value
1116 /*DEPRECATED_STORE_RETURN_VALUE ()*/);
1118 #ifdef DO_REGISTERS_INFO
1120 /* Macro might contain `[{}]' when not multi-arch */
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: %s # %s\n",
1123 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1124 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
1127 fprintf_unfiltered (file,
1128 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1129 (long) current_gdbarch->do_registers_info
1130 /*DO_REGISTERS_INFO ()*/);
1132 #ifdef DWARF2_BUILD_FRAME_INFO
1134 /* Macro might contain `[{}]' when not multi-arch */
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: %s # %s\n",
1137 "DWARF2_BUILD_FRAME_INFO(objfile)",
1138 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1141 fprintf_unfiltered (file,
1142 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1143 (long) current_gdbarch->dwarf2_build_frame_info
1144 /*DWARF2_BUILD_FRAME_INFO ()*/);
1146 #ifdef DWARF2_REG_TO_REGNUM
1147 fprintf_unfiltered (file,
1148 "gdbarch_dump: %s # %s\n",
1149 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1150 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1152 fprintf_unfiltered (file,
1153 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1154 (long) current_gdbarch->dwarf2_reg_to_regnum
1155 /*DWARF2_REG_TO_REGNUM ()*/);
1157 #ifdef DWARF_REG_TO_REGNUM
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: %s # %s\n",
1160 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1161 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1163 fprintf_unfiltered (file,
1164 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1165 (long) current_gdbarch->dwarf_reg_to_regnum
1166 /*DWARF_REG_TO_REGNUM ()*/);
1168 #ifdef ECOFF_REG_TO_REGNUM
1169 fprintf_unfiltered (file,
1170 "gdbarch_dump: %s # %s\n",
1171 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1172 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1174 fprintf_unfiltered (file,
1175 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1176 (long) current_gdbarch->ecoff_reg_to_regnum
1177 /*ECOFF_REG_TO_REGNUM ()*/);
1179 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1181 /* Macro might contain `[{}]' when not multi-arch */
1182 fprintf_unfiltered (file,
1183 "gdbarch_dump: %s # %s\n",
1184 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1185 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1188 fprintf_unfiltered (file,
1189 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1190 (long) current_gdbarch->elf_make_msymbol_special
1191 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1193 #ifdef EXTRACT_RETURN_VALUE
1195 /* Macro might contain `[{}]' when not multi-arch */
1196 fprintf_unfiltered (file,
1197 "gdbarch_dump: %s # %s\n",
1198 "EXTRACT_RETURN_VALUE(type, regcache, valbuf)",
1199 XSTRING (EXTRACT_RETURN_VALUE (type, regcache, valbuf)));
1202 fprintf_unfiltered (file,
1203 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1204 (long) current_gdbarch->extract_return_value
1205 /*EXTRACT_RETURN_VALUE ()*/);
1207 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1208 fprintf_unfiltered (file,
1209 "gdbarch_dump: %s # %s\n",
1210 "EXTRACT_STRUCT_VALUE_ADDRESS(regcache)",
1211 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regcache)));
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1215 (long) current_gdbarch->extract_struct_value_address
1216 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1218 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1221 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1222 fprintf_unfiltered (file,
1223 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1224 EXTRA_STACK_ALIGNMENT_NEEDED);
1226 #ifdef FIX_CALL_DUMMY
1228 /* Macro might contain `[{}]' when not multi-arch */
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: %s # %s\n",
1231 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1232 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1237 (long) current_gdbarch->fix_call_dummy
1238 /*FIX_CALL_DUMMY ()*/);
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: FP0_REGNUM # %s\n",
1243 XSTRING (FP0_REGNUM));
1244 fprintf_unfiltered (file,
1245 "gdbarch_dump: FP0_REGNUM = %d\n",
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: FP_REGNUM # %s\n",
1251 XSTRING (FP_REGNUM));
1252 fprintf_unfiltered (file,
1253 "gdbarch_dump: FP_REGNUM = %d\n",
1256 #ifdef FRAMELESS_FUNCTION_INVOCATION
1257 fprintf_unfiltered (file,
1258 "gdbarch_dump: %s # %s\n",
1259 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1260 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1262 fprintf_unfiltered (file,
1263 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1264 (long) current_gdbarch->frameless_function_invocation
1265 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1267 #ifdef FRAME_ARGS_ADDRESS
1268 fprintf_unfiltered (file,
1269 "gdbarch_dump: %s # %s\n",
1270 "FRAME_ARGS_ADDRESS(fi)",
1271 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1273 fprintf_unfiltered (file,
1274 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1275 (long) current_gdbarch->frame_args_address
1276 /*FRAME_ARGS_ADDRESS ()*/);
1278 #ifdef FRAME_ARGS_SKIP
1279 fprintf_unfiltered (file,
1280 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1281 XSTRING (FRAME_ARGS_SKIP));
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1284 (long) FRAME_ARGS_SKIP);
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: %s # %s\n",
1289 "FRAME_CHAIN(frame)",
1290 XSTRING (FRAME_CHAIN (frame)));
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1294 (long) current_gdbarch->frame_chain
1295 /*FRAME_CHAIN ()*/);
1297 #ifdef FRAME_CHAIN_VALID
1298 fprintf_unfiltered (file,
1299 "gdbarch_dump: %s # %s\n",
1300 "FRAME_CHAIN_VALID(chain, thisframe)",
1301 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1305 (long) current_gdbarch->frame_chain_valid
1306 /*FRAME_CHAIN_VALID ()*/);
1308 #ifdef FRAME_INIT_SAVED_REGS
1310 /* Macro might contain `[{}]' when not multi-arch */
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: %s # %s\n",
1313 "FRAME_INIT_SAVED_REGS(frame)",
1314 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1317 fprintf_unfiltered (file,
1318 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1319 (long) current_gdbarch->frame_init_saved_regs
1320 /*FRAME_INIT_SAVED_REGS ()*/);
1322 #ifdef FRAME_LOCALS_ADDRESS
1323 fprintf_unfiltered (file,
1324 "gdbarch_dump: %s # %s\n",
1325 "FRAME_LOCALS_ADDRESS(fi)",
1326 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1330 (long) current_gdbarch->frame_locals_address
1331 /*FRAME_LOCALS_ADDRESS ()*/);
1333 #ifdef FRAME_NUM_ARGS
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: %s # %s\n",
1336 "FRAME_NUM_ARGS(frame)",
1337 XSTRING (FRAME_NUM_ARGS (frame)));
1339 fprintf_unfiltered (file,
1340 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1341 (long) current_gdbarch->frame_num_args
1342 /*FRAME_NUM_ARGS ()*/);
1344 #ifdef FRAME_SAVED_PC
1345 fprintf_unfiltered (file,
1346 "gdbarch_dump: %s # %s\n",
1347 "FRAME_SAVED_PC(fi)",
1348 XSTRING (FRAME_SAVED_PC (fi)));
1350 fprintf_unfiltered (file,
1351 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1352 (long) current_gdbarch->frame_saved_pc
1353 /*FRAME_SAVED_PC ()*/);
1355 #ifdef FUNCTION_START_OFFSET
1356 fprintf_unfiltered (file,
1357 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1358 XSTRING (FUNCTION_START_OFFSET));
1359 fprintf_unfiltered (file,
1360 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1361 (long) FUNCTION_START_OFFSET);
1363 #ifdef GET_LONGJMP_TARGET
1364 fprintf_unfiltered (file,
1365 "gdbarch_dump: %s # %s\n",
1366 "GET_LONGJMP_TARGET(pc)",
1367 XSTRING (GET_LONGJMP_TARGET (pc)));
1369 fprintf_unfiltered (file,
1370 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1371 (long) current_gdbarch->get_longjmp_target
1372 /*GET_LONGJMP_TARGET ()*/);
1374 #ifdef GET_SAVED_REGISTER
1376 /* Macro might contain `[{}]' when not multi-arch */
1377 fprintf_unfiltered (file,
1378 "gdbarch_dump: %s # %s\n",
1379 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1380 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1383 fprintf_unfiltered (file,
1384 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1385 (long) current_gdbarch->get_saved_register
1386 /*GET_SAVED_REGISTER ()*/);
1388 #ifdef HAVE_STEPPABLE_WATCHPOINT
1389 fprintf_unfiltered (file,
1390 "gdbarch_dump: HAVE_STEPPABLE_WATCHPOINT # %s\n",
1391 XSTRING (HAVE_STEPPABLE_WATCHPOINT));
1392 fprintf_unfiltered (file,
1393 "gdbarch_dump: HAVE_STEPPABLE_WATCHPOINT = %d\n",
1394 HAVE_STEPPABLE_WATCHPOINT);
1396 #ifdef INIT_EXTRA_FRAME_INFO
1398 /* Macro might contain `[{}]' when not multi-arch */
1399 fprintf_unfiltered (file,
1400 "gdbarch_dump: %s # %s\n",
1401 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1402 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1405 fprintf_unfiltered (file,
1406 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1407 (long) current_gdbarch->init_extra_frame_info
1408 /*INIT_EXTRA_FRAME_INFO ()*/);
1410 #ifdef INIT_FRAME_PC
1412 /* Macro might contain `[{}]' when not multi-arch */
1413 fprintf_unfiltered (file,
1414 "gdbarch_dump: %s # %s\n",
1415 "INIT_FRAME_PC(fromleaf, prev)",
1416 XSTRING (INIT_FRAME_PC (fromleaf, prev)));
1419 fprintf_unfiltered (file,
1420 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1421 (long) current_gdbarch->init_frame_pc
1422 /*INIT_FRAME_PC ()*/);
1424 #ifdef INIT_FRAME_PC_FIRST
1426 /* Macro might contain `[{}]' when not multi-arch */
1427 fprintf_unfiltered (file,
1428 "gdbarch_dump: %s # %s\n",
1429 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1430 XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev)));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1435 (long) current_gdbarch->init_frame_pc_first
1436 /*INIT_FRAME_PC_FIRST ()*/);
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: %s # %s\n",
1441 "INNER_THAN(lhs, rhs)",
1442 XSTRING (INNER_THAN (lhs, rhs)));
1444 fprintf_unfiltered (file,
1445 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1446 (long) current_gdbarch->inner_than
1449 #ifdef INTEGER_TO_ADDRESS
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: %s # %s\n",
1452 "INTEGER_TO_ADDRESS(type, buf)",
1453 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1455 fprintf_unfiltered (file,
1456 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1457 (long) current_gdbarch->integer_to_address
1458 /*INTEGER_TO_ADDRESS ()*/);
1460 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1461 fprintf_unfiltered (file,
1462 "gdbarch_dump: %s # %s\n",
1463 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1464 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1468 (long) current_gdbarch->in_solib_call_trampoline
1469 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1471 #ifdef IN_SOLIB_RETURN_TRAMPOLINE
1472 fprintf_unfiltered (file,
1473 "gdbarch_dump: %s # %s\n",
1474 "IN_SOLIB_RETURN_TRAMPOLINE(pc, name)",
1475 XSTRING (IN_SOLIB_RETURN_TRAMPOLINE (pc, name)));
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: IN_SOLIB_RETURN_TRAMPOLINE = 0x%08lx\n",
1479 (long) current_gdbarch->in_solib_return_trampoline
1480 /*IN_SOLIB_RETURN_TRAMPOLINE ()*/);
1482 #ifdef MAX_REGISTER_RAW_SIZE
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1485 XSTRING (MAX_REGISTER_RAW_SIZE));
1486 fprintf_unfiltered (file,
1487 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1488 MAX_REGISTER_RAW_SIZE);
1490 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1491 fprintf_unfiltered (file,
1492 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1493 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1494 fprintf_unfiltered (file,
1495 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1496 MAX_REGISTER_VIRTUAL_SIZE);
1498 #ifdef MEMORY_INSERT_BREAKPOINT
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: %s # %s\n",
1501 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1502 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1504 fprintf_unfiltered (file,
1505 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1506 (long) current_gdbarch->memory_insert_breakpoint
1507 /*MEMORY_INSERT_BREAKPOINT ()*/);
1509 #ifdef MEMORY_REMOVE_BREAKPOINT
1510 fprintf_unfiltered (file,
1511 "gdbarch_dump: %s # %s\n",
1512 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1513 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1515 fprintf_unfiltered (file,
1516 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1517 (long) current_gdbarch->memory_remove_breakpoint
1518 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1520 #ifdef NAME_OF_MALLOC
1521 fprintf_unfiltered (file,
1522 "gdbarch_dump: NAME_OF_MALLOC # %s\n",
1523 XSTRING (NAME_OF_MALLOC));
1524 fprintf_unfiltered (file,
1525 "gdbarch_dump: NAME_OF_MALLOC = %ld\n",
1526 (long) NAME_OF_MALLOC);
1529 fprintf_unfiltered (file,
1530 "gdbarch_dump: NPC_REGNUM # %s\n",
1531 XSTRING (NPC_REGNUM));
1532 fprintf_unfiltered (file,
1533 "gdbarch_dump: NPC_REGNUM = %d\n",
1536 #ifdef NUM_PSEUDO_REGS
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1539 XSTRING (NUM_PSEUDO_REGS));
1540 fprintf_unfiltered (file,
1541 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1545 fprintf_unfiltered (file,
1546 "gdbarch_dump: NUM_REGS # %s\n",
1547 XSTRING (NUM_REGS));
1548 fprintf_unfiltered (file,
1549 "gdbarch_dump: NUM_REGS = %d\n",
1552 #ifdef PARM_BOUNDARY
1553 fprintf_unfiltered (file,
1554 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1555 XSTRING (PARM_BOUNDARY));
1556 fprintf_unfiltered (file,
1557 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1560 #ifdef PC_IN_CALL_DUMMY
1561 fprintf_unfiltered (file,
1562 "gdbarch_dump: %s # %s\n",
1563 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1564 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1566 fprintf_unfiltered (file,
1567 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1568 (long) current_gdbarch->pc_in_call_dummy
1569 /*PC_IN_CALL_DUMMY ()*/);
1571 #ifdef PC_IN_SIGTRAMP
1572 fprintf_unfiltered (file,
1573 "gdbarch_dump: %s # %s\n",
1574 "PC_IN_SIGTRAMP(pc, name)",
1575 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1577 fprintf_unfiltered (file,
1578 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1579 (long) current_gdbarch->pc_in_sigtramp
1580 /*PC_IN_SIGTRAMP ()*/);
1583 fprintf_unfiltered (file,
1584 "gdbarch_dump: PC_REGNUM # %s\n",
1585 XSTRING (PC_REGNUM));
1586 fprintf_unfiltered (file,
1587 "gdbarch_dump: PC_REGNUM = %d\n",
1590 #ifdef POINTER_TO_ADDRESS
1591 fprintf_unfiltered (file,
1592 "gdbarch_dump: %s # %s\n",
1593 "POINTER_TO_ADDRESS(type, buf)",
1594 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1598 (long) current_gdbarch->pointer_to_address
1599 /*POINTER_TO_ADDRESS ()*/);
1603 /* Macro might contain `[{}]' when not multi-arch */
1604 fprintf_unfiltered (file,
1605 "gdbarch_dump: %s # %s\n",
1607 XSTRING (POP_FRAME (-)));
1610 fprintf_unfiltered (file,
1611 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1612 (long) current_gdbarch->pop_frame
1615 #ifdef PREPARE_TO_PROCEED
1616 fprintf_unfiltered (file,
1617 "gdbarch_dump: %s # %s\n",
1618 "PREPARE_TO_PROCEED(select_it)",
1619 XSTRING (PREPARE_TO_PROCEED (select_it)));
1621 fprintf_unfiltered (file,
1622 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1623 (long) current_gdbarch->prepare_to_proceed
1624 /*PREPARE_TO_PROCEED ()*/);
1627 fprintf_unfiltered (file,
1628 "gdbarch_dump: print_float_info = 0x%08lx\n",
1629 (long) current_gdbarch->print_float_info);
1631 fprintf_unfiltered (file,
1632 "gdbarch_dump: print_registers_info = 0x%08lx\n",
1633 (long) current_gdbarch->print_registers_info);
1635 fprintf_unfiltered (file,
1636 "gdbarch_dump: print_vector_info = 0x%08lx\n",
1637 (long) current_gdbarch->print_vector_info);
1638 #ifdef PROLOGUE_FRAMELESS_P
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: %s # %s\n",
1641 "PROLOGUE_FRAMELESS_P(ip)",
1642 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1644 fprintf_unfiltered (file,
1645 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1646 (long) current_gdbarch->prologue_frameless_p
1647 /*PROLOGUE_FRAMELESS_P ()*/);
1650 fprintf_unfiltered (file,
1651 "gdbarch_dump: PS_REGNUM # %s\n",
1652 XSTRING (PS_REGNUM));
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: PS_REGNUM = %d\n",
1657 #ifdef PUSH_ARGUMENTS
1658 fprintf_unfiltered (file,
1659 "gdbarch_dump: %s # %s\n",
1660 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1661 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1663 fprintf_unfiltered (file,
1664 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1665 (long) current_gdbarch->push_arguments
1666 /*PUSH_ARGUMENTS ()*/);
1668 #ifdef PUSH_DUMMY_FRAME
1670 /* Macro might contain `[{}]' when not multi-arch */
1671 fprintf_unfiltered (file,
1672 "gdbarch_dump: %s # %s\n",
1673 "PUSH_DUMMY_FRAME(-)",
1674 XSTRING (PUSH_DUMMY_FRAME (-)));
1677 fprintf_unfiltered (file,
1678 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1679 (long) current_gdbarch->push_dummy_frame
1680 /*PUSH_DUMMY_FRAME ()*/);
1682 #ifdef PUSH_RETURN_ADDRESS
1683 fprintf_unfiltered (file,
1684 "gdbarch_dump: %s # %s\n",
1685 "PUSH_RETURN_ADDRESS(pc, sp)",
1686 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1688 fprintf_unfiltered (file,
1689 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1690 (long) current_gdbarch->push_return_address
1691 /*PUSH_RETURN_ADDRESS ()*/);
1693 #ifdef REGISTER_BYTE
1694 fprintf_unfiltered (file,
1695 "gdbarch_dump: %s # %s\n",
1696 "REGISTER_BYTE(reg_nr)",
1697 XSTRING (REGISTER_BYTE (reg_nr)));
1699 fprintf_unfiltered (file,
1700 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1701 (long) current_gdbarch->register_byte
1702 /*REGISTER_BYTE ()*/);
1704 #ifdef REGISTER_BYTES
1705 fprintf_unfiltered (file,
1706 "gdbarch_dump: REGISTER_BYTES # %s\n",
1707 XSTRING (REGISTER_BYTES));
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: REGISTER_BYTES = %d\n",
1712 #ifdef REGISTER_BYTES_OK
1713 fprintf_unfiltered (file,
1714 "gdbarch_dump: %s # %s\n",
1715 "REGISTER_BYTES_OK(nr_bytes)",
1716 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1718 fprintf_unfiltered (file,
1719 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1720 (long) current_gdbarch->register_bytes_ok
1721 /*REGISTER_BYTES_OK ()*/);
1723 #ifdef REGISTER_CONVERTIBLE
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: %s # %s\n",
1726 "REGISTER_CONVERTIBLE(nr)",
1727 XSTRING (REGISTER_CONVERTIBLE (nr)));
1729 fprintf_unfiltered (file,
1730 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1731 (long) current_gdbarch->register_convertible
1732 /*REGISTER_CONVERTIBLE ()*/);
1734 #ifdef REGISTER_CONVERT_TO_RAW
1736 /* Macro might contain `[{}]' when not multi-arch */
1737 fprintf_unfiltered (file,
1738 "gdbarch_dump: %s # %s\n",
1739 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1740 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1743 fprintf_unfiltered (file,
1744 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1745 (long) current_gdbarch->register_convert_to_raw
1746 /*REGISTER_CONVERT_TO_RAW ()*/);
1748 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1750 /* Macro might contain `[{}]' when not multi-arch */
1751 fprintf_unfiltered (file,
1752 "gdbarch_dump: %s # %s\n",
1753 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1754 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1757 fprintf_unfiltered (file,
1758 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1759 (long) current_gdbarch->register_convert_to_virtual
1760 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1762 #ifdef REGISTER_NAME
1763 fprintf_unfiltered (file,
1764 "gdbarch_dump: %s # %s\n",
1765 "REGISTER_NAME(regnr)",
1766 XSTRING (REGISTER_NAME (regnr)));
1768 fprintf_unfiltered (file,
1769 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1770 (long) current_gdbarch->register_name
1771 /*REGISTER_NAME ()*/);
1773 #ifdef REGISTER_RAW_SIZE
1774 fprintf_unfiltered (file,
1775 "gdbarch_dump: %s # %s\n",
1776 "REGISTER_RAW_SIZE(reg_nr)",
1777 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1779 fprintf_unfiltered (file,
1780 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1781 (long) current_gdbarch->register_raw_size
1782 /*REGISTER_RAW_SIZE ()*/);
1784 #ifdef REGISTER_SIM_REGNO
1785 fprintf_unfiltered (file,
1786 "gdbarch_dump: %s # %s\n",
1787 "REGISTER_SIM_REGNO(reg_nr)",
1788 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1790 fprintf_unfiltered (file,
1791 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1792 (long) current_gdbarch->register_sim_regno
1793 /*REGISTER_SIM_REGNO ()*/);
1795 #ifdef REGISTER_SIZE
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: REGISTER_SIZE # %s\n",
1798 XSTRING (REGISTER_SIZE));
1799 fprintf_unfiltered (file,
1800 "gdbarch_dump: REGISTER_SIZE = %d\n",
1803 #ifdef REGISTER_TO_VALUE
1805 /* Macro might contain `[{}]' when not multi-arch */
1806 fprintf_unfiltered (file,
1807 "gdbarch_dump: %s # %s\n",
1808 "REGISTER_TO_VALUE(regnum, type, from, to)",
1809 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
1812 fprintf_unfiltered (file,
1813 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1814 (long) current_gdbarch->register_to_value
1815 /*REGISTER_TO_VALUE ()*/);
1817 #ifdef REGISTER_VIRTUAL_SIZE
1818 fprintf_unfiltered (file,
1819 "gdbarch_dump: %s # %s\n",
1820 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1821 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
1823 fprintf_unfiltered (file,
1824 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1825 (long) current_gdbarch->register_virtual_size
1826 /*REGISTER_VIRTUAL_SIZE ()*/);
1828 #ifdef REGISTER_VIRTUAL_TYPE
1829 fprintf_unfiltered (file,
1830 "gdbarch_dump: %s # %s\n",
1831 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1832 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
1834 fprintf_unfiltered (file,
1835 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1836 (long) current_gdbarch->register_virtual_type
1837 /*REGISTER_VIRTUAL_TYPE ()*/);
1839 #ifdef REG_STRUCT_HAS_ADDR
1840 fprintf_unfiltered (file,
1841 "gdbarch_dump: %s # %s\n",
1842 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1843 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1845 fprintf_unfiltered (file,
1846 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1847 (long) current_gdbarch->reg_struct_has_addr
1848 /*REG_STRUCT_HAS_ADDR ()*/);
1850 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1852 /* Macro might contain `[{}]' when not multi-arch */
1853 fprintf_unfiltered (file,
1854 "gdbarch_dump: %s # %s\n",
1855 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1856 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1859 fprintf_unfiltered (file,
1860 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1861 (long) current_gdbarch->remote_translate_xfer_address
1862 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1864 #ifdef RETURN_VALUE_ON_STACK
1865 fprintf_unfiltered (file,
1866 "gdbarch_dump: %s # %s\n",
1867 "RETURN_VALUE_ON_STACK(type)",
1868 XSTRING (RETURN_VALUE_ON_STACK (type)));
1870 fprintf_unfiltered (file,
1871 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1872 (long) current_gdbarch->return_value_on_stack
1873 /*RETURN_VALUE_ON_STACK ()*/);
1875 #ifdef SAVED_PC_AFTER_CALL
1876 fprintf_unfiltered (file,
1877 "gdbarch_dump: %s # %s\n",
1878 "SAVED_PC_AFTER_CALL(frame)",
1879 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1881 fprintf_unfiltered (file,
1882 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1883 (long) current_gdbarch->saved_pc_after_call
1884 /*SAVED_PC_AFTER_CALL ()*/);
1886 #ifdef SAVE_DUMMY_FRAME_TOS
1888 /* Macro might contain `[{}]' when not multi-arch */
1889 fprintf_unfiltered (file,
1890 "gdbarch_dump: %s # %s\n",
1891 "SAVE_DUMMY_FRAME_TOS(sp)",
1892 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1897 (long) current_gdbarch->save_dummy_frame_tos
1898 /*SAVE_DUMMY_FRAME_TOS ()*/);
1900 #ifdef SDB_REG_TO_REGNUM
1901 fprintf_unfiltered (file,
1902 "gdbarch_dump: %s # %s\n",
1903 "SDB_REG_TO_REGNUM(sdb_regnr)",
1904 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1908 (long) current_gdbarch->sdb_reg_to_regnum
1909 /*SDB_REG_TO_REGNUM ()*/);
1912 fprintf_unfiltered (file,
1913 "gdbarch_dump: %s # %s\n",
1915 XSTRING (SIGTRAMP_END (pc)));
1917 fprintf_unfiltered (file,
1918 "gdbarch_dump: SIGTRAMP_END = 0x%08lx\n",
1919 (long) current_gdbarch->sigtramp_end
1920 /*SIGTRAMP_END ()*/);
1922 #ifdef SIGTRAMP_START
1923 fprintf_unfiltered (file,
1924 "gdbarch_dump: %s # %s\n",
1925 "SIGTRAMP_START(pc)",
1926 XSTRING (SIGTRAMP_START (pc)));
1928 fprintf_unfiltered (file,
1929 "gdbarch_dump: SIGTRAMP_START = 0x%08lx\n",
1930 (long) current_gdbarch->sigtramp_start
1931 /*SIGTRAMP_START ()*/);
1933 #ifdef SIZEOF_CALL_DUMMY_WORDS
1934 fprintf_unfiltered (file,
1935 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1936 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
1937 fprintf_unfiltered (file,
1938 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1939 (long) SIZEOF_CALL_DUMMY_WORDS);
1941 #ifdef SKIP_PROLOGUE
1942 fprintf_unfiltered (file,
1943 "gdbarch_dump: %s # %s\n",
1944 "SKIP_PROLOGUE(ip)",
1945 XSTRING (SKIP_PROLOGUE (ip)));
1947 fprintf_unfiltered (file,
1948 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1949 (long) current_gdbarch->skip_prologue
1950 /*SKIP_PROLOGUE ()*/);
1952 #ifdef SKIP_TRAMPOLINE_CODE
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: %s # %s\n",
1955 "SKIP_TRAMPOLINE_CODE(pc)",
1956 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1958 fprintf_unfiltered (file,
1959 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1960 (long) current_gdbarch->skip_trampoline_code
1961 /*SKIP_TRAMPOLINE_CODE ()*/);
1963 #ifdef SMASH_TEXT_ADDRESS
1964 fprintf_unfiltered (file,
1965 "gdbarch_dump: %s # %s\n",
1966 "SMASH_TEXT_ADDRESS(addr)",
1967 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1971 (long) current_gdbarch->smash_text_address
1972 /*SMASH_TEXT_ADDRESS ()*/);
1974 #ifdef SOFTWARE_SINGLE_STEP
1976 /* Macro might contain `[{}]' when not multi-arch */
1977 fprintf_unfiltered (file,
1978 "gdbarch_dump: %s # %s\n",
1979 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1980 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1983 fprintf_unfiltered (file,
1984 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1985 (long) current_gdbarch->software_single_step
1986 /*SOFTWARE_SINGLE_STEP ()*/);
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: SP_REGNUM # %s\n",
1991 XSTRING (SP_REGNUM));
1992 fprintf_unfiltered (file,
1993 "gdbarch_dump: SP_REGNUM = %d\n",
1996 #ifdef STAB_REG_TO_REGNUM
1997 fprintf_unfiltered (file,
1998 "gdbarch_dump: %s # %s\n",
1999 "STAB_REG_TO_REGNUM(stab_regnr)",
2000 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
2002 fprintf_unfiltered (file,
2003 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
2004 (long) current_gdbarch->stab_reg_to_regnum
2005 /*STAB_REG_TO_REGNUM ()*/);
2008 fprintf_unfiltered (file,
2009 "gdbarch_dump: %s # %s\n",
2011 XSTRING (STACK_ALIGN (sp)));
2013 fprintf_unfiltered (file,
2014 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2015 (long) current_gdbarch->stack_align
2016 /*STACK_ALIGN ()*/);
2018 #ifdef STORE_RETURN_VALUE
2020 /* Macro might contain `[{}]' when not multi-arch */
2021 fprintf_unfiltered (file,
2022 "gdbarch_dump: %s # %s\n",
2023 "STORE_RETURN_VALUE(type, regcache, valbuf)",
2024 XSTRING (STORE_RETURN_VALUE (type, regcache, valbuf)));
2027 fprintf_unfiltered (file,
2028 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
2029 (long) current_gdbarch->store_return_value
2030 /*STORE_RETURN_VALUE ()*/);
2032 #ifdef STORE_STRUCT_RETURN
2034 /* Macro might contain `[{}]' when not multi-arch */
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: %s # %s\n",
2037 "STORE_STRUCT_RETURN(addr, sp)",
2038 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
2041 fprintf_unfiltered (file,
2042 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
2043 (long) current_gdbarch->store_struct_return
2044 /*STORE_STRUCT_RETURN ()*/);
2046 #ifdef TARGET_ADDR_BIT
2047 fprintf_unfiltered (file,
2048 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
2049 XSTRING (TARGET_ADDR_BIT));
2050 fprintf_unfiltered (file,
2051 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
2054 #ifdef TARGET_ARCHITECTURE
2055 fprintf_unfiltered (file,
2056 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
2057 XSTRING (TARGET_ARCHITECTURE));
2058 if (TARGET_ARCHITECTURE != NULL)
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
2061 TARGET_ARCHITECTURE->printable_name);
2063 #ifdef TARGET_BFD_VMA_BIT
2064 fprintf_unfiltered (file,
2065 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
2066 XSTRING (TARGET_BFD_VMA_BIT));
2067 fprintf_unfiltered (file,
2068 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
2069 TARGET_BFD_VMA_BIT);
2071 #ifdef TARGET_BYTE_ORDER
2072 fprintf_unfiltered (file,
2073 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
2074 XSTRING (TARGET_BYTE_ORDER));
2075 fprintf_unfiltered (file,
2076 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
2077 (long) TARGET_BYTE_ORDER);
2079 #ifdef TARGET_CHAR_SIGNED
2080 fprintf_unfiltered (file,
2081 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
2082 XSTRING (TARGET_CHAR_SIGNED));
2083 fprintf_unfiltered (file,
2084 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
2085 TARGET_CHAR_SIGNED);
2087 #ifdef TARGET_DOUBLE_BIT
2088 fprintf_unfiltered (file,
2089 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
2090 XSTRING (TARGET_DOUBLE_BIT));
2091 fprintf_unfiltered (file,
2092 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
2095 #ifdef TARGET_DOUBLE_FORMAT
2096 fprintf_unfiltered (file,
2097 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
2098 XSTRING (TARGET_DOUBLE_FORMAT));
2099 fprintf_unfiltered (file,
2100 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2101 (long) TARGET_DOUBLE_FORMAT);
2103 #ifdef TARGET_FLOAT_BIT
2104 fprintf_unfiltered (file,
2105 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2106 XSTRING (TARGET_FLOAT_BIT));
2107 fprintf_unfiltered (file,
2108 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2111 #ifdef TARGET_FLOAT_FORMAT
2112 fprintf_unfiltered (file,
2113 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2114 XSTRING (TARGET_FLOAT_FORMAT));
2115 fprintf_unfiltered (file,
2116 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2117 (long) TARGET_FLOAT_FORMAT);
2119 #ifdef TARGET_INT_BIT
2120 fprintf_unfiltered (file,
2121 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2122 XSTRING (TARGET_INT_BIT));
2123 fprintf_unfiltered (file,
2124 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2127 #ifdef TARGET_LONG_BIT
2128 fprintf_unfiltered (file,
2129 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2130 XSTRING (TARGET_LONG_BIT));
2131 fprintf_unfiltered (file,
2132 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2135 #ifdef TARGET_LONG_DOUBLE_BIT
2136 fprintf_unfiltered (file,
2137 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2138 XSTRING (TARGET_LONG_DOUBLE_BIT));
2139 fprintf_unfiltered (file,
2140 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2141 TARGET_LONG_DOUBLE_BIT);
2143 #ifdef TARGET_LONG_DOUBLE_FORMAT
2144 fprintf_unfiltered (file,
2145 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2146 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2147 fprintf_unfiltered (file,
2148 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2149 (long) TARGET_LONG_DOUBLE_FORMAT);
2151 #ifdef TARGET_LONG_LONG_BIT
2152 fprintf_unfiltered (file,
2153 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2154 XSTRING (TARGET_LONG_LONG_BIT));
2155 fprintf_unfiltered (file,
2156 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2157 TARGET_LONG_LONG_BIT);
2159 #ifdef TARGET_PRINT_INSN
2160 fprintf_unfiltered (file,
2161 "gdbarch_dump: %s # %s\n",
2162 "TARGET_PRINT_INSN(vma, info)",
2163 XSTRING (TARGET_PRINT_INSN (vma, info)));
2165 fprintf_unfiltered (file,
2166 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2167 (long) current_gdbarch->print_insn
2168 /*TARGET_PRINT_INSN ()*/);
2170 #ifdef TARGET_PTR_BIT
2171 fprintf_unfiltered (file,
2172 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2173 XSTRING (TARGET_PTR_BIT));
2174 fprintf_unfiltered (file,
2175 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2178 #ifdef TARGET_READ_FP
2179 fprintf_unfiltered (file,
2180 "gdbarch_dump: %s # %s\n",
2182 XSTRING (TARGET_READ_FP ()));
2184 fprintf_unfiltered (file,
2185 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2186 (long) current_gdbarch->read_fp
2187 /*TARGET_READ_FP ()*/);
2189 #ifdef TARGET_READ_PC
2190 fprintf_unfiltered (file,
2191 "gdbarch_dump: %s # %s\n",
2192 "TARGET_READ_PC(ptid)",
2193 XSTRING (TARGET_READ_PC (ptid)));
2195 fprintf_unfiltered (file,
2196 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2197 (long) current_gdbarch->read_pc
2198 /*TARGET_READ_PC ()*/);
2200 #ifdef TARGET_READ_SP
2201 fprintf_unfiltered (file,
2202 "gdbarch_dump: %s # %s\n",
2204 XSTRING (TARGET_READ_SP ()));
2206 fprintf_unfiltered (file,
2207 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2208 (long) current_gdbarch->read_sp
2209 /*TARGET_READ_SP ()*/);
2211 #ifdef TARGET_SHORT_BIT
2212 fprintf_unfiltered (file,
2213 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2214 XSTRING (TARGET_SHORT_BIT));
2215 fprintf_unfiltered (file,
2216 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2219 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2221 /* Macro might contain `[{}]' when not multi-arch */
2222 fprintf_unfiltered (file,
2223 "gdbarch_dump: %s # %s\n",
2224 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2225 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2228 fprintf_unfiltered (file,
2229 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2230 (long) current_gdbarch->virtual_frame_pointer
2231 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2233 #ifdef TARGET_WRITE_PC
2235 /* Macro might contain `[{}]' when not multi-arch */
2236 fprintf_unfiltered (file,
2237 "gdbarch_dump: %s # %s\n",
2238 "TARGET_WRITE_PC(val, ptid)",
2239 XSTRING (TARGET_WRITE_PC (val, ptid)));
2242 fprintf_unfiltered (file,
2243 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2244 (long) current_gdbarch->write_pc
2245 /*TARGET_WRITE_PC ()*/);
2247 #ifdef TARGET_WRITE_SP
2249 /* Macro might contain `[{}]' when not multi-arch */
2250 fprintf_unfiltered (file,
2251 "gdbarch_dump: %s # %s\n",
2252 "TARGET_WRITE_SP(val)",
2253 XSTRING (TARGET_WRITE_SP (val)));
2256 fprintf_unfiltered (file,
2257 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2258 (long) current_gdbarch->write_sp
2259 /*TARGET_WRITE_SP ()*/);
2261 #ifdef USE_GENERIC_DUMMY_FRAMES
2262 fprintf_unfiltered (file,
2263 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2264 XSTRING (USE_GENERIC_DUMMY_FRAMES));
2265 fprintf_unfiltered (file,
2266 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2267 USE_GENERIC_DUMMY_FRAMES);
2269 #ifdef USE_STRUCT_CONVENTION
2270 fprintf_unfiltered (file,
2271 "gdbarch_dump: %s # %s\n",
2272 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2273 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2275 fprintf_unfiltered (file,
2276 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2277 (long) current_gdbarch->use_struct_convention
2278 /*USE_STRUCT_CONVENTION ()*/);
2280 #ifdef VALUE_TO_REGISTER
2282 /* Macro might contain `[{}]' when not multi-arch */
2283 fprintf_unfiltered (file,
2284 "gdbarch_dump: %s # %s\n",
2285 "VALUE_TO_REGISTER(type, regnum, from, to)",
2286 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2289 fprintf_unfiltered (file,
2290 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2291 (long) current_gdbarch->value_to_register
2292 /*VALUE_TO_REGISTER ()*/);
2294 if (current_gdbarch->dump_tdep != NULL)
2295 current_gdbarch->dump_tdep (current_gdbarch, file);
2298 struct gdbarch_tdep *
2299 gdbarch_tdep (struct gdbarch *gdbarch)
2301 if (gdbarch_debug >= 2)
2302 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2303 return gdbarch->tdep;
2307 const struct bfd_arch_info *
2308 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2310 gdb_assert (gdbarch != NULL);
2311 if (gdbarch_debug >= 2)
2312 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2313 return gdbarch->bfd_arch_info;
2317 gdbarch_byte_order (struct gdbarch *gdbarch)
2319 gdb_assert (gdbarch != NULL);
2320 if (gdbarch_debug >= 2)
2321 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2322 return gdbarch->byte_order;
2326 gdbarch_short_bit (struct gdbarch *gdbarch)
2328 gdb_assert (gdbarch != NULL);
2329 /* Skip verify of short_bit, invalid_p == 0 */
2330 if (gdbarch_debug >= 2)
2331 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2332 return gdbarch->short_bit;
2336 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2339 gdbarch->short_bit = short_bit;
2343 gdbarch_int_bit (struct gdbarch *gdbarch)
2345 gdb_assert (gdbarch != NULL);
2346 /* Skip verify of int_bit, invalid_p == 0 */
2347 if (gdbarch_debug >= 2)
2348 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2349 return gdbarch->int_bit;
2353 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2356 gdbarch->int_bit = int_bit;
2360 gdbarch_long_bit (struct gdbarch *gdbarch)
2362 gdb_assert (gdbarch != NULL);
2363 /* Skip verify of long_bit, invalid_p == 0 */
2364 if (gdbarch_debug >= 2)
2365 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2366 return gdbarch->long_bit;
2370 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2373 gdbarch->long_bit = long_bit;
2377 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2379 gdb_assert (gdbarch != NULL);
2380 /* Skip verify of long_long_bit, invalid_p == 0 */
2381 if (gdbarch_debug >= 2)
2382 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2383 return gdbarch->long_long_bit;
2387 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2390 gdbarch->long_long_bit = long_long_bit;
2394 gdbarch_float_bit (struct gdbarch *gdbarch)
2396 gdb_assert (gdbarch != NULL);
2397 /* Skip verify of float_bit, invalid_p == 0 */
2398 if (gdbarch_debug >= 2)
2399 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2400 return gdbarch->float_bit;
2404 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2407 gdbarch->float_bit = float_bit;
2411 gdbarch_double_bit (struct gdbarch *gdbarch)
2413 gdb_assert (gdbarch != NULL);
2414 /* Skip verify of double_bit, invalid_p == 0 */
2415 if (gdbarch_debug >= 2)
2416 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2417 return gdbarch->double_bit;
2421 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2424 gdbarch->double_bit = double_bit;
2428 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2430 gdb_assert (gdbarch != NULL);
2431 /* Skip verify of long_double_bit, invalid_p == 0 */
2432 if (gdbarch_debug >= 2)
2433 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2434 return gdbarch->long_double_bit;
2438 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2439 int long_double_bit)
2441 gdbarch->long_double_bit = long_double_bit;
2445 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2447 gdb_assert (gdbarch != NULL);
2448 /* Skip verify of ptr_bit, invalid_p == 0 */
2449 if (gdbarch_debug >= 2)
2450 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2451 return gdbarch->ptr_bit;
2455 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2458 gdbarch->ptr_bit = ptr_bit;
2462 gdbarch_addr_bit (struct gdbarch *gdbarch)
2464 gdb_assert (gdbarch != NULL);
2465 if (gdbarch->addr_bit == 0)
2466 internal_error (__FILE__, __LINE__,
2467 "gdbarch: gdbarch_addr_bit invalid");
2468 if (gdbarch_debug >= 2)
2469 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2470 return gdbarch->addr_bit;
2474 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2477 gdbarch->addr_bit = addr_bit;
2481 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2483 gdb_assert (gdbarch != NULL);
2484 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2485 if (gdbarch_debug >= 2)
2486 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2487 return gdbarch->bfd_vma_bit;
2491 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2494 gdbarch->bfd_vma_bit = bfd_vma_bit;
2498 gdbarch_char_signed (struct gdbarch *gdbarch)
2500 gdb_assert (gdbarch != NULL);
2501 if (gdbarch->char_signed == -1)
2502 internal_error (__FILE__, __LINE__,
2503 "gdbarch: gdbarch_char_signed invalid");
2504 if (gdbarch_debug >= 2)
2505 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2506 return gdbarch->char_signed;
2510 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2513 gdbarch->char_signed = char_signed;
2517 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2519 gdb_assert (gdbarch != NULL);
2520 if (gdbarch->read_pc == 0)
2521 internal_error (__FILE__, __LINE__,
2522 "gdbarch: gdbarch_read_pc invalid");
2523 if (gdbarch_debug >= 2)
2524 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2525 return gdbarch->read_pc (ptid);
2529 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2530 gdbarch_read_pc_ftype read_pc)
2532 gdbarch->read_pc = read_pc;
2536 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2538 gdb_assert (gdbarch != NULL);
2539 if (gdbarch->write_pc == 0)
2540 internal_error (__FILE__, __LINE__,
2541 "gdbarch: gdbarch_write_pc invalid");
2542 if (gdbarch_debug >= 2)
2543 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2544 gdbarch->write_pc (val, ptid);
2548 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2549 gdbarch_write_pc_ftype write_pc)
2551 gdbarch->write_pc = write_pc;
2555 gdbarch_read_fp (struct gdbarch *gdbarch)
2557 gdb_assert (gdbarch != NULL);
2558 if (gdbarch->read_fp == 0)
2559 internal_error (__FILE__, __LINE__,
2560 "gdbarch: gdbarch_read_fp invalid");
2561 if (gdbarch_debug >= 2)
2562 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2563 return gdbarch->read_fp ();
2567 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2568 gdbarch_read_fp_ftype read_fp)
2570 gdbarch->read_fp = read_fp;
2574 gdbarch_read_sp (struct gdbarch *gdbarch)
2576 gdb_assert (gdbarch != NULL);
2577 if (gdbarch->read_sp == 0)
2578 internal_error (__FILE__, __LINE__,
2579 "gdbarch: gdbarch_read_sp invalid");
2580 if (gdbarch_debug >= 2)
2581 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2582 return gdbarch->read_sp ();
2586 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2587 gdbarch_read_sp_ftype read_sp)
2589 gdbarch->read_sp = read_sp;
2593 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2595 gdb_assert (gdbarch != NULL);
2596 if (gdbarch->write_sp == 0)
2597 internal_error (__FILE__, __LINE__,
2598 "gdbarch: gdbarch_write_sp invalid");
2599 if (gdbarch_debug >= 2)
2600 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2601 gdbarch->write_sp (val);
2605 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2606 gdbarch_write_sp_ftype write_sp)
2608 gdbarch->write_sp = write_sp;
2612 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2614 gdb_assert (gdbarch != NULL);
2615 if (gdbarch->virtual_frame_pointer == 0)
2616 internal_error (__FILE__, __LINE__,
2617 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2618 if (gdbarch_debug >= 2)
2619 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2620 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2624 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2625 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2627 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2631 gdbarch_pseudo_register_read_p (struct gdbarch *gdbarch)
2633 gdb_assert (gdbarch != NULL);
2634 return gdbarch->pseudo_register_read != 0;
2638 gdbarch_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, void *buf)
2640 gdb_assert (gdbarch != NULL);
2641 if (gdbarch->pseudo_register_read == 0)
2642 internal_error (__FILE__, __LINE__,
2643 "gdbarch: gdbarch_pseudo_register_read invalid");
2644 if (gdbarch_debug >= 2)
2645 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_read called\n");
2646 gdbarch->pseudo_register_read (gdbarch, regcache, cookednum, buf);
2650 set_gdbarch_pseudo_register_read (struct gdbarch *gdbarch,
2651 gdbarch_pseudo_register_read_ftype pseudo_register_read)
2653 gdbarch->pseudo_register_read = pseudo_register_read;
2657 gdbarch_pseudo_register_write_p (struct gdbarch *gdbarch)
2659 gdb_assert (gdbarch != NULL);
2660 return gdbarch->pseudo_register_write != 0;
2664 gdbarch_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache, int cookednum, const void *buf)
2666 gdb_assert (gdbarch != NULL);
2667 if (gdbarch->pseudo_register_write == 0)
2668 internal_error (__FILE__, __LINE__,
2669 "gdbarch: gdbarch_pseudo_register_write invalid");
2670 if (gdbarch_debug >= 2)
2671 fprintf_unfiltered (gdb_stdlog, "gdbarch_pseudo_register_write called\n");
2672 gdbarch->pseudo_register_write (gdbarch, regcache, cookednum, buf);
2676 set_gdbarch_pseudo_register_write (struct gdbarch *gdbarch,
2677 gdbarch_pseudo_register_write_ftype pseudo_register_write)
2679 gdbarch->pseudo_register_write = pseudo_register_write;
2683 gdbarch_num_regs (struct gdbarch *gdbarch)
2685 gdb_assert (gdbarch != NULL);
2686 if (gdbarch->num_regs == -1)
2687 internal_error (__FILE__, __LINE__,
2688 "gdbarch: gdbarch_num_regs invalid");
2689 if (gdbarch_debug >= 2)
2690 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2691 return gdbarch->num_regs;
2695 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2698 gdbarch->num_regs = num_regs;
2702 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2704 gdb_assert (gdbarch != NULL);
2705 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2706 if (gdbarch_debug >= 2)
2707 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2708 return gdbarch->num_pseudo_regs;
2712 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2713 int num_pseudo_regs)
2715 gdbarch->num_pseudo_regs = num_pseudo_regs;
2719 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2721 gdb_assert (gdbarch != NULL);
2722 /* Skip verify of sp_regnum, invalid_p == 0 */
2723 if (gdbarch_debug >= 2)
2724 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2725 return gdbarch->sp_regnum;
2729 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2732 gdbarch->sp_regnum = sp_regnum;
2736 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2738 gdb_assert (gdbarch != NULL);
2739 /* Skip verify of fp_regnum, invalid_p == 0 */
2740 if (gdbarch_debug >= 2)
2741 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2742 return gdbarch->fp_regnum;
2746 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2749 gdbarch->fp_regnum = fp_regnum;
2753 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2755 gdb_assert (gdbarch != NULL);
2756 /* Skip verify of pc_regnum, invalid_p == 0 */
2757 if (gdbarch_debug >= 2)
2758 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2759 return gdbarch->pc_regnum;
2763 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2766 gdbarch->pc_regnum = pc_regnum;
2770 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2772 gdb_assert (gdbarch != NULL);
2773 /* Skip verify of ps_regnum, invalid_p == 0 */
2774 if (gdbarch_debug >= 2)
2775 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2776 return gdbarch->ps_regnum;
2780 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2783 gdbarch->ps_regnum = ps_regnum;
2787 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2789 gdb_assert (gdbarch != NULL);
2790 /* Skip verify of fp0_regnum, invalid_p == 0 */
2791 if (gdbarch_debug >= 2)
2792 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2793 return gdbarch->fp0_regnum;
2797 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2800 gdbarch->fp0_regnum = fp0_regnum;
2804 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2806 gdb_assert (gdbarch != NULL);
2807 /* Skip verify of npc_regnum, invalid_p == 0 */
2808 if (gdbarch_debug >= 2)
2809 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2810 return gdbarch->npc_regnum;
2814 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2817 gdbarch->npc_regnum = npc_regnum;
2821 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2823 gdb_assert (gdbarch != NULL);
2824 if (gdbarch->stab_reg_to_regnum == 0)
2825 internal_error (__FILE__, __LINE__,
2826 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2827 if (gdbarch_debug >= 2)
2828 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2829 return gdbarch->stab_reg_to_regnum (stab_regnr);
2833 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2834 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2836 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2840 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2842 gdb_assert (gdbarch != NULL);
2843 if (gdbarch->ecoff_reg_to_regnum == 0)
2844 internal_error (__FILE__, __LINE__,
2845 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2846 if (gdbarch_debug >= 2)
2847 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2848 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2852 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2853 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2855 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2859 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2861 gdb_assert (gdbarch != NULL);
2862 if (gdbarch->dwarf_reg_to_regnum == 0)
2863 internal_error (__FILE__, __LINE__,
2864 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2865 if (gdbarch_debug >= 2)
2866 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2867 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2871 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2872 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2874 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2878 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2880 gdb_assert (gdbarch != NULL);
2881 if (gdbarch->sdb_reg_to_regnum == 0)
2882 internal_error (__FILE__, __LINE__,
2883 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2884 if (gdbarch_debug >= 2)
2885 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2886 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2890 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2891 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2893 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2897 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2899 gdb_assert (gdbarch != NULL);
2900 if (gdbarch->dwarf2_reg_to_regnum == 0)
2901 internal_error (__FILE__, __LINE__,
2902 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2903 if (gdbarch_debug >= 2)
2904 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2905 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2909 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2910 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2912 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2916 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2918 gdb_assert (gdbarch != NULL);
2919 if (gdbarch->register_name == 0)
2920 internal_error (__FILE__, __LINE__,
2921 "gdbarch: gdbarch_register_name invalid");
2922 if (gdbarch_debug >= 2)
2923 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2924 return gdbarch->register_name (regnr);
2928 set_gdbarch_register_name (struct gdbarch *gdbarch,
2929 gdbarch_register_name_ftype register_name)
2931 gdbarch->register_name = register_name;
2935 gdbarch_register_size (struct gdbarch *gdbarch)
2937 gdb_assert (gdbarch != NULL);
2938 if (gdbarch->register_size == -1)
2939 internal_error (__FILE__, __LINE__,
2940 "gdbarch: gdbarch_register_size invalid");
2941 if (gdbarch_debug >= 2)
2942 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2943 return gdbarch->register_size;
2947 set_gdbarch_register_size (struct gdbarch *gdbarch,
2950 gdbarch->register_size = register_size;
2954 gdbarch_register_bytes (struct gdbarch *gdbarch)
2956 gdb_assert (gdbarch != NULL);
2957 if (gdbarch->register_bytes == -1)
2958 internal_error (__FILE__, __LINE__,
2959 "gdbarch: gdbarch_register_bytes invalid");
2960 if (gdbarch_debug >= 2)
2961 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2962 return gdbarch->register_bytes;
2966 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2969 gdbarch->register_bytes = register_bytes;
2973 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2975 gdb_assert (gdbarch != NULL);
2976 if (gdbarch->register_byte == 0)
2977 internal_error (__FILE__, __LINE__,
2978 "gdbarch: gdbarch_register_byte invalid");
2979 if (gdbarch_debug >= 2)
2980 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2981 return gdbarch->register_byte (reg_nr);
2985 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2986 gdbarch_register_byte_ftype register_byte)
2988 gdbarch->register_byte = register_byte;
2992 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2994 gdb_assert (gdbarch != NULL);
2995 if (gdbarch->register_raw_size == 0)
2996 internal_error (__FILE__, __LINE__,
2997 "gdbarch: gdbarch_register_raw_size invalid");
2998 if (gdbarch_debug >= 2)
2999 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
3000 return gdbarch->register_raw_size (reg_nr);
3004 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
3005 gdbarch_register_raw_size_ftype register_raw_size)
3007 gdbarch->register_raw_size = register_raw_size;
3011 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
3013 gdb_assert (gdbarch != NULL);
3014 if (gdbarch->max_register_raw_size == -1)
3015 internal_error (__FILE__, __LINE__,
3016 "gdbarch: gdbarch_max_register_raw_size invalid");
3017 if (gdbarch_debug >= 2)
3018 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
3019 return gdbarch->max_register_raw_size;
3023 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
3024 int max_register_raw_size)
3026 gdbarch->max_register_raw_size = max_register_raw_size;
3030 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
3032 gdb_assert (gdbarch != NULL);
3033 if (gdbarch->register_virtual_size == 0)
3034 internal_error (__FILE__, __LINE__,
3035 "gdbarch: gdbarch_register_virtual_size invalid");
3036 if (gdbarch_debug >= 2)
3037 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
3038 return gdbarch->register_virtual_size (reg_nr);
3042 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
3043 gdbarch_register_virtual_size_ftype register_virtual_size)
3045 gdbarch->register_virtual_size = register_virtual_size;
3049 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
3051 gdb_assert (gdbarch != NULL);
3052 if (gdbarch->max_register_virtual_size == -1)
3053 internal_error (__FILE__, __LINE__,
3054 "gdbarch: gdbarch_max_register_virtual_size invalid");
3055 if (gdbarch_debug >= 2)
3056 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
3057 return gdbarch->max_register_virtual_size;
3061 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
3062 int max_register_virtual_size)
3064 gdbarch->max_register_virtual_size = max_register_virtual_size;
3068 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
3070 gdb_assert (gdbarch != NULL);
3071 if (gdbarch->register_virtual_type == 0)
3072 internal_error (__FILE__, __LINE__,
3073 "gdbarch: gdbarch_register_virtual_type invalid");
3074 if (gdbarch_debug >= 2)
3075 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
3076 return gdbarch->register_virtual_type (reg_nr);
3080 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
3081 gdbarch_register_virtual_type_ftype register_virtual_type)
3083 gdbarch->register_virtual_type = register_virtual_type;
3087 gdbarch_do_registers_info_p (struct gdbarch *gdbarch)
3089 gdb_assert (gdbarch != NULL);
3090 return gdbarch->do_registers_info != 0;
3094 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
3096 gdb_assert (gdbarch != NULL);
3097 if (gdbarch->do_registers_info == 0)
3098 internal_error (__FILE__, __LINE__,
3099 "gdbarch: gdbarch_do_registers_info invalid");
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
3102 gdbarch->do_registers_info (reg_nr, fpregs);
3106 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
3107 gdbarch_do_registers_info_ftype do_registers_info)
3109 gdbarch->do_registers_info = do_registers_info;
3113 gdbarch_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, int regnum, int all)
3115 gdb_assert (gdbarch != NULL);
3116 if (gdbarch->print_registers_info == 0)
3117 internal_error (__FILE__, __LINE__,
3118 "gdbarch: gdbarch_print_registers_info invalid");
3119 if (gdbarch_debug >= 2)
3120 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_registers_info called\n");
3121 gdbarch->print_registers_info (gdbarch, file, frame, regnum, all);
3125 set_gdbarch_print_registers_info (struct gdbarch *gdbarch,
3126 gdbarch_print_registers_info_ftype print_registers_info)
3128 gdbarch->print_registers_info = print_registers_info;
3132 gdbarch_print_float_info_p (struct gdbarch *gdbarch)
3134 gdb_assert (gdbarch != NULL);
3135 return gdbarch->print_float_info != 0;
3139 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3141 gdb_assert (gdbarch != NULL);
3142 if (gdbarch->print_float_info == 0)
3143 internal_error (__FILE__, __LINE__,
3144 "gdbarch: gdbarch_print_float_info invalid");
3145 if (gdbarch_debug >= 2)
3146 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3147 gdbarch->print_float_info (gdbarch, file, frame, args);
3151 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3152 gdbarch_print_float_info_ftype print_float_info)
3154 gdbarch->print_float_info = print_float_info;
3158 gdbarch_print_vector_info_p (struct gdbarch *gdbarch)
3160 gdb_assert (gdbarch != NULL);
3161 return gdbarch->print_vector_info != 0;
3165 gdbarch_print_vector_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
3167 gdb_assert (gdbarch != NULL);
3168 if (gdbarch->print_vector_info == 0)
3169 internal_error (__FILE__, __LINE__,
3170 "gdbarch: gdbarch_print_vector_info invalid");
3171 if (gdbarch_debug >= 2)
3172 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_vector_info called\n");
3173 gdbarch->print_vector_info (gdbarch, file, frame, args);
3177 set_gdbarch_print_vector_info (struct gdbarch *gdbarch,
3178 gdbarch_print_vector_info_ftype print_vector_info)
3180 gdbarch->print_vector_info = print_vector_info;
3184 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3186 gdb_assert (gdbarch != NULL);
3187 if (gdbarch->register_sim_regno == 0)
3188 internal_error (__FILE__, __LINE__,
3189 "gdbarch: gdbarch_register_sim_regno invalid");
3190 if (gdbarch_debug >= 2)
3191 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3192 return gdbarch->register_sim_regno (reg_nr);
3196 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3197 gdbarch_register_sim_regno_ftype register_sim_regno)
3199 gdbarch->register_sim_regno = register_sim_regno;
3203 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3205 gdb_assert (gdbarch != NULL);
3206 return gdbarch->register_bytes_ok != 0;
3210 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3212 gdb_assert (gdbarch != NULL);
3213 if (gdbarch->register_bytes_ok == 0)
3214 internal_error (__FILE__, __LINE__,
3215 "gdbarch: gdbarch_register_bytes_ok invalid");
3216 if (gdbarch_debug >= 2)
3217 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3218 return gdbarch->register_bytes_ok (nr_bytes);
3222 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3223 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3225 gdbarch->register_bytes_ok = register_bytes_ok;
3229 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3231 gdb_assert (gdbarch != NULL);
3232 if (gdbarch->cannot_fetch_register == 0)
3233 internal_error (__FILE__, __LINE__,
3234 "gdbarch: gdbarch_cannot_fetch_register invalid");
3235 if (gdbarch_debug >= 2)
3236 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3237 return gdbarch->cannot_fetch_register (regnum);
3241 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3242 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3244 gdbarch->cannot_fetch_register = cannot_fetch_register;
3248 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3250 gdb_assert (gdbarch != NULL);
3251 if (gdbarch->cannot_store_register == 0)
3252 internal_error (__FILE__, __LINE__,
3253 "gdbarch: gdbarch_cannot_store_register invalid");
3254 if (gdbarch_debug >= 2)
3255 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3256 return gdbarch->cannot_store_register (regnum);
3260 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3261 gdbarch_cannot_store_register_ftype cannot_store_register)
3263 gdbarch->cannot_store_register = cannot_store_register;
3267 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3269 gdb_assert (gdbarch != NULL);
3270 return gdbarch->get_longjmp_target != 0;
3274 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3276 gdb_assert (gdbarch != NULL);
3277 if (gdbarch->get_longjmp_target == 0)
3278 internal_error (__FILE__, __LINE__,
3279 "gdbarch: gdbarch_get_longjmp_target invalid");
3280 if (gdbarch_debug >= 2)
3281 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3282 return gdbarch->get_longjmp_target (pc);
3286 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3287 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3289 gdbarch->get_longjmp_target = get_longjmp_target;
3293 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
3295 gdb_assert (gdbarch != NULL);
3296 if (gdbarch->use_generic_dummy_frames == -1)
3297 internal_error (__FILE__, __LINE__,
3298 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3299 if (gdbarch_debug >= 2)
3300 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
3301 return gdbarch->use_generic_dummy_frames;
3305 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
3306 int use_generic_dummy_frames)
3308 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
3312 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3314 gdb_assert (gdbarch != NULL);
3315 if (gdbarch->call_dummy_location == 0)
3316 internal_error (__FILE__, __LINE__,
3317 "gdbarch: gdbarch_call_dummy_location invalid");
3318 if (gdbarch_debug >= 2)
3319 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3320 return gdbarch->call_dummy_location;
3324 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3325 int call_dummy_location)
3327 gdbarch->call_dummy_location = call_dummy_location;
3331 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3333 gdb_assert (gdbarch != NULL);
3334 if (gdbarch->call_dummy_address == 0)
3335 internal_error (__FILE__, __LINE__,
3336 "gdbarch: gdbarch_call_dummy_address invalid");
3337 if (gdbarch_debug >= 2)
3338 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3339 return gdbarch->call_dummy_address ();
3343 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3344 gdbarch_call_dummy_address_ftype call_dummy_address)
3346 gdbarch->call_dummy_address = call_dummy_address;
3350 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3352 gdb_assert (gdbarch != NULL);
3353 if (gdbarch->call_dummy_start_offset == -1)
3354 internal_error (__FILE__, __LINE__,
3355 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3356 if (gdbarch_debug >= 2)
3357 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3358 return gdbarch->call_dummy_start_offset;
3362 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3363 CORE_ADDR call_dummy_start_offset)
3365 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3369 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3371 gdb_assert (gdbarch != NULL);
3372 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
3373 internal_error (__FILE__, __LINE__,
3374 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3375 if (gdbarch_debug >= 2)
3376 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3377 return gdbarch->call_dummy_breakpoint_offset;
3381 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3382 CORE_ADDR call_dummy_breakpoint_offset)
3384 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3388 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3390 gdb_assert (gdbarch != NULL);
3391 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3392 internal_error (__FILE__, __LINE__,
3393 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3394 if (gdbarch_debug >= 2)
3395 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3396 return gdbarch->call_dummy_breakpoint_offset_p;
3400 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3401 int call_dummy_breakpoint_offset_p)
3403 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3407 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3409 gdb_assert (gdbarch != NULL);
3410 if (gdbarch->call_dummy_length == -1)
3411 internal_error (__FILE__, __LINE__,
3412 "gdbarch: gdbarch_call_dummy_length invalid");
3413 if (gdbarch_debug >= 2)
3414 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3415 return gdbarch->call_dummy_length;
3419 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3420 int call_dummy_length)
3422 gdbarch->call_dummy_length = call_dummy_length;
3426 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3428 gdb_assert (gdbarch != NULL);
3429 if (gdbarch->pc_in_call_dummy == 0)
3430 internal_error (__FILE__, __LINE__,
3431 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3432 if (gdbarch_debug >= 2)
3433 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
3434 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
3438 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
3439 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
3441 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
3445 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3447 gdb_assert (gdbarch != NULL);
3448 if (gdbarch->call_dummy_p == -1)
3449 internal_error (__FILE__, __LINE__,
3450 "gdbarch: gdbarch_call_dummy_p invalid");
3451 if (gdbarch_debug >= 2)
3452 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3453 return gdbarch->call_dummy_p;
3457 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3460 gdbarch->call_dummy_p = call_dummy_p;
3464 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3466 gdb_assert (gdbarch != NULL);
3467 /* Skip verify of call_dummy_words, invalid_p == 0 */
3468 if (gdbarch_debug >= 2)
3469 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3470 return gdbarch->call_dummy_words;
3474 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3475 LONGEST * call_dummy_words)
3477 gdbarch->call_dummy_words = call_dummy_words;
3481 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3483 gdb_assert (gdbarch != NULL);
3484 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3485 if (gdbarch_debug >= 2)
3486 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3487 return gdbarch->sizeof_call_dummy_words;
3491 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3492 int sizeof_call_dummy_words)
3494 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3498 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3500 gdb_assert (gdbarch != NULL);
3501 if (gdbarch->call_dummy_stack_adjust_p == -1)
3502 internal_error (__FILE__, __LINE__,
3503 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3504 if (gdbarch_debug >= 2)
3505 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3506 return gdbarch->call_dummy_stack_adjust_p;
3510 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3511 int call_dummy_stack_adjust_p)
3513 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3517 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3519 gdb_assert (gdbarch != NULL);
3520 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3521 internal_error (__FILE__, __LINE__,
3522 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3523 if (gdbarch_debug >= 2)
3524 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3525 return gdbarch->call_dummy_stack_adjust;
3529 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3530 int call_dummy_stack_adjust)
3532 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3536 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)
3538 gdb_assert (gdbarch != NULL);
3539 if (gdbarch->fix_call_dummy == 0)
3540 internal_error (__FILE__, __LINE__,
3541 "gdbarch: gdbarch_fix_call_dummy invalid");
3542 if (gdbarch_debug >= 2)
3543 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3544 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3548 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3549 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3551 gdbarch->fix_call_dummy = fix_call_dummy;
3555 gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3557 gdb_assert (gdbarch != NULL);
3558 if (gdbarch->init_frame_pc_first == 0)
3559 internal_error (__FILE__, __LINE__,
3560 "gdbarch: gdbarch_init_frame_pc_first invalid");
3561 if (gdbarch_debug >= 2)
3562 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n");
3563 gdbarch->init_frame_pc_first (fromleaf, prev);
3567 set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch,
3568 gdbarch_init_frame_pc_first_ftype init_frame_pc_first)
3570 gdbarch->init_frame_pc_first = init_frame_pc_first;
3574 gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3576 gdb_assert (gdbarch != NULL);
3577 if (gdbarch->init_frame_pc == 0)
3578 internal_error (__FILE__, __LINE__,
3579 "gdbarch: gdbarch_init_frame_pc invalid");
3580 if (gdbarch_debug >= 2)
3581 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
3582 gdbarch->init_frame_pc (fromleaf, prev);
3586 set_gdbarch_init_frame_pc (struct gdbarch *gdbarch,
3587 gdbarch_init_frame_pc_ftype init_frame_pc)
3589 gdbarch->init_frame_pc = init_frame_pc;
3593 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3595 gdb_assert (gdbarch != NULL);
3596 if (gdbarch_debug >= 2)
3597 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3598 return gdbarch->believe_pcc_promotion;
3602 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3603 int believe_pcc_promotion)
3605 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3609 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3611 gdb_assert (gdbarch != NULL);
3612 if (gdbarch_debug >= 2)
3613 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3614 return gdbarch->believe_pcc_promotion_type;
3618 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3619 int believe_pcc_promotion_type)
3621 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3625 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3627 gdb_assert (gdbarch != NULL);
3628 if (gdbarch->coerce_float_to_double == 0)
3629 internal_error (__FILE__, __LINE__,
3630 "gdbarch: gdbarch_coerce_float_to_double invalid");
3631 if (gdbarch_debug >= 2)
3632 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3633 return gdbarch->coerce_float_to_double (formal, actual);
3637 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3638 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3640 gdbarch->coerce_float_to_double = coerce_float_to_double;
3644 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)
3646 gdb_assert (gdbarch != NULL);
3647 if (gdbarch->get_saved_register == 0)
3648 internal_error (__FILE__, __LINE__,
3649 "gdbarch: gdbarch_get_saved_register invalid");
3650 if (gdbarch_debug >= 2)
3651 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3652 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3656 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3657 gdbarch_get_saved_register_ftype get_saved_register)
3659 gdbarch->get_saved_register = get_saved_register;
3663 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3665 gdb_assert (gdbarch != NULL);
3666 if (gdbarch->register_convertible == 0)
3667 internal_error (__FILE__, __LINE__,
3668 "gdbarch: gdbarch_register_convertible invalid");
3669 if (gdbarch_debug >= 2)
3670 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3671 return gdbarch->register_convertible (nr);
3675 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3676 gdbarch_register_convertible_ftype register_convertible)
3678 gdbarch->register_convertible = register_convertible;
3682 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3684 gdb_assert (gdbarch != NULL);
3685 if (gdbarch->register_convert_to_virtual == 0)
3686 internal_error (__FILE__, __LINE__,
3687 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3688 if (gdbarch_debug >= 2)
3689 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3690 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3694 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3695 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3697 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3701 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3703 gdb_assert (gdbarch != NULL);
3704 if (gdbarch->register_convert_to_raw == 0)
3705 internal_error (__FILE__, __LINE__,
3706 "gdbarch: gdbarch_register_convert_to_raw invalid");
3707 if (gdbarch_debug >= 2)
3708 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3709 gdbarch->register_convert_to_raw (type, regnum, from, to);
3713 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3714 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3716 gdbarch->register_convert_to_raw = register_convert_to_raw;
3720 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
3722 gdb_assert (gdbarch != NULL);
3723 if (gdbarch->convert_register_p == 0)
3724 internal_error (__FILE__, __LINE__,
3725 "gdbarch: gdbarch_convert_register_p invalid");
3726 if (gdbarch_debug >= 2)
3727 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3728 return gdbarch->convert_register_p (regnum);
3732 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3733 gdbarch_convert_register_p_ftype convert_register_p)
3735 gdbarch->convert_register_p = convert_register_p;
3739 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3741 gdb_assert (gdbarch != NULL);
3742 if (gdbarch->register_to_value == 0)
3743 internal_error (__FILE__, __LINE__,
3744 "gdbarch: gdbarch_register_to_value invalid");
3745 if (gdbarch_debug >= 2)
3746 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3747 gdbarch->register_to_value (regnum, type, from, to);
3751 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3752 gdbarch_register_to_value_ftype register_to_value)
3754 gdbarch->register_to_value = register_to_value;
3758 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3760 gdb_assert (gdbarch != NULL);
3761 if (gdbarch->value_to_register == 0)
3762 internal_error (__FILE__, __LINE__,
3763 "gdbarch: gdbarch_value_to_register invalid");
3764 if (gdbarch_debug >= 2)
3765 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3766 gdbarch->value_to_register (type, regnum, from, to);
3770 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3771 gdbarch_value_to_register_ftype value_to_register)
3773 gdbarch->value_to_register = value_to_register;
3777 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3779 gdb_assert (gdbarch != NULL);
3780 if (gdbarch->pointer_to_address == 0)
3781 internal_error (__FILE__, __LINE__,
3782 "gdbarch: gdbarch_pointer_to_address invalid");
3783 if (gdbarch_debug >= 2)
3784 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3785 return gdbarch->pointer_to_address (type, buf);
3789 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3790 gdbarch_pointer_to_address_ftype pointer_to_address)
3792 gdbarch->pointer_to_address = pointer_to_address;
3796 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3798 gdb_assert (gdbarch != NULL);
3799 if (gdbarch->address_to_pointer == 0)
3800 internal_error (__FILE__, __LINE__,
3801 "gdbarch: gdbarch_address_to_pointer invalid");
3802 if (gdbarch_debug >= 2)
3803 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3804 gdbarch->address_to_pointer (type, buf, addr);
3808 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3809 gdbarch_address_to_pointer_ftype address_to_pointer)
3811 gdbarch->address_to_pointer = address_to_pointer;
3815 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3817 gdb_assert (gdbarch != NULL);
3818 return gdbarch->integer_to_address != 0;
3822 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3824 gdb_assert (gdbarch != NULL);
3825 if (gdbarch->integer_to_address == 0)
3826 internal_error (__FILE__, __LINE__,
3827 "gdbarch: gdbarch_integer_to_address invalid");
3828 if (gdbarch_debug >= 2)
3829 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3830 return gdbarch->integer_to_address (type, buf);
3834 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3835 gdbarch_integer_to_address_ftype integer_to_address)
3837 gdbarch->integer_to_address = integer_to_address;
3841 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3843 gdb_assert (gdbarch != NULL);
3844 if (gdbarch->return_value_on_stack == 0)
3845 internal_error (__FILE__, __LINE__,
3846 "gdbarch: gdbarch_return_value_on_stack invalid");
3847 if (gdbarch_debug >= 2)
3848 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3849 return gdbarch->return_value_on_stack (type);
3853 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3854 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3856 gdbarch->return_value_on_stack = return_value_on_stack;
3860 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3862 gdb_assert (gdbarch != NULL);
3863 if (gdbarch->push_arguments == 0)
3864 internal_error (__FILE__, __LINE__,
3865 "gdbarch: gdbarch_push_arguments invalid");
3866 if (gdbarch_debug >= 2)
3867 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3868 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3872 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3873 gdbarch_push_arguments_ftype push_arguments)
3875 gdbarch->push_arguments = push_arguments;
3879 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3881 gdb_assert (gdbarch != NULL);
3882 if (gdbarch->push_dummy_frame == 0)
3883 internal_error (__FILE__, __LINE__,
3884 "gdbarch: gdbarch_push_dummy_frame invalid");
3885 if (gdbarch_debug >= 2)
3886 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3887 gdbarch->push_dummy_frame ();
3891 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3892 gdbarch_push_dummy_frame_ftype push_dummy_frame)
3894 gdbarch->push_dummy_frame = push_dummy_frame;
3898 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
3900 gdb_assert (gdbarch != NULL);
3901 return gdbarch->push_return_address != 0;
3905 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3907 gdb_assert (gdbarch != NULL);
3908 if (gdbarch->push_return_address == 0)
3909 internal_error (__FILE__, __LINE__,
3910 "gdbarch: gdbarch_push_return_address invalid");
3911 if (gdbarch_debug >= 2)
3912 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3913 return gdbarch->push_return_address (pc, sp);
3917 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3918 gdbarch_push_return_address_ftype push_return_address)
3920 gdbarch->push_return_address = push_return_address;
3924 gdbarch_pop_frame (struct gdbarch *gdbarch)
3926 gdb_assert (gdbarch != NULL);
3927 if (gdbarch->pop_frame == 0)
3928 internal_error (__FILE__, __LINE__,
3929 "gdbarch: gdbarch_pop_frame invalid");
3930 if (gdbarch_debug >= 2)
3931 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3932 gdbarch->pop_frame ();
3936 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3937 gdbarch_pop_frame_ftype pop_frame)
3939 gdbarch->pop_frame = pop_frame;
3943 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3945 gdb_assert (gdbarch != NULL);
3946 if (gdbarch->store_struct_return == 0)
3947 internal_error (__FILE__, __LINE__,
3948 "gdbarch: gdbarch_store_struct_return invalid");
3949 if (gdbarch_debug >= 2)
3950 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3951 gdbarch->store_struct_return (addr, sp);
3955 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3956 gdbarch_store_struct_return_ftype store_struct_return)
3958 gdbarch->store_struct_return = store_struct_return;
3962 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, void *valbuf)
3964 gdb_assert (gdbarch != NULL);
3965 if (gdbarch->extract_return_value == 0)
3966 internal_error (__FILE__, __LINE__,
3967 "gdbarch: gdbarch_extract_return_value invalid");
3968 if (gdbarch_debug >= 2)
3969 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3970 gdbarch->extract_return_value (type, regcache, valbuf);
3974 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3975 gdbarch_extract_return_value_ftype extract_return_value)
3977 gdbarch->extract_return_value = extract_return_value;
3981 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, struct regcache *regcache, const void *valbuf)
3983 gdb_assert (gdbarch != NULL);
3984 if (gdbarch->store_return_value == 0)
3985 internal_error (__FILE__, __LINE__,
3986 "gdbarch: gdbarch_store_return_value invalid");
3987 if (gdbarch_debug >= 2)
3988 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3989 gdbarch->store_return_value (type, regcache, valbuf);
3993 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3994 gdbarch_store_return_value_ftype store_return_value)
3996 gdbarch->store_return_value = store_return_value;
4000 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
4002 gdb_assert (gdbarch != NULL);
4003 if (gdbarch->deprecated_extract_return_value == 0)
4004 internal_error (__FILE__, __LINE__,
4005 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
4006 if (gdbarch_debug >= 2)
4007 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
4008 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
4012 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
4013 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
4015 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
4019 gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
4021 gdb_assert (gdbarch != NULL);
4022 if (gdbarch->deprecated_store_return_value == 0)
4023 internal_error (__FILE__, __LINE__,
4024 "gdbarch: gdbarch_deprecated_store_return_value invalid");
4025 if (gdbarch_debug >= 2)
4026 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_store_return_value called\n");
4027 gdbarch->deprecated_store_return_value (type, valbuf);
4031 set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
4032 gdbarch_deprecated_store_return_value_ftype deprecated_store_return_value)
4034 gdbarch->deprecated_store_return_value = deprecated_store_return_value;
4038 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
4040 gdb_assert (gdbarch != NULL);
4041 return gdbarch->extract_struct_value_address != 0;
4045 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, struct regcache *regcache)
4047 gdb_assert (gdbarch != NULL);
4048 if (gdbarch->extract_struct_value_address == 0)
4049 internal_error (__FILE__, __LINE__,
4050 "gdbarch: gdbarch_extract_struct_value_address invalid");
4051 if (gdbarch_debug >= 2)
4052 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
4053 return gdbarch->extract_struct_value_address (regcache);
4057 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
4058 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
4060 gdbarch->extract_struct_value_address = extract_struct_value_address;
4064 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
4066 gdb_assert (gdbarch != NULL);
4067 return gdbarch->deprecated_extract_struct_value_address != 0;
4071 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
4073 gdb_assert (gdbarch != NULL);
4074 if (gdbarch->deprecated_extract_struct_value_address == 0)
4075 internal_error (__FILE__, __LINE__,
4076 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
4077 if (gdbarch_debug >= 2)
4078 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
4079 return gdbarch->deprecated_extract_struct_value_address (regbuf);
4083 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
4084 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
4086 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
4090 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
4092 gdb_assert (gdbarch != NULL);
4093 if (gdbarch->use_struct_convention == 0)
4094 internal_error (__FILE__, __LINE__,
4095 "gdbarch: gdbarch_use_struct_convention invalid");
4096 if (gdbarch_debug >= 2)
4097 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
4098 return gdbarch->use_struct_convention (gcc_p, value_type);
4102 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
4103 gdbarch_use_struct_convention_ftype use_struct_convention)
4105 gdbarch->use_struct_convention = use_struct_convention;
4109 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
4111 gdb_assert (gdbarch != NULL);
4112 if (gdbarch->frame_init_saved_regs == 0)
4113 internal_error (__FILE__, __LINE__,
4114 "gdbarch: gdbarch_frame_init_saved_regs invalid");
4115 if (gdbarch_debug >= 2)
4116 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
4117 gdbarch->frame_init_saved_regs (frame);
4121 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
4122 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
4124 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
4128 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
4130 gdb_assert (gdbarch != NULL);
4131 return gdbarch->init_extra_frame_info != 0;
4135 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
4137 gdb_assert (gdbarch != NULL);
4138 if (gdbarch->init_extra_frame_info == 0)
4139 internal_error (__FILE__, __LINE__,
4140 "gdbarch: gdbarch_init_extra_frame_info invalid");
4141 if (gdbarch_debug >= 2)
4142 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
4143 gdbarch->init_extra_frame_info (fromleaf, frame);
4147 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
4148 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
4150 gdbarch->init_extra_frame_info = init_extra_frame_info;
4154 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
4156 gdb_assert (gdbarch != NULL);
4157 if (gdbarch->skip_prologue == 0)
4158 internal_error (__FILE__, __LINE__,
4159 "gdbarch: gdbarch_skip_prologue invalid");
4160 if (gdbarch_debug >= 2)
4161 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
4162 return gdbarch->skip_prologue (ip);
4166 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
4167 gdbarch_skip_prologue_ftype skip_prologue)
4169 gdbarch->skip_prologue = skip_prologue;
4173 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
4175 gdb_assert (gdbarch != NULL);
4176 if (gdbarch->prologue_frameless_p == 0)
4177 internal_error (__FILE__, __LINE__,
4178 "gdbarch: gdbarch_prologue_frameless_p invalid");
4179 if (gdbarch_debug >= 2)
4180 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4181 return gdbarch->prologue_frameless_p (ip);
4185 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4186 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4188 gdbarch->prologue_frameless_p = prologue_frameless_p;
4192 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4194 gdb_assert (gdbarch != NULL);
4195 if (gdbarch->inner_than == 0)
4196 internal_error (__FILE__, __LINE__,
4197 "gdbarch: gdbarch_inner_than invalid");
4198 if (gdbarch_debug >= 2)
4199 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4200 return gdbarch->inner_than (lhs, rhs);
4204 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4205 gdbarch_inner_than_ftype inner_than)
4207 gdbarch->inner_than = inner_than;
4210 const unsigned char *
4211 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4213 gdb_assert (gdbarch != NULL);
4214 if (gdbarch->breakpoint_from_pc == 0)
4215 internal_error (__FILE__, __LINE__,
4216 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4217 if (gdbarch_debug >= 2)
4218 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4219 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4223 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4224 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4226 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4230 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4232 gdb_assert (gdbarch != NULL);
4233 if (gdbarch->memory_insert_breakpoint == 0)
4234 internal_error (__FILE__, __LINE__,
4235 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4236 if (gdbarch_debug >= 2)
4237 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4238 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4242 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4243 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4245 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4249 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4251 gdb_assert (gdbarch != NULL);
4252 if (gdbarch->memory_remove_breakpoint == 0)
4253 internal_error (__FILE__, __LINE__,
4254 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4255 if (gdbarch_debug >= 2)
4256 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4257 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4261 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4262 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4264 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4268 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4270 gdb_assert (gdbarch != NULL);
4271 if (gdbarch->decr_pc_after_break == -1)
4272 internal_error (__FILE__, __LINE__,
4273 "gdbarch: gdbarch_decr_pc_after_break invalid");
4274 if (gdbarch_debug >= 2)
4275 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4276 return gdbarch->decr_pc_after_break;
4280 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4281 CORE_ADDR decr_pc_after_break)
4283 gdbarch->decr_pc_after_break = decr_pc_after_break;
4287 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4289 gdb_assert (gdbarch != NULL);
4290 if (gdbarch->prepare_to_proceed == 0)
4291 internal_error (__FILE__, __LINE__,
4292 "gdbarch: gdbarch_prepare_to_proceed invalid");
4293 if (gdbarch_debug >= 2)
4294 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4295 return gdbarch->prepare_to_proceed (select_it);
4299 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4300 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4302 gdbarch->prepare_to_proceed = prepare_to_proceed;
4306 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4308 gdb_assert (gdbarch != NULL);
4309 if (gdbarch->function_start_offset == -1)
4310 internal_error (__FILE__, __LINE__,
4311 "gdbarch: gdbarch_function_start_offset invalid");
4312 if (gdbarch_debug >= 2)
4313 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4314 return gdbarch->function_start_offset;
4318 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4319 CORE_ADDR function_start_offset)
4321 gdbarch->function_start_offset = function_start_offset;
4325 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4327 gdb_assert (gdbarch != NULL);
4328 if (gdbarch->remote_translate_xfer_address == 0)
4329 internal_error (__FILE__, __LINE__,
4330 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4331 if (gdbarch_debug >= 2)
4332 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4333 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4337 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4338 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4340 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4344 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4346 gdb_assert (gdbarch != NULL);
4347 if (gdbarch->frame_args_skip == -1)
4348 internal_error (__FILE__, __LINE__,
4349 "gdbarch: gdbarch_frame_args_skip invalid");
4350 if (gdbarch_debug >= 2)
4351 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4352 return gdbarch->frame_args_skip;
4356 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4357 CORE_ADDR frame_args_skip)
4359 gdbarch->frame_args_skip = frame_args_skip;
4363 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4365 gdb_assert (gdbarch != NULL);
4366 if (gdbarch->frameless_function_invocation == 0)
4367 internal_error (__FILE__, __LINE__,
4368 "gdbarch: gdbarch_frameless_function_invocation invalid");
4369 if (gdbarch_debug >= 2)
4370 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4371 return gdbarch->frameless_function_invocation (fi);
4375 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4376 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4378 gdbarch->frameless_function_invocation = frameless_function_invocation;
4382 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4384 gdb_assert (gdbarch != NULL);
4385 if (gdbarch->frame_chain == 0)
4386 internal_error (__FILE__, __LINE__,
4387 "gdbarch: gdbarch_frame_chain invalid");
4388 if (gdbarch_debug >= 2)
4389 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4390 return gdbarch->frame_chain (frame);
4394 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4395 gdbarch_frame_chain_ftype frame_chain)
4397 gdbarch->frame_chain = frame_chain;
4401 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4403 gdb_assert (gdbarch != NULL);
4404 if (gdbarch->frame_chain_valid == 0)
4405 internal_error (__FILE__, __LINE__,
4406 "gdbarch: gdbarch_frame_chain_valid invalid");
4407 if (gdbarch_debug >= 2)
4408 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4409 return gdbarch->frame_chain_valid (chain, thisframe);
4413 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4414 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4416 gdbarch->frame_chain_valid = frame_chain_valid;
4420 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4422 gdb_assert (gdbarch != NULL);
4423 if (gdbarch->frame_saved_pc == 0)
4424 internal_error (__FILE__, __LINE__,
4425 "gdbarch: gdbarch_frame_saved_pc invalid");
4426 if (gdbarch_debug >= 2)
4427 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4428 return gdbarch->frame_saved_pc (fi);
4432 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4433 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4435 gdbarch->frame_saved_pc = frame_saved_pc;
4439 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4441 gdb_assert (gdbarch != NULL);
4442 if (gdbarch->frame_args_address == 0)
4443 internal_error (__FILE__, __LINE__,
4444 "gdbarch: gdbarch_frame_args_address invalid");
4445 if (gdbarch_debug >= 2)
4446 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4447 return gdbarch->frame_args_address (fi);
4451 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4452 gdbarch_frame_args_address_ftype frame_args_address)
4454 gdbarch->frame_args_address = frame_args_address;
4458 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4460 gdb_assert (gdbarch != NULL);
4461 if (gdbarch->frame_locals_address == 0)
4462 internal_error (__FILE__, __LINE__,
4463 "gdbarch: gdbarch_frame_locals_address invalid");
4464 if (gdbarch_debug >= 2)
4465 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4466 return gdbarch->frame_locals_address (fi);
4470 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4471 gdbarch_frame_locals_address_ftype frame_locals_address)
4473 gdbarch->frame_locals_address = frame_locals_address;
4477 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4479 gdb_assert (gdbarch != NULL);
4480 if (gdbarch->saved_pc_after_call == 0)
4481 internal_error (__FILE__, __LINE__,
4482 "gdbarch: gdbarch_saved_pc_after_call invalid");
4483 if (gdbarch_debug >= 2)
4484 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4485 return gdbarch->saved_pc_after_call (frame);
4489 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4490 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4492 gdbarch->saved_pc_after_call = saved_pc_after_call;
4496 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4498 gdb_assert (gdbarch != NULL);
4499 if (gdbarch->frame_num_args == 0)
4500 internal_error (__FILE__, __LINE__,
4501 "gdbarch: gdbarch_frame_num_args invalid");
4502 if (gdbarch_debug >= 2)
4503 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4504 return gdbarch->frame_num_args (frame);
4508 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4509 gdbarch_frame_num_args_ftype frame_num_args)
4511 gdbarch->frame_num_args = frame_num_args;
4515 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4517 gdb_assert (gdbarch != NULL);
4518 return gdbarch->stack_align != 0;
4522 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4524 gdb_assert (gdbarch != NULL);
4525 if (gdbarch->stack_align == 0)
4526 internal_error (__FILE__, __LINE__,
4527 "gdbarch: gdbarch_stack_align invalid");
4528 if (gdbarch_debug >= 2)
4529 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4530 return gdbarch->stack_align (sp);
4534 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4535 gdbarch_stack_align_ftype stack_align)
4537 gdbarch->stack_align = stack_align;
4541 gdbarch_frame_align_p (struct gdbarch *gdbarch)
4543 gdb_assert (gdbarch != NULL);
4544 return gdbarch->frame_align != 0;
4548 gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
4550 gdb_assert (gdbarch != NULL);
4551 if (gdbarch->frame_align == 0)
4552 internal_error (__FILE__, __LINE__,
4553 "gdbarch: gdbarch_frame_align invalid");
4554 if (gdbarch_debug >= 2)
4555 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_align called\n");
4556 return gdbarch->frame_align (gdbarch, address);
4560 set_gdbarch_frame_align (struct gdbarch *gdbarch,
4561 gdbarch_frame_align_ftype frame_align)
4563 gdbarch->frame_align = frame_align;
4567 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4569 gdb_assert (gdbarch != NULL);
4570 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4571 if (gdbarch_debug >= 2)
4572 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4573 return gdbarch->extra_stack_alignment_needed;
4577 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4578 int extra_stack_alignment_needed)
4580 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4584 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4586 gdb_assert (gdbarch != NULL);
4587 return gdbarch->reg_struct_has_addr != 0;
4591 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4593 gdb_assert (gdbarch != NULL);
4594 if (gdbarch->reg_struct_has_addr == 0)
4595 internal_error (__FILE__, __LINE__,
4596 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4597 if (gdbarch_debug >= 2)
4598 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4599 return gdbarch->reg_struct_has_addr (gcc_p, type);
4603 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4604 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4606 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4610 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4612 gdb_assert (gdbarch != NULL);
4613 return gdbarch->save_dummy_frame_tos != 0;
4617 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4619 gdb_assert (gdbarch != NULL);
4620 if (gdbarch->save_dummy_frame_tos == 0)
4621 internal_error (__FILE__, __LINE__,
4622 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4623 if (gdbarch_debug >= 2)
4624 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4625 gdbarch->save_dummy_frame_tos (sp);
4629 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4630 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4632 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4636 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4638 gdb_assert (gdbarch != NULL);
4639 if (gdbarch_debug >= 2)
4640 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4641 return gdbarch->parm_boundary;
4645 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4648 gdbarch->parm_boundary = parm_boundary;
4651 const struct floatformat *
4652 gdbarch_float_format (struct gdbarch *gdbarch)
4654 gdb_assert (gdbarch != NULL);
4655 if (gdbarch_debug >= 2)
4656 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4657 return gdbarch->float_format;
4661 set_gdbarch_float_format (struct gdbarch *gdbarch,
4662 const struct floatformat * float_format)
4664 gdbarch->float_format = float_format;
4667 const struct floatformat *
4668 gdbarch_double_format (struct gdbarch *gdbarch)
4670 gdb_assert (gdbarch != NULL);
4671 if (gdbarch_debug >= 2)
4672 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4673 return gdbarch->double_format;
4677 set_gdbarch_double_format (struct gdbarch *gdbarch,
4678 const struct floatformat * double_format)
4680 gdbarch->double_format = double_format;
4683 const struct floatformat *
4684 gdbarch_long_double_format (struct gdbarch *gdbarch)
4686 gdb_assert (gdbarch != NULL);
4687 if (gdbarch_debug >= 2)
4688 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4689 return gdbarch->long_double_format;
4693 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4694 const struct floatformat * long_double_format)
4696 gdbarch->long_double_format = long_double_format;
4700 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4702 gdb_assert (gdbarch != NULL);
4703 if (gdbarch->convert_from_func_ptr_addr == 0)
4704 internal_error (__FILE__, __LINE__,
4705 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4706 if (gdbarch_debug >= 2)
4707 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4708 return gdbarch->convert_from_func_ptr_addr (addr);
4712 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4713 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4715 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4719 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4721 gdb_assert (gdbarch != NULL);
4722 if (gdbarch->addr_bits_remove == 0)
4723 internal_error (__FILE__, __LINE__,
4724 "gdbarch: gdbarch_addr_bits_remove invalid");
4725 if (gdbarch_debug >= 2)
4726 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4727 return gdbarch->addr_bits_remove (addr);
4731 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4732 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4734 gdbarch->addr_bits_remove = addr_bits_remove;
4738 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4740 gdb_assert (gdbarch != NULL);
4741 if (gdbarch->smash_text_address == 0)
4742 internal_error (__FILE__, __LINE__,
4743 "gdbarch: gdbarch_smash_text_address invalid");
4744 if (gdbarch_debug >= 2)
4745 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4746 return gdbarch->smash_text_address (addr);
4750 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4751 gdbarch_smash_text_address_ftype smash_text_address)
4753 gdbarch->smash_text_address = smash_text_address;
4757 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4759 gdb_assert (gdbarch != NULL);
4760 return gdbarch->software_single_step != 0;
4764 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4766 gdb_assert (gdbarch != NULL);
4767 if (gdbarch->software_single_step == 0)
4768 internal_error (__FILE__, __LINE__,
4769 "gdbarch: gdbarch_software_single_step invalid");
4770 if (gdbarch_debug >= 2)
4771 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4772 gdbarch->software_single_step (sig, insert_breakpoints_p);
4776 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4777 gdbarch_software_single_step_ftype software_single_step)
4779 gdbarch->software_single_step = software_single_step;
4783 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
4785 gdb_assert (gdbarch != NULL);
4786 if (gdbarch->print_insn == 0)
4787 internal_error (__FILE__, __LINE__,
4788 "gdbarch: gdbarch_print_insn invalid");
4789 if (gdbarch_debug >= 2)
4790 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4791 return gdbarch->print_insn (vma, info);
4795 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4796 gdbarch_print_insn_ftype print_insn)
4798 gdbarch->print_insn = print_insn;
4802 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4804 gdb_assert (gdbarch != NULL);
4805 if (gdbarch->skip_trampoline_code == 0)
4806 internal_error (__FILE__, __LINE__,
4807 "gdbarch: gdbarch_skip_trampoline_code invalid");
4808 if (gdbarch_debug >= 2)
4809 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4810 return gdbarch->skip_trampoline_code (pc);
4814 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4815 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4817 gdbarch->skip_trampoline_code = skip_trampoline_code;
4821 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4823 gdb_assert (gdbarch != NULL);
4824 if (gdbarch->in_solib_call_trampoline == 0)
4825 internal_error (__FILE__, __LINE__,
4826 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4827 if (gdbarch_debug >= 2)
4828 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4829 return gdbarch->in_solib_call_trampoline (pc, name);
4833 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4834 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4836 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4840 gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4842 gdb_assert (gdbarch != NULL);
4843 if (gdbarch->in_solib_return_trampoline == 0)
4844 internal_error (__FILE__, __LINE__,
4845 "gdbarch: gdbarch_in_solib_return_trampoline invalid");
4846 if (gdbarch_debug >= 2)
4847 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_return_trampoline called\n");
4848 return gdbarch->in_solib_return_trampoline (pc, name);
4852 set_gdbarch_in_solib_return_trampoline (struct gdbarch *gdbarch,
4853 gdbarch_in_solib_return_trampoline_ftype in_solib_return_trampoline)
4855 gdbarch->in_solib_return_trampoline = in_solib_return_trampoline;
4859 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4861 gdb_assert (gdbarch != NULL);
4862 if (gdbarch->pc_in_sigtramp == 0)
4863 internal_error (__FILE__, __LINE__,
4864 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4865 if (gdbarch_debug >= 2)
4866 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
4867 return gdbarch->pc_in_sigtramp (pc, name);
4871 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
4872 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
4874 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
4878 gdbarch_sigtramp_start_p (struct gdbarch *gdbarch)
4880 gdb_assert (gdbarch != NULL);
4881 return gdbarch->sigtramp_start != 0;
4885 gdbarch_sigtramp_start (struct gdbarch *gdbarch, CORE_ADDR pc)
4887 gdb_assert (gdbarch != NULL);
4888 if (gdbarch->sigtramp_start == 0)
4889 internal_error (__FILE__, __LINE__,
4890 "gdbarch: gdbarch_sigtramp_start invalid");
4891 if (gdbarch_debug >= 2)
4892 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_start called\n");
4893 return gdbarch->sigtramp_start (pc);
4897 set_gdbarch_sigtramp_start (struct gdbarch *gdbarch,
4898 gdbarch_sigtramp_start_ftype sigtramp_start)
4900 gdbarch->sigtramp_start = sigtramp_start;
4904 gdbarch_sigtramp_end_p (struct gdbarch *gdbarch)
4906 gdb_assert (gdbarch != NULL);
4907 return gdbarch->sigtramp_end != 0;
4911 gdbarch_sigtramp_end (struct gdbarch *gdbarch, CORE_ADDR pc)
4913 gdb_assert (gdbarch != NULL);
4914 if (gdbarch->sigtramp_end == 0)
4915 internal_error (__FILE__, __LINE__,
4916 "gdbarch: gdbarch_sigtramp_end invalid");
4917 if (gdbarch_debug >= 2)
4918 fprintf_unfiltered (gdb_stdlog, "gdbarch_sigtramp_end called\n");
4919 return gdbarch->sigtramp_end (pc);
4923 set_gdbarch_sigtramp_end (struct gdbarch *gdbarch,
4924 gdbarch_sigtramp_end_ftype sigtramp_end)
4926 gdbarch->sigtramp_end = sigtramp_end;
4930 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4932 gdb_assert (gdbarch != NULL);
4933 if (gdbarch->in_function_epilogue_p == 0)
4934 internal_error (__FILE__, __LINE__,
4935 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4936 if (gdbarch_debug >= 2)
4937 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4938 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4942 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4943 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4945 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4949 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4951 gdb_assert (gdbarch != NULL);
4952 if (gdbarch->construct_inferior_arguments == 0)
4953 internal_error (__FILE__, __LINE__,
4954 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4955 if (gdbarch_debug >= 2)
4956 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4957 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4961 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4962 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4964 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4968 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
4970 gdb_assert (gdbarch != NULL);
4971 return gdbarch->dwarf2_build_frame_info != 0;
4975 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
4977 gdb_assert (gdbarch != NULL);
4978 if (gdbarch->dwarf2_build_frame_info == 0)
4979 internal_error (__FILE__, __LINE__,
4980 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4981 if (gdbarch_debug >= 2)
4982 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
4983 gdbarch->dwarf2_build_frame_info (objfile);
4987 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
4988 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
4990 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
4994 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4996 gdb_assert (gdbarch != NULL);
4997 if (gdbarch->elf_make_msymbol_special == 0)
4998 internal_error (__FILE__, __LINE__,
4999 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
5000 if (gdbarch_debug >= 2)
5001 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
5002 gdbarch->elf_make_msymbol_special (sym, msym);
5006 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
5007 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
5009 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
5013 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
5015 gdb_assert (gdbarch != NULL);
5016 if (gdbarch->coff_make_msymbol_special == 0)
5017 internal_error (__FILE__, __LINE__,
5018 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
5019 if (gdbarch_debug >= 2)
5020 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
5021 gdbarch->coff_make_msymbol_special (val, msym);
5025 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
5026 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
5028 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
5032 gdbarch_name_of_malloc (struct gdbarch *gdbarch)
5034 gdb_assert (gdbarch != NULL);
5035 /* Skip verify of name_of_malloc, invalid_p == 0 */
5036 if (gdbarch_debug >= 2)
5037 fprintf_unfiltered (gdb_stdlog, "gdbarch_name_of_malloc called\n");
5038 return gdbarch->name_of_malloc;
5042 set_gdbarch_name_of_malloc (struct gdbarch *gdbarch,
5043 const char * name_of_malloc)
5045 gdbarch->name_of_malloc = name_of_malloc;
5049 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
5051 gdb_assert (gdbarch != NULL);
5052 /* Skip verify of cannot_step_breakpoint, invalid_p == 0 */
5053 if (gdbarch_debug >= 2)
5054 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_step_breakpoint called\n");
5055 return gdbarch->cannot_step_breakpoint;
5059 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
5060 int cannot_step_breakpoint)
5062 gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
5066 gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch)
5068 gdb_assert (gdbarch != NULL);
5069 /* Skip verify of have_nonsteppable_watchpoint, invalid_p == 0 */
5070 if (gdbarch_debug >= 2)
5071 fprintf_unfiltered (gdb_stdlog, "gdbarch_have_nonsteppable_watchpoint called\n");
5072 return gdbarch->have_nonsteppable_watchpoint;
5076 set_gdbarch_have_nonsteppable_watchpoint (struct gdbarch *gdbarch,
5077 int have_nonsteppable_watchpoint)
5079 gdbarch->have_nonsteppable_watchpoint = have_nonsteppable_watchpoint;
5083 /* Keep a registry of per-architecture data-pointers required by GDB
5090 gdbarch_data_init_ftype *init;
5091 gdbarch_data_free_ftype *free;
5094 struct gdbarch_data_registration
5096 struct gdbarch_data *data;
5097 struct gdbarch_data_registration *next;
5100 struct gdbarch_data_registry
5103 struct gdbarch_data_registration *registrations;
5106 struct gdbarch_data_registry gdbarch_data_registry =
5111 struct gdbarch_data *
5112 register_gdbarch_data (gdbarch_data_init_ftype *init,
5113 gdbarch_data_free_ftype *free)
5115 struct gdbarch_data_registration **curr;
5116 /* Append the new registraration. */
5117 for (curr = &gdbarch_data_registry.registrations;
5119 curr = &(*curr)->next);
5120 (*curr) = XMALLOC (struct gdbarch_data_registration);
5121 (*curr)->next = NULL;
5122 (*curr)->data = XMALLOC (struct gdbarch_data);
5123 (*curr)->data->index = gdbarch_data_registry.nr++;
5124 (*curr)->data->init = init;
5125 (*curr)->data->init_p = 1;
5126 (*curr)->data->free = free;
5127 return (*curr)->data;
5131 /* Create/delete the gdbarch data vector. */
5134 alloc_gdbarch_data (struct gdbarch *gdbarch)
5136 gdb_assert (gdbarch->data == NULL);
5137 gdbarch->nr_data = gdbarch_data_registry.nr;
5138 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
5142 free_gdbarch_data (struct gdbarch *gdbarch)
5144 struct gdbarch_data_registration *rego;
5145 gdb_assert (gdbarch->data != NULL);
5146 for (rego = gdbarch_data_registry.registrations;
5150 struct gdbarch_data *data = rego->data;
5151 gdb_assert (data->index < gdbarch->nr_data);
5152 if (data->free != NULL && gdbarch->data[data->index] != NULL)
5154 data->free (gdbarch, gdbarch->data[data->index]);
5155 gdbarch->data[data->index] = NULL;
5158 xfree (gdbarch->data);
5159 gdbarch->data = NULL;
5163 /* Initialize the current value of the specified per-architecture
5167 set_gdbarch_data (struct gdbarch *gdbarch,
5168 struct gdbarch_data *data,
5171 gdb_assert (data->index < gdbarch->nr_data);
5172 if (gdbarch->data[data->index] != NULL)
5174 gdb_assert (data->free != NULL);
5175 data->free (gdbarch, gdbarch->data[data->index]);
5177 gdbarch->data[data->index] = pointer;
5180 /* Return the current value of the specified per-architecture
5184 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
5186 gdb_assert (data->index < gdbarch->nr_data);
5187 /* The data-pointer isn't initialized, call init() to get a value but
5188 only if the architecture initializaiton has completed. Otherwise
5189 punt - hope that the caller knows what they are doing. */
5190 if (gdbarch->data[data->index] == NULL
5191 && gdbarch->initialized_p)
5193 /* Be careful to detect an initialization cycle. */
5194 gdb_assert (data->init_p);
5196 gdb_assert (data->init != NULL);
5197 gdbarch->data[data->index] = data->init (gdbarch);
5199 gdb_assert (gdbarch->data[data->index] != NULL);
5201 return gdbarch->data[data->index];
5206 /* Keep a registry of swapped data required by GDB modules. */
5211 struct gdbarch_swap_registration *source;
5212 struct gdbarch_swap *next;
5215 struct gdbarch_swap_registration
5218 unsigned long sizeof_data;
5219 gdbarch_swap_ftype *init;
5220 struct gdbarch_swap_registration *next;
5223 struct gdbarch_swap_registry
5226 struct gdbarch_swap_registration *registrations;
5229 struct gdbarch_swap_registry gdbarch_swap_registry =
5235 register_gdbarch_swap (void *data,
5236 unsigned long sizeof_data,
5237 gdbarch_swap_ftype *init)
5239 struct gdbarch_swap_registration **rego;
5240 for (rego = &gdbarch_swap_registry.registrations;
5242 rego = &(*rego)->next);
5243 (*rego) = XMALLOC (struct gdbarch_swap_registration);
5244 (*rego)->next = NULL;
5245 (*rego)->init = init;
5246 (*rego)->data = data;
5247 (*rego)->sizeof_data = sizeof_data;
5251 clear_gdbarch_swap (struct gdbarch *gdbarch)
5253 struct gdbarch_swap *curr;
5254 for (curr = gdbarch->swap;
5258 memset (curr->source->data, 0, curr->source->sizeof_data);
5263 init_gdbarch_swap (struct gdbarch *gdbarch)
5265 struct gdbarch_swap_registration *rego;
5266 struct gdbarch_swap **curr = &gdbarch->swap;
5267 for (rego = gdbarch_swap_registry.registrations;
5271 if (rego->data != NULL)
5273 (*curr) = XMALLOC (struct gdbarch_swap);
5274 (*curr)->source = rego;
5275 (*curr)->swap = xmalloc (rego->sizeof_data);
5276 (*curr)->next = NULL;
5277 curr = &(*curr)->next;
5279 if (rego->init != NULL)
5285 swapout_gdbarch_swap (struct gdbarch *gdbarch)
5287 struct gdbarch_swap *curr;
5288 for (curr = gdbarch->swap;
5291 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
5295 swapin_gdbarch_swap (struct gdbarch *gdbarch)
5297 struct gdbarch_swap *curr;
5298 for (curr = gdbarch->swap;
5301 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
5305 /* Keep a registry of the architectures known by GDB. */
5307 struct gdbarch_registration
5309 enum bfd_architecture bfd_architecture;
5310 gdbarch_init_ftype *init;
5311 gdbarch_dump_tdep_ftype *dump_tdep;
5312 struct gdbarch_list *arches;
5313 struct gdbarch_registration *next;
5316 static struct gdbarch_registration *gdbarch_registry = NULL;
5319 append_name (const char ***buf, int *nr, const char *name)
5321 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5327 gdbarch_printable_names (void)
5331 /* Accumulate a list of names based on the registed list of
5333 enum bfd_architecture a;
5335 const char **arches = NULL;
5336 struct gdbarch_registration *rego;
5337 for (rego = gdbarch_registry;
5341 const struct bfd_arch_info *ap;
5342 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5344 internal_error (__FILE__, __LINE__,
5345 "gdbarch_architecture_names: multi-arch unknown");
5348 append_name (&arches, &nr_arches, ap->printable_name);
5353 append_name (&arches, &nr_arches, NULL);
5357 /* Just return all the architectures that BFD knows. Assume that
5358 the legacy architecture framework supports them. */
5359 return bfd_arch_list ();
5364 gdbarch_register (enum bfd_architecture bfd_architecture,
5365 gdbarch_init_ftype *init,
5366 gdbarch_dump_tdep_ftype *dump_tdep)
5368 struct gdbarch_registration **curr;
5369 const struct bfd_arch_info *bfd_arch_info;
5370 /* Check that BFD recognizes this architecture */
5371 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5372 if (bfd_arch_info == NULL)
5374 internal_error (__FILE__, __LINE__,
5375 "gdbarch: Attempt to register unknown architecture (%d)",
5378 /* Check that we haven't seen this architecture before */
5379 for (curr = &gdbarch_registry;
5381 curr = &(*curr)->next)
5383 if (bfd_architecture == (*curr)->bfd_architecture)
5384 internal_error (__FILE__, __LINE__,
5385 "gdbarch: Duplicate registraration of architecture (%s)",
5386 bfd_arch_info->printable_name);
5390 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5391 bfd_arch_info->printable_name,
5394 (*curr) = XMALLOC (struct gdbarch_registration);
5395 (*curr)->bfd_architecture = bfd_architecture;
5396 (*curr)->init = init;
5397 (*curr)->dump_tdep = dump_tdep;
5398 (*curr)->arches = NULL;
5399 (*curr)->next = NULL;
5400 /* When non- multi-arch, install whatever target dump routine we've
5401 been provided - hopefully that routine has been written correctly
5402 and works regardless of multi-arch. */
5403 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5404 && startup_gdbarch.dump_tdep == NULL)
5405 startup_gdbarch.dump_tdep = dump_tdep;
5409 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5410 gdbarch_init_ftype *init)
5412 gdbarch_register (bfd_architecture, init, NULL);
5416 /* Look for an architecture using gdbarch_info. Base search on only
5417 BFD_ARCH_INFO and BYTE_ORDER. */
5419 struct gdbarch_list *
5420 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5421 const struct gdbarch_info *info)
5423 for (; arches != NULL; arches = arches->next)
5425 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5427 if (info->byte_order != arches->gdbarch->byte_order)
5435 /* Update the current architecture. Return ZERO if the update request
5439 gdbarch_update_p (struct gdbarch_info info)
5441 struct gdbarch *new_gdbarch;
5442 struct gdbarch *old_gdbarch;
5443 struct gdbarch_registration *rego;
5445 /* Fill in missing parts of the INFO struct using a number of
5446 sources: ``set ...''; INFOabfd supplied; existing target. */
5448 /* ``(gdb) set architecture ...'' */
5449 if (info.bfd_arch_info == NULL
5450 && !TARGET_ARCHITECTURE_AUTO)
5451 info.bfd_arch_info = TARGET_ARCHITECTURE;
5452 if (info.bfd_arch_info == NULL
5453 && info.abfd != NULL
5454 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5455 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5456 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5457 if (info.bfd_arch_info == NULL)
5458 info.bfd_arch_info = TARGET_ARCHITECTURE;
5460 /* ``(gdb) set byte-order ...'' */
5461 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5462 && !TARGET_BYTE_ORDER_AUTO)
5463 info.byte_order = TARGET_BYTE_ORDER;
5464 /* From the INFO struct. */
5465 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5466 && info.abfd != NULL)
5467 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5468 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5469 : BFD_ENDIAN_UNKNOWN);
5470 /* From the current target. */
5471 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5472 info.byte_order = TARGET_BYTE_ORDER;
5474 /* Must have found some sort of architecture. */
5475 gdb_assert (info.bfd_arch_info != NULL);
5479 fprintf_unfiltered (gdb_stdlog,
5480 "gdbarch_update: info.bfd_arch_info %s\n",
5481 (info.bfd_arch_info != NULL
5482 ? info.bfd_arch_info->printable_name
5484 fprintf_unfiltered (gdb_stdlog,
5485 "gdbarch_update: info.byte_order %d (%s)\n",
5487 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5488 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5490 fprintf_unfiltered (gdb_stdlog,
5491 "gdbarch_update: info.abfd 0x%lx\n",
5493 fprintf_unfiltered (gdb_stdlog,
5494 "gdbarch_update: info.tdep_info 0x%lx\n",
5495 (long) info.tdep_info);
5498 /* Find the target that knows about this architecture. */
5499 for (rego = gdbarch_registry;
5502 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5507 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
5511 /* Swap the data belonging to the old target out setting the
5512 installed data to zero. This stops the ->init() function trying
5513 to refer to the previous architecture's global data structures. */
5514 swapout_gdbarch_swap (current_gdbarch);
5515 clear_gdbarch_swap (current_gdbarch);
5517 /* Save the previously selected architecture, setting the global to
5518 NULL. This stops ->init() trying to use the previous
5519 architecture's configuration. The previous architecture may not
5520 even be of the same architecture family. The most recent
5521 architecture of the same family is found at the head of the
5522 rego->arches list. */
5523 old_gdbarch = current_gdbarch;
5524 current_gdbarch = NULL;
5526 /* Ask the target for a replacement architecture. */
5527 new_gdbarch = rego->init (info, rego->arches);
5529 /* Did the target like it? No. Reject the change and revert to the
5530 old architecture. */
5531 if (new_gdbarch == NULL)
5534 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
5535 swapin_gdbarch_swap (old_gdbarch);
5536 current_gdbarch = old_gdbarch;
5540 /* Did the architecture change? No. Oops, put the old architecture
5542 if (old_gdbarch == new_gdbarch)
5545 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5547 new_gdbarch->bfd_arch_info->printable_name);
5548 swapin_gdbarch_swap (old_gdbarch);
5549 current_gdbarch = old_gdbarch;
5553 /* Is this a pre-existing architecture? Yes. Move it to the front
5554 of the list of architectures (keeping the list sorted Most
5555 Recently Used) and then copy it in. */
5557 struct gdbarch_list **list;
5558 for (list = ®o->arches;
5560 list = &(*list)->next)
5562 if ((*list)->gdbarch == new_gdbarch)
5564 struct gdbarch_list *this;
5566 fprintf_unfiltered (gdb_stdlog,
5567 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5569 new_gdbarch->bfd_arch_info->printable_name);
5572 (*list) = this->next;
5573 /* Insert in the front. */
5574 this->next = rego->arches;
5575 rego->arches = this;
5576 /* Copy the new architecture in. */
5577 current_gdbarch = new_gdbarch;
5578 swapin_gdbarch_swap (new_gdbarch);
5579 architecture_changed_event ();
5585 /* Prepend this new architecture to the architecture list (keep the
5586 list sorted Most Recently Used). */
5588 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5589 this->next = rego->arches;
5590 this->gdbarch = new_gdbarch;
5591 rego->arches = this;
5594 /* Switch to this new architecture marking it initialized. */
5595 current_gdbarch = new_gdbarch;
5596 current_gdbarch->initialized_p = 1;
5599 fprintf_unfiltered (gdb_stdlog,
5600 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5602 new_gdbarch->bfd_arch_info->printable_name);
5605 /* Check that the newly installed architecture is valid. Plug in
5606 any post init values. */
5607 new_gdbarch->dump_tdep = rego->dump_tdep;
5608 verify_gdbarch (new_gdbarch);
5610 /* Initialize the per-architecture memory (swap) areas.
5611 CURRENT_GDBARCH must be update before these modules are
5613 init_gdbarch_swap (new_gdbarch);
5615 /* Initialize the per-architecture data. CURRENT_GDBARCH
5616 must be updated before these modules are called. */
5617 architecture_changed_event ();
5620 gdbarch_dump (current_gdbarch, gdb_stdlog);
5628 /* Pointer to the target-dependent disassembly function. */
5629 int (*tm_print_insn) (bfd_vma, disassemble_info *);
5630 disassemble_info tm_print_insn_info;
5633 extern void _initialize_gdbarch (void);
5636 _initialize_gdbarch (void)
5638 struct cmd_list_element *c;
5640 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
5641 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
5642 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
5643 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
5644 tm_print_insn_info.print_address_func = dis_asm_print_address;
5646 add_show_from_set (add_set_cmd ("arch",
5649 (char *)&gdbarch_debug,
5650 "Set architecture debugging.\n\
5651 When non-zero, architecture debugging is enabled.", &setdebuglist),
5653 c = add_set_cmd ("archdebug",
5656 (char *)&gdbarch_debug,
5657 "Set architecture debugging.\n\
5658 When non-zero, architecture debugging is enabled.", &setlist);
5660 deprecate_cmd (c, "set debug arch");
5661 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");