1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch *gdbarch);
70 static void alloc_gdbarch_data (struct gdbarch *);
71 static void init_gdbarch_data (struct gdbarch *);
72 static void free_gdbarch_data (struct gdbarch *);
73 static void init_gdbarch_swap (struct gdbarch *);
74 static void swapout_gdbarch_swap (struct gdbarch *);
75 static void swapin_gdbarch_swap (struct gdbarch *);
77 /* Convenience macro for allocting typesafe memory. */
80 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
84 /* Non-zero if we want to trace architecture code. */
87 #define GDBARCH_DEBUG 0
89 int gdbarch_debug = GDBARCH_DEBUG;
92 /* Maintain the struct gdbarch object */
96 /* basic architectural information */
97 const struct bfd_arch_info * bfd_arch_info;
100 /* target specific vector. */
101 struct gdbarch_tdep *tdep;
102 gdbarch_dump_tdep_ftype *dump_tdep;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap *swap;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype *read_pc;
149 gdbarch_write_pc_ftype *write_pc;
150 gdbarch_read_fp_ftype *read_fp;
151 gdbarch_write_fp_ftype *write_fp;
152 gdbarch_read_sp_ftype *read_sp;
153 gdbarch_write_sp_ftype *write_sp;
154 gdbarch_virtual_frame_pointer_ftype *virtual_frame_pointer;
155 gdbarch_register_read_ftype *register_read;
156 gdbarch_register_write_ftype *register_write;
165 gdbarch_stab_reg_to_regnum_ftype *stab_reg_to_regnum;
166 gdbarch_ecoff_reg_to_regnum_ftype *ecoff_reg_to_regnum;
167 gdbarch_dwarf_reg_to_regnum_ftype *dwarf_reg_to_regnum;
168 gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum;
169 gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum;
170 gdbarch_register_name_ftype *register_name;
173 gdbarch_register_byte_ftype *register_byte;
174 gdbarch_register_raw_size_ftype *register_raw_size;
175 int max_register_raw_size;
176 gdbarch_register_virtual_size_ftype *register_virtual_size;
177 int max_register_virtual_size;
178 gdbarch_register_virtual_type_ftype *register_virtual_type;
179 gdbarch_do_registers_info_ftype *do_registers_info;
180 gdbarch_register_sim_regno_ftype *register_sim_regno;
181 gdbarch_register_bytes_ok_ftype *register_bytes_ok;
182 gdbarch_cannot_fetch_register_ftype *cannot_fetch_register;
183 gdbarch_cannot_store_register_ftype *cannot_store_register;
184 int use_generic_dummy_frames;
185 int call_dummy_location;
186 gdbarch_call_dummy_address_ftype *call_dummy_address;
187 CORE_ADDR call_dummy_start_offset;
188 CORE_ADDR call_dummy_breakpoint_offset;
189 int call_dummy_breakpoint_offset_p;
190 int call_dummy_length;
191 gdbarch_pc_in_call_dummy_ftype *pc_in_call_dummy;
193 LONGEST * call_dummy_words;
194 int sizeof_call_dummy_words;
195 int call_dummy_stack_adjust_p;
196 int call_dummy_stack_adjust;
197 gdbarch_fix_call_dummy_ftype *fix_call_dummy;
198 gdbarch_init_frame_pc_first_ftype *init_frame_pc_first;
199 gdbarch_init_frame_pc_ftype *init_frame_pc;
200 int believe_pcc_promotion;
201 int believe_pcc_promotion_type;
202 gdbarch_coerce_float_to_double_ftype *coerce_float_to_double;
203 gdbarch_get_saved_register_ftype *get_saved_register;
204 gdbarch_register_convertible_ftype *register_convertible;
205 gdbarch_register_convert_to_virtual_ftype *register_convert_to_virtual;
206 gdbarch_register_convert_to_raw_ftype *register_convert_to_raw;
207 gdbarch_fetch_pseudo_register_ftype *fetch_pseudo_register;
208 gdbarch_store_pseudo_register_ftype *store_pseudo_register;
209 gdbarch_pointer_to_address_ftype *pointer_to_address;
210 gdbarch_address_to_pointer_ftype *address_to_pointer;
211 gdbarch_integer_to_address_ftype *integer_to_address;
212 gdbarch_return_value_on_stack_ftype *return_value_on_stack;
213 gdbarch_extract_return_value_ftype *extract_return_value;
214 gdbarch_push_arguments_ftype *push_arguments;
215 gdbarch_push_dummy_frame_ftype *push_dummy_frame;
216 gdbarch_push_return_address_ftype *push_return_address;
217 gdbarch_pop_frame_ftype *pop_frame;
218 gdbarch_store_struct_return_ftype *store_struct_return;
219 gdbarch_store_return_value_ftype *store_return_value;
220 gdbarch_extract_struct_value_address_ftype *extract_struct_value_address;
221 gdbarch_use_struct_convention_ftype *use_struct_convention;
222 gdbarch_frame_init_saved_regs_ftype *frame_init_saved_regs;
223 gdbarch_init_extra_frame_info_ftype *init_extra_frame_info;
224 gdbarch_skip_prologue_ftype *skip_prologue;
225 gdbarch_prologue_frameless_p_ftype *prologue_frameless_p;
226 gdbarch_inner_than_ftype *inner_than;
227 gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
228 gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
229 gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
230 CORE_ADDR decr_pc_after_break;
231 gdbarch_prepare_to_proceed_ftype *prepare_to_proceed;
232 CORE_ADDR function_start_offset;
233 gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
234 CORE_ADDR frame_args_skip;
235 gdbarch_frameless_function_invocation_ftype *frameless_function_invocation;
236 gdbarch_frame_chain_ftype *frame_chain;
237 gdbarch_frame_chain_valid_ftype *frame_chain_valid;
238 gdbarch_frame_saved_pc_ftype *frame_saved_pc;
239 gdbarch_frame_args_address_ftype *frame_args_address;
240 gdbarch_frame_locals_address_ftype *frame_locals_address;
241 gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
242 gdbarch_frame_num_args_ftype *frame_num_args;
243 gdbarch_stack_align_ftype *stack_align;
244 int extra_stack_alignment_needed;
245 gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
246 gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos;
248 const struct floatformat * float_format;
249 const struct floatformat * double_format;
250 const struct floatformat * long_double_format;
251 gdbarch_convert_from_func_ptr_addr_ftype *convert_from_func_ptr_addr;
252 gdbarch_addr_bits_remove_ftype *addr_bits_remove;
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;
260 /* The default architecture uses host values (for want of a better
263 extern const struct bfd_arch_info bfd_default_arch_struct;
265 struct gdbarch startup_gdbarch =
267 /* basic architecture information */
268 &bfd_default_arch_struct,
270 /* target specific vector and its dump routine */
272 /*per-architecture data-pointers and swap regions */
274 /* Multi-arch values */
278 8 * sizeof (LONGEST),
281 8 * sizeof (long double),
341 generic_get_saved_register,
395 /* startup_gdbarch() */
398 struct gdbarch *current_gdbarch = &startup_gdbarch;
400 /* Do any initialization needed for a non-multiarch configuration
401 after the _initialize_MODULE functions have been run. */
403 initialize_non_multiarch ()
405 alloc_gdbarch_data (&startup_gdbarch);
406 init_gdbarch_data (&startup_gdbarch);
410 /* Create a new ``struct gdbarch'' based on information provided by
411 ``struct gdbarch_info''. */
414 gdbarch_alloc (const struct gdbarch_info *info,
415 struct gdbarch_tdep *tdep)
417 /* NOTE: The new architecture variable is named ``current_gdbarch''
418 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
419 the current local architecture and not the previous global
420 architecture. This ensures that the new architectures initial
421 values are not influenced by the previous architecture. Once
422 everything is parameterised with gdbarch, this will go away. */
423 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
424 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
426 alloc_gdbarch_data (current_gdbarch);
428 current_gdbarch->tdep = tdep;
430 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
431 current_gdbarch->byte_order = info->byte_order;
433 /* Force the explicit initialization of these. */
434 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
435 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
436 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
437 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
438 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
439 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
440 current_gdbarch->long_double_bit = 2*TARGET_DOUBLE_BIT;
441 current_gdbarch->ptr_bit = TARGET_INT_BIT;
442 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
443 current_gdbarch->read_pc = generic_target_read_pc;
444 current_gdbarch->write_pc = generic_target_write_pc;
445 current_gdbarch->read_fp = generic_target_read_fp;
446 current_gdbarch->write_fp = generic_target_write_fp;
447 current_gdbarch->read_sp = generic_target_read_sp;
448 current_gdbarch->write_sp = generic_target_write_sp;
449 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
450 current_gdbarch->num_regs = -1;
451 current_gdbarch->sp_regnum = -1;
452 current_gdbarch->fp_regnum = -1;
453 current_gdbarch->pc_regnum = -1;
454 current_gdbarch->fp0_regnum = -1;
455 current_gdbarch->npc_regnum = -1;
456 current_gdbarch->nnpc_regnum = -1;
457 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
458 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
459 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
460 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
461 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
462 current_gdbarch->register_name = legacy_register_name;
463 current_gdbarch->register_size = -1;
464 current_gdbarch->register_bytes = -1;
465 current_gdbarch->max_register_raw_size = -1;
466 current_gdbarch->max_register_virtual_size = -1;
467 current_gdbarch->do_registers_info = do_registers_info;
468 current_gdbarch->register_sim_regno = default_register_sim_regno;
469 current_gdbarch->cannot_fetch_register = cannot_register_not;
470 current_gdbarch->cannot_store_register = cannot_register_not;
471 current_gdbarch->use_generic_dummy_frames = -1;
472 current_gdbarch->call_dummy_start_offset = -1;
473 current_gdbarch->call_dummy_breakpoint_offset = -1;
474 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
475 current_gdbarch->call_dummy_length = -1;
476 current_gdbarch->call_dummy_p = -1;
477 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
478 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
479 current_gdbarch->call_dummy_stack_adjust_p = -1;
480 current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
481 current_gdbarch->init_frame_pc = init_frame_pc_default;
482 current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
483 current_gdbarch->register_convertible = generic_register_convertible_not;
484 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
485 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
486 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
487 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
488 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
489 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
490 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
491 current_gdbarch->decr_pc_after_break = -1;
492 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
493 current_gdbarch->function_start_offset = -1;
494 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
495 current_gdbarch->frame_args_skip = -1;
496 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
497 current_gdbarch->extra_stack_alignment_needed = 1;
498 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
499 current_gdbarch->addr_bits_remove = core_addr_identity;
500 current_gdbarch->print_insn = legacy_print_insn;
501 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
502 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
503 /* gdbarch_alloc() */
505 return current_gdbarch;
509 /* Free a gdbarch struct. This should never happen in normal
510 operation --- once you've created a gdbarch, you keep it around.
511 However, if an architecture's init function encounters an error
512 building the structure, it may need to clean up a partially
513 constructed gdbarch. */
516 gdbarch_free (struct gdbarch *arch)
518 gdb_assert (arch != NULL);
519 free_gdbarch_data (arch);
524 /* Ensure that all values in a GDBARCH are reasonable. */
527 verify_gdbarch (struct gdbarch *gdbarch)
530 struct cleanup *cleanups;
533 /* Only perform sanity checks on a multi-arch target. */
536 log = mem_fileopen ();
537 cleanups = make_cleanup_ui_file_delete (log);
539 if (gdbarch->byte_order == 0)
540 fprintf_unfiltered (log, "\n\tbyte-order");
541 if (gdbarch->bfd_arch_info == NULL)
542 fprintf_unfiltered (log, "\n\tbfd_arch_info");
543 /* Check those that need to be defined for the given multi-arch level. */
544 /* Skip verify of short_bit, invalid_p == 0 */
545 /* Skip verify of int_bit, invalid_p == 0 */
546 /* Skip verify of long_bit, invalid_p == 0 */
547 /* Skip verify of long_long_bit, invalid_p == 0 */
548 /* Skip verify of float_bit, invalid_p == 0 */
549 /* Skip verify of double_bit, invalid_p == 0 */
550 /* Skip verify of long_double_bit, invalid_p == 0 */
551 /* Skip verify of ptr_bit, invalid_p == 0 */
552 if (gdbarch->addr_bit == 0)
553 gdbarch->addr_bit = TARGET_PTR_BIT;
554 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
555 /* Skip verify of ieee_float, invalid_p == 0 */
556 /* Skip verify of read_pc, invalid_p == 0 */
557 /* Skip verify of write_pc, invalid_p == 0 */
558 /* Skip verify of read_fp, invalid_p == 0 */
559 /* Skip verify of write_fp, invalid_p == 0 */
560 /* Skip verify of read_sp, invalid_p == 0 */
561 /* Skip verify of write_sp, invalid_p == 0 */
562 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
563 /* Skip verify of register_read, has predicate */
564 /* Skip verify of register_write, has predicate */
565 if ((GDB_MULTI_ARCH >= 2)
566 && (gdbarch->num_regs == -1))
567 fprintf_unfiltered (log, "\n\tnum_regs");
568 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
569 if ((GDB_MULTI_ARCH >= 2)
570 && (gdbarch->sp_regnum == -1))
571 fprintf_unfiltered (log, "\n\tsp_regnum");
572 if ((GDB_MULTI_ARCH >= 2)
573 && (gdbarch->fp_regnum == -1))
574 fprintf_unfiltered (log, "\n\tfp_regnum");
575 if ((GDB_MULTI_ARCH >= 2)
576 && (gdbarch->pc_regnum == -1))
577 fprintf_unfiltered (log, "\n\tpc_regnum");
578 /* Skip verify of fp0_regnum, invalid_p == 0 */
579 /* Skip verify of npc_regnum, invalid_p == 0 */
580 /* Skip verify of nnpc_regnum, invalid_p == 0 */
581 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
582 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
583 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
584 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
585 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
586 /* Skip verify of register_name, invalid_p == 0 */
587 if ((GDB_MULTI_ARCH >= 2)
588 && (gdbarch->register_size == -1))
589 fprintf_unfiltered (log, "\n\tregister_size");
590 if ((GDB_MULTI_ARCH >= 2)
591 && (gdbarch->register_bytes == -1))
592 fprintf_unfiltered (log, "\n\tregister_bytes");
593 if ((GDB_MULTI_ARCH >= 2)
594 && (gdbarch->register_byte == 0))
595 fprintf_unfiltered (log, "\n\tregister_byte");
596 if ((GDB_MULTI_ARCH >= 2)
597 && (gdbarch->register_raw_size == 0))
598 fprintf_unfiltered (log, "\n\tregister_raw_size");
599 if ((GDB_MULTI_ARCH >= 2)
600 && (gdbarch->max_register_raw_size == -1))
601 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
602 if ((GDB_MULTI_ARCH >= 2)
603 && (gdbarch->register_virtual_size == 0))
604 fprintf_unfiltered (log, "\n\tregister_virtual_size");
605 if ((GDB_MULTI_ARCH >= 2)
606 && (gdbarch->max_register_virtual_size == -1))
607 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
608 if ((GDB_MULTI_ARCH >= 2)
609 && (gdbarch->register_virtual_type == 0))
610 fprintf_unfiltered (log, "\n\tregister_virtual_type");
611 /* Skip verify of do_registers_info, invalid_p == 0 */
612 /* Skip verify of register_sim_regno, invalid_p == 0 */
613 /* Skip verify of register_bytes_ok, has predicate */
614 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
615 /* Skip verify of cannot_store_register, invalid_p == 0 */
616 if ((GDB_MULTI_ARCH >= 1)
617 && (gdbarch->use_generic_dummy_frames == -1))
618 fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames");
619 if ((GDB_MULTI_ARCH >= 2)
620 && (gdbarch->call_dummy_location == 0))
621 fprintf_unfiltered (log, "\n\tcall_dummy_location");
622 if ((GDB_MULTI_ARCH >= 2)
623 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
624 fprintf_unfiltered (log, "\n\tcall_dummy_address");
625 if ((GDB_MULTI_ARCH >= 2)
626 && (gdbarch->call_dummy_start_offset == -1))
627 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
628 if ((GDB_MULTI_ARCH >= 2)
629 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
630 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
631 if ((GDB_MULTI_ARCH >= 1)
632 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
633 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
634 if ((GDB_MULTI_ARCH >= 2)
635 && (gdbarch->call_dummy_length == -1))
636 fprintf_unfiltered (log, "\n\tcall_dummy_length");
637 if ((GDB_MULTI_ARCH >= 2)
638 && (gdbarch->pc_in_call_dummy == 0))
639 fprintf_unfiltered (log, "\n\tpc_in_call_dummy");
640 if ((GDB_MULTI_ARCH >= 1)
641 && (gdbarch->call_dummy_p == -1))
642 fprintf_unfiltered (log, "\n\tcall_dummy_p");
643 /* Skip verify of call_dummy_words, invalid_p == 0 */
644 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
645 if ((GDB_MULTI_ARCH >= 1)
646 && (gdbarch->call_dummy_stack_adjust_p == -1))
647 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
648 if ((GDB_MULTI_ARCH >= 2)
649 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
650 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
651 if ((GDB_MULTI_ARCH >= 2)
652 && (gdbarch->fix_call_dummy == 0))
653 fprintf_unfiltered (log, "\n\tfix_call_dummy");
654 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
655 /* Skip verify of init_frame_pc, invalid_p == 0 */
656 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
657 if ((GDB_MULTI_ARCH >= 1)
658 && (gdbarch->get_saved_register == 0))
659 fprintf_unfiltered (log, "\n\tget_saved_register");
660 /* Skip verify of register_convertible, invalid_p == 0 */
661 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
662 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
663 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
664 /* Skip verify of store_pseudo_register, invalid_p == 0 */
665 /* Skip verify of pointer_to_address, invalid_p == 0 */
666 /* Skip verify of address_to_pointer, invalid_p == 0 */
667 /* Skip verify of integer_to_address, has predicate */
668 /* Skip verify of return_value_on_stack, invalid_p == 0 */
669 if ((GDB_MULTI_ARCH >= 2)
670 && (gdbarch->extract_return_value == 0))
671 fprintf_unfiltered (log, "\n\textract_return_value");
672 if ((GDB_MULTI_ARCH >= 1)
673 && (gdbarch->push_arguments == 0))
674 fprintf_unfiltered (log, "\n\tpush_arguments");
675 if ((GDB_MULTI_ARCH >= 2)
676 && (gdbarch->push_dummy_frame == 0))
677 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
678 if ((GDB_MULTI_ARCH >= 1)
679 && (gdbarch->push_return_address == 0))
680 fprintf_unfiltered (log, "\n\tpush_return_address");
681 if ((GDB_MULTI_ARCH >= 2)
682 && (gdbarch->pop_frame == 0))
683 fprintf_unfiltered (log, "\n\tpop_frame");
684 if ((GDB_MULTI_ARCH >= 2)
685 && (gdbarch->store_struct_return == 0))
686 fprintf_unfiltered (log, "\n\tstore_struct_return");
687 if ((GDB_MULTI_ARCH >= 2)
688 && (gdbarch->store_return_value == 0))
689 fprintf_unfiltered (log, "\n\tstore_return_value");
690 /* Skip verify of extract_struct_value_address, has predicate */
691 if ((GDB_MULTI_ARCH >= 2)
692 && (gdbarch->use_struct_convention == 0))
693 fprintf_unfiltered (log, "\n\tuse_struct_convention");
694 if ((GDB_MULTI_ARCH >= 2)
695 && (gdbarch->frame_init_saved_regs == 0))
696 fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
697 /* Skip verify of init_extra_frame_info, has predicate */
698 if ((GDB_MULTI_ARCH >= 2)
699 && (gdbarch->skip_prologue == 0))
700 fprintf_unfiltered (log, "\n\tskip_prologue");
701 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
702 if ((GDB_MULTI_ARCH >= 2)
703 && (gdbarch->inner_than == 0))
704 fprintf_unfiltered (log, "\n\tinner_than");
705 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
706 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
707 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
708 if ((GDB_MULTI_ARCH >= 2)
709 && (gdbarch->decr_pc_after_break == -1))
710 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
711 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
712 if ((GDB_MULTI_ARCH >= 2)
713 && (gdbarch->function_start_offset == -1))
714 fprintf_unfiltered (log, "\n\tfunction_start_offset");
715 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
716 if ((GDB_MULTI_ARCH >= 2)
717 && (gdbarch->frame_args_skip == -1))
718 fprintf_unfiltered (log, "\n\tframe_args_skip");
719 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
720 if ((GDB_MULTI_ARCH >= 2)
721 && (gdbarch->frame_chain == 0))
722 fprintf_unfiltered (log, "\n\tframe_chain");
723 if ((GDB_MULTI_ARCH >= 1)
724 && (gdbarch->frame_chain_valid == 0))
725 fprintf_unfiltered (log, "\n\tframe_chain_valid");
726 if ((GDB_MULTI_ARCH >= 2)
727 && (gdbarch->frame_saved_pc == 0))
728 fprintf_unfiltered (log, "\n\tframe_saved_pc");
729 if ((GDB_MULTI_ARCH >= 2)
730 && (gdbarch->frame_args_address == 0))
731 fprintf_unfiltered (log, "\n\tframe_args_address");
732 if ((GDB_MULTI_ARCH >= 2)
733 && (gdbarch->frame_locals_address == 0))
734 fprintf_unfiltered (log, "\n\tframe_locals_address");
735 if ((GDB_MULTI_ARCH >= 2)
736 && (gdbarch->saved_pc_after_call == 0))
737 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
738 if ((GDB_MULTI_ARCH >= 2)
739 && (gdbarch->frame_num_args == 0))
740 fprintf_unfiltered (log, "\n\tframe_num_args");
741 /* Skip verify of stack_align, has predicate */
742 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
743 /* Skip verify of reg_struct_has_addr, has predicate */
744 /* Skip verify of save_dummy_frame_tos, has predicate */
745 if (gdbarch->float_format == 0)
746 gdbarch->float_format = default_float_format (gdbarch);
747 if (gdbarch->double_format == 0)
748 gdbarch->double_format = default_double_format (gdbarch);
749 if (gdbarch->long_double_format == 0)
750 gdbarch->long_double_format = &floatformat_unknown;
751 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
752 /* Skip verify of addr_bits_remove, invalid_p == 0 */
753 /* Skip verify of software_single_step, has predicate */
754 /* Skip verify of print_insn, invalid_p == 0 */
755 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
756 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
757 buf = ui_file_xstrdup (log, &dummy);
758 make_cleanup (xfree, buf);
759 if (strlen (buf) > 0)
760 internal_error (__FILE__, __LINE__,
761 "verify_gdbarch: the following are invalid ...%s",
763 do_cleanups (cleanups);
767 /* Print out the details of the current architecture. */
769 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
770 just happens to match the global variable ``current_gdbarch''. That
771 way macros refering to that variable get the local and not the global
772 version - ulgh. Once everything is parameterised with gdbarch, this
776 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
778 fprintf_unfiltered (file,
779 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
782 fprintf_unfiltered (file,
783 "gdbarch_dump: register_read = 0x%08lx\n",
784 (long) current_gdbarch->register_read);
786 fprintf_unfiltered (file,
787 "gdbarch_dump: register_write = 0x%08lx\n",
788 (long) current_gdbarch->register_write);
789 #ifdef ADDRESS_TO_POINTER
791 /* Macro might contain `[{}]' when not multi-arch */
792 fprintf_unfiltered (file,
793 "gdbarch_dump: %s # %s\n",
794 "ADDRESS_TO_POINTER(type, buf, addr)",
795 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
798 fprintf_unfiltered (file,
799 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
800 (long) current_gdbarch->address_to_pointer
801 /*ADDRESS_TO_POINTER ()*/);
803 #ifdef ADDR_BITS_REMOVE
804 fprintf_unfiltered (file,
805 "gdbarch_dump: %s # %s\n",
806 "ADDR_BITS_REMOVE(addr)",
807 XSTRING (ADDR_BITS_REMOVE (addr)));
809 fprintf_unfiltered (file,
810 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
811 (long) current_gdbarch->addr_bits_remove
812 /*ADDR_BITS_REMOVE ()*/);
814 #ifdef BELIEVE_PCC_PROMOTION
815 fprintf_unfiltered (file,
816 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
817 XSTRING (BELIEVE_PCC_PROMOTION));
818 fprintf_unfiltered (file,
819 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
820 (long) BELIEVE_PCC_PROMOTION);
822 #ifdef BELIEVE_PCC_PROMOTION_TYPE
823 fprintf_unfiltered (file,
824 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
825 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
826 fprintf_unfiltered (file,
827 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
828 (long) BELIEVE_PCC_PROMOTION_TYPE);
830 #ifdef BREAKPOINT_FROM_PC
831 fprintf_unfiltered (file,
832 "gdbarch_dump: %s # %s\n",
833 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
834 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
836 fprintf_unfiltered (file,
837 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
838 (long) current_gdbarch->breakpoint_from_pc
839 /*BREAKPOINT_FROM_PC ()*/);
841 #ifdef CALL_DUMMY_ADDRESS
842 fprintf_unfiltered (file,
843 "gdbarch_dump: %s # %s\n",
844 "CALL_DUMMY_ADDRESS()",
845 XSTRING (CALL_DUMMY_ADDRESS ()));
847 fprintf_unfiltered (file,
848 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
849 (long) current_gdbarch->call_dummy_address
850 /*CALL_DUMMY_ADDRESS ()*/);
852 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
853 fprintf_unfiltered (file,
854 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
855 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
856 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
857 fprintf_unfiltered (file,
858 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
859 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
861 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
862 fprintf_unfiltered (file,
863 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
864 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
865 fprintf_unfiltered (file,
866 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
867 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
869 #ifdef CALL_DUMMY_LENGTH
870 fprintf_unfiltered (file,
871 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
872 XSTRING (CALL_DUMMY_LENGTH));
873 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
874 fprintf_unfiltered (file,
875 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
876 (long) CALL_DUMMY_LENGTH);
878 #ifdef CALL_DUMMY_LOCATION
879 fprintf_unfiltered (file,
880 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
881 XSTRING (CALL_DUMMY_LOCATION));
882 fprintf_unfiltered (file,
883 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
884 (long) CALL_DUMMY_LOCATION);
887 fprintf_unfiltered (file,
888 "gdbarch_dump: CALL_DUMMY_P # %s\n",
889 XSTRING (CALL_DUMMY_P));
890 fprintf_unfiltered (file,
891 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
892 (long) CALL_DUMMY_P);
894 #ifdef CALL_DUMMY_STACK_ADJUST
895 fprintf_unfiltered (file,
896 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
897 XSTRING (CALL_DUMMY_STACK_ADJUST));
898 if (CALL_DUMMY_STACK_ADJUST_P)
899 fprintf_unfiltered (file,
900 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
901 (long) CALL_DUMMY_STACK_ADJUST);
903 #ifdef CALL_DUMMY_STACK_ADJUST_P
904 fprintf_unfiltered (file,
905 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
906 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
907 fprintf_unfiltered (file,
908 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
909 (long) CALL_DUMMY_STACK_ADJUST_P);
911 #ifdef CALL_DUMMY_START_OFFSET
912 fprintf_unfiltered (file,
913 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
914 XSTRING (CALL_DUMMY_START_OFFSET));
915 fprintf_unfiltered (file,
916 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
917 (long) CALL_DUMMY_START_OFFSET);
919 #ifdef CALL_DUMMY_WORDS
920 fprintf_unfiltered (file,
921 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
922 XSTRING (CALL_DUMMY_WORDS));
923 fprintf_unfiltered (file,
924 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
925 (long) CALL_DUMMY_WORDS);
927 #ifdef CANNOT_FETCH_REGISTER
928 fprintf_unfiltered (file,
929 "gdbarch_dump: %s # %s\n",
930 "CANNOT_FETCH_REGISTER(regnum)",
931 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
933 fprintf_unfiltered (file,
934 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
935 (long) current_gdbarch->cannot_fetch_register
936 /*CANNOT_FETCH_REGISTER ()*/);
938 #ifdef CANNOT_STORE_REGISTER
939 fprintf_unfiltered (file,
940 "gdbarch_dump: %s # %s\n",
941 "CANNOT_STORE_REGISTER(regnum)",
942 XSTRING (CANNOT_STORE_REGISTER (regnum)));
944 fprintf_unfiltered (file,
945 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
946 (long) current_gdbarch->cannot_store_register
947 /*CANNOT_STORE_REGISTER ()*/);
949 #ifdef COERCE_FLOAT_TO_DOUBLE
950 fprintf_unfiltered (file,
951 "gdbarch_dump: %s # %s\n",
952 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
953 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
955 fprintf_unfiltered (file,
956 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
957 (long) current_gdbarch->coerce_float_to_double
958 /*COERCE_FLOAT_TO_DOUBLE ()*/);
960 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
961 fprintf_unfiltered (file,
962 "gdbarch_dump: %s # %s\n",
963 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
964 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
966 fprintf_unfiltered (file,
967 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
968 (long) current_gdbarch->convert_from_func_ptr_addr
969 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
971 #ifdef DECR_PC_AFTER_BREAK
972 fprintf_unfiltered (file,
973 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
974 XSTRING (DECR_PC_AFTER_BREAK));
975 fprintf_unfiltered (file,
976 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
977 (long) DECR_PC_AFTER_BREAK);
979 #ifdef DO_REGISTERS_INFO
981 /* Macro might contain `[{}]' when not multi-arch */
982 fprintf_unfiltered (file,
983 "gdbarch_dump: %s # %s\n",
984 "DO_REGISTERS_INFO(reg_nr, fpregs)",
985 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
988 fprintf_unfiltered (file,
989 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
990 (long) current_gdbarch->do_registers_info
991 /*DO_REGISTERS_INFO ()*/);
993 #ifdef DWARF2_REG_TO_REGNUM
994 fprintf_unfiltered (file,
995 "gdbarch_dump: %s # %s\n",
996 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
997 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
999 fprintf_unfiltered (file,
1000 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1001 (long) current_gdbarch->dwarf2_reg_to_regnum
1002 /*DWARF2_REG_TO_REGNUM ()*/);
1004 #ifdef DWARF_REG_TO_REGNUM
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: %s # %s\n",
1007 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1008 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1010 fprintf_unfiltered (file,
1011 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1012 (long) current_gdbarch->dwarf_reg_to_regnum
1013 /*DWARF_REG_TO_REGNUM ()*/);
1015 #ifdef ECOFF_REG_TO_REGNUM
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: %s # %s\n",
1018 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1019 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1021 fprintf_unfiltered (file,
1022 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1023 (long) current_gdbarch->ecoff_reg_to_regnum
1024 /*ECOFF_REG_TO_REGNUM ()*/);
1026 #ifdef EXTRACT_RETURN_VALUE
1028 /* Macro might contain `[{}]' when not multi-arch */
1029 fprintf_unfiltered (file,
1030 "gdbarch_dump: %s # %s\n",
1031 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1032 XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1037 (long) current_gdbarch->extract_return_value
1038 /*EXTRACT_RETURN_VALUE ()*/);
1040 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: %s # %s\n",
1043 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1044 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1046 fprintf_unfiltered (file,
1047 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1048 (long) current_gdbarch->extract_struct_value_address
1049 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1051 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1054 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1055 fprintf_unfiltered (file,
1056 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1057 (long) EXTRA_STACK_ALIGNMENT_NEEDED);
1059 #ifdef FETCH_PSEUDO_REGISTER
1061 /* Macro might contain `[{}]' when not multi-arch */
1062 fprintf_unfiltered (file,
1063 "gdbarch_dump: %s # %s\n",
1064 "FETCH_PSEUDO_REGISTER(regnum)",
1065 XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
1068 fprintf_unfiltered (file,
1069 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1070 (long) current_gdbarch->fetch_pseudo_register
1071 /*FETCH_PSEUDO_REGISTER ()*/);
1073 #ifdef FIX_CALL_DUMMY
1075 /* Macro might contain `[{}]' when not multi-arch */
1076 fprintf_unfiltered (file,
1077 "gdbarch_dump: %s # %s\n",
1078 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1079 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1084 (long) current_gdbarch->fix_call_dummy
1085 /*FIX_CALL_DUMMY ()*/);
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: FP0_REGNUM # %s\n",
1090 XSTRING (FP0_REGNUM));
1091 fprintf_unfiltered (file,
1092 "gdbarch_dump: FP0_REGNUM = %ld\n",
1096 fprintf_unfiltered (file,
1097 "gdbarch_dump: FP_REGNUM # %s\n",
1098 XSTRING (FP_REGNUM));
1099 fprintf_unfiltered (file,
1100 "gdbarch_dump: FP_REGNUM = %ld\n",
1103 #ifdef FRAMELESS_FUNCTION_INVOCATION
1104 fprintf_unfiltered (file,
1105 "gdbarch_dump: %s # %s\n",
1106 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1107 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1109 fprintf_unfiltered (file,
1110 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1111 (long) current_gdbarch->frameless_function_invocation
1112 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1114 #ifdef FRAME_ARGS_ADDRESS
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: %s # %s\n",
1117 "FRAME_ARGS_ADDRESS(fi)",
1118 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1120 fprintf_unfiltered (file,
1121 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1122 (long) current_gdbarch->frame_args_address
1123 /*FRAME_ARGS_ADDRESS ()*/);
1125 #ifdef FRAME_ARGS_SKIP
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1128 XSTRING (FRAME_ARGS_SKIP));
1129 fprintf_unfiltered (file,
1130 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1131 (long) FRAME_ARGS_SKIP);
1134 fprintf_unfiltered (file,
1135 "gdbarch_dump: %s # %s\n",
1136 "FRAME_CHAIN(frame)",
1137 XSTRING (FRAME_CHAIN (frame)));
1139 fprintf_unfiltered (file,
1140 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1141 (long) current_gdbarch->frame_chain
1142 /*FRAME_CHAIN ()*/);
1144 #ifdef FRAME_CHAIN_VALID
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: %s # %s\n",
1147 "FRAME_CHAIN_VALID(chain, thisframe)",
1148 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1150 fprintf_unfiltered (file,
1151 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1152 (long) current_gdbarch->frame_chain_valid
1153 /*FRAME_CHAIN_VALID ()*/);
1155 #ifdef FRAME_INIT_SAVED_REGS
1157 /* Macro might contain `[{}]' when not multi-arch */
1158 fprintf_unfiltered (file,
1159 "gdbarch_dump: %s # %s\n",
1160 "FRAME_INIT_SAVED_REGS(frame)",
1161 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1166 (long) current_gdbarch->frame_init_saved_regs
1167 /*FRAME_INIT_SAVED_REGS ()*/);
1169 #ifdef FRAME_LOCALS_ADDRESS
1170 fprintf_unfiltered (file,
1171 "gdbarch_dump: %s # %s\n",
1172 "FRAME_LOCALS_ADDRESS(fi)",
1173 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1175 fprintf_unfiltered (file,
1176 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1177 (long) current_gdbarch->frame_locals_address
1178 /*FRAME_LOCALS_ADDRESS ()*/);
1180 #ifdef FRAME_NUM_ARGS
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: %s # %s\n",
1183 "FRAME_NUM_ARGS(frame)",
1184 XSTRING (FRAME_NUM_ARGS (frame)));
1186 fprintf_unfiltered (file,
1187 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1188 (long) current_gdbarch->frame_num_args
1189 /*FRAME_NUM_ARGS ()*/);
1191 #ifdef FRAME_SAVED_PC
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: %s # %s\n",
1194 "FRAME_SAVED_PC(fi)",
1195 XSTRING (FRAME_SAVED_PC (fi)));
1197 fprintf_unfiltered (file,
1198 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1199 (long) current_gdbarch->frame_saved_pc
1200 /*FRAME_SAVED_PC ()*/);
1202 #ifdef FUNCTION_START_OFFSET
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1205 XSTRING (FUNCTION_START_OFFSET));
1206 fprintf_unfiltered (file,
1207 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1208 (long) FUNCTION_START_OFFSET);
1210 #ifdef GET_SAVED_REGISTER
1212 /* Macro might contain `[{}]' when not multi-arch */
1213 fprintf_unfiltered (file,
1214 "gdbarch_dump: %s # %s\n",
1215 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1216 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1221 (long) current_gdbarch->get_saved_register
1222 /*GET_SAVED_REGISTER ()*/);
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: IEEE_FLOAT # %s\n",
1227 XSTRING (IEEE_FLOAT));
1228 fprintf_unfiltered (file,
1229 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1232 #ifdef INIT_EXTRA_FRAME_INFO
1234 /* Macro might contain `[{}]' when not multi-arch */
1235 fprintf_unfiltered (file,
1236 "gdbarch_dump: %s # %s\n",
1237 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1238 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1243 (long) current_gdbarch->init_extra_frame_info
1244 /*INIT_EXTRA_FRAME_INFO ()*/);
1246 #ifdef INIT_FRAME_PC
1248 /* Macro might contain `[{}]' when not multi-arch */
1249 fprintf_unfiltered (file,
1250 "gdbarch_dump: %s # %s\n",
1251 "INIT_FRAME_PC(fromleaf, prev)",
1252 XSTRING (INIT_FRAME_PC (fromleaf, prev)));
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1257 (long) current_gdbarch->init_frame_pc
1258 /*INIT_FRAME_PC ()*/);
1260 #ifdef INIT_FRAME_PC_FIRST
1262 /* Macro might contain `[{}]' when not multi-arch */
1263 fprintf_unfiltered (file,
1264 "gdbarch_dump: %s # %s\n",
1265 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1266 XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev)));
1269 fprintf_unfiltered (file,
1270 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1271 (long) current_gdbarch->init_frame_pc_first
1272 /*INIT_FRAME_PC_FIRST ()*/);
1275 fprintf_unfiltered (file,
1276 "gdbarch_dump: %s # %s\n",
1277 "INNER_THAN(lhs, rhs)",
1278 XSTRING (INNER_THAN (lhs, rhs)));
1280 fprintf_unfiltered (file,
1281 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1282 (long) current_gdbarch->inner_than
1285 #ifdef INTEGER_TO_ADDRESS
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: %s # %s\n",
1288 "INTEGER_TO_ADDRESS(type, buf)",
1289 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1291 fprintf_unfiltered (file,
1292 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1293 (long) current_gdbarch->integer_to_address
1294 /*INTEGER_TO_ADDRESS ()*/);
1296 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: %s # %s\n",
1299 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1300 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1302 fprintf_unfiltered (file,
1303 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1304 (long) current_gdbarch->in_solib_call_trampoline
1305 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1307 #ifdef MAX_REGISTER_RAW_SIZE
1308 fprintf_unfiltered (file,
1309 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1310 XSTRING (MAX_REGISTER_RAW_SIZE));
1311 fprintf_unfiltered (file,
1312 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1313 (long) MAX_REGISTER_RAW_SIZE);
1315 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1316 fprintf_unfiltered (file,
1317 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1318 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1319 fprintf_unfiltered (file,
1320 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1321 (long) MAX_REGISTER_VIRTUAL_SIZE);
1323 #ifdef MEMORY_INSERT_BREAKPOINT
1324 fprintf_unfiltered (file,
1325 "gdbarch_dump: %s # %s\n",
1326 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1327 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1329 fprintf_unfiltered (file,
1330 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1331 (long) current_gdbarch->memory_insert_breakpoint
1332 /*MEMORY_INSERT_BREAKPOINT ()*/);
1334 #ifdef MEMORY_REMOVE_BREAKPOINT
1335 fprintf_unfiltered (file,
1336 "gdbarch_dump: %s # %s\n",
1337 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1338 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1340 fprintf_unfiltered (file,
1341 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1342 (long) current_gdbarch->memory_remove_breakpoint
1343 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: NNPC_REGNUM # %s\n",
1348 XSTRING (NNPC_REGNUM));
1349 fprintf_unfiltered (file,
1350 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1351 (long) NNPC_REGNUM);
1354 fprintf_unfiltered (file,
1355 "gdbarch_dump: NPC_REGNUM # %s\n",
1356 XSTRING (NPC_REGNUM));
1357 fprintf_unfiltered (file,
1358 "gdbarch_dump: NPC_REGNUM = %ld\n",
1361 #ifdef NUM_PSEUDO_REGS
1362 fprintf_unfiltered (file,
1363 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1364 XSTRING (NUM_PSEUDO_REGS));
1365 fprintf_unfiltered (file,
1366 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1367 (long) NUM_PSEUDO_REGS);
1370 fprintf_unfiltered (file,
1371 "gdbarch_dump: NUM_REGS # %s\n",
1372 XSTRING (NUM_REGS));
1373 fprintf_unfiltered (file,
1374 "gdbarch_dump: NUM_REGS = %ld\n",
1377 #ifdef PARM_BOUNDARY
1378 fprintf_unfiltered (file,
1379 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1380 XSTRING (PARM_BOUNDARY));
1381 fprintf_unfiltered (file,
1382 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1383 (long) PARM_BOUNDARY);
1385 #ifdef PC_IN_CALL_DUMMY
1386 fprintf_unfiltered (file,
1387 "gdbarch_dump: %s # %s\n",
1388 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1389 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1391 fprintf_unfiltered (file,
1392 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1393 (long) current_gdbarch->pc_in_call_dummy
1394 /*PC_IN_CALL_DUMMY ()*/);
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: PC_REGNUM # %s\n",
1399 XSTRING (PC_REGNUM));
1400 fprintf_unfiltered (file,
1401 "gdbarch_dump: PC_REGNUM = %ld\n",
1404 #ifdef POINTER_TO_ADDRESS
1405 fprintf_unfiltered (file,
1406 "gdbarch_dump: %s # %s\n",
1407 "POINTER_TO_ADDRESS(type, buf)",
1408 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1410 fprintf_unfiltered (file,
1411 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1412 (long) current_gdbarch->pointer_to_address
1413 /*POINTER_TO_ADDRESS ()*/);
1417 /* Macro might contain `[{}]' when not multi-arch */
1418 fprintf_unfiltered (file,
1419 "gdbarch_dump: %s # %s\n",
1421 XSTRING (POP_FRAME (-)));
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1426 (long) current_gdbarch->pop_frame
1429 #ifdef PREPARE_TO_PROCEED
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: %s # %s\n",
1432 "PREPARE_TO_PROCEED(select_it)",
1433 XSTRING (PREPARE_TO_PROCEED (select_it)));
1435 fprintf_unfiltered (file,
1436 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1437 (long) current_gdbarch->prepare_to_proceed
1438 /*PREPARE_TO_PROCEED ()*/);
1440 #ifdef PROLOGUE_FRAMELESS_P
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: %s # %s\n",
1443 "PROLOGUE_FRAMELESS_P(ip)",
1444 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1446 fprintf_unfiltered (file,
1447 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1448 (long) current_gdbarch->prologue_frameless_p
1449 /*PROLOGUE_FRAMELESS_P ()*/);
1451 #ifdef PUSH_ARGUMENTS
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: %s # %s\n",
1454 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1455 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1457 fprintf_unfiltered (file,
1458 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1459 (long) current_gdbarch->push_arguments
1460 /*PUSH_ARGUMENTS ()*/);
1462 #ifdef PUSH_DUMMY_FRAME
1464 /* Macro might contain `[{}]' when not multi-arch */
1465 fprintf_unfiltered (file,
1466 "gdbarch_dump: %s # %s\n",
1467 "PUSH_DUMMY_FRAME(-)",
1468 XSTRING (PUSH_DUMMY_FRAME (-)));
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1473 (long) current_gdbarch->push_dummy_frame
1474 /*PUSH_DUMMY_FRAME ()*/);
1476 #ifdef PUSH_RETURN_ADDRESS
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: %s # %s\n",
1479 "PUSH_RETURN_ADDRESS(pc, sp)",
1480 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1482 fprintf_unfiltered (file,
1483 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1484 (long) current_gdbarch->push_return_address
1485 /*PUSH_RETURN_ADDRESS ()*/);
1487 #ifdef REGISTER_BYTE
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: %s # %s\n",
1490 "REGISTER_BYTE(reg_nr)",
1491 XSTRING (REGISTER_BYTE (reg_nr)));
1493 fprintf_unfiltered (file,
1494 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1495 (long) current_gdbarch->register_byte
1496 /*REGISTER_BYTE ()*/);
1498 #ifdef REGISTER_BYTES
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: REGISTER_BYTES # %s\n",
1501 XSTRING (REGISTER_BYTES));
1502 fprintf_unfiltered (file,
1503 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1504 (long) REGISTER_BYTES);
1506 #ifdef REGISTER_BYTES_OK
1507 fprintf_unfiltered (file,
1508 "gdbarch_dump: %s # %s\n",
1509 "REGISTER_BYTES_OK(nr_bytes)",
1510 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1512 fprintf_unfiltered (file,
1513 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1514 (long) current_gdbarch->register_bytes_ok
1515 /*REGISTER_BYTES_OK ()*/);
1517 #ifdef REGISTER_CONVERTIBLE
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: %s # %s\n",
1520 "REGISTER_CONVERTIBLE(nr)",
1521 XSTRING (REGISTER_CONVERTIBLE (nr)));
1523 fprintf_unfiltered (file,
1524 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1525 (long) current_gdbarch->register_convertible
1526 /*REGISTER_CONVERTIBLE ()*/);
1528 #ifdef REGISTER_CONVERT_TO_RAW
1530 /* Macro might contain `[{}]' when not multi-arch */
1531 fprintf_unfiltered (file,
1532 "gdbarch_dump: %s # %s\n",
1533 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1534 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1539 (long) current_gdbarch->register_convert_to_raw
1540 /*REGISTER_CONVERT_TO_RAW ()*/);
1542 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1544 /* Macro might contain `[{}]' when not multi-arch */
1545 fprintf_unfiltered (file,
1546 "gdbarch_dump: %s # %s\n",
1547 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1548 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1553 (long) current_gdbarch->register_convert_to_virtual
1554 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1556 #ifdef REGISTER_NAME
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: %s # %s\n",
1559 "REGISTER_NAME(regnr)",
1560 XSTRING (REGISTER_NAME (regnr)));
1562 fprintf_unfiltered (file,
1563 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1564 (long) current_gdbarch->register_name
1565 /*REGISTER_NAME ()*/);
1567 #ifdef REGISTER_RAW_SIZE
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: %s # %s\n",
1570 "REGISTER_RAW_SIZE(reg_nr)",
1571 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1573 fprintf_unfiltered (file,
1574 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1575 (long) current_gdbarch->register_raw_size
1576 /*REGISTER_RAW_SIZE ()*/);
1578 #ifdef REGISTER_SIM_REGNO
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: %s # %s\n",
1581 "REGISTER_SIM_REGNO(reg_nr)",
1582 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1584 fprintf_unfiltered (file,
1585 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1586 (long) current_gdbarch->register_sim_regno
1587 /*REGISTER_SIM_REGNO ()*/);
1589 #ifdef REGISTER_SIZE
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: REGISTER_SIZE # %s\n",
1592 XSTRING (REGISTER_SIZE));
1593 fprintf_unfiltered (file,
1594 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1595 (long) REGISTER_SIZE);
1597 #ifdef REGISTER_VIRTUAL_SIZE
1598 fprintf_unfiltered (file,
1599 "gdbarch_dump: %s # %s\n",
1600 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1601 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
1603 fprintf_unfiltered (file,
1604 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1605 (long) current_gdbarch->register_virtual_size
1606 /*REGISTER_VIRTUAL_SIZE ()*/);
1608 #ifdef REGISTER_VIRTUAL_TYPE
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: %s # %s\n",
1611 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1612 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
1614 fprintf_unfiltered (file,
1615 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1616 (long) current_gdbarch->register_virtual_type
1617 /*REGISTER_VIRTUAL_TYPE ()*/);
1619 #ifdef REG_STRUCT_HAS_ADDR
1620 fprintf_unfiltered (file,
1621 "gdbarch_dump: %s # %s\n",
1622 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1623 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1625 fprintf_unfiltered (file,
1626 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1627 (long) current_gdbarch->reg_struct_has_addr
1628 /*REG_STRUCT_HAS_ADDR ()*/);
1630 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1632 /* Macro might contain `[{}]' when not multi-arch */
1633 fprintf_unfiltered (file,
1634 "gdbarch_dump: %s # %s\n",
1635 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1636 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1641 (long) current_gdbarch->remote_translate_xfer_address
1642 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1644 #ifdef RETURN_VALUE_ON_STACK
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: %s # %s\n",
1647 "RETURN_VALUE_ON_STACK(type)",
1648 XSTRING (RETURN_VALUE_ON_STACK (type)));
1650 fprintf_unfiltered (file,
1651 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1652 (long) current_gdbarch->return_value_on_stack
1653 /*RETURN_VALUE_ON_STACK ()*/);
1655 #ifdef SAVED_PC_AFTER_CALL
1656 fprintf_unfiltered (file,
1657 "gdbarch_dump: %s # %s\n",
1658 "SAVED_PC_AFTER_CALL(frame)",
1659 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1661 fprintf_unfiltered (file,
1662 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1663 (long) current_gdbarch->saved_pc_after_call
1664 /*SAVED_PC_AFTER_CALL ()*/);
1666 #ifdef SAVE_DUMMY_FRAME_TOS
1668 /* Macro might contain `[{}]' when not multi-arch */
1669 fprintf_unfiltered (file,
1670 "gdbarch_dump: %s # %s\n",
1671 "SAVE_DUMMY_FRAME_TOS(sp)",
1672 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1675 fprintf_unfiltered (file,
1676 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1677 (long) current_gdbarch->save_dummy_frame_tos
1678 /*SAVE_DUMMY_FRAME_TOS ()*/);
1680 #ifdef SDB_REG_TO_REGNUM
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: %s # %s\n",
1683 "SDB_REG_TO_REGNUM(sdb_regnr)",
1684 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1686 fprintf_unfiltered (file,
1687 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1688 (long) current_gdbarch->sdb_reg_to_regnum
1689 /*SDB_REG_TO_REGNUM ()*/);
1691 #ifdef SIZEOF_CALL_DUMMY_WORDS
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1694 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
1695 fprintf_unfiltered (file,
1696 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1697 (long) SIZEOF_CALL_DUMMY_WORDS);
1699 #ifdef SKIP_PROLOGUE
1700 fprintf_unfiltered (file,
1701 "gdbarch_dump: %s # %s\n",
1702 "SKIP_PROLOGUE(ip)",
1703 XSTRING (SKIP_PROLOGUE (ip)));
1705 fprintf_unfiltered (file,
1706 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1707 (long) current_gdbarch->skip_prologue
1708 /*SKIP_PROLOGUE ()*/);
1710 #ifdef SKIP_TRAMPOLINE_CODE
1711 fprintf_unfiltered (file,
1712 "gdbarch_dump: %s # %s\n",
1713 "SKIP_TRAMPOLINE_CODE(pc)",
1714 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1716 fprintf_unfiltered (file,
1717 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1718 (long) current_gdbarch->skip_trampoline_code
1719 /*SKIP_TRAMPOLINE_CODE ()*/);
1721 #ifdef SOFTWARE_SINGLE_STEP
1723 /* Macro might contain `[{}]' when not multi-arch */
1724 fprintf_unfiltered (file,
1725 "gdbarch_dump: %s # %s\n",
1726 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1727 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1730 fprintf_unfiltered (file,
1731 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1732 (long) current_gdbarch->software_single_step
1733 /*SOFTWARE_SINGLE_STEP ()*/);
1736 fprintf_unfiltered (file,
1737 "gdbarch_dump: SP_REGNUM # %s\n",
1738 XSTRING (SP_REGNUM));
1739 fprintf_unfiltered (file,
1740 "gdbarch_dump: SP_REGNUM = %ld\n",
1743 #ifdef STAB_REG_TO_REGNUM
1744 fprintf_unfiltered (file,
1745 "gdbarch_dump: %s # %s\n",
1746 "STAB_REG_TO_REGNUM(stab_regnr)",
1747 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1749 fprintf_unfiltered (file,
1750 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1751 (long) current_gdbarch->stab_reg_to_regnum
1752 /*STAB_REG_TO_REGNUM ()*/);
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: %s # %s\n",
1758 XSTRING (STACK_ALIGN (sp)));
1760 fprintf_unfiltered (file,
1761 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1762 (long) current_gdbarch->stack_align
1763 /*STACK_ALIGN ()*/);
1765 #ifdef STORE_PSEUDO_REGISTER
1767 /* Macro might contain `[{}]' when not multi-arch */
1768 fprintf_unfiltered (file,
1769 "gdbarch_dump: %s # %s\n",
1770 "STORE_PSEUDO_REGISTER(regnum)",
1771 XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1774 fprintf_unfiltered (file,
1775 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1776 (long) current_gdbarch->store_pseudo_register
1777 /*STORE_PSEUDO_REGISTER ()*/);
1779 #ifdef STORE_RETURN_VALUE
1781 /* Macro might contain `[{}]' when not multi-arch */
1782 fprintf_unfiltered (file,
1783 "gdbarch_dump: %s # %s\n",
1784 "STORE_RETURN_VALUE(type, valbuf)",
1785 XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1788 fprintf_unfiltered (file,
1789 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1790 (long) current_gdbarch->store_return_value
1791 /*STORE_RETURN_VALUE ()*/);
1793 #ifdef STORE_STRUCT_RETURN
1795 /* Macro might contain `[{}]' when not multi-arch */
1796 fprintf_unfiltered (file,
1797 "gdbarch_dump: %s # %s\n",
1798 "STORE_STRUCT_RETURN(addr, sp)",
1799 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1802 fprintf_unfiltered (file,
1803 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1804 (long) current_gdbarch->store_struct_return
1805 /*STORE_STRUCT_RETURN ()*/);
1807 #ifdef TARGET_ADDR_BIT
1808 fprintf_unfiltered (file,
1809 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1810 XSTRING (TARGET_ADDR_BIT));
1811 fprintf_unfiltered (file,
1812 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1813 (long) TARGET_ADDR_BIT);
1815 #ifdef TARGET_ARCHITECTURE
1816 fprintf_unfiltered (file,
1817 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1818 XSTRING (TARGET_ARCHITECTURE));
1819 if (TARGET_ARCHITECTURE != NULL)
1820 fprintf_unfiltered (file,
1821 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1822 TARGET_ARCHITECTURE->printable_name);
1824 #ifdef TARGET_BFD_VMA_BIT
1825 fprintf_unfiltered (file,
1826 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1827 XSTRING (TARGET_BFD_VMA_BIT));
1828 fprintf_unfiltered (file,
1829 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1830 (long) TARGET_BFD_VMA_BIT);
1832 #ifdef TARGET_BYTE_ORDER
1833 fprintf_unfiltered (file,
1834 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1835 XSTRING (TARGET_BYTE_ORDER));
1836 fprintf_unfiltered (file,
1837 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1838 (long) TARGET_BYTE_ORDER);
1840 #ifdef TARGET_DOUBLE_BIT
1841 fprintf_unfiltered (file,
1842 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1843 XSTRING (TARGET_DOUBLE_BIT));
1844 fprintf_unfiltered (file,
1845 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1846 (long) TARGET_DOUBLE_BIT);
1848 #ifdef TARGET_DOUBLE_FORMAT
1849 fprintf_unfiltered (file,
1850 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1851 XSTRING (TARGET_DOUBLE_FORMAT));
1852 fprintf_unfiltered (file,
1853 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1854 (long) TARGET_DOUBLE_FORMAT);
1856 #ifdef TARGET_FLOAT_BIT
1857 fprintf_unfiltered (file,
1858 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1859 XSTRING (TARGET_FLOAT_BIT));
1860 fprintf_unfiltered (file,
1861 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1862 (long) TARGET_FLOAT_BIT);
1864 #ifdef TARGET_FLOAT_FORMAT
1865 fprintf_unfiltered (file,
1866 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1867 XSTRING (TARGET_FLOAT_FORMAT));
1868 fprintf_unfiltered (file,
1869 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1870 (long) TARGET_FLOAT_FORMAT);
1872 #ifdef TARGET_INT_BIT
1873 fprintf_unfiltered (file,
1874 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1875 XSTRING (TARGET_INT_BIT));
1876 fprintf_unfiltered (file,
1877 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1878 (long) TARGET_INT_BIT);
1880 #ifdef TARGET_LONG_BIT
1881 fprintf_unfiltered (file,
1882 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1883 XSTRING (TARGET_LONG_BIT));
1884 fprintf_unfiltered (file,
1885 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1886 (long) TARGET_LONG_BIT);
1888 #ifdef TARGET_LONG_DOUBLE_BIT
1889 fprintf_unfiltered (file,
1890 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1891 XSTRING (TARGET_LONG_DOUBLE_BIT));
1892 fprintf_unfiltered (file,
1893 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1894 (long) TARGET_LONG_DOUBLE_BIT);
1896 #ifdef TARGET_LONG_DOUBLE_FORMAT
1897 fprintf_unfiltered (file,
1898 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1899 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1900 fprintf_unfiltered (file,
1901 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1902 (long) TARGET_LONG_DOUBLE_FORMAT);
1904 #ifdef TARGET_LONG_LONG_BIT
1905 fprintf_unfiltered (file,
1906 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1907 XSTRING (TARGET_LONG_LONG_BIT));
1908 fprintf_unfiltered (file,
1909 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1910 (long) TARGET_LONG_LONG_BIT);
1912 #ifdef TARGET_PRINT_INSN
1913 fprintf_unfiltered (file,
1914 "gdbarch_dump: %s # %s\n",
1915 "TARGET_PRINT_INSN(vma, info)",
1916 XSTRING (TARGET_PRINT_INSN (vma, info)));
1918 fprintf_unfiltered (file,
1919 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1920 (long) current_gdbarch->print_insn
1921 /*TARGET_PRINT_INSN ()*/);
1923 #ifdef TARGET_PTR_BIT
1924 fprintf_unfiltered (file,
1925 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1926 XSTRING (TARGET_PTR_BIT));
1927 fprintf_unfiltered (file,
1928 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1929 (long) TARGET_PTR_BIT);
1931 #ifdef TARGET_READ_FP
1932 fprintf_unfiltered (file,
1933 "gdbarch_dump: %s # %s\n",
1935 XSTRING (TARGET_READ_FP ()));
1937 fprintf_unfiltered (file,
1938 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1939 (long) current_gdbarch->read_fp
1940 /*TARGET_READ_FP ()*/);
1942 #ifdef TARGET_READ_PC
1943 fprintf_unfiltered (file,
1944 "gdbarch_dump: %s # %s\n",
1945 "TARGET_READ_PC(ptid)",
1946 XSTRING (TARGET_READ_PC (ptid)));
1948 fprintf_unfiltered (file,
1949 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1950 (long) current_gdbarch->read_pc
1951 /*TARGET_READ_PC ()*/);
1953 #ifdef TARGET_READ_SP
1954 fprintf_unfiltered (file,
1955 "gdbarch_dump: %s # %s\n",
1957 XSTRING (TARGET_READ_SP ()));
1959 fprintf_unfiltered (file,
1960 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1961 (long) current_gdbarch->read_sp
1962 /*TARGET_READ_SP ()*/);
1964 #ifdef TARGET_SHORT_BIT
1965 fprintf_unfiltered (file,
1966 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1967 XSTRING (TARGET_SHORT_BIT));
1968 fprintf_unfiltered (file,
1969 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1970 (long) TARGET_SHORT_BIT);
1972 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1974 /* Macro might contain `[{}]' when not multi-arch */
1975 fprintf_unfiltered (file,
1976 "gdbarch_dump: %s # %s\n",
1977 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1978 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
1983 (long) current_gdbarch->virtual_frame_pointer
1984 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
1986 #ifdef TARGET_WRITE_FP
1988 /* Macro might contain `[{}]' when not multi-arch */
1989 fprintf_unfiltered (file,
1990 "gdbarch_dump: %s # %s\n",
1991 "TARGET_WRITE_FP(val)",
1992 XSTRING (TARGET_WRITE_FP (val)));
1995 fprintf_unfiltered (file,
1996 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1997 (long) current_gdbarch->write_fp
1998 /*TARGET_WRITE_FP ()*/);
2000 #ifdef TARGET_WRITE_PC
2002 /* Macro might contain `[{}]' when not multi-arch */
2003 fprintf_unfiltered (file,
2004 "gdbarch_dump: %s # %s\n",
2005 "TARGET_WRITE_PC(val, ptid)",
2006 XSTRING (TARGET_WRITE_PC (val, ptid)));
2009 fprintf_unfiltered (file,
2010 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2011 (long) current_gdbarch->write_pc
2012 /*TARGET_WRITE_PC ()*/);
2014 #ifdef TARGET_WRITE_SP
2016 /* Macro might contain `[{}]' when not multi-arch */
2017 fprintf_unfiltered (file,
2018 "gdbarch_dump: %s # %s\n",
2019 "TARGET_WRITE_SP(val)",
2020 XSTRING (TARGET_WRITE_SP (val)));
2023 fprintf_unfiltered (file,
2024 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2025 (long) current_gdbarch->write_sp
2026 /*TARGET_WRITE_SP ()*/);
2028 #ifdef USE_GENERIC_DUMMY_FRAMES
2029 fprintf_unfiltered (file,
2030 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2031 XSTRING (USE_GENERIC_DUMMY_FRAMES));
2032 fprintf_unfiltered (file,
2033 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2034 (long) USE_GENERIC_DUMMY_FRAMES);
2036 #ifdef USE_STRUCT_CONVENTION
2037 fprintf_unfiltered (file,
2038 "gdbarch_dump: %s # %s\n",
2039 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2040 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2042 fprintf_unfiltered (file,
2043 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2044 (long) current_gdbarch->use_struct_convention
2045 /*USE_STRUCT_CONVENTION ()*/);
2047 if (current_gdbarch->dump_tdep != NULL)
2048 current_gdbarch->dump_tdep (current_gdbarch, file);
2051 struct gdbarch_tdep *
2052 gdbarch_tdep (struct gdbarch *gdbarch)
2054 if (gdbarch_debug >= 2)
2055 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2056 return gdbarch->tdep;
2060 const struct bfd_arch_info *
2061 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2063 if (gdbarch_debug >= 2)
2064 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2065 return gdbarch->bfd_arch_info;
2069 gdbarch_byte_order (struct gdbarch *gdbarch)
2071 if (gdbarch_debug >= 2)
2072 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2073 return gdbarch->byte_order;
2077 gdbarch_short_bit (struct gdbarch *gdbarch)
2079 /* Skip verify of short_bit, invalid_p == 0 */
2080 if (gdbarch_debug >= 2)
2081 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2082 return gdbarch->short_bit;
2086 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2089 gdbarch->short_bit = short_bit;
2093 gdbarch_int_bit (struct gdbarch *gdbarch)
2095 /* Skip verify of int_bit, invalid_p == 0 */
2096 if (gdbarch_debug >= 2)
2097 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2098 return gdbarch->int_bit;
2102 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2105 gdbarch->int_bit = int_bit;
2109 gdbarch_long_bit (struct gdbarch *gdbarch)
2111 /* Skip verify of long_bit, invalid_p == 0 */
2112 if (gdbarch_debug >= 2)
2113 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2114 return gdbarch->long_bit;
2118 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2121 gdbarch->long_bit = long_bit;
2125 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2127 /* Skip verify of long_long_bit, invalid_p == 0 */
2128 if (gdbarch_debug >= 2)
2129 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2130 return gdbarch->long_long_bit;
2134 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2137 gdbarch->long_long_bit = long_long_bit;
2141 gdbarch_float_bit (struct gdbarch *gdbarch)
2143 /* Skip verify of float_bit, invalid_p == 0 */
2144 if (gdbarch_debug >= 2)
2145 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2146 return gdbarch->float_bit;
2150 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2153 gdbarch->float_bit = float_bit;
2157 gdbarch_double_bit (struct gdbarch *gdbarch)
2159 /* Skip verify of double_bit, invalid_p == 0 */
2160 if (gdbarch_debug >= 2)
2161 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2162 return gdbarch->double_bit;
2166 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2169 gdbarch->double_bit = double_bit;
2173 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2175 /* Skip verify of long_double_bit, invalid_p == 0 */
2176 if (gdbarch_debug >= 2)
2177 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2178 return gdbarch->long_double_bit;
2182 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2183 int long_double_bit)
2185 gdbarch->long_double_bit = long_double_bit;
2189 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2191 /* Skip verify of ptr_bit, invalid_p == 0 */
2192 if (gdbarch_debug >= 2)
2193 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2194 return gdbarch->ptr_bit;
2198 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2201 gdbarch->ptr_bit = ptr_bit;
2205 gdbarch_addr_bit (struct gdbarch *gdbarch)
2207 if (gdbarch->addr_bit == 0)
2208 internal_error (__FILE__, __LINE__,
2209 "gdbarch: gdbarch_addr_bit invalid");
2210 if (gdbarch_debug >= 2)
2211 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2212 return gdbarch->addr_bit;
2216 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2219 gdbarch->addr_bit = addr_bit;
2223 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2225 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2226 if (gdbarch_debug >= 2)
2227 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2228 return gdbarch->bfd_vma_bit;
2232 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2235 gdbarch->bfd_vma_bit = bfd_vma_bit;
2239 gdbarch_ieee_float (struct gdbarch *gdbarch)
2241 /* Skip verify of ieee_float, invalid_p == 0 */
2242 if (gdbarch_debug >= 2)
2243 fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
2244 return gdbarch->ieee_float;
2248 set_gdbarch_ieee_float (struct gdbarch *gdbarch,
2251 gdbarch->ieee_float = ieee_float;
2255 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2257 if (gdbarch->read_pc == 0)
2258 internal_error (__FILE__, __LINE__,
2259 "gdbarch: gdbarch_read_pc invalid");
2260 if (gdbarch_debug >= 2)
2261 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2262 return gdbarch->read_pc (ptid);
2266 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2267 gdbarch_read_pc_ftype read_pc)
2269 gdbarch->read_pc = read_pc;
2273 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2275 if (gdbarch->write_pc == 0)
2276 internal_error (__FILE__, __LINE__,
2277 "gdbarch: gdbarch_write_pc invalid");
2278 if (gdbarch_debug >= 2)
2279 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2280 gdbarch->write_pc (val, ptid);
2284 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2285 gdbarch_write_pc_ftype write_pc)
2287 gdbarch->write_pc = write_pc;
2291 gdbarch_read_fp (struct gdbarch *gdbarch)
2293 if (gdbarch->read_fp == 0)
2294 internal_error (__FILE__, __LINE__,
2295 "gdbarch: gdbarch_read_fp invalid");
2296 if (gdbarch_debug >= 2)
2297 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2298 return gdbarch->read_fp ();
2302 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2303 gdbarch_read_fp_ftype read_fp)
2305 gdbarch->read_fp = read_fp;
2309 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
2311 if (gdbarch->write_fp == 0)
2312 internal_error (__FILE__, __LINE__,
2313 "gdbarch: gdbarch_write_fp invalid");
2314 if (gdbarch_debug >= 2)
2315 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
2316 gdbarch->write_fp (val);
2320 set_gdbarch_write_fp (struct gdbarch *gdbarch,
2321 gdbarch_write_fp_ftype write_fp)
2323 gdbarch->write_fp = write_fp;
2327 gdbarch_read_sp (struct gdbarch *gdbarch)
2329 if (gdbarch->read_sp == 0)
2330 internal_error (__FILE__, __LINE__,
2331 "gdbarch: gdbarch_read_sp invalid");
2332 if (gdbarch_debug >= 2)
2333 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2334 return gdbarch->read_sp ();
2338 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2339 gdbarch_read_sp_ftype read_sp)
2341 gdbarch->read_sp = read_sp;
2345 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2347 if (gdbarch->write_sp == 0)
2348 internal_error (__FILE__, __LINE__,
2349 "gdbarch: gdbarch_write_sp invalid");
2350 if (gdbarch_debug >= 2)
2351 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2352 gdbarch->write_sp (val);
2356 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2357 gdbarch_write_sp_ftype write_sp)
2359 gdbarch->write_sp = write_sp;
2363 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2365 if (gdbarch->virtual_frame_pointer == 0)
2366 internal_error (__FILE__, __LINE__,
2367 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2368 if (gdbarch_debug >= 2)
2369 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2370 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2374 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2375 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2377 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2381 gdbarch_register_read_p (struct gdbarch *gdbarch)
2383 return gdbarch->register_read != 0;
2387 gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf)
2389 if (gdbarch->register_read == 0)
2390 internal_error (__FILE__, __LINE__,
2391 "gdbarch: gdbarch_register_read invalid");
2392 if (gdbarch_debug >= 2)
2393 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n");
2394 gdbarch->register_read (gdbarch, regnum, buf);
2398 set_gdbarch_register_read (struct gdbarch *gdbarch,
2399 gdbarch_register_read_ftype register_read)
2401 gdbarch->register_read = register_read;
2405 gdbarch_register_write_p (struct gdbarch *gdbarch)
2407 return gdbarch->register_write != 0;
2411 gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf)
2413 if (gdbarch->register_write == 0)
2414 internal_error (__FILE__, __LINE__,
2415 "gdbarch: gdbarch_register_write invalid");
2416 if (gdbarch_debug >= 2)
2417 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n");
2418 gdbarch->register_write (gdbarch, regnum, buf);
2422 set_gdbarch_register_write (struct gdbarch *gdbarch,
2423 gdbarch_register_write_ftype register_write)
2425 gdbarch->register_write = register_write;
2429 gdbarch_num_regs (struct gdbarch *gdbarch)
2431 if (gdbarch->num_regs == -1)
2432 internal_error (__FILE__, __LINE__,
2433 "gdbarch: gdbarch_num_regs invalid");
2434 if (gdbarch_debug >= 2)
2435 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2436 return gdbarch->num_regs;
2440 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2443 gdbarch->num_regs = num_regs;
2447 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2449 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2450 if (gdbarch_debug >= 2)
2451 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2452 return gdbarch->num_pseudo_regs;
2456 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2457 int num_pseudo_regs)
2459 gdbarch->num_pseudo_regs = num_pseudo_regs;
2463 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2465 if (gdbarch->sp_regnum == -1)
2466 internal_error (__FILE__, __LINE__,
2467 "gdbarch: gdbarch_sp_regnum invalid");
2468 if (gdbarch_debug >= 2)
2469 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2470 return gdbarch->sp_regnum;
2474 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2477 gdbarch->sp_regnum = sp_regnum;
2481 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2483 if (gdbarch->fp_regnum == -1)
2484 internal_error (__FILE__, __LINE__,
2485 "gdbarch: gdbarch_fp_regnum invalid");
2486 if (gdbarch_debug >= 2)
2487 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2488 return gdbarch->fp_regnum;
2492 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2495 gdbarch->fp_regnum = fp_regnum;
2499 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2501 if (gdbarch->pc_regnum == -1)
2502 internal_error (__FILE__, __LINE__,
2503 "gdbarch: gdbarch_pc_regnum invalid");
2504 if (gdbarch_debug >= 2)
2505 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2506 return gdbarch->pc_regnum;
2510 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2513 gdbarch->pc_regnum = pc_regnum;
2517 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2519 /* Skip verify of fp0_regnum, invalid_p == 0 */
2520 if (gdbarch_debug >= 2)
2521 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2522 return gdbarch->fp0_regnum;
2526 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2529 gdbarch->fp0_regnum = fp0_regnum;
2533 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2535 /* Skip verify of npc_regnum, invalid_p == 0 */
2536 if (gdbarch_debug >= 2)
2537 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2538 return gdbarch->npc_regnum;
2542 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2545 gdbarch->npc_regnum = npc_regnum;
2549 gdbarch_nnpc_regnum (struct gdbarch *gdbarch)
2551 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2552 if (gdbarch_debug >= 2)
2553 fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n");
2554 return gdbarch->nnpc_regnum;
2558 set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch,
2561 gdbarch->nnpc_regnum = nnpc_regnum;
2565 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2567 if (gdbarch->stab_reg_to_regnum == 0)
2568 internal_error (__FILE__, __LINE__,
2569 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2570 if (gdbarch_debug >= 2)
2571 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2572 return gdbarch->stab_reg_to_regnum (stab_regnr);
2576 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2577 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2579 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2583 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2585 if (gdbarch->ecoff_reg_to_regnum == 0)
2586 internal_error (__FILE__, __LINE__,
2587 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2588 if (gdbarch_debug >= 2)
2589 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2590 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2594 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2595 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2597 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2601 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2603 if (gdbarch->dwarf_reg_to_regnum == 0)
2604 internal_error (__FILE__, __LINE__,
2605 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2606 if (gdbarch_debug >= 2)
2607 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2608 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2612 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2613 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2615 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2619 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2621 if (gdbarch->sdb_reg_to_regnum == 0)
2622 internal_error (__FILE__, __LINE__,
2623 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2624 if (gdbarch_debug >= 2)
2625 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2626 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2630 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2631 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2633 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2637 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2639 if (gdbarch->dwarf2_reg_to_regnum == 0)
2640 internal_error (__FILE__, __LINE__,
2641 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2642 if (gdbarch_debug >= 2)
2643 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2644 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2648 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2649 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2651 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2655 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2657 if (gdbarch->register_name == 0)
2658 internal_error (__FILE__, __LINE__,
2659 "gdbarch: gdbarch_register_name invalid");
2660 if (gdbarch_debug >= 2)
2661 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2662 return gdbarch->register_name (regnr);
2666 set_gdbarch_register_name (struct gdbarch *gdbarch,
2667 gdbarch_register_name_ftype register_name)
2669 gdbarch->register_name = register_name;
2673 gdbarch_register_size (struct gdbarch *gdbarch)
2675 if (gdbarch->register_size == -1)
2676 internal_error (__FILE__, __LINE__,
2677 "gdbarch: gdbarch_register_size invalid");
2678 if (gdbarch_debug >= 2)
2679 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2680 return gdbarch->register_size;
2684 set_gdbarch_register_size (struct gdbarch *gdbarch,
2687 gdbarch->register_size = register_size;
2691 gdbarch_register_bytes (struct gdbarch *gdbarch)
2693 if (gdbarch->register_bytes == -1)
2694 internal_error (__FILE__, __LINE__,
2695 "gdbarch: gdbarch_register_bytes invalid");
2696 if (gdbarch_debug >= 2)
2697 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2698 return gdbarch->register_bytes;
2702 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2705 gdbarch->register_bytes = register_bytes;
2709 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2711 if (gdbarch->register_byte == 0)
2712 internal_error (__FILE__, __LINE__,
2713 "gdbarch: gdbarch_register_byte invalid");
2714 if (gdbarch_debug >= 2)
2715 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2716 return gdbarch->register_byte (reg_nr);
2720 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2721 gdbarch_register_byte_ftype register_byte)
2723 gdbarch->register_byte = register_byte;
2727 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2729 if (gdbarch->register_raw_size == 0)
2730 internal_error (__FILE__, __LINE__,
2731 "gdbarch: gdbarch_register_raw_size invalid");
2732 if (gdbarch_debug >= 2)
2733 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2734 return gdbarch->register_raw_size (reg_nr);
2738 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2739 gdbarch_register_raw_size_ftype register_raw_size)
2741 gdbarch->register_raw_size = register_raw_size;
2745 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
2747 if (gdbarch->max_register_raw_size == -1)
2748 internal_error (__FILE__, __LINE__,
2749 "gdbarch: gdbarch_max_register_raw_size invalid");
2750 if (gdbarch_debug >= 2)
2751 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2752 return gdbarch->max_register_raw_size;
2756 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2757 int max_register_raw_size)
2759 gdbarch->max_register_raw_size = max_register_raw_size;
2763 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2765 if (gdbarch->register_virtual_size == 0)
2766 internal_error (__FILE__, __LINE__,
2767 "gdbarch: gdbarch_register_virtual_size invalid");
2768 if (gdbarch_debug >= 2)
2769 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2770 return gdbarch->register_virtual_size (reg_nr);
2774 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2775 gdbarch_register_virtual_size_ftype register_virtual_size)
2777 gdbarch->register_virtual_size = register_virtual_size;
2781 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
2783 if (gdbarch->max_register_virtual_size == -1)
2784 internal_error (__FILE__, __LINE__,
2785 "gdbarch: gdbarch_max_register_virtual_size invalid");
2786 if (gdbarch_debug >= 2)
2787 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2788 return gdbarch->max_register_virtual_size;
2792 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2793 int max_register_virtual_size)
2795 gdbarch->max_register_virtual_size = max_register_virtual_size;
2799 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2801 if (gdbarch->register_virtual_type == 0)
2802 internal_error (__FILE__, __LINE__,
2803 "gdbarch: gdbarch_register_virtual_type invalid");
2804 if (gdbarch_debug >= 2)
2805 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2806 return gdbarch->register_virtual_type (reg_nr);
2810 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2811 gdbarch_register_virtual_type_ftype register_virtual_type)
2813 gdbarch->register_virtual_type = register_virtual_type;
2817 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2819 if (gdbarch->do_registers_info == 0)
2820 internal_error (__FILE__, __LINE__,
2821 "gdbarch: gdbarch_do_registers_info invalid");
2822 if (gdbarch_debug >= 2)
2823 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
2824 gdbarch->do_registers_info (reg_nr, fpregs);
2828 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
2829 gdbarch_do_registers_info_ftype do_registers_info)
2831 gdbarch->do_registers_info = do_registers_info;
2835 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2837 if (gdbarch->register_sim_regno == 0)
2838 internal_error (__FILE__, __LINE__,
2839 "gdbarch: gdbarch_register_sim_regno invalid");
2840 if (gdbarch_debug >= 2)
2841 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2842 return gdbarch->register_sim_regno (reg_nr);
2846 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2847 gdbarch_register_sim_regno_ftype register_sim_regno)
2849 gdbarch->register_sim_regno = register_sim_regno;
2853 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2855 return gdbarch->register_bytes_ok != 0;
2859 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
2861 if (gdbarch->register_bytes_ok == 0)
2862 internal_error (__FILE__, __LINE__,
2863 "gdbarch: gdbarch_register_bytes_ok invalid");
2864 if (gdbarch_debug >= 2)
2865 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2866 return gdbarch->register_bytes_ok (nr_bytes);
2870 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2871 gdbarch_register_bytes_ok_ftype register_bytes_ok)
2873 gdbarch->register_bytes_ok = register_bytes_ok;
2877 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2879 if (gdbarch->cannot_fetch_register == 0)
2880 internal_error (__FILE__, __LINE__,
2881 "gdbarch: gdbarch_cannot_fetch_register invalid");
2882 if (gdbarch_debug >= 2)
2883 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2884 return gdbarch->cannot_fetch_register (regnum);
2888 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2889 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2891 gdbarch->cannot_fetch_register = cannot_fetch_register;
2895 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2897 if (gdbarch->cannot_store_register == 0)
2898 internal_error (__FILE__, __LINE__,
2899 "gdbarch: gdbarch_cannot_store_register invalid");
2900 if (gdbarch_debug >= 2)
2901 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2902 return gdbarch->cannot_store_register (regnum);
2906 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2907 gdbarch_cannot_store_register_ftype cannot_store_register)
2909 gdbarch->cannot_store_register = cannot_store_register;
2913 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
2915 if (gdbarch->use_generic_dummy_frames == -1)
2916 internal_error (__FILE__, __LINE__,
2917 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2918 if (gdbarch_debug >= 2)
2919 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
2920 return gdbarch->use_generic_dummy_frames;
2924 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
2925 int use_generic_dummy_frames)
2927 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
2931 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2933 if (gdbarch->call_dummy_location == 0)
2934 internal_error (__FILE__, __LINE__,
2935 "gdbarch: gdbarch_call_dummy_location invalid");
2936 if (gdbarch_debug >= 2)
2937 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2938 return gdbarch->call_dummy_location;
2942 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2943 int call_dummy_location)
2945 gdbarch->call_dummy_location = call_dummy_location;
2949 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
2951 if (gdbarch->call_dummy_address == 0)
2952 internal_error (__FILE__, __LINE__,
2953 "gdbarch: gdbarch_call_dummy_address invalid");
2954 if (gdbarch_debug >= 2)
2955 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
2956 return gdbarch->call_dummy_address ();
2960 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
2961 gdbarch_call_dummy_address_ftype call_dummy_address)
2963 gdbarch->call_dummy_address = call_dummy_address;
2967 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
2969 if (gdbarch->call_dummy_start_offset == -1)
2970 internal_error (__FILE__, __LINE__,
2971 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2972 if (gdbarch_debug >= 2)
2973 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
2974 return gdbarch->call_dummy_start_offset;
2978 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
2979 CORE_ADDR call_dummy_start_offset)
2981 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
2985 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
2987 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
2988 internal_error (__FILE__, __LINE__,
2989 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2990 if (gdbarch_debug >= 2)
2991 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
2992 return gdbarch->call_dummy_breakpoint_offset;
2996 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
2997 CORE_ADDR call_dummy_breakpoint_offset)
2999 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3003 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3005 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3006 internal_error (__FILE__, __LINE__,
3007 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3008 if (gdbarch_debug >= 2)
3009 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3010 return gdbarch->call_dummy_breakpoint_offset_p;
3014 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3015 int call_dummy_breakpoint_offset_p)
3017 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3021 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3023 if (gdbarch->call_dummy_length == -1)
3024 internal_error (__FILE__, __LINE__,
3025 "gdbarch: gdbarch_call_dummy_length invalid");
3026 if (gdbarch_debug >= 2)
3027 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3028 return gdbarch->call_dummy_length;
3032 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3033 int call_dummy_length)
3035 gdbarch->call_dummy_length = call_dummy_length;
3039 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3041 if (gdbarch->pc_in_call_dummy == 0)
3042 internal_error (__FILE__, __LINE__,
3043 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3044 if (gdbarch_debug >= 2)
3045 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
3046 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
3050 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
3051 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
3053 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
3057 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3059 if (gdbarch->call_dummy_p == -1)
3060 internal_error (__FILE__, __LINE__,
3061 "gdbarch: gdbarch_call_dummy_p invalid");
3062 if (gdbarch_debug >= 2)
3063 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3064 return gdbarch->call_dummy_p;
3068 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3071 gdbarch->call_dummy_p = call_dummy_p;
3075 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3077 /* Skip verify of call_dummy_words, invalid_p == 0 */
3078 if (gdbarch_debug >= 2)
3079 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3080 return gdbarch->call_dummy_words;
3084 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3085 LONGEST * call_dummy_words)
3087 gdbarch->call_dummy_words = call_dummy_words;
3091 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3093 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3094 if (gdbarch_debug >= 2)
3095 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3096 return gdbarch->sizeof_call_dummy_words;
3100 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3101 int sizeof_call_dummy_words)
3103 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3107 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3109 if (gdbarch->call_dummy_stack_adjust_p == -1)
3110 internal_error (__FILE__, __LINE__,
3111 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3112 if (gdbarch_debug >= 2)
3113 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3114 return gdbarch->call_dummy_stack_adjust_p;
3118 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3119 int call_dummy_stack_adjust_p)
3121 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3125 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3127 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3128 internal_error (__FILE__, __LINE__,
3129 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3130 if (gdbarch_debug >= 2)
3131 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3132 return gdbarch->call_dummy_stack_adjust;
3136 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3137 int call_dummy_stack_adjust)
3139 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3143 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)
3145 if (gdbarch->fix_call_dummy == 0)
3146 internal_error (__FILE__, __LINE__,
3147 "gdbarch: gdbarch_fix_call_dummy invalid");
3148 if (gdbarch_debug >= 2)
3149 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3150 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3154 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3155 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3157 gdbarch->fix_call_dummy = fix_call_dummy;
3161 gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3163 if (gdbarch->init_frame_pc_first == 0)
3164 internal_error (__FILE__, __LINE__,
3165 "gdbarch: gdbarch_init_frame_pc_first invalid");
3166 if (gdbarch_debug >= 2)
3167 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n");
3168 gdbarch->init_frame_pc_first (fromleaf, prev);
3172 set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch,
3173 gdbarch_init_frame_pc_first_ftype init_frame_pc_first)
3175 gdbarch->init_frame_pc_first = init_frame_pc_first;
3179 gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3181 if (gdbarch->init_frame_pc == 0)
3182 internal_error (__FILE__, __LINE__,
3183 "gdbarch: gdbarch_init_frame_pc invalid");
3184 if (gdbarch_debug >= 2)
3185 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
3186 gdbarch->init_frame_pc (fromleaf, prev);
3190 set_gdbarch_init_frame_pc (struct gdbarch *gdbarch,
3191 gdbarch_init_frame_pc_ftype init_frame_pc)
3193 gdbarch->init_frame_pc = init_frame_pc;
3197 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3199 if (gdbarch_debug >= 2)
3200 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3201 return gdbarch->believe_pcc_promotion;
3205 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3206 int believe_pcc_promotion)
3208 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3212 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3214 if (gdbarch_debug >= 2)
3215 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3216 return gdbarch->believe_pcc_promotion_type;
3220 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3221 int believe_pcc_promotion_type)
3223 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3227 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3229 if (gdbarch->coerce_float_to_double == 0)
3230 internal_error (__FILE__, __LINE__,
3231 "gdbarch: gdbarch_coerce_float_to_double invalid");
3232 if (gdbarch_debug >= 2)
3233 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3234 return gdbarch->coerce_float_to_double (formal, actual);
3238 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3239 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3241 gdbarch->coerce_float_to_double = coerce_float_to_double;
3245 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)
3247 if (gdbarch->get_saved_register == 0)
3248 internal_error (__FILE__, __LINE__,
3249 "gdbarch: gdbarch_get_saved_register invalid");
3250 if (gdbarch_debug >= 2)
3251 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3252 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3256 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3257 gdbarch_get_saved_register_ftype get_saved_register)
3259 gdbarch->get_saved_register = get_saved_register;
3263 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3265 if (gdbarch->register_convertible == 0)
3266 internal_error (__FILE__, __LINE__,
3267 "gdbarch: gdbarch_register_convertible invalid");
3268 if (gdbarch_debug >= 2)
3269 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3270 return gdbarch->register_convertible (nr);
3274 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3275 gdbarch_register_convertible_ftype register_convertible)
3277 gdbarch->register_convertible = register_convertible;
3281 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3283 if (gdbarch->register_convert_to_virtual == 0)
3284 internal_error (__FILE__, __LINE__,
3285 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3286 if (gdbarch_debug >= 2)
3287 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3288 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3292 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3293 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3295 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3299 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3301 if (gdbarch->register_convert_to_raw == 0)
3302 internal_error (__FILE__, __LINE__,
3303 "gdbarch: gdbarch_register_convert_to_raw invalid");
3304 if (gdbarch_debug >= 2)
3305 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3306 gdbarch->register_convert_to_raw (type, regnum, from, to);
3310 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3311 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3313 gdbarch->register_convert_to_raw = register_convert_to_raw;
3317 gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
3319 if (gdbarch->fetch_pseudo_register == 0)
3320 internal_error (__FILE__, __LINE__,
3321 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3322 if (gdbarch_debug >= 2)
3323 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
3324 gdbarch->fetch_pseudo_register (regnum);
3328 set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
3329 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
3331 gdbarch->fetch_pseudo_register = fetch_pseudo_register;
3335 gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
3337 if (gdbarch->store_pseudo_register == 0)
3338 internal_error (__FILE__, __LINE__,
3339 "gdbarch: gdbarch_store_pseudo_register invalid");
3340 if (gdbarch_debug >= 2)
3341 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
3342 gdbarch->store_pseudo_register (regnum);
3346 set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
3347 gdbarch_store_pseudo_register_ftype store_pseudo_register)
3349 gdbarch->store_pseudo_register = store_pseudo_register;
3353 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3355 if (gdbarch->pointer_to_address == 0)
3356 internal_error (__FILE__, __LINE__,
3357 "gdbarch: gdbarch_pointer_to_address invalid");
3358 if (gdbarch_debug >= 2)
3359 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3360 return gdbarch->pointer_to_address (type, buf);
3364 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3365 gdbarch_pointer_to_address_ftype pointer_to_address)
3367 gdbarch->pointer_to_address = pointer_to_address;
3371 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3373 if (gdbarch->address_to_pointer == 0)
3374 internal_error (__FILE__, __LINE__,
3375 "gdbarch: gdbarch_address_to_pointer invalid");
3376 if (gdbarch_debug >= 2)
3377 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3378 gdbarch->address_to_pointer (type, buf, addr);
3382 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3383 gdbarch_address_to_pointer_ftype address_to_pointer)
3385 gdbarch->address_to_pointer = address_to_pointer;
3389 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3391 return gdbarch->integer_to_address != 0;
3395 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3397 if (gdbarch->integer_to_address == 0)
3398 internal_error (__FILE__, __LINE__,
3399 "gdbarch: gdbarch_integer_to_address invalid");
3400 if (gdbarch_debug >= 2)
3401 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3402 return gdbarch->integer_to_address (type, buf);
3406 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3407 gdbarch_integer_to_address_ftype integer_to_address)
3409 gdbarch->integer_to_address = integer_to_address;
3413 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3415 if (gdbarch->return_value_on_stack == 0)
3416 internal_error (__FILE__, __LINE__,
3417 "gdbarch: gdbarch_return_value_on_stack invalid");
3418 if (gdbarch_debug >= 2)
3419 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3420 return gdbarch->return_value_on_stack (type);
3424 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3425 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3427 gdbarch->return_value_on_stack = return_value_on_stack;
3431 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3433 if (gdbarch->extract_return_value == 0)
3434 internal_error (__FILE__, __LINE__,
3435 "gdbarch: gdbarch_extract_return_value invalid");
3436 if (gdbarch_debug >= 2)
3437 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3438 gdbarch->extract_return_value (type, regbuf, valbuf);
3442 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3443 gdbarch_extract_return_value_ftype extract_return_value)
3445 gdbarch->extract_return_value = extract_return_value;
3449 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3451 if (gdbarch->push_arguments == 0)
3452 internal_error (__FILE__, __LINE__,
3453 "gdbarch: gdbarch_push_arguments invalid");
3454 if (gdbarch_debug >= 2)
3455 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3456 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3460 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3461 gdbarch_push_arguments_ftype push_arguments)
3463 gdbarch->push_arguments = push_arguments;
3467 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3469 if (gdbarch->push_dummy_frame == 0)
3470 internal_error (__FILE__, __LINE__,
3471 "gdbarch: gdbarch_push_dummy_frame invalid");
3472 if (gdbarch_debug >= 2)
3473 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3474 gdbarch->push_dummy_frame ();
3478 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3479 gdbarch_push_dummy_frame_ftype push_dummy_frame)
3481 gdbarch->push_dummy_frame = push_dummy_frame;
3485 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3487 if (gdbarch->push_return_address == 0)
3488 internal_error (__FILE__, __LINE__,
3489 "gdbarch: gdbarch_push_return_address invalid");
3490 if (gdbarch_debug >= 2)
3491 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3492 return gdbarch->push_return_address (pc, sp);
3496 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3497 gdbarch_push_return_address_ftype push_return_address)
3499 gdbarch->push_return_address = push_return_address;
3503 gdbarch_pop_frame (struct gdbarch *gdbarch)
3505 if (gdbarch->pop_frame == 0)
3506 internal_error (__FILE__, __LINE__,
3507 "gdbarch: gdbarch_pop_frame invalid");
3508 if (gdbarch_debug >= 2)
3509 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3510 gdbarch->pop_frame ();
3514 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3515 gdbarch_pop_frame_ftype pop_frame)
3517 gdbarch->pop_frame = pop_frame;
3521 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3523 if (gdbarch->store_struct_return == 0)
3524 internal_error (__FILE__, __LINE__,
3525 "gdbarch: gdbarch_store_struct_return invalid");
3526 if (gdbarch_debug >= 2)
3527 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3528 gdbarch->store_struct_return (addr, sp);
3532 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3533 gdbarch_store_struct_return_ftype store_struct_return)
3535 gdbarch->store_struct_return = store_struct_return;
3539 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3541 if (gdbarch->store_return_value == 0)
3542 internal_error (__FILE__, __LINE__,
3543 "gdbarch: gdbarch_store_return_value invalid");
3544 if (gdbarch_debug >= 2)
3545 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3546 gdbarch->store_return_value (type, valbuf);
3550 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3551 gdbarch_store_return_value_ftype store_return_value)
3553 gdbarch->store_return_value = store_return_value;
3557 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
3559 return gdbarch->extract_struct_value_address != 0;
3563 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3565 if (gdbarch->extract_struct_value_address == 0)
3566 internal_error (__FILE__, __LINE__,
3567 "gdbarch: gdbarch_extract_struct_value_address invalid");
3568 if (gdbarch_debug >= 2)
3569 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
3570 return gdbarch->extract_struct_value_address (regbuf);
3574 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
3575 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
3577 gdbarch->extract_struct_value_address = extract_struct_value_address;
3581 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3583 if (gdbarch->use_struct_convention == 0)
3584 internal_error (__FILE__, __LINE__,
3585 "gdbarch: gdbarch_use_struct_convention invalid");
3586 if (gdbarch_debug >= 2)
3587 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3588 return gdbarch->use_struct_convention (gcc_p, value_type);
3592 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3593 gdbarch_use_struct_convention_ftype use_struct_convention)
3595 gdbarch->use_struct_convention = use_struct_convention;
3599 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3601 if (gdbarch->frame_init_saved_regs == 0)
3602 internal_error (__FILE__, __LINE__,
3603 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3604 if (gdbarch_debug >= 2)
3605 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3606 gdbarch->frame_init_saved_regs (frame);
3610 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3611 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
3613 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3617 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
3619 return gdbarch->init_extra_frame_info != 0;
3623 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3625 if (gdbarch->init_extra_frame_info == 0)
3626 internal_error (__FILE__, __LINE__,
3627 "gdbarch: gdbarch_init_extra_frame_info invalid");
3628 if (gdbarch_debug >= 2)
3629 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3630 gdbarch->init_extra_frame_info (fromleaf, frame);
3634 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3635 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
3637 gdbarch->init_extra_frame_info = init_extra_frame_info;
3641 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3643 if (gdbarch->skip_prologue == 0)
3644 internal_error (__FILE__, __LINE__,
3645 "gdbarch: gdbarch_skip_prologue invalid");
3646 if (gdbarch_debug >= 2)
3647 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3648 return gdbarch->skip_prologue (ip);
3652 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3653 gdbarch_skip_prologue_ftype skip_prologue)
3655 gdbarch->skip_prologue = skip_prologue;
3659 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
3661 if (gdbarch->prologue_frameless_p == 0)
3662 internal_error (__FILE__, __LINE__,
3663 "gdbarch: gdbarch_prologue_frameless_p invalid");
3664 if (gdbarch_debug >= 2)
3665 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
3666 return gdbarch->prologue_frameless_p (ip);
3670 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
3671 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
3673 gdbarch->prologue_frameless_p = prologue_frameless_p;
3677 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3679 if (gdbarch->inner_than == 0)
3680 internal_error (__FILE__, __LINE__,
3681 "gdbarch: gdbarch_inner_than invalid");
3682 if (gdbarch_debug >= 2)
3683 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3684 return gdbarch->inner_than (lhs, rhs);
3688 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3689 gdbarch_inner_than_ftype inner_than)
3691 gdbarch->inner_than = inner_than;
3695 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3697 if (gdbarch->breakpoint_from_pc == 0)
3698 internal_error (__FILE__, __LINE__,
3699 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3700 if (gdbarch_debug >= 2)
3701 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3702 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3706 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3707 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3709 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3713 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3715 if (gdbarch->memory_insert_breakpoint == 0)
3716 internal_error (__FILE__, __LINE__,
3717 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3718 if (gdbarch_debug >= 2)
3719 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3720 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3724 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3725 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3727 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3731 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3733 if (gdbarch->memory_remove_breakpoint == 0)
3734 internal_error (__FILE__, __LINE__,
3735 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3736 if (gdbarch_debug >= 2)
3737 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3738 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3742 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3743 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3745 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3749 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3751 if (gdbarch->decr_pc_after_break == -1)
3752 internal_error (__FILE__, __LINE__,
3753 "gdbarch: gdbarch_decr_pc_after_break invalid");
3754 if (gdbarch_debug >= 2)
3755 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3756 return gdbarch->decr_pc_after_break;
3760 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3761 CORE_ADDR decr_pc_after_break)
3763 gdbarch->decr_pc_after_break = decr_pc_after_break;
3767 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
3769 if (gdbarch->prepare_to_proceed == 0)
3770 internal_error (__FILE__, __LINE__,
3771 "gdbarch: gdbarch_prepare_to_proceed invalid");
3772 if (gdbarch_debug >= 2)
3773 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
3774 return gdbarch->prepare_to_proceed (select_it);
3778 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
3779 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
3781 gdbarch->prepare_to_proceed = prepare_to_proceed;
3785 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3787 if (gdbarch->function_start_offset == -1)
3788 internal_error (__FILE__, __LINE__,
3789 "gdbarch: gdbarch_function_start_offset invalid");
3790 if (gdbarch_debug >= 2)
3791 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3792 return gdbarch->function_start_offset;
3796 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3797 CORE_ADDR function_start_offset)
3799 gdbarch->function_start_offset = function_start_offset;
3803 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
3805 if (gdbarch->remote_translate_xfer_address == 0)
3806 internal_error (__FILE__, __LINE__,
3807 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3808 if (gdbarch_debug >= 2)
3809 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3810 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
3814 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3815 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3817 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3821 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3823 if (gdbarch->frame_args_skip == -1)
3824 internal_error (__FILE__, __LINE__,
3825 "gdbarch: gdbarch_frame_args_skip invalid");
3826 if (gdbarch_debug >= 2)
3827 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3828 return gdbarch->frame_args_skip;
3832 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3833 CORE_ADDR frame_args_skip)
3835 gdbarch->frame_args_skip = frame_args_skip;
3839 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3841 if (gdbarch->frameless_function_invocation == 0)
3842 internal_error (__FILE__, __LINE__,
3843 "gdbarch: gdbarch_frameless_function_invocation invalid");
3844 if (gdbarch_debug >= 2)
3845 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
3846 return gdbarch->frameless_function_invocation (fi);
3850 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
3851 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
3853 gdbarch->frameless_function_invocation = frameless_function_invocation;
3857 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3859 if (gdbarch->frame_chain == 0)
3860 internal_error (__FILE__, __LINE__,
3861 "gdbarch: gdbarch_frame_chain invalid");
3862 if (gdbarch_debug >= 2)
3863 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
3864 return gdbarch->frame_chain (frame);
3868 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
3869 gdbarch_frame_chain_ftype frame_chain)
3871 gdbarch->frame_chain = frame_chain;
3875 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3877 if (gdbarch->frame_chain_valid == 0)
3878 internal_error (__FILE__, __LINE__,
3879 "gdbarch: gdbarch_frame_chain_valid invalid");
3880 if (gdbarch_debug >= 2)
3881 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
3882 return gdbarch->frame_chain_valid (chain, thisframe);
3886 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
3887 gdbarch_frame_chain_valid_ftype frame_chain_valid)
3889 gdbarch->frame_chain_valid = frame_chain_valid;
3893 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3895 if (gdbarch->frame_saved_pc == 0)
3896 internal_error (__FILE__, __LINE__,
3897 "gdbarch: gdbarch_frame_saved_pc invalid");
3898 if (gdbarch_debug >= 2)
3899 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
3900 return gdbarch->frame_saved_pc (fi);
3904 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
3905 gdbarch_frame_saved_pc_ftype frame_saved_pc)
3907 gdbarch->frame_saved_pc = frame_saved_pc;
3911 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3913 if (gdbarch->frame_args_address == 0)
3914 internal_error (__FILE__, __LINE__,
3915 "gdbarch: gdbarch_frame_args_address invalid");
3916 if (gdbarch_debug >= 2)
3917 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
3918 return gdbarch->frame_args_address (fi);
3922 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
3923 gdbarch_frame_args_address_ftype frame_args_address)
3925 gdbarch->frame_args_address = frame_args_address;
3929 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3931 if (gdbarch->frame_locals_address == 0)
3932 internal_error (__FILE__, __LINE__,
3933 "gdbarch: gdbarch_frame_locals_address invalid");
3934 if (gdbarch_debug >= 2)
3935 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
3936 return gdbarch->frame_locals_address (fi);
3940 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
3941 gdbarch_frame_locals_address_ftype frame_locals_address)
3943 gdbarch->frame_locals_address = frame_locals_address;
3947 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3949 if (gdbarch->saved_pc_after_call == 0)
3950 internal_error (__FILE__, __LINE__,
3951 "gdbarch: gdbarch_saved_pc_after_call invalid");
3952 if (gdbarch_debug >= 2)
3953 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
3954 return gdbarch->saved_pc_after_call (frame);
3958 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
3959 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
3961 gdbarch->saved_pc_after_call = saved_pc_after_call;
3965 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3967 if (gdbarch->frame_num_args == 0)
3968 internal_error (__FILE__, __LINE__,
3969 "gdbarch: gdbarch_frame_num_args invalid");
3970 if (gdbarch_debug >= 2)
3971 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3972 return gdbarch->frame_num_args (frame);
3976 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3977 gdbarch_frame_num_args_ftype frame_num_args)
3979 gdbarch->frame_num_args = frame_num_args;
3983 gdbarch_stack_align_p (struct gdbarch *gdbarch)
3985 return gdbarch->stack_align != 0;
3989 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
3991 if (gdbarch->stack_align == 0)
3992 internal_error (__FILE__, __LINE__,
3993 "gdbarch: gdbarch_stack_align invalid");
3994 if (gdbarch_debug >= 2)
3995 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
3996 return gdbarch->stack_align (sp);
4000 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4001 gdbarch_stack_align_ftype stack_align)
4003 gdbarch->stack_align = stack_align;
4007 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4009 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4010 if (gdbarch_debug >= 2)
4011 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4012 return gdbarch->extra_stack_alignment_needed;
4016 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4017 int extra_stack_alignment_needed)
4019 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4023 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4025 return gdbarch->reg_struct_has_addr != 0;
4029 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4031 if (gdbarch->reg_struct_has_addr == 0)
4032 internal_error (__FILE__, __LINE__,
4033 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4034 if (gdbarch_debug >= 2)
4035 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4036 return gdbarch->reg_struct_has_addr (gcc_p, type);
4040 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4041 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4043 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4047 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4049 return gdbarch->save_dummy_frame_tos != 0;
4053 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4055 if (gdbarch->save_dummy_frame_tos == 0)
4056 internal_error (__FILE__, __LINE__,
4057 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4058 if (gdbarch_debug >= 2)
4059 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4060 gdbarch->save_dummy_frame_tos (sp);
4064 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4065 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4067 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4071 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4073 if (gdbarch_debug >= 2)
4074 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4075 return gdbarch->parm_boundary;
4079 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4082 gdbarch->parm_boundary = parm_boundary;
4085 const struct floatformat *
4086 gdbarch_float_format (struct gdbarch *gdbarch)
4088 if (gdbarch_debug >= 2)
4089 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4090 return gdbarch->float_format;
4094 set_gdbarch_float_format (struct gdbarch *gdbarch,
4095 const struct floatformat * float_format)
4097 gdbarch->float_format = float_format;
4100 const struct floatformat *
4101 gdbarch_double_format (struct gdbarch *gdbarch)
4103 if (gdbarch_debug >= 2)
4104 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4105 return gdbarch->double_format;
4109 set_gdbarch_double_format (struct gdbarch *gdbarch,
4110 const struct floatformat * double_format)
4112 gdbarch->double_format = double_format;
4115 const struct floatformat *
4116 gdbarch_long_double_format (struct gdbarch *gdbarch)
4118 if (gdbarch_debug >= 2)
4119 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4120 return gdbarch->long_double_format;
4124 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4125 const struct floatformat * long_double_format)
4127 gdbarch->long_double_format = long_double_format;
4131 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4133 if (gdbarch->convert_from_func_ptr_addr == 0)
4134 internal_error (__FILE__, __LINE__,
4135 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4136 if (gdbarch_debug >= 2)
4137 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4138 return gdbarch->convert_from_func_ptr_addr (addr);
4142 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4143 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4145 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4149 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4151 if (gdbarch->addr_bits_remove == 0)
4152 internal_error (__FILE__, __LINE__,
4153 "gdbarch: gdbarch_addr_bits_remove invalid");
4154 if (gdbarch_debug >= 2)
4155 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4156 return gdbarch->addr_bits_remove (addr);
4160 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4161 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4163 gdbarch->addr_bits_remove = addr_bits_remove;
4167 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4169 return gdbarch->software_single_step != 0;
4173 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4175 if (gdbarch->software_single_step == 0)
4176 internal_error (__FILE__, __LINE__,
4177 "gdbarch: gdbarch_software_single_step invalid");
4178 if (gdbarch_debug >= 2)
4179 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4180 gdbarch->software_single_step (sig, insert_breakpoints_p);
4184 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4185 gdbarch_software_single_step_ftype software_single_step)
4187 gdbarch->software_single_step = software_single_step;
4191 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
4193 if (gdbarch->print_insn == 0)
4194 internal_error (__FILE__, __LINE__,
4195 "gdbarch: gdbarch_print_insn invalid");
4196 if (gdbarch_debug >= 2)
4197 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4198 return gdbarch->print_insn (vma, info);
4202 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4203 gdbarch_print_insn_ftype print_insn)
4205 gdbarch->print_insn = print_insn;
4209 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4211 if (gdbarch->skip_trampoline_code == 0)
4212 internal_error (__FILE__, __LINE__,
4213 "gdbarch: gdbarch_skip_trampoline_code invalid");
4214 if (gdbarch_debug >= 2)
4215 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4216 return gdbarch->skip_trampoline_code (pc);
4220 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4221 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4223 gdbarch->skip_trampoline_code = skip_trampoline_code;
4227 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4229 if (gdbarch->in_solib_call_trampoline == 0)
4230 internal_error (__FILE__, __LINE__,
4231 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4232 if (gdbarch_debug >= 2)
4233 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4234 return gdbarch->in_solib_call_trampoline (pc, name);
4238 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4239 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4241 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4245 /* Keep a registry of per-architecture data-pointers required by GDB
4251 gdbarch_data_init_ftype *init;
4252 gdbarch_data_free_ftype *free;
4255 struct gdbarch_data_registration
4257 struct gdbarch_data *data;
4258 struct gdbarch_data_registration *next;
4261 struct gdbarch_data_registry
4264 struct gdbarch_data_registration *registrations;
4267 struct gdbarch_data_registry gdbarch_data_registry =
4272 struct gdbarch_data *
4273 register_gdbarch_data (gdbarch_data_init_ftype *init,
4274 gdbarch_data_free_ftype *free)
4276 struct gdbarch_data_registration **curr;
4277 for (curr = &gdbarch_data_registry.registrations;
4279 curr = &(*curr)->next);
4280 (*curr) = XMALLOC (struct gdbarch_data_registration);
4281 (*curr)->next = NULL;
4282 (*curr)->data = XMALLOC (struct gdbarch_data);
4283 (*curr)->data->index = gdbarch_data_registry.nr++;
4284 (*curr)->data->init = init;
4285 (*curr)->data->free = free;
4286 return (*curr)->data;
4290 /* Walk through all the registered users initializing each in turn. */
4293 init_gdbarch_data (struct gdbarch *gdbarch)
4295 struct gdbarch_data_registration *rego;
4296 for (rego = gdbarch_data_registry.registrations;
4300 struct gdbarch_data *data = rego->data;
4301 gdb_assert (data->index < gdbarch->nr_data);
4302 if (data->init != NULL)
4304 void *pointer = data->init (gdbarch);
4305 set_gdbarch_data (gdbarch, data, pointer);
4310 /* Create/delete the gdbarch data vector. */
4313 alloc_gdbarch_data (struct gdbarch *gdbarch)
4315 gdb_assert (gdbarch->data == NULL);
4316 gdbarch->nr_data = gdbarch_data_registry.nr;
4317 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
4321 free_gdbarch_data (struct gdbarch *gdbarch)
4323 struct gdbarch_data_registration *rego;
4324 gdb_assert (gdbarch->data != NULL);
4325 for (rego = gdbarch_data_registry.registrations;
4329 struct gdbarch_data *data = rego->data;
4330 gdb_assert (data->index < gdbarch->nr_data);
4331 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4333 data->free (gdbarch, gdbarch->data[data->index]);
4334 gdbarch->data[data->index] = NULL;
4337 xfree (gdbarch->data);
4338 gdbarch->data = NULL;
4342 /* Initialize the current value of thee specified per-architecture
4346 set_gdbarch_data (struct gdbarch *gdbarch,
4347 struct gdbarch_data *data,
4350 gdb_assert (data->index < gdbarch->nr_data);
4351 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4352 data->free (gdbarch, gdbarch->data[data->index]);
4353 gdbarch->data[data->index] = pointer;
4356 /* Return the current value of the specified per-architecture
4360 gdbarch_data (struct gdbarch_data *data)
4362 gdb_assert (data->index < current_gdbarch->nr_data);
4363 return current_gdbarch->data[data->index];
4368 /* Keep a registry of swapped data required by GDB modules. */
4373 struct gdbarch_swap_registration *source;
4374 struct gdbarch_swap *next;
4377 struct gdbarch_swap_registration
4380 unsigned long sizeof_data;
4381 gdbarch_swap_ftype *init;
4382 struct gdbarch_swap_registration *next;
4385 struct gdbarch_swap_registry
4388 struct gdbarch_swap_registration *registrations;
4391 struct gdbarch_swap_registry gdbarch_swap_registry =
4397 register_gdbarch_swap (void *data,
4398 unsigned long sizeof_data,
4399 gdbarch_swap_ftype *init)
4401 struct gdbarch_swap_registration **rego;
4402 for (rego = &gdbarch_swap_registry.registrations;
4404 rego = &(*rego)->next);
4405 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4406 (*rego)->next = NULL;
4407 (*rego)->init = init;
4408 (*rego)->data = data;
4409 (*rego)->sizeof_data = sizeof_data;
4414 init_gdbarch_swap (struct gdbarch *gdbarch)
4416 struct gdbarch_swap_registration *rego;
4417 struct gdbarch_swap **curr = &gdbarch->swap;
4418 for (rego = gdbarch_swap_registry.registrations;
4422 if (rego->data != NULL)
4424 (*curr) = XMALLOC (struct gdbarch_swap);
4425 (*curr)->source = rego;
4426 (*curr)->swap = xmalloc (rego->sizeof_data);
4427 (*curr)->next = NULL;
4428 memset (rego->data, 0, rego->sizeof_data);
4429 curr = &(*curr)->next;
4431 if (rego->init != NULL)
4437 swapout_gdbarch_swap (struct gdbarch *gdbarch)
4439 struct gdbarch_swap *curr;
4440 for (curr = gdbarch->swap;
4443 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4447 swapin_gdbarch_swap (struct gdbarch *gdbarch)
4449 struct gdbarch_swap *curr;
4450 for (curr = gdbarch->swap;
4453 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4457 /* Keep a registry of the architectures known by GDB. */
4459 struct gdbarch_registration
4461 enum bfd_architecture bfd_architecture;
4462 gdbarch_init_ftype *init;
4463 gdbarch_dump_tdep_ftype *dump_tdep;
4464 struct gdbarch_list *arches;
4465 struct gdbarch_registration *next;
4468 static struct gdbarch_registration *gdbarch_registry = NULL;
4471 append_name (const char ***buf, int *nr, const char *name)
4473 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4479 gdbarch_printable_names (void)
4483 /* Accumulate a list of names based on the registed list of
4485 enum bfd_architecture a;
4487 const char **arches = NULL;
4488 struct gdbarch_registration *rego;
4489 for (rego = gdbarch_registry;
4493 const struct bfd_arch_info *ap;
4494 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4496 internal_error (__FILE__, __LINE__,
4497 "gdbarch_architecture_names: multi-arch unknown");
4500 append_name (&arches, &nr_arches, ap->printable_name);
4505 append_name (&arches, &nr_arches, NULL);
4509 /* Just return all the architectures that BFD knows. Assume that
4510 the legacy architecture framework supports them. */
4511 return bfd_arch_list ();
4516 gdbarch_register (enum bfd_architecture bfd_architecture,
4517 gdbarch_init_ftype *init,
4518 gdbarch_dump_tdep_ftype *dump_tdep)
4520 struct gdbarch_registration **curr;
4521 const struct bfd_arch_info *bfd_arch_info;
4522 /* Check that BFD recognizes this architecture */
4523 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4524 if (bfd_arch_info == NULL)
4526 internal_error (__FILE__, __LINE__,
4527 "gdbarch: Attempt to register unknown architecture (%d)",
4530 /* Check that we haven't seen this architecture before */
4531 for (curr = &gdbarch_registry;
4533 curr = &(*curr)->next)
4535 if (bfd_architecture == (*curr)->bfd_architecture)
4536 internal_error (__FILE__, __LINE__,
4537 "gdbarch: Duplicate registraration of architecture (%s)",
4538 bfd_arch_info->printable_name);
4542 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
4543 bfd_arch_info->printable_name,
4546 (*curr) = XMALLOC (struct gdbarch_registration);
4547 (*curr)->bfd_architecture = bfd_architecture;
4548 (*curr)->init = init;
4549 (*curr)->dump_tdep = dump_tdep;
4550 (*curr)->arches = NULL;
4551 (*curr)->next = NULL;
4552 /* When non- multi-arch, install whatever target dump routine we've
4553 been provided - hopefully that routine has been written correctly
4554 and works regardless of multi-arch. */
4555 if (!GDB_MULTI_ARCH && dump_tdep != NULL
4556 && startup_gdbarch.dump_tdep == NULL)
4557 startup_gdbarch.dump_tdep = dump_tdep;
4561 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4562 gdbarch_init_ftype *init)
4564 gdbarch_register (bfd_architecture, init, NULL);
4568 /* Look for an architecture using gdbarch_info. Base search on only
4569 BFD_ARCH_INFO and BYTE_ORDER. */
4571 struct gdbarch_list *
4572 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4573 const struct gdbarch_info *info)
4575 for (; arches != NULL; arches = arches->next)
4577 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4579 if (info->byte_order != arches->gdbarch->byte_order)
4587 /* Update the current architecture. Return ZERO if the update request
4591 gdbarch_update_p (struct gdbarch_info info)
4593 struct gdbarch *new_gdbarch;
4594 struct gdbarch_list **list;
4595 struct gdbarch_registration *rego;
4597 /* Fill in missing parts of the INFO struct using a number of
4598 sources: ``set ...''; INFOabfd supplied; existing target. */
4600 /* ``(gdb) set architecture ...'' */
4601 if (info.bfd_arch_info == NULL
4602 && !TARGET_ARCHITECTURE_AUTO)
4603 info.bfd_arch_info = TARGET_ARCHITECTURE;
4604 if (info.bfd_arch_info == NULL
4605 && info.abfd != NULL
4606 && bfd_get_arch (info.abfd) != bfd_arch_unknown
4607 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
4608 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
4609 if (info.bfd_arch_info == NULL)
4610 info.bfd_arch_info = TARGET_ARCHITECTURE;
4612 /* ``(gdb) set byte-order ...'' */
4613 if (info.byte_order == 0
4614 && !TARGET_BYTE_ORDER_AUTO)
4615 info.byte_order = TARGET_BYTE_ORDER;
4616 /* From the INFO struct. */
4617 if (info.byte_order == 0
4618 && info.abfd != NULL)
4619 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
4620 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
4622 /* From the current target. */
4623 if (info.byte_order == 0)
4624 info.byte_order = TARGET_BYTE_ORDER;
4626 /* Must have found some sort of architecture. */
4627 gdb_assert (info.bfd_arch_info != NULL);
4631 fprintf_unfiltered (gdb_stdlog,
4632 "gdbarch_update: info.bfd_arch_info %s\n",
4633 (info.bfd_arch_info != NULL
4634 ? info.bfd_arch_info->printable_name
4636 fprintf_unfiltered (gdb_stdlog,
4637 "gdbarch_update: info.byte_order %d (%s)\n",
4639 (info.byte_order == BIG_ENDIAN ? "big"
4640 : info.byte_order == LITTLE_ENDIAN ? "little"
4642 fprintf_unfiltered (gdb_stdlog,
4643 "gdbarch_update: info.abfd 0x%lx\n",
4645 fprintf_unfiltered (gdb_stdlog,
4646 "gdbarch_update: info.tdep_info 0x%lx\n",
4647 (long) info.tdep_info);
4650 /* Find the target that knows about this architecture. */
4651 for (rego = gdbarch_registry;
4654 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4659 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
4663 /* Ask the target for a replacement architecture. */
4664 new_gdbarch = rego->init (info, rego->arches);
4666 /* Did the target like it? No. Reject the change. */
4667 if (new_gdbarch == NULL)
4670 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
4674 /* Did the architecture change? No. Do nothing. */
4675 if (current_gdbarch == new_gdbarch)
4678 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4680 new_gdbarch->bfd_arch_info->printable_name);
4684 /* Swap all data belonging to the old target out */
4685 swapout_gdbarch_swap (current_gdbarch);
4687 /* Is this a pre-existing architecture? Yes. Swap it in. */
4688 for (list = ®o->arches;
4690 list = &(*list)->next)
4692 if ((*list)->gdbarch == new_gdbarch)
4695 fprintf_unfiltered (gdb_stdlog,
4696 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4698 new_gdbarch->bfd_arch_info->printable_name);
4699 current_gdbarch = new_gdbarch;
4700 swapin_gdbarch_swap (new_gdbarch);
4701 architecture_changed_event ();
4706 /* Append this new architecture to this targets list. */
4707 (*list) = XMALLOC (struct gdbarch_list);
4708 (*list)->next = NULL;
4709 (*list)->gdbarch = new_gdbarch;
4711 /* Switch to this new architecture. Dump it out. */
4712 current_gdbarch = new_gdbarch;
4715 fprintf_unfiltered (gdb_stdlog,
4716 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4718 new_gdbarch->bfd_arch_info->printable_name);
4721 /* Check that the newly installed architecture is valid. Plug in
4722 any post init values. */
4723 new_gdbarch->dump_tdep = rego->dump_tdep;
4724 verify_gdbarch (new_gdbarch);
4726 /* Initialize the per-architecture memory (swap) areas.
4727 CURRENT_GDBARCH must be update before these modules are
4729 init_gdbarch_swap (new_gdbarch);
4731 /* Initialize the per-architecture data-pointer of all parties that
4732 registered an interest in this architecture. CURRENT_GDBARCH
4733 must be updated before these modules are called. */
4734 init_gdbarch_data (new_gdbarch);
4735 architecture_changed_event ();
4738 gdbarch_dump (current_gdbarch, gdb_stdlog);
4746 /* Pointer to the target-dependent disassembly function. */
4747 int (*tm_print_insn) (bfd_vma, disassemble_info *);
4748 disassemble_info tm_print_insn_info;
4751 extern void _initialize_gdbarch (void);
4754 _initialize_gdbarch (void)
4756 struct cmd_list_element *c;
4758 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
4759 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
4760 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
4761 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
4762 tm_print_insn_info.print_address_func = dis_asm_print_address;
4764 add_show_from_set (add_set_cmd ("arch",
4767 (char *)&gdbarch_debug,
4768 "Set architecture debugging.\n\
4769 When non-zero, architecture debugging is enabled.", &setdebuglist),
4771 c = add_set_cmd ("archdebug",
4774 (char *)&gdbarch_debug,
4775 "Set architecture debugging.\n\
4776 When non-zero, architecture debugging is enabled.", &setlist);
4778 deprecate_cmd (c, "set debug arch");
4779 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");