1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch *gdbarch);
70 static void alloc_gdbarch_data (struct gdbarch *);
71 static void free_gdbarch_data (struct gdbarch *);
72 static void init_gdbarch_swap (struct gdbarch *);
73 static void clear_gdbarch_swap (struct gdbarch *);
74 static void swapout_gdbarch_swap (struct gdbarch *);
75 static void swapin_gdbarch_swap (struct gdbarch *);
77 /* Non-zero if we want to trace architecture code. */
80 #define GDBARCH_DEBUG 0
82 int gdbarch_debug = GDBARCH_DEBUG;
85 /* Maintain the struct gdbarch object */
89 /* Has this architecture been fully initialized? */
91 /* basic architectural information */
92 const struct bfd_arch_info * bfd_arch_info;
95 /* target specific vector. */
96 struct gdbarch_tdep *tdep;
97 gdbarch_dump_tdep_ftype *dump_tdep;
99 /* per-architecture data-pointers */
103 /* per-architecture swap-regions */
104 struct gdbarch_swap *swap;
106 /* Multi-arch values.
108 When extending this structure you must:
112 Declare set/get functions and define the corresponding
115 gdbarch_alloc(): If zero/NULL is not a suitable default,
116 initialize the new field.
118 verify_gdbarch(): Confirm that the target updated the field
121 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
124 ``startup_gdbarch()'': Append an initial value to the static
125 variable (base values on the host's c-type system).
127 get_gdbarch(): Implement the set/get functions (probably using
128 the macro's as shortcuts).
143 gdbarch_read_pc_ftype *read_pc;
144 gdbarch_write_pc_ftype *write_pc;
145 gdbarch_read_fp_ftype *read_fp;
146 gdbarch_read_sp_ftype *read_sp;
147 gdbarch_write_sp_ftype *write_sp;
148 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
149 gdbarch_register_read_ftype *register_read;
150 gdbarch_register_write_ftype *register_write;
159 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
160 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
161 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
162 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
163 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
164 gdbarch_register_name_ftype *register_name;
167 gdbarch_register_byte_ftype *register_byte;
168 gdbarch_register_raw_size_ftype *register_raw_size;
169 int max_register_raw_size;
170 gdbarch_register_virtual_size_ftype *register_virtual_size;
171 int max_register_virtual_size;
172 gdbarch_register_virtual_type_ftype *register_virtual_type;
173 gdbarch_do_registers_info_ftype *do_registers_info;
174 gdbarch_print_float_info_ftype *print_float_info;
175 gdbarch_register_sim_regno_ftype *register_sim_regno;
176 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
177 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
178 gdbarch_cannot_store_register_ftype *cannot_store_register;
179 gdbarch_get_longjmp_target_ftype *get_longjmp_target;
180 int use_generic_dummy_frames;
181 int call_dummy_location;
182 gdbarch_call_dummy_address_ftype *call_dummy_address;
183 CORE_ADDR call_dummy_start_offset;
184 CORE_ADDR call_dummy_breakpoint_offset;
185 int call_dummy_breakpoint_offset_p;
186 int call_dummy_length;
187 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
189 LONGEST * call_dummy_words;
190 int sizeof_call_dummy_words;
191 int call_dummy_stack_adjust_p;
192 int call_dummy_stack_adjust;
193 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
194 gdbarch_init_frame_pc_first_ftype *init_frame_pc_first;
195 gdbarch_init_frame_pc_ftype *init_frame_pc;
196 int believe_pcc_promotion;
197 int believe_pcc_promotion_type;
198 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
199 gdbarch_get_saved_register_ftype *get_saved_register;
200 gdbarch_register_convertible_ftype *register_convertible;
201 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
202 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
203 gdbarch_convert_register_p_ftype *convert_register_p;
204 gdbarch_register_to_value_ftype *register_to_value;
205 gdbarch_value_to_register_ftype *value_to_register;
206 gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
207 gdbarch_store_pseudo_register_ftype *store_pseudo_register;
208 gdbarch_pointer_to_address_ftype *pointer_to_address;
209 gdbarch_address_to_pointer_ftype *address_to_pointer;
210 gdbarch_integer_to_address_ftype *integer_to_address;
211 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
212 gdbarch_deprecated_extract_return_value_ftype *deprecated_extract_return_value;
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_store_return_value_ftype *store_return_value;
219 gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
220 gdbarch_use_struct_convention_ftype *use_struct_convention;
221 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
222 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
223 gdbarch_skip_prologue_ftype *skip_prologue;
224 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
225 gdbarch_inner_than_ftype *inner_than;
226 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
227 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
228 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
229 CORE_ADDR decr_pc_after_break;
230 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
231 CORE_ADDR function_start_offset;
232 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
233 CORE_ADDR frame_args_skip;
234 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
235 gdbarch_frame_chain_ftype *frame_chain;
236 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
237 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
238 gdbarch_frame_args_address_ftype *frame_args_address;
239 gdbarch_frame_locals_address_ftype *frame_locals_address;
240 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
241 gdbarch_frame_num_args_ftype *frame_num_args;
242 gdbarch_stack_align_ftype *stack_align;
243 int extra_stack_alignment_needed;
244 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
245 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
247 const struct floatformat * float_format;
248 const struct floatformat * double_format;
249 const struct floatformat * long_double_format;
250 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
251 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
252 gdbarch_smash_text_address_ftype *smash_text_address;
253 gdbarch_software_single_step_ftype *software_single_step;
254 gdbarch_print_insn_ftype *print_insn;
255 gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
256 gdbarch_in_solib_call_trampoline_ftype *in_solib_call_trampoline;
257 gdbarch_pc_in_sigtramp_ftype *pc_in_sigtramp;
258 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
259 gdbarch_construct_inferior_arguments_ftype *construct_inferior_arguments;
260 gdbarch_dwarf2_build_frame_info_ftype *dwarf2_build_frame_info;
261 gdbarch_elf_make_msymbol_special_ftype *elf_make_msymbol_special;
262 gdbarch_coff_make_msymbol_special_ftype *coff_make_msymbol_special;
266 /* The default architecture uses host values (for want of a better
269 extern const struct bfd_arch_info bfd_default_arch_struct;
271 struct gdbarch startup_gdbarch =
273 1, /* Always initialized. */
274 /* basic architecture information */
275 &bfd_default_arch_struct,
277 /* target specific vector and its dump routine */
279 /*per-architecture data-pointers and swap regions */
281 /* Multi-arch values */
285 8 * sizeof (LONGEST),
288 8 * sizeof (long double),
318 generic_register_size,
320 generic_register_size,
324 default_print_float_info,
408 generic_in_function_epilogue_p,
409 construct_inferior_arguments,
413 /* startup_gdbarch() */
416 struct gdbarch *current_gdbarch = &startup_gdbarch;
418 /* Do any initialization needed for a non-multiarch configuration
419 after the _initialize_MODULE functions have been run. */
421 initialize_non_multiarch ()
423 alloc_gdbarch_data (&startup_gdbarch);
424 /* Ensure that all swap areas are zeroed so that they again think
425 they are starting from scratch. */
426 clear_gdbarch_swap (&startup_gdbarch);
427 init_gdbarch_swap (&startup_gdbarch);
431 /* Create a new ``struct gdbarch'' based on information provided by
432 ``struct gdbarch_info''. */
435 gdbarch_alloc (const struct gdbarch_info *info,
436 struct gdbarch_tdep *tdep)
438 /* NOTE: The new architecture variable is named ``current_gdbarch''
439 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
440 the current local architecture and not the previous global
441 architecture. This ensures that the new architectures initial
442 values are not influenced by the previous architecture. Once
443 everything is parameterised with gdbarch, this will go away. */
444 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
445 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
447 alloc_gdbarch_data (current_gdbarch);
449 current_gdbarch->tdep = tdep;
451 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
452 current_gdbarch->byte_order = info->byte_order;
454 /* Force the explicit initialization of these. */
455 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
456 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
457 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
458 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
459 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
460 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
461 current_gdbarch->long_double_bit = 8*TARGET_CHAR_BIT;
462 current_gdbarch->ptr_bit = TARGET_INT_BIT;
463 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
464 current_gdbarch->char_signed = -1;
465 current_gdbarch->read_pc = generic_target_read_pc;
466 current_gdbarch->write_pc = generic_target_write_pc;
467 current_gdbarch->read_fp = generic_target_read_fp;
468 current_gdbarch->read_sp = generic_target_read_sp;
469 current_gdbarch->write_sp = generic_target_write_sp;
470 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
471 current_gdbarch->num_regs = -1;
472 current_gdbarch->sp_regnum = -1;
473 current_gdbarch->fp_regnum = -1;
474 current_gdbarch->pc_regnum = -1;
475 current_gdbarch->ps_regnum = -1;
476 current_gdbarch->fp0_regnum = -1;
477 current_gdbarch->npc_regnum = -1;
478 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
479 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
480 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
481 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
482 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
483 current_gdbarch->register_name = legacy_register_name;
484 current_gdbarch->register_size = -1;
485 current_gdbarch->register_bytes = -1;
486 current_gdbarch->register_raw_size = generic_register_size;
487 current_gdbarch->max_register_raw_size = -1;
488 current_gdbarch->register_virtual_size = generic_register_size;
489 current_gdbarch->max_register_virtual_size = -1;
490 current_gdbarch->do_registers_info = do_registers_info;
491 current_gdbarch->print_float_info = default_print_float_info;
492 current_gdbarch->register_sim_regno = legacy_register_sim_regno;
493 current_gdbarch->cannot_fetch_register = cannot_register_not;
494 current_gdbarch->cannot_store_register = cannot_register_not;
495 current_gdbarch->use_generic_dummy_frames = -1;
496 current_gdbarch->call_dummy_start_offset = -1;
497 current_gdbarch->call_dummy_breakpoint_offset = -1;
498 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
499 current_gdbarch->call_dummy_length = -1;
500 current_gdbarch->call_dummy_p = -1;
501 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
502 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
503 current_gdbarch->call_dummy_stack_adjust_p = -1;
504 current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
505 current_gdbarch->init_frame_pc = init_frame_pc_default;
506 current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
507 current_gdbarch->get_saved_register = generic_unwind_get_saved_register;
508 current_gdbarch->register_convertible = generic_register_convertible_not;
509 current_gdbarch->convert_register_p = legacy_convert_register_p;
510 current_gdbarch->register_to_value = legacy_register_to_value;
511 current_gdbarch->value_to_register = legacy_value_to_register;
512 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
513 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
514 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
515 current_gdbarch->push_arguments = default_push_arguments;
516 current_gdbarch->use_struct_convention = generic_use_struct_convention;
517 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
518 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
519 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
520 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
521 current_gdbarch->decr_pc_after_break = -1;
522 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
523 current_gdbarch->function_start_offset = -1;
524 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
525 current_gdbarch->frame_args_skip = -1;
526 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
527 current_gdbarch->frame_chain_valid = generic_func_frame_chain_valid;
528 current_gdbarch->extra_stack_alignment_needed = 1;
529 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
530 current_gdbarch->addr_bits_remove = core_addr_identity;
531 current_gdbarch->smash_text_address = core_addr_identity;
532 current_gdbarch->print_insn = legacy_print_insn;
533 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
534 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
535 current_gdbarch->pc_in_sigtramp = legacy_pc_in_sigtramp;
536 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
537 current_gdbarch->construct_inferior_arguments = construct_inferior_arguments;
538 current_gdbarch->elf_make_msymbol_special = default_elf_make_msymbol_special;
539 current_gdbarch->coff_make_msymbol_special = default_coff_make_msymbol_special;
540 /* gdbarch_alloc() */
542 return current_gdbarch;
546 /* Free a gdbarch struct. This should never happen in normal
547 operation --- once you've created a gdbarch, you keep it around.
548 However, if an architecture's init function encounters an error
549 building the structure, it may need to clean up a partially
550 constructed gdbarch. */
553 gdbarch_free (struct gdbarch *arch)
555 gdb_assert (arch != NULL);
556 free_gdbarch_data (arch);
561 /* Ensure that all values in a GDBARCH are reasonable. */
564 verify_gdbarch (struct gdbarch *gdbarch)
567 struct cleanup *cleanups;
570 /* Only perform sanity checks on a multi-arch target. */
573 log = mem_fileopen ();
574 cleanups = make_cleanup_ui_file_delete (log);
576 if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
577 fprintf_unfiltered (log, "\n\tbyte-order");
578 if (gdbarch->bfd_arch_info == NULL)
579 fprintf_unfiltered (log, "\n\tbfd_arch_info");
580 /* Check those that need to be defined for the given multi-arch level. */
581 /* Skip verify of short_bit, invalid_p == 0 */
582 /* Skip verify of int_bit, invalid_p == 0 */
583 /* Skip verify of long_bit, invalid_p == 0 */
584 /* Skip verify of long_long_bit, invalid_p == 0 */
585 /* Skip verify of float_bit, invalid_p == 0 */
586 /* Skip verify of double_bit, invalid_p == 0 */
587 /* Skip verify of long_double_bit, invalid_p == 0 */
588 /* Skip verify of ptr_bit, invalid_p == 0 */
589 if (gdbarch->addr_bit == 0)
590 gdbarch->addr_bit = TARGET_PTR_BIT;
591 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
592 if (gdbarch->char_signed == -1)
593 gdbarch->char_signed = 1;
594 /* Skip verify of read_pc, invalid_p == 0 */
595 /* Skip verify of write_pc, invalid_p == 0 */
596 /* Skip verify of read_fp, invalid_p == 0 */
597 /* Skip verify of read_sp, invalid_p == 0 */
598 /* Skip verify of write_sp, invalid_p == 0 */
599 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
600 /* Skip verify of register_read, has predicate */
601 /* Skip verify of register_write, has predicate */
602 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
603 && (gdbarch->num_regs == -1))
604 fprintf_unfiltered (log, "\n\tnum_regs");
605 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
606 /* Skip verify of sp_regnum, invalid_p == 0 */
607 /* Skip verify of fp_regnum, invalid_p == 0 */
608 /* Skip verify of pc_regnum, invalid_p == 0 */
609 /* Skip verify of ps_regnum, invalid_p == 0 */
610 /* Skip verify of fp0_regnum, invalid_p == 0 */
611 /* Skip verify of npc_regnum, invalid_p == 0 */
612 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
613 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
614 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
615 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
616 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
617 /* Skip verify of register_name, invalid_p == 0 */
618 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
619 && (gdbarch->register_size == -1))
620 fprintf_unfiltered (log, "\n\tregister_size");
621 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
622 && (gdbarch->register_bytes == -1))
623 fprintf_unfiltered (log, "\n\tregister_bytes");
624 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
625 && (gdbarch->register_byte == 0))
626 fprintf_unfiltered (log, "\n\tregister_byte");
627 /* Skip verify of register_raw_size, invalid_p == 0 */
628 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
629 && (gdbarch->max_register_raw_size == -1))
630 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
631 /* Skip verify of register_virtual_size, invalid_p == 0 */
632 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
633 && (gdbarch->max_register_virtual_size == -1))
634 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
635 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
636 && (gdbarch->register_virtual_type == 0))
637 fprintf_unfiltered (log, "\n\tregister_virtual_type");
638 /* Skip verify of do_registers_info, invalid_p == 0 */
639 /* Skip verify of print_float_info, invalid_p == 0 */
640 /* Skip verify of register_sim_regno, invalid_p == 0 */
641 /* Skip verify of register_bytes_ok, has predicate */
642 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
643 /* Skip verify of cannot_store_register, invalid_p == 0 */
644 /* Skip verify of get_longjmp_target, has predicate */
645 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
646 && (gdbarch->use_generic_dummy_frames == -1))
647 fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames");
648 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
649 && (gdbarch->call_dummy_location == 0))
650 fprintf_unfiltered (log, "\n\tcall_dummy_location");
651 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
652 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
653 fprintf_unfiltered (log, "\n\tcall_dummy_address");
654 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
655 && (gdbarch->call_dummy_start_offset == -1))
656 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
657 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
658 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
659 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
660 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
661 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
662 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
663 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
664 && (gdbarch->call_dummy_length == -1))
665 fprintf_unfiltered (log, "\n\tcall_dummy_length");
666 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
667 && (gdbarch->pc_in_call_dummy == 0))
668 fprintf_unfiltered (log, "\n\tpc_in_call_dummy");
669 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
670 && (gdbarch->call_dummy_p == -1))
671 fprintf_unfiltered (log, "\n\tcall_dummy_p");
672 /* Skip verify of call_dummy_words, invalid_p == 0 */
673 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
674 if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
675 && (gdbarch->call_dummy_stack_adjust_p == -1))
676 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
677 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
678 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
679 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
680 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
681 && (gdbarch->fix_call_dummy == 0))
682 fprintf_unfiltered (log, "\n\tfix_call_dummy");
683 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
684 /* Skip verify of init_frame_pc, invalid_p == 0 */
685 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
686 /* Skip verify of get_saved_register, invalid_p == 0 */
687 /* Skip verify of register_convertible, invalid_p == 0 */
688 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
689 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
690 /* Skip verify of convert_register_p, invalid_p == 0 */
691 /* Skip verify of register_to_value, invalid_p == 0 */
692 /* Skip verify of value_to_register, invalid_p == 0 */
693 /* Skip verify of fetch_pseudo_register, has predicate */
694 /* Skip verify of store_pseudo_register, has predicate */
695 /* Skip verify of pointer_to_address, invalid_p == 0 */
696 /* Skip verify of address_to_pointer, invalid_p == 0 */
697 /* Skip verify of integer_to_address, has predicate */
698 /* Skip verify of return_value_on_stack, invalid_p == 0 */
699 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
700 && (gdbarch->deprecated_extract_return_value == 0))
701 fprintf_unfiltered (log, "\n\tdeprecated_extract_return_value");
702 /* Skip verify of push_arguments, invalid_p == 0 */
703 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
704 && (gdbarch->push_dummy_frame == 0))
705 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
706 /* Skip verify of push_return_address, has predicate */
707 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
708 && (gdbarch->pop_frame == 0))
709 fprintf_unfiltered (log, "\n\tpop_frame");
710 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
711 && (gdbarch->store_struct_return == 0))
712 fprintf_unfiltered (log, "\n\tstore_struct_return");
713 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
714 && (gdbarch->store_return_value == 0))
715 fprintf_unfiltered (log, "\n\tstore_return_value");
716 /* Skip verify of deprecated_extract_struct_value_address, has predicate */
717 /* Skip verify of use_struct_convention, invalid_p == 0 */
718 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
719 && (gdbarch->frame_init_saved_regs == 0))
720 fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
721 /* Skip verify of init_extra_frame_info, has predicate */
722 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
723 && (gdbarch->skip_prologue == 0))
724 fprintf_unfiltered (log, "\n\tskip_prologue");
725 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
726 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
727 && (gdbarch->inner_than == 0))
728 fprintf_unfiltered (log, "\n\tinner_than");
729 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
730 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
731 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
733 && (gdbarch->decr_pc_after_break == -1))
734 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
735 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
737 && (gdbarch->function_start_offset == -1))
738 fprintf_unfiltered (log, "\n\tfunction_start_offset");
739 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
741 && (gdbarch->frame_args_skip == -1))
742 fprintf_unfiltered (log, "\n\tframe_args_skip");
743 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
744 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
745 && (gdbarch->frame_chain == 0))
746 fprintf_unfiltered (log, "\n\tframe_chain");
747 /* Skip verify of frame_chain_valid, invalid_p == 0 */
748 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
749 && (gdbarch->frame_saved_pc == 0))
750 fprintf_unfiltered (log, "\n\tframe_saved_pc");
751 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
752 && (gdbarch->frame_args_address == 0))
753 fprintf_unfiltered (log, "\n\tframe_args_address");
754 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
755 && (gdbarch->frame_locals_address == 0))
756 fprintf_unfiltered (log, "\n\tframe_locals_address");
757 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
758 && (gdbarch->saved_pc_after_call == 0))
759 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
760 if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
761 && (gdbarch->frame_num_args == 0))
762 fprintf_unfiltered (log, "\n\tframe_num_args");
763 /* Skip verify of stack_align, has predicate */
764 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
765 /* Skip verify of reg_struct_has_addr, has predicate */
766 /* Skip verify of save_dummy_frame_tos, has predicate */
767 if (gdbarch->float_format == 0)
768 gdbarch->float_format = default_float_format (gdbarch);
769 if (gdbarch->double_format == 0)
770 gdbarch->double_format = default_double_format (gdbarch);
771 if (gdbarch->long_double_format == 0)
772 gdbarch->long_double_format = default_double_format (gdbarch);
773 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
774 /* Skip verify of addr_bits_remove, invalid_p == 0 */
775 /* Skip verify of smash_text_address, invalid_p == 0 */
776 /* Skip verify of software_single_step, has predicate */
777 /* Skip verify of print_insn, invalid_p == 0 */
778 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
779 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
780 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
781 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
782 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
783 /* Skip verify of dwarf2_build_frame_info, has predicate */
784 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
785 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
786 buf = ui_file_xstrdup (log, &dummy);
787 make_cleanup (xfree, buf);
788 if (strlen (buf) > 0)
789 internal_error (__FILE__, __LINE__,
790 "verify_gdbarch: the following are invalid ...%s",
792 do_cleanups (cleanups);
796 /* Print out the details of the current architecture. */
798 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
799 just happens to match the global variable ``current_gdbarch''. That
800 way macros refering to that variable get the local and not the global
801 version - ulgh. Once everything is parameterised with gdbarch, this
805 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
807 fprintf_unfiltered (file,
808 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
811 fprintf_unfiltered (file,
812 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
813 (long) current_gdbarch->in_function_epilogue_p);
815 fprintf_unfiltered (file,
816 "gdbarch_dump: register_read = 0x%08lx\n",
817 (long) current_gdbarch->register_read);
819 fprintf_unfiltered (file,
820 "gdbarch_dump: register_write = 0x%08lx\n",
821 (long) current_gdbarch->register_write);
822 #ifdef ADDRESS_TO_POINTER
824 /* Macro might contain `[{}]' when not multi-arch */
825 fprintf_unfiltered (file,
826 "gdbarch_dump: %s # %s\n",
827 "ADDRESS_TO_POINTER(type, buf, addr)",
828 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
831 fprintf_unfiltered (file,
832 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
833 (long) current_gdbarch->address_to_pointer
834 /*ADDRESS_TO_POINTER ()*/);
836 #ifdef ADDR_BITS_REMOVE
837 fprintf_unfiltered (file,
838 "gdbarch_dump: %s # %s\n",
839 "ADDR_BITS_REMOVE(addr)",
840 XSTRING (ADDR_BITS_REMOVE (addr)));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
844 (long) current_gdbarch->addr_bits_remove
845 /*ADDR_BITS_REMOVE ()*/);
847 #ifdef BELIEVE_PCC_PROMOTION
848 fprintf_unfiltered (file,
849 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
850 XSTRING (BELIEVE_PCC_PROMOTION));
851 fprintf_unfiltered (file,
852 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
853 BELIEVE_PCC_PROMOTION);
855 #ifdef BELIEVE_PCC_PROMOTION_TYPE
856 fprintf_unfiltered (file,
857 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
858 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
859 fprintf_unfiltered (file,
860 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
861 BELIEVE_PCC_PROMOTION_TYPE);
863 #ifdef BREAKPOINT_FROM_PC
864 fprintf_unfiltered (file,
865 "gdbarch_dump: %s # %s\n",
866 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
867 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
869 fprintf_unfiltered (file,
870 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
871 (long) current_gdbarch->breakpoint_from_pc
872 /*BREAKPOINT_FROM_PC ()*/);
874 #ifdef CALL_DUMMY_ADDRESS
875 fprintf_unfiltered (file,
876 "gdbarch_dump: %s # %s\n",
877 "CALL_DUMMY_ADDRESS()",
878 XSTRING (CALL_DUMMY_ADDRESS ()));
880 fprintf_unfiltered (file,
881 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
882 (long) current_gdbarch->call_dummy_address
883 /*CALL_DUMMY_ADDRESS ()*/);
885 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
886 fprintf_unfiltered (file,
887 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
888 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
889 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
890 fprintf_unfiltered (file,
891 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
892 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
894 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
895 fprintf_unfiltered (file,
896 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
897 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
898 fprintf_unfiltered (file,
899 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
900 CALL_DUMMY_BREAKPOINT_OFFSET_P);
902 #ifdef CALL_DUMMY_LENGTH
903 fprintf_unfiltered (file,
904 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
905 XSTRING (CALL_DUMMY_LENGTH));
906 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
907 fprintf_unfiltered (file,
908 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
911 #ifdef CALL_DUMMY_LOCATION
912 fprintf_unfiltered (file,
913 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
914 XSTRING (CALL_DUMMY_LOCATION));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
917 CALL_DUMMY_LOCATION);
920 fprintf_unfiltered (file,
921 "gdbarch_dump: CALL_DUMMY_P # %s\n",
922 XSTRING (CALL_DUMMY_P));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: CALL_DUMMY_P = %d\n",
927 #ifdef CALL_DUMMY_STACK_ADJUST
928 fprintf_unfiltered (file,
929 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
930 XSTRING (CALL_DUMMY_STACK_ADJUST));
931 if (CALL_DUMMY_STACK_ADJUST_P)
932 fprintf_unfiltered (file,
933 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
934 (long) CALL_DUMMY_STACK_ADJUST);
936 #ifdef CALL_DUMMY_STACK_ADJUST_P
937 fprintf_unfiltered (file,
938 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
939 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
940 fprintf_unfiltered (file,
941 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
942 (long) CALL_DUMMY_STACK_ADJUST_P);
944 #ifdef CALL_DUMMY_START_OFFSET
945 fprintf_unfiltered (file,
946 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
947 XSTRING (CALL_DUMMY_START_OFFSET));
948 fprintf_unfiltered (file,
949 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
950 (long) CALL_DUMMY_START_OFFSET);
952 #ifdef CALL_DUMMY_WORDS
953 fprintf_unfiltered (file,
954 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
955 XSTRING (CALL_DUMMY_WORDS));
956 fprintf_unfiltered (file,
957 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
958 (long) CALL_DUMMY_WORDS);
960 #ifdef CANNOT_FETCH_REGISTER
961 fprintf_unfiltered (file,
962 "gdbarch_dump: %s # %s\n",
963 "CANNOT_FETCH_REGISTER(regnum)",
964 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
966 fprintf_unfiltered (file,
967 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
968 (long) current_gdbarch->cannot_fetch_register
969 /*CANNOT_FETCH_REGISTER ()*/);
971 #ifdef CANNOT_STORE_REGISTER
972 fprintf_unfiltered (file,
973 "gdbarch_dump: %s # %s\n",
974 "CANNOT_STORE_REGISTER(regnum)",
975 XSTRING (CANNOT_STORE_REGISTER (regnum)));
977 fprintf_unfiltered (file,
978 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
979 (long) current_gdbarch->cannot_store_register
980 /*CANNOT_STORE_REGISTER ()*/);
982 #ifdef COERCE_FLOAT_TO_DOUBLE
983 fprintf_unfiltered (file,
984 "gdbarch_dump: %s # %s\n",
985 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
986 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
990 (long) current_gdbarch->coerce_float_to_double
991 /*COERCE_FLOAT_TO_DOUBLE ()*/);
993 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
995 /* Macro might contain `[{}]' when not multi-arch */
996 fprintf_unfiltered (file,
997 "gdbarch_dump: %s # %s\n",
998 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
999 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val, msym)));
1002 fprintf_unfiltered (file,
1003 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1004 (long) current_gdbarch->coff_make_msymbol_special
1005 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
1008 fprintf_unfiltered (file,
1009 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1010 (long) current_gdbarch->construct_inferior_arguments);
1011 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1012 fprintf_unfiltered (file,
1013 "gdbarch_dump: %s # %s\n",
1014 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1015 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
1017 fprintf_unfiltered (file,
1018 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1019 (long) current_gdbarch->convert_from_func_ptr_addr
1020 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1022 #ifdef CONVERT_REGISTER_P
1023 fprintf_unfiltered (file,
1024 "gdbarch_dump: %s # %s\n",
1025 "CONVERT_REGISTER_P(regnum)",
1026 XSTRING (CONVERT_REGISTER_P (regnum)));
1028 fprintf_unfiltered (file,
1029 "gdbarch_dump: CONVERT_REGISTER_P = 0x%08lx\n",
1030 (long) current_gdbarch->convert_register_p
1031 /*CONVERT_REGISTER_P ()*/);
1033 #ifdef DECR_PC_AFTER_BREAK
1034 fprintf_unfiltered (file,
1035 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1036 XSTRING (DECR_PC_AFTER_BREAK));
1037 fprintf_unfiltered (file,
1038 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1039 (long) DECR_PC_AFTER_BREAK);
1041 #ifdef DEPRECATED_EXTRACT_RETURN_VALUE
1043 /* Macro might contain `[{}]' when not multi-arch */
1044 fprintf_unfiltered (file,
1045 "gdbarch_dump: %s # %s\n",
1046 "DEPRECATED_EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1047 XSTRING (DEPRECATED_EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1050 fprintf_unfiltered (file,
1051 "gdbarch_dump: DEPRECATED_EXTRACT_RETURN_VALUE = 0x%08lx\n",
1052 (long) current_gdbarch->deprecated_extract_return_value
1053 /*DEPRECATED_EXTRACT_RETURN_VALUE ()*/);
1055 #ifdef DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS
1056 fprintf_unfiltered (file,
1057 "gdbarch_dump: %s # %s\n",
1058 "DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1059 XSTRING (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1063 (long) current_gdbarch->deprecated_extract_struct_value_address
1064 /*DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1066 #ifdef DO_REGISTERS_INFO
1068 /* Macro might contain `[{}]' when not multi-arch */
1069 fprintf_unfiltered (file,
1070 "gdbarch_dump: %s # %s\n",
1071 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1072 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
1075 fprintf_unfiltered (file,
1076 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1077 (long) current_gdbarch->do_registers_info
1078 /*DO_REGISTERS_INFO ()*/);
1080 #ifdef DWARF2_BUILD_FRAME_INFO
1082 /* Macro might contain `[{}]' when not multi-arch */
1083 fprintf_unfiltered (file,
1084 "gdbarch_dump: %s # %s\n",
1085 "DWARF2_BUILD_FRAME_INFO(objfile)",
1086 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile)));
1089 fprintf_unfiltered (file,
1090 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1091 (long) current_gdbarch->dwarf2_build_frame_info
1092 /*DWARF2_BUILD_FRAME_INFO ()*/);
1094 #ifdef DWARF2_REG_TO_REGNUM
1095 fprintf_unfiltered (file,
1096 "gdbarch_dump: %s # %s\n",
1097 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1098 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1100 fprintf_unfiltered (file,
1101 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1102 (long) current_gdbarch->dwarf2_reg_to_regnum
1103 /*DWARF2_REG_TO_REGNUM ()*/);
1105 #ifdef DWARF_REG_TO_REGNUM
1106 fprintf_unfiltered (file,
1107 "gdbarch_dump: %s # %s\n",
1108 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1109 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1111 fprintf_unfiltered (file,
1112 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1113 (long) current_gdbarch->dwarf_reg_to_regnum
1114 /*DWARF_REG_TO_REGNUM ()*/);
1116 #ifdef ECOFF_REG_TO_REGNUM
1117 fprintf_unfiltered (file,
1118 "gdbarch_dump: %s # %s\n",
1119 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1120 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1122 fprintf_unfiltered (file,
1123 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1124 (long) current_gdbarch->ecoff_reg_to_regnum
1125 /*ECOFF_REG_TO_REGNUM ()*/);
1127 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1129 /* Macro might contain `[{}]' when not multi-arch */
1130 fprintf_unfiltered (file,
1131 "gdbarch_dump: %s # %s\n",
1132 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1133 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym, msym)));
1136 fprintf_unfiltered (file,
1137 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1138 (long) current_gdbarch->elf_make_msymbol_special
1139 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1141 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1142 fprintf_unfiltered (file,
1143 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1144 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1147 EXTRA_STACK_ALIGNMENT_NEEDED);
1149 #ifdef FETCH_PSEUDO_REGISTER
1151 /* Macro might contain `[{}]' when not multi-arch */
1152 fprintf_unfiltered (file,
1153 "gdbarch_dump: %s # %s\n",
1154 "FETCH_PSEUDO_REGISTER(regnum)",
1155 XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1160 (long) current_gdbarch->fetch_pseudo_register
1161 /*FETCH_PSEUDO_REGISTER ()*/);
1163 #ifdef FIX_CALL_DUMMY
1165 /* Macro might contain `[{}]' when not multi-arch */
1166 fprintf_unfiltered (file,
1167 "gdbarch_dump: %s # %s\n",
1168 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1169 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1172 fprintf_unfiltered (file,
1173 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1174 (long) current_gdbarch->fix_call_dummy
1175 /*FIX_CALL_DUMMY ()*/);
1178 fprintf_unfiltered (file,
1179 "gdbarch_dump: FP0_REGNUM # %s\n",
1180 XSTRING (FP0_REGNUM));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: FP0_REGNUM = %d\n",
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: FP_REGNUM # %s\n",
1188 XSTRING (FP_REGNUM));
1189 fprintf_unfiltered (file,
1190 "gdbarch_dump: FP_REGNUM = %d\n",
1193 #ifdef FRAMELESS_FUNCTION_INVOCATION
1194 fprintf_unfiltered (file,
1195 "gdbarch_dump: %s # %s\n",
1196 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1197 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1199 fprintf_unfiltered (file,
1200 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1201 (long) current_gdbarch->frameless_function_invocation
1202 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1204 #ifdef FRAME_ARGS_ADDRESS
1205 fprintf_unfiltered (file,
1206 "gdbarch_dump: %s # %s\n",
1207 "FRAME_ARGS_ADDRESS(fi)",
1208 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1210 fprintf_unfiltered (file,
1211 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1212 (long) current_gdbarch->frame_args_address
1213 /*FRAME_ARGS_ADDRESS ()*/);
1215 #ifdef FRAME_ARGS_SKIP
1216 fprintf_unfiltered (file,
1217 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1218 XSTRING (FRAME_ARGS_SKIP));
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1221 (long) FRAME_ARGS_SKIP);
1224 fprintf_unfiltered (file,
1225 "gdbarch_dump: %s # %s\n",
1226 "FRAME_CHAIN(frame)",
1227 XSTRING (FRAME_CHAIN (frame)));
1229 fprintf_unfiltered (file,
1230 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1231 (long) current_gdbarch->frame_chain
1232 /*FRAME_CHAIN ()*/);
1234 #ifdef FRAME_CHAIN_VALID
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: %s # %s\n",
1237 "FRAME_CHAIN_VALID(chain, thisframe)",
1238 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1240 fprintf_unfiltered (file,
1241 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1242 (long) current_gdbarch->frame_chain_valid
1243 /*FRAME_CHAIN_VALID ()*/);
1245 #ifdef FRAME_INIT_SAVED_REGS
1247 /* Macro might contain `[{}]' when not multi-arch */
1248 fprintf_unfiltered (file,
1249 "gdbarch_dump: %s # %s\n",
1250 "FRAME_INIT_SAVED_REGS(frame)",
1251 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1254 fprintf_unfiltered (file,
1255 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1256 (long) current_gdbarch->frame_init_saved_regs
1257 /*FRAME_INIT_SAVED_REGS ()*/);
1259 #ifdef FRAME_LOCALS_ADDRESS
1260 fprintf_unfiltered (file,
1261 "gdbarch_dump: %s # %s\n",
1262 "FRAME_LOCALS_ADDRESS(fi)",
1263 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1265 fprintf_unfiltered (file,
1266 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1267 (long) current_gdbarch->frame_locals_address
1268 /*FRAME_LOCALS_ADDRESS ()*/);
1270 #ifdef FRAME_NUM_ARGS
1271 fprintf_unfiltered (file,
1272 "gdbarch_dump: %s # %s\n",
1273 "FRAME_NUM_ARGS(frame)",
1274 XSTRING (FRAME_NUM_ARGS (frame)));
1276 fprintf_unfiltered (file,
1277 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1278 (long) current_gdbarch->frame_num_args
1279 /*FRAME_NUM_ARGS ()*/);
1281 #ifdef FRAME_SAVED_PC
1282 fprintf_unfiltered (file,
1283 "gdbarch_dump: %s # %s\n",
1284 "FRAME_SAVED_PC(fi)",
1285 XSTRING (FRAME_SAVED_PC (fi)));
1287 fprintf_unfiltered (file,
1288 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1289 (long) current_gdbarch->frame_saved_pc
1290 /*FRAME_SAVED_PC ()*/);
1292 #ifdef FUNCTION_START_OFFSET
1293 fprintf_unfiltered (file,
1294 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1295 XSTRING (FUNCTION_START_OFFSET));
1296 fprintf_unfiltered (file,
1297 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1298 (long) FUNCTION_START_OFFSET);
1300 #ifdef GET_LONGJMP_TARGET
1301 fprintf_unfiltered (file,
1302 "gdbarch_dump: %s # %s\n",
1303 "GET_LONGJMP_TARGET(pc)",
1304 XSTRING (GET_LONGJMP_TARGET (pc)));
1306 fprintf_unfiltered (file,
1307 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1308 (long) current_gdbarch->get_longjmp_target
1309 /*GET_LONGJMP_TARGET ()*/);
1311 #ifdef GET_SAVED_REGISTER
1313 /* Macro might contain `[{}]' when not multi-arch */
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: %s # %s\n",
1316 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1317 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1320 fprintf_unfiltered (file,
1321 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1322 (long) current_gdbarch->get_saved_register
1323 /*GET_SAVED_REGISTER ()*/);
1325 #ifdef INIT_EXTRA_FRAME_INFO
1327 /* Macro might contain `[{}]' when not multi-arch */
1328 fprintf_unfiltered (file,
1329 "gdbarch_dump: %s # %s\n",
1330 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1331 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1334 fprintf_unfiltered (file,
1335 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1336 (long) current_gdbarch->init_extra_frame_info
1337 /*INIT_EXTRA_FRAME_INFO ()*/);
1339 #ifdef INIT_FRAME_PC
1341 /* Macro might contain `[{}]' when not multi-arch */
1342 fprintf_unfiltered (file,
1343 "gdbarch_dump: %s # %s\n",
1344 "INIT_FRAME_PC(fromleaf, prev)",
1345 XSTRING (INIT_FRAME_PC (fromleaf, prev)));
1348 fprintf_unfiltered (file,
1349 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1350 (long) current_gdbarch->init_frame_pc
1351 /*INIT_FRAME_PC ()*/);
1353 #ifdef INIT_FRAME_PC_FIRST
1355 /* Macro might contain `[{}]' when not multi-arch */
1356 fprintf_unfiltered (file,
1357 "gdbarch_dump: %s # %s\n",
1358 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1359 XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev)));
1362 fprintf_unfiltered (file,
1363 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1364 (long) current_gdbarch->init_frame_pc_first
1365 /*INIT_FRAME_PC_FIRST ()*/);
1368 fprintf_unfiltered (file,
1369 "gdbarch_dump: %s # %s\n",
1370 "INNER_THAN(lhs, rhs)",
1371 XSTRING (INNER_THAN (lhs, rhs)));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1375 (long) current_gdbarch->inner_than
1378 #ifdef INTEGER_TO_ADDRESS
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: %s # %s\n",
1381 "INTEGER_TO_ADDRESS(type, buf)",
1382 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1386 (long) current_gdbarch->integer_to_address
1387 /*INTEGER_TO_ADDRESS ()*/);
1389 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1390 fprintf_unfiltered (file,
1391 "gdbarch_dump: %s # %s\n",
1392 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1393 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1395 fprintf_unfiltered (file,
1396 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1397 (long) current_gdbarch->in_solib_call_trampoline
1398 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1400 #ifdef MAX_REGISTER_RAW_SIZE
1401 fprintf_unfiltered (file,
1402 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1403 XSTRING (MAX_REGISTER_RAW_SIZE));
1404 fprintf_unfiltered (file,
1405 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1406 MAX_REGISTER_RAW_SIZE);
1408 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1409 fprintf_unfiltered (file,
1410 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1411 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1412 fprintf_unfiltered (file,
1413 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1414 MAX_REGISTER_VIRTUAL_SIZE);
1416 #ifdef MEMORY_INSERT_BREAKPOINT
1417 fprintf_unfiltered (file,
1418 "gdbarch_dump: %s # %s\n",
1419 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1420 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1422 fprintf_unfiltered (file,
1423 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1424 (long) current_gdbarch->memory_insert_breakpoint
1425 /*MEMORY_INSERT_BREAKPOINT ()*/);
1427 #ifdef MEMORY_REMOVE_BREAKPOINT
1428 fprintf_unfiltered (file,
1429 "gdbarch_dump: %s # %s\n",
1430 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1431 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1433 fprintf_unfiltered (file,
1434 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1435 (long) current_gdbarch->memory_remove_breakpoint
1436 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1439 fprintf_unfiltered (file,
1440 "gdbarch_dump: NPC_REGNUM # %s\n",
1441 XSTRING (NPC_REGNUM));
1442 fprintf_unfiltered (file,
1443 "gdbarch_dump: NPC_REGNUM = %d\n",
1446 #ifdef NUM_PSEUDO_REGS
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1449 XSTRING (NUM_PSEUDO_REGS));
1450 fprintf_unfiltered (file,
1451 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1455 fprintf_unfiltered (file,
1456 "gdbarch_dump: NUM_REGS # %s\n",
1457 XSTRING (NUM_REGS));
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: NUM_REGS = %d\n",
1462 #ifdef PARM_BOUNDARY
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1465 XSTRING (PARM_BOUNDARY));
1466 fprintf_unfiltered (file,
1467 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1470 #ifdef PC_IN_CALL_DUMMY
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: %s # %s\n",
1473 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1474 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1476 fprintf_unfiltered (file,
1477 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1478 (long) current_gdbarch->pc_in_call_dummy
1479 /*PC_IN_CALL_DUMMY ()*/);
1481 #ifdef PC_IN_SIGTRAMP
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: %s # %s\n",
1484 "PC_IN_SIGTRAMP(pc, name)",
1485 XSTRING (PC_IN_SIGTRAMP (pc, name)));
1487 fprintf_unfiltered (file,
1488 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1489 (long) current_gdbarch->pc_in_sigtramp
1490 /*PC_IN_SIGTRAMP ()*/);
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: PC_REGNUM # %s\n",
1495 XSTRING (PC_REGNUM));
1496 fprintf_unfiltered (file,
1497 "gdbarch_dump: PC_REGNUM = %d\n",
1500 #ifdef POINTER_TO_ADDRESS
1501 fprintf_unfiltered (file,
1502 "gdbarch_dump: %s # %s\n",
1503 "POINTER_TO_ADDRESS(type, buf)",
1504 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1506 fprintf_unfiltered (file,
1507 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1508 (long) current_gdbarch->pointer_to_address
1509 /*POINTER_TO_ADDRESS ()*/);
1513 /* Macro might contain `[{}]' when not multi-arch */
1514 fprintf_unfiltered (file,
1515 "gdbarch_dump: %s # %s\n",
1517 XSTRING (POP_FRAME (-)));
1520 fprintf_unfiltered (file,
1521 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1522 (long) current_gdbarch->pop_frame
1525 #ifdef PREPARE_TO_PROCEED
1526 fprintf_unfiltered (file,
1527 "gdbarch_dump: %s # %s\n",
1528 "PREPARE_TO_PROCEED(select_it)",
1529 XSTRING (PREPARE_TO_PROCEED (select_it)));
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1533 (long) current_gdbarch->prepare_to_proceed
1534 /*PREPARE_TO_PROCEED ()*/);
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: print_float_info = 0x%08lx\n",
1539 (long) current_gdbarch->print_float_info);
1540 #ifdef PROLOGUE_FRAMELESS_P
1541 fprintf_unfiltered (file,
1542 "gdbarch_dump: %s # %s\n",
1543 "PROLOGUE_FRAMELESS_P(ip)",
1544 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1546 fprintf_unfiltered (file,
1547 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1548 (long) current_gdbarch->prologue_frameless_p
1549 /*PROLOGUE_FRAMELESS_P ()*/);
1552 fprintf_unfiltered (file,
1553 "gdbarch_dump: PS_REGNUM # %s\n",
1554 XSTRING (PS_REGNUM));
1555 fprintf_unfiltered (file,
1556 "gdbarch_dump: PS_REGNUM = %d\n",
1559 #ifdef PUSH_ARGUMENTS
1560 fprintf_unfiltered (file,
1561 "gdbarch_dump: %s # %s\n",
1562 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1563 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1565 fprintf_unfiltered (file,
1566 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1567 (long) current_gdbarch->push_arguments
1568 /*PUSH_ARGUMENTS ()*/);
1570 #ifdef PUSH_DUMMY_FRAME
1572 /* Macro might contain `[{}]' when not multi-arch */
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: %s # %s\n",
1575 "PUSH_DUMMY_FRAME(-)",
1576 XSTRING (PUSH_DUMMY_FRAME (-)));
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1581 (long) current_gdbarch->push_dummy_frame
1582 /*PUSH_DUMMY_FRAME ()*/);
1584 #ifdef PUSH_RETURN_ADDRESS
1585 fprintf_unfiltered (file,
1586 "gdbarch_dump: %s # %s\n",
1587 "PUSH_RETURN_ADDRESS(pc, sp)",
1588 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1592 (long) current_gdbarch->push_return_address
1593 /*PUSH_RETURN_ADDRESS ()*/);
1595 #ifdef REGISTER_BYTE
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: %s # %s\n",
1598 "REGISTER_BYTE(reg_nr)",
1599 XSTRING (REGISTER_BYTE (reg_nr)));
1601 fprintf_unfiltered (file,
1602 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1603 (long) current_gdbarch->register_byte
1604 /*REGISTER_BYTE ()*/);
1606 #ifdef REGISTER_BYTES
1607 fprintf_unfiltered (file,
1608 "gdbarch_dump: REGISTER_BYTES # %s\n",
1609 XSTRING (REGISTER_BYTES));
1610 fprintf_unfiltered (file,
1611 "gdbarch_dump: REGISTER_BYTES = %d\n",
1614 #ifdef REGISTER_BYTES_OK
1615 fprintf_unfiltered (file,
1616 "gdbarch_dump: %s # %s\n",
1617 "REGISTER_BYTES_OK(nr_bytes)",
1618 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1620 fprintf_unfiltered (file,
1621 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1622 (long) current_gdbarch->register_bytes_ok
1623 /*REGISTER_BYTES_OK ()*/);
1625 #ifdef REGISTER_CONVERTIBLE
1626 fprintf_unfiltered (file,
1627 "gdbarch_dump: %s # %s\n",
1628 "REGISTER_CONVERTIBLE(nr)",
1629 XSTRING (REGISTER_CONVERTIBLE (nr)));
1631 fprintf_unfiltered (file,
1632 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1633 (long) current_gdbarch->register_convertible
1634 /*REGISTER_CONVERTIBLE ()*/);
1636 #ifdef REGISTER_CONVERT_TO_RAW
1638 /* Macro might contain `[{}]' when not multi-arch */
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: %s # %s\n",
1641 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1642 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1647 (long) current_gdbarch->register_convert_to_raw
1648 /*REGISTER_CONVERT_TO_RAW ()*/);
1650 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1652 /* Macro might contain `[{}]' when not multi-arch */
1653 fprintf_unfiltered (file,
1654 "gdbarch_dump: %s # %s\n",
1655 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1656 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1659 fprintf_unfiltered (file,
1660 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1661 (long) current_gdbarch->register_convert_to_virtual
1662 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1664 #ifdef REGISTER_NAME
1665 fprintf_unfiltered (file,
1666 "gdbarch_dump: %s # %s\n",
1667 "REGISTER_NAME(regnr)",
1668 XSTRING (REGISTER_NAME (regnr)));
1670 fprintf_unfiltered (file,
1671 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1672 (long) current_gdbarch->register_name
1673 /*REGISTER_NAME ()*/);
1675 #ifdef REGISTER_RAW_SIZE
1676 fprintf_unfiltered (file,
1677 "gdbarch_dump: %s # %s\n",
1678 "REGISTER_RAW_SIZE(reg_nr)",
1679 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1683 (long) current_gdbarch->register_raw_size
1684 /*REGISTER_RAW_SIZE ()*/);
1686 #ifdef REGISTER_SIM_REGNO
1687 fprintf_unfiltered (file,
1688 "gdbarch_dump: %s # %s\n",
1689 "REGISTER_SIM_REGNO(reg_nr)",
1690 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1694 (long) current_gdbarch->register_sim_regno
1695 /*REGISTER_SIM_REGNO ()*/);
1697 #ifdef REGISTER_SIZE
1698 fprintf_unfiltered (file,
1699 "gdbarch_dump: REGISTER_SIZE # %s\n",
1700 XSTRING (REGISTER_SIZE));
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: REGISTER_SIZE = %d\n",
1705 #ifdef REGISTER_TO_VALUE
1707 /* Macro might contain `[{}]' when not multi-arch */
1708 fprintf_unfiltered (file,
1709 "gdbarch_dump: %s # %s\n",
1710 "REGISTER_TO_VALUE(regnum, type, from, to)",
1711 XSTRING (REGISTER_TO_VALUE (regnum, type, from, to)));
1714 fprintf_unfiltered (file,
1715 "gdbarch_dump: REGISTER_TO_VALUE = 0x%08lx\n",
1716 (long) current_gdbarch->register_to_value
1717 /*REGISTER_TO_VALUE ()*/);
1719 #ifdef REGISTER_VIRTUAL_SIZE
1720 fprintf_unfiltered (file,
1721 "gdbarch_dump: %s # %s\n",
1722 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1723 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
1725 fprintf_unfiltered (file,
1726 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1727 (long) current_gdbarch->register_virtual_size
1728 /*REGISTER_VIRTUAL_SIZE ()*/);
1730 #ifdef REGISTER_VIRTUAL_TYPE
1731 fprintf_unfiltered (file,
1732 "gdbarch_dump: %s # %s\n",
1733 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1734 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
1736 fprintf_unfiltered (file,
1737 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1738 (long) current_gdbarch->register_virtual_type
1739 /*REGISTER_VIRTUAL_TYPE ()*/);
1741 #ifdef REG_STRUCT_HAS_ADDR
1742 fprintf_unfiltered (file,
1743 "gdbarch_dump: %s # %s\n",
1744 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1745 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1747 fprintf_unfiltered (file,
1748 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1749 (long) current_gdbarch->reg_struct_has_addr
1750 /*REG_STRUCT_HAS_ADDR ()*/);
1752 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1754 /* Macro might contain `[{}]' when not multi-arch */
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: %s # %s\n",
1757 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1758 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1763 (long) current_gdbarch->remote_translate_xfer_address
1764 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1766 #ifdef RETURN_VALUE_ON_STACK
1767 fprintf_unfiltered (file,
1768 "gdbarch_dump: %s # %s\n",
1769 "RETURN_VALUE_ON_STACK(type)",
1770 XSTRING (RETURN_VALUE_ON_STACK (type)));
1772 fprintf_unfiltered (file,
1773 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1774 (long) current_gdbarch->return_value_on_stack
1775 /*RETURN_VALUE_ON_STACK ()*/);
1777 #ifdef SAVED_PC_AFTER_CALL
1778 fprintf_unfiltered (file,
1779 "gdbarch_dump: %s # %s\n",
1780 "SAVED_PC_AFTER_CALL(frame)",
1781 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1783 fprintf_unfiltered (file,
1784 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1785 (long) current_gdbarch->saved_pc_after_call
1786 /*SAVED_PC_AFTER_CALL ()*/);
1788 #ifdef SAVE_DUMMY_FRAME_TOS
1790 /* Macro might contain `[{}]' when not multi-arch */
1791 fprintf_unfiltered (file,
1792 "gdbarch_dump: %s # %s\n",
1793 "SAVE_DUMMY_FRAME_TOS(sp)",
1794 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1797 fprintf_unfiltered (file,
1798 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1799 (long) current_gdbarch->save_dummy_frame_tos
1800 /*SAVE_DUMMY_FRAME_TOS ()*/);
1802 #ifdef SDB_REG_TO_REGNUM
1803 fprintf_unfiltered (file,
1804 "gdbarch_dump: %s # %s\n",
1805 "SDB_REG_TO_REGNUM(sdb_regnr)",
1806 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1808 fprintf_unfiltered (file,
1809 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1810 (long) current_gdbarch->sdb_reg_to_regnum
1811 /*SDB_REG_TO_REGNUM ()*/);
1813 #ifdef SIZEOF_CALL_DUMMY_WORDS
1814 fprintf_unfiltered (file,
1815 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1816 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1819 (long) SIZEOF_CALL_DUMMY_WORDS);
1821 #ifdef SKIP_PROLOGUE
1822 fprintf_unfiltered (file,
1823 "gdbarch_dump: %s # %s\n",
1824 "SKIP_PROLOGUE(ip)",
1825 XSTRING (SKIP_PROLOGUE (ip)));
1827 fprintf_unfiltered (file,
1828 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1829 (long) current_gdbarch->skip_prologue
1830 /*SKIP_PROLOGUE ()*/);
1832 #ifdef SKIP_TRAMPOLINE_CODE
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: %s # %s\n",
1835 "SKIP_TRAMPOLINE_CODE(pc)",
1836 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1838 fprintf_unfiltered (file,
1839 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1840 (long) current_gdbarch->skip_trampoline_code
1841 /*SKIP_TRAMPOLINE_CODE ()*/);
1843 #ifdef SMASH_TEXT_ADDRESS
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: %s # %s\n",
1846 "SMASH_TEXT_ADDRESS(addr)",
1847 XSTRING (SMASH_TEXT_ADDRESS (addr)));
1849 fprintf_unfiltered (file,
1850 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1851 (long) current_gdbarch->smash_text_address
1852 /*SMASH_TEXT_ADDRESS ()*/);
1854 #ifdef SOFTWARE_SINGLE_STEP
1856 /* Macro might contain `[{}]' when not multi-arch */
1857 fprintf_unfiltered (file,
1858 "gdbarch_dump: %s # %s\n",
1859 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1860 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1863 fprintf_unfiltered (file,
1864 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1865 (long) current_gdbarch->software_single_step
1866 /*SOFTWARE_SINGLE_STEP ()*/);
1869 fprintf_unfiltered (file,
1870 "gdbarch_dump: SP_REGNUM # %s\n",
1871 XSTRING (SP_REGNUM));
1872 fprintf_unfiltered (file,
1873 "gdbarch_dump: SP_REGNUM = %d\n",
1876 #ifdef STAB_REG_TO_REGNUM
1877 fprintf_unfiltered (file,
1878 "gdbarch_dump: %s # %s\n",
1879 "STAB_REG_TO_REGNUM(stab_regnr)",
1880 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1882 fprintf_unfiltered (file,
1883 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1884 (long) current_gdbarch->stab_reg_to_regnum
1885 /*STAB_REG_TO_REGNUM ()*/);
1888 fprintf_unfiltered (file,
1889 "gdbarch_dump: %s # %s\n",
1891 XSTRING (STACK_ALIGN (sp)));
1893 fprintf_unfiltered (file,
1894 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1895 (long) current_gdbarch->stack_align
1896 /*STACK_ALIGN ()*/);
1898 #ifdef STORE_PSEUDO_REGISTER
1900 /* Macro might contain `[{}]' when not multi-arch */
1901 fprintf_unfiltered (file,
1902 "gdbarch_dump: %s # %s\n",
1903 "STORE_PSEUDO_REGISTER(regnum)",
1904 XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1907 fprintf_unfiltered (file,
1908 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1909 (long) current_gdbarch->store_pseudo_register
1910 /*STORE_PSEUDO_REGISTER ()*/);
1912 #ifdef STORE_RETURN_VALUE
1914 /* Macro might contain `[{}]' when not multi-arch */
1915 fprintf_unfiltered (file,
1916 "gdbarch_dump: %s # %s\n",
1917 "STORE_RETURN_VALUE(type, valbuf)",
1918 XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1921 fprintf_unfiltered (file,
1922 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1923 (long) current_gdbarch->store_return_value
1924 /*STORE_RETURN_VALUE ()*/);
1926 #ifdef STORE_STRUCT_RETURN
1928 /* Macro might contain `[{}]' when not multi-arch */
1929 fprintf_unfiltered (file,
1930 "gdbarch_dump: %s # %s\n",
1931 "STORE_STRUCT_RETURN(addr, sp)",
1932 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1935 fprintf_unfiltered (file,
1936 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1937 (long) current_gdbarch->store_struct_return
1938 /*STORE_STRUCT_RETURN ()*/);
1940 #ifdef TARGET_ADDR_BIT
1941 fprintf_unfiltered (file,
1942 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1943 XSTRING (TARGET_ADDR_BIT));
1944 fprintf_unfiltered (file,
1945 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1948 #ifdef TARGET_ARCHITECTURE
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1951 XSTRING (TARGET_ARCHITECTURE));
1952 if (TARGET_ARCHITECTURE != NULL)
1953 fprintf_unfiltered (file,
1954 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1955 TARGET_ARCHITECTURE->printable_name);
1957 #ifdef TARGET_BFD_VMA_BIT
1958 fprintf_unfiltered (file,
1959 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1960 XSTRING (TARGET_BFD_VMA_BIT));
1961 fprintf_unfiltered (file,
1962 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1963 TARGET_BFD_VMA_BIT);
1965 #ifdef TARGET_BYTE_ORDER
1966 fprintf_unfiltered (file,
1967 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1968 XSTRING (TARGET_BYTE_ORDER));
1969 fprintf_unfiltered (file,
1970 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1971 (long) TARGET_BYTE_ORDER);
1973 #ifdef TARGET_CHAR_SIGNED
1974 fprintf_unfiltered (file,
1975 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1976 XSTRING (TARGET_CHAR_SIGNED));
1977 fprintf_unfiltered (file,
1978 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1979 TARGET_CHAR_SIGNED);
1981 #ifdef TARGET_DOUBLE_BIT
1982 fprintf_unfiltered (file,
1983 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1984 XSTRING (TARGET_DOUBLE_BIT));
1985 fprintf_unfiltered (file,
1986 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1989 #ifdef TARGET_DOUBLE_FORMAT
1990 fprintf_unfiltered (file,
1991 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1992 XSTRING (TARGET_DOUBLE_FORMAT));
1993 fprintf_unfiltered (file,
1994 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1995 (long) TARGET_DOUBLE_FORMAT);
1997 #ifdef TARGET_FLOAT_BIT
1998 fprintf_unfiltered (file,
1999 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
2000 XSTRING (TARGET_FLOAT_BIT));
2001 fprintf_unfiltered (file,
2002 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
2005 #ifdef TARGET_FLOAT_FORMAT
2006 fprintf_unfiltered (file,
2007 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
2008 XSTRING (TARGET_FLOAT_FORMAT));
2009 fprintf_unfiltered (file,
2010 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2011 (long) TARGET_FLOAT_FORMAT);
2013 #ifdef TARGET_INT_BIT
2014 fprintf_unfiltered (file,
2015 "gdbarch_dump: TARGET_INT_BIT # %s\n",
2016 XSTRING (TARGET_INT_BIT));
2017 fprintf_unfiltered (file,
2018 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2021 #ifdef TARGET_LONG_BIT
2022 fprintf_unfiltered (file,
2023 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2024 XSTRING (TARGET_LONG_BIT));
2025 fprintf_unfiltered (file,
2026 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2029 #ifdef TARGET_LONG_DOUBLE_BIT
2030 fprintf_unfiltered (file,
2031 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2032 XSTRING (TARGET_LONG_DOUBLE_BIT));
2033 fprintf_unfiltered (file,
2034 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2035 TARGET_LONG_DOUBLE_BIT);
2037 #ifdef TARGET_LONG_DOUBLE_FORMAT
2038 fprintf_unfiltered (file,
2039 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2040 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
2041 fprintf_unfiltered (file,
2042 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2043 (long) TARGET_LONG_DOUBLE_FORMAT);
2045 #ifdef TARGET_LONG_LONG_BIT
2046 fprintf_unfiltered (file,
2047 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2048 XSTRING (TARGET_LONG_LONG_BIT));
2049 fprintf_unfiltered (file,
2050 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2051 TARGET_LONG_LONG_BIT);
2053 #ifdef TARGET_PRINT_INSN
2054 fprintf_unfiltered (file,
2055 "gdbarch_dump: %s # %s\n",
2056 "TARGET_PRINT_INSN(vma, info)",
2057 XSTRING (TARGET_PRINT_INSN (vma, info)));
2059 fprintf_unfiltered (file,
2060 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2061 (long) current_gdbarch->print_insn
2062 /*TARGET_PRINT_INSN ()*/);
2064 #ifdef TARGET_PTR_BIT
2065 fprintf_unfiltered (file,
2066 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2067 XSTRING (TARGET_PTR_BIT));
2068 fprintf_unfiltered (file,
2069 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2072 #ifdef TARGET_READ_FP
2073 fprintf_unfiltered (file,
2074 "gdbarch_dump: %s # %s\n",
2076 XSTRING (TARGET_READ_FP ()));
2078 fprintf_unfiltered (file,
2079 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2080 (long) current_gdbarch->read_fp
2081 /*TARGET_READ_FP ()*/);
2083 #ifdef TARGET_READ_PC
2084 fprintf_unfiltered (file,
2085 "gdbarch_dump: %s # %s\n",
2086 "TARGET_READ_PC(ptid)",
2087 XSTRING (TARGET_READ_PC (ptid)));
2089 fprintf_unfiltered (file,
2090 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2091 (long) current_gdbarch->read_pc
2092 /*TARGET_READ_PC ()*/);
2094 #ifdef TARGET_READ_SP
2095 fprintf_unfiltered (file,
2096 "gdbarch_dump: %s # %s\n",
2098 XSTRING (TARGET_READ_SP ()));
2100 fprintf_unfiltered (file,
2101 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2102 (long) current_gdbarch->read_sp
2103 /*TARGET_READ_SP ()*/);
2105 #ifdef TARGET_SHORT_BIT
2106 fprintf_unfiltered (file,
2107 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2108 XSTRING (TARGET_SHORT_BIT));
2109 fprintf_unfiltered (file,
2110 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2113 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2115 /* Macro might contain `[{}]' when not multi-arch */
2116 fprintf_unfiltered (file,
2117 "gdbarch_dump: %s # %s\n",
2118 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2119 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
2122 fprintf_unfiltered (file,
2123 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2124 (long) current_gdbarch->virtual_frame_pointer
2125 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2127 #ifdef TARGET_WRITE_PC
2129 /* Macro might contain `[{}]' when not multi-arch */
2130 fprintf_unfiltered (file,
2131 "gdbarch_dump: %s # %s\n",
2132 "TARGET_WRITE_PC(val, ptid)",
2133 XSTRING (TARGET_WRITE_PC (val, ptid)));
2136 fprintf_unfiltered (file,
2137 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2138 (long) current_gdbarch->write_pc
2139 /*TARGET_WRITE_PC ()*/);
2141 #ifdef TARGET_WRITE_SP
2143 /* Macro might contain `[{}]' when not multi-arch */
2144 fprintf_unfiltered (file,
2145 "gdbarch_dump: %s # %s\n",
2146 "TARGET_WRITE_SP(val)",
2147 XSTRING (TARGET_WRITE_SP (val)));
2150 fprintf_unfiltered (file,
2151 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2152 (long) current_gdbarch->write_sp
2153 /*TARGET_WRITE_SP ()*/);
2155 #ifdef USE_GENERIC_DUMMY_FRAMES
2156 fprintf_unfiltered (file,
2157 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2158 XSTRING (USE_GENERIC_DUMMY_FRAMES));
2159 fprintf_unfiltered (file,
2160 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2161 USE_GENERIC_DUMMY_FRAMES);
2163 #ifdef USE_STRUCT_CONVENTION
2164 fprintf_unfiltered (file,
2165 "gdbarch_dump: %s # %s\n",
2166 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2167 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2169 fprintf_unfiltered (file,
2170 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2171 (long) current_gdbarch->use_struct_convention
2172 /*USE_STRUCT_CONVENTION ()*/);
2174 #ifdef VALUE_TO_REGISTER
2176 /* Macro might contain `[{}]' when not multi-arch */
2177 fprintf_unfiltered (file,
2178 "gdbarch_dump: %s # %s\n",
2179 "VALUE_TO_REGISTER(type, regnum, from, to)",
2180 XSTRING (VALUE_TO_REGISTER (type, regnum, from, to)));
2183 fprintf_unfiltered (file,
2184 "gdbarch_dump: VALUE_TO_REGISTER = 0x%08lx\n",
2185 (long) current_gdbarch->value_to_register
2186 /*VALUE_TO_REGISTER ()*/);
2188 if (current_gdbarch->dump_tdep != NULL)
2189 current_gdbarch->dump_tdep (current_gdbarch, file);
2192 struct gdbarch_tdep *
2193 gdbarch_tdep (struct gdbarch *gdbarch)
2195 if (gdbarch_debug >= 2)
2196 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2197 return gdbarch->tdep;
2201 const struct bfd_arch_info *
2202 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2204 gdb_assert (gdbarch != NULL);
2205 if (gdbarch_debug >= 2)
2206 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2207 return gdbarch->bfd_arch_info;
2211 gdbarch_byte_order (struct gdbarch *gdbarch)
2213 gdb_assert (gdbarch != NULL);
2214 if (gdbarch_debug >= 2)
2215 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2216 return gdbarch->byte_order;
2220 gdbarch_short_bit (struct gdbarch *gdbarch)
2222 gdb_assert (gdbarch != NULL);
2223 /* Skip verify of short_bit, invalid_p == 0 */
2224 if (gdbarch_debug >= 2)
2225 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2226 return gdbarch->short_bit;
2230 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2233 gdbarch->short_bit = short_bit;
2237 gdbarch_int_bit (struct gdbarch *gdbarch)
2239 gdb_assert (gdbarch != NULL);
2240 /* Skip verify of int_bit, invalid_p == 0 */
2241 if (gdbarch_debug >= 2)
2242 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2243 return gdbarch->int_bit;
2247 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2250 gdbarch->int_bit = int_bit;
2254 gdbarch_long_bit (struct gdbarch *gdbarch)
2256 gdb_assert (gdbarch != NULL);
2257 /* Skip verify of long_bit, invalid_p == 0 */
2258 if (gdbarch_debug >= 2)
2259 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2260 return gdbarch->long_bit;
2264 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2267 gdbarch->long_bit = long_bit;
2271 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2273 gdb_assert (gdbarch != NULL);
2274 /* Skip verify of long_long_bit, invalid_p == 0 */
2275 if (gdbarch_debug >= 2)
2276 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2277 return gdbarch->long_long_bit;
2281 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2284 gdbarch->long_long_bit = long_long_bit;
2288 gdbarch_float_bit (struct gdbarch *gdbarch)
2290 gdb_assert (gdbarch != NULL);
2291 /* Skip verify of float_bit, invalid_p == 0 */
2292 if (gdbarch_debug >= 2)
2293 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2294 return gdbarch->float_bit;
2298 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2301 gdbarch->float_bit = float_bit;
2305 gdbarch_double_bit (struct gdbarch *gdbarch)
2307 gdb_assert (gdbarch != NULL);
2308 /* Skip verify of double_bit, invalid_p == 0 */
2309 if (gdbarch_debug >= 2)
2310 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2311 return gdbarch->double_bit;
2315 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2318 gdbarch->double_bit = double_bit;
2322 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2324 gdb_assert (gdbarch != NULL);
2325 /* Skip verify of long_double_bit, invalid_p == 0 */
2326 if (gdbarch_debug >= 2)
2327 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2328 return gdbarch->long_double_bit;
2332 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2333 int long_double_bit)
2335 gdbarch->long_double_bit = long_double_bit;
2339 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2341 gdb_assert (gdbarch != NULL);
2342 /* Skip verify of ptr_bit, invalid_p == 0 */
2343 if (gdbarch_debug >= 2)
2344 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2345 return gdbarch->ptr_bit;
2349 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2352 gdbarch->ptr_bit = ptr_bit;
2356 gdbarch_addr_bit (struct gdbarch *gdbarch)
2358 gdb_assert (gdbarch != NULL);
2359 if (gdbarch->addr_bit == 0)
2360 internal_error (__FILE__, __LINE__,
2361 "gdbarch: gdbarch_addr_bit invalid");
2362 if (gdbarch_debug >= 2)
2363 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2364 return gdbarch->addr_bit;
2368 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2371 gdbarch->addr_bit = addr_bit;
2375 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2377 gdb_assert (gdbarch != NULL);
2378 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2379 if (gdbarch_debug >= 2)
2380 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2381 return gdbarch->bfd_vma_bit;
2385 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2388 gdbarch->bfd_vma_bit = bfd_vma_bit;
2392 gdbarch_char_signed (struct gdbarch *gdbarch)
2394 gdb_assert (gdbarch != NULL);
2395 if (gdbarch->char_signed == -1)
2396 internal_error (__FILE__, __LINE__,
2397 "gdbarch: gdbarch_char_signed invalid");
2398 if (gdbarch_debug >= 2)
2399 fprintf_unfiltered (gdb_stdlog, "gdbarch_char_signed called\n");
2400 return gdbarch->char_signed;
2404 set_gdbarch_char_signed (struct gdbarch *gdbarch,
2407 gdbarch->char_signed = char_signed;
2411 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2413 gdb_assert (gdbarch != NULL);
2414 if (gdbarch->read_pc == 0)
2415 internal_error (__FILE__, __LINE__,
2416 "gdbarch: gdbarch_read_pc invalid");
2417 if (gdbarch_debug >= 2)
2418 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2419 return gdbarch->read_pc (ptid);
2423 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2424 gdbarch_read_pc_ftype read_pc)
2426 gdbarch->read_pc = read_pc;
2430 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2432 gdb_assert (gdbarch != NULL);
2433 if (gdbarch->write_pc == 0)
2434 internal_error (__FILE__, __LINE__,
2435 "gdbarch: gdbarch_write_pc invalid");
2436 if (gdbarch_debug >= 2)
2437 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2438 gdbarch->write_pc (val, ptid);
2442 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2443 gdbarch_write_pc_ftype write_pc)
2445 gdbarch->write_pc = write_pc;
2449 gdbarch_read_fp (struct gdbarch *gdbarch)
2451 gdb_assert (gdbarch != NULL);
2452 if (gdbarch->read_fp == 0)
2453 internal_error (__FILE__, __LINE__,
2454 "gdbarch: gdbarch_read_fp invalid");
2455 if (gdbarch_debug >= 2)
2456 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2457 return gdbarch->read_fp ();
2461 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2462 gdbarch_read_fp_ftype read_fp)
2464 gdbarch->read_fp = read_fp;
2468 gdbarch_read_sp (struct gdbarch *gdbarch)
2470 gdb_assert (gdbarch != NULL);
2471 if (gdbarch->read_sp == 0)
2472 internal_error (__FILE__, __LINE__,
2473 "gdbarch: gdbarch_read_sp invalid");
2474 if (gdbarch_debug >= 2)
2475 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2476 return gdbarch->read_sp ();
2480 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2481 gdbarch_read_sp_ftype read_sp)
2483 gdbarch->read_sp = read_sp;
2487 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2489 gdb_assert (gdbarch != NULL);
2490 if (gdbarch->write_sp == 0)
2491 internal_error (__FILE__, __LINE__,
2492 "gdbarch: gdbarch_write_sp invalid");
2493 if (gdbarch_debug >= 2)
2494 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2495 gdbarch->write_sp (val);
2499 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2500 gdbarch_write_sp_ftype write_sp)
2502 gdbarch->write_sp = write_sp;
2506 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2508 gdb_assert (gdbarch != NULL);
2509 if (gdbarch->virtual_frame_pointer == 0)
2510 internal_error (__FILE__, __LINE__,
2511 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2512 if (gdbarch_debug >= 2)
2513 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2514 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2518 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2519 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2521 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2525 gdbarch_register_read_p (struct gdbarch *gdbarch)
2527 gdb_assert (gdbarch != NULL);
2528 return gdbarch->register_read != 0;
2532 gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf)
2534 gdb_assert (gdbarch != NULL);
2535 if (gdbarch->register_read == 0)
2536 internal_error (__FILE__, __LINE__,
2537 "gdbarch: gdbarch_register_read invalid");
2538 if (gdbarch_debug >= 2)
2539 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n");
2540 gdbarch->register_read (gdbarch, regnum, buf);
2544 set_gdbarch_register_read (struct gdbarch *gdbarch,
2545 gdbarch_register_read_ftype register_read)
2547 gdbarch->register_read = register_read;
2551 gdbarch_register_write_p (struct gdbarch *gdbarch)
2553 gdb_assert (gdbarch != NULL);
2554 return gdbarch->register_write != 0;
2558 gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf)
2560 gdb_assert (gdbarch != NULL);
2561 if (gdbarch->register_write == 0)
2562 internal_error (__FILE__, __LINE__,
2563 "gdbarch: gdbarch_register_write invalid");
2564 if (gdbarch_debug >= 2)
2565 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n");
2566 gdbarch->register_write (gdbarch, regnum, buf);
2570 set_gdbarch_register_write (struct gdbarch *gdbarch,
2571 gdbarch_register_write_ftype register_write)
2573 gdbarch->register_write = register_write;
2577 gdbarch_num_regs (struct gdbarch *gdbarch)
2579 gdb_assert (gdbarch != NULL);
2580 if (gdbarch->num_regs == -1)
2581 internal_error (__FILE__, __LINE__,
2582 "gdbarch: gdbarch_num_regs invalid");
2583 if (gdbarch_debug >= 2)
2584 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2585 return gdbarch->num_regs;
2589 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2592 gdbarch->num_regs = num_regs;
2596 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2598 gdb_assert (gdbarch != NULL);
2599 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2600 if (gdbarch_debug >= 2)
2601 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2602 return gdbarch->num_pseudo_regs;
2606 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2607 int num_pseudo_regs)
2609 gdbarch->num_pseudo_regs = num_pseudo_regs;
2613 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2615 gdb_assert (gdbarch != NULL);
2616 /* Skip verify of sp_regnum, invalid_p == 0 */
2617 if (gdbarch_debug >= 2)
2618 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2619 return gdbarch->sp_regnum;
2623 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2626 gdbarch->sp_regnum = sp_regnum;
2630 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2632 gdb_assert (gdbarch != NULL);
2633 /* Skip verify of fp_regnum, invalid_p == 0 */
2634 if (gdbarch_debug >= 2)
2635 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2636 return gdbarch->fp_regnum;
2640 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2643 gdbarch->fp_regnum = fp_regnum;
2647 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2649 gdb_assert (gdbarch != NULL);
2650 /* Skip verify of pc_regnum, invalid_p == 0 */
2651 if (gdbarch_debug >= 2)
2652 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2653 return gdbarch->pc_regnum;
2657 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2660 gdbarch->pc_regnum = pc_regnum;
2664 gdbarch_ps_regnum (struct gdbarch *gdbarch)
2666 gdb_assert (gdbarch != NULL);
2667 /* Skip verify of ps_regnum, invalid_p == 0 */
2668 if (gdbarch_debug >= 2)
2669 fprintf_unfiltered (gdb_stdlog, "gdbarch_ps_regnum called\n");
2670 return gdbarch->ps_regnum;
2674 set_gdbarch_ps_regnum (struct gdbarch *gdbarch,
2677 gdbarch->ps_regnum = ps_regnum;
2681 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2683 gdb_assert (gdbarch != NULL);
2684 /* Skip verify of fp0_regnum, invalid_p == 0 */
2685 if (gdbarch_debug >= 2)
2686 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2687 return gdbarch->fp0_regnum;
2691 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2694 gdbarch->fp0_regnum = fp0_regnum;
2698 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2700 gdb_assert (gdbarch != NULL);
2701 /* Skip verify of npc_regnum, invalid_p == 0 */
2702 if (gdbarch_debug >= 2)
2703 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2704 return gdbarch->npc_regnum;
2708 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2711 gdbarch->npc_regnum = npc_regnum;
2715 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2717 gdb_assert (gdbarch != NULL);
2718 if (gdbarch->stab_reg_to_regnum == 0)
2719 internal_error (__FILE__, __LINE__,
2720 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2721 if (gdbarch_debug >= 2)
2722 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2723 return gdbarch->stab_reg_to_regnum (stab_regnr);
2727 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2728 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2730 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2734 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2736 gdb_assert (gdbarch != NULL);
2737 if (gdbarch->ecoff_reg_to_regnum == 0)
2738 internal_error (__FILE__, __LINE__,
2739 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2740 if (gdbarch_debug >= 2)
2741 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2742 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2746 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2747 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2749 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2753 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2755 gdb_assert (gdbarch != NULL);
2756 if (gdbarch->dwarf_reg_to_regnum == 0)
2757 internal_error (__FILE__, __LINE__,
2758 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2759 if (gdbarch_debug >= 2)
2760 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2761 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2765 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2766 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2768 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2772 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2774 gdb_assert (gdbarch != NULL);
2775 if (gdbarch->sdb_reg_to_regnum == 0)
2776 internal_error (__FILE__, __LINE__,
2777 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2778 if (gdbarch_debug >= 2)
2779 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2780 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2784 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2785 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2787 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2791 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2793 gdb_assert (gdbarch != NULL);
2794 if (gdbarch->dwarf2_reg_to_regnum == 0)
2795 internal_error (__FILE__, __LINE__,
2796 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2797 if (gdbarch_debug >= 2)
2798 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2799 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2803 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2804 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2806 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2810 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2812 gdb_assert (gdbarch != NULL);
2813 if (gdbarch->register_name == 0)
2814 internal_error (__FILE__, __LINE__,
2815 "gdbarch: gdbarch_register_name invalid");
2816 if (gdbarch_debug >= 2)
2817 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2818 return gdbarch->register_name (regnr);
2822 set_gdbarch_register_name (struct gdbarch *gdbarch,
2823 gdbarch_register_name_ftype register_name)
2825 gdbarch->register_name = register_name;
2829 gdbarch_register_size (struct gdbarch *gdbarch)
2831 gdb_assert (gdbarch != NULL);
2832 if (gdbarch->register_size == -1)
2833 internal_error (__FILE__, __LINE__,
2834 "gdbarch: gdbarch_register_size invalid");
2835 if (gdbarch_debug >= 2)
2836 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2837 return gdbarch->register_size;
2841 set_gdbarch_register_size (struct gdbarch *gdbarch,
2844 gdbarch->register_size = register_size;
2848 gdbarch_register_bytes (struct gdbarch *gdbarch)
2850 gdb_assert (gdbarch != NULL);
2851 if (gdbarch->register_bytes == -1)
2852 internal_error (__FILE__, __LINE__,
2853 "gdbarch: gdbarch_register_bytes invalid");
2854 if (gdbarch_debug >= 2)
2855 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2856 return gdbarch->register_bytes;
2860 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2863 gdbarch->register_bytes = register_bytes;
2867 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2869 gdb_assert (gdbarch != NULL);
2870 if (gdbarch->register_byte == 0)
2871 internal_error (__FILE__, __LINE__,
2872 "gdbarch: gdbarch_register_byte invalid");
2873 if (gdbarch_debug >= 2)
2874 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2875 return gdbarch->register_byte (reg_nr);
2879 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2880 gdbarch_register_byte_ftype register_byte)
2882 gdbarch->register_byte = register_byte;
2886 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2888 gdb_assert (gdbarch != NULL);
2889 if (gdbarch->register_raw_size == 0)
2890 internal_error (__FILE__, __LINE__,
2891 "gdbarch: gdbarch_register_raw_size invalid");
2892 if (gdbarch_debug >= 2)
2893 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2894 return gdbarch->register_raw_size (reg_nr);
2898 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2899 gdbarch_register_raw_size_ftype register_raw_size)
2901 gdbarch->register_raw_size = register_raw_size;
2905 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
2907 gdb_assert (gdbarch != NULL);
2908 if (gdbarch->max_register_raw_size == -1)
2909 internal_error (__FILE__, __LINE__,
2910 "gdbarch: gdbarch_max_register_raw_size invalid");
2911 if (gdbarch_debug >= 2)
2912 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2913 return gdbarch->max_register_raw_size;
2917 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2918 int max_register_raw_size)
2920 gdbarch->max_register_raw_size = max_register_raw_size;
2924 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2926 gdb_assert (gdbarch != NULL);
2927 if (gdbarch->register_virtual_size == 0)
2928 internal_error (__FILE__, __LINE__,
2929 "gdbarch: gdbarch_register_virtual_size invalid");
2930 if (gdbarch_debug >= 2)
2931 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2932 return gdbarch->register_virtual_size (reg_nr);
2936 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2937 gdbarch_register_virtual_size_ftype register_virtual_size)
2939 gdbarch->register_virtual_size = register_virtual_size;
2943 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
2945 gdb_assert (gdbarch != NULL);
2946 if (gdbarch->max_register_virtual_size == -1)
2947 internal_error (__FILE__, __LINE__,
2948 "gdbarch: gdbarch_max_register_virtual_size invalid");
2949 if (gdbarch_debug >= 2)
2950 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2951 return gdbarch->max_register_virtual_size;
2955 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2956 int max_register_virtual_size)
2958 gdbarch->max_register_virtual_size = max_register_virtual_size;
2962 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2964 gdb_assert (gdbarch != NULL);
2965 if (gdbarch->register_virtual_type == 0)
2966 internal_error (__FILE__, __LINE__,
2967 "gdbarch: gdbarch_register_virtual_type invalid");
2968 if (gdbarch_debug >= 2)
2969 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2970 return gdbarch->register_virtual_type (reg_nr);
2974 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2975 gdbarch_register_virtual_type_ftype register_virtual_type)
2977 gdbarch->register_virtual_type = register_virtual_type;
2981 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2983 gdb_assert (gdbarch != NULL);
2984 if (gdbarch->do_registers_info == 0)
2985 internal_error (__FILE__, __LINE__,
2986 "gdbarch: gdbarch_do_registers_info invalid");
2987 if (gdbarch_debug >= 2)
2988 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
2989 gdbarch->do_registers_info (reg_nr, fpregs);
2993 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
2994 gdbarch_do_registers_info_ftype do_registers_info)
2996 gdbarch->do_registers_info = do_registers_info;
3000 gdbarch_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame)
3002 gdb_assert (gdbarch != NULL);
3003 if (gdbarch->print_float_info == 0)
3004 internal_error (__FILE__, __LINE__,
3005 "gdbarch: gdbarch_print_float_info invalid");
3006 if (gdbarch_debug >= 2)
3007 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_float_info called\n");
3008 gdbarch->print_float_info (gdbarch, file, frame);
3012 set_gdbarch_print_float_info (struct gdbarch *gdbarch,
3013 gdbarch_print_float_info_ftype print_float_info)
3015 gdbarch->print_float_info = print_float_info;
3019 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
3021 gdb_assert (gdbarch != NULL);
3022 if (gdbarch->register_sim_regno == 0)
3023 internal_error (__FILE__, __LINE__,
3024 "gdbarch: gdbarch_register_sim_regno invalid");
3025 if (gdbarch_debug >= 2)
3026 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
3027 return gdbarch->register_sim_regno (reg_nr);
3031 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
3032 gdbarch_register_sim_regno_ftype register_sim_regno)
3034 gdbarch->register_sim_regno = register_sim_regno;
3038 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
3040 gdb_assert (gdbarch != NULL);
3041 return gdbarch->register_bytes_ok != 0;
3045 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
3047 gdb_assert (gdbarch != NULL);
3048 if (gdbarch->register_bytes_ok == 0)
3049 internal_error (__FILE__, __LINE__,
3050 "gdbarch: gdbarch_register_bytes_ok invalid");
3051 if (gdbarch_debug >= 2)
3052 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
3053 return gdbarch->register_bytes_ok (nr_bytes);
3057 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
3058 gdbarch_register_bytes_ok_ftype register_bytes_ok)
3060 gdbarch->register_bytes_ok = register_bytes_ok;
3064 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
3066 gdb_assert (gdbarch != NULL);
3067 if (gdbarch->cannot_fetch_register == 0)
3068 internal_error (__FILE__, __LINE__,
3069 "gdbarch: gdbarch_cannot_fetch_register invalid");
3070 if (gdbarch_debug >= 2)
3071 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
3072 return gdbarch->cannot_fetch_register (regnum);
3076 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
3077 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
3079 gdbarch->cannot_fetch_register = cannot_fetch_register;
3083 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
3085 gdb_assert (gdbarch != NULL);
3086 if (gdbarch->cannot_store_register == 0)
3087 internal_error (__FILE__, __LINE__,
3088 "gdbarch: gdbarch_cannot_store_register invalid");
3089 if (gdbarch_debug >= 2)
3090 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
3091 return gdbarch->cannot_store_register (regnum);
3095 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
3096 gdbarch_cannot_store_register_ftype cannot_store_register)
3098 gdbarch->cannot_store_register = cannot_store_register;
3102 gdbarch_get_longjmp_target_p (struct gdbarch *gdbarch)
3104 gdb_assert (gdbarch != NULL);
3105 return gdbarch->get_longjmp_target != 0;
3109 gdbarch_get_longjmp_target (struct gdbarch *gdbarch, CORE_ADDR *pc)
3111 gdb_assert (gdbarch != NULL);
3112 if (gdbarch->get_longjmp_target == 0)
3113 internal_error (__FILE__, __LINE__,
3114 "gdbarch: gdbarch_get_longjmp_target invalid");
3115 if (gdbarch_debug >= 2)
3116 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_longjmp_target called\n");
3117 return gdbarch->get_longjmp_target (pc);
3121 set_gdbarch_get_longjmp_target (struct gdbarch *gdbarch,
3122 gdbarch_get_longjmp_target_ftype get_longjmp_target)
3124 gdbarch->get_longjmp_target = get_longjmp_target;
3128 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
3130 gdb_assert (gdbarch != NULL);
3131 if (gdbarch->use_generic_dummy_frames == -1)
3132 internal_error (__FILE__, __LINE__,
3133 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3134 if (gdbarch_debug >= 2)
3135 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
3136 return gdbarch->use_generic_dummy_frames;
3140 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
3141 int use_generic_dummy_frames)
3143 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
3147 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
3149 gdb_assert (gdbarch != NULL);
3150 if (gdbarch->call_dummy_location == 0)
3151 internal_error (__FILE__, __LINE__,
3152 "gdbarch: gdbarch_call_dummy_location invalid");
3153 if (gdbarch_debug >= 2)
3154 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
3155 return gdbarch->call_dummy_location;
3159 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
3160 int call_dummy_location)
3162 gdbarch->call_dummy_location = call_dummy_location;
3166 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
3168 gdb_assert (gdbarch != NULL);
3169 if (gdbarch->call_dummy_address == 0)
3170 internal_error (__FILE__, __LINE__,
3171 "gdbarch: gdbarch_call_dummy_address invalid");
3172 if (gdbarch_debug >= 2)
3173 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
3174 return gdbarch->call_dummy_address ();
3178 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
3179 gdbarch_call_dummy_address_ftype call_dummy_address)
3181 gdbarch->call_dummy_address = call_dummy_address;
3185 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
3187 gdb_assert (gdbarch != NULL);
3188 if (gdbarch->call_dummy_start_offset == -1)
3189 internal_error (__FILE__, __LINE__,
3190 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3191 if (gdbarch_debug >= 2)
3192 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
3193 return gdbarch->call_dummy_start_offset;
3197 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
3198 CORE_ADDR call_dummy_start_offset)
3200 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
3204 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
3206 gdb_assert (gdbarch != NULL);
3207 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
3208 internal_error (__FILE__, __LINE__,
3209 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3210 if (gdbarch_debug >= 2)
3211 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
3212 return gdbarch->call_dummy_breakpoint_offset;
3216 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3217 CORE_ADDR call_dummy_breakpoint_offset)
3219 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3223 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3225 gdb_assert (gdbarch != NULL);
3226 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3227 internal_error (__FILE__, __LINE__,
3228 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3229 if (gdbarch_debug >= 2)
3230 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3231 return gdbarch->call_dummy_breakpoint_offset_p;
3235 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3236 int call_dummy_breakpoint_offset_p)
3238 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3242 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3244 gdb_assert (gdbarch != NULL);
3245 if (gdbarch->call_dummy_length == -1)
3246 internal_error (__FILE__, __LINE__,
3247 "gdbarch: gdbarch_call_dummy_length invalid");
3248 if (gdbarch_debug >= 2)
3249 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3250 return gdbarch->call_dummy_length;
3254 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3255 int call_dummy_length)
3257 gdbarch->call_dummy_length = call_dummy_length;
3261 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3263 gdb_assert (gdbarch != NULL);
3264 if (gdbarch->pc_in_call_dummy == 0)
3265 internal_error (__FILE__, __LINE__,
3266 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3267 if (gdbarch_debug >= 2)
3268 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
3269 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
3273 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
3274 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
3276 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
3280 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3282 gdb_assert (gdbarch != NULL);
3283 if (gdbarch->call_dummy_p == -1)
3284 internal_error (__FILE__, __LINE__,
3285 "gdbarch: gdbarch_call_dummy_p invalid");
3286 if (gdbarch_debug >= 2)
3287 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3288 return gdbarch->call_dummy_p;
3292 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3295 gdbarch->call_dummy_p = call_dummy_p;
3299 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3301 gdb_assert (gdbarch != NULL);
3302 /* Skip verify of call_dummy_words, invalid_p == 0 */
3303 if (gdbarch_debug >= 2)
3304 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3305 return gdbarch->call_dummy_words;
3309 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3310 LONGEST * call_dummy_words)
3312 gdbarch->call_dummy_words = call_dummy_words;
3316 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3318 gdb_assert (gdbarch != NULL);
3319 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3320 if (gdbarch_debug >= 2)
3321 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3322 return gdbarch->sizeof_call_dummy_words;
3326 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3327 int sizeof_call_dummy_words)
3329 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3333 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3335 gdb_assert (gdbarch != NULL);
3336 if (gdbarch->call_dummy_stack_adjust_p == -1)
3337 internal_error (__FILE__, __LINE__,
3338 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3339 if (gdbarch_debug >= 2)
3340 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3341 return gdbarch->call_dummy_stack_adjust_p;
3345 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3346 int call_dummy_stack_adjust_p)
3348 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3352 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3354 gdb_assert (gdbarch != NULL);
3355 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3356 internal_error (__FILE__, __LINE__,
3357 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3358 if (gdbarch_debug >= 2)
3359 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3360 return gdbarch->call_dummy_stack_adjust;
3364 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3365 int call_dummy_stack_adjust)
3367 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3371 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)
3373 gdb_assert (gdbarch != NULL);
3374 if (gdbarch->fix_call_dummy == 0)
3375 internal_error (__FILE__, __LINE__,
3376 "gdbarch: gdbarch_fix_call_dummy invalid");
3377 if (gdbarch_debug >= 2)
3378 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3379 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3383 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3384 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3386 gdbarch->fix_call_dummy = fix_call_dummy;
3390 gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3392 gdb_assert (gdbarch != NULL);
3393 if (gdbarch->init_frame_pc_first == 0)
3394 internal_error (__FILE__, __LINE__,
3395 "gdbarch: gdbarch_init_frame_pc_first invalid");
3396 if (gdbarch_debug >= 2)
3397 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n");
3398 gdbarch->init_frame_pc_first (fromleaf, prev);
3402 set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch,
3403 gdbarch_init_frame_pc_first_ftype init_frame_pc_first)
3405 gdbarch->init_frame_pc_first = init_frame_pc_first;
3409 gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3411 gdb_assert (gdbarch != NULL);
3412 if (gdbarch->init_frame_pc == 0)
3413 internal_error (__FILE__, __LINE__,
3414 "gdbarch: gdbarch_init_frame_pc invalid");
3415 if (gdbarch_debug >= 2)
3416 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
3417 gdbarch->init_frame_pc (fromleaf, prev);
3421 set_gdbarch_init_frame_pc (struct gdbarch *gdbarch,
3422 gdbarch_init_frame_pc_ftype init_frame_pc)
3424 gdbarch->init_frame_pc = init_frame_pc;
3428 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3430 gdb_assert (gdbarch != NULL);
3431 if (gdbarch_debug >= 2)
3432 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3433 return gdbarch->believe_pcc_promotion;
3437 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3438 int believe_pcc_promotion)
3440 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3444 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3446 gdb_assert (gdbarch != NULL);
3447 if (gdbarch_debug >= 2)
3448 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3449 return gdbarch->believe_pcc_promotion_type;
3453 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3454 int believe_pcc_promotion_type)
3456 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3460 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3462 gdb_assert (gdbarch != NULL);
3463 if (gdbarch->coerce_float_to_double == 0)
3464 internal_error (__FILE__, __LINE__,
3465 "gdbarch: gdbarch_coerce_float_to_double invalid");
3466 if (gdbarch_debug >= 2)
3467 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3468 return gdbarch->coerce_float_to_double (formal, actual);
3472 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3473 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3475 gdbarch->coerce_float_to_double = coerce_float_to_double;
3479 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)
3481 gdb_assert (gdbarch != NULL);
3482 if (gdbarch->get_saved_register == 0)
3483 internal_error (__FILE__, __LINE__,
3484 "gdbarch: gdbarch_get_saved_register invalid");
3485 if (gdbarch_debug >= 2)
3486 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3487 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3491 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3492 gdbarch_get_saved_register_ftype get_saved_register)
3494 gdbarch->get_saved_register = get_saved_register;
3498 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3500 gdb_assert (gdbarch != NULL);
3501 if (gdbarch->register_convertible == 0)
3502 internal_error (__FILE__, __LINE__,
3503 "gdbarch: gdbarch_register_convertible invalid");
3504 if (gdbarch_debug >= 2)
3505 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3506 return gdbarch->register_convertible (nr);
3510 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3511 gdbarch_register_convertible_ftype register_convertible)
3513 gdbarch->register_convertible = register_convertible;
3517 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3519 gdb_assert (gdbarch != NULL);
3520 if (gdbarch->register_convert_to_virtual == 0)
3521 internal_error (__FILE__, __LINE__,
3522 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3523 if (gdbarch_debug >= 2)
3524 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3525 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3529 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3530 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3532 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3536 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3538 gdb_assert (gdbarch != NULL);
3539 if (gdbarch->register_convert_to_raw == 0)
3540 internal_error (__FILE__, __LINE__,
3541 "gdbarch: gdbarch_register_convert_to_raw invalid");
3542 if (gdbarch_debug >= 2)
3543 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3544 gdbarch->register_convert_to_raw (type, regnum, from, to);
3548 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3549 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3551 gdbarch->register_convert_to_raw = register_convert_to_raw;
3555 gdbarch_convert_register_p (struct gdbarch *gdbarch, int regnum)
3557 gdb_assert (gdbarch != NULL);
3558 if (gdbarch->convert_register_p == 0)
3559 internal_error (__FILE__, __LINE__,
3560 "gdbarch: gdbarch_convert_register_p invalid");
3561 if (gdbarch_debug >= 2)
3562 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_register_p called\n");
3563 return gdbarch->convert_register_p (regnum);
3567 set_gdbarch_convert_register_p (struct gdbarch *gdbarch,
3568 gdbarch_convert_register_p_ftype convert_register_p)
3570 gdbarch->convert_register_p = convert_register_p;
3574 gdbarch_register_to_value (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3576 gdb_assert (gdbarch != NULL);
3577 if (gdbarch->register_to_value == 0)
3578 internal_error (__FILE__, __LINE__,
3579 "gdbarch: gdbarch_register_to_value invalid");
3580 if (gdbarch_debug >= 2)
3581 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_to_value called\n");
3582 gdbarch->register_to_value (regnum, type, from, to);
3586 set_gdbarch_register_to_value (struct gdbarch *gdbarch,
3587 gdbarch_register_to_value_ftype register_to_value)
3589 gdbarch->register_to_value = register_to_value;
3593 gdbarch_value_to_register (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3595 gdb_assert (gdbarch != NULL);
3596 if (gdbarch->value_to_register == 0)
3597 internal_error (__FILE__, __LINE__,
3598 "gdbarch: gdbarch_value_to_register invalid");
3599 if (gdbarch_debug >= 2)
3600 fprintf_unfiltered (gdb_stdlog, "gdbarch_value_to_register called\n");
3601 gdbarch->value_to_register (type, regnum, from, to);
3605 set_gdbarch_value_to_register (struct gdbarch *gdbarch,
3606 gdbarch_value_to_register_ftype value_to_register)
3608 gdbarch->value_to_register = value_to_register;
3612 gdbarch_fetch_pseudo_register_p (struct gdbarch *gdbarch)
3614 gdb_assert (gdbarch != NULL);
3615 return gdbarch->fetch_pseudo_register != 0;
3619 gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
3621 gdb_assert (gdbarch != NULL);
3622 if (gdbarch->fetch_pseudo_register == 0)
3623 internal_error (__FILE__, __LINE__,
3624 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3625 if (gdbarch_debug >= 2)
3626 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
3627 gdbarch->fetch_pseudo_register (regnum);
3631 set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
3632 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
3634 gdbarch->fetch_pseudo_register = fetch_pseudo_register;
3638 gdbarch_store_pseudo_register_p (struct gdbarch *gdbarch)
3640 gdb_assert (gdbarch != NULL);
3641 return gdbarch->store_pseudo_register != 0;
3645 gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
3647 gdb_assert (gdbarch != NULL);
3648 if (gdbarch->store_pseudo_register == 0)
3649 internal_error (__FILE__, __LINE__,
3650 "gdbarch: gdbarch_store_pseudo_register invalid");
3651 if (gdbarch_debug >= 2)
3652 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
3653 gdbarch->store_pseudo_register (regnum);
3657 set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
3658 gdbarch_store_pseudo_register_ftype store_pseudo_register)
3660 gdbarch->store_pseudo_register = store_pseudo_register;
3664 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3666 gdb_assert (gdbarch != NULL);
3667 if (gdbarch->pointer_to_address == 0)
3668 internal_error (__FILE__, __LINE__,
3669 "gdbarch: gdbarch_pointer_to_address invalid");
3670 if (gdbarch_debug >= 2)
3671 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3672 return gdbarch->pointer_to_address (type, buf);
3676 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3677 gdbarch_pointer_to_address_ftype pointer_to_address)
3679 gdbarch->pointer_to_address = pointer_to_address;
3683 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3685 gdb_assert (gdbarch != NULL);
3686 if (gdbarch->address_to_pointer == 0)
3687 internal_error (__FILE__, __LINE__,
3688 "gdbarch: gdbarch_address_to_pointer invalid");
3689 if (gdbarch_debug >= 2)
3690 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3691 gdbarch->address_to_pointer (type, buf, addr);
3695 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3696 gdbarch_address_to_pointer_ftype address_to_pointer)
3698 gdbarch->address_to_pointer = address_to_pointer;
3702 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3704 gdb_assert (gdbarch != NULL);
3705 return gdbarch->integer_to_address != 0;
3709 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3711 gdb_assert (gdbarch != NULL);
3712 if (gdbarch->integer_to_address == 0)
3713 internal_error (__FILE__, __LINE__,
3714 "gdbarch: gdbarch_integer_to_address invalid");
3715 if (gdbarch_debug >= 2)
3716 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3717 return gdbarch->integer_to_address (type, buf);
3721 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3722 gdbarch_integer_to_address_ftype integer_to_address)
3724 gdbarch->integer_to_address = integer_to_address;
3728 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3730 gdb_assert (gdbarch != NULL);
3731 if (gdbarch->return_value_on_stack == 0)
3732 internal_error (__FILE__, __LINE__,
3733 "gdbarch: gdbarch_return_value_on_stack invalid");
3734 if (gdbarch_debug >= 2)
3735 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3736 return gdbarch->return_value_on_stack (type);
3740 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3741 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3743 gdbarch->return_value_on_stack = return_value_on_stack;
3747 gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3749 gdb_assert (gdbarch != NULL);
3750 if (gdbarch->deprecated_extract_return_value == 0)
3751 internal_error (__FILE__, __LINE__,
3752 "gdbarch: gdbarch_deprecated_extract_return_value invalid");
3753 if (gdbarch_debug >= 2)
3754 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_return_value called\n");
3755 gdbarch->deprecated_extract_return_value (type, regbuf, valbuf);
3759 set_gdbarch_deprecated_extract_return_value (struct gdbarch *gdbarch,
3760 gdbarch_deprecated_extract_return_value_ftype deprecated_extract_return_value)
3762 gdbarch->deprecated_extract_return_value = deprecated_extract_return_value;
3766 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3768 gdb_assert (gdbarch != NULL);
3769 if (gdbarch->push_arguments == 0)
3770 internal_error (__FILE__, __LINE__,
3771 "gdbarch: gdbarch_push_arguments invalid");
3772 if (gdbarch_debug >= 2)
3773 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3774 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3778 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3779 gdbarch_push_arguments_ftype push_arguments)
3781 gdbarch->push_arguments = push_arguments;
3785 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3787 gdb_assert (gdbarch != NULL);
3788 if (gdbarch->push_dummy_frame == 0)
3789 internal_error (__FILE__, __LINE__,
3790 "gdbarch: gdbarch_push_dummy_frame invalid");
3791 if (gdbarch_debug >= 2)
3792 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3793 gdbarch->push_dummy_frame ();
3797 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3798 gdbarch_push_dummy_frame_ftype push_dummy_frame)
3800 gdbarch->push_dummy_frame = push_dummy_frame;
3804 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
3806 gdb_assert (gdbarch != NULL);
3807 return gdbarch->push_return_address != 0;
3811 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3813 gdb_assert (gdbarch != NULL);
3814 if (gdbarch->push_return_address == 0)
3815 internal_error (__FILE__, __LINE__,
3816 "gdbarch: gdbarch_push_return_address invalid");
3817 if (gdbarch_debug >= 2)
3818 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3819 return gdbarch->push_return_address (pc, sp);
3823 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3824 gdbarch_push_return_address_ftype push_return_address)
3826 gdbarch->push_return_address = push_return_address;
3830 gdbarch_pop_frame (struct gdbarch *gdbarch)
3832 gdb_assert (gdbarch != NULL);
3833 if (gdbarch->pop_frame == 0)
3834 internal_error (__FILE__, __LINE__,
3835 "gdbarch: gdbarch_pop_frame invalid");
3836 if (gdbarch_debug >= 2)
3837 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3838 gdbarch->pop_frame ();
3842 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3843 gdbarch_pop_frame_ftype pop_frame)
3845 gdbarch->pop_frame = pop_frame;
3849 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3851 gdb_assert (gdbarch != NULL);
3852 if (gdbarch->store_struct_return == 0)
3853 internal_error (__FILE__, __LINE__,
3854 "gdbarch: gdbarch_store_struct_return invalid");
3855 if (gdbarch_debug >= 2)
3856 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3857 gdbarch->store_struct_return (addr, sp);
3861 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3862 gdbarch_store_struct_return_ftype store_struct_return)
3864 gdbarch->store_struct_return = store_struct_return;
3868 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3870 gdb_assert (gdbarch != NULL);
3871 if (gdbarch->store_return_value == 0)
3872 internal_error (__FILE__, __LINE__,
3873 "gdbarch: gdbarch_store_return_value invalid");
3874 if (gdbarch_debug >= 2)
3875 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3876 gdbarch->store_return_value (type, valbuf);
3880 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3881 gdbarch_store_return_value_ftype store_return_value)
3883 gdbarch->store_return_value = store_return_value;
3887 gdbarch_deprecated_extract_struct_value_address_p (struct gdbarch *gdbarch)
3889 gdb_assert (gdbarch != NULL);
3890 return gdbarch->deprecated_extract_struct_value_address != 0;
3894 gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3896 gdb_assert (gdbarch != NULL);
3897 if (gdbarch->deprecated_extract_struct_value_address == 0)
3898 internal_error (__FILE__, __LINE__,
3899 "gdbarch: gdbarch_deprecated_extract_struct_value_address invalid");
3900 if (gdbarch_debug >= 2)
3901 fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_extract_struct_value_address called\n");
3902 return gdbarch->deprecated_extract_struct_value_address (regbuf);
3906 set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
3907 gdbarch_deprecated_extract_struct_value_address_ftype deprecated_extract_struct_value_address)
3909 gdbarch->deprecated_extract_struct_value_address = deprecated_extract_struct_value_address;
3913 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3915 gdb_assert (gdbarch != NULL);
3916 if (gdbarch->use_struct_convention == 0)
3917 internal_error (__FILE__, __LINE__,
3918 "gdbarch: gdbarch_use_struct_convention invalid");
3919 if (gdbarch_debug >= 2)
3920 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3921 return gdbarch->use_struct_convention (gcc_p, value_type);
3925 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3926 gdbarch_use_struct_convention_ftype use_struct_convention)
3928 gdbarch->use_struct_convention = use_struct_convention;
3932 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3934 gdb_assert (gdbarch != NULL);
3935 if (gdbarch->frame_init_saved_regs == 0)
3936 internal_error (__FILE__, __LINE__,
3937 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3938 if (gdbarch_debug >= 2)
3939 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3940 gdbarch->frame_init_saved_regs (frame);
3944 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3945 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
3947 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3951 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
3953 gdb_assert (gdbarch != NULL);
3954 return gdbarch->init_extra_frame_info != 0;
3958 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3960 gdb_assert (gdbarch != NULL);
3961 if (gdbarch->init_extra_frame_info == 0)
3962 internal_error (__FILE__, __LINE__,
3963 "gdbarch: gdbarch_init_extra_frame_info invalid");
3964 if (gdbarch_debug >= 2)
3965 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3966 gdbarch->init_extra_frame_info (fromleaf, frame);
3970 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3971 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
3973 gdbarch->init_extra_frame_info = init_extra_frame_info;
3977 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3979 gdb_assert (gdbarch != NULL);
3980 if (gdbarch->skip_prologue == 0)
3981 internal_error (__FILE__, __LINE__,
3982 "gdbarch: gdbarch_skip_prologue invalid");
3983 if (gdbarch_debug >= 2)
3984 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3985 return gdbarch->skip_prologue (ip);
3989 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3990 gdbarch_skip_prologue_ftype skip_prologue)
3992 gdbarch->skip_prologue = skip_prologue;
3996 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
3998 gdb_assert (gdbarch != NULL);
3999 if (gdbarch->prologue_frameless_p == 0)
4000 internal_error (__FILE__, __LINE__,
4001 "gdbarch: gdbarch_prologue_frameless_p invalid");
4002 if (gdbarch_debug >= 2)
4003 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
4004 return gdbarch->prologue_frameless_p (ip);
4008 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
4009 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
4011 gdbarch->prologue_frameless_p = prologue_frameless_p;
4015 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
4017 gdb_assert (gdbarch != NULL);
4018 if (gdbarch->inner_than == 0)
4019 internal_error (__FILE__, __LINE__,
4020 "gdbarch: gdbarch_inner_than invalid");
4021 if (gdbarch_debug >= 2)
4022 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
4023 return gdbarch->inner_than (lhs, rhs);
4027 set_gdbarch_inner_than (struct gdbarch *gdbarch,
4028 gdbarch_inner_than_ftype inner_than)
4030 gdbarch->inner_than = inner_than;
4033 const unsigned char *
4034 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
4036 gdb_assert (gdbarch != NULL);
4037 if (gdbarch->breakpoint_from_pc == 0)
4038 internal_error (__FILE__, __LINE__,
4039 "gdbarch: gdbarch_breakpoint_from_pc invalid");
4040 if (gdbarch_debug >= 2)
4041 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
4042 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
4046 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
4047 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
4049 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
4053 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4055 gdb_assert (gdbarch != NULL);
4056 if (gdbarch->memory_insert_breakpoint == 0)
4057 internal_error (__FILE__, __LINE__,
4058 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4059 if (gdbarch_debug >= 2)
4060 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
4061 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
4065 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
4066 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
4068 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
4072 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
4074 gdb_assert (gdbarch != NULL);
4075 if (gdbarch->memory_remove_breakpoint == 0)
4076 internal_error (__FILE__, __LINE__,
4077 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4078 if (gdbarch_debug >= 2)
4079 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
4080 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
4084 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
4085 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
4087 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
4091 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
4093 gdb_assert (gdbarch != NULL);
4094 if (gdbarch->decr_pc_after_break == -1)
4095 internal_error (__FILE__, __LINE__,
4096 "gdbarch: gdbarch_decr_pc_after_break invalid");
4097 if (gdbarch_debug >= 2)
4098 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
4099 return gdbarch->decr_pc_after_break;
4103 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
4104 CORE_ADDR decr_pc_after_break)
4106 gdbarch->decr_pc_after_break = decr_pc_after_break;
4110 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
4112 gdb_assert (gdbarch != NULL);
4113 if (gdbarch->prepare_to_proceed == 0)
4114 internal_error (__FILE__, __LINE__,
4115 "gdbarch: gdbarch_prepare_to_proceed invalid");
4116 if (gdbarch_debug >= 2)
4117 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
4118 return gdbarch->prepare_to_proceed (select_it);
4122 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
4123 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
4125 gdbarch->prepare_to_proceed = prepare_to_proceed;
4129 gdbarch_function_start_offset (struct gdbarch *gdbarch)
4131 gdb_assert (gdbarch != NULL);
4132 if (gdbarch->function_start_offset == -1)
4133 internal_error (__FILE__, __LINE__,
4134 "gdbarch: gdbarch_function_start_offset invalid");
4135 if (gdbarch_debug >= 2)
4136 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
4137 return gdbarch->function_start_offset;
4141 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
4142 CORE_ADDR function_start_offset)
4144 gdbarch->function_start_offset = function_start_offset;
4148 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
4150 gdb_assert (gdbarch != NULL);
4151 if (gdbarch->remote_translate_xfer_address == 0)
4152 internal_error (__FILE__, __LINE__,
4153 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4154 if (gdbarch_debug >= 2)
4155 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
4156 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
4160 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
4161 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
4163 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
4167 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
4169 gdb_assert (gdbarch != NULL);
4170 if (gdbarch->frame_args_skip == -1)
4171 internal_error (__FILE__, __LINE__,
4172 "gdbarch: gdbarch_frame_args_skip invalid");
4173 if (gdbarch_debug >= 2)
4174 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
4175 return gdbarch->frame_args_skip;
4179 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
4180 CORE_ADDR frame_args_skip)
4182 gdbarch->frame_args_skip = frame_args_skip;
4186 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
4188 gdb_assert (gdbarch != NULL);
4189 if (gdbarch->frameless_function_invocation == 0)
4190 internal_error (__FILE__, __LINE__,
4191 "gdbarch: gdbarch_frameless_function_invocation invalid");
4192 if (gdbarch_debug >= 2)
4193 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
4194 return gdbarch->frameless_function_invocation (fi);
4198 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
4199 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
4201 gdbarch->frameless_function_invocation = frameless_function_invocation;
4205 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
4207 gdb_assert (gdbarch != NULL);
4208 if (gdbarch->frame_chain == 0)
4209 internal_error (__FILE__, __LINE__,
4210 "gdbarch: gdbarch_frame_chain invalid");
4211 if (gdbarch_debug >= 2)
4212 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
4213 return gdbarch->frame_chain (frame);
4217 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
4218 gdbarch_frame_chain_ftype frame_chain)
4220 gdbarch->frame_chain = frame_chain;
4224 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
4226 gdb_assert (gdbarch != NULL);
4227 if (gdbarch->frame_chain_valid == 0)
4228 internal_error (__FILE__, __LINE__,
4229 "gdbarch: gdbarch_frame_chain_valid invalid");
4230 if (gdbarch_debug >= 2)
4231 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
4232 return gdbarch->frame_chain_valid (chain, thisframe);
4236 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
4237 gdbarch_frame_chain_valid_ftype frame_chain_valid)
4239 gdbarch->frame_chain_valid = frame_chain_valid;
4243 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
4245 gdb_assert (gdbarch != NULL);
4246 if (gdbarch->frame_saved_pc == 0)
4247 internal_error (__FILE__, __LINE__,
4248 "gdbarch: gdbarch_frame_saved_pc invalid");
4249 if (gdbarch_debug >= 2)
4250 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
4251 return gdbarch->frame_saved_pc (fi);
4255 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
4256 gdbarch_frame_saved_pc_ftype frame_saved_pc)
4258 gdbarch->frame_saved_pc = frame_saved_pc;
4262 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
4264 gdb_assert (gdbarch != NULL);
4265 if (gdbarch->frame_args_address == 0)
4266 internal_error (__FILE__, __LINE__,
4267 "gdbarch: gdbarch_frame_args_address invalid");
4268 if (gdbarch_debug >= 2)
4269 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
4270 return gdbarch->frame_args_address (fi);
4274 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
4275 gdbarch_frame_args_address_ftype frame_args_address)
4277 gdbarch->frame_args_address = frame_args_address;
4281 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
4283 gdb_assert (gdbarch != NULL);
4284 if (gdbarch->frame_locals_address == 0)
4285 internal_error (__FILE__, __LINE__,
4286 "gdbarch: gdbarch_frame_locals_address invalid");
4287 if (gdbarch_debug >= 2)
4288 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
4289 return gdbarch->frame_locals_address (fi);
4293 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
4294 gdbarch_frame_locals_address_ftype frame_locals_address)
4296 gdbarch->frame_locals_address = frame_locals_address;
4300 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
4302 gdb_assert (gdbarch != NULL);
4303 if (gdbarch->saved_pc_after_call == 0)
4304 internal_error (__FILE__, __LINE__,
4305 "gdbarch: gdbarch_saved_pc_after_call invalid");
4306 if (gdbarch_debug >= 2)
4307 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
4308 return gdbarch->saved_pc_after_call (frame);
4312 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
4313 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
4315 gdbarch->saved_pc_after_call = saved_pc_after_call;
4319 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
4321 gdb_assert (gdbarch != NULL);
4322 if (gdbarch->frame_num_args == 0)
4323 internal_error (__FILE__, __LINE__,
4324 "gdbarch: gdbarch_frame_num_args invalid");
4325 if (gdbarch_debug >= 2)
4326 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
4327 return gdbarch->frame_num_args (frame);
4331 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
4332 gdbarch_frame_num_args_ftype frame_num_args)
4334 gdbarch->frame_num_args = frame_num_args;
4338 gdbarch_stack_align_p (struct gdbarch *gdbarch)
4340 gdb_assert (gdbarch != NULL);
4341 return gdbarch->stack_align != 0;
4345 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4347 gdb_assert (gdbarch != NULL);
4348 if (gdbarch->stack_align == 0)
4349 internal_error (__FILE__, __LINE__,
4350 "gdbarch: gdbarch_stack_align invalid");
4351 if (gdbarch_debug >= 2)
4352 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4353 return gdbarch->stack_align (sp);
4357 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4358 gdbarch_stack_align_ftype stack_align)
4360 gdbarch->stack_align = stack_align;
4364 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4366 gdb_assert (gdbarch != NULL);
4367 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4368 if (gdbarch_debug >= 2)
4369 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4370 return gdbarch->extra_stack_alignment_needed;
4374 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4375 int extra_stack_alignment_needed)
4377 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4381 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4383 gdb_assert (gdbarch != NULL);
4384 return gdbarch->reg_struct_has_addr != 0;
4388 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4390 gdb_assert (gdbarch != NULL);
4391 if (gdbarch->reg_struct_has_addr == 0)
4392 internal_error (__FILE__, __LINE__,
4393 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4394 if (gdbarch_debug >= 2)
4395 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4396 return gdbarch->reg_struct_has_addr (gcc_p, type);
4400 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4401 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4403 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4407 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4409 gdb_assert (gdbarch != NULL);
4410 return gdbarch->save_dummy_frame_tos != 0;
4414 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4416 gdb_assert (gdbarch != NULL);
4417 if (gdbarch->save_dummy_frame_tos == 0)
4418 internal_error (__FILE__, __LINE__,
4419 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4420 if (gdbarch_debug >= 2)
4421 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4422 gdbarch->save_dummy_frame_tos (sp);
4426 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4427 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4429 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4433 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4435 gdb_assert (gdbarch != NULL);
4436 if (gdbarch_debug >= 2)
4437 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4438 return gdbarch->parm_boundary;
4442 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4445 gdbarch->parm_boundary = parm_boundary;
4448 const struct floatformat *
4449 gdbarch_float_format (struct gdbarch *gdbarch)
4451 gdb_assert (gdbarch != NULL);
4452 if (gdbarch_debug >= 2)
4453 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4454 return gdbarch->float_format;
4458 set_gdbarch_float_format (struct gdbarch *gdbarch,
4459 const struct floatformat * float_format)
4461 gdbarch->float_format = float_format;
4464 const struct floatformat *
4465 gdbarch_double_format (struct gdbarch *gdbarch)
4467 gdb_assert (gdbarch != NULL);
4468 if (gdbarch_debug >= 2)
4469 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4470 return gdbarch->double_format;
4474 set_gdbarch_double_format (struct gdbarch *gdbarch,
4475 const struct floatformat * double_format)
4477 gdbarch->double_format = double_format;
4480 const struct floatformat *
4481 gdbarch_long_double_format (struct gdbarch *gdbarch)
4483 gdb_assert (gdbarch != NULL);
4484 if (gdbarch_debug >= 2)
4485 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4486 return gdbarch->long_double_format;
4490 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4491 const struct floatformat * long_double_format)
4493 gdbarch->long_double_format = long_double_format;
4497 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4499 gdb_assert (gdbarch != NULL);
4500 if (gdbarch->convert_from_func_ptr_addr == 0)
4501 internal_error (__FILE__, __LINE__,
4502 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4503 if (gdbarch_debug >= 2)
4504 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4505 return gdbarch->convert_from_func_ptr_addr (addr);
4509 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4510 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4512 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4516 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4518 gdb_assert (gdbarch != NULL);
4519 if (gdbarch->addr_bits_remove == 0)
4520 internal_error (__FILE__, __LINE__,
4521 "gdbarch: gdbarch_addr_bits_remove invalid");
4522 if (gdbarch_debug >= 2)
4523 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4524 return gdbarch->addr_bits_remove (addr);
4528 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4529 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4531 gdbarch->addr_bits_remove = addr_bits_remove;
4535 gdbarch_smash_text_address (struct gdbarch *gdbarch, CORE_ADDR addr)
4537 gdb_assert (gdbarch != NULL);
4538 if (gdbarch->smash_text_address == 0)
4539 internal_error (__FILE__, __LINE__,
4540 "gdbarch: gdbarch_smash_text_address invalid");
4541 if (gdbarch_debug >= 2)
4542 fprintf_unfiltered (gdb_stdlog, "gdbarch_smash_text_address called\n");
4543 return gdbarch->smash_text_address (addr);
4547 set_gdbarch_smash_text_address (struct gdbarch *gdbarch,
4548 gdbarch_smash_text_address_ftype smash_text_address)
4550 gdbarch->smash_text_address = smash_text_address;
4554 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4556 gdb_assert (gdbarch != NULL);
4557 return gdbarch->software_single_step != 0;
4561 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4563 gdb_assert (gdbarch != NULL);
4564 if (gdbarch->software_single_step == 0)
4565 internal_error (__FILE__, __LINE__,
4566 "gdbarch: gdbarch_software_single_step invalid");
4567 if (gdbarch_debug >= 2)
4568 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4569 gdbarch->software_single_step (sig, insert_breakpoints_p);
4573 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4574 gdbarch_software_single_step_ftype software_single_step)
4576 gdbarch->software_single_step = software_single_step;
4580 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
4582 gdb_assert (gdbarch != NULL);
4583 if (gdbarch->print_insn == 0)
4584 internal_error (__FILE__, __LINE__,
4585 "gdbarch: gdbarch_print_insn invalid");
4586 if (gdbarch_debug >= 2)
4587 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4588 return gdbarch->print_insn (vma, info);
4592 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4593 gdbarch_print_insn_ftype print_insn)
4595 gdbarch->print_insn = print_insn;
4599 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4601 gdb_assert (gdbarch != NULL);
4602 if (gdbarch->skip_trampoline_code == 0)
4603 internal_error (__FILE__, __LINE__,
4604 "gdbarch: gdbarch_skip_trampoline_code invalid");
4605 if (gdbarch_debug >= 2)
4606 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4607 return gdbarch->skip_trampoline_code (pc);
4611 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4612 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4614 gdbarch->skip_trampoline_code = skip_trampoline_code;
4618 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4620 gdb_assert (gdbarch != NULL);
4621 if (gdbarch->in_solib_call_trampoline == 0)
4622 internal_error (__FILE__, __LINE__,
4623 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4624 if (gdbarch_debug >= 2)
4625 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4626 return gdbarch->in_solib_call_trampoline (pc, name);
4630 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4631 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4633 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4637 gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4639 gdb_assert (gdbarch != NULL);
4640 if (gdbarch->pc_in_sigtramp == 0)
4641 internal_error (__FILE__, __LINE__,
4642 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4643 if (gdbarch_debug >= 2)
4644 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_sigtramp called\n");
4645 return gdbarch->pc_in_sigtramp (pc, name);
4649 set_gdbarch_pc_in_sigtramp (struct gdbarch *gdbarch,
4650 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp)
4652 gdbarch->pc_in_sigtramp = pc_in_sigtramp;
4656 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4658 gdb_assert (gdbarch != NULL);
4659 if (gdbarch->in_function_epilogue_p == 0)
4660 internal_error (__FILE__, __LINE__,
4661 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4662 if (gdbarch_debug >= 2)
4663 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4664 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4668 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4669 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4671 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4675 gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
4677 gdb_assert (gdbarch != NULL);
4678 if (gdbarch->construct_inferior_arguments == 0)
4679 internal_error (__FILE__, __LINE__,
4680 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4681 if (gdbarch_debug >= 2)
4682 fprintf_unfiltered (gdb_stdlog, "gdbarch_construct_inferior_arguments called\n");
4683 return gdbarch->construct_inferior_arguments (gdbarch, argc, argv);
4687 set_gdbarch_construct_inferior_arguments (struct gdbarch *gdbarch,
4688 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments)
4690 gdbarch->construct_inferior_arguments = construct_inferior_arguments;
4694 gdbarch_dwarf2_build_frame_info_p (struct gdbarch *gdbarch)
4696 gdb_assert (gdbarch != NULL);
4697 return gdbarch->dwarf2_build_frame_info != 0;
4701 gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch, struct objfile *objfile)
4703 gdb_assert (gdbarch != NULL);
4704 if (gdbarch->dwarf2_build_frame_info == 0)
4705 internal_error (__FILE__, __LINE__,
4706 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4707 if (gdbarch_debug >= 2)
4708 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_build_frame_info called\n");
4709 gdbarch->dwarf2_build_frame_info (objfile);
4713 set_gdbarch_dwarf2_build_frame_info (struct gdbarch *gdbarch,
4714 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info)
4716 gdbarch->dwarf2_build_frame_info = dwarf2_build_frame_info;
4720 gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch, asymbol *sym, struct minimal_symbol *msym)
4722 gdb_assert (gdbarch != NULL);
4723 if (gdbarch->elf_make_msymbol_special == 0)
4724 internal_error (__FILE__, __LINE__,
4725 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4726 if (gdbarch_debug >= 2)
4727 fprintf_unfiltered (gdb_stdlog, "gdbarch_elf_make_msymbol_special called\n");
4728 gdbarch->elf_make_msymbol_special (sym, msym);
4732 set_gdbarch_elf_make_msymbol_special (struct gdbarch *gdbarch,
4733 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special)
4735 gdbarch->elf_make_msymbol_special = elf_make_msymbol_special;
4739 gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch, int val, struct minimal_symbol *msym)
4741 gdb_assert (gdbarch != NULL);
4742 if (gdbarch->coff_make_msymbol_special == 0)
4743 internal_error (__FILE__, __LINE__,
4744 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4745 if (gdbarch_debug >= 2)
4746 fprintf_unfiltered (gdb_stdlog, "gdbarch_coff_make_msymbol_special called\n");
4747 gdbarch->coff_make_msymbol_special (val, msym);
4751 set_gdbarch_coff_make_msymbol_special (struct gdbarch *gdbarch,
4752 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special)
4754 gdbarch->coff_make_msymbol_special = coff_make_msymbol_special;
4758 /* Keep a registry of per-architecture data-pointers required by GDB
4765 gdbarch_data_init_ftype *init;
4766 gdbarch_data_free_ftype *free;
4769 struct gdbarch_data_registration
4771 struct gdbarch_data *data;
4772 struct gdbarch_data_registration *next;
4775 struct gdbarch_data_registry
4778 struct gdbarch_data_registration *registrations;
4781 struct gdbarch_data_registry gdbarch_data_registry =
4786 struct gdbarch_data *
4787 register_gdbarch_data (gdbarch_data_init_ftype *init,
4788 gdbarch_data_free_ftype *free)
4790 struct gdbarch_data_registration **curr;
4791 /* Append the new registraration. */
4792 for (curr = &gdbarch_data_registry.registrations;
4794 curr = &(*curr)->next);
4795 (*curr) = XMALLOC (struct gdbarch_data_registration);
4796 (*curr)->next = NULL;
4797 (*curr)->data = XMALLOC (struct gdbarch_data);
4798 (*curr)->data->index = gdbarch_data_registry.nr++;
4799 (*curr)->data->init = init;
4800 (*curr)->data->init_p = 1;
4801 (*curr)->data->free = free;
4802 return (*curr)->data;
4806 /* Create/delete the gdbarch data vector. */
4809 alloc_gdbarch_data (struct gdbarch *gdbarch)
4811 gdb_assert (gdbarch->data == NULL);
4812 gdbarch->nr_data = gdbarch_data_registry.nr;
4813 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
4817 free_gdbarch_data (struct gdbarch *gdbarch)
4819 struct gdbarch_data_registration *rego;
4820 gdb_assert (gdbarch->data != NULL);
4821 for (rego = gdbarch_data_registry.registrations;
4825 struct gdbarch_data *data = rego->data;
4826 gdb_assert (data->index < gdbarch->nr_data);
4827 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4829 data->free (gdbarch, gdbarch->data[data->index]);
4830 gdbarch->data[data->index] = NULL;
4833 xfree (gdbarch->data);
4834 gdbarch->data = NULL;
4838 /* Initialize the current value of the specified per-architecture
4842 set_gdbarch_data (struct gdbarch *gdbarch,
4843 struct gdbarch_data *data,
4846 gdb_assert (data->index < gdbarch->nr_data);
4847 if (gdbarch->data[data->index] != NULL)
4849 gdb_assert (data->free != NULL);
4850 data->free (gdbarch, gdbarch->data[data->index]);
4852 gdbarch->data[data->index] = pointer;
4855 /* Return the current value of the specified per-architecture
4859 gdbarch_data (struct gdbarch *gdbarch, struct gdbarch_data *data)
4861 gdb_assert (data->index < gdbarch->nr_data);
4862 /* The data-pointer isn't initialized, call init() to get a value but
4863 only if the architecture initializaiton has completed. Otherwise
4864 punt - hope that the caller knows what they are doing. */
4865 if (gdbarch->data[data->index] == NULL
4866 && gdbarch->initialized_p)
4868 /* Be careful to detect an initialization cycle. */
4869 gdb_assert (data->init_p);
4871 gdb_assert (data->init != NULL);
4872 gdbarch->data[data->index] = data->init (gdbarch);
4874 gdb_assert (gdbarch->data[data->index] != NULL);
4876 return gdbarch->data[data->index];
4881 /* Keep a registry of swapped data required by GDB modules. */
4886 struct gdbarch_swap_registration *source;
4887 struct gdbarch_swap *next;
4890 struct gdbarch_swap_registration
4893 unsigned long sizeof_data;
4894 gdbarch_swap_ftype *init;
4895 struct gdbarch_swap_registration *next;
4898 struct gdbarch_swap_registry
4901 struct gdbarch_swap_registration *registrations;
4904 struct gdbarch_swap_registry gdbarch_swap_registry =
4910 register_gdbarch_swap (void *data,
4911 unsigned long sizeof_data,
4912 gdbarch_swap_ftype *init)
4914 struct gdbarch_swap_registration **rego;
4915 for (rego = &gdbarch_swap_registry.registrations;
4917 rego = &(*rego)->next);
4918 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4919 (*rego)->next = NULL;
4920 (*rego)->init = init;
4921 (*rego)->data = data;
4922 (*rego)->sizeof_data = sizeof_data;
4926 clear_gdbarch_swap (struct gdbarch *gdbarch)
4928 struct gdbarch_swap *curr;
4929 for (curr = gdbarch->swap;
4933 memset (curr->source->data, 0, curr->source->sizeof_data);
4938 init_gdbarch_swap (struct gdbarch *gdbarch)
4940 struct gdbarch_swap_registration *rego;
4941 struct gdbarch_swap **curr = &gdbarch->swap;
4942 for (rego = gdbarch_swap_registry.registrations;
4946 if (rego->data != NULL)
4948 (*curr) = XMALLOC (struct gdbarch_swap);
4949 (*curr)->source = rego;
4950 (*curr)->swap = xmalloc (rego->sizeof_data);
4951 (*curr)->next = NULL;
4952 curr = &(*curr)->next;
4954 if (rego->init != NULL)
4960 swapout_gdbarch_swap (struct gdbarch *gdbarch)
4962 struct gdbarch_swap *curr;
4963 for (curr = gdbarch->swap;
4966 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4970 swapin_gdbarch_swap (struct gdbarch *gdbarch)
4972 struct gdbarch_swap *curr;
4973 for (curr = gdbarch->swap;
4976 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4980 /* Keep a registry of the architectures known by GDB. */
4982 struct gdbarch_registration
4984 enum bfd_architecture bfd_architecture;
4985 gdbarch_init_ftype *init;
4986 gdbarch_dump_tdep_ftype *dump_tdep;
4987 struct gdbarch_list *arches;
4988 struct gdbarch_registration *next;
4991 static struct gdbarch_registration *gdbarch_registry = NULL;
4994 append_name (const char ***buf, int *nr, const char *name)
4996 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
5002 gdbarch_printable_names (void)
5006 /* Accumulate a list of names based on the registed list of
5008 enum bfd_architecture a;
5010 const char **arches = NULL;
5011 struct gdbarch_registration *rego;
5012 for (rego = gdbarch_registry;
5016 const struct bfd_arch_info *ap;
5017 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
5019 internal_error (__FILE__, __LINE__,
5020 "gdbarch_architecture_names: multi-arch unknown");
5023 append_name (&arches, &nr_arches, ap->printable_name);
5028 append_name (&arches, &nr_arches, NULL);
5032 /* Just return all the architectures that BFD knows. Assume that
5033 the legacy architecture framework supports them. */
5034 return bfd_arch_list ();
5039 gdbarch_register (enum bfd_architecture bfd_architecture,
5040 gdbarch_init_ftype *init,
5041 gdbarch_dump_tdep_ftype *dump_tdep)
5043 struct gdbarch_registration **curr;
5044 const struct bfd_arch_info *bfd_arch_info;
5045 /* Check that BFD recognizes this architecture */
5046 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
5047 if (bfd_arch_info == NULL)
5049 internal_error (__FILE__, __LINE__,
5050 "gdbarch: Attempt to register unknown architecture (%d)",
5053 /* Check that we haven't seen this architecture before */
5054 for (curr = &gdbarch_registry;
5056 curr = &(*curr)->next)
5058 if (bfd_architecture == (*curr)->bfd_architecture)
5059 internal_error (__FILE__, __LINE__,
5060 "gdbarch: Duplicate registraration of architecture (%s)",
5061 bfd_arch_info->printable_name);
5065 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
5066 bfd_arch_info->printable_name,
5069 (*curr) = XMALLOC (struct gdbarch_registration);
5070 (*curr)->bfd_architecture = bfd_architecture;
5071 (*curr)->init = init;
5072 (*curr)->dump_tdep = dump_tdep;
5073 (*curr)->arches = NULL;
5074 (*curr)->next = NULL;
5075 /* When non- multi-arch, install whatever target dump routine we've
5076 been provided - hopefully that routine has been written correctly
5077 and works regardless of multi-arch. */
5078 if (!GDB_MULTI_ARCH && dump_tdep != NULL
5079 && startup_gdbarch.dump_tdep == NULL)
5080 startup_gdbarch.dump_tdep = dump_tdep;
5084 register_gdbarch_init (enum bfd_architecture bfd_architecture,
5085 gdbarch_init_ftype *init)
5087 gdbarch_register (bfd_architecture, init, NULL);
5091 /* Look for an architecture using gdbarch_info. Base search on only
5092 BFD_ARCH_INFO and BYTE_ORDER. */
5094 struct gdbarch_list *
5095 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
5096 const struct gdbarch_info *info)
5098 for (; arches != NULL; arches = arches->next)
5100 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
5102 if (info->byte_order != arches->gdbarch->byte_order)
5110 /* Update the current architecture. Return ZERO if the update request
5114 gdbarch_update_p (struct gdbarch_info info)
5116 struct gdbarch *new_gdbarch;
5117 struct gdbarch *old_gdbarch;
5118 struct gdbarch_registration *rego;
5120 /* Fill in missing parts of the INFO struct using a number of
5121 sources: ``set ...''; INFOabfd supplied; existing target. */
5123 /* ``(gdb) set architecture ...'' */
5124 if (info.bfd_arch_info == NULL
5125 && !TARGET_ARCHITECTURE_AUTO)
5126 info.bfd_arch_info = TARGET_ARCHITECTURE;
5127 if (info.bfd_arch_info == NULL
5128 && info.abfd != NULL
5129 && bfd_get_arch (info.abfd) != bfd_arch_unknown
5130 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
5131 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
5132 if (info.bfd_arch_info == NULL)
5133 info.bfd_arch_info = TARGET_ARCHITECTURE;
5135 /* ``(gdb) set byte-order ...'' */
5136 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5137 && !TARGET_BYTE_ORDER_AUTO)
5138 info.byte_order = TARGET_BYTE_ORDER;
5139 /* From the INFO struct. */
5140 if (info.byte_order == BFD_ENDIAN_UNKNOWN
5141 && info.abfd != NULL)
5142 info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
5143 : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
5144 : BFD_ENDIAN_UNKNOWN);
5145 /* From the current target. */
5146 if (info.byte_order == BFD_ENDIAN_UNKNOWN)
5147 info.byte_order = TARGET_BYTE_ORDER;
5149 /* Must have found some sort of architecture. */
5150 gdb_assert (info.bfd_arch_info != NULL);
5154 fprintf_unfiltered (gdb_stdlog,
5155 "gdbarch_update: info.bfd_arch_info %s\n",
5156 (info.bfd_arch_info != NULL
5157 ? info.bfd_arch_info->printable_name
5159 fprintf_unfiltered (gdb_stdlog,
5160 "gdbarch_update: info.byte_order %d (%s)\n",
5162 (info.byte_order == BFD_ENDIAN_BIG ? "big"
5163 : info.byte_order == BFD_ENDIAN_LITTLE ? "little"
5165 fprintf_unfiltered (gdb_stdlog,
5166 "gdbarch_update: info.abfd 0x%lx\n",
5168 fprintf_unfiltered (gdb_stdlog,
5169 "gdbarch_update: info.tdep_info 0x%lx\n",
5170 (long) info.tdep_info);
5173 /* Find the target that knows about this architecture. */
5174 for (rego = gdbarch_registry;
5177 if (rego->bfd_architecture == info.bfd_arch_info->arch)
5182 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
5186 /* Swap the data belonging to the old target out setting the
5187 installed data to zero. This stops the ->init() function trying
5188 to refer to the previous architecture's global data structures. */
5189 swapout_gdbarch_swap (current_gdbarch);
5190 clear_gdbarch_swap (current_gdbarch);
5192 /* Save the previously selected architecture, setting the global to
5193 NULL. This stops ->init() trying to use the previous
5194 architecture's configuration. The previous architecture may not
5195 even be of the same architecture family. The most recent
5196 architecture of the same family is found at the head of the
5197 rego->arches list. */
5198 old_gdbarch = current_gdbarch;
5199 current_gdbarch = NULL;
5201 /* Ask the target for a replacement architecture. */
5202 new_gdbarch = rego->init (info, rego->arches);
5204 /* Did the target like it? No. Reject the change and revert to the
5205 old architecture. */
5206 if (new_gdbarch == NULL)
5209 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
5210 swapin_gdbarch_swap (old_gdbarch);
5211 current_gdbarch = old_gdbarch;
5215 /* Did the architecture change? No. Oops, put the old architecture
5217 if (old_gdbarch == new_gdbarch)
5220 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
5222 new_gdbarch->bfd_arch_info->printable_name);
5223 swapin_gdbarch_swap (old_gdbarch);
5224 current_gdbarch = old_gdbarch;
5228 /* Is this a pre-existing architecture? Yes. Move it to the front
5229 of the list of architectures (keeping the list sorted Most
5230 Recently Used) and then copy it in. */
5232 struct gdbarch_list **list;
5233 for (list = ®o->arches;
5235 list = &(*list)->next)
5237 if ((*list)->gdbarch == new_gdbarch)
5239 struct gdbarch_list *this;
5241 fprintf_unfiltered (gdb_stdlog,
5242 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
5244 new_gdbarch->bfd_arch_info->printable_name);
5247 (*list) = this->next;
5248 /* Insert in the front. */
5249 this->next = rego->arches;
5250 rego->arches = this;
5251 /* Copy the new architecture in. */
5252 current_gdbarch = new_gdbarch;
5253 swapin_gdbarch_swap (new_gdbarch);
5254 architecture_changed_event ();
5260 /* Prepend this new architecture to the architecture list (keep the
5261 list sorted Most Recently Used). */
5263 struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
5264 this->next = rego->arches;
5265 this->gdbarch = new_gdbarch;
5266 rego->arches = this;
5269 /* Switch to this new architecture marking it initialized. */
5270 current_gdbarch = new_gdbarch;
5271 current_gdbarch->initialized_p = 1;
5274 fprintf_unfiltered (gdb_stdlog,
5275 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5277 new_gdbarch->bfd_arch_info->printable_name);
5280 /* Check that the newly installed architecture is valid. Plug in
5281 any post init values. */
5282 new_gdbarch->dump_tdep = rego->dump_tdep;
5283 verify_gdbarch (new_gdbarch);
5285 /* Initialize the per-architecture memory (swap) areas.
5286 CURRENT_GDBARCH must be update before these modules are
5288 init_gdbarch_swap (new_gdbarch);
5290 /* Initialize the per-architecture data. CURRENT_GDBARCH
5291 must be updated before these modules are called. */
5292 architecture_changed_event ();
5295 gdbarch_dump (current_gdbarch, gdb_stdlog);
5303 /* Pointer to the target-dependent disassembly function. */
5304 int (*tm_print_insn) (bfd_vma, disassemble_info *);
5305 disassemble_info tm_print_insn_info;
5308 extern void _initialize_gdbarch (void);
5311 _initialize_gdbarch (void)
5313 struct cmd_list_element *c;
5315 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
5316 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
5317 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
5318 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
5319 tm_print_insn_info.print_address_func = dis_asm_print_address;
5321 add_show_from_set (add_set_cmd ("arch",
5324 (char *)&gdbarch_debug,
5325 "Set architecture debugging.\n\
5326 When non-zero, architecture debugging is enabled.", &setdebuglist),
5328 c = add_set_cmd ("archdebug",
5331 (char *)&gdbarch_debug,
5332 "Set architecture debugging.\n\
5333 When non-zero, architecture debugging is enabled.", &setlist);
5335 deprecate_cmd (c, "set debug arch");
5336 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");