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;
257 gdbarch_in_function_epilogue_p_ftype *in_function_epilogue_p;
261 /* The default architecture uses host values (for want of a better
264 extern const struct bfd_arch_info bfd_default_arch_struct;
266 struct gdbarch startup_gdbarch =
268 /* basic architecture information */
269 &bfd_default_arch_struct,
271 /* target specific vector and its dump routine */
273 /*per-architecture data-pointers and swap regions */
275 /* Multi-arch values */
279 8 * sizeof (LONGEST),
282 8 * sizeof (long double),
342 generic_get_saved_register,
397 /* startup_gdbarch() */
400 struct gdbarch *current_gdbarch = &startup_gdbarch;
402 /* Do any initialization needed for a non-multiarch configuration
403 after the _initialize_MODULE functions have been run. */
405 initialize_non_multiarch ()
407 alloc_gdbarch_data (&startup_gdbarch);
408 init_gdbarch_data (&startup_gdbarch);
412 /* Create a new ``struct gdbarch'' based on information provided by
413 ``struct gdbarch_info''. */
416 gdbarch_alloc (const struct gdbarch_info *info,
417 struct gdbarch_tdep *tdep)
419 /* NOTE: The new architecture variable is named ``current_gdbarch''
420 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
421 the current local architecture and not the previous global
422 architecture. This ensures that the new architectures initial
423 values are not influenced by the previous architecture. Once
424 everything is parameterised with gdbarch, this will go away. */
425 struct gdbarch *current_gdbarch = XMALLOC (struct gdbarch);
426 memset (current_gdbarch, 0, sizeof (*current_gdbarch));
428 alloc_gdbarch_data (current_gdbarch);
430 current_gdbarch->tdep = tdep;
432 current_gdbarch->bfd_arch_info = info->bfd_arch_info;
433 current_gdbarch->byte_order = info->byte_order;
435 /* Force the explicit initialization of these. */
436 current_gdbarch->short_bit = 2*TARGET_CHAR_BIT;
437 current_gdbarch->int_bit = 4*TARGET_CHAR_BIT;
438 current_gdbarch->long_bit = 4*TARGET_CHAR_BIT;
439 current_gdbarch->long_long_bit = 2*TARGET_LONG_BIT;
440 current_gdbarch->float_bit = 4*TARGET_CHAR_BIT;
441 current_gdbarch->double_bit = 8*TARGET_CHAR_BIT;
442 current_gdbarch->long_double_bit = 2*TARGET_DOUBLE_BIT;
443 current_gdbarch->ptr_bit = TARGET_INT_BIT;
444 current_gdbarch->bfd_vma_bit = TARGET_ARCHITECTURE->bits_per_address;
445 current_gdbarch->read_pc = generic_target_read_pc;
446 current_gdbarch->write_pc = generic_target_write_pc;
447 current_gdbarch->read_fp = generic_target_read_fp;
448 current_gdbarch->write_fp = generic_target_write_fp;
449 current_gdbarch->read_sp = generic_target_read_sp;
450 current_gdbarch->write_sp = generic_target_write_sp;
451 current_gdbarch->virtual_frame_pointer = legacy_virtual_frame_pointer;
452 current_gdbarch->num_regs = -1;
453 current_gdbarch->sp_regnum = -1;
454 current_gdbarch->fp_regnum = -1;
455 current_gdbarch->pc_regnum = -1;
456 current_gdbarch->fp0_regnum = -1;
457 current_gdbarch->npc_regnum = -1;
458 current_gdbarch->nnpc_regnum = -1;
459 current_gdbarch->stab_reg_to_regnum = no_op_reg_to_regnum;
460 current_gdbarch->ecoff_reg_to_regnum = no_op_reg_to_regnum;
461 current_gdbarch->dwarf_reg_to_regnum = no_op_reg_to_regnum;
462 current_gdbarch->sdb_reg_to_regnum = no_op_reg_to_regnum;
463 current_gdbarch->dwarf2_reg_to_regnum = no_op_reg_to_regnum;
464 current_gdbarch->register_name = legacy_register_name;
465 current_gdbarch->register_size = -1;
466 current_gdbarch->register_bytes = -1;
467 current_gdbarch->max_register_raw_size = -1;
468 current_gdbarch->max_register_virtual_size = -1;
469 current_gdbarch->do_registers_info = do_registers_info;
470 current_gdbarch->register_sim_regno = default_register_sim_regno;
471 current_gdbarch->cannot_fetch_register = cannot_register_not;
472 current_gdbarch->cannot_store_register = cannot_register_not;
473 current_gdbarch->use_generic_dummy_frames = -1;
474 current_gdbarch->call_dummy_start_offset = -1;
475 current_gdbarch->call_dummy_breakpoint_offset = -1;
476 current_gdbarch->call_dummy_breakpoint_offset_p = -1;
477 current_gdbarch->call_dummy_length = -1;
478 current_gdbarch->call_dummy_p = -1;
479 current_gdbarch->call_dummy_words = legacy_call_dummy_words;
480 current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
481 current_gdbarch->call_dummy_stack_adjust_p = -1;
482 current_gdbarch->init_frame_pc_first = init_frame_pc_noop;
483 current_gdbarch->init_frame_pc = init_frame_pc_default;
484 current_gdbarch->coerce_float_to_double = default_coerce_float_to_double;
485 current_gdbarch->register_convertible = generic_register_convertible_not;
486 current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
487 current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
488 current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
489 current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
490 current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
491 current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
492 current_gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint;
493 current_gdbarch->decr_pc_after_break = -1;
494 current_gdbarch->prepare_to_proceed = default_prepare_to_proceed;
495 current_gdbarch->function_start_offset = -1;
496 current_gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
497 current_gdbarch->frame_args_skip = -1;
498 current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
499 current_gdbarch->extra_stack_alignment_needed = 1;
500 current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
501 current_gdbarch->addr_bits_remove = core_addr_identity;
502 current_gdbarch->print_insn = legacy_print_insn;
503 current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
504 current_gdbarch->in_solib_call_trampoline = generic_in_solib_call_trampoline;
505 current_gdbarch->in_function_epilogue_p = generic_in_function_epilogue_p;
506 /* gdbarch_alloc() */
508 return current_gdbarch;
512 /* Free a gdbarch struct. This should never happen in normal
513 operation --- once you've created a gdbarch, you keep it around.
514 However, if an architecture's init function encounters an error
515 building the structure, it may need to clean up a partially
516 constructed gdbarch. */
519 gdbarch_free (struct gdbarch *arch)
521 gdb_assert (arch != NULL);
522 free_gdbarch_data (arch);
527 /* Ensure that all values in a GDBARCH are reasonable. */
530 verify_gdbarch (struct gdbarch *gdbarch)
533 struct cleanup *cleanups;
536 /* Only perform sanity checks on a multi-arch target. */
539 log = mem_fileopen ();
540 cleanups = make_cleanup_ui_file_delete (log);
542 if (gdbarch->byte_order == 0)
543 fprintf_unfiltered (log, "\n\tbyte-order");
544 if (gdbarch->bfd_arch_info == NULL)
545 fprintf_unfiltered (log, "\n\tbfd_arch_info");
546 /* Check those that need to be defined for the given multi-arch level. */
547 /* Skip verify of short_bit, invalid_p == 0 */
548 /* Skip verify of int_bit, invalid_p == 0 */
549 /* Skip verify of long_bit, invalid_p == 0 */
550 /* Skip verify of long_long_bit, invalid_p == 0 */
551 /* Skip verify of float_bit, invalid_p == 0 */
552 /* Skip verify of double_bit, invalid_p == 0 */
553 /* Skip verify of long_double_bit, invalid_p == 0 */
554 /* Skip verify of ptr_bit, invalid_p == 0 */
555 if (gdbarch->addr_bit == 0)
556 gdbarch->addr_bit = TARGET_PTR_BIT;
557 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
558 /* Skip verify of ieee_float, invalid_p == 0 */
559 /* Skip verify of read_pc, invalid_p == 0 */
560 /* Skip verify of write_pc, invalid_p == 0 */
561 /* Skip verify of read_fp, invalid_p == 0 */
562 /* Skip verify of write_fp, invalid_p == 0 */
563 /* Skip verify of read_sp, invalid_p == 0 */
564 /* Skip verify of write_sp, invalid_p == 0 */
565 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
566 /* Skip verify of register_read, has predicate */
567 /* Skip verify of register_write, has predicate */
568 if ((GDB_MULTI_ARCH >= 2)
569 && (gdbarch->num_regs == -1))
570 fprintf_unfiltered (log, "\n\tnum_regs");
571 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
572 if ((GDB_MULTI_ARCH >= 2)
573 && (gdbarch->sp_regnum == -1))
574 fprintf_unfiltered (log, "\n\tsp_regnum");
575 if ((GDB_MULTI_ARCH >= 2)
576 && (gdbarch->fp_regnum == -1))
577 fprintf_unfiltered (log, "\n\tfp_regnum");
578 if ((GDB_MULTI_ARCH >= 2)
579 && (gdbarch->pc_regnum == -1))
580 fprintf_unfiltered (log, "\n\tpc_regnum");
581 /* Skip verify of fp0_regnum, invalid_p == 0 */
582 /* Skip verify of npc_regnum, invalid_p == 0 */
583 /* Skip verify of nnpc_regnum, invalid_p == 0 */
584 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
585 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
586 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
587 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
588 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
589 /* Skip verify of register_name, invalid_p == 0 */
590 if ((GDB_MULTI_ARCH >= 2)
591 && (gdbarch->register_size == -1))
592 fprintf_unfiltered (log, "\n\tregister_size");
593 if ((GDB_MULTI_ARCH >= 2)
594 && (gdbarch->register_bytes == -1))
595 fprintf_unfiltered (log, "\n\tregister_bytes");
596 if ((GDB_MULTI_ARCH >= 2)
597 && (gdbarch->register_byte == 0))
598 fprintf_unfiltered (log, "\n\tregister_byte");
599 if ((GDB_MULTI_ARCH >= 2)
600 && (gdbarch->register_raw_size == 0))
601 fprintf_unfiltered (log, "\n\tregister_raw_size");
602 if ((GDB_MULTI_ARCH >= 2)
603 && (gdbarch->max_register_raw_size == -1))
604 fprintf_unfiltered (log, "\n\tmax_register_raw_size");
605 if ((GDB_MULTI_ARCH >= 2)
606 && (gdbarch->register_virtual_size == 0))
607 fprintf_unfiltered (log, "\n\tregister_virtual_size");
608 if ((GDB_MULTI_ARCH >= 2)
609 && (gdbarch->max_register_virtual_size == -1))
610 fprintf_unfiltered (log, "\n\tmax_register_virtual_size");
611 if ((GDB_MULTI_ARCH >= 2)
612 && (gdbarch->register_virtual_type == 0))
613 fprintf_unfiltered (log, "\n\tregister_virtual_type");
614 /* Skip verify of do_registers_info, invalid_p == 0 */
615 /* Skip verify of register_sim_regno, invalid_p == 0 */
616 /* Skip verify of register_bytes_ok, has predicate */
617 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
618 /* Skip verify of cannot_store_register, invalid_p == 0 */
619 if ((GDB_MULTI_ARCH >= 1)
620 && (gdbarch->use_generic_dummy_frames == -1))
621 fprintf_unfiltered (log, "\n\tuse_generic_dummy_frames");
622 if ((GDB_MULTI_ARCH >= 2)
623 && (gdbarch->call_dummy_location == 0))
624 fprintf_unfiltered (log, "\n\tcall_dummy_location");
625 if ((GDB_MULTI_ARCH >= 2)
626 && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
627 fprintf_unfiltered (log, "\n\tcall_dummy_address");
628 if ((GDB_MULTI_ARCH >= 2)
629 && (gdbarch->call_dummy_start_offset == -1))
630 fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
631 if ((GDB_MULTI_ARCH >= 2)
632 && (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1))
633 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset");
634 if ((GDB_MULTI_ARCH >= 1)
635 && (gdbarch->call_dummy_breakpoint_offset_p == -1))
636 fprintf_unfiltered (log, "\n\tcall_dummy_breakpoint_offset_p");
637 if ((GDB_MULTI_ARCH >= 2)
638 && (gdbarch->call_dummy_length == -1))
639 fprintf_unfiltered (log, "\n\tcall_dummy_length");
640 if ((GDB_MULTI_ARCH >= 2)
641 && (gdbarch->pc_in_call_dummy == 0))
642 fprintf_unfiltered (log, "\n\tpc_in_call_dummy");
643 if ((GDB_MULTI_ARCH >= 1)
644 && (gdbarch->call_dummy_p == -1))
645 fprintf_unfiltered (log, "\n\tcall_dummy_p");
646 /* Skip verify of call_dummy_words, invalid_p == 0 */
647 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
648 if ((GDB_MULTI_ARCH >= 1)
649 && (gdbarch->call_dummy_stack_adjust_p == -1))
650 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
651 if ((GDB_MULTI_ARCH >= 2)
652 && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
653 fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
654 if ((GDB_MULTI_ARCH >= 2)
655 && (gdbarch->fix_call_dummy == 0))
656 fprintf_unfiltered (log, "\n\tfix_call_dummy");
657 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
658 /* Skip verify of init_frame_pc, invalid_p == 0 */
659 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
660 if ((GDB_MULTI_ARCH >= 1)
661 && (gdbarch->get_saved_register == 0))
662 fprintf_unfiltered (log, "\n\tget_saved_register");
663 /* Skip verify of register_convertible, invalid_p == 0 */
664 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
665 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
666 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
667 /* Skip verify of store_pseudo_register, invalid_p == 0 */
668 /* Skip verify of pointer_to_address, invalid_p == 0 */
669 /* Skip verify of address_to_pointer, invalid_p == 0 */
670 /* Skip verify of integer_to_address, has predicate */
671 /* Skip verify of return_value_on_stack, invalid_p == 0 */
672 if ((GDB_MULTI_ARCH >= 2)
673 && (gdbarch->extract_return_value == 0))
674 fprintf_unfiltered (log, "\n\textract_return_value");
675 if ((GDB_MULTI_ARCH >= 1)
676 && (gdbarch->push_arguments == 0))
677 fprintf_unfiltered (log, "\n\tpush_arguments");
678 if ((GDB_MULTI_ARCH >= 2)
679 && (gdbarch->push_dummy_frame == 0))
680 fprintf_unfiltered (log, "\n\tpush_dummy_frame");
681 /* Skip verify of push_return_address, has predicate */
682 if ((GDB_MULTI_ARCH >= 2)
683 && (gdbarch->pop_frame == 0))
684 fprintf_unfiltered (log, "\n\tpop_frame");
685 if ((GDB_MULTI_ARCH >= 2)
686 && (gdbarch->store_struct_return == 0))
687 fprintf_unfiltered (log, "\n\tstore_struct_return");
688 if ((GDB_MULTI_ARCH >= 2)
689 && (gdbarch->store_return_value == 0))
690 fprintf_unfiltered (log, "\n\tstore_return_value");
691 /* Skip verify of extract_struct_value_address, has predicate */
692 if ((GDB_MULTI_ARCH >= 2)
693 && (gdbarch->use_struct_convention == 0))
694 fprintf_unfiltered (log, "\n\tuse_struct_convention");
695 if ((GDB_MULTI_ARCH >= 2)
696 && (gdbarch->frame_init_saved_regs == 0))
697 fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
698 /* Skip verify of init_extra_frame_info, has predicate */
699 if ((GDB_MULTI_ARCH >= 2)
700 && (gdbarch->skip_prologue == 0))
701 fprintf_unfiltered (log, "\n\tskip_prologue");
702 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
703 if ((GDB_MULTI_ARCH >= 2)
704 && (gdbarch->inner_than == 0))
705 fprintf_unfiltered (log, "\n\tinner_than");
706 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
707 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
708 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
709 if ((GDB_MULTI_ARCH >= 2)
710 && (gdbarch->decr_pc_after_break == -1))
711 fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
712 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
713 if ((GDB_MULTI_ARCH >= 2)
714 && (gdbarch->function_start_offset == -1))
715 fprintf_unfiltered (log, "\n\tfunction_start_offset");
716 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
717 if ((GDB_MULTI_ARCH >= 2)
718 && (gdbarch->frame_args_skip == -1))
719 fprintf_unfiltered (log, "\n\tframe_args_skip");
720 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH >= 2)
722 && (gdbarch->frame_chain == 0))
723 fprintf_unfiltered (log, "\n\tframe_chain");
724 if ((GDB_MULTI_ARCH >= 1)
725 && (gdbarch->frame_chain_valid == 0))
726 fprintf_unfiltered (log, "\n\tframe_chain_valid");
727 if ((GDB_MULTI_ARCH >= 2)
728 && (gdbarch->frame_saved_pc == 0))
729 fprintf_unfiltered (log, "\n\tframe_saved_pc");
730 if ((GDB_MULTI_ARCH >= 2)
731 && (gdbarch->frame_args_address == 0))
732 fprintf_unfiltered (log, "\n\tframe_args_address");
733 if ((GDB_MULTI_ARCH >= 2)
734 && (gdbarch->frame_locals_address == 0))
735 fprintf_unfiltered (log, "\n\tframe_locals_address");
736 if ((GDB_MULTI_ARCH >= 2)
737 && (gdbarch->saved_pc_after_call == 0))
738 fprintf_unfiltered (log, "\n\tsaved_pc_after_call");
739 if ((GDB_MULTI_ARCH >= 2)
740 && (gdbarch->frame_num_args == 0))
741 fprintf_unfiltered (log, "\n\tframe_num_args");
742 /* Skip verify of stack_align, has predicate */
743 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
744 /* Skip verify of reg_struct_has_addr, has predicate */
745 /* Skip verify of save_dummy_frame_tos, has predicate */
746 if (gdbarch->float_format == 0)
747 gdbarch->float_format = default_float_format (gdbarch);
748 if (gdbarch->double_format == 0)
749 gdbarch->double_format = default_double_format (gdbarch);
750 if (gdbarch->long_double_format == 0)
751 gdbarch->long_double_format = &floatformat_unknown;
752 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
753 /* Skip verify of addr_bits_remove, invalid_p == 0 */
754 /* Skip verify of software_single_step, has predicate */
755 /* Skip verify of print_insn, invalid_p == 0 */
756 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
757 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
758 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
759 buf = ui_file_xstrdup (log, &dummy);
760 make_cleanup (xfree, buf);
761 if (strlen (buf) > 0)
762 internal_error (__FILE__, __LINE__,
763 "verify_gdbarch: the following are invalid ...%s",
765 do_cleanups (cleanups);
769 /* Print out the details of the current architecture. */
771 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
772 just happens to match the global variable ``current_gdbarch''. That
773 way macros refering to that variable get the local and not the global
774 version - ulgh. Once everything is parameterised with gdbarch, this
778 gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
780 fprintf_unfiltered (file,
781 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
784 fprintf_unfiltered (file,
785 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
786 (long) current_gdbarch->in_function_epilogue_p);
788 fprintf_unfiltered (file,
789 "gdbarch_dump: register_read = 0x%08lx\n",
790 (long) current_gdbarch->register_read);
792 fprintf_unfiltered (file,
793 "gdbarch_dump: register_write = 0x%08lx\n",
794 (long) current_gdbarch->register_write);
795 #ifdef ADDRESS_TO_POINTER
797 /* Macro might contain `[{}]' when not multi-arch */
798 fprintf_unfiltered (file,
799 "gdbarch_dump: %s # %s\n",
800 "ADDRESS_TO_POINTER(type, buf, addr)",
801 XSTRING (ADDRESS_TO_POINTER (type, buf, addr)));
804 fprintf_unfiltered (file,
805 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
806 (long) current_gdbarch->address_to_pointer
807 /*ADDRESS_TO_POINTER ()*/);
809 #ifdef ADDR_BITS_REMOVE
810 fprintf_unfiltered (file,
811 "gdbarch_dump: %s # %s\n",
812 "ADDR_BITS_REMOVE(addr)",
813 XSTRING (ADDR_BITS_REMOVE (addr)));
815 fprintf_unfiltered (file,
816 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
817 (long) current_gdbarch->addr_bits_remove
818 /*ADDR_BITS_REMOVE ()*/);
820 #ifdef BELIEVE_PCC_PROMOTION
821 fprintf_unfiltered (file,
822 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
823 XSTRING (BELIEVE_PCC_PROMOTION));
824 fprintf_unfiltered (file,
825 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
826 (long) BELIEVE_PCC_PROMOTION);
828 #ifdef BELIEVE_PCC_PROMOTION_TYPE
829 fprintf_unfiltered (file,
830 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
831 XSTRING (BELIEVE_PCC_PROMOTION_TYPE));
832 fprintf_unfiltered (file,
833 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
834 (long) BELIEVE_PCC_PROMOTION_TYPE);
836 #ifdef BREAKPOINT_FROM_PC
837 fprintf_unfiltered (file,
838 "gdbarch_dump: %s # %s\n",
839 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
840 XSTRING (BREAKPOINT_FROM_PC (pcptr, lenptr)));
842 fprintf_unfiltered (file,
843 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
844 (long) current_gdbarch->breakpoint_from_pc
845 /*BREAKPOINT_FROM_PC ()*/);
847 #ifdef CALL_DUMMY_ADDRESS
848 fprintf_unfiltered (file,
849 "gdbarch_dump: %s # %s\n",
850 "CALL_DUMMY_ADDRESS()",
851 XSTRING (CALL_DUMMY_ADDRESS ()));
853 fprintf_unfiltered (file,
854 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
855 (long) current_gdbarch->call_dummy_address
856 /*CALL_DUMMY_ADDRESS ()*/);
858 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
859 fprintf_unfiltered (file,
860 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
861 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET));
862 if (CALL_DUMMY_BREAKPOINT_OFFSET_P)
863 fprintf_unfiltered (file,
864 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
865 (long) CALL_DUMMY_BREAKPOINT_OFFSET);
867 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
868 fprintf_unfiltered (file,
869 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
870 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P));
871 fprintf_unfiltered (file,
872 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
873 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P);
875 #ifdef CALL_DUMMY_LENGTH
876 fprintf_unfiltered (file,
877 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
878 XSTRING (CALL_DUMMY_LENGTH));
879 if (CALL_DUMMY_LOCATION == BEFORE_TEXT_END || CALL_DUMMY_LOCATION == AFTER_TEXT_END)
880 fprintf_unfiltered (file,
881 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
882 (long) CALL_DUMMY_LENGTH);
884 #ifdef CALL_DUMMY_LOCATION
885 fprintf_unfiltered (file,
886 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
887 XSTRING (CALL_DUMMY_LOCATION));
888 fprintf_unfiltered (file,
889 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
890 (long) CALL_DUMMY_LOCATION);
893 fprintf_unfiltered (file,
894 "gdbarch_dump: CALL_DUMMY_P # %s\n",
895 XSTRING (CALL_DUMMY_P));
896 fprintf_unfiltered (file,
897 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
898 (long) CALL_DUMMY_P);
900 #ifdef CALL_DUMMY_STACK_ADJUST
901 fprintf_unfiltered (file,
902 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
903 XSTRING (CALL_DUMMY_STACK_ADJUST));
904 if (CALL_DUMMY_STACK_ADJUST_P)
905 fprintf_unfiltered (file,
906 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
907 (long) CALL_DUMMY_STACK_ADJUST);
909 #ifdef CALL_DUMMY_STACK_ADJUST_P
910 fprintf_unfiltered (file,
911 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
912 XSTRING (CALL_DUMMY_STACK_ADJUST_P));
913 fprintf_unfiltered (file,
914 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
915 (long) CALL_DUMMY_STACK_ADJUST_P);
917 #ifdef CALL_DUMMY_START_OFFSET
918 fprintf_unfiltered (file,
919 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
920 XSTRING (CALL_DUMMY_START_OFFSET));
921 fprintf_unfiltered (file,
922 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
923 (long) CALL_DUMMY_START_OFFSET);
925 #ifdef CALL_DUMMY_WORDS
926 fprintf_unfiltered (file,
927 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
928 XSTRING (CALL_DUMMY_WORDS));
929 fprintf_unfiltered (file,
930 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
931 (long) CALL_DUMMY_WORDS);
933 #ifdef CANNOT_FETCH_REGISTER
934 fprintf_unfiltered (file,
935 "gdbarch_dump: %s # %s\n",
936 "CANNOT_FETCH_REGISTER(regnum)",
937 XSTRING (CANNOT_FETCH_REGISTER (regnum)));
939 fprintf_unfiltered (file,
940 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
941 (long) current_gdbarch->cannot_fetch_register
942 /*CANNOT_FETCH_REGISTER ()*/);
944 #ifdef CANNOT_STORE_REGISTER
945 fprintf_unfiltered (file,
946 "gdbarch_dump: %s # %s\n",
947 "CANNOT_STORE_REGISTER(regnum)",
948 XSTRING (CANNOT_STORE_REGISTER (regnum)));
950 fprintf_unfiltered (file,
951 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
952 (long) current_gdbarch->cannot_store_register
953 /*CANNOT_STORE_REGISTER ()*/);
955 #ifdef COERCE_FLOAT_TO_DOUBLE
956 fprintf_unfiltered (file,
957 "gdbarch_dump: %s # %s\n",
958 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
959 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal, actual)));
961 fprintf_unfiltered (file,
962 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
963 (long) current_gdbarch->coerce_float_to_double
964 /*COERCE_FLOAT_TO_DOUBLE ()*/);
966 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
967 fprintf_unfiltered (file,
968 "gdbarch_dump: %s # %s\n",
969 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
970 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
972 fprintf_unfiltered (file,
973 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
974 (long) current_gdbarch->convert_from_func_ptr_addr
975 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
977 #ifdef DECR_PC_AFTER_BREAK
978 fprintf_unfiltered (file,
979 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
980 XSTRING (DECR_PC_AFTER_BREAK));
981 fprintf_unfiltered (file,
982 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
983 (long) DECR_PC_AFTER_BREAK);
985 #ifdef DO_REGISTERS_INFO
987 /* Macro might contain `[{}]' when not multi-arch */
988 fprintf_unfiltered (file,
989 "gdbarch_dump: %s # %s\n",
990 "DO_REGISTERS_INFO(reg_nr, fpregs)",
991 XSTRING (DO_REGISTERS_INFO (reg_nr, fpregs)));
994 fprintf_unfiltered (file,
995 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
996 (long) current_gdbarch->do_registers_info
997 /*DO_REGISTERS_INFO ()*/);
999 #ifdef DWARF2_REG_TO_REGNUM
1000 fprintf_unfiltered (file,
1001 "gdbarch_dump: %s # %s\n",
1002 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1003 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr)));
1005 fprintf_unfiltered (file,
1006 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1007 (long) current_gdbarch->dwarf2_reg_to_regnum
1008 /*DWARF2_REG_TO_REGNUM ()*/);
1010 #ifdef DWARF_REG_TO_REGNUM
1011 fprintf_unfiltered (file,
1012 "gdbarch_dump: %s # %s\n",
1013 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1014 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr)));
1016 fprintf_unfiltered (file,
1017 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1018 (long) current_gdbarch->dwarf_reg_to_regnum
1019 /*DWARF_REG_TO_REGNUM ()*/);
1021 #ifdef ECOFF_REG_TO_REGNUM
1022 fprintf_unfiltered (file,
1023 "gdbarch_dump: %s # %s\n",
1024 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1025 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr)));
1027 fprintf_unfiltered (file,
1028 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1029 (long) current_gdbarch->ecoff_reg_to_regnum
1030 /*ECOFF_REG_TO_REGNUM ()*/);
1032 #ifdef EXTRACT_RETURN_VALUE
1034 /* Macro might contain `[{}]' when not multi-arch */
1035 fprintf_unfiltered (file,
1036 "gdbarch_dump: %s # %s\n",
1037 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1038 XSTRING (EXTRACT_RETURN_VALUE (type, regbuf, valbuf)));
1041 fprintf_unfiltered (file,
1042 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1043 (long) current_gdbarch->extract_return_value
1044 /*EXTRACT_RETURN_VALUE ()*/);
1046 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1047 fprintf_unfiltered (file,
1048 "gdbarch_dump: %s # %s\n",
1049 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1050 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf)));
1052 fprintf_unfiltered (file,
1053 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1054 (long) current_gdbarch->extract_struct_value_address
1055 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1057 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1058 fprintf_unfiltered (file,
1059 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1060 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
1061 fprintf_unfiltered (file,
1062 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1063 (long) EXTRA_STACK_ALIGNMENT_NEEDED);
1065 #ifdef FETCH_PSEUDO_REGISTER
1067 /* Macro might contain `[{}]' when not multi-arch */
1068 fprintf_unfiltered (file,
1069 "gdbarch_dump: %s # %s\n",
1070 "FETCH_PSEUDO_REGISTER(regnum)",
1071 XSTRING (FETCH_PSEUDO_REGISTER (regnum)));
1074 fprintf_unfiltered (file,
1075 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1076 (long) current_gdbarch->fetch_pseudo_register
1077 /*FETCH_PSEUDO_REGISTER ()*/);
1079 #ifdef FIX_CALL_DUMMY
1081 /* Macro might contain `[{}]' when not multi-arch */
1082 fprintf_unfiltered (file,
1083 "gdbarch_dump: %s # %s\n",
1084 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1085 XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p)));
1088 fprintf_unfiltered (file,
1089 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1090 (long) current_gdbarch->fix_call_dummy
1091 /*FIX_CALL_DUMMY ()*/);
1094 fprintf_unfiltered (file,
1095 "gdbarch_dump: FP0_REGNUM # %s\n",
1096 XSTRING (FP0_REGNUM));
1097 fprintf_unfiltered (file,
1098 "gdbarch_dump: FP0_REGNUM = %ld\n",
1102 fprintf_unfiltered (file,
1103 "gdbarch_dump: FP_REGNUM # %s\n",
1104 XSTRING (FP_REGNUM));
1105 fprintf_unfiltered (file,
1106 "gdbarch_dump: FP_REGNUM = %ld\n",
1109 #ifdef FRAMELESS_FUNCTION_INVOCATION
1110 fprintf_unfiltered (file,
1111 "gdbarch_dump: %s # %s\n",
1112 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1113 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi)));
1115 fprintf_unfiltered (file,
1116 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1117 (long) current_gdbarch->frameless_function_invocation
1118 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1120 #ifdef FRAME_ARGS_ADDRESS
1121 fprintf_unfiltered (file,
1122 "gdbarch_dump: %s # %s\n",
1123 "FRAME_ARGS_ADDRESS(fi)",
1124 XSTRING (FRAME_ARGS_ADDRESS (fi)));
1126 fprintf_unfiltered (file,
1127 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1128 (long) current_gdbarch->frame_args_address
1129 /*FRAME_ARGS_ADDRESS ()*/);
1131 #ifdef FRAME_ARGS_SKIP
1132 fprintf_unfiltered (file,
1133 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1134 XSTRING (FRAME_ARGS_SKIP));
1135 fprintf_unfiltered (file,
1136 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1137 (long) FRAME_ARGS_SKIP);
1140 fprintf_unfiltered (file,
1141 "gdbarch_dump: %s # %s\n",
1142 "FRAME_CHAIN(frame)",
1143 XSTRING (FRAME_CHAIN (frame)));
1145 fprintf_unfiltered (file,
1146 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1147 (long) current_gdbarch->frame_chain
1148 /*FRAME_CHAIN ()*/);
1150 #ifdef FRAME_CHAIN_VALID
1151 fprintf_unfiltered (file,
1152 "gdbarch_dump: %s # %s\n",
1153 "FRAME_CHAIN_VALID(chain, thisframe)",
1154 XSTRING (FRAME_CHAIN_VALID (chain, thisframe)));
1156 fprintf_unfiltered (file,
1157 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1158 (long) current_gdbarch->frame_chain_valid
1159 /*FRAME_CHAIN_VALID ()*/);
1161 #ifdef FRAME_INIT_SAVED_REGS
1163 /* Macro might contain `[{}]' when not multi-arch */
1164 fprintf_unfiltered (file,
1165 "gdbarch_dump: %s # %s\n",
1166 "FRAME_INIT_SAVED_REGS(frame)",
1167 XSTRING (FRAME_INIT_SAVED_REGS (frame)));
1170 fprintf_unfiltered (file,
1171 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1172 (long) current_gdbarch->frame_init_saved_regs
1173 /*FRAME_INIT_SAVED_REGS ()*/);
1175 #ifdef FRAME_LOCALS_ADDRESS
1176 fprintf_unfiltered (file,
1177 "gdbarch_dump: %s # %s\n",
1178 "FRAME_LOCALS_ADDRESS(fi)",
1179 XSTRING (FRAME_LOCALS_ADDRESS (fi)));
1181 fprintf_unfiltered (file,
1182 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1183 (long) current_gdbarch->frame_locals_address
1184 /*FRAME_LOCALS_ADDRESS ()*/);
1186 #ifdef FRAME_NUM_ARGS
1187 fprintf_unfiltered (file,
1188 "gdbarch_dump: %s # %s\n",
1189 "FRAME_NUM_ARGS(frame)",
1190 XSTRING (FRAME_NUM_ARGS (frame)));
1192 fprintf_unfiltered (file,
1193 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1194 (long) current_gdbarch->frame_num_args
1195 /*FRAME_NUM_ARGS ()*/);
1197 #ifdef FRAME_SAVED_PC
1198 fprintf_unfiltered (file,
1199 "gdbarch_dump: %s # %s\n",
1200 "FRAME_SAVED_PC(fi)",
1201 XSTRING (FRAME_SAVED_PC (fi)));
1203 fprintf_unfiltered (file,
1204 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1205 (long) current_gdbarch->frame_saved_pc
1206 /*FRAME_SAVED_PC ()*/);
1208 #ifdef FUNCTION_START_OFFSET
1209 fprintf_unfiltered (file,
1210 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1211 XSTRING (FUNCTION_START_OFFSET));
1212 fprintf_unfiltered (file,
1213 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1214 (long) FUNCTION_START_OFFSET);
1216 #ifdef GET_SAVED_REGISTER
1218 /* Macro might contain `[{}]' when not multi-arch */
1219 fprintf_unfiltered (file,
1220 "gdbarch_dump: %s # %s\n",
1221 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1222 XSTRING (GET_SAVED_REGISTER (raw_buffer, optimized, addrp, frame, regnum, lval)));
1225 fprintf_unfiltered (file,
1226 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1227 (long) current_gdbarch->get_saved_register
1228 /*GET_SAVED_REGISTER ()*/);
1231 fprintf_unfiltered (file,
1232 "gdbarch_dump: IEEE_FLOAT # %s\n",
1233 XSTRING (IEEE_FLOAT));
1234 fprintf_unfiltered (file,
1235 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1238 #ifdef INIT_EXTRA_FRAME_INFO
1240 /* Macro might contain `[{}]' when not multi-arch */
1241 fprintf_unfiltered (file,
1242 "gdbarch_dump: %s # %s\n",
1243 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1244 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf, frame)));
1247 fprintf_unfiltered (file,
1248 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1249 (long) current_gdbarch->init_extra_frame_info
1250 /*INIT_EXTRA_FRAME_INFO ()*/);
1252 #ifdef INIT_FRAME_PC
1254 /* Macro might contain `[{}]' when not multi-arch */
1255 fprintf_unfiltered (file,
1256 "gdbarch_dump: %s # %s\n",
1257 "INIT_FRAME_PC(fromleaf, prev)",
1258 XSTRING (INIT_FRAME_PC (fromleaf, prev)));
1261 fprintf_unfiltered (file,
1262 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1263 (long) current_gdbarch->init_frame_pc
1264 /*INIT_FRAME_PC ()*/);
1266 #ifdef INIT_FRAME_PC_FIRST
1268 /* Macro might contain `[{}]' when not multi-arch */
1269 fprintf_unfiltered (file,
1270 "gdbarch_dump: %s # %s\n",
1271 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1272 XSTRING (INIT_FRAME_PC_FIRST (fromleaf, prev)));
1275 fprintf_unfiltered (file,
1276 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1277 (long) current_gdbarch->init_frame_pc_first
1278 /*INIT_FRAME_PC_FIRST ()*/);
1281 fprintf_unfiltered (file,
1282 "gdbarch_dump: %s # %s\n",
1283 "INNER_THAN(lhs, rhs)",
1284 XSTRING (INNER_THAN (lhs, rhs)));
1286 fprintf_unfiltered (file,
1287 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1288 (long) current_gdbarch->inner_than
1291 #ifdef INTEGER_TO_ADDRESS
1292 fprintf_unfiltered (file,
1293 "gdbarch_dump: %s # %s\n",
1294 "INTEGER_TO_ADDRESS(type, buf)",
1295 XSTRING (INTEGER_TO_ADDRESS (type, buf)));
1297 fprintf_unfiltered (file,
1298 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1299 (long) current_gdbarch->integer_to_address
1300 /*INTEGER_TO_ADDRESS ()*/);
1302 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1303 fprintf_unfiltered (file,
1304 "gdbarch_dump: %s # %s\n",
1305 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1306 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc, name)));
1308 fprintf_unfiltered (file,
1309 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1310 (long) current_gdbarch->in_solib_call_trampoline
1311 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1313 #ifdef MAX_REGISTER_RAW_SIZE
1314 fprintf_unfiltered (file,
1315 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1316 XSTRING (MAX_REGISTER_RAW_SIZE));
1317 fprintf_unfiltered (file,
1318 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1319 (long) MAX_REGISTER_RAW_SIZE);
1321 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1322 fprintf_unfiltered (file,
1323 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1324 XSTRING (MAX_REGISTER_VIRTUAL_SIZE));
1325 fprintf_unfiltered (file,
1326 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1327 (long) MAX_REGISTER_VIRTUAL_SIZE);
1329 #ifdef MEMORY_INSERT_BREAKPOINT
1330 fprintf_unfiltered (file,
1331 "gdbarch_dump: %s # %s\n",
1332 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1333 XSTRING (MEMORY_INSERT_BREAKPOINT (addr, contents_cache)));
1335 fprintf_unfiltered (file,
1336 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1337 (long) current_gdbarch->memory_insert_breakpoint
1338 /*MEMORY_INSERT_BREAKPOINT ()*/);
1340 #ifdef MEMORY_REMOVE_BREAKPOINT
1341 fprintf_unfiltered (file,
1342 "gdbarch_dump: %s # %s\n",
1343 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1344 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr, contents_cache)));
1346 fprintf_unfiltered (file,
1347 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1348 (long) current_gdbarch->memory_remove_breakpoint
1349 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1352 fprintf_unfiltered (file,
1353 "gdbarch_dump: NNPC_REGNUM # %s\n",
1354 XSTRING (NNPC_REGNUM));
1355 fprintf_unfiltered (file,
1356 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1357 (long) NNPC_REGNUM);
1360 fprintf_unfiltered (file,
1361 "gdbarch_dump: NPC_REGNUM # %s\n",
1362 XSTRING (NPC_REGNUM));
1363 fprintf_unfiltered (file,
1364 "gdbarch_dump: NPC_REGNUM = %ld\n",
1367 #ifdef NUM_PSEUDO_REGS
1368 fprintf_unfiltered (file,
1369 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1370 XSTRING (NUM_PSEUDO_REGS));
1371 fprintf_unfiltered (file,
1372 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1373 (long) NUM_PSEUDO_REGS);
1376 fprintf_unfiltered (file,
1377 "gdbarch_dump: NUM_REGS # %s\n",
1378 XSTRING (NUM_REGS));
1379 fprintf_unfiltered (file,
1380 "gdbarch_dump: NUM_REGS = %ld\n",
1383 #ifdef PARM_BOUNDARY
1384 fprintf_unfiltered (file,
1385 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1386 XSTRING (PARM_BOUNDARY));
1387 fprintf_unfiltered (file,
1388 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1389 (long) PARM_BOUNDARY);
1391 #ifdef PC_IN_CALL_DUMMY
1392 fprintf_unfiltered (file,
1393 "gdbarch_dump: %s # %s\n",
1394 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1395 XSTRING (PC_IN_CALL_DUMMY (pc, sp, frame_address)));
1397 fprintf_unfiltered (file,
1398 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1399 (long) current_gdbarch->pc_in_call_dummy
1400 /*PC_IN_CALL_DUMMY ()*/);
1403 fprintf_unfiltered (file,
1404 "gdbarch_dump: PC_REGNUM # %s\n",
1405 XSTRING (PC_REGNUM));
1406 fprintf_unfiltered (file,
1407 "gdbarch_dump: PC_REGNUM = %ld\n",
1410 #ifdef POINTER_TO_ADDRESS
1411 fprintf_unfiltered (file,
1412 "gdbarch_dump: %s # %s\n",
1413 "POINTER_TO_ADDRESS(type, buf)",
1414 XSTRING (POINTER_TO_ADDRESS (type, buf)));
1416 fprintf_unfiltered (file,
1417 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1418 (long) current_gdbarch->pointer_to_address
1419 /*POINTER_TO_ADDRESS ()*/);
1423 /* Macro might contain `[{}]' when not multi-arch */
1424 fprintf_unfiltered (file,
1425 "gdbarch_dump: %s # %s\n",
1427 XSTRING (POP_FRAME (-)));
1430 fprintf_unfiltered (file,
1431 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1432 (long) current_gdbarch->pop_frame
1435 #ifdef PREPARE_TO_PROCEED
1436 fprintf_unfiltered (file,
1437 "gdbarch_dump: %s # %s\n",
1438 "PREPARE_TO_PROCEED(select_it)",
1439 XSTRING (PREPARE_TO_PROCEED (select_it)));
1441 fprintf_unfiltered (file,
1442 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1443 (long) current_gdbarch->prepare_to_proceed
1444 /*PREPARE_TO_PROCEED ()*/);
1446 #ifdef PROLOGUE_FRAMELESS_P
1447 fprintf_unfiltered (file,
1448 "gdbarch_dump: %s # %s\n",
1449 "PROLOGUE_FRAMELESS_P(ip)",
1450 XSTRING (PROLOGUE_FRAMELESS_P (ip)));
1452 fprintf_unfiltered (file,
1453 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1454 (long) current_gdbarch->prologue_frameless_p
1455 /*PROLOGUE_FRAMELESS_P ()*/);
1457 #ifdef PUSH_ARGUMENTS
1458 fprintf_unfiltered (file,
1459 "gdbarch_dump: %s # %s\n",
1460 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1461 XSTRING (PUSH_ARGUMENTS (nargs, args, sp, struct_return, struct_addr)));
1463 fprintf_unfiltered (file,
1464 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1465 (long) current_gdbarch->push_arguments
1466 /*PUSH_ARGUMENTS ()*/);
1468 #ifdef PUSH_DUMMY_FRAME
1470 /* Macro might contain `[{}]' when not multi-arch */
1471 fprintf_unfiltered (file,
1472 "gdbarch_dump: %s # %s\n",
1473 "PUSH_DUMMY_FRAME(-)",
1474 XSTRING (PUSH_DUMMY_FRAME (-)));
1477 fprintf_unfiltered (file,
1478 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1479 (long) current_gdbarch->push_dummy_frame
1480 /*PUSH_DUMMY_FRAME ()*/);
1482 #ifdef PUSH_RETURN_ADDRESS
1483 fprintf_unfiltered (file,
1484 "gdbarch_dump: %s # %s\n",
1485 "PUSH_RETURN_ADDRESS(pc, sp)",
1486 XSTRING (PUSH_RETURN_ADDRESS (pc, sp)));
1488 fprintf_unfiltered (file,
1489 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1490 (long) current_gdbarch->push_return_address
1491 /*PUSH_RETURN_ADDRESS ()*/);
1493 #ifdef REGISTER_BYTE
1494 fprintf_unfiltered (file,
1495 "gdbarch_dump: %s # %s\n",
1496 "REGISTER_BYTE(reg_nr)",
1497 XSTRING (REGISTER_BYTE (reg_nr)));
1499 fprintf_unfiltered (file,
1500 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1501 (long) current_gdbarch->register_byte
1502 /*REGISTER_BYTE ()*/);
1504 #ifdef REGISTER_BYTES
1505 fprintf_unfiltered (file,
1506 "gdbarch_dump: REGISTER_BYTES # %s\n",
1507 XSTRING (REGISTER_BYTES));
1508 fprintf_unfiltered (file,
1509 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1510 (long) REGISTER_BYTES);
1512 #ifdef REGISTER_BYTES_OK
1513 fprintf_unfiltered (file,
1514 "gdbarch_dump: %s # %s\n",
1515 "REGISTER_BYTES_OK(nr_bytes)",
1516 XSTRING (REGISTER_BYTES_OK (nr_bytes)));
1518 fprintf_unfiltered (file,
1519 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1520 (long) current_gdbarch->register_bytes_ok
1521 /*REGISTER_BYTES_OK ()*/);
1523 #ifdef REGISTER_CONVERTIBLE
1524 fprintf_unfiltered (file,
1525 "gdbarch_dump: %s # %s\n",
1526 "REGISTER_CONVERTIBLE(nr)",
1527 XSTRING (REGISTER_CONVERTIBLE (nr)));
1529 fprintf_unfiltered (file,
1530 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1531 (long) current_gdbarch->register_convertible
1532 /*REGISTER_CONVERTIBLE ()*/);
1534 #ifdef REGISTER_CONVERT_TO_RAW
1536 /* Macro might contain `[{}]' when not multi-arch */
1537 fprintf_unfiltered (file,
1538 "gdbarch_dump: %s # %s\n",
1539 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1540 XSTRING (REGISTER_CONVERT_TO_RAW (type, regnum, from, to)));
1543 fprintf_unfiltered (file,
1544 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1545 (long) current_gdbarch->register_convert_to_raw
1546 /*REGISTER_CONVERT_TO_RAW ()*/);
1548 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1550 /* Macro might contain `[{}]' when not multi-arch */
1551 fprintf_unfiltered (file,
1552 "gdbarch_dump: %s # %s\n",
1553 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1554 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to)));
1557 fprintf_unfiltered (file,
1558 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1559 (long) current_gdbarch->register_convert_to_virtual
1560 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1562 #ifdef REGISTER_NAME
1563 fprintf_unfiltered (file,
1564 "gdbarch_dump: %s # %s\n",
1565 "REGISTER_NAME(regnr)",
1566 XSTRING (REGISTER_NAME (regnr)));
1568 fprintf_unfiltered (file,
1569 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1570 (long) current_gdbarch->register_name
1571 /*REGISTER_NAME ()*/);
1573 #ifdef REGISTER_RAW_SIZE
1574 fprintf_unfiltered (file,
1575 "gdbarch_dump: %s # %s\n",
1576 "REGISTER_RAW_SIZE(reg_nr)",
1577 XSTRING (REGISTER_RAW_SIZE (reg_nr)));
1579 fprintf_unfiltered (file,
1580 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1581 (long) current_gdbarch->register_raw_size
1582 /*REGISTER_RAW_SIZE ()*/);
1584 #ifdef REGISTER_SIM_REGNO
1585 fprintf_unfiltered (file,
1586 "gdbarch_dump: %s # %s\n",
1587 "REGISTER_SIM_REGNO(reg_nr)",
1588 XSTRING (REGISTER_SIM_REGNO (reg_nr)));
1590 fprintf_unfiltered (file,
1591 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1592 (long) current_gdbarch->register_sim_regno
1593 /*REGISTER_SIM_REGNO ()*/);
1595 #ifdef REGISTER_SIZE
1596 fprintf_unfiltered (file,
1597 "gdbarch_dump: REGISTER_SIZE # %s\n",
1598 XSTRING (REGISTER_SIZE));
1599 fprintf_unfiltered (file,
1600 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1601 (long) REGISTER_SIZE);
1603 #ifdef REGISTER_VIRTUAL_SIZE
1604 fprintf_unfiltered (file,
1605 "gdbarch_dump: %s # %s\n",
1606 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1607 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
1609 fprintf_unfiltered (file,
1610 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1611 (long) current_gdbarch->register_virtual_size
1612 /*REGISTER_VIRTUAL_SIZE ()*/);
1614 #ifdef REGISTER_VIRTUAL_TYPE
1615 fprintf_unfiltered (file,
1616 "gdbarch_dump: %s # %s\n",
1617 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1618 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
1620 fprintf_unfiltered (file,
1621 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1622 (long) current_gdbarch->register_virtual_type
1623 /*REGISTER_VIRTUAL_TYPE ()*/);
1625 #ifdef REG_STRUCT_HAS_ADDR
1626 fprintf_unfiltered (file,
1627 "gdbarch_dump: %s # %s\n",
1628 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1629 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p, type)));
1631 fprintf_unfiltered (file,
1632 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1633 (long) current_gdbarch->reg_struct_has_addr
1634 /*REG_STRUCT_HAS_ADDR ()*/);
1636 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1638 /* Macro might contain `[{}]' when not multi-arch */
1639 fprintf_unfiltered (file,
1640 "gdbarch_dump: %s # %s\n",
1641 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1642 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
1645 fprintf_unfiltered (file,
1646 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1647 (long) current_gdbarch->remote_translate_xfer_address
1648 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1650 #ifdef RETURN_VALUE_ON_STACK
1651 fprintf_unfiltered (file,
1652 "gdbarch_dump: %s # %s\n",
1653 "RETURN_VALUE_ON_STACK(type)",
1654 XSTRING (RETURN_VALUE_ON_STACK (type)));
1656 fprintf_unfiltered (file,
1657 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1658 (long) current_gdbarch->return_value_on_stack
1659 /*RETURN_VALUE_ON_STACK ()*/);
1661 #ifdef SAVED_PC_AFTER_CALL
1662 fprintf_unfiltered (file,
1663 "gdbarch_dump: %s # %s\n",
1664 "SAVED_PC_AFTER_CALL(frame)",
1665 XSTRING (SAVED_PC_AFTER_CALL (frame)));
1667 fprintf_unfiltered (file,
1668 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1669 (long) current_gdbarch->saved_pc_after_call
1670 /*SAVED_PC_AFTER_CALL ()*/);
1672 #ifdef SAVE_DUMMY_FRAME_TOS
1674 /* Macro might contain `[{}]' when not multi-arch */
1675 fprintf_unfiltered (file,
1676 "gdbarch_dump: %s # %s\n",
1677 "SAVE_DUMMY_FRAME_TOS(sp)",
1678 XSTRING (SAVE_DUMMY_FRAME_TOS (sp)));
1681 fprintf_unfiltered (file,
1682 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1683 (long) current_gdbarch->save_dummy_frame_tos
1684 /*SAVE_DUMMY_FRAME_TOS ()*/);
1686 #ifdef SDB_REG_TO_REGNUM
1687 fprintf_unfiltered (file,
1688 "gdbarch_dump: %s # %s\n",
1689 "SDB_REG_TO_REGNUM(sdb_regnr)",
1690 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr)));
1692 fprintf_unfiltered (file,
1693 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1694 (long) current_gdbarch->sdb_reg_to_regnum
1695 /*SDB_REG_TO_REGNUM ()*/);
1697 #ifdef SIZEOF_CALL_DUMMY_WORDS
1698 fprintf_unfiltered (file,
1699 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1700 XSTRING (SIZEOF_CALL_DUMMY_WORDS));
1701 fprintf_unfiltered (file,
1702 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1703 (long) SIZEOF_CALL_DUMMY_WORDS);
1705 #ifdef SKIP_PROLOGUE
1706 fprintf_unfiltered (file,
1707 "gdbarch_dump: %s # %s\n",
1708 "SKIP_PROLOGUE(ip)",
1709 XSTRING (SKIP_PROLOGUE (ip)));
1711 fprintf_unfiltered (file,
1712 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1713 (long) current_gdbarch->skip_prologue
1714 /*SKIP_PROLOGUE ()*/);
1716 #ifdef SKIP_TRAMPOLINE_CODE
1717 fprintf_unfiltered (file,
1718 "gdbarch_dump: %s # %s\n",
1719 "SKIP_TRAMPOLINE_CODE(pc)",
1720 XSTRING (SKIP_TRAMPOLINE_CODE (pc)));
1722 fprintf_unfiltered (file,
1723 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1724 (long) current_gdbarch->skip_trampoline_code
1725 /*SKIP_TRAMPOLINE_CODE ()*/);
1727 #ifdef SOFTWARE_SINGLE_STEP
1729 /* Macro might contain `[{}]' when not multi-arch */
1730 fprintf_unfiltered (file,
1731 "gdbarch_dump: %s # %s\n",
1732 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1733 XSTRING (SOFTWARE_SINGLE_STEP (sig, insert_breakpoints_p)));
1736 fprintf_unfiltered (file,
1737 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1738 (long) current_gdbarch->software_single_step
1739 /*SOFTWARE_SINGLE_STEP ()*/);
1742 fprintf_unfiltered (file,
1743 "gdbarch_dump: SP_REGNUM # %s\n",
1744 XSTRING (SP_REGNUM));
1745 fprintf_unfiltered (file,
1746 "gdbarch_dump: SP_REGNUM = %ld\n",
1749 #ifdef STAB_REG_TO_REGNUM
1750 fprintf_unfiltered (file,
1751 "gdbarch_dump: %s # %s\n",
1752 "STAB_REG_TO_REGNUM(stab_regnr)",
1753 XSTRING (STAB_REG_TO_REGNUM (stab_regnr)));
1755 fprintf_unfiltered (file,
1756 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1757 (long) current_gdbarch->stab_reg_to_regnum
1758 /*STAB_REG_TO_REGNUM ()*/);
1761 fprintf_unfiltered (file,
1762 "gdbarch_dump: %s # %s\n",
1764 XSTRING (STACK_ALIGN (sp)));
1766 fprintf_unfiltered (file,
1767 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1768 (long) current_gdbarch->stack_align
1769 /*STACK_ALIGN ()*/);
1771 #ifdef STORE_PSEUDO_REGISTER
1773 /* Macro might contain `[{}]' when not multi-arch */
1774 fprintf_unfiltered (file,
1775 "gdbarch_dump: %s # %s\n",
1776 "STORE_PSEUDO_REGISTER(regnum)",
1777 XSTRING (STORE_PSEUDO_REGISTER (regnum)));
1780 fprintf_unfiltered (file,
1781 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1782 (long) current_gdbarch->store_pseudo_register
1783 /*STORE_PSEUDO_REGISTER ()*/);
1785 #ifdef STORE_RETURN_VALUE
1787 /* Macro might contain `[{}]' when not multi-arch */
1788 fprintf_unfiltered (file,
1789 "gdbarch_dump: %s # %s\n",
1790 "STORE_RETURN_VALUE(type, valbuf)",
1791 XSTRING (STORE_RETURN_VALUE (type, valbuf)));
1794 fprintf_unfiltered (file,
1795 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1796 (long) current_gdbarch->store_return_value
1797 /*STORE_RETURN_VALUE ()*/);
1799 #ifdef STORE_STRUCT_RETURN
1801 /* Macro might contain `[{}]' when not multi-arch */
1802 fprintf_unfiltered (file,
1803 "gdbarch_dump: %s # %s\n",
1804 "STORE_STRUCT_RETURN(addr, sp)",
1805 XSTRING (STORE_STRUCT_RETURN (addr, sp)));
1808 fprintf_unfiltered (file,
1809 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1810 (long) current_gdbarch->store_struct_return
1811 /*STORE_STRUCT_RETURN ()*/);
1813 #ifdef TARGET_ADDR_BIT
1814 fprintf_unfiltered (file,
1815 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1816 XSTRING (TARGET_ADDR_BIT));
1817 fprintf_unfiltered (file,
1818 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1819 (long) TARGET_ADDR_BIT);
1821 #ifdef TARGET_ARCHITECTURE
1822 fprintf_unfiltered (file,
1823 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1824 XSTRING (TARGET_ARCHITECTURE));
1825 if (TARGET_ARCHITECTURE != NULL)
1826 fprintf_unfiltered (file,
1827 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1828 TARGET_ARCHITECTURE->printable_name);
1830 #ifdef TARGET_BFD_VMA_BIT
1831 fprintf_unfiltered (file,
1832 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1833 XSTRING (TARGET_BFD_VMA_BIT));
1834 fprintf_unfiltered (file,
1835 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1836 (long) TARGET_BFD_VMA_BIT);
1838 #ifdef TARGET_BYTE_ORDER
1839 fprintf_unfiltered (file,
1840 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1841 XSTRING (TARGET_BYTE_ORDER));
1842 fprintf_unfiltered (file,
1843 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1844 (long) TARGET_BYTE_ORDER);
1846 #ifdef TARGET_DOUBLE_BIT
1847 fprintf_unfiltered (file,
1848 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1849 XSTRING (TARGET_DOUBLE_BIT));
1850 fprintf_unfiltered (file,
1851 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1852 (long) TARGET_DOUBLE_BIT);
1854 #ifdef TARGET_DOUBLE_FORMAT
1855 fprintf_unfiltered (file,
1856 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1857 XSTRING (TARGET_DOUBLE_FORMAT));
1858 fprintf_unfiltered (file,
1859 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1860 (long) TARGET_DOUBLE_FORMAT);
1862 #ifdef TARGET_FLOAT_BIT
1863 fprintf_unfiltered (file,
1864 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1865 XSTRING (TARGET_FLOAT_BIT));
1866 fprintf_unfiltered (file,
1867 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1868 (long) TARGET_FLOAT_BIT);
1870 #ifdef TARGET_FLOAT_FORMAT
1871 fprintf_unfiltered (file,
1872 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1873 XSTRING (TARGET_FLOAT_FORMAT));
1874 fprintf_unfiltered (file,
1875 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1876 (long) TARGET_FLOAT_FORMAT);
1878 #ifdef TARGET_INT_BIT
1879 fprintf_unfiltered (file,
1880 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1881 XSTRING (TARGET_INT_BIT));
1882 fprintf_unfiltered (file,
1883 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1884 (long) TARGET_INT_BIT);
1886 #ifdef TARGET_LONG_BIT
1887 fprintf_unfiltered (file,
1888 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1889 XSTRING (TARGET_LONG_BIT));
1890 fprintf_unfiltered (file,
1891 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1892 (long) TARGET_LONG_BIT);
1894 #ifdef TARGET_LONG_DOUBLE_BIT
1895 fprintf_unfiltered (file,
1896 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1897 XSTRING (TARGET_LONG_DOUBLE_BIT));
1898 fprintf_unfiltered (file,
1899 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1900 (long) TARGET_LONG_DOUBLE_BIT);
1902 #ifdef TARGET_LONG_DOUBLE_FORMAT
1903 fprintf_unfiltered (file,
1904 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1905 XSTRING (TARGET_LONG_DOUBLE_FORMAT));
1906 fprintf_unfiltered (file,
1907 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1908 (long) TARGET_LONG_DOUBLE_FORMAT);
1910 #ifdef TARGET_LONG_LONG_BIT
1911 fprintf_unfiltered (file,
1912 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1913 XSTRING (TARGET_LONG_LONG_BIT));
1914 fprintf_unfiltered (file,
1915 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1916 (long) TARGET_LONG_LONG_BIT);
1918 #ifdef TARGET_PRINT_INSN
1919 fprintf_unfiltered (file,
1920 "gdbarch_dump: %s # %s\n",
1921 "TARGET_PRINT_INSN(vma, info)",
1922 XSTRING (TARGET_PRINT_INSN (vma, info)));
1924 fprintf_unfiltered (file,
1925 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1926 (long) current_gdbarch->print_insn
1927 /*TARGET_PRINT_INSN ()*/);
1929 #ifdef TARGET_PTR_BIT
1930 fprintf_unfiltered (file,
1931 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1932 XSTRING (TARGET_PTR_BIT));
1933 fprintf_unfiltered (file,
1934 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1935 (long) TARGET_PTR_BIT);
1937 #ifdef TARGET_READ_FP
1938 fprintf_unfiltered (file,
1939 "gdbarch_dump: %s # %s\n",
1941 XSTRING (TARGET_READ_FP ()));
1943 fprintf_unfiltered (file,
1944 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1945 (long) current_gdbarch->read_fp
1946 /*TARGET_READ_FP ()*/);
1948 #ifdef TARGET_READ_PC
1949 fprintf_unfiltered (file,
1950 "gdbarch_dump: %s # %s\n",
1951 "TARGET_READ_PC(ptid)",
1952 XSTRING (TARGET_READ_PC (ptid)));
1954 fprintf_unfiltered (file,
1955 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1956 (long) current_gdbarch->read_pc
1957 /*TARGET_READ_PC ()*/);
1959 #ifdef TARGET_READ_SP
1960 fprintf_unfiltered (file,
1961 "gdbarch_dump: %s # %s\n",
1963 XSTRING (TARGET_READ_SP ()));
1965 fprintf_unfiltered (file,
1966 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1967 (long) current_gdbarch->read_sp
1968 /*TARGET_READ_SP ()*/);
1970 #ifdef TARGET_SHORT_BIT
1971 fprintf_unfiltered (file,
1972 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1973 XSTRING (TARGET_SHORT_BIT));
1974 fprintf_unfiltered (file,
1975 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1976 (long) TARGET_SHORT_BIT);
1978 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1980 /* Macro might contain `[{}]' when not multi-arch */
1981 fprintf_unfiltered (file,
1982 "gdbarch_dump: %s # %s\n",
1983 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1984 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc, frame_regnum, frame_offset)));
1987 fprintf_unfiltered (file,
1988 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
1989 (long) current_gdbarch->virtual_frame_pointer
1990 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
1992 #ifdef TARGET_WRITE_FP
1994 /* Macro might contain `[{}]' when not multi-arch */
1995 fprintf_unfiltered (file,
1996 "gdbarch_dump: %s # %s\n",
1997 "TARGET_WRITE_FP(val)",
1998 XSTRING (TARGET_WRITE_FP (val)));
2001 fprintf_unfiltered (file,
2002 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2003 (long) current_gdbarch->write_fp
2004 /*TARGET_WRITE_FP ()*/);
2006 #ifdef TARGET_WRITE_PC
2008 /* Macro might contain `[{}]' when not multi-arch */
2009 fprintf_unfiltered (file,
2010 "gdbarch_dump: %s # %s\n",
2011 "TARGET_WRITE_PC(val, ptid)",
2012 XSTRING (TARGET_WRITE_PC (val, ptid)));
2015 fprintf_unfiltered (file,
2016 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2017 (long) current_gdbarch->write_pc
2018 /*TARGET_WRITE_PC ()*/);
2020 #ifdef TARGET_WRITE_SP
2022 /* Macro might contain `[{}]' when not multi-arch */
2023 fprintf_unfiltered (file,
2024 "gdbarch_dump: %s # %s\n",
2025 "TARGET_WRITE_SP(val)",
2026 XSTRING (TARGET_WRITE_SP (val)));
2029 fprintf_unfiltered (file,
2030 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2031 (long) current_gdbarch->write_sp
2032 /*TARGET_WRITE_SP ()*/);
2034 #ifdef USE_GENERIC_DUMMY_FRAMES
2035 fprintf_unfiltered (file,
2036 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2037 XSTRING (USE_GENERIC_DUMMY_FRAMES));
2038 fprintf_unfiltered (file,
2039 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2040 (long) USE_GENERIC_DUMMY_FRAMES);
2042 #ifdef USE_STRUCT_CONVENTION
2043 fprintf_unfiltered (file,
2044 "gdbarch_dump: %s # %s\n",
2045 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2046 XSTRING (USE_STRUCT_CONVENTION (gcc_p, value_type)));
2048 fprintf_unfiltered (file,
2049 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2050 (long) current_gdbarch->use_struct_convention
2051 /*USE_STRUCT_CONVENTION ()*/);
2053 if (current_gdbarch->dump_tdep != NULL)
2054 current_gdbarch->dump_tdep (current_gdbarch, file);
2057 struct gdbarch_tdep *
2058 gdbarch_tdep (struct gdbarch *gdbarch)
2060 if (gdbarch_debug >= 2)
2061 fprintf_unfiltered (gdb_stdlog, "gdbarch_tdep called\n");
2062 return gdbarch->tdep;
2066 const struct bfd_arch_info *
2067 gdbarch_bfd_arch_info (struct gdbarch *gdbarch)
2069 if (gdbarch_debug >= 2)
2070 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_arch_info called\n");
2071 return gdbarch->bfd_arch_info;
2075 gdbarch_byte_order (struct gdbarch *gdbarch)
2077 if (gdbarch_debug >= 2)
2078 fprintf_unfiltered (gdb_stdlog, "gdbarch_byte_order called\n");
2079 return gdbarch->byte_order;
2083 gdbarch_short_bit (struct gdbarch *gdbarch)
2085 /* Skip verify of short_bit, invalid_p == 0 */
2086 if (gdbarch_debug >= 2)
2087 fprintf_unfiltered (gdb_stdlog, "gdbarch_short_bit called\n");
2088 return gdbarch->short_bit;
2092 set_gdbarch_short_bit (struct gdbarch *gdbarch,
2095 gdbarch->short_bit = short_bit;
2099 gdbarch_int_bit (struct gdbarch *gdbarch)
2101 /* Skip verify of int_bit, invalid_p == 0 */
2102 if (gdbarch_debug >= 2)
2103 fprintf_unfiltered (gdb_stdlog, "gdbarch_int_bit called\n");
2104 return gdbarch->int_bit;
2108 set_gdbarch_int_bit (struct gdbarch *gdbarch,
2111 gdbarch->int_bit = int_bit;
2115 gdbarch_long_bit (struct gdbarch *gdbarch)
2117 /* Skip verify of long_bit, invalid_p == 0 */
2118 if (gdbarch_debug >= 2)
2119 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_bit called\n");
2120 return gdbarch->long_bit;
2124 set_gdbarch_long_bit (struct gdbarch *gdbarch,
2127 gdbarch->long_bit = long_bit;
2131 gdbarch_long_long_bit (struct gdbarch *gdbarch)
2133 /* Skip verify of long_long_bit, invalid_p == 0 */
2134 if (gdbarch_debug >= 2)
2135 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_long_bit called\n");
2136 return gdbarch->long_long_bit;
2140 set_gdbarch_long_long_bit (struct gdbarch *gdbarch,
2143 gdbarch->long_long_bit = long_long_bit;
2147 gdbarch_float_bit (struct gdbarch *gdbarch)
2149 /* Skip verify of float_bit, invalid_p == 0 */
2150 if (gdbarch_debug >= 2)
2151 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_bit called\n");
2152 return gdbarch->float_bit;
2156 set_gdbarch_float_bit (struct gdbarch *gdbarch,
2159 gdbarch->float_bit = float_bit;
2163 gdbarch_double_bit (struct gdbarch *gdbarch)
2165 /* Skip verify of double_bit, invalid_p == 0 */
2166 if (gdbarch_debug >= 2)
2167 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_bit called\n");
2168 return gdbarch->double_bit;
2172 set_gdbarch_double_bit (struct gdbarch *gdbarch,
2175 gdbarch->double_bit = double_bit;
2179 gdbarch_long_double_bit (struct gdbarch *gdbarch)
2181 /* Skip verify of long_double_bit, invalid_p == 0 */
2182 if (gdbarch_debug >= 2)
2183 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_bit called\n");
2184 return gdbarch->long_double_bit;
2188 set_gdbarch_long_double_bit (struct gdbarch *gdbarch,
2189 int long_double_bit)
2191 gdbarch->long_double_bit = long_double_bit;
2195 gdbarch_ptr_bit (struct gdbarch *gdbarch)
2197 /* Skip verify of ptr_bit, invalid_p == 0 */
2198 if (gdbarch_debug >= 2)
2199 fprintf_unfiltered (gdb_stdlog, "gdbarch_ptr_bit called\n");
2200 return gdbarch->ptr_bit;
2204 set_gdbarch_ptr_bit (struct gdbarch *gdbarch,
2207 gdbarch->ptr_bit = ptr_bit;
2211 gdbarch_addr_bit (struct gdbarch *gdbarch)
2213 if (gdbarch->addr_bit == 0)
2214 internal_error (__FILE__, __LINE__,
2215 "gdbarch: gdbarch_addr_bit invalid");
2216 if (gdbarch_debug >= 2)
2217 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bit called\n");
2218 return gdbarch->addr_bit;
2222 set_gdbarch_addr_bit (struct gdbarch *gdbarch,
2225 gdbarch->addr_bit = addr_bit;
2229 gdbarch_bfd_vma_bit (struct gdbarch *gdbarch)
2231 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2232 if (gdbarch_debug >= 2)
2233 fprintf_unfiltered (gdb_stdlog, "gdbarch_bfd_vma_bit called\n");
2234 return gdbarch->bfd_vma_bit;
2238 set_gdbarch_bfd_vma_bit (struct gdbarch *gdbarch,
2241 gdbarch->bfd_vma_bit = bfd_vma_bit;
2245 gdbarch_ieee_float (struct gdbarch *gdbarch)
2247 /* Skip verify of ieee_float, invalid_p == 0 */
2248 if (gdbarch_debug >= 2)
2249 fprintf_unfiltered (gdb_stdlog, "gdbarch_ieee_float called\n");
2250 return gdbarch->ieee_float;
2254 set_gdbarch_ieee_float (struct gdbarch *gdbarch,
2257 gdbarch->ieee_float = ieee_float;
2261 gdbarch_read_pc (struct gdbarch *gdbarch, ptid_t ptid)
2263 if (gdbarch->read_pc == 0)
2264 internal_error (__FILE__, __LINE__,
2265 "gdbarch: gdbarch_read_pc invalid");
2266 if (gdbarch_debug >= 2)
2267 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_pc called\n");
2268 return gdbarch->read_pc (ptid);
2272 set_gdbarch_read_pc (struct gdbarch *gdbarch,
2273 gdbarch_read_pc_ftype read_pc)
2275 gdbarch->read_pc = read_pc;
2279 gdbarch_write_pc (struct gdbarch *gdbarch, CORE_ADDR val, ptid_t ptid)
2281 if (gdbarch->write_pc == 0)
2282 internal_error (__FILE__, __LINE__,
2283 "gdbarch: gdbarch_write_pc invalid");
2284 if (gdbarch_debug >= 2)
2285 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_pc called\n");
2286 gdbarch->write_pc (val, ptid);
2290 set_gdbarch_write_pc (struct gdbarch *gdbarch,
2291 gdbarch_write_pc_ftype write_pc)
2293 gdbarch->write_pc = write_pc;
2297 gdbarch_read_fp (struct gdbarch *gdbarch)
2299 if (gdbarch->read_fp == 0)
2300 internal_error (__FILE__, __LINE__,
2301 "gdbarch: gdbarch_read_fp invalid");
2302 if (gdbarch_debug >= 2)
2303 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_fp called\n");
2304 return gdbarch->read_fp ();
2308 set_gdbarch_read_fp (struct gdbarch *gdbarch,
2309 gdbarch_read_fp_ftype read_fp)
2311 gdbarch->read_fp = read_fp;
2315 gdbarch_write_fp (struct gdbarch *gdbarch, CORE_ADDR val)
2317 if (gdbarch->write_fp == 0)
2318 internal_error (__FILE__, __LINE__,
2319 "gdbarch: gdbarch_write_fp invalid");
2320 if (gdbarch_debug >= 2)
2321 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_fp called\n");
2322 gdbarch->write_fp (val);
2326 set_gdbarch_write_fp (struct gdbarch *gdbarch,
2327 gdbarch_write_fp_ftype write_fp)
2329 gdbarch->write_fp = write_fp;
2333 gdbarch_read_sp (struct gdbarch *gdbarch)
2335 if (gdbarch->read_sp == 0)
2336 internal_error (__FILE__, __LINE__,
2337 "gdbarch: gdbarch_read_sp invalid");
2338 if (gdbarch_debug >= 2)
2339 fprintf_unfiltered (gdb_stdlog, "gdbarch_read_sp called\n");
2340 return gdbarch->read_sp ();
2344 set_gdbarch_read_sp (struct gdbarch *gdbarch,
2345 gdbarch_read_sp_ftype read_sp)
2347 gdbarch->read_sp = read_sp;
2351 gdbarch_write_sp (struct gdbarch *gdbarch, CORE_ADDR val)
2353 if (gdbarch->write_sp == 0)
2354 internal_error (__FILE__, __LINE__,
2355 "gdbarch: gdbarch_write_sp invalid");
2356 if (gdbarch_debug >= 2)
2357 fprintf_unfiltered (gdb_stdlog, "gdbarch_write_sp called\n");
2358 gdbarch->write_sp (val);
2362 set_gdbarch_write_sp (struct gdbarch *gdbarch,
2363 gdbarch_write_sp_ftype write_sp)
2365 gdbarch->write_sp = write_sp;
2369 gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch, CORE_ADDR pc, int *frame_regnum, LONGEST *frame_offset)
2371 if (gdbarch->virtual_frame_pointer == 0)
2372 internal_error (__FILE__, __LINE__,
2373 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2374 if (gdbarch_debug >= 2)
2375 fprintf_unfiltered (gdb_stdlog, "gdbarch_virtual_frame_pointer called\n");
2376 gdbarch->virtual_frame_pointer (pc, frame_regnum, frame_offset);
2380 set_gdbarch_virtual_frame_pointer (struct gdbarch *gdbarch,
2381 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer)
2383 gdbarch->virtual_frame_pointer = virtual_frame_pointer;
2387 gdbarch_register_read_p (struct gdbarch *gdbarch)
2389 return gdbarch->register_read != 0;
2393 gdbarch_register_read (struct gdbarch *gdbarch, int regnum, char *buf)
2395 if (gdbarch->register_read == 0)
2396 internal_error (__FILE__, __LINE__,
2397 "gdbarch: gdbarch_register_read invalid");
2398 if (gdbarch_debug >= 2)
2399 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_read called\n");
2400 gdbarch->register_read (gdbarch, regnum, buf);
2404 set_gdbarch_register_read (struct gdbarch *gdbarch,
2405 gdbarch_register_read_ftype register_read)
2407 gdbarch->register_read = register_read;
2411 gdbarch_register_write_p (struct gdbarch *gdbarch)
2413 return gdbarch->register_write != 0;
2417 gdbarch_register_write (struct gdbarch *gdbarch, int regnum, char *buf)
2419 if (gdbarch->register_write == 0)
2420 internal_error (__FILE__, __LINE__,
2421 "gdbarch: gdbarch_register_write invalid");
2422 if (gdbarch_debug >= 2)
2423 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_write called\n");
2424 gdbarch->register_write (gdbarch, regnum, buf);
2428 set_gdbarch_register_write (struct gdbarch *gdbarch,
2429 gdbarch_register_write_ftype register_write)
2431 gdbarch->register_write = register_write;
2435 gdbarch_num_regs (struct gdbarch *gdbarch)
2437 if (gdbarch->num_regs == -1)
2438 internal_error (__FILE__, __LINE__,
2439 "gdbarch: gdbarch_num_regs invalid");
2440 if (gdbarch_debug >= 2)
2441 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_regs called\n");
2442 return gdbarch->num_regs;
2446 set_gdbarch_num_regs (struct gdbarch *gdbarch,
2449 gdbarch->num_regs = num_regs;
2453 gdbarch_num_pseudo_regs (struct gdbarch *gdbarch)
2455 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2456 if (gdbarch_debug >= 2)
2457 fprintf_unfiltered (gdb_stdlog, "gdbarch_num_pseudo_regs called\n");
2458 return gdbarch->num_pseudo_regs;
2462 set_gdbarch_num_pseudo_regs (struct gdbarch *gdbarch,
2463 int num_pseudo_regs)
2465 gdbarch->num_pseudo_regs = num_pseudo_regs;
2469 gdbarch_sp_regnum (struct gdbarch *gdbarch)
2471 if (gdbarch->sp_regnum == -1)
2472 internal_error (__FILE__, __LINE__,
2473 "gdbarch: gdbarch_sp_regnum invalid");
2474 if (gdbarch_debug >= 2)
2475 fprintf_unfiltered (gdb_stdlog, "gdbarch_sp_regnum called\n");
2476 return gdbarch->sp_regnum;
2480 set_gdbarch_sp_regnum (struct gdbarch *gdbarch,
2483 gdbarch->sp_regnum = sp_regnum;
2487 gdbarch_fp_regnum (struct gdbarch *gdbarch)
2489 if (gdbarch->fp_regnum == -1)
2490 internal_error (__FILE__, __LINE__,
2491 "gdbarch: gdbarch_fp_regnum invalid");
2492 if (gdbarch_debug >= 2)
2493 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp_regnum called\n");
2494 return gdbarch->fp_regnum;
2498 set_gdbarch_fp_regnum (struct gdbarch *gdbarch,
2501 gdbarch->fp_regnum = fp_regnum;
2505 gdbarch_pc_regnum (struct gdbarch *gdbarch)
2507 if (gdbarch->pc_regnum == -1)
2508 internal_error (__FILE__, __LINE__,
2509 "gdbarch: gdbarch_pc_regnum invalid");
2510 if (gdbarch_debug >= 2)
2511 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_regnum called\n");
2512 return gdbarch->pc_regnum;
2516 set_gdbarch_pc_regnum (struct gdbarch *gdbarch,
2519 gdbarch->pc_regnum = pc_regnum;
2523 gdbarch_fp0_regnum (struct gdbarch *gdbarch)
2525 /* Skip verify of fp0_regnum, invalid_p == 0 */
2526 if (gdbarch_debug >= 2)
2527 fprintf_unfiltered (gdb_stdlog, "gdbarch_fp0_regnum called\n");
2528 return gdbarch->fp0_regnum;
2532 set_gdbarch_fp0_regnum (struct gdbarch *gdbarch,
2535 gdbarch->fp0_regnum = fp0_regnum;
2539 gdbarch_npc_regnum (struct gdbarch *gdbarch)
2541 /* Skip verify of npc_regnum, invalid_p == 0 */
2542 if (gdbarch_debug >= 2)
2543 fprintf_unfiltered (gdb_stdlog, "gdbarch_npc_regnum called\n");
2544 return gdbarch->npc_regnum;
2548 set_gdbarch_npc_regnum (struct gdbarch *gdbarch,
2551 gdbarch->npc_regnum = npc_regnum;
2555 gdbarch_nnpc_regnum (struct gdbarch *gdbarch)
2557 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2558 if (gdbarch_debug >= 2)
2559 fprintf_unfiltered (gdb_stdlog, "gdbarch_nnpc_regnum called\n");
2560 return gdbarch->nnpc_regnum;
2564 set_gdbarch_nnpc_regnum (struct gdbarch *gdbarch,
2567 gdbarch->nnpc_regnum = nnpc_regnum;
2571 gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch, int stab_regnr)
2573 if (gdbarch->stab_reg_to_regnum == 0)
2574 internal_error (__FILE__, __LINE__,
2575 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2576 if (gdbarch_debug >= 2)
2577 fprintf_unfiltered (gdb_stdlog, "gdbarch_stab_reg_to_regnum called\n");
2578 return gdbarch->stab_reg_to_regnum (stab_regnr);
2582 set_gdbarch_stab_reg_to_regnum (struct gdbarch *gdbarch,
2583 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum)
2585 gdbarch->stab_reg_to_regnum = stab_reg_to_regnum;
2589 gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch, int ecoff_regnr)
2591 if (gdbarch->ecoff_reg_to_regnum == 0)
2592 internal_error (__FILE__, __LINE__,
2593 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2594 if (gdbarch_debug >= 2)
2595 fprintf_unfiltered (gdb_stdlog, "gdbarch_ecoff_reg_to_regnum called\n");
2596 return gdbarch->ecoff_reg_to_regnum (ecoff_regnr);
2600 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch *gdbarch,
2601 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum)
2603 gdbarch->ecoff_reg_to_regnum = ecoff_reg_to_regnum;
2607 gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int dwarf_regnr)
2609 if (gdbarch->dwarf_reg_to_regnum == 0)
2610 internal_error (__FILE__, __LINE__,
2611 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2612 if (gdbarch_debug >= 2)
2613 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf_reg_to_regnum called\n");
2614 return gdbarch->dwarf_reg_to_regnum (dwarf_regnr);
2618 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch,
2619 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum)
2621 gdbarch->dwarf_reg_to_regnum = dwarf_reg_to_regnum;
2625 gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr)
2627 if (gdbarch->sdb_reg_to_regnum == 0)
2628 internal_error (__FILE__, __LINE__,
2629 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2630 if (gdbarch_debug >= 2)
2631 fprintf_unfiltered (gdb_stdlog, "gdbarch_sdb_reg_to_regnum called\n");
2632 return gdbarch->sdb_reg_to_regnum (sdb_regnr);
2636 set_gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch,
2637 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum)
2639 gdbarch->sdb_reg_to_regnum = sdb_reg_to_regnum;
2643 gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch, int dwarf2_regnr)
2645 if (gdbarch->dwarf2_reg_to_regnum == 0)
2646 internal_error (__FILE__, __LINE__,
2647 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2648 if (gdbarch_debug >= 2)
2649 fprintf_unfiltered (gdb_stdlog, "gdbarch_dwarf2_reg_to_regnum called\n");
2650 return gdbarch->dwarf2_reg_to_regnum (dwarf2_regnr);
2654 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch *gdbarch,
2655 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
2657 gdbarch->dwarf2_reg_to_regnum = dwarf2_reg_to_regnum;
2661 gdbarch_register_name (struct gdbarch *gdbarch, int regnr)
2663 if (gdbarch->register_name == 0)
2664 internal_error (__FILE__, __LINE__,
2665 "gdbarch: gdbarch_register_name invalid");
2666 if (gdbarch_debug >= 2)
2667 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_name called\n");
2668 return gdbarch->register_name (regnr);
2672 set_gdbarch_register_name (struct gdbarch *gdbarch,
2673 gdbarch_register_name_ftype register_name)
2675 gdbarch->register_name = register_name;
2679 gdbarch_register_size (struct gdbarch *gdbarch)
2681 if (gdbarch->register_size == -1)
2682 internal_error (__FILE__, __LINE__,
2683 "gdbarch: gdbarch_register_size invalid");
2684 if (gdbarch_debug >= 2)
2685 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n");
2686 return gdbarch->register_size;
2690 set_gdbarch_register_size (struct gdbarch *gdbarch,
2693 gdbarch->register_size = register_size;
2697 gdbarch_register_bytes (struct gdbarch *gdbarch)
2699 if (gdbarch->register_bytes == -1)
2700 internal_error (__FILE__, __LINE__,
2701 "gdbarch: gdbarch_register_bytes invalid");
2702 if (gdbarch_debug >= 2)
2703 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes called\n");
2704 return gdbarch->register_bytes;
2708 set_gdbarch_register_bytes (struct gdbarch *gdbarch,
2711 gdbarch->register_bytes = register_bytes;
2715 gdbarch_register_byte (struct gdbarch *gdbarch, int reg_nr)
2717 if (gdbarch->register_byte == 0)
2718 internal_error (__FILE__, __LINE__,
2719 "gdbarch: gdbarch_register_byte invalid");
2720 if (gdbarch_debug >= 2)
2721 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_byte called\n");
2722 return gdbarch->register_byte (reg_nr);
2726 set_gdbarch_register_byte (struct gdbarch *gdbarch,
2727 gdbarch_register_byte_ftype register_byte)
2729 gdbarch->register_byte = register_byte;
2733 gdbarch_register_raw_size (struct gdbarch *gdbarch, int reg_nr)
2735 if (gdbarch->register_raw_size == 0)
2736 internal_error (__FILE__, __LINE__,
2737 "gdbarch: gdbarch_register_raw_size invalid");
2738 if (gdbarch_debug >= 2)
2739 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_raw_size called\n");
2740 return gdbarch->register_raw_size (reg_nr);
2744 set_gdbarch_register_raw_size (struct gdbarch *gdbarch,
2745 gdbarch_register_raw_size_ftype register_raw_size)
2747 gdbarch->register_raw_size = register_raw_size;
2751 gdbarch_max_register_raw_size (struct gdbarch *gdbarch)
2753 if (gdbarch->max_register_raw_size == -1)
2754 internal_error (__FILE__, __LINE__,
2755 "gdbarch: gdbarch_max_register_raw_size invalid");
2756 if (gdbarch_debug >= 2)
2757 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_raw_size called\n");
2758 return gdbarch->max_register_raw_size;
2762 set_gdbarch_max_register_raw_size (struct gdbarch *gdbarch,
2763 int max_register_raw_size)
2765 gdbarch->max_register_raw_size = max_register_raw_size;
2769 gdbarch_register_virtual_size (struct gdbarch *gdbarch, int reg_nr)
2771 if (gdbarch->register_virtual_size == 0)
2772 internal_error (__FILE__, __LINE__,
2773 "gdbarch: gdbarch_register_virtual_size invalid");
2774 if (gdbarch_debug >= 2)
2775 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_size called\n");
2776 return gdbarch->register_virtual_size (reg_nr);
2780 set_gdbarch_register_virtual_size (struct gdbarch *gdbarch,
2781 gdbarch_register_virtual_size_ftype register_virtual_size)
2783 gdbarch->register_virtual_size = register_virtual_size;
2787 gdbarch_max_register_virtual_size (struct gdbarch *gdbarch)
2789 if (gdbarch->max_register_virtual_size == -1)
2790 internal_error (__FILE__, __LINE__,
2791 "gdbarch: gdbarch_max_register_virtual_size invalid");
2792 if (gdbarch_debug >= 2)
2793 fprintf_unfiltered (gdb_stdlog, "gdbarch_max_register_virtual_size called\n");
2794 return gdbarch->max_register_virtual_size;
2798 set_gdbarch_max_register_virtual_size (struct gdbarch *gdbarch,
2799 int max_register_virtual_size)
2801 gdbarch->max_register_virtual_size = max_register_virtual_size;
2805 gdbarch_register_virtual_type (struct gdbarch *gdbarch, int reg_nr)
2807 if (gdbarch->register_virtual_type == 0)
2808 internal_error (__FILE__, __LINE__,
2809 "gdbarch: gdbarch_register_virtual_type invalid");
2810 if (gdbarch_debug >= 2)
2811 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_virtual_type called\n");
2812 return gdbarch->register_virtual_type (reg_nr);
2816 set_gdbarch_register_virtual_type (struct gdbarch *gdbarch,
2817 gdbarch_register_virtual_type_ftype register_virtual_type)
2819 gdbarch->register_virtual_type = register_virtual_type;
2823 gdbarch_do_registers_info (struct gdbarch *gdbarch, int reg_nr, int fpregs)
2825 if (gdbarch->do_registers_info == 0)
2826 internal_error (__FILE__, __LINE__,
2827 "gdbarch: gdbarch_do_registers_info invalid");
2828 if (gdbarch_debug >= 2)
2829 fprintf_unfiltered (gdb_stdlog, "gdbarch_do_registers_info called\n");
2830 gdbarch->do_registers_info (reg_nr, fpregs);
2834 set_gdbarch_do_registers_info (struct gdbarch *gdbarch,
2835 gdbarch_do_registers_info_ftype do_registers_info)
2837 gdbarch->do_registers_info = do_registers_info;
2841 gdbarch_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
2843 if (gdbarch->register_sim_regno == 0)
2844 internal_error (__FILE__, __LINE__,
2845 "gdbarch: gdbarch_register_sim_regno invalid");
2846 if (gdbarch_debug >= 2)
2847 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_sim_regno called\n");
2848 return gdbarch->register_sim_regno (reg_nr);
2852 set_gdbarch_register_sim_regno (struct gdbarch *gdbarch,
2853 gdbarch_register_sim_regno_ftype register_sim_regno)
2855 gdbarch->register_sim_regno = register_sim_regno;
2859 gdbarch_register_bytes_ok_p (struct gdbarch *gdbarch)
2861 return gdbarch->register_bytes_ok != 0;
2865 gdbarch_register_bytes_ok (struct gdbarch *gdbarch, long nr_bytes)
2867 if (gdbarch->register_bytes_ok == 0)
2868 internal_error (__FILE__, __LINE__,
2869 "gdbarch: gdbarch_register_bytes_ok invalid");
2870 if (gdbarch_debug >= 2)
2871 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_bytes_ok called\n");
2872 return gdbarch->register_bytes_ok (nr_bytes);
2876 set_gdbarch_register_bytes_ok (struct gdbarch *gdbarch,
2877 gdbarch_register_bytes_ok_ftype register_bytes_ok)
2879 gdbarch->register_bytes_ok = register_bytes_ok;
2883 gdbarch_cannot_fetch_register (struct gdbarch *gdbarch, int regnum)
2885 if (gdbarch->cannot_fetch_register == 0)
2886 internal_error (__FILE__, __LINE__,
2887 "gdbarch: gdbarch_cannot_fetch_register invalid");
2888 if (gdbarch_debug >= 2)
2889 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_fetch_register called\n");
2890 return gdbarch->cannot_fetch_register (regnum);
2894 set_gdbarch_cannot_fetch_register (struct gdbarch *gdbarch,
2895 gdbarch_cannot_fetch_register_ftype cannot_fetch_register)
2897 gdbarch->cannot_fetch_register = cannot_fetch_register;
2901 gdbarch_cannot_store_register (struct gdbarch *gdbarch, int regnum)
2903 if (gdbarch->cannot_store_register == 0)
2904 internal_error (__FILE__, __LINE__,
2905 "gdbarch: gdbarch_cannot_store_register invalid");
2906 if (gdbarch_debug >= 2)
2907 fprintf_unfiltered (gdb_stdlog, "gdbarch_cannot_store_register called\n");
2908 return gdbarch->cannot_store_register (regnum);
2912 set_gdbarch_cannot_store_register (struct gdbarch *gdbarch,
2913 gdbarch_cannot_store_register_ftype cannot_store_register)
2915 gdbarch->cannot_store_register = cannot_store_register;
2919 gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch)
2921 if (gdbarch->use_generic_dummy_frames == -1)
2922 internal_error (__FILE__, __LINE__,
2923 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2924 if (gdbarch_debug >= 2)
2925 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_generic_dummy_frames called\n");
2926 return gdbarch->use_generic_dummy_frames;
2930 set_gdbarch_use_generic_dummy_frames (struct gdbarch *gdbarch,
2931 int use_generic_dummy_frames)
2933 gdbarch->use_generic_dummy_frames = use_generic_dummy_frames;
2937 gdbarch_call_dummy_location (struct gdbarch *gdbarch)
2939 if (gdbarch->call_dummy_location == 0)
2940 internal_error (__FILE__, __LINE__,
2941 "gdbarch: gdbarch_call_dummy_location invalid");
2942 if (gdbarch_debug >= 2)
2943 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_location called\n");
2944 return gdbarch->call_dummy_location;
2948 set_gdbarch_call_dummy_location (struct gdbarch *gdbarch,
2949 int call_dummy_location)
2951 gdbarch->call_dummy_location = call_dummy_location;
2955 gdbarch_call_dummy_address (struct gdbarch *gdbarch)
2957 if (gdbarch->call_dummy_address == 0)
2958 internal_error (__FILE__, __LINE__,
2959 "gdbarch: gdbarch_call_dummy_address invalid");
2960 if (gdbarch_debug >= 2)
2961 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n");
2962 return gdbarch->call_dummy_address ();
2966 set_gdbarch_call_dummy_address (struct gdbarch *gdbarch,
2967 gdbarch_call_dummy_address_ftype call_dummy_address)
2969 gdbarch->call_dummy_address = call_dummy_address;
2973 gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch)
2975 if (gdbarch->call_dummy_start_offset == -1)
2976 internal_error (__FILE__, __LINE__,
2977 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2978 if (gdbarch_debug >= 2)
2979 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n");
2980 return gdbarch->call_dummy_start_offset;
2984 set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch,
2985 CORE_ADDR call_dummy_start_offset)
2987 gdbarch->call_dummy_start_offset = call_dummy_start_offset;
2991 gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch)
2993 if (gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1)
2994 internal_error (__FILE__, __LINE__,
2995 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2996 if (gdbarch_debug >= 2)
2997 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n");
2998 return gdbarch->call_dummy_breakpoint_offset;
3002 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch,
3003 CORE_ADDR call_dummy_breakpoint_offset)
3005 gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset;
3009 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch)
3011 if (gdbarch->call_dummy_breakpoint_offset_p == -1)
3012 internal_error (__FILE__, __LINE__,
3013 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3014 if (gdbarch_debug >= 2)
3015 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3016 return gdbarch->call_dummy_breakpoint_offset_p;
3020 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch *gdbarch,
3021 int call_dummy_breakpoint_offset_p)
3023 gdbarch->call_dummy_breakpoint_offset_p = call_dummy_breakpoint_offset_p;
3027 gdbarch_call_dummy_length (struct gdbarch *gdbarch)
3029 if (gdbarch->call_dummy_length == -1)
3030 internal_error (__FILE__, __LINE__,
3031 "gdbarch: gdbarch_call_dummy_length invalid");
3032 if (gdbarch_debug >= 2)
3033 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n");
3034 return gdbarch->call_dummy_length;
3038 set_gdbarch_call_dummy_length (struct gdbarch *gdbarch,
3039 int call_dummy_length)
3041 gdbarch->call_dummy_length = call_dummy_length;
3045 gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address)
3047 if (gdbarch->pc_in_call_dummy == 0)
3048 internal_error (__FILE__, __LINE__,
3049 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3050 if (gdbarch_debug >= 2)
3051 fprintf_unfiltered (gdb_stdlog, "gdbarch_pc_in_call_dummy called\n");
3052 return gdbarch->pc_in_call_dummy (pc, sp, frame_address);
3056 set_gdbarch_pc_in_call_dummy (struct gdbarch *gdbarch,
3057 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy)
3059 gdbarch->pc_in_call_dummy = pc_in_call_dummy;
3063 gdbarch_call_dummy_p (struct gdbarch *gdbarch)
3065 if (gdbarch->call_dummy_p == -1)
3066 internal_error (__FILE__, __LINE__,
3067 "gdbarch: gdbarch_call_dummy_p invalid");
3068 if (gdbarch_debug >= 2)
3069 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
3070 return gdbarch->call_dummy_p;
3074 set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
3077 gdbarch->call_dummy_p = call_dummy_p;
3081 gdbarch_call_dummy_words (struct gdbarch *gdbarch)
3083 /* Skip verify of call_dummy_words, invalid_p == 0 */
3084 if (gdbarch_debug >= 2)
3085 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n");
3086 return gdbarch->call_dummy_words;
3090 set_gdbarch_call_dummy_words (struct gdbarch *gdbarch,
3091 LONGEST * call_dummy_words)
3093 gdbarch->call_dummy_words = call_dummy_words;
3097 gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch)
3099 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3100 if (gdbarch_debug >= 2)
3101 fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n");
3102 return gdbarch->sizeof_call_dummy_words;
3106 set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
3107 int sizeof_call_dummy_words)
3109 gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words;
3113 gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
3115 if (gdbarch->call_dummy_stack_adjust_p == -1)
3116 internal_error (__FILE__, __LINE__,
3117 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3118 if (gdbarch_debug >= 2)
3119 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
3120 return gdbarch->call_dummy_stack_adjust_p;
3124 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
3125 int call_dummy_stack_adjust_p)
3127 gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
3131 gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
3133 if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
3134 internal_error (__FILE__, __LINE__,
3135 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3136 if (gdbarch_debug >= 2)
3137 fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
3138 return gdbarch->call_dummy_stack_adjust;
3142 set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
3143 int call_dummy_stack_adjust)
3145 gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
3149 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)
3151 if (gdbarch->fix_call_dummy == 0)
3152 internal_error (__FILE__, __LINE__,
3153 "gdbarch: gdbarch_fix_call_dummy invalid");
3154 if (gdbarch_debug >= 2)
3155 fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n");
3156 gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p);
3160 set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch,
3161 gdbarch_fix_call_dummy_ftype fix_call_dummy)
3163 gdbarch->fix_call_dummy = fix_call_dummy;
3167 gdbarch_init_frame_pc_first (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3169 if (gdbarch->init_frame_pc_first == 0)
3170 internal_error (__FILE__, __LINE__,
3171 "gdbarch: gdbarch_init_frame_pc_first invalid");
3172 if (gdbarch_debug >= 2)
3173 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc_first called\n");
3174 gdbarch->init_frame_pc_first (fromleaf, prev);
3178 set_gdbarch_init_frame_pc_first (struct gdbarch *gdbarch,
3179 gdbarch_init_frame_pc_first_ftype init_frame_pc_first)
3181 gdbarch->init_frame_pc_first = init_frame_pc_first;
3185 gdbarch_init_frame_pc (struct gdbarch *gdbarch, int fromleaf, struct frame_info *prev)
3187 if (gdbarch->init_frame_pc == 0)
3188 internal_error (__FILE__, __LINE__,
3189 "gdbarch: gdbarch_init_frame_pc invalid");
3190 if (gdbarch_debug >= 2)
3191 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_frame_pc called\n");
3192 gdbarch->init_frame_pc (fromleaf, prev);
3196 set_gdbarch_init_frame_pc (struct gdbarch *gdbarch,
3197 gdbarch_init_frame_pc_ftype init_frame_pc)
3199 gdbarch->init_frame_pc = init_frame_pc;
3203 gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch)
3205 if (gdbarch_debug >= 2)
3206 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion called\n");
3207 return gdbarch->believe_pcc_promotion;
3211 set_gdbarch_believe_pcc_promotion (struct gdbarch *gdbarch,
3212 int believe_pcc_promotion)
3214 gdbarch->believe_pcc_promotion = believe_pcc_promotion;
3218 gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch)
3220 if (gdbarch_debug >= 2)
3221 fprintf_unfiltered (gdb_stdlog, "gdbarch_believe_pcc_promotion_type called\n");
3222 return gdbarch->believe_pcc_promotion_type;
3226 set_gdbarch_believe_pcc_promotion_type (struct gdbarch *gdbarch,
3227 int believe_pcc_promotion_type)
3229 gdbarch->believe_pcc_promotion_type = believe_pcc_promotion_type;
3233 gdbarch_coerce_float_to_double (struct gdbarch *gdbarch, struct type *formal, struct type *actual)
3235 if (gdbarch->coerce_float_to_double == 0)
3236 internal_error (__FILE__, __LINE__,
3237 "gdbarch: gdbarch_coerce_float_to_double invalid");
3238 if (gdbarch_debug >= 2)
3239 fprintf_unfiltered (gdb_stdlog, "gdbarch_coerce_float_to_double called\n");
3240 return gdbarch->coerce_float_to_double (formal, actual);
3244 set_gdbarch_coerce_float_to_double (struct gdbarch *gdbarch,
3245 gdbarch_coerce_float_to_double_ftype coerce_float_to_double)
3247 gdbarch->coerce_float_to_double = coerce_float_to_double;
3251 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)
3253 if (gdbarch->get_saved_register == 0)
3254 internal_error (__FILE__, __LINE__,
3255 "gdbarch: gdbarch_get_saved_register invalid");
3256 if (gdbarch_debug >= 2)
3257 fprintf_unfiltered (gdb_stdlog, "gdbarch_get_saved_register called\n");
3258 gdbarch->get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval);
3262 set_gdbarch_get_saved_register (struct gdbarch *gdbarch,
3263 gdbarch_get_saved_register_ftype get_saved_register)
3265 gdbarch->get_saved_register = get_saved_register;
3269 gdbarch_register_convertible (struct gdbarch *gdbarch, int nr)
3271 if (gdbarch->register_convertible == 0)
3272 internal_error (__FILE__, __LINE__,
3273 "gdbarch: gdbarch_register_convertible invalid");
3274 if (gdbarch_debug >= 2)
3275 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convertible called\n");
3276 return gdbarch->register_convertible (nr);
3280 set_gdbarch_register_convertible (struct gdbarch *gdbarch,
3281 gdbarch_register_convertible_ftype register_convertible)
3283 gdbarch->register_convertible = register_convertible;
3287 gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch, int regnum, struct type *type, char *from, char *to)
3289 if (gdbarch->register_convert_to_virtual == 0)
3290 internal_error (__FILE__, __LINE__,
3291 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3292 if (gdbarch_debug >= 2)
3293 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_virtual called\n");
3294 gdbarch->register_convert_to_virtual (regnum, type, from, to);
3298 set_gdbarch_register_convert_to_virtual (struct gdbarch *gdbarch,
3299 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual)
3301 gdbarch->register_convert_to_virtual = register_convert_to_virtual;
3305 gdbarch_register_convert_to_raw (struct gdbarch *gdbarch, struct type *type, int regnum, char *from, char *to)
3307 if (gdbarch->register_convert_to_raw == 0)
3308 internal_error (__FILE__, __LINE__,
3309 "gdbarch: gdbarch_register_convert_to_raw invalid");
3310 if (gdbarch_debug >= 2)
3311 fprintf_unfiltered (gdb_stdlog, "gdbarch_register_convert_to_raw called\n");
3312 gdbarch->register_convert_to_raw (type, regnum, from, to);
3316 set_gdbarch_register_convert_to_raw (struct gdbarch *gdbarch,
3317 gdbarch_register_convert_to_raw_ftype register_convert_to_raw)
3319 gdbarch->register_convert_to_raw = register_convert_to_raw;
3323 gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch, int regnum)
3325 if (gdbarch->fetch_pseudo_register == 0)
3326 internal_error (__FILE__, __LINE__,
3327 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3328 if (gdbarch_debug >= 2)
3329 fprintf_unfiltered (gdb_stdlog, "gdbarch_fetch_pseudo_register called\n");
3330 gdbarch->fetch_pseudo_register (regnum);
3334 set_gdbarch_fetch_pseudo_register (struct gdbarch *gdbarch,
3335 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register)
3337 gdbarch->fetch_pseudo_register = fetch_pseudo_register;
3341 gdbarch_store_pseudo_register (struct gdbarch *gdbarch, int regnum)
3343 if (gdbarch->store_pseudo_register == 0)
3344 internal_error (__FILE__, __LINE__,
3345 "gdbarch: gdbarch_store_pseudo_register invalid");
3346 if (gdbarch_debug >= 2)
3347 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_pseudo_register called\n");
3348 gdbarch->store_pseudo_register (regnum);
3352 set_gdbarch_store_pseudo_register (struct gdbarch *gdbarch,
3353 gdbarch_store_pseudo_register_ftype store_pseudo_register)
3355 gdbarch->store_pseudo_register = store_pseudo_register;
3359 gdbarch_pointer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3361 if (gdbarch->pointer_to_address == 0)
3362 internal_error (__FILE__, __LINE__,
3363 "gdbarch: gdbarch_pointer_to_address invalid");
3364 if (gdbarch_debug >= 2)
3365 fprintf_unfiltered (gdb_stdlog, "gdbarch_pointer_to_address called\n");
3366 return gdbarch->pointer_to_address (type, buf);
3370 set_gdbarch_pointer_to_address (struct gdbarch *gdbarch,
3371 gdbarch_pointer_to_address_ftype pointer_to_address)
3373 gdbarch->pointer_to_address = pointer_to_address;
3377 gdbarch_address_to_pointer (struct gdbarch *gdbarch, struct type *type, void *buf, CORE_ADDR addr)
3379 if (gdbarch->address_to_pointer == 0)
3380 internal_error (__FILE__, __LINE__,
3381 "gdbarch: gdbarch_address_to_pointer invalid");
3382 if (gdbarch_debug >= 2)
3383 fprintf_unfiltered (gdb_stdlog, "gdbarch_address_to_pointer called\n");
3384 gdbarch->address_to_pointer (type, buf, addr);
3388 set_gdbarch_address_to_pointer (struct gdbarch *gdbarch,
3389 gdbarch_address_to_pointer_ftype address_to_pointer)
3391 gdbarch->address_to_pointer = address_to_pointer;
3395 gdbarch_integer_to_address_p (struct gdbarch *gdbarch)
3397 return gdbarch->integer_to_address != 0;
3401 gdbarch_integer_to_address (struct gdbarch *gdbarch, struct type *type, void *buf)
3403 if (gdbarch->integer_to_address == 0)
3404 internal_error (__FILE__, __LINE__,
3405 "gdbarch: gdbarch_integer_to_address invalid");
3406 if (gdbarch_debug >= 2)
3407 fprintf_unfiltered (gdb_stdlog, "gdbarch_integer_to_address called\n");
3408 return gdbarch->integer_to_address (type, buf);
3412 set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
3413 gdbarch_integer_to_address_ftype integer_to_address)
3415 gdbarch->integer_to_address = integer_to_address;
3419 gdbarch_return_value_on_stack (struct gdbarch *gdbarch, struct type *type)
3421 if (gdbarch->return_value_on_stack == 0)
3422 internal_error (__FILE__, __LINE__,
3423 "gdbarch: gdbarch_return_value_on_stack invalid");
3424 if (gdbarch_debug >= 2)
3425 fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value_on_stack called\n");
3426 return gdbarch->return_value_on_stack (type);
3430 set_gdbarch_return_value_on_stack (struct gdbarch *gdbarch,
3431 gdbarch_return_value_on_stack_ftype return_value_on_stack)
3433 gdbarch->return_value_on_stack = return_value_on_stack;
3437 gdbarch_extract_return_value (struct gdbarch *gdbarch, struct type *type, char *regbuf, char *valbuf)
3439 if (gdbarch->extract_return_value == 0)
3440 internal_error (__FILE__, __LINE__,
3441 "gdbarch: gdbarch_extract_return_value invalid");
3442 if (gdbarch_debug >= 2)
3443 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_return_value called\n");
3444 gdbarch->extract_return_value (type, regbuf, valbuf);
3448 set_gdbarch_extract_return_value (struct gdbarch *gdbarch,
3449 gdbarch_extract_return_value_ftype extract_return_value)
3451 gdbarch->extract_return_value = extract_return_value;
3455 gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
3457 if (gdbarch->push_arguments == 0)
3458 internal_error (__FILE__, __LINE__,
3459 "gdbarch: gdbarch_push_arguments invalid");
3460 if (gdbarch_debug >= 2)
3461 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_arguments called\n");
3462 return gdbarch->push_arguments (nargs, args, sp, struct_return, struct_addr);
3466 set_gdbarch_push_arguments (struct gdbarch *gdbarch,
3467 gdbarch_push_arguments_ftype push_arguments)
3469 gdbarch->push_arguments = push_arguments;
3473 gdbarch_push_dummy_frame (struct gdbarch *gdbarch)
3475 if (gdbarch->push_dummy_frame == 0)
3476 internal_error (__FILE__, __LINE__,
3477 "gdbarch: gdbarch_push_dummy_frame invalid");
3478 if (gdbarch_debug >= 2)
3479 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_dummy_frame called\n");
3480 gdbarch->push_dummy_frame ();
3484 set_gdbarch_push_dummy_frame (struct gdbarch *gdbarch,
3485 gdbarch_push_dummy_frame_ftype push_dummy_frame)
3487 gdbarch->push_dummy_frame = push_dummy_frame;
3491 gdbarch_push_return_address_p (struct gdbarch *gdbarch)
3493 return gdbarch->push_return_address != 0;
3497 gdbarch_push_return_address (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR sp)
3499 if (gdbarch->push_return_address == 0)
3500 internal_error (__FILE__, __LINE__,
3501 "gdbarch: gdbarch_push_return_address invalid");
3502 if (gdbarch_debug >= 2)
3503 fprintf_unfiltered (gdb_stdlog, "gdbarch_push_return_address called\n");
3504 return gdbarch->push_return_address (pc, sp);
3508 set_gdbarch_push_return_address (struct gdbarch *gdbarch,
3509 gdbarch_push_return_address_ftype push_return_address)
3511 gdbarch->push_return_address = push_return_address;
3515 gdbarch_pop_frame (struct gdbarch *gdbarch)
3517 if (gdbarch->pop_frame == 0)
3518 internal_error (__FILE__, __LINE__,
3519 "gdbarch: gdbarch_pop_frame invalid");
3520 if (gdbarch_debug >= 2)
3521 fprintf_unfiltered (gdb_stdlog, "gdbarch_pop_frame called\n");
3522 gdbarch->pop_frame ();
3526 set_gdbarch_pop_frame (struct gdbarch *gdbarch,
3527 gdbarch_pop_frame_ftype pop_frame)
3529 gdbarch->pop_frame = pop_frame;
3533 gdbarch_store_struct_return (struct gdbarch *gdbarch, CORE_ADDR addr, CORE_ADDR sp)
3535 if (gdbarch->store_struct_return == 0)
3536 internal_error (__FILE__, __LINE__,
3537 "gdbarch: gdbarch_store_struct_return invalid");
3538 if (gdbarch_debug >= 2)
3539 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_struct_return called\n");
3540 gdbarch->store_struct_return (addr, sp);
3544 set_gdbarch_store_struct_return (struct gdbarch *gdbarch,
3545 gdbarch_store_struct_return_ftype store_struct_return)
3547 gdbarch->store_struct_return = store_struct_return;
3551 gdbarch_store_return_value (struct gdbarch *gdbarch, struct type *type, char *valbuf)
3553 if (gdbarch->store_return_value == 0)
3554 internal_error (__FILE__, __LINE__,
3555 "gdbarch: gdbarch_store_return_value invalid");
3556 if (gdbarch_debug >= 2)
3557 fprintf_unfiltered (gdb_stdlog, "gdbarch_store_return_value called\n");
3558 gdbarch->store_return_value (type, valbuf);
3562 set_gdbarch_store_return_value (struct gdbarch *gdbarch,
3563 gdbarch_store_return_value_ftype store_return_value)
3565 gdbarch->store_return_value = store_return_value;
3569 gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
3571 return gdbarch->extract_struct_value_address != 0;
3575 gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, char *regbuf)
3577 if (gdbarch->extract_struct_value_address == 0)
3578 internal_error (__FILE__, __LINE__,
3579 "gdbarch: gdbarch_extract_struct_value_address invalid");
3580 if (gdbarch_debug >= 2)
3581 fprintf_unfiltered (gdb_stdlog, "gdbarch_extract_struct_value_address called\n");
3582 return gdbarch->extract_struct_value_address (regbuf);
3586 set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch,
3587 gdbarch_extract_struct_value_address_ftype extract_struct_value_address)
3589 gdbarch->extract_struct_value_address = extract_struct_value_address;
3593 gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
3595 if (gdbarch->use_struct_convention == 0)
3596 internal_error (__FILE__, __LINE__,
3597 "gdbarch: gdbarch_use_struct_convention invalid");
3598 if (gdbarch_debug >= 2)
3599 fprintf_unfiltered (gdb_stdlog, "gdbarch_use_struct_convention called\n");
3600 return gdbarch->use_struct_convention (gcc_p, value_type);
3604 set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
3605 gdbarch_use_struct_convention_ftype use_struct_convention)
3607 gdbarch->use_struct_convention = use_struct_convention;
3611 gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch, struct frame_info *frame)
3613 if (gdbarch->frame_init_saved_regs == 0)
3614 internal_error (__FILE__, __LINE__,
3615 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3616 if (gdbarch_debug >= 2)
3617 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_init_saved_regs called\n");
3618 gdbarch->frame_init_saved_regs (frame);
3622 set_gdbarch_frame_init_saved_regs (struct gdbarch *gdbarch,
3623 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs)
3625 gdbarch->frame_init_saved_regs = frame_init_saved_regs;
3629 gdbarch_init_extra_frame_info_p (struct gdbarch *gdbarch)
3631 return gdbarch->init_extra_frame_info != 0;
3635 gdbarch_init_extra_frame_info (struct gdbarch *gdbarch, int fromleaf, struct frame_info *frame)
3637 if (gdbarch->init_extra_frame_info == 0)
3638 internal_error (__FILE__, __LINE__,
3639 "gdbarch: gdbarch_init_extra_frame_info invalid");
3640 if (gdbarch_debug >= 2)
3641 fprintf_unfiltered (gdb_stdlog, "gdbarch_init_extra_frame_info called\n");
3642 gdbarch->init_extra_frame_info (fromleaf, frame);
3646 set_gdbarch_init_extra_frame_info (struct gdbarch *gdbarch,
3647 gdbarch_init_extra_frame_info_ftype init_extra_frame_info)
3649 gdbarch->init_extra_frame_info = init_extra_frame_info;
3653 gdbarch_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
3655 if (gdbarch->skip_prologue == 0)
3656 internal_error (__FILE__, __LINE__,
3657 "gdbarch: gdbarch_skip_prologue invalid");
3658 if (gdbarch_debug >= 2)
3659 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_prologue called\n");
3660 return gdbarch->skip_prologue (ip);
3664 set_gdbarch_skip_prologue (struct gdbarch *gdbarch,
3665 gdbarch_skip_prologue_ftype skip_prologue)
3667 gdbarch->skip_prologue = skip_prologue;
3671 gdbarch_prologue_frameless_p (struct gdbarch *gdbarch, CORE_ADDR ip)
3673 if (gdbarch->prologue_frameless_p == 0)
3674 internal_error (__FILE__, __LINE__,
3675 "gdbarch: gdbarch_prologue_frameless_p invalid");
3676 if (gdbarch_debug >= 2)
3677 fprintf_unfiltered (gdb_stdlog, "gdbarch_prologue_frameless_p called\n");
3678 return gdbarch->prologue_frameless_p (ip);
3682 set_gdbarch_prologue_frameless_p (struct gdbarch *gdbarch,
3683 gdbarch_prologue_frameless_p_ftype prologue_frameless_p)
3685 gdbarch->prologue_frameless_p = prologue_frameless_p;
3689 gdbarch_inner_than (struct gdbarch *gdbarch, CORE_ADDR lhs, CORE_ADDR rhs)
3691 if (gdbarch->inner_than == 0)
3692 internal_error (__FILE__, __LINE__,
3693 "gdbarch: gdbarch_inner_than invalid");
3694 if (gdbarch_debug >= 2)
3695 fprintf_unfiltered (gdb_stdlog, "gdbarch_inner_than called\n");
3696 return gdbarch->inner_than (lhs, rhs);
3700 set_gdbarch_inner_than (struct gdbarch *gdbarch,
3701 gdbarch_inner_than_ftype inner_than)
3703 gdbarch->inner_than = inner_than;
3707 gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
3709 if (gdbarch->breakpoint_from_pc == 0)
3710 internal_error (__FILE__, __LINE__,
3711 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3712 if (gdbarch_debug >= 2)
3713 fprintf_unfiltered (gdb_stdlog, "gdbarch_breakpoint_from_pc called\n");
3714 return gdbarch->breakpoint_from_pc (pcptr, lenptr);
3718 set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
3719 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc)
3721 gdbarch->breakpoint_from_pc = breakpoint_from_pc;
3725 gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3727 if (gdbarch->memory_insert_breakpoint == 0)
3728 internal_error (__FILE__, __LINE__,
3729 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3730 if (gdbarch_debug >= 2)
3731 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_insert_breakpoint called\n");
3732 return gdbarch->memory_insert_breakpoint (addr, contents_cache);
3736 set_gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch,
3737 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint)
3739 gdbarch->memory_insert_breakpoint = memory_insert_breakpoint;
3743 gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
3745 if (gdbarch->memory_remove_breakpoint == 0)
3746 internal_error (__FILE__, __LINE__,
3747 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3748 if (gdbarch_debug >= 2)
3749 fprintf_unfiltered (gdb_stdlog, "gdbarch_memory_remove_breakpoint called\n");
3750 return gdbarch->memory_remove_breakpoint (addr, contents_cache);
3754 set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch,
3755 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint)
3757 gdbarch->memory_remove_breakpoint = memory_remove_breakpoint;
3761 gdbarch_decr_pc_after_break (struct gdbarch *gdbarch)
3763 if (gdbarch->decr_pc_after_break == -1)
3764 internal_error (__FILE__, __LINE__,
3765 "gdbarch: gdbarch_decr_pc_after_break invalid");
3766 if (gdbarch_debug >= 2)
3767 fprintf_unfiltered (gdb_stdlog, "gdbarch_decr_pc_after_break called\n");
3768 return gdbarch->decr_pc_after_break;
3772 set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch,
3773 CORE_ADDR decr_pc_after_break)
3775 gdbarch->decr_pc_after_break = decr_pc_after_break;
3779 gdbarch_prepare_to_proceed (struct gdbarch *gdbarch, int select_it)
3781 if (gdbarch->prepare_to_proceed == 0)
3782 internal_error (__FILE__, __LINE__,
3783 "gdbarch: gdbarch_prepare_to_proceed invalid");
3784 if (gdbarch_debug >= 2)
3785 fprintf_unfiltered (gdb_stdlog, "gdbarch_prepare_to_proceed called\n");
3786 return gdbarch->prepare_to_proceed (select_it);
3790 set_gdbarch_prepare_to_proceed (struct gdbarch *gdbarch,
3791 gdbarch_prepare_to_proceed_ftype prepare_to_proceed)
3793 gdbarch->prepare_to_proceed = prepare_to_proceed;
3797 gdbarch_function_start_offset (struct gdbarch *gdbarch)
3799 if (gdbarch->function_start_offset == -1)
3800 internal_error (__FILE__, __LINE__,
3801 "gdbarch: gdbarch_function_start_offset invalid");
3802 if (gdbarch_debug >= 2)
3803 fprintf_unfiltered (gdb_stdlog, "gdbarch_function_start_offset called\n");
3804 return gdbarch->function_start_offset;
3808 set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
3809 CORE_ADDR function_start_offset)
3811 gdbarch->function_start_offset = function_start_offset;
3815 gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
3817 if (gdbarch->remote_translate_xfer_address == 0)
3818 internal_error (__FILE__, __LINE__,
3819 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3820 if (gdbarch_debug >= 2)
3821 fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
3822 gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
3826 set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch,
3827 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address)
3829 gdbarch->remote_translate_xfer_address = remote_translate_xfer_address;
3833 gdbarch_frame_args_skip (struct gdbarch *gdbarch)
3835 if (gdbarch->frame_args_skip == -1)
3836 internal_error (__FILE__, __LINE__,
3837 "gdbarch: gdbarch_frame_args_skip invalid");
3838 if (gdbarch_debug >= 2)
3839 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_skip called\n");
3840 return gdbarch->frame_args_skip;
3844 set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
3845 CORE_ADDR frame_args_skip)
3847 gdbarch->frame_args_skip = frame_args_skip;
3851 gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
3853 if (gdbarch->frameless_function_invocation == 0)
3854 internal_error (__FILE__, __LINE__,
3855 "gdbarch: gdbarch_frameless_function_invocation invalid");
3856 if (gdbarch_debug >= 2)
3857 fprintf_unfiltered (gdb_stdlog, "gdbarch_frameless_function_invocation called\n");
3858 return gdbarch->frameless_function_invocation (fi);
3862 set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch,
3863 gdbarch_frameless_function_invocation_ftype frameless_function_invocation)
3865 gdbarch->frameless_function_invocation = frameless_function_invocation;
3869 gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame)
3871 if (gdbarch->frame_chain == 0)
3872 internal_error (__FILE__, __LINE__,
3873 "gdbarch: gdbarch_frame_chain invalid");
3874 if (gdbarch_debug >= 2)
3875 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain called\n");
3876 return gdbarch->frame_chain (frame);
3880 set_gdbarch_frame_chain (struct gdbarch *gdbarch,
3881 gdbarch_frame_chain_ftype frame_chain)
3883 gdbarch->frame_chain = frame_chain;
3887 gdbarch_frame_chain_valid (struct gdbarch *gdbarch, CORE_ADDR chain, struct frame_info *thisframe)
3889 if (gdbarch->frame_chain_valid == 0)
3890 internal_error (__FILE__, __LINE__,
3891 "gdbarch: gdbarch_frame_chain_valid invalid");
3892 if (gdbarch_debug >= 2)
3893 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_chain_valid called\n");
3894 return gdbarch->frame_chain_valid (chain, thisframe);
3898 set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch,
3899 gdbarch_frame_chain_valid_ftype frame_chain_valid)
3901 gdbarch->frame_chain_valid = frame_chain_valid;
3905 gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi)
3907 if (gdbarch->frame_saved_pc == 0)
3908 internal_error (__FILE__, __LINE__,
3909 "gdbarch: gdbarch_frame_saved_pc invalid");
3910 if (gdbarch_debug >= 2)
3911 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_saved_pc called\n");
3912 return gdbarch->frame_saved_pc (fi);
3916 set_gdbarch_frame_saved_pc (struct gdbarch *gdbarch,
3917 gdbarch_frame_saved_pc_ftype frame_saved_pc)
3919 gdbarch->frame_saved_pc = frame_saved_pc;
3923 gdbarch_frame_args_address (struct gdbarch *gdbarch, struct frame_info *fi)
3925 if (gdbarch->frame_args_address == 0)
3926 internal_error (__FILE__, __LINE__,
3927 "gdbarch: gdbarch_frame_args_address invalid");
3928 if (gdbarch_debug >= 2)
3929 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_args_address called\n");
3930 return gdbarch->frame_args_address (fi);
3934 set_gdbarch_frame_args_address (struct gdbarch *gdbarch,
3935 gdbarch_frame_args_address_ftype frame_args_address)
3937 gdbarch->frame_args_address = frame_args_address;
3941 gdbarch_frame_locals_address (struct gdbarch *gdbarch, struct frame_info *fi)
3943 if (gdbarch->frame_locals_address == 0)
3944 internal_error (__FILE__, __LINE__,
3945 "gdbarch: gdbarch_frame_locals_address invalid");
3946 if (gdbarch_debug >= 2)
3947 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_locals_address called\n");
3948 return gdbarch->frame_locals_address (fi);
3952 set_gdbarch_frame_locals_address (struct gdbarch *gdbarch,
3953 gdbarch_frame_locals_address_ftype frame_locals_address)
3955 gdbarch->frame_locals_address = frame_locals_address;
3959 gdbarch_saved_pc_after_call (struct gdbarch *gdbarch, struct frame_info *frame)
3961 if (gdbarch->saved_pc_after_call == 0)
3962 internal_error (__FILE__, __LINE__,
3963 "gdbarch: gdbarch_saved_pc_after_call invalid");
3964 if (gdbarch_debug >= 2)
3965 fprintf_unfiltered (gdb_stdlog, "gdbarch_saved_pc_after_call called\n");
3966 return gdbarch->saved_pc_after_call (frame);
3970 set_gdbarch_saved_pc_after_call (struct gdbarch *gdbarch,
3971 gdbarch_saved_pc_after_call_ftype saved_pc_after_call)
3973 gdbarch->saved_pc_after_call = saved_pc_after_call;
3977 gdbarch_frame_num_args (struct gdbarch *gdbarch, struct frame_info *frame)
3979 if (gdbarch->frame_num_args == 0)
3980 internal_error (__FILE__, __LINE__,
3981 "gdbarch: gdbarch_frame_num_args invalid");
3982 if (gdbarch_debug >= 2)
3983 fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_num_args called\n");
3984 return gdbarch->frame_num_args (frame);
3988 set_gdbarch_frame_num_args (struct gdbarch *gdbarch,
3989 gdbarch_frame_num_args_ftype frame_num_args)
3991 gdbarch->frame_num_args = frame_num_args;
3995 gdbarch_stack_align_p (struct gdbarch *gdbarch)
3997 return gdbarch->stack_align != 0;
4001 gdbarch_stack_align (struct gdbarch *gdbarch, CORE_ADDR sp)
4003 if (gdbarch->stack_align == 0)
4004 internal_error (__FILE__, __LINE__,
4005 "gdbarch: gdbarch_stack_align invalid");
4006 if (gdbarch_debug >= 2)
4007 fprintf_unfiltered (gdb_stdlog, "gdbarch_stack_align called\n");
4008 return gdbarch->stack_align (sp);
4012 set_gdbarch_stack_align (struct gdbarch *gdbarch,
4013 gdbarch_stack_align_ftype stack_align)
4015 gdbarch->stack_align = stack_align;
4019 gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
4021 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4022 if (gdbarch_debug >= 2)
4023 fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
4024 return gdbarch->extra_stack_alignment_needed;
4028 set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
4029 int extra_stack_alignment_needed)
4031 gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
4035 gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
4037 return gdbarch->reg_struct_has_addr != 0;
4041 gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch, int gcc_p, struct type *type)
4043 if (gdbarch->reg_struct_has_addr == 0)
4044 internal_error (__FILE__, __LINE__,
4045 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4046 if (gdbarch_debug >= 2)
4047 fprintf_unfiltered (gdb_stdlog, "gdbarch_reg_struct_has_addr called\n");
4048 return gdbarch->reg_struct_has_addr (gcc_p, type);
4052 set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
4053 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr)
4055 gdbarch->reg_struct_has_addr = reg_struct_has_addr;
4059 gdbarch_save_dummy_frame_tos_p (struct gdbarch *gdbarch)
4061 return gdbarch->save_dummy_frame_tos != 0;
4065 gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, CORE_ADDR sp)
4067 if (gdbarch->save_dummy_frame_tos == 0)
4068 internal_error (__FILE__, __LINE__,
4069 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4070 if (gdbarch_debug >= 2)
4071 fprintf_unfiltered (gdb_stdlog, "gdbarch_save_dummy_frame_tos called\n");
4072 gdbarch->save_dummy_frame_tos (sp);
4076 set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch,
4077 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos)
4079 gdbarch->save_dummy_frame_tos = save_dummy_frame_tos;
4083 gdbarch_parm_boundary (struct gdbarch *gdbarch)
4085 if (gdbarch_debug >= 2)
4086 fprintf_unfiltered (gdb_stdlog, "gdbarch_parm_boundary called\n");
4087 return gdbarch->parm_boundary;
4091 set_gdbarch_parm_boundary (struct gdbarch *gdbarch,
4094 gdbarch->parm_boundary = parm_boundary;
4097 const struct floatformat *
4098 gdbarch_float_format (struct gdbarch *gdbarch)
4100 if (gdbarch_debug >= 2)
4101 fprintf_unfiltered (gdb_stdlog, "gdbarch_float_format called\n");
4102 return gdbarch->float_format;
4106 set_gdbarch_float_format (struct gdbarch *gdbarch,
4107 const struct floatformat * float_format)
4109 gdbarch->float_format = float_format;
4112 const struct floatformat *
4113 gdbarch_double_format (struct gdbarch *gdbarch)
4115 if (gdbarch_debug >= 2)
4116 fprintf_unfiltered (gdb_stdlog, "gdbarch_double_format called\n");
4117 return gdbarch->double_format;
4121 set_gdbarch_double_format (struct gdbarch *gdbarch,
4122 const struct floatformat * double_format)
4124 gdbarch->double_format = double_format;
4127 const struct floatformat *
4128 gdbarch_long_double_format (struct gdbarch *gdbarch)
4130 if (gdbarch_debug >= 2)
4131 fprintf_unfiltered (gdb_stdlog, "gdbarch_long_double_format called\n");
4132 return gdbarch->long_double_format;
4136 set_gdbarch_long_double_format (struct gdbarch *gdbarch,
4137 const struct floatformat * long_double_format)
4139 gdbarch->long_double_format = long_double_format;
4143 gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
4145 if (gdbarch->convert_from_func_ptr_addr == 0)
4146 internal_error (__FILE__, __LINE__,
4147 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4148 if (gdbarch_debug >= 2)
4149 fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
4150 return gdbarch->convert_from_func_ptr_addr (addr);
4154 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
4155 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr)
4157 gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr;
4161 gdbarch_addr_bits_remove (struct gdbarch *gdbarch, CORE_ADDR addr)
4163 if (gdbarch->addr_bits_remove == 0)
4164 internal_error (__FILE__, __LINE__,
4165 "gdbarch: gdbarch_addr_bits_remove invalid");
4166 if (gdbarch_debug >= 2)
4167 fprintf_unfiltered (gdb_stdlog, "gdbarch_addr_bits_remove called\n");
4168 return gdbarch->addr_bits_remove (addr);
4172 set_gdbarch_addr_bits_remove (struct gdbarch *gdbarch,
4173 gdbarch_addr_bits_remove_ftype addr_bits_remove)
4175 gdbarch->addr_bits_remove = addr_bits_remove;
4179 gdbarch_software_single_step_p (struct gdbarch *gdbarch)
4181 return gdbarch->software_single_step != 0;
4185 gdbarch_software_single_step (struct gdbarch *gdbarch, enum target_signal sig, int insert_breakpoints_p)
4187 if (gdbarch->software_single_step == 0)
4188 internal_error (__FILE__, __LINE__,
4189 "gdbarch: gdbarch_software_single_step invalid");
4190 if (gdbarch_debug >= 2)
4191 fprintf_unfiltered (gdb_stdlog, "gdbarch_software_single_step called\n");
4192 gdbarch->software_single_step (sig, insert_breakpoints_p);
4196 set_gdbarch_software_single_step (struct gdbarch *gdbarch,
4197 gdbarch_software_single_step_ftype software_single_step)
4199 gdbarch->software_single_step = software_single_step;
4203 gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, disassemble_info *info)
4205 if (gdbarch->print_insn == 0)
4206 internal_error (__FILE__, __LINE__,
4207 "gdbarch: gdbarch_print_insn invalid");
4208 if (gdbarch_debug >= 2)
4209 fprintf_unfiltered (gdb_stdlog, "gdbarch_print_insn called\n");
4210 return gdbarch->print_insn (vma, info);
4214 set_gdbarch_print_insn (struct gdbarch *gdbarch,
4215 gdbarch_print_insn_ftype print_insn)
4217 gdbarch->print_insn = print_insn;
4221 gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, CORE_ADDR pc)
4223 if (gdbarch->skip_trampoline_code == 0)
4224 internal_error (__FILE__, __LINE__,
4225 "gdbarch: gdbarch_skip_trampoline_code invalid");
4226 if (gdbarch_debug >= 2)
4227 fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_trampoline_code called\n");
4228 return gdbarch->skip_trampoline_code (pc);
4232 set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
4233 gdbarch_skip_trampoline_code_ftype skip_trampoline_code)
4235 gdbarch->skip_trampoline_code = skip_trampoline_code;
4239 gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
4241 if (gdbarch->in_solib_call_trampoline == 0)
4242 internal_error (__FILE__, __LINE__,
4243 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4244 if (gdbarch_debug >= 2)
4245 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_solib_call_trampoline called\n");
4246 return gdbarch->in_solib_call_trampoline (pc, name);
4250 set_gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch,
4251 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline)
4253 gdbarch->in_solib_call_trampoline = in_solib_call_trampoline;
4257 gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR addr)
4259 if (gdbarch->in_function_epilogue_p == 0)
4260 internal_error (__FILE__, __LINE__,
4261 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4262 if (gdbarch_debug >= 2)
4263 fprintf_unfiltered (gdb_stdlog, "gdbarch_in_function_epilogue_p called\n");
4264 return gdbarch->in_function_epilogue_p (gdbarch, addr);
4268 set_gdbarch_in_function_epilogue_p (struct gdbarch *gdbarch,
4269 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p)
4271 gdbarch->in_function_epilogue_p = in_function_epilogue_p;
4275 /* Keep a registry of per-architecture data-pointers required by GDB
4281 gdbarch_data_init_ftype *init;
4282 gdbarch_data_free_ftype *free;
4285 struct gdbarch_data_registration
4287 struct gdbarch_data *data;
4288 struct gdbarch_data_registration *next;
4291 struct gdbarch_data_registry
4294 struct gdbarch_data_registration *registrations;
4297 struct gdbarch_data_registry gdbarch_data_registry =
4302 struct gdbarch_data *
4303 register_gdbarch_data (gdbarch_data_init_ftype *init,
4304 gdbarch_data_free_ftype *free)
4306 struct gdbarch_data_registration **curr;
4307 for (curr = &gdbarch_data_registry.registrations;
4309 curr = &(*curr)->next);
4310 (*curr) = XMALLOC (struct gdbarch_data_registration);
4311 (*curr)->next = NULL;
4312 (*curr)->data = XMALLOC (struct gdbarch_data);
4313 (*curr)->data->index = gdbarch_data_registry.nr++;
4314 (*curr)->data->init = init;
4315 (*curr)->data->free = free;
4316 return (*curr)->data;
4320 /* Walk through all the registered users initializing each in turn. */
4323 init_gdbarch_data (struct gdbarch *gdbarch)
4325 struct gdbarch_data_registration *rego;
4326 for (rego = gdbarch_data_registry.registrations;
4330 struct gdbarch_data *data = rego->data;
4331 gdb_assert (data->index < gdbarch->nr_data);
4332 if (data->init != NULL)
4334 void *pointer = data->init (gdbarch);
4335 set_gdbarch_data (gdbarch, data, pointer);
4340 /* Create/delete the gdbarch data vector. */
4343 alloc_gdbarch_data (struct gdbarch *gdbarch)
4345 gdb_assert (gdbarch->data == NULL);
4346 gdbarch->nr_data = gdbarch_data_registry.nr;
4347 gdbarch->data = xcalloc (gdbarch->nr_data, sizeof (void*));
4351 free_gdbarch_data (struct gdbarch *gdbarch)
4353 struct gdbarch_data_registration *rego;
4354 gdb_assert (gdbarch->data != NULL);
4355 for (rego = gdbarch_data_registry.registrations;
4359 struct gdbarch_data *data = rego->data;
4360 gdb_assert (data->index < gdbarch->nr_data);
4361 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4363 data->free (gdbarch, gdbarch->data[data->index]);
4364 gdbarch->data[data->index] = NULL;
4367 xfree (gdbarch->data);
4368 gdbarch->data = NULL;
4372 /* Initialize the current value of thee specified per-architecture
4376 set_gdbarch_data (struct gdbarch *gdbarch,
4377 struct gdbarch_data *data,
4380 gdb_assert (data->index < gdbarch->nr_data);
4381 if (data->free != NULL && gdbarch->data[data->index] != NULL)
4382 data->free (gdbarch, gdbarch->data[data->index]);
4383 gdbarch->data[data->index] = pointer;
4386 /* Return the current value of the specified per-architecture
4390 gdbarch_data (struct gdbarch_data *data)
4392 gdb_assert (data->index < current_gdbarch->nr_data);
4393 return current_gdbarch->data[data->index];
4398 /* Keep a registry of swapped data required by GDB modules. */
4403 struct gdbarch_swap_registration *source;
4404 struct gdbarch_swap *next;
4407 struct gdbarch_swap_registration
4410 unsigned long sizeof_data;
4411 gdbarch_swap_ftype *init;
4412 struct gdbarch_swap_registration *next;
4415 struct gdbarch_swap_registry
4418 struct gdbarch_swap_registration *registrations;
4421 struct gdbarch_swap_registry gdbarch_swap_registry =
4427 register_gdbarch_swap (void *data,
4428 unsigned long sizeof_data,
4429 gdbarch_swap_ftype *init)
4431 struct gdbarch_swap_registration **rego;
4432 for (rego = &gdbarch_swap_registry.registrations;
4434 rego = &(*rego)->next);
4435 (*rego) = XMALLOC (struct gdbarch_swap_registration);
4436 (*rego)->next = NULL;
4437 (*rego)->init = init;
4438 (*rego)->data = data;
4439 (*rego)->sizeof_data = sizeof_data;
4444 init_gdbarch_swap (struct gdbarch *gdbarch)
4446 struct gdbarch_swap_registration *rego;
4447 struct gdbarch_swap **curr = &gdbarch->swap;
4448 for (rego = gdbarch_swap_registry.registrations;
4452 if (rego->data != NULL)
4454 (*curr) = XMALLOC (struct gdbarch_swap);
4455 (*curr)->source = rego;
4456 (*curr)->swap = xmalloc (rego->sizeof_data);
4457 (*curr)->next = NULL;
4458 memset (rego->data, 0, rego->sizeof_data);
4459 curr = &(*curr)->next;
4461 if (rego->init != NULL)
4467 swapout_gdbarch_swap (struct gdbarch *gdbarch)
4469 struct gdbarch_swap *curr;
4470 for (curr = gdbarch->swap;
4473 memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
4477 swapin_gdbarch_swap (struct gdbarch *gdbarch)
4479 struct gdbarch_swap *curr;
4480 for (curr = gdbarch->swap;
4483 memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
4487 /* Keep a registry of the architectures known by GDB. */
4489 struct gdbarch_registration
4491 enum bfd_architecture bfd_architecture;
4492 gdbarch_init_ftype *init;
4493 gdbarch_dump_tdep_ftype *dump_tdep;
4494 struct gdbarch_list *arches;
4495 struct gdbarch_registration *next;
4498 static struct gdbarch_registration *gdbarch_registry = NULL;
4501 append_name (const char ***buf, int *nr, const char *name)
4503 *buf = xrealloc (*buf, sizeof (char**) * (*nr + 1));
4509 gdbarch_printable_names (void)
4513 /* Accumulate a list of names based on the registed list of
4515 enum bfd_architecture a;
4517 const char **arches = NULL;
4518 struct gdbarch_registration *rego;
4519 for (rego = gdbarch_registry;
4523 const struct bfd_arch_info *ap;
4524 ap = bfd_lookup_arch (rego->bfd_architecture, 0);
4526 internal_error (__FILE__, __LINE__,
4527 "gdbarch_architecture_names: multi-arch unknown");
4530 append_name (&arches, &nr_arches, ap->printable_name);
4535 append_name (&arches, &nr_arches, NULL);
4539 /* Just return all the architectures that BFD knows. Assume that
4540 the legacy architecture framework supports them. */
4541 return bfd_arch_list ();
4546 gdbarch_register (enum bfd_architecture bfd_architecture,
4547 gdbarch_init_ftype *init,
4548 gdbarch_dump_tdep_ftype *dump_tdep)
4550 struct gdbarch_registration **curr;
4551 const struct bfd_arch_info *bfd_arch_info;
4552 /* Check that BFD recognizes this architecture */
4553 bfd_arch_info = bfd_lookup_arch (bfd_architecture, 0);
4554 if (bfd_arch_info == NULL)
4556 internal_error (__FILE__, __LINE__,
4557 "gdbarch: Attempt to register unknown architecture (%d)",
4560 /* Check that we haven't seen this architecture before */
4561 for (curr = &gdbarch_registry;
4563 curr = &(*curr)->next)
4565 if (bfd_architecture == (*curr)->bfd_architecture)
4566 internal_error (__FILE__, __LINE__,
4567 "gdbarch: Duplicate registraration of architecture (%s)",
4568 bfd_arch_info->printable_name);
4572 fprintf_unfiltered (gdb_stdlog, "register_gdbarch_init (%s, 0x%08lx)\n",
4573 bfd_arch_info->printable_name,
4576 (*curr) = XMALLOC (struct gdbarch_registration);
4577 (*curr)->bfd_architecture = bfd_architecture;
4578 (*curr)->init = init;
4579 (*curr)->dump_tdep = dump_tdep;
4580 (*curr)->arches = NULL;
4581 (*curr)->next = NULL;
4582 /* When non- multi-arch, install whatever target dump routine we've
4583 been provided - hopefully that routine has been written correctly
4584 and works regardless of multi-arch. */
4585 if (!GDB_MULTI_ARCH && dump_tdep != NULL
4586 && startup_gdbarch.dump_tdep == NULL)
4587 startup_gdbarch.dump_tdep = dump_tdep;
4591 register_gdbarch_init (enum bfd_architecture bfd_architecture,
4592 gdbarch_init_ftype *init)
4594 gdbarch_register (bfd_architecture, init, NULL);
4598 /* Look for an architecture using gdbarch_info. Base search on only
4599 BFD_ARCH_INFO and BYTE_ORDER. */
4601 struct gdbarch_list *
4602 gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
4603 const struct gdbarch_info *info)
4605 for (; arches != NULL; arches = arches->next)
4607 if (info->bfd_arch_info != arches->gdbarch->bfd_arch_info)
4609 if (info->byte_order != arches->gdbarch->byte_order)
4617 /* Update the current architecture. Return ZERO if the update request
4621 gdbarch_update_p (struct gdbarch_info info)
4623 struct gdbarch *new_gdbarch;
4624 struct gdbarch_list **list;
4625 struct gdbarch_registration *rego;
4627 /* Fill in missing parts of the INFO struct using a number of
4628 sources: ``set ...''; INFOabfd supplied; existing target. */
4630 /* ``(gdb) set architecture ...'' */
4631 if (info.bfd_arch_info == NULL
4632 && !TARGET_ARCHITECTURE_AUTO)
4633 info.bfd_arch_info = TARGET_ARCHITECTURE;
4634 if (info.bfd_arch_info == NULL
4635 && info.abfd != NULL
4636 && bfd_get_arch (info.abfd) != bfd_arch_unknown
4637 && bfd_get_arch (info.abfd) != bfd_arch_obscure)
4638 info.bfd_arch_info = bfd_get_arch_info (info.abfd);
4639 if (info.bfd_arch_info == NULL)
4640 info.bfd_arch_info = TARGET_ARCHITECTURE;
4642 /* ``(gdb) set byte-order ...'' */
4643 if (info.byte_order == 0
4644 && !TARGET_BYTE_ORDER_AUTO)
4645 info.byte_order = TARGET_BYTE_ORDER;
4646 /* From the INFO struct. */
4647 if (info.byte_order == 0
4648 && info.abfd != NULL)
4649 info.byte_order = (bfd_big_endian (info.abfd) ? BIG_ENDIAN
4650 : bfd_little_endian (info.abfd) ? LITTLE_ENDIAN
4652 /* From the current target. */
4653 if (info.byte_order == 0)
4654 info.byte_order = TARGET_BYTE_ORDER;
4656 /* Must have found some sort of architecture. */
4657 gdb_assert (info.bfd_arch_info != NULL);
4661 fprintf_unfiltered (gdb_stdlog,
4662 "gdbarch_update: info.bfd_arch_info %s\n",
4663 (info.bfd_arch_info != NULL
4664 ? info.bfd_arch_info->printable_name
4666 fprintf_unfiltered (gdb_stdlog,
4667 "gdbarch_update: info.byte_order %d (%s)\n",
4669 (info.byte_order == BIG_ENDIAN ? "big"
4670 : info.byte_order == LITTLE_ENDIAN ? "little"
4672 fprintf_unfiltered (gdb_stdlog,
4673 "gdbarch_update: info.abfd 0x%lx\n",
4675 fprintf_unfiltered (gdb_stdlog,
4676 "gdbarch_update: info.tdep_info 0x%lx\n",
4677 (long) info.tdep_info);
4680 /* Find the target that knows about this architecture. */
4681 for (rego = gdbarch_registry;
4684 if (rego->bfd_architecture == info.bfd_arch_info->arch)
4689 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
4693 /* Ask the target for a replacement architecture. */
4694 new_gdbarch = rego->init (info, rego->arches);
4696 /* Did the target like it? No. Reject the change. */
4697 if (new_gdbarch == NULL)
4700 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
4704 /* Did the architecture change? No. Do nothing. */
4705 if (current_gdbarch == new_gdbarch)
4708 fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4710 new_gdbarch->bfd_arch_info->printable_name);
4714 /* Swap all data belonging to the old target out */
4715 swapout_gdbarch_swap (current_gdbarch);
4717 /* Is this a pre-existing architecture? Yes. Swap it in. */
4718 for (list = ®o->arches;
4720 list = &(*list)->next)
4722 if ((*list)->gdbarch == new_gdbarch)
4725 fprintf_unfiltered (gdb_stdlog,
4726 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4728 new_gdbarch->bfd_arch_info->printable_name);
4729 current_gdbarch = new_gdbarch;
4730 swapin_gdbarch_swap (new_gdbarch);
4731 architecture_changed_event ();
4736 /* Append this new architecture to this targets list. */
4737 (*list) = XMALLOC (struct gdbarch_list);
4738 (*list)->next = NULL;
4739 (*list)->gdbarch = new_gdbarch;
4741 /* Switch to this new architecture. Dump it out. */
4742 current_gdbarch = new_gdbarch;
4745 fprintf_unfiltered (gdb_stdlog,
4746 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4748 new_gdbarch->bfd_arch_info->printable_name);
4751 /* Check that the newly installed architecture is valid. Plug in
4752 any post init values. */
4753 new_gdbarch->dump_tdep = rego->dump_tdep;
4754 verify_gdbarch (new_gdbarch);
4756 /* Initialize the per-architecture memory (swap) areas.
4757 CURRENT_GDBARCH must be update before these modules are
4759 init_gdbarch_swap (new_gdbarch);
4761 /* Initialize the per-architecture data-pointer of all parties that
4762 registered an interest in this architecture. CURRENT_GDBARCH
4763 must be updated before these modules are called. */
4764 init_gdbarch_data (new_gdbarch);
4765 architecture_changed_event ();
4768 gdbarch_dump (current_gdbarch, gdb_stdlog);
4776 /* Pointer to the target-dependent disassembly function. */
4777 int (*tm_print_insn) (bfd_vma, disassemble_info *);
4778 disassemble_info tm_print_insn_info;
4781 extern void _initialize_gdbarch (void);
4784 _initialize_gdbarch (void)
4786 struct cmd_list_element *c;
4788 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info, gdb_stdout, (fprintf_ftype)fprintf_filtered);
4789 tm_print_insn_info.flavour = bfd_target_unknown_flavour;
4790 tm_print_insn_info.read_memory_func = dis_asm_read_memory;
4791 tm_print_insn_info.memory_error_func = dis_asm_memory_error;
4792 tm_print_insn_info.print_address_func = dis_asm_print_address;
4794 add_show_from_set (add_set_cmd ("arch",
4797 (char *)&gdbarch_debug,
4798 "Set architecture debugging.\n\
4799 When non-zero, architecture debugging is enabled.", &setdebuglist),
4801 c = add_set_cmd ("archdebug",
4804 (char *)&gdbarch_debug,
4805 "Set architecture debugging.\n\
4806 When non-zero, architecture debugging is enabled.", &setlist);
4808 deprecate_cmd (c, "set debug arch");
4809 deprecate_cmd (add_show_from_set (c, &showlist), "show debug arch");