1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch
*gdbarch
);
70 static void alloc_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void swapout_gdbarch_swap (struct gdbarch
*);
75 static void swapin_gdbarch_swap (struct gdbarch
*);
77 /* Non-zero if we want to trace architecture code. */
80 #define GDBARCH_DEBUG 0
82 int gdbarch_debug
= GDBARCH_DEBUG
;
85 /* Maintain the struct gdbarch object */
89 /* basic architectural information */
90 const struct bfd_arch_info
* bfd_arch_info
;
93 /* target specific vector. */
94 struct gdbarch_tdep
*tdep
;
95 gdbarch_dump_tdep_ftype
*dump_tdep
;
97 /* per-architecture data-pointers */
101 /* per-architecture swap-regions */
102 struct gdbarch_swap
*swap
;
104 /* Multi-arch values.
106 When extending this structure you must:
110 Declare set/get functions and define the corresponding
113 gdbarch_alloc(): If zero/NULL is not a suitable default,
114 initialize the new field.
116 verify_gdbarch(): Confirm that the target updated the field
119 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
122 ``startup_gdbarch()'': Append an initial value to the static
123 variable (base values on the host's c-type system).
125 get_gdbarch(): Implement the set/get functions (probably using
126 the macro's as shortcuts).
141 gdbarch_read_pc_ftype
*read_pc
;
142 gdbarch_write_pc_ftype
*write_pc
;
143 gdbarch_read_fp_ftype
*read_fp
;
144 gdbarch_read_sp_ftype
*read_sp
;
145 gdbarch_write_sp_ftype
*write_sp
;
146 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
147 gdbarch_register_read_ftype
*register_read
;
148 gdbarch_register_write_ftype
*register_write
;
158 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
159 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
160 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
161 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
162 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
163 gdbarch_register_name_ftype
*register_name
;
166 gdbarch_register_byte_ftype
*register_byte
;
167 gdbarch_register_raw_size_ftype
*register_raw_size
;
168 int max_register_raw_size
;
169 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
170 int max_register_virtual_size
;
171 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
172 gdbarch_do_registers_info_ftype
*do_registers_info
;
173 gdbarch_print_float_info_ftype
*print_float_info
;
174 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
175 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
176 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
177 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
178 gdbarch_get_longjmp_target_ftype
*get_longjmp_target
;
179 int use_generic_dummy_frames
;
180 int call_dummy_location
;
181 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
182 CORE_ADDR call_dummy_start_offset
;
183 CORE_ADDR call_dummy_breakpoint_offset
;
184 int call_dummy_breakpoint_offset_p
;
185 int call_dummy_length
;
186 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
188 LONGEST
* call_dummy_words
;
189 int sizeof_call_dummy_words
;
190 int call_dummy_stack_adjust_p
;
191 int call_dummy_stack_adjust
;
192 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
193 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
194 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
195 int believe_pcc_promotion
;
196 int believe_pcc_promotion_type
;
197 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
198 gdbarch_get_saved_register_ftype
*get_saved_register
;
199 gdbarch_register_convertible_ftype
*register_convertible
;
200 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
201 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
202 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
203 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
204 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
205 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
206 gdbarch_integer_to_address_ftype
*integer_to_address
;
207 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
208 gdbarch_extract_return_value_ftype
*extract_return_value
;
209 gdbarch_push_arguments_ftype
*push_arguments
;
210 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
211 gdbarch_push_return_address_ftype
*push_return_address
;
212 gdbarch_pop_frame_ftype
*pop_frame
;
213 gdbarch_store_struct_return_ftype
*store_struct_return
;
214 gdbarch_store_return_value_ftype
*store_return_value
;
215 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
216 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
217 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
218 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
219 gdbarch_skip_prologue_ftype
*skip_prologue
;
220 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
221 gdbarch_inner_than_ftype
*inner_than
;
222 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
223 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
224 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
225 CORE_ADDR decr_pc_after_break
;
226 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
227 CORE_ADDR function_start_offset
;
228 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
229 CORE_ADDR frame_args_skip
;
230 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
231 gdbarch_frame_chain_ftype
*frame_chain
;
232 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
233 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
234 gdbarch_frame_args_address_ftype
*frame_args_address
;
235 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
236 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
237 gdbarch_frame_num_args_ftype
*frame_num_args
;
238 gdbarch_stack_align_ftype
*stack_align
;
239 int extra_stack_alignment_needed
;
240 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
241 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
243 const struct floatformat
* float_format
;
244 const struct floatformat
* double_format
;
245 const struct floatformat
* long_double_format
;
246 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
247 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
248 gdbarch_smash_text_address_ftype
*smash_text_address
;
249 gdbarch_software_single_step_ftype
*software_single_step
;
250 gdbarch_print_insn_ftype
*print_insn
;
251 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
252 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
253 gdbarch_pc_in_sigtramp_ftype
*pc_in_sigtramp
;
254 gdbarch_in_function_epilogue_p_ftype
*in_function_epilogue_p
;
255 gdbarch_construct_inferior_arguments_ftype
*construct_inferior_arguments
;
256 gdbarch_dwarf2_build_frame_info_ftype
*dwarf2_build_frame_info
;
257 gdbarch_elf_make_msymbol_special_ftype
*elf_make_msymbol_special
;
258 gdbarch_coff_make_msymbol_special_ftype
*coff_make_msymbol_special
;
262 /* The default architecture uses host values (for want of a better
265 extern const struct bfd_arch_info bfd_default_arch_struct
;
267 struct gdbarch startup_gdbarch
=
269 /* basic architecture information */
270 &bfd_default_arch_struct
,
272 /* target specific vector and its dump routine */
274 /*per-architecture data-pointers and swap regions */
276 /* Multi-arch values */
280 8 * sizeof (LONGEST
),
283 8 * sizeof (long double),
314 generic_register_raw_size
,
316 generic_register_virtual_size
,
345 generic_get_saved_register
,
401 generic_in_function_epilogue_p
,
402 construct_inferior_arguments
,
406 /* startup_gdbarch() */
409 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
411 /* Do any initialization needed for a non-multiarch configuration
412 after the _initialize_MODULE functions have been run. */
414 initialize_non_multiarch ()
416 alloc_gdbarch_data (&startup_gdbarch
);
417 init_gdbarch_swap (&startup_gdbarch
);
418 init_gdbarch_data (&startup_gdbarch
);
422 /* Create a new ``struct gdbarch'' based on information provided by
423 ``struct gdbarch_info''. */
426 gdbarch_alloc (const struct gdbarch_info
*info
,
427 struct gdbarch_tdep
*tdep
)
429 /* NOTE: The new architecture variable is named ``current_gdbarch''
430 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
431 the current local architecture and not the previous global
432 architecture. This ensures that the new architectures initial
433 values are not influenced by the previous architecture. Once
434 everything is parameterised with gdbarch, this will go away. */
435 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
436 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
438 alloc_gdbarch_data (current_gdbarch
);
440 current_gdbarch
->tdep
= tdep
;
442 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
443 current_gdbarch
->byte_order
= info
->byte_order
;
445 /* Force the explicit initialization of these. */
446 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
447 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
448 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
449 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
450 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
451 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
452 current_gdbarch
->long_double_bit
= 8*TARGET_CHAR_BIT
;
453 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
454 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
455 current_gdbarch
->char_signed
= -1;
456 current_gdbarch
->read_pc
= generic_target_read_pc
;
457 current_gdbarch
->write_pc
= generic_target_write_pc
;
458 current_gdbarch
->read_fp
= generic_target_read_fp
;
459 current_gdbarch
->read_sp
= generic_target_read_sp
;
460 current_gdbarch
->write_sp
= generic_target_write_sp
;
461 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
462 current_gdbarch
->num_regs
= -1;
463 current_gdbarch
->sp_regnum
= -1;
464 current_gdbarch
->fp_regnum
= -1;
465 current_gdbarch
->pc_regnum
= -1;
466 current_gdbarch
->ps_regnum
= -1;
467 current_gdbarch
->fp0_regnum
= -1;
468 current_gdbarch
->npc_regnum
= -1;
469 current_gdbarch
->nnpc_regnum
= -1;
470 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
471 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
472 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
473 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
474 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
475 current_gdbarch
->register_name
= legacy_register_name
;
476 current_gdbarch
->register_size
= -1;
477 current_gdbarch
->register_bytes
= -1;
478 current_gdbarch
->max_register_raw_size
= -1;
479 current_gdbarch
->max_register_virtual_size
= -1;
480 current_gdbarch
->do_registers_info
= do_registers_info
;
481 current_gdbarch
->print_float_info
= default_print_float_info
;
482 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
483 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
484 current_gdbarch
->cannot_store_register
= cannot_register_not
;
485 current_gdbarch
->use_generic_dummy_frames
= -1;
486 current_gdbarch
->call_dummy_start_offset
= -1;
487 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
488 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
489 current_gdbarch
->call_dummy_length
= -1;
490 current_gdbarch
->call_dummy_p
= -1;
491 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
492 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
493 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
494 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
495 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
496 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
497 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
498 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
499 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
500 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
501 current_gdbarch
->push_arguments
= default_push_arguments
;
502 current_gdbarch
->use_struct_convention
= generic_use_struct_convention
;
503 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
504 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
505 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
506 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
507 current_gdbarch
->decr_pc_after_break
= -1;
508 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
509 current_gdbarch
->function_start_offset
= -1;
510 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
511 current_gdbarch
->frame_args_skip
= -1;
512 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
513 current_gdbarch
->frame_chain_valid
= func_frame_chain_valid
;
514 current_gdbarch
->extra_stack_alignment_needed
= 1;
515 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
516 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
517 current_gdbarch
->smash_text_address
= core_addr_identity
;
518 current_gdbarch
->print_insn
= legacy_print_insn
;
519 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
520 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
521 current_gdbarch
->pc_in_sigtramp
= legacy_pc_in_sigtramp
;
522 current_gdbarch
->in_function_epilogue_p
= generic_in_function_epilogue_p
;
523 current_gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
524 current_gdbarch
->elf_make_msymbol_special
= default_elf_make_msymbol_special
;
525 current_gdbarch
->coff_make_msymbol_special
= default_coff_make_msymbol_special
;
526 /* gdbarch_alloc() */
528 return current_gdbarch
;
532 /* Free a gdbarch struct. This should never happen in normal
533 operation --- once you've created a gdbarch, you keep it around.
534 However, if an architecture's init function encounters an error
535 building the structure, it may need to clean up a partially
536 constructed gdbarch. */
539 gdbarch_free (struct gdbarch
*arch
)
541 gdb_assert (arch
!= NULL
);
542 free_gdbarch_data (arch
);
547 /* Ensure that all values in a GDBARCH are reasonable. */
550 verify_gdbarch (struct gdbarch
*gdbarch
)
553 struct cleanup
*cleanups
;
556 /* Only perform sanity checks on a multi-arch target. */
559 log
= mem_fileopen ();
560 cleanups
= make_cleanup_ui_file_delete (log
);
562 if (gdbarch
->byte_order
== BFD_ENDIAN_UNKNOWN
)
563 fprintf_unfiltered (log
, "\n\tbyte-order");
564 if (gdbarch
->bfd_arch_info
== NULL
)
565 fprintf_unfiltered (log
, "\n\tbfd_arch_info");
566 /* Check those that need to be defined for the given multi-arch level. */
567 /* Skip verify of short_bit, invalid_p == 0 */
568 /* Skip verify of int_bit, invalid_p == 0 */
569 /* Skip verify of long_bit, invalid_p == 0 */
570 /* Skip verify of long_long_bit, invalid_p == 0 */
571 /* Skip verify of float_bit, invalid_p == 0 */
572 /* Skip verify of double_bit, invalid_p == 0 */
573 /* Skip verify of long_double_bit, invalid_p == 0 */
574 /* Skip verify of ptr_bit, invalid_p == 0 */
575 if (gdbarch
->addr_bit
== 0)
576 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
577 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
578 if (gdbarch
->char_signed
== -1)
579 gdbarch
->char_signed
= 1;
580 /* Skip verify of read_pc, invalid_p == 0 */
581 /* Skip verify of write_pc, invalid_p == 0 */
582 /* Skip verify of read_fp, invalid_p == 0 */
583 /* Skip verify of read_sp, invalid_p == 0 */
584 /* Skip verify of write_sp, invalid_p == 0 */
585 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
586 /* Skip verify of register_read, has predicate */
587 /* Skip verify of register_write, has predicate */
588 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
589 && (gdbarch
->num_regs
== -1))
590 fprintf_unfiltered (log
, "\n\tnum_regs");
591 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
592 /* Skip verify of sp_regnum, invalid_p == 0 */
593 /* Skip verify of fp_regnum, invalid_p == 0 */
594 /* Skip verify of pc_regnum, invalid_p == 0 */
595 /* Skip verify of ps_regnum, invalid_p == 0 */
596 /* Skip verify of fp0_regnum, invalid_p == 0 */
597 /* Skip verify of npc_regnum, invalid_p == 0 */
598 /* Skip verify of nnpc_regnum, invalid_p == 0 */
599 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
600 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
601 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
602 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
603 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
604 /* Skip verify of register_name, invalid_p == 0 */
605 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
606 && (gdbarch
->register_size
== -1))
607 fprintf_unfiltered (log
, "\n\tregister_size");
608 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
609 && (gdbarch
->register_bytes
== -1))
610 fprintf_unfiltered (log
, "\n\tregister_bytes");
611 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
612 && (gdbarch
->register_byte
== 0))
613 fprintf_unfiltered (log
, "\n\tregister_byte");
614 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
615 && (gdbarch
->register_raw_size
== 0))
616 fprintf_unfiltered (log
, "\n\tregister_raw_size");
617 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
618 && (gdbarch
->max_register_raw_size
== -1))
619 fprintf_unfiltered (log
, "\n\tmax_register_raw_size");
620 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
621 && (gdbarch
->register_virtual_size
== 0))
622 fprintf_unfiltered (log
, "\n\tregister_virtual_size");
623 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
624 && (gdbarch
->max_register_virtual_size
== -1))
625 fprintf_unfiltered (log
, "\n\tmax_register_virtual_size");
626 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
627 && (gdbarch
->register_virtual_type
== 0))
628 fprintf_unfiltered (log
, "\n\tregister_virtual_type");
629 /* Skip verify of do_registers_info, invalid_p == 0 */
630 /* Skip verify of print_float_info, invalid_p == 0 */
631 /* Skip verify of register_sim_regno, invalid_p == 0 */
632 /* Skip verify of register_bytes_ok, has predicate */
633 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
634 /* Skip verify of cannot_store_register, invalid_p == 0 */
635 /* Skip verify of get_longjmp_target, has predicate */
636 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
637 && (gdbarch
->use_generic_dummy_frames
== -1))
638 fprintf_unfiltered (log
, "\n\tuse_generic_dummy_frames");
639 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
640 && (gdbarch
->call_dummy_location
== 0))
641 fprintf_unfiltered (log
, "\n\tcall_dummy_location");
642 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
643 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
644 fprintf_unfiltered (log
, "\n\tcall_dummy_address");
645 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
646 && (gdbarch
->call_dummy_start_offset
== -1))
647 fprintf_unfiltered (log
, "\n\tcall_dummy_start_offset");
648 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
649 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
650 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset");
651 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
652 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
653 fprintf_unfiltered (log
, "\n\tcall_dummy_breakpoint_offset_p");
654 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
655 && (gdbarch
->call_dummy_length
== -1))
656 fprintf_unfiltered (log
, "\n\tcall_dummy_length");
657 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
658 && (gdbarch
->pc_in_call_dummy
== 0))
659 fprintf_unfiltered (log
, "\n\tpc_in_call_dummy");
660 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
661 && (gdbarch
->call_dummy_p
== -1))
662 fprintf_unfiltered (log
, "\n\tcall_dummy_p");
663 /* Skip verify of call_dummy_words, invalid_p == 0 */
664 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
665 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
666 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
667 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust_p");
668 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
669 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
670 fprintf_unfiltered (log
, "\n\tcall_dummy_stack_adjust");
671 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
672 && (gdbarch
->fix_call_dummy
== 0))
673 fprintf_unfiltered (log
, "\n\tfix_call_dummy");
674 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
675 /* Skip verify of init_frame_pc, invalid_p == 0 */
676 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
677 if ((GDB_MULTI_ARCH
>= GDB_MULTI_ARCH_PARTIAL
)
678 && (gdbarch
->get_saved_register
== 0))
679 fprintf_unfiltered (log
, "\n\tget_saved_register");
680 /* Skip verify of register_convertible, invalid_p == 0 */
681 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
682 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
683 /* Skip verify of fetch_pseudo_register, has predicate */
684 /* Skip verify of store_pseudo_register, has predicate */
685 /* Skip verify of pointer_to_address, invalid_p == 0 */
686 /* Skip verify of address_to_pointer, invalid_p == 0 */
687 /* Skip verify of integer_to_address, has predicate */
688 /* Skip verify of return_value_on_stack, invalid_p == 0 */
689 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
690 && (gdbarch
->extract_return_value
== 0))
691 fprintf_unfiltered (log
, "\n\textract_return_value");
692 /* Skip verify of push_arguments, invalid_p == 0 */
693 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
694 && (gdbarch
->push_dummy_frame
== 0))
695 fprintf_unfiltered (log
, "\n\tpush_dummy_frame");
696 /* Skip verify of push_return_address, has predicate */
697 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
698 && (gdbarch
->pop_frame
== 0))
699 fprintf_unfiltered (log
, "\n\tpop_frame");
700 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
701 && (gdbarch
->store_struct_return
== 0))
702 fprintf_unfiltered (log
, "\n\tstore_struct_return");
703 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
704 && (gdbarch
->store_return_value
== 0))
705 fprintf_unfiltered (log
, "\n\tstore_return_value");
706 /* Skip verify of extract_struct_value_address, has predicate */
707 /* Skip verify of use_struct_convention, invalid_p == 0 */
708 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
709 && (gdbarch
->frame_init_saved_regs
== 0))
710 fprintf_unfiltered (log
, "\n\tframe_init_saved_regs");
711 /* Skip verify of init_extra_frame_info, has predicate */
712 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
713 && (gdbarch
->skip_prologue
== 0))
714 fprintf_unfiltered (log
, "\n\tskip_prologue");
715 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
716 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
717 && (gdbarch
->inner_than
== 0))
718 fprintf_unfiltered (log
, "\n\tinner_than");
719 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
720 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
721 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
722 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
723 && (gdbarch
->decr_pc_after_break
== -1))
724 fprintf_unfiltered (log
, "\n\tdecr_pc_after_break");
725 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
726 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
727 && (gdbarch
->function_start_offset
== -1))
728 fprintf_unfiltered (log
, "\n\tfunction_start_offset");
729 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
731 && (gdbarch
->frame_args_skip
== -1))
732 fprintf_unfiltered (log
, "\n\tframe_args_skip");
733 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
734 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
735 && (gdbarch
->frame_chain
== 0))
736 fprintf_unfiltered (log
, "\n\tframe_chain");
737 /* Skip verify of frame_chain_valid, invalid_p == 0 */
738 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
739 && (gdbarch
->frame_saved_pc
== 0))
740 fprintf_unfiltered (log
, "\n\tframe_saved_pc");
741 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
742 && (gdbarch
->frame_args_address
== 0))
743 fprintf_unfiltered (log
, "\n\tframe_args_address");
744 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
745 && (gdbarch
->frame_locals_address
== 0))
746 fprintf_unfiltered (log
, "\n\tframe_locals_address");
747 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
748 && (gdbarch
->saved_pc_after_call
== 0))
749 fprintf_unfiltered (log
, "\n\tsaved_pc_after_call");
750 if ((GDB_MULTI_ARCH
> GDB_MULTI_ARCH_PARTIAL
)
751 && (gdbarch
->frame_num_args
== 0))
752 fprintf_unfiltered (log
, "\n\tframe_num_args");
753 /* Skip verify of stack_align, has predicate */
754 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
755 /* Skip verify of reg_struct_has_addr, has predicate */
756 /* Skip verify of save_dummy_frame_tos, has predicate */
757 if (gdbarch
->float_format
== 0)
758 gdbarch
->float_format
= default_float_format (gdbarch
);
759 if (gdbarch
->double_format
== 0)
760 gdbarch
->double_format
= default_double_format (gdbarch
);
761 if (gdbarch
->long_double_format
== 0)
762 gdbarch
->long_double_format
= default_double_format (gdbarch
);
763 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
764 /* Skip verify of addr_bits_remove, invalid_p == 0 */
765 /* Skip verify of smash_text_address, invalid_p == 0 */
766 /* Skip verify of software_single_step, has predicate */
767 /* Skip verify of print_insn, invalid_p == 0 */
768 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
769 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
770 /* Skip verify of pc_in_sigtramp, invalid_p == 0 */
771 /* Skip verify of in_function_epilogue_p, invalid_p == 0 */
772 /* Skip verify of construct_inferior_arguments, invalid_p == 0 */
773 /* Skip verify of dwarf2_build_frame_info, has predicate */
774 /* Skip verify of elf_make_msymbol_special, invalid_p == 0 */
775 /* Skip verify of coff_make_msymbol_special, invalid_p == 0 */
776 buf
= ui_file_xstrdup (log
, &dummy
);
777 make_cleanup (xfree
, buf
);
778 if (strlen (buf
) > 0)
779 internal_error (__FILE__
, __LINE__
,
780 "verify_gdbarch: the following are invalid ...%s",
782 do_cleanups (cleanups
);
786 /* Print out the details of the current architecture. */
788 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
789 just happens to match the global variable ``current_gdbarch''. That
790 way macros refering to that variable get the local and not the global
791 version - ulgh. Once everything is parameterised with gdbarch, this
795 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
797 fprintf_unfiltered (file
,
798 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: in_function_epilogue_p = 0x%08lx\n",
803 (long) current_gdbarch
->in_function_epilogue_p
);
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: register_read = 0x%08lx\n",
807 (long) current_gdbarch
->register_read
);
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: register_write = 0x%08lx\n",
811 (long) current_gdbarch
->register_write
);
812 #ifdef ADDRESS_TO_POINTER
814 /* Macro might contain `[{}]' when not multi-arch */
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: %s # %s\n",
817 "ADDRESS_TO_POINTER(type, buf, addr)",
818 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
823 (long) current_gdbarch
->address_to_pointer
824 /*ADDRESS_TO_POINTER ()*/);
826 #ifdef ADDR_BITS_REMOVE
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: %s # %s\n",
829 "ADDR_BITS_REMOVE(addr)",
830 XSTRING (ADDR_BITS_REMOVE (addr
)));
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
834 (long) current_gdbarch
->addr_bits_remove
835 /*ADDR_BITS_REMOVE ()*/);
837 #ifdef BELIEVE_PCC_PROMOTION
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
840 XSTRING (BELIEVE_PCC_PROMOTION
));
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %d\n",
843 BELIEVE_PCC_PROMOTION
);
845 #ifdef BELIEVE_PCC_PROMOTION_TYPE
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
848 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %d\n",
851 BELIEVE_PCC_PROMOTION_TYPE
);
853 #ifdef BREAKPOINT_FROM_PC
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: %s # %s\n",
856 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
857 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
861 (long) current_gdbarch
->breakpoint_from_pc
862 /*BREAKPOINT_FROM_PC ()*/);
864 #ifdef CALL_DUMMY_ADDRESS
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: %s # %s\n",
867 "CALL_DUMMY_ADDRESS()",
868 XSTRING (CALL_DUMMY_ADDRESS ()));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
872 (long) current_gdbarch
->call_dummy_address
873 /*CALL_DUMMY_ADDRESS ()*/);
875 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
878 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
879 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
882 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
884 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
887 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
888 fprintf_unfiltered (file
,
889 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %d\n",
890 CALL_DUMMY_BREAKPOINT_OFFSET_P
);
892 #ifdef CALL_DUMMY_LENGTH
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
895 XSTRING (CALL_DUMMY_LENGTH
));
896 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n",
901 #ifdef CALL_DUMMY_LOCATION
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
904 XSTRING (CALL_DUMMY_LOCATION
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
907 CALL_DUMMY_LOCATION
);
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: CALL_DUMMY_P # %s\n",
912 XSTRING (CALL_DUMMY_P
));
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: CALL_DUMMY_P = %d\n",
917 #ifdef CALL_DUMMY_STACK_ADJUST
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
920 XSTRING (CALL_DUMMY_STACK_ADJUST
));
921 if (CALL_DUMMY_STACK_ADJUST_P
)
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
924 (long) CALL_DUMMY_STACK_ADJUST
);
926 #ifdef CALL_DUMMY_STACK_ADJUST_P
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
929 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
932 (long) CALL_DUMMY_STACK_ADJUST_P
);
934 #ifdef CALL_DUMMY_START_OFFSET
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
937 XSTRING (CALL_DUMMY_START_OFFSET
));
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
940 (long) CALL_DUMMY_START_OFFSET
);
942 #ifdef CALL_DUMMY_WORDS
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
945 XSTRING (CALL_DUMMY_WORDS
));
946 fprintf_unfiltered (file
,
947 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
948 (long) CALL_DUMMY_WORDS
);
950 #ifdef CANNOT_FETCH_REGISTER
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: %s # %s\n",
953 "CANNOT_FETCH_REGISTER(regnum)",
954 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
958 (long) current_gdbarch
->cannot_fetch_register
959 /*CANNOT_FETCH_REGISTER ()*/);
961 #ifdef CANNOT_STORE_REGISTER
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: %s # %s\n",
964 "CANNOT_STORE_REGISTER(regnum)",
965 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
969 (long) current_gdbarch
->cannot_store_register
970 /*CANNOT_STORE_REGISTER ()*/);
972 #ifdef COERCE_FLOAT_TO_DOUBLE
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: %s # %s\n",
975 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
976 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
978 fprintf_unfiltered (file
,
979 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
980 (long) current_gdbarch
->coerce_float_to_double
981 /*COERCE_FLOAT_TO_DOUBLE ()*/);
983 #ifdef COFF_MAKE_MSYMBOL_SPECIAL
985 /* Macro might contain `[{}]' when not multi-arch */
986 fprintf_unfiltered (file
,
987 "gdbarch_dump: %s # %s\n",
988 "COFF_MAKE_MSYMBOL_SPECIAL(val, msym)",
989 XSTRING (COFF_MAKE_MSYMBOL_SPECIAL (val
, msym
)));
992 fprintf_unfiltered (file
,
993 "gdbarch_dump: COFF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
994 (long) current_gdbarch
->coff_make_msymbol_special
995 /*COFF_MAKE_MSYMBOL_SPECIAL ()*/);
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
1000 (long) current_gdbarch
->construct_inferior_arguments
);
1001 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: %s # %s\n",
1004 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1005 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1009 (long) current_gdbarch
->convert_from_func_ptr_addr
1010 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1012 #ifdef DECR_PC_AFTER_BREAK
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1015 XSTRING (DECR_PC_AFTER_BREAK
));
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1018 (long) DECR_PC_AFTER_BREAK
);
1020 #ifdef DO_REGISTERS_INFO
1022 /* Macro might contain `[{}]' when not multi-arch */
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: %s # %s\n",
1025 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1026 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1031 (long) current_gdbarch
->do_registers_info
1032 /*DO_REGISTERS_INFO ()*/);
1034 #ifdef DWARF2_BUILD_FRAME_INFO
1036 /* Macro might contain `[{}]' when not multi-arch */
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: %s # %s\n",
1039 "DWARF2_BUILD_FRAME_INFO(objfile)",
1040 XSTRING (DWARF2_BUILD_FRAME_INFO (objfile
)));
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: DWARF2_BUILD_FRAME_INFO = 0x%08lx\n",
1045 (long) current_gdbarch
->dwarf2_build_frame_info
1046 /*DWARF2_BUILD_FRAME_INFO ()*/);
1048 #ifdef DWARF2_REG_TO_REGNUM
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: %s # %s\n",
1051 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1052 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1056 (long) current_gdbarch
->dwarf2_reg_to_regnum
1057 /*DWARF2_REG_TO_REGNUM ()*/);
1059 #ifdef DWARF_REG_TO_REGNUM
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: %s # %s\n",
1062 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1063 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1067 (long) current_gdbarch
->dwarf_reg_to_regnum
1068 /*DWARF_REG_TO_REGNUM ()*/);
1070 #ifdef ECOFF_REG_TO_REGNUM
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: %s # %s\n",
1073 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1074 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1078 (long) current_gdbarch
->ecoff_reg_to_regnum
1079 /*ECOFF_REG_TO_REGNUM ()*/);
1081 #ifdef ELF_MAKE_MSYMBOL_SPECIAL
1083 /* Macro might contain `[{}]' when not multi-arch */
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: %s # %s\n",
1086 "ELF_MAKE_MSYMBOL_SPECIAL(sym, msym)",
1087 XSTRING (ELF_MAKE_MSYMBOL_SPECIAL (sym
, msym
)));
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: ELF_MAKE_MSYMBOL_SPECIAL = 0x%08lx\n",
1092 (long) current_gdbarch
->elf_make_msymbol_special
1093 /*ELF_MAKE_MSYMBOL_SPECIAL ()*/);
1095 #ifdef EXTRACT_RETURN_VALUE
1097 /* Macro might contain `[{}]' when not multi-arch */
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: %s # %s\n",
1100 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1101 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1106 (long) current_gdbarch
->extract_return_value
1107 /*EXTRACT_RETURN_VALUE ()*/);
1109 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: %s # %s\n",
1112 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1113 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1117 (long) current_gdbarch
->extract_struct_value_address
1118 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1120 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1123 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %d\n",
1126 EXTRA_STACK_ALIGNMENT_NEEDED
);
1128 #ifdef FETCH_PSEUDO_REGISTER
1130 /* Macro might contain `[{}]' when not multi-arch */
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: %s # %s\n",
1133 "FETCH_PSEUDO_REGISTER(regnum)",
1134 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1139 (long) current_gdbarch
->fetch_pseudo_register
1140 /*FETCH_PSEUDO_REGISTER ()*/);
1142 #ifdef FIX_CALL_DUMMY
1144 /* Macro might contain `[{}]' when not multi-arch */
1145 fprintf_unfiltered (file
,
1146 "gdbarch_dump: %s # %s\n",
1147 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1148 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1151 fprintf_unfiltered (file
,
1152 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1153 (long) current_gdbarch
->fix_call_dummy
1154 /*FIX_CALL_DUMMY ()*/);
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: FP0_REGNUM # %s\n",
1159 XSTRING (FP0_REGNUM
));
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: FP0_REGNUM = %d\n",
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: FP_REGNUM # %s\n",
1167 XSTRING (FP_REGNUM
));
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: FP_REGNUM = %d\n",
1172 #ifdef FRAMELESS_FUNCTION_INVOCATION
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: %s # %s\n",
1175 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1176 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1180 (long) current_gdbarch
->frameless_function_invocation
1181 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1183 #ifdef FRAME_ARGS_ADDRESS
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: %s # %s\n",
1186 "FRAME_ARGS_ADDRESS(fi)",
1187 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1191 (long) current_gdbarch
->frame_args_address
1192 /*FRAME_ARGS_ADDRESS ()*/);
1194 #ifdef FRAME_ARGS_SKIP
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1197 XSTRING (FRAME_ARGS_SKIP
));
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1200 (long) FRAME_ARGS_SKIP
);
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: %s # %s\n",
1205 "FRAME_CHAIN(frame)",
1206 XSTRING (FRAME_CHAIN (frame
)));
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1210 (long) current_gdbarch
->frame_chain
1211 /*FRAME_CHAIN ()*/);
1213 #ifdef FRAME_CHAIN_VALID
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: %s # %s\n",
1216 "FRAME_CHAIN_VALID(chain, thisframe)",
1217 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1221 (long) current_gdbarch
->frame_chain_valid
1222 /*FRAME_CHAIN_VALID ()*/);
1224 #ifdef FRAME_INIT_SAVED_REGS
1226 /* Macro might contain `[{}]' when not multi-arch */
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: %s # %s\n",
1229 "FRAME_INIT_SAVED_REGS(frame)",
1230 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1235 (long) current_gdbarch
->frame_init_saved_regs
1236 /*FRAME_INIT_SAVED_REGS ()*/);
1238 #ifdef FRAME_LOCALS_ADDRESS
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: %s # %s\n",
1241 "FRAME_LOCALS_ADDRESS(fi)",
1242 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1246 (long) current_gdbarch
->frame_locals_address
1247 /*FRAME_LOCALS_ADDRESS ()*/);
1249 #ifdef FRAME_NUM_ARGS
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: %s # %s\n",
1252 "FRAME_NUM_ARGS(frame)",
1253 XSTRING (FRAME_NUM_ARGS (frame
)));
1255 fprintf_unfiltered (file
,
1256 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1257 (long) current_gdbarch
->frame_num_args
1258 /*FRAME_NUM_ARGS ()*/);
1260 #ifdef FRAME_SAVED_PC
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: %s # %s\n",
1263 "FRAME_SAVED_PC(fi)",
1264 XSTRING (FRAME_SAVED_PC (fi
)));
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1268 (long) current_gdbarch
->frame_saved_pc
1269 /*FRAME_SAVED_PC ()*/);
1271 #ifdef FUNCTION_START_OFFSET
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1274 XSTRING (FUNCTION_START_OFFSET
));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1277 (long) FUNCTION_START_OFFSET
);
1279 #ifdef GET_LONGJMP_TARGET
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: %s # %s\n",
1282 "GET_LONGJMP_TARGET(pc)",
1283 XSTRING (GET_LONGJMP_TARGET (pc
)));
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: GET_LONGJMP_TARGET = 0x%08lx\n",
1287 (long) current_gdbarch
->get_longjmp_target
1288 /*GET_LONGJMP_TARGET ()*/);
1290 #ifdef GET_SAVED_REGISTER
1292 /* Macro might contain `[{}]' when not multi-arch */
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1296 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1301 (long) current_gdbarch
->get_saved_register
1302 /*GET_SAVED_REGISTER ()*/);
1304 #ifdef INIT_EXTRA_FRAME_INFO
1306 /* Macro might contain `[{}]' when not multi-arch */
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: %s # %s\n",
1309 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1310 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1315 (long) current_gdbarch
->init_extra_frame_info
1316 /*INIT_EXTRA_FRAME_INFO ()*/);
1318 #ifdef INIT_FRAME_PC
1320 /* Macro might contain `[{}]' when not multi-arch */
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: %s # %s\n",
1323 "INIT_FRAME_PC(fromleaf, prev)",
1324 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1329 (long) current_gdbarch
->init_frame_pc
1330 /*INIT_FRAME_PC ()*/);
1332 #ifdef INIT_FRAME_PC_FIRST
1334 /* Macro might contain `[{}]' when not multi-arch */
1335 fprintf_unfiltered (file
,
1336 "gdbarch_dump: %s # %s\n",
1337 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1338 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1343 (long) current_gdbarch
->init_frame_pc_first
1344 /*INIT_FRAME_PC_FIRST ()*/);
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: %s # %s\n",
1349 "INNER_THAN(lhs, rhs)",
1350 XSTRING (INNER_THAN (lhs
, rhs
)));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1354 (long) current_gdbarch
->inner_than
1357 #ifdef INTEGER_TO_ADDRESS
1358 fprintf_unfiltered (file
,
1359 "gdbarch_dump: %s # %s\n",
1360 "INTEGER_TO_ADDRESS(type, buf)",
1361 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1365 (long) current_gdbarch
->integer_to_address
1366 /*INTEGER_TO_ADDRESS ()*/);
1368 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: %s # %s\n",
1371 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1372 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1376 (long) current_gdbarch
->in_solib_call_trampoline
1377 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1379 #ifdef MAX_REGISTER_RAW_SIZE
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1382 XSTRING (MAX_REGISTER_RAW_SIZE
));
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %d\n",
1385 MAX_REGISTER_RAW_SIZE
);
1387 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1390 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %d\n",
1393 MAX_REGISTER_VIRTUAL_SIZE
);
1395 #ifdef MEMORY_INSERT_BREAKPOINT
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: %s # %s\n",
1398 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1399 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1403 (long) current_gdbarch
->memory_insert_breakpoint
1404 /*MEMORY_INSERT_BREAKPOINT ()*/);
1406 #ifdef MEMORY_REMOVE_BREAKPOINT
1407 fprintf_unfiltered (file
,
1408 "gdbarch_dump: %s # %s\n",
1409 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1410 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1412 fprintf_unfiltered (file
,
1413 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1414 (long) current_gdbarch
->memory_remove_breakpoint
1415 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1418 fprintf_unfiltered (file
,
1419 "gdbarch_dump: NNPC_REGNUM # %s\n",
1420 XSTRING (NNPC_REGNUM
));
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: NNPC_REGNUM = %d\n",
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: NPC_REGNUM # %s\n",
1428 XSTRING (NPC_REGNUM
));
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: NPC_REGNUM = %d\n",
1433 #ifdef NUM_PSEUDO_REGS
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1436 XSTRING (NUM_PSEUDO_REGS
));
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: NUM_PSEUDO_REGS = %d\n",
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: NUM_REGS # %s\n",
1444 XSTRING (NUM_REGS
));
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: NUM_REGS = %d\n",
1449 #ifdef PARM_BOUNDARY
1450 fprintf_unfiltered (file
,
1451 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1452 XSTRING (PARM_BOUNDARY
));
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: PARM_BOUNDARY = %d\n",
1457 #ifdef PC_IN_CALL_DUMMY
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: %s # %s\n",
1460 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1461 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1465 (long) current_gdbarch
->pc_in_call_dummy
1466 /*PC_IN_CALL_DUMMY ()*/);
1468 #ifdef PC_IN_SIGTRAMP
1469 fprintf_unfiltered (file
,
1470 "gdbarch_dump: %s # %s\n",
1471 "PC_IN_SIGTRAMP(pc, name)",
1472 XSTRING (PC_IN_SIGTRAMP (pc
, name
)));
1474 fprintf_unfiltered (file
,
1475 "gdbarch_dump: PC_IN_SIGTRAMP = 0x%08lx\n",
1476 (long) current_gdbarch
->pc_in_sigtramp
1477 /*PC_IN_SIGTRAMP ()*/);
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: PC_REGNUM # %s\n",
1482 XSTRING (PC_REGNUM
));
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: PC_REGNUM = %d\n",
1487 #ifdef POINTER_TO_ADDRESS
1488 fprintf_unfiltered (file
,
1489 "gdbarch_dump: %s # %s\n",
1490 "POINTER_TO_ADDRESS(type, buf)",
1491 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1495 (long) current_gdbarch
->pointer_to_address
1496 /*POINTER_TO_ADDRESS ()*/);
1500 /* Macro might contain `[{}]' when not multi-arch */
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: %s # %s\n",
1504 XSTRING (POP_FRAME (-)));
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1509 (long) current_gdbarch
->pop_frame
1512 #ifdef PREPARE_TO_PROCEED
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: %s # %s\n",
1515 "PREPARE_TO_PROCEED(select_it)",
1516 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1520 (long) current_gdbarch
->prepare_to_proceed
1521 /*PREPARE_TO_PROCEED ()*/);
1523 #ifdef PRINT_FLOAT_INFO
1525 /* Macro might contain `[{}]' when not multi-arch */
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: %s # %s\n",
1528 "PRINT_FLOAT_INFO()",
1529 XSTRING (PRINT_FLOAT_INFO ()));
1532 fprintf_unfiltered (file
,
1533 "gdbarch_dump: PRINT_FLOAT_INFO = 0x%08lx\n",
1534 (long) current_gdbarch
->print_float_info
1535 /*PRINT_FLOAT_INFO ()*/);
1537 #ifdef PROLOGUE_FRAMELESS_P
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: %s # %s\n",
1540 "PROLOGUE_FRAMELESS_P(ip)",
1541 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1545 (long) current_gdbarch
->prologue_frameless_p
1546 /*PROLOGUE_FRAMELESS_P ()*/);
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: PS_REGNUM # %s\n",
1551 XSTRING (PS_REGNUM
));
1552 fprintf_unfiltered (file
,
1553 "gdbarch_dump: PS_REGNUM = %d\n",
1556 #ifdef PUSH_ARGUMENTS
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: %s # %s\n",
1559 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1560 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1562 fprintf_unfiltered (file
,
1563 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1564 (long) current_gdbarch
->push_arguments
1565 /*PUSH_ARGUMENTS ()*/);
1567 #ifdef PUSH_DUMMY_FRAME
1569 /* Macro might contain `[{}]' when not multi-arch */
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: %s # %s\n",
1572 "PUSH_DUMMY_FRAME(-)",
1573 XSTRING (PUSH_DUMMY_FRAME (-)));
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1578 (long) current_gdbarch
->push_dummy_frame
1579 /*PUSH_DUMMY_FRAME ()*/);
1581 #ifdef PUSH_RETURN_ADDRESS
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: %s # %s\n",
1584 "PUSH_RETURN_ADDRESS(pc, sp)",
1585 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1589 (long) current_gdbarch
->push_return_address
1590 /*PUSH_RETURN_ADDRESS ()*/);
1592 #ifdef REGISTER_BYTE
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: %s # %s\n",
1595 "REGISTER_BYTE(reg_nr)",
1596 XSTRING (REGISTER_BYTE (reg_nr
)));
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1600 (long) current_gdbarch
->register_byte
1601 /*REGISTER_BYTE ()*/);
1603 #ifdef REGISTER_BYTES
1604 fprintf_unfiltered (file
,
1605 "gdbarch_dump: REGISTER_BYTES # %s\n",
1606 XSTRING (REGISTER_BYTES
));
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: REGISTER_BYTES = %d\n",
1611 #ifdef REGISTER_BYTES_OK
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: %s # %s\n",
1614 "REGISTER_BYTES_OK(nr_bytes)",
1615 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1619 (long) current_gdbarch
->register_bytes_ok
1620 /*REGISTER_BYTES_OK ()*/);
1622 #ifdef REGISTER_CONVERTIBLE
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: %s # %s\n",
1625 "REGISTER_CONVERTIBLE(nr)",
1626 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1630 (long) current_gdbarch
->register_convertible
1631 /*REGISTER_CONVERTIBLE ()*/);
1633 #ifdef REGISTER_CONVERT_TO_RAW
1635 /* Macro might contain `[{}]' when not multi-arch */
1636 fprintf_unfiltered (file
,
1637 "gdbarch_dump: %s # %s\n",
1638 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1639 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1642 fprintf_unfiltered (file
,
1643 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1644 (long) current_gdbarch
->register_convert_to_raw
1645 /*REGISTER_CONVERT_TO_RAW ()*/);
1647 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1649 /* Macro might contain `[{}]' when not multi-arch */
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: %s # %s\n",
1652 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1653 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1658 (long) current_gdbarch
->register_convert_to_virtual
1659 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1661 #ifdef REGISTER_NAME
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: %s # %s\n",
1664 "REGISTER_NAME(regnr)",
1665 XSTRING (REGISTER_NAME (regnr
)));
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1669 (long) current_gdbarch
->register_name
1670 /*REGISTER_NAME ()*/);
1672 #ifdef REGISTER_RAW_SIZE
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: %s # %s\n",
1675 "REGISTER_RAW_SIZE(reg_nr)",
1676 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1680 (long) current_gdbarch
->register_raw_size
1681 /*REGISTER_RAW_SIZE ()*/);
1683 #ifdef REGISTER_SIM_REGNO
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: %s # %s\n",
1686 "REGISTER_SIM_REGNO(reg_nr)",
1687 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1691 (long) current_gdbarch
->register_sim_regno
1692 /*REGISTER_SIM_REGNO ()*/);
1694 #ifdef REGISTER_SIZE
1695 fprintf_unfiltered (file
,
1696 "gdbarch_dump: REGISTER_SIZE # %s\n",
1697 XSTRING (REGISTER_SIZE
));
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: REGISTER_SIZE = %d\n",
1702 #ifdef REGISTER_VIRTUAL_SIZE
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: %s # %s\n",
1705 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1706 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1710 (long) current_gdbarch
->register_virtual_size
1711 /*REGISTER_VIRTUAL_SIZE ()*/);
1713 #ifdef REGISTER_VIRTUAL_TYPE
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: %s # %s\n",
1716 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1717 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1721 (long) current_gdbarch
->register_virtual_type
1722 /*REGISTER_VIRTUAL_TYPE ()*/);
1724 #ifdef REG_STRUCT_HAS_ADDR
1725 fprintf_unfiltered (file
,
1726 "gdbarch_dump: %s # %s\n",
1727 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1728 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1732 (long) current_gdbarch
->reg_struct_has_addr
1733 /*REG_STRUCT_HAS_ADDR ()*/);
1735 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1737 /* Macro might contain `[{}]' when not multi-arch */
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: %s # %s\n",
1740 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1741 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1746 (long) current_gdbarch
->remote_translate_xfer_address
1747 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1749 #ifdef RETURN_VALUE_ON_STACK
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: %s # %s\n",
1752 "RETURN_VALUE_ON_STACK(type)",
1753 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1755 fprintf_unfiltered (file
,
1756 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1757 (long) current_gdbarch
->return_value_on_stack
1758 /*RETURN_VALUE_ON_STACK ()*/);
1760 #ifdef SAVED_PC_AFTER_CALL
1761 fprintf_unfiltered (file
,
1762 "gdbarch_dump: %s # %s\n",
1763 "SAVED_PC_AFTER_CALL(frame)",
1764 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1766 fprintf_unfiltered (file
,
1767 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1768 (long) current_gdbarch
->saved_pc_after_call
1769 /*SAVED_PC_AFTER_CALL ()*/);
1771 #ifdef SAVE_DUMMY_FRAME_TOS
1773 /* Macro might contain `[{}]' when not multi-arch */
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: %s # %s\n",
1776 "SAVE_DUMMY_FRAME_TOS(sp)",
1777 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1782 (long) current_gdbarch
->save_dummy_frame_tos
1783 /*SAVE_DUMMY_FRAME_TOS ()*/);
1785 #ifdef SDB_REG_TO_REGNUM
1786 fprintf_unfiltered (file
,
1787 "gdbarch_dump: %s # %s\n",
1788 "SDB_REG_TO_REGNUM(sdb_regnr)",
1789 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1791 fprintf_unfiltered (file
,
1792 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1793 (long) current_gdbarch
->sdb_reg_to_regnum
1794 /*SDB_REG_TO_REGNUM ()*/);
1796 #ifdef SIZEOF_CALL_DUMMY_WORDS
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1799 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1802 (long) SIZEOF_CALL_DUMMY_WORDS
);
1804 #ifdef SKIP_PROLOGUE
1805 fprintf_unfiltered (file
,
1806 "gdbarch_dump: %s # %s\n",
1807 "SKIP_PROLOGUE(ip)",
1808 XSTRING (SKIP_PROLOGUE (ip
)));
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1812 (long) current_gdbarch
->skip_prologue
1813 /*SKIP_PROLOGUE ()*/);
1815 #ifdef SKIP_TRAMPOLINE_CODE
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: %s # %s\n",
1818 "SKIP_TRAMPOLINE_CODE(pc)",
1819 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1821 fprintf_unfiltered (file
,
1822 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1823 (long) current_gdbarch
->skip_trampoline_code
1824 /*SKIP_TRAMPOLINE_CODE ()*/);
1826 #ifdef SMASH_TEXT_ADDRESS
1827 fprintf_unfiltered (file
,
1828 "gdbarch_dump: %s # %s\n",
1829 "SMASH_TEXT_ADDRESS(addr)",
1830 XSTRING (SMASH_TEXT_ADDRESS (addr
)));
1832 fprintf_unfiltered (file
,
1833 "gdbarch_dump: SMASH_TEXT_ADDRESS = 0x%08lx\n",
1834 (long) current_gdbarch
->smash_text_address
1835 /*SMASH_TEXT_ADDRESS ()*/);
1837 #ifdef SOFTWARE_SINGLE_STEP
1839 /* Macro might contain `[{}]' when not multi-arch */
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: %s # %s\n",
1842 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1843 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1848 (long) current_gdbarch
->software_single_step
1849 /*SOFTWARE_SINGLE_STEP ()*/);
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: SP_REGNUM # %s\n",
1854 XSTRING (SP_REGNUM
));
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: SP_REGNUM = %d\n",
1859 #ifdef STAB_REG_TO_REGNUM
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: %s # %s\n",
1862 "STAB_REG_TO_REGNUM(stab_regnr)",
1863 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1867 (long) current_gdbarch
->stab_reg_to_regnum
1868 /*STAB_REG_TO_REGNUM ()*/);
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: %s # %s\n",
1874 XSTRING (STACK_ALIGN (sp
)));
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1878 (long) current_gdbarch
->stack_align
1879 /*STACK_ALIGN ()*/);
1881 #ifdef STORE_PSEUDO_REGISTER
1883 /* Macro might contain `[{}]' when not multi-arch */
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: %s # %s\n",
1886 "STORE_PSEUDO_REGISTER(regnum)",
1887 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1892 (long) current_gdbarch
->store_pseudo_register
1893 /*STORE_PSEUDO_REGISTER ()*/);
1895 #ifdef STORE_RETURN_VALUE
1897 /* Macro might contain `[{}]' when not multi-arch */
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: %s # %s\n",
1900 "STORE_RETURN_VALUE(type, valbuf)",
1901 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1906 (long) current_gdbarch
->store_return_value
1907 /*STORE_RETURN_VALUE ()*/);
1909 #ifdef STORE_STRUCT_RETURN
1911 /* Macro might contain `[{}]' when not multi-arch */
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: %s # %s\n",
1914 "STORE_STRUCT_RETURN(addr, sp)",
1915 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1918 fprintf_unfiltered (file
,
1919 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1920 (long) current_gdbarch
->store_struct_return
1921 /*STORE_STRUCT_RETURN ()*/);
1923 #ifdef TARGET_ADDR_BIT
1924 fprintf_unfiltered (file
,
1925 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1926 XSTRING (TARGET_ADDR_BIT
));
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: TARGET_ADDR_BIT = %d\n",
1931 #ifdef TARGET_ARCHITECTURE
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1934 XSTRING (TARGET_ARCHITECTURE
));
1935 if (TARGET_ARCHITECTURE
!= NULL
)
1936 fprintf_unfiltered (file
,
1937 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1938 TARGET_ARCHITECTURE
->printable_name
);
1940 #ifdef TARGET_BFD_VMA_BIT
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1943 XSTRING (TARGET_BFD_VMA_BIT
));
1944 fprintf_unfiltered (file
,
1945 "gdbarch_dump: TARGET_BFD_VMA_BIT = %d\n",
1946 TARGET_BFD_VMA_BIT
);
1948 #ifdef TARGET_BYTE_ORDER
1949 fprintf_unfiltered (file
,
1950 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1951 XSTRING (TARGET_BYTE_ORDER
));
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1954 (long) TARGET_BYTE_ORDER
);
1956 #ifdef TARGET_CHAR_SIGNED
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: TARGET_CHAR_SIGNED # %s\n",
1959 XSTRING (TARGET_CHAR_SIGNED
));
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: TARGET_CHAR_SIGNED = %d\n",
1962 TARGET_CHAR_SIGNED
);
1964 #ifdef TARGET_DOUBLE_BIT
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1967 XSTRING (TARGET_DOUBLE_BIT
));
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: TARGET_DOUBLE_BIT = %d\n",
1972 #ifdef TARGET_DOUBLE_FORMAT
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1975 XSTRING (TARGET_DOUBLE_FORMAT
));
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1978 (long) TARGET_DOUBLE_FORMAT
);
1980 #ifdef TARGET_FLOAT_BIT
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1983 XSTRING (TARGET_FLOAT_BIT
));
1984 fprintf_unfiltered (file
,
1985 "gdbarch_dump: TARGET_FLOAT_BIT = %d\n",
1988 #ifdef TARGET_FLOAT_FORMAT
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1991 XSTRING (TARGET_FLOAT_FORMAT
));
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1994 (long) TARGET_FLOAT_FORMAT
);
1996 #ifdef TARGET_INT_BIT
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1999 XSTRING (TARGET_INT_BIT
));
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: TARGET_INT_BIT = %d\n",
2004 #ifdef TARGET_LONG_BIT
2005 fprintf_unfiltered (file
,
2006 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
2007 XSTRING (TARGET_LONG_BIT
));
2008 fprintf_unfiltered (file
,
2009 "gdbarch_dump: TARGET_LONG_BIT = %d\n",
2012 #ifdef TARGET_LONG_DOUBLE_BIT
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
2015 XSTRING (TARGET_LONG_DOUBLE_BIT
));
2016 fprintf_unfiltered (file
,
2017 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %d\n",
2018 TARGET_LONG_DOUBLE_BIT
);
2020 #ifdef TARGET_LONG_DOUBLE_FORMAT
2021 fprintf_unfiltered (file
,
2022 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
2023 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
2024 fprintf_unfiltered (file
,
2025 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2026 (long) TARGET_LONG_DOUBLE_FORMAT
);
2028 #ifdef TARGET_LONG_LONG_BIT
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
2031 XSTRING (TARGET_LONG_LONG_BIT
));
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: TARGET_LONG_LONG_BIT = %d\n",
2034 TARGET_LONG_LONG_BIT
);
2036 #ifdef TARGET_PRINT_INSN
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: %s # %s\n",
2039 "TARGET_PRINT_INSN(vma, info)",
2040 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
2042 fprintf_unfiltered (file
,
2043 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2044 (long) current_gdbarch
->print_insn
2045 /*TARGET_PRINT_INSN ()*/);
2047 #ifdef TARGET_PTR_BIT
2048 fprintf_unfiltered (file
,
2049 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
2050 XSTRING (TARGET_PTR_BIT
));
2051 fprintf_unfiltered (file
,
2052 "gdbarch_dump: TARGET_PTR_BIT = %d\n",
2055 #ifdef TARGET_READ_FP
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: %s # %s\n",
2059 XSTRING (TARGET_READ_FP ()));
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
2063 (long) current_gdbarch
->read_fp
2064 /*TARGET_READ_FP ()*/);
2066 #ifdef TARGET_READ_PC
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: %s # %s\n",
2069 "TARGET_READ_PC(ptid)",
2070 XSTRING (TARGET_READ_PC (ptid
)));
2072 fprintf_unfiltered (file
,
2073 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
2074 (long) current_gdbarch
->read_pc
2075 /*TARGET_READ_PC ()*/);
2077 #ifdef TARGET_READ_SP
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: %s # %s\n",
2081 XSTRING (TARGET_READ_SP ()));
2083 fprintf_unfiltered (file
,
2084 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
2085 (long) current_gdbarch
->read_sp
2086 /*TARGET_READ_SP ()*/);
2088 #ifdef TARGET_SHORT_BIT
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2091 XSTRING (TARGET_SHORT_BIT
));
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: TARGET_SHORT_BIT = %d\n",
2096 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2098 /* Macro might contain `[{}]' when not multi-arch */
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: %s # %s\n",
2101 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2102 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2105 fprintf_unfiltered (file
,
2106 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2107 (long) current_gdbarch
->virtual_frame_pointer
2108 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2110 #ifdef TARGET_WRITE_PC
2112 /* Macro might contain `[{}]' when not multi-arch */
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: %s # %s\n",
2115 "TARGET_WRITE_PC(val, ptid)",
2116 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2119 fprintf_unfiltered (file
,
2120 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2121 (long) current_gdbarch
->write_pc
2122 /*TARGET_WRITE_PC ()*/);
2124 #ifdef TARGET_WRITE_SP
2126 /* Macro might contain `[{}]' when not multi-arch */
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: %s # %s\n",
2129 "TARGET_WRITE_SP(val)",
2130 XSTRING (TARGET_WRITE_SP (val
)));
2133 fprintf_unfiltered (file
,
2134 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2135 (long) current_gdbarch
->write_sp
2136 /*TARGET_WRITE_SP ()*/);
2138 #ifdef USE_GENERIC_DUMMY_FRAMES
2139 fprintf_unfiltered (file
,
2140 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2141 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2142 fprintf_unfiltered (file
,
2143 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %d\n",
2144 USE_GENERIC_DUMMY_FRAMES
);
2146 #ifdef USE_STRUCT_CONVENTION
2147 fprintf_unfiltered (file
,
2148 "gdbarch_dump: %s # %s\n",
2149 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2150 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2152 fprintf_unfiltered (file
,
2153 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2154 (long) current_gdbarch
->use_struct_convention
2155 /*USE_STRUCT_CONVENTION ()*/);
2157 if (current_gdbarch
->dump_tdep
!= NULL
)
2158 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2161 struct gdbarch_tdep
*
2162 gdbarch_tdep (struct gdbarch
*gdbarch
)
2164 if (gdbarch_debug
>= 2)
2165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2166 return gdbarch
->tdep
;
2170 const struct bfd_arch_info
*
2171 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2173 if (gdbarch_debug
>= 2)
2174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2175 return gdbarch
->bfd_arch_info
;
2179 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2181 if (gdbarch_debug
>= 2)
2182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2183 return gdbarch
->byte_order
;
2187 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2189 /* Skip verify of short_bit, invalid_p == 0 */
2190 if (gdbarch_debug
>= 2)
2191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2192 return gdbarch
->short_bit
;
2196 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2199 gdbarch
->short_bit
= short_bit
;
2203 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2205 /* Skip verify of int_bit, invalid_p == 0 */
2206 if (gdbarch_debug
>= 2)
2207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2208 return gdbarch
->int_bit
;
2212 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2215 gdbarch
->int_bit
= int_bit
;
2219 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2221 /* Skip verify of long_bit, invalid_p == 0 */
2222 if (gdbarch_debug
>= 2)
2223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2224 return gdbarch
->long_bit
;
2228 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2231 gdbarch
->long_bit
= long_bit
;
2235 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2237 /* Skip verify of long_long_bit, invalid_p == 0 */
2238 if (gdbarch_debug
>= 2)
2239 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2240 return gdbarch
->long_long_bit
;
2244 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2247 gdbarch
->long_long_bit
= long_long_bit
;
2251 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2253 /* Skip verify of float_bit, invalid_p == 0 */
2254 if (gdbarch_debug
>= 2)
2255 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2256 return gdbarch
->float_bit
;
2260 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2263 gdbarch
->float_bit
= float_bit
;
2267 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2269 /* Skip verify of double_bit, invalid_p == 0 */
2270 if (gdbarch_debug
>= 2)
2271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2272 return gdbarch
->double_bit
;
2276 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2279 gdbarch
->double_bit
= double_bit
;
2283 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2285 /* Skip verify of long_double_bit, invalid_p == 0 */
2286 if (gdbarch_debug
>= 2)
2287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2288 return gdbarch
->long_double_bit
;
2292 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2293 int long_double_bit
)
2295 gdbarch
->long_double_bit
= long_double_bit
;
2299 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2301 /* Skip verify of ptr_bit, invalid_p == 0 */
2302 if (gdbarch_debug
>= 2)
2303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2304 return gdbarch
->ptr_bit
;
2308 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2311 gdbarch
->ptr_bit
= ptr_bit
;
2315 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2317 if (gdbarch
->addr_bit
== 0)
2318 internal_error (__FILE__
, __LINE__
,
2319 "gdbarch: gdbarch_addr_bit invalid");
2320 if (gdbarch_debug
>= 2)
2321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2322 return gdbarch
->addr_bit
;
2326 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2329 gdbarch
->addr_bit
= addr_bit
;
2333 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2335 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2336 if (gdbarch_debug
>= 2)
2337 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2338 return gdbarch
->bfd_vma_bit
;
2342 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2345 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2349 gdbarch_char_signed (struct gdbarch
*gdbarch
)
2351 if (gdbarch
->char_signed
== -1)
2352 internal_error (__FILE__
, __LINE__
,
2353 "gdbarch: gdbarch_char_signed invalid");
2354 if (gdbarch_debug
>= 2)
2355 fprintf_unfiltered (gdb_stdlog
, "gdbarch_char_signed called\n");
2356 return gdbarch
->char_signed
;
2360 set_gdbarch_char_signed (struct gdbarch
*gdbarch
,
2363 gdbarch
->char_signed
= char_signed
;
2367 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2369 if (gdbarch
->read_pc
== 0)
2370 internal_error (__FILE__
, __LINE__
,
2371 "gdbarch: gdbarch_read_pc invalid");
2372 if (gdbarch_debug
>= 2)
2373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2374 return gdbarch
->read_pc (ptid
);
2378 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2379 gdbarch_read_pc_ftype read_pc
)
2381 gdbarch
->read_pc
= read_pc
;
2385 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2387 if (gdbarch
->write_pc
== 0)
2388 internal_error (__FILE__
, __LINE__
,
2389 "gdbarch: gdbarch_write_pc invalid");
2390 if (gdbarch_debug
>= 2)
2391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2392 gdbarch
->write_pc (val
, ptid
);
2396 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2397 gdbarch_write_pc_ftype write_pc
)
2399 gdbarch
->write_pc
= write_pc
;
2403 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2405 if (gdbarch
->read_fp
== 0)
2406 internal_error (__FILE__
, __LINE__
,
2407 "gdbarch: gdbarch_read_fp invalid");
2408 if (gdbarch_debug
>= 2)
2409 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2410 return gdbarch
->read_fp ();
2414 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2415 gdbarch_read_fp_ftype read_fp
)
2417 gdbarch
->read_fp
= read_fp
;
2421 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2423 if (gdbarch
->read_sp
== 0)
2424 internal_error (__FILE__
, __LINE__
,
2425 "gdbarch: gdbarch_read_sp invalid");
2426 if (gdbarch_debug
>= 2)
2427 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2428 return gdbarch
->read_sp ();
2432 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2433 gdbarch_read_sp_ftype read_sp
)
2435 gdbarch
->read_sp
= read_sp
;
2439 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2441 if (gdbarch
->write_sp
== 0)
2442 internal_error (__FILE__
, __LINE__
,
2443 "gdbarch: gdbarch_write_sp invalid");
2444 if (gdbarch_debug
>= 2)
2445 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2446 gdbarch
->write_sp (val
);
2450 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2451 gdbarch_write_sp_ftype write_sp
)
2453 gdbarch
->write_sp
= write_sp
;
2457 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2459 if (gdbarch
->virtual_frame_pointer
== 0)
2460 internal_error (__FILE__
, __LINE__
,
2461 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2462 if (gdbarch_debug
>= 2)
2463 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2464 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2468 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2469 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2471 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2475 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2477 return gdbarch
->register_read
!= 0;
2481 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2483 if (gdbarch
->register_read
== 0)
2484 internal_error (__FILE__
, __LINE__
,
2485 "gdbarch: gdbarch_register_read invalid");
2486 if (gdbarch_debug
>= 2)
2487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2488 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2492 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2493 gdbarch_register_read_ftype register_read
)
2495 gdbarch
->register_read
= register_read
;
2499 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2501 return gdbarch
->register_write
!= 0;
2505 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2507 if (gdbarch
->register_write
== 0)
2508 internal_error (__FILE__
, __LINE__
,
2509 "gdbarch: gdbarch_register_write invalid");
2510 if (gdbarch_debug
>= 2)
2511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2512 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2516 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2517 gdbarch_register_write_ftype register_write
)
2519 gdbarch
->register_write
= register_write
;
2523 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2525 if (gdbarch
->num_regs
== -1)
2526 internal_error (__FILE__
, __LINE__
,
2527 "gdbarch: gdbarch_num_regs invalid");
2528 if (gdbarch_debug
>= 2)
2529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2530 return gdbarch
->num_regs
;
2534 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2537 gdbarch
->num_regs
= num_regs
;
2541 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2543 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2546 return gdbarch
->num_pseudo_regs
;
2550 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2551 int num_pseudo_regs
)
2553 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2557 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2559 /* Skip verify of sp_regnum, invalid_p == 0 */
2560 if (gdbarch_debug
>= 2)
2561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2562 return gdbarch
->sp_regnum
;
2566 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2569 gdbarch
->sp_regnum
= sp_regnum
;
2573 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2575 /* Skip verify of fp_regnum, invalid_p == 0 */
2576 if (gdbarch_debug
>= 2)
2577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2578 return gdbarch
->fp_regnum
;
2582 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2585 gdbarch
->fp_regnum
= fp_regnum
;
2589 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2591 /* Skip verify of pc_regnum, invalid_p == 0 */
2592 if (gdbarch_debug
>= 2)
2593 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2594 return gdbarch
->pc_regnum
;
2598 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2601 gdbarch
->pc_regnum
= pc_regnum
;
2605 gdbarch_ps_regnum (struct gdbarch
*gdbarch
)
2607 /* Skip verify of ps_regnum, invalid_p == 0 */
2608 if (gdbarch_debug
>= 2)
2609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ps_regnum called\n");
2610 return gdbarch
->ps_regnum
;
2614 set_gdbarch_ps_regnum (struct gdbarch
*gdbarch
,
2617 gdbarch
->ps_regnum
= ps_regnum
;
2621 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2623 /* Skip verify of fp0_regnum, invalid_p == 0 */
2624 if (gdbarch_debug
>= 2)
2625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2626 return gdbarch
->fp0_regnum
;
2630 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2633 gdbarch
->fp0_regnum
= fp0_regnum
;
2637 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2639 /* Skip verify of npc_regnum, invalid_p == 0 */
2640 if (gdbarch_debug
>= 2)
2641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2642 return gdbarch
->npc_regnum
;
2646 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2649 gdbarch
->npc_regnum
= npc_regnum
;
2653 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2655 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2656 if (gdbarch_debug
>= 2)
2657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2658 return gdbarch
->nnpc_regnum
;
2662 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2665 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2669 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2671 if (gdbarch
->stab_reg_to_regnum
== 0)
2672 internal_error (__FILE__
, __LINE__
,
2673 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2674 if (gdbarch_debug
>= 2)
2675 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2676 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2680 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2681 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2683 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2687 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2689 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2690 internal_error (__FILE__
, __LINE__
,
2691 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2692 if (gdbarch_debug
>= 2)
2693 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2694 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2698 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2699 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2701 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2705 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2707 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2708 internal_error (__FILE__
, __LINE__
,
2709 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2710 if (gdbarch_debug
>= 2)
2711 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2712 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2716 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2717 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2719 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2723 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2725 if (gdbarch
->sdb_reg_to_regnum
== 0)
2726 internal_error (__FILE__
, __LINE__
,
2727 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2728 if (gdbarch_debug
>= 2)
2729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2730 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2734 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2735 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2737 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2741 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2743 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2744 internal_error (__FILE__
, __LINE__
,
2745 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2746 if (gdbarch_debug
>= 2)
2747 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2748 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2752 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2753 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2755 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2759 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2761 if (gdbarch
->register_name
== 0)
2762 internal_error (__FILE__
, __LINE__
,
2763 "gdbarch: gdbarch_register_name invalid");
2764 if (gdbarch_debug
>= 2)
2765 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2766 return gdbarch
->register_name (regnr
);
2770 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2771 gdbarch_register_name_ftype register_name
)
2773 gdbarch
->register_name
= register_name
;
2777 gdbarch_register_size (struct gdbarch
*gdbarch
)
2779 if (gdbarch
->register_size
== -1)
2780 internal_error (__FILE__
, __LINE__
,
2781 "gdbarch: gdbarch_register_size invalid");
2782 if (gdbarch_debug
>= 2)
2783 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2784 return gdbarch
->register_size
;
2788 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2791 gdbarch
->register_size
= register_size
;
2795 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2797 if (gdbarch
->register_bytes
== -1)
2798 internal_error (__FILE__
, __LINE__
,
2799 "gdbarch: gdbarch_register_bytes invalid");
2800 if (gdbarch_debug
>= 2)
2801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2802 return gdbarch
->register_bytes
;
2806 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2809 gdbarch
->register_bytes
= register_bytes
;
2813 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2815 if (gdbarch
->register_byte
== 0)
2816 internal_error (__FILE__
, __LINE__
,
2817 "gdbarch: gdbarch_register_byte invalid");
2818 if (gdbarch_debug
>= 2)
2819 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2820 return gdbarch
->register_byte (reg_nr
);
2824 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2825 gdbarch_register_byte_ftype register_byte
)
2827 gdbarch
->register_byte
= register_byte
;
2831 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2833 if (gdbarch
->register_raw_size
== 0)
2834 internal_error (__FILE__
, __LINE__
,
2835 "gdbarch: gdbarch_register_raw_size invalid");
2836 if (gdbarch_debug
>= 2)
2837 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2838 return gdbarch
->register_raw_size (reg_nr
);
2842 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2843 gdbarch_register_raw_size_ftype register_raw_size
)
2845 gdbarch
->register_raw_size
= register_raw_size
;
2849 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2851 if (gdbarch
->max_register_raw_size
== -1)
2852 internal_error (__FILE__
, __LINE__
,
2853 "gdbarch: gdbarch_max_register_raw_size invalid");
2854 if (gdbarch_debug
>= 2)
2855 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2856 return gdbarch
->max_register_raw_size
;
2860 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2861 int max_register_raw_size
)
2863 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2867 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2869 if (gdbarch
->register_virtual_size
== 0)
2870 internal_error (__FILE__
, __LINE__
,
2871 "gdbarch: gdbarch_register_virtual_size invalid");
2872 if (gdbarch_debug
>= 2)
2873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2874 return gdbarch
->register_virtual_size (reg_nr
);
2878 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2879 gdbarch_register_virtual_size_ftype register_virtual_size
)
2881 gdbarch
->register_virtual_size
= register_virtual_size
;
2885 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2887 if (gdbarch
->max_register_virtual_size
== -1)
2888 internal_error (__FILE__
, __LINE__
,
2889 "gdbarch: gdbarch_max_register_virtual_size invalid");
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2892 return gdbarch
->max_register_virtual_size
;
2896 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2897 int max_register_virtual_size
)
2899 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2903 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2905 if (gdbarch
->register_virtual_type
== 0)
2906 internal_error (__FILE__
, __LINE__
,
2907 "gdbarch: gdbarch_register_virtual_type invalid");
2908 if (gdbarch_debug
>= 2)
2909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2910 return gdbarch
->register_virtual_type (reg_nr
);
2914 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2915 gdbarch_register_virtual_type_ftype register_virtual_type
)
2917 gdbarch
->register_virtual_type
= register_virtual_type
;
2921 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2923 if (gdbarch
->do_registers_info
== 0)
2924 internal_error (__FILE__
, __LINE__
,
2925 "gdbarch: gdbarch_do_registers_info invalid");
2926 if (gdbarch_debug
>= 2)
2927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2928 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2932 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2933 gdbarch_do_registers_info_ftype do_registers_info
)
2935 gdbarch
->do_registers_info
= do_registers_info
;
2939 gdbarch_print_float_info (struct gdbarch
*gdbarch
)
2941 if (gdbarch
->print_float_info
== 0)
2942 internal_error (__FILE__
, __LINE__
,
2943 "gdbarch: gdbarch_print_float_info invalid");
2944 if (gdbarch_debug
>= 2)
2945 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_float_info called\n");
2946 gdbarch
->print_float_info ();
2950 set_gdbarch_print_float_info (struct gdbarch
*gdbarch
,
2951 gdbarch_print_float_info_ftype print_float_info
)
2953 gdbarch
->print_float_info
= print_float_info
;
2957 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2959 if (gdbarch
->register_sim_regno
== 0)
2960 internal_error (__FILE__
, __LINE__
,
2961 "gdbarch: gdbarch_register_sim_regno invalid");
2962 if (gdbarch_debug
>= 2)
2963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2964 return gdbarch
->register_sim_regno (reg_nr
);
2968 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2969 gdbarch_register_sim_regno_ftype register_sim_regno
)
2971 gdbarch
->register_sim_regno
= register_sim_regno
;
2975 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2977 return gdbarch
->register_bytes_ok
!= 0;
2981 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2983 if (gdbarch
->register_bytes_ok
== 0)
2984 internal_error (__FILE__
, __LINE__
,
2985 "gdbarch: gdbarch_register_bytes_ok invalid");
2986 if (gdbarch_debug
>= 2)
2987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2988 return gdbarch
->register_bytes_ok (nr_bytes
);
2992 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2993 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2995 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2999 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3001 if (gdbarch
->cannot_fetch_register
== 0)
3002 internal_error (__FILE__
, __LINE__
,
3003 "gdbarch: gdbarch_cannot_fetch_register invalid");
3004 if (gdbarch_debug
>= 2)
3005 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3006 return gdbarch
->cannot_fetch_register (regnum
);
3010 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3011 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3013 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3017 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3019 if (gdbarch
->cannot_store_register
== 0)
3020 internal_error (__FILE__
, __LINE__
,
3021 "gdbarch: gdbarch_cannot_store_register invalid");
3022 if (gdbarch_debug
>= 2)
3023 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3024 return gdbarch
->cannot_store_register (regnum
);
3028 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3029 gdbarch_cannot_store_register_ftype cannot_store_register
)
3031 gdbarch
->cannot_store_register
= cannot_store_register
;
3035 gdbarch_get_longjmp_target_p (struct gdbarch
*gdbarch
)
3037 return gdbarch
->get_longjmp_target
!= 0;
3041 gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
, CORE_ADDR
*pc
)
3043 if (gdbarch
->get_longjmp_target
== 0)
3044 internal_error (__FILE__
, __LINE__
,
3045 "gdbarch: gdbarch_get_longjmp_target invalid");
3046 if (gdbarch_debug
>= 2)
3047 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_longjmp_target called\n");
3048 return gdbarch
->get_longjmp_target (pc
);
3052 set_gdbarch_get_longjmp_target (struct gdbarch
*gdbarch
,
3053 gdbarch_get_longjmp_target_ftype get_longjmp_target
)
3055 gdbarch
->get_longjmp_target
= get_longjmp_target
;
3059 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3061 if (gdbarch
->use_generic_dummy_frames
== -1)
3062 internal_error (__FILE__
, __LINE__
,
3063 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3064 if (gdbarch_debug
>= 2)
3065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3066 return gdbarch
->use_generic_dummy_frames
;
3070 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3071 int use_generic_dummy_frames
)
3073 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3077 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3079 if (gdbarch
->call_dummy_location
== 0)
3080 internal_error (__FILE__
, __LINE__
,
3081 "gdbarch: gdbarch_call_dummy_location invalid");
3082 if (gdbarch_debug
>= 2)
3083 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3084 return gdbarch
->call_dummy_location
;
3088 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3089 int call_dummy_location
)
3091 gdbarch
->call_dummy_location
= call_dummy_location
;
3095 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3097 if (gdbarch
->call_dummy_address
== 0)
3098 internal_error (__FILE__
, __LINE__
,
3099 "gdbarch: gdbarch_call_dummy_address invalid");
3100 if (gdbarch_debug
>= 2)
3101 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3102 return gdbarch
->call_dummy_address ();
3106 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3107 gdbarch_call_dummy_address_ftype call_dummy_address
)
3109 gdbarch
->call_dummy_address
= call_dummy_address
;
3113 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3115 if (gdbarch
->call_dummy_start_offset
== -1)
3116 internal_error (__FILE__
, __LINE__
,
3117 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3118 if (gdbarch_debug
>= 2)
3119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3120 return gdbarch
->call_dummy_start_offset
;
3124 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3125 CORE_ADDR call_dummy_start_offset
)
3127 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3131 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3133 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3134 internal_error (__FILE__
, __LINE__
,
3135 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3136 if (gdbarch_debug
>= 2)
3137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3138 return gdbarch
->call_dummy_breakpoint_offset
;
3142 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3143 CORE_ADDR call_dummy_breakpoint_offset
)
3145 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3149 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3151 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3152 internal_error (__FILE__
, __LINE__
,
3153 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3154 if (gdbarch_debug
>= 2)
3155 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3156 return gdbarch
->call_dummy_breakpoint_offset_p
;
3160 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3161 int call_dummy_breakpoint_offset_p
)
3163 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3167 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3169 if (gdbarch
->call_dummy_length
== -1)
3170 internal_error (__FILE__
, __LINE__
,
3171 "gdbarch: gdbarch_call_dummy_length invalid");
3172 if (gdbarch_debug
>= 2)
3173 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3174 return gdbarch
->call_dummy_length
;
3178 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3179 int call_dummy_length
)
3181 gdbarch
->call_dummy_length
= call_dummy_length
;
3185 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3187 if (gdbarch
->pc_in_call_dummy
== 0)
3188 internal_error (__FILE__
, __LINE__
,
3189 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3190 if (gdbarch_debug
>= 2)
3191 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3192 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3196 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3197 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3199 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3203 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3205 if (gdbarch
->call_dummy_p
== -1)
3206 internal_error (__FILE__
, __LINE__
,
3207 "gdbarch: gdbarch_call_dummy_p invalid");
3208 if (gdbarch_debug
>= 2)
3209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3210 return gdbarch
->call_dummy_p
;
3214 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3217 gdbarch
->call_dummy_p
= call_dummy_p
;
3221 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3223 /* Skip verify of call_dummy_words, invalid_p == 0 */
3224 if (gdbarch_debug
>= 2)
3225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3226 return gdbarch
->call_dummy_words
;
3230 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3231 LONGEST
* call_dummy_words
)
3233 gdbarch
->call_dummy_words
= call_dummy_words
;
3237 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3239 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3240 if (gdbarch_debug
>= 2)
3241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3242 return gdbarch
->sizeof_call_dummy_words
;
3246 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3247 int sizeof_call_dummy_words
)
3249 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3253 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3255 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3256 internal_error (__FILE__
, __LINE__
,
3257 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3258 if (gdbarch_debug
>= 2)
3259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3260 return gdbarch
->call_dummy_stack_adjust_p
;
3264 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3265 int call_dummy_stack_adjust_p
)
3267 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3271 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3273 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3274 internal_error (__FILE__
, __LINE__
,
3275 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3276 if (gdbarch_debug
>= 2)
3277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3278 return gdbarch
->call_dummy_stack_adjust
;
3282 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3283 int call_dummy_stack_adjust
)
3285 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3289 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
)
3291 if (gdbarch
->fix_call_dummy
== 0)
3292 internal_error (__FILE__
, __LINE__
,
3293 "gdbarch: gdbarch_fix_call_dummy invalid");
3294 if (gdbarch_debug
>= 2)
3295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3296 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3300 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3301 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3303 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3307 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3309 if (gdbarch
->init_frame_pc_first
== 0)
3310 internal_error (__FILE__
, __LINE__
,
3311 "gdbarch: gdbarch_init_frame_pc_first invalid");
3312 if (gdbarch_debug
>= 2)
3313 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3314 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3318 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3319 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3321 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3325 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3327 if (gdbarch
->init_frame_pc
== 0)
3328 internal_error (__FILE__
, __LINE__
,
3329 "gdbarch: gdbarch_init_frame_pc invalid");
3330 if (gdbarch_debug
>= 2)
3331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3332 gdbarch
->init_frame_pc (fromleaf
, prev
);
3336 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3337 gdbarch_init_frame_pc_ftype init_frame_pc
)
3339 gdbarch
->init_frame_pc
= init_frame_pc
;
3343 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3345 if (gdbarch_debug
>= 2)
3346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3347 return gdbarch
->believe_pcc_promotion
;
3351 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3352 int believe_pcc_promotion
)
3354 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3358 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3360 if (gdbarch_debug
>= 2)
3361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3362 return gdbarch
->believe_pcc_promotion_type
;
3366 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3367 int believe_pcc_promotion_type
)
3369 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3373 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3375 if (gdbarch
->coerce_float_to_double
== 0)
3376 internal_error (__FILE__
, __LINE__
,
3377 "gdbarch: gdbarch_coerce_float_to_double invalid");
3378 if (gdbarch_debug
>= 2)
3379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3380 return gdbarch
->coerce_float_to_double (formal
, actual
);
3384 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3385 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3387 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3391 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
)
3393 if (gdbarch
->get_saved_register
== 0)
3394 internal_error (__FILE__
, __LINE__
,
3395 "gdbarch: gdbarch_get_saved_register invalid");
3396 if (gdbarch_debug
>= 2)
3397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3398 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3402 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3403 gdbarch_get_saved_register_ftype get_saved_register
)
3405 gdbarch
->get_saved_register
= get_saved_register
;
3409 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3411 if (gdbarch
->register_convertible
== 0)
3412 internal_error (__FILE__
, __LINE__
,
3413 "gdbarch: gdbarch_register_convertible invalid");
3414 if (gdbarch_debug
>= 2)
3415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3416 return gdbarch
->register_convertible (nr
);
3420 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3421 gdbarch_register_convertible_ftype register_convertible
)
3423 gdbarch
->register_convertible
= register_convertible
;
3427 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3429 if (gdbarch
->register_convert_to_virtual
== 0)
3430 internal_error (__FILE__
, __LINE__
,
3431 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3432 if (gdbarch_debug
>= 2)
3433 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3434 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3438 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3439 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3441 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3445 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3447 if (gdbarch
->register_convert_to_raw
== 0)
3448 internal_error (__FILE__
, __LINE__
,
3449 "gdbarch: gdbarch_register_convert_to_raw invalid");
3450 if (gdbarch_debug
>= 2)
3451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3452 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3456 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3457 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3459 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3463 gdbarch_fetch_pseudo_register_p (struct gdbarch
*gdbarch
)
3465 return gdbarch
->fetch_pseudo_register
!= 0;
3469 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3471 if (gdbarch
->fetch_pseudo_register
== 0)
3472 internal_error (__FILE__
, __LINE__
,
3473 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3474 if (gdbarch_debug
>= 2)
3475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3476 gdbarch
->fetch_pseudo_register (regnum
);
3480 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3481 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3483 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3487 gdbarch_store_pseudo_register_p (struct gdbarch
*gdbarch
)
3489 return gdbarch
->store_pseudo_register
!= 0;
3493 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3495 if (gdbarch
->store_pseudo_register
== 0)
3496 internal_error (__FILE__
, __LINE__
,
3497 "gdbarch: gdbarch_store_pseudo_register invalid");
3498 if (gdbarch_debug
>= 2)
3499 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3500 gdbarch
->store_pseudo_register (regnum
);
3504 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3505 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3507 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3511 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3513 if (gdbarch
->pointer_to_address
== 0)
3514 internal_error (__FILE__
, __LINE__
,
3515 "gdbarch: gdbarch_pointer_to_address invalid");
3516 if (gdbarch_debug
>= 2)
3517 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3518 return gdbarch
->pointer_to_address (type
, buf
);
3522 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3523 gdbarch_pointer_to_address_ftype pointer_to_address
)
3525 gdbarch
->pointer_to_address
= pointer_to_address
;
3529 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3531 if (gdbarch
->address_to_pointer
== 0)
3532 internal_error (__FILE__
, __LINE__
,
3533 "gdbarch: gdbarch_address_to_pointer invalid");
3534 if (gdbarch_debug
>= 2)
3535 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3536 gdbarch
->address_to_pointer (type
, buf
, addr
);
3540 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3541 gdbarch_address_to_pointer_ftype address_to_pointer
)
3543 gdbarch
->address_to_pointer
= address_to_pointer
;
3547 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3549 return gdbarch
->integer_to_address
!= 0;
3553 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3555 if (gdbarch
->integer_to_address
== 0)
3556 internal_error (__FILE__
, __LINE__
,
3557 "gdbarch: gdbarch_integer_to_address invalid");
3558 if (gdbarch_debug
>= 2)
3559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3560 return gdbarch
->integer_to_address (type
, buf
);
3564 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3565 gdbarch_integer_to_address_ftype integer_to_address
)
3567 gdbarch
->integer_to_address
= integer_to_address
;
3571 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3573 if (gdbarch
->return_value_on_stack
== 0)
3574 internal_error (__FILE__
, __LINE__
,
3575 "gdbarch: gdbarch_return_value_on_stack invalid");
3576 if (gdbarch_debug
>= 2)
3577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3578 return gdbarch
->return_value_on_stack (type
);
3582 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3583 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3585 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3589 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3591 if (gdbarch
->extract_return_value
== 0)
3592 internal_error (__FILE__
, __LINE__
,
3593 "gdbarch: gdbarch_extract_return_value invalid");
3594 if (gdbarch_debug
>= 2)
3595 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3596 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3600 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3601 gdbarch_extract_return_value_ftype extract_return_value
)
3603 gdbarch
->extract_return_value
= extract_return_value
;
3607 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3609 if (gdbarch
->push_arguments
== 0)
3610 internal_error (__FILE__
, __LINE__
,
3611 "gdbarch: gdbarch_push_arguments invalid");
3612 if (gdbarch_debug
>= 2)
3613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3614 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3618 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3619 gdbarch_push_arguments_ftype push_arguments
)
3621 gdbarch
->push_arguments
= push_arguments
;
3625 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3627 if (gdbarch
->push_dummy_frame
== 0)
3628 internal_error (__FILE__
, __LINE__
,
3629 "gdbarch: gdbarch_push_dummy_frame invalid");
3630 if (gdbarch_debug
>= 2)
3631 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3632 gdbarch
->push_dummy_frame ();
3636 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3637 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3639 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3643 gdbarch_push_return_address_p (struct gdbarch
*gdbarch
)
3645 return gdbarch
->push_return_address
!= 0;
3649 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3651 if (gdbarch
->push_return_address
== 0)
3652 internal_error (__FILE__
, __LINE__
,
3653 "gdbarch: gdbarch_push_return_address invalid");
3654 if (gdbarch_debug
>= 2)
3655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3656 return gdbarch
->push_return_address (pc
, sp
);
3660 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3661 gdbarch_push_return_address_ftype push_return_address
)
3663 gdbarch
->push_return_address
= push_return_address
;
3667 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3669 if (gdbarch
->pop_frame
== 0)
3670 internal_error (__FILE__
, __LINE__
,
3671 "gdbarch: gdbarch_pop_frame invalid");
3672 if (gdbarch_debug
>= 2)
3673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3674 gdbarch
->pop_frame ();
3678 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3679 gdbarch_pop_frame_ftype pop_frame
)
3681 gdbarch
->pop_frame
= pop_frame
;
3685 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3687 if (gdbarch
->store_struct_return
== 0)
3688 internal_error (__FILE__
, __LINE__
,
3689 "gdbarch: gdbarch_store_struct_return invalid");
3690 if (gdbarch_debug
>= 2)
3691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3692 gdbarch
->store_struct_return (addr
, sp
);
3696 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3697 gdbarch_store_struct_return_ftype store_struct_return
)
3699 gdbarch
->store_struct_return
= store_struct_return
;
3703 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3705 if (gdbarch
->store_return_value
== 0)
3706 internal_error (__FILE__
, __LINE__
,
3707 "gdbarch: gdbarch_store_return_value invalid");
3708 if (gdbarch_debug
>= 2)
3709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3710 gdbarch
->store_return_value (type
, valbuf
);
3714 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3715 gdbarch_store_return_value_ftype store_return_value
)
3717 gdbarch
->store_return_value
= store_return_value
;
3721 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3723 return gdbarch
->extract_struct_value_address
!= 0;
3727 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3729 if (gdbarch
->extract_struct_value_address
== 0)
3730 internal_error (__FILE__
, __LINE__
,
3731 "gdbarch: gdbarch_extract_struct_value_address invalid");
3732 if (gdbarch_debug
>= 2)
3733 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3734 return gdbarch
->extract_struct_value_address (regbuf
);
3738 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3739 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3741 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3745 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3747 if (gdbarch
->use_struct_convention
== 0)
3748 internal_error (__FILE__
, __LINE__
,
3749 "gdbarch: gdbarch_use_struct_convention invalid");
3750 if (gdbarch_debug
>= 2)
3751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3752 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3756 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3757 gdbarch_use_struct_convention_ftype use_struct_convention
)
3759 gdbarch
->use_struct_convention
= use_struct_convention
;
3763 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3765 if (gdbarch
->frame_init_saved_regs
== 0)
3766 internal_error (__FILE__
, __LINE__
,
3767 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3768 if (gdbarch_debug
>= 2)
3769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3770 gdbarch
->frame_init_saved_regs (frame
);
3774 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3775 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3777 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3781 gdbarch_init_extra_frame_info_p (struct gdbarch
*gdbarch
)
3783 return gdbarch
->init_extra_frame_info
!= 0;
3787 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3789 if (gdbarch
->init_extra_frame_info
== 0)
3790 internal_error (__FILE__
, __LINE__
,
3791 "gdbarch: gdbarch_init_extra_frame_info invalid");
3792 if (gdbarch_debug
>= 2)
3793 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3794 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3798 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3799 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3801 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3805 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3807 if (gdbarch
->skip_prologue
== 0)
3808 internal_error (__FILE__
, __LINE__
,
3809 "gdbarch: gdbarch_skip_prologue invalid");
3810 if (gdbarch_debug
>= 2)
3811 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3812 return gdbarch
->skip_prologue (ip
);
3816 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3817 gdbarch_skip_prologue_ftype skip_prologue
)
3819 gdbarch
->skip_prologue
= skip_prologue
;
3823 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3825 if (gdbarch
->prologue_frameless_p
== 0)
3826 internal_error (__FILE__
, __LINE__
,
3827 "gdbarch: gdbarch_prologue_frameless_p invalid");
3828 if (gdbarch_debug
>= 2)
3829 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3830 return gdbarch
->prologue_frameless_p (ip
);
3834 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3835 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3837 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3841 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3843 if (gdbarch
->inner_than
== 0)
3844 internal_error (__FILE__
, __LINE__
,
3845 "gdbarch: gdbarch_inner_than invalid");
3846 if (gdbarch_debug
>= 2)
3847 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3848 return gdbarch
->inner_than (lhs
, rhs
);
3852 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3853 gdbarch_inner_than_ftype inner_than
)
3855 gdbarch
->inner_than
= inner_than
;
3858 const unsigned char *
3859 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3861 if (gdbarch
->breakpoint_from_pc
== 0)
3862 internal_error (__FILE__
, __LINE__
,
3863 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3864 if (gdbarch_debug
>= 2)
3865 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3866 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3870 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3871 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3873 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3877 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3879 if (gdbarch
->memory_insert_breakpoint
== 0)
3880 internal_error (__FILE__
, __LINE__
,
3881 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3882 if (gdbarch_debug
>= 2)
3883 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3884 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3888 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3889 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3891 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3895 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3897 if (gdbarch
->memory_remove_breakpoint
== 0)
3898 internal_error (__FILE__
, __LINE__
,
3899 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3900 if (gdbarch_debug
>= 2)
3901 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3902 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3906 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3907 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3909 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3913 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3915 if (gdbarch
->decr_pc_after_break
== -1)
3916 internal_error (__FILE__
, __LINE__
,
3917 "gdbarch: gdbarch_decr_pc_after_break invalid");
3918 if (gdbarch_debug
>= 2)
3919 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3920 return gdbarch
->decr_pc_after_break
;
3924 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3925 CORE_ADDR decr_pc_after_break
)
3927 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3931 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3933 if (gdbarch
->prepare_to_proceed
== 0)
3934 internal_error (__FILE__
, __LINE__
,
3935 "gdbarch: gdbarch_prepare_to_proceed invalid");
3936 if (gdbarch_debug
>= 2)
3937 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3938 return gdbarch
->prepare_to_proceed (select_it
);
3942 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3943 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3945 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3949 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3951 if (gdbarch
->function_start_offset
== -1)
3952 internal_error (__FILE__
, __LINE__
,
3953 "gdbarch: gdbarch_function_start_offset invalid");
3954 if (gdbarch_debug
>= 2)
3955 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3956 return gdbarch
->function_start_offset
;
3960 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3961 CORE_ADDR function_start_offset
)
3963 gdbarch
->function_start_offset
= function_start_offset
;
3967 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3969 if (gdbarch
->remote_translate_xfer_address
== 0)
3970 internal_error (__FILE__
, __LINE__
,
3971 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3972 if (gdbarch_debug
>= 2)
3973 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3974 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3978 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3979 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3981 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3985 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3987 if (gdbarch
->frame_args_skip
== -1)
3988 internal_error (__FILE__
, __LINE__
,
3989 "gdbarch: gdbarch_frame_args_skip invalid");
3990 if (gdbarch_debug
>= 2)
3991 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3992 return gdbarch
->frame_args_skip
;
3996 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3997 CORE_ADDR frame_args_skip
)
3999 gdbarch
->frame_args_skip
= frame_args_skip
;
4003 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4005 if (gdbarch
->frameless_function_invocation
== 0)
4006 internal_error (__FILE__
, __LINE__
,
4007 "gdbarch: gdbarch_frameless_function_invocation invalid");
4008 if (gdbarch_debug
>= 2)
4009 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4010 return gdbarch
->frameless_function_invocation (fi
);
4014 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4015 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4017 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4021 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4023 if (gdbarch
->frame_chain
== 0)
4024 internal_error (__FILE__
, __LINE__
,
4025 "gdbarch: gdbarch_frame_chain invalid");
4026 if (gdbarch_debug
>= 2)
4027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4028 return gdbarch
->frame_chain (frame
);
4032 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4033 gdbarch_frame_chain_ftype frame_chain
)
4035 gdbarch
->frame_chain
= frame_chain
;
4039 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4041 if (gdbarch
->frame_chain_valid
== 0)
4042 internal_error (__FILE__
, __LINE__
,
4043 "gdbarch: gdbarch_frame_chain_valid invalid");
4044 if (gdbarch_debug
>= 2)
4045 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4046 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4050 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4051 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4053 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4057 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4059 if (gdbarch
->frame_saved_pc
== 0)
4060 internal_error (__FILE__
, __LINE__
,
4061 "gdbarch: gdbarch_frame_saved_pc invalid");
4062 if (gdbarch_debug
>= 2)
4063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4064 return gdbarch
->frame_saved_pc (fi
);
4068 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4069 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4071 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4075 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4077 if (gdbarch
->frame_args_address
== 0)
4078 internal_error (__FILE__
, __LINE__
,
4079 "gdbarch: gdbarch_frame_args_address invalid");
4080 if (gdbarch_debug
>= 2)
4081 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4082 return gdbarch
->frame_args_address (fi
);
4086 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4087 gdbarch_frame_args_address_ftype frame_args_address
)
4089 gdbarch
->frame_args_address
= frame_args_address
;
4093 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4095 if (gdbarch
->frame_locals_address
== 0)
4096 internal_error (__FILE__
, __LINE__
,
4097 "gdbarch: gdbarch_frame_locals_address invalid");
4098 if (gdbarch_debug
>= 2)
4099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4100 return gdbarch
->frame_locals_address (fi
);
4104 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4105 gdbarch_frame_locals_address_ftype frame_locals_address
)
4107 gdbarch
->frame_locals_address
= frame_locals_address
;
4111 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4113 if (gdbarch
->saved_pc_after_call
== 0)
4114 internal_error (__FILE__
, __LINE__
,
4115 "gdbarch: gdbarch_saved_pc_after_call invalid");
4116 if (gdbarch_debug
>= 2)
4117 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4118 return gdbarch
->saved_pc_after_call (frame
);
4122 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4123 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4125 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4129 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4131 if (gdbarch
->frame_num_args
== 0)
4132 internal_error (__FILE__
, __LINE__
,
4133 "gdbarch: gdbarch_frame_num_args invalid");
4134 if (gdbarch_debug
>= 2)
4135 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4136 return gdbarch
->frame_num_args (frame
);
4140 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4141 gdbarch_frame_num_args_ftype frame_num_args
)
4143 gdbarch
->frame_num_args
= frame_num_args
;
4147 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4149 return gdbarch
->stack_align
!= 0;
4153 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4155 if (gdbarch
->stack_align
== 0)
4156 internal_error (__FILE__
, __LINE__
,
4157 "gdbarch: gdbarch_stack_align invalid");
4158 if (gdbarch_debug
>= 2)
4159 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4160 return gdbarch
->stack_align (sp
);
4164 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4165 gdbarch_stack_align_ftype stack_align
)
4167 gdbarch
->stack_align
= stack_align
;
4171 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4173 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4174 if (gdbarch_debug
>= 2)
4175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4176 return gdbarch
->extra_stack_alignment_needed
;
4180 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4181 int extra_stack_alignment_needed
)
4183 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4187 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4189 return gdbarch
->reg_struct_has_addr
!= 0;
4193 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4195 if (gdbarch
->reg_struct_has_addr
== 0)
4196 internal_error (__FILE__
, __LINE__
,
4197 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4198 if (gdbarch_debug
>= 2)
4199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4200 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4204 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4205 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4207 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4211 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4213 return gdbarch
->save_dummy_frame_tos
!= 0;
4217 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4219 if (gdbarch
->save_dummy_frame_tos
== 0)
4220 internal_error (__FILE__
, __LINE__
,
4221 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4222 if (gdbarch_debug
>= 2)
4223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4224 gdbarch
->save_dummy_frame_tos (sp
);
4228 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4229 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4231 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4235 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4237 if (gdbarch_debug
>= 2)
4238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4239 return gdbarch
->parm_boundary
;
4243 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4246 gdbarch
->parm_boundary
= parm_boundary
;
4249 const struct floatformat
*
4250 gdbarch_float_format (struct gdbarch
*gdbarch
)
4252 if (gdbarch_debug
>= 2)
4253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4254 return gdbarch
->float_format
;
4258 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4259 const struct floatformat
* float_format
)
4261 gdbarch
->float_format
= float_format
;
4264 const struct floatformat
*
4265 gdbarch_double_format (struct gdbarch
*gdbarch
)
4267 if (gdbarch_debug
>= 2)
4268 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4269 return gdbarch
->double_format
;
4273 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4274 const struct floatformat
* double_format
)
4276 gdbarch
->double_format
= double_format
;
4279 const struct floatformat
*
4280 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4282 if (gdbarch_debug
>= 2)
4283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4284 return gdbarch
->long_double_format
;
4288 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4289 const struct floatformat
* long_double_format
)
4291 gdbarch
->long_double_format
= long_double_format
;
4295 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4297 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4298 internal_error (__FILE__
, __LINE__
,
4299 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4300 if (gdbarch_debug
>= 2)
4301 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4302 return gdbarch
->convert_from_func_ptr_addr (addr
);
4306 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4307 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4309 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4313 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4315 if (gdbarch
->addr_bits_remove
== 0)
4316 internal_error (__FILE__
, __LINE__
,
4317 "gdbarch: gdbarch_addr_bits_remove invalid");
4318 if (gdbarch_debug
>= 2)
4319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4320 return gdbarch
->addr_bits_remove (addr
);
4324 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4325 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4327 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4331 gdbarch_smash_text_address (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4333 if (gdbarch
->smash_text_address
== 0)
4334 internal_error (__FILE__
, __LINE__
,
4335 "gdbarch: gdbarch_smash_text_address invalid");
4336 if (gdbarch_debug
>= 2)
4337 fprintf_unfiltered (gdb_stdlog
, "gdbarch_smash_text_address called\n");
4338 return gdbarch
->smash_text_address (addr
);
4342 set_gdbarch_smash_text_address (struct gdbarch
*gdbarch
,
4343 gdbarch_smash_text_address_ftype smash_text_address
)
4345 gdbarch
->smash_text_address
= smash_text_address
;
4349 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4351 return gdbarch
->software_single_step
!= 0;
4355 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4357 if (gdbarch
->software_single_step
== 0)
4358 internal_error (__FILE__
, __LINE__
,
4359 "gdbarch: gdbarch_software_single_step invalid");
4360 if (gdbarch_debug
>= 2)
4361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4362 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4366 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4367 gdbarch_software_single_step_ftype software_single_step
)
4369 gdbarch
->software_single_step
= software_single_step
;
4373 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4375 if (gdbarch
->print_insn
== 0)
4376 internal_error (__FILE__
, __LINE__
,
4377 "gdbarch: gdbarch_print_insn invalid");
4378 if (gdbarch_debug
>= 2)
4379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4380 return gdbarch
->print_insn (vma
, info
);
4384 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4385 gdbarch_print_insn_ftype print_insn
)
4387 gdbarch
->print_insn
= print_insn
;
4391 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4393 if (gdbarch
->skip_trampoline_code
== 0)
4394 internal_error (__FILE__
, __LINE__
,
4395 "gdbarch: gdbarch_skip_trampoline_code invalid");
4396 if (gdbarch_debug
>= 2)
4397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4398 return gdbarch
->skip_trampoline_code (pc
);
4402 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4403 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4405 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4409 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4411 if (gdbarch
->in_solib_call_trampoline
== 0)
4412 internal_error (__FILE__
, __LINE__
,
4413 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4414 if (gdbarch_debug
>= 2)
4415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4416 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4420 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4421 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4423 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4427 gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4429 if (gdbarch
->pc_in_sigtramp
== 0)
4430 internal_error (__FILE__
, __LINE__
,
4431 "gdbarch: gdbarch_pc_in_sigtramp invalid");
4432 if (gdbarch_debug
>= 2)
4433 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_sigtramp called\n");
4434 return gdbarch
->pc_in_sigtramp (pc
, name
);
4438 set_gdbarch_pc_in_sigtramp (struct gdbarch
*gdbarch
,
4439 gdbarch_pc_in_sigtramp_ftype pc_in_sigtramp
)
4441 gdbarch
->pc_in_sigtramp
= pc_in_sigtramp
;
4445 gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4447 if (gdbarch
->in_function_epilogue_p
== 0)
4448 internal_error (__FILE__
, __LINE__
,
4449 "gdbarch: gdbarch_in_function_epilogue_p invalid");
4450 if (gdbarch_debug
>= 2)
4451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_function_epilogue_p called\n");
4452 return gdbarch
->in_function_epilogue_p (gdbarch
, addr
);
4456 set_gdbarch_in_function_epilogue_p (struct gdbarch
*gdbarch
,
4457 gdbarch_in_function_epilogue_p_ftype in_function_epilogue_p
)
4459 gdbarch
->in_function_epilogue_p
= in_function_epilogue_p
;
4463 gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
, int argc
, char **argv
)
4465 if (gdbarch
->construct_inferior_arguments
== 0)
4466 internal_error (__FILE__
, __LINE__
,
4467 "gdbarch: gdbarch_construct_inferior_arguments invalid");
4468 if (gdbarch_debug
>= 2)
4469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_construct_inferior_arguments called\n");
4470 return gdbarch
->construct_inferior_arguments (gdbarch
, argc
, argv
);
4474 set_gdbarch_construct_inferior_arguments (struct gdbarch
*gdbarch
,
4475 gdbarch_construct_inferior_arguments_ftype construct_inferior_arguments
)
4477 gdbarch
->construct_inferior_arguments
= construct_inferior_arguments
;
4481 gdbarch_dwarf2_build_frame_info_p (struct gdbarch
*gdbarch
)
4483 return gdbarch
->dwarf2_build_frame_info
!= 0;
4487 gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
, struct objfile
*objfile
)
4489 if (gdbarch
->dwarf2_build_frame_info
== 0)
4490 internal_error (__FILE__
, __LINE__
,
4491 "gdbarch: gdbarch_dwarf2_build_frame_info invalid");
4492 if (gdbarch_debug
>= 2)
4493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_build_frame_info called\n");
4494 gdbarch
->dwarf2_build_frame_info (objfile
);
4498 set_gdbarch_dwarf2_build_frame_info (struct gdbarch
*gdbarch
,
4499 gdbarch_dwarf2_build_frame_info_ftype dwarf2_build_frame_info
)
4501 gdbarch
->dwarf2_build_frame_info
= dwarf2_build_frame_info
;
4505 gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
, asymbol
*sym
, struct minimal_symbol
*msym
)
4507 if (gdbarch
->elf_make_msymbol_special
== 0)
4508 internal_error (__FILE__
, __LINE__
,
4509 "gdbarch: gdbarch_elf_make_msymbol_special invalid");
4510 if (gdbarch_debug
>= 2)
4511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_elf_make_msymbol_special called\n");
4512 gdbarch
->elf_make_msymbol_special (sym
, msym
);
4516 set_gdbarch_elf_make_msymbol_special (struct gdbarch
*gdbarch
,
4517 gdbarch_elf_make_msymbol_special_ftype elf_make_msymbol_special
)
4519 gdbarch
->elf_make_msymbol_special
= elf_make_msymbol_special
;
4523 gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
, int val
, struct minimal_symbol
*msym
)
4525 if (gdbarch
->coff_make_msymbol_special
== 0)
4526 internal_error (__FILE__
, __LINE__
,
4527 "gdbarch: gdbarch_coff_make_msymbol_special invalid");
4528 if (gdbarch_debug
>= 2)
4529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coff_make_msymbol_special called\n");
4530 gdbarch
->coff_make_msymbol_special (val
, msym
);
4534 set_gdbarch_coff_make_msymbol_special (struct gdbarch
*gdbarch
,
4535 gdbarch_coff_make_msymbol_special_ftype coff_make_msymbol_special
)
4537 gdbarch
->coff_make_msymbol_special
= coff_make_msymbol_special
;
4541 /* Keep a registry of per-architecture data-pointers required by GDB
4547 gdbarch_data_init_ftype
*init
;
4548 gdbarch_data_free_ftype
*free
;
4551 struct gdbarch_data_registration
4553 struct gdbarch_data
*data
;
4554 struct gdbarch_data_registration
*next
;
4557 struct gdbarch_data_registry
4560 struct gdbarch_data_registration
*registrations
;
4563 struct gdbarch_data_registry gdbarch_data_registry
=
4568 struct gdbarch_data
*
4569 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4570 gdbarch_data_free_ftype
*free
)
4572 struct gdbarch_data_registration
**curr
;
4573 for (curr
= &gdbarch_data_registry
.registrations
;
4575 curr
= &(*curr
)->next
);
4576 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4577 (*curr
)->next
= NULL
;
4578 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4579 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4580 (*curr
)->data
->init
= init
;
4581 (*curr
)->data
->free
= free
;
4582 return (*curr
)->data
;
4586 /* Walk through all the registered users initializing each in turn. */
4589 init_gdbarch_data (struct gdbarch
*gdbarch
)
4591 struct gdbarch_data_registration
*rego
;
4592 for (rego
= gdbarch_data_registry
.registrations
;
4596 struct gdbarch_data
*data
= rego
->data
;
4597 gdb_assert (data
->index
< gdbarch
->nr_data
);
4598 if (data
->init
!= NULL
)
4600 void *pointer
= data
->init (gdbarch
);
4601 set_gdbarch_data (gdbarch
, data
, pointer
);
4606 /* Create/delete the gdbarch data vector. */
4609 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4611 gdb_assert (gdbarch
->data
== NULL
);
4612 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4613 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4617 free_gdbarch_data (struct gdbarch
*gdbarch
)
4619 struct gdbarch_data_registration
*rego
;
4620 gdb_assert (gdbarch
->data
!= NULL
);
4621 for (rego
= gdbarch_data_registry
.registrations
;
4625 struct gdbarch_data
*data
= rego
->data
;
4626 gdb_assert (data
->index
< gdbarch
->nr_data
);
4627 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4629 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4630 gdbarch
->data
[data
->index
] = NULL
;
4633 xfree (gdbarch
->data
);
4634 gdbarch
->data
= NULL
;
4638 /* Initialize the current value of thee specified per-architecture
4642 set_gdbarch_data (struct gdbarch
*gdbarch
,
4643 struct gdbarch_data
*data
,
4646 gdb_assert (data
->index
< gdbarch
->nr_data
);
4647 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4648 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4649 gdbarch
->data
[data
->index
] = pointer
;
4652 /* Return the current value of the specified per-architecture
4656 gdbarch_data (struct gdbarch_data
*data
)
4658 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4659 return current_gdbarch
->data
[data
->index
];
4664 /* Keep a registry of swapped data required by GDB modules. */
4669 struct gdbarch_swap_registration
*source
;
4670 struct gdbarch_swap
*next
;
4673 struct gdbarch_swap_registration
4676 unsigned long sizeof_data
;
4677 gdbarch_swap_ftype
*init
;
4678 struct gdbarch_swap_registration
*next
;
4681 struct gdbarch_swap_registry
4684 struct gdbarch_swap_registration
*registrations
;
4687 struct gdbarch_swap_registry gdbarch_swap_registry
=
4693 register_gdbarch_swap (void *data
,
4694 unsigned long sizeof_data
,
4695 gdbarch_swap_ftype
*init
)
4697 struct gdbarch_swap_registration
**rego
;
4698 for (rego
= &gdbarch_swap_registry
.registrations
;
4700 rego
= &(*rego
)->next
);
4701 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4702 (*rego
)->next
= NULL
;
4703 (*rego
)->init
= init
;
4704 (*rego
)->data
= data
;
4705 (*rego
)->sizeof_data
= sizeof_data
;
4710 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4712 struct gdbarch_swap_registration
*rego
;
4713 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4714 for (rego
= gdbarch_swap_registry
.registrations
;
4718 if (rego
->data
!= NULL
)
4720 (*curr
) = XMALLOC (struct gdbarch_swap
);
4721 (*curr
)->source
= rego
;
4722 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4723 (*curr
)->next
= NULL
;
4724 memset (rego
->data
, 0, rego
->sizeof_data
);
4725 curr
= &(*curr
)->next
;
4727 if (rego
->init
!= NULL
)
4733 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4735 struct gdbarch_swap
*curr
;
4736 for (curr
= gdbarch
->swap
;
4739 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4743 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4745 struct gdbarch_swap
*curr
;
4746 for (curr
= gdbarch
->swap
;
4749 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4753 /* Keep a registry of the architectures known by GDB. */
4755 struct gdbarch_registration
4757 enum bfd_architecture bfd_architecture
;
4758 gdbarch_init_ftype
*init
;
4759 gdbarch_dump_tdep_ftype
*dump_tdep
;
4760 struct gdbarch_list
*arches
;
4761 struct gdbarch_registration
*next
;
4764 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4767 append_name (const char ***buf
, int *nr
, const char *name
)
4769 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4775 gdbarch_printable_names (void)
4779 /* Accumulate a list of names based on the registed list of
4781 enum bfd_architecture a
;
4783 const char **arches
= NULL
;
4784 struct gdbarch_registration
*rego
;
4785 for (rego
= gdbarch_registry
;
4789 const struct bfd_arch_info
*ap
;
4790 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4792 internal_error (__FILE__
, __LINE__
,
4793 "gdbarch_architecture_names: multi-arch unknown");
4796 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4801 append_name (&arches
, &nr_arches
, NULL
);
4805 /* Just return all the architectures that BFD knows. Assume that
4806 the legacy architecture framework supports them. */
4807 return bfd_arch_list ();
4812 gdbarch_register (enum bfd_architecture bfd_architecture
,
4813 gdbarch_init_ftype
*init
,
4814 gdbarch_dump_tdep_ftype
*dump_tdep
)
4816 struct gdbarch_registration
**curr
;
4817 const struct bfd_arch_info
*bfd_arch_info
;
4818 /* Check that BFD recognizes this architecture */
4819 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4820 if (bfd_arch_info
== NULL
)
4822 internal_error (__FILE__
, __LINE__
,
4823 "gdbarch: Attempt to register unknown architecture (%d)",
4826 /* Check that we haven't seen this architecture before */
4827 for (curr
= &gdbarch_registry
;
4829 curr
= &(*curr
)->next
)
4831 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4832 internal_error (__FILE__
, __LINE__
,
4833 "gdbarch: Duplicate registraration of architecture (%s)",
4834 bfd_arch_info
->printable_name
);
4838 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4839 bfd_arch_info
->printable_name
,
4842 (*curr
) = XMALLOC (struct gdbarch_registration
);
4843 (*curr
)->bfd_architecture
= bfd_architecture
;
4844 (*curr
)->init
= init
;
4845 (*curr
)->dump_tdep
= dump_tdep
;
4846 (*curr
)->arches
= NULL
;
4847 (*curr
)->next
= NULL
;
4848 /* When non- multi-arch, install whatever target dump routine we've
4849 been provided - hopefully that routine has been written correctly
4850 and works regardless of multi-arch. */
4851 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4852 && startup_gdbarch
.dump_tdep
== NULL
)
4853 startup_gdbarch
.dump_tdep
= dump_tdep
;
4857 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4858 gdbarch_init_ftype
*init
)
4860 gdbarch_register (bfd_architecture
, init
, NULL
);
4864 /* Look for an architecture using gdbarch_info. Base search on only
4865 BFD_ARCH_INFO and BYTE_ORDER. */
4867 struct gdbarch_list
*
4868 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4869 const struct gdbarch_info
*info
)
4871 for (; arches
!= NULL
; arches
= arches
->next
)
4873 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4875 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4883 /* Update the current architecture. Return ZERO if the update request
4887 gdbarch_update_p (struct gdbarch_info info
)
4889 struct gdbarch
*new_gdbarch
;
4890 struct gdbarch_registration
*rego
;
4892 /* Fill in missing parts of the INFO struct using a number of
4893 sources: ``set ...''; INFOabfd supplied; existing target. */
4895 /* ``(gdb) set architecture ...'' */
4896 if (info
.bfd_arch_info
== NULL
4897 && !TARGET_ARCHITECTURE_AUTO
)
4898 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4899 if (info
.bfd_arch_info
== NULL
4900 && info
.abfd
!= NULL
4901 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4902 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4903 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4904 if (info
.bfd_arch_info
== NULL
)
4905 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4907 /* ``(gdb) set byte-order ...'' */
4908 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4909 && !TARGET_BYTE_ORDER_AUTO
)
4910 info
.byte_order
= TARGET_BYTE_ORDER
;
4911 /* From the INFO struct. */
4912 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
4913 && info
.abfd
!= NULL
)
4914 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BFD_ENDIAN_BIG
4915 : bfd_little_endian (info
.abfd
) ? BFD_ENDIAN_LITTLE
4916 : BFD_ENDIAN_UNKNOWN
);
4917 /* From the current target. */
4918 if (info
.byte_order
== BFD_ENDIAN_UNKNOWN
)
4919 info
.byte_order
= TARGET_BYTE_ORDER
;
4921 /* Must have found some sort of architecture. */
4922 gdb_assert (info
.bfd_arch_info
!= NULL
);
4926 fprintf_unfiltered (gdb_stdlog
,
4927 "gdbarch_update: info.bfd_arch_info %s\n",
4928 (info
.bfd_arch_info
!= NULL
4929 ? info
.bfd_arch_info
->printable_name
4931 fprintf_unfiltered (gdb_stdlog
,
4932 "gdbarch_update: info.byte_order %d (%s)\n",
4934 (info
.byte_order
== BFD_ENDIAN_BIG
? "big"
4935 : info
.byte_order
== BFD_ENDIAN_LITTLE
? "little"
4937 fprintf_unfiltered (gdb_stdlog
,
4938 "gdbarch_update: info.abfd 0x%lx\n",
4940 fprintf_unfiltered (gdb_stdlog
,
4941 "gdbarch_update: info.tdep_info 0x%lx\n",
4942 (long) info
.tdep_info
);
4945 /* Find the target that knows about this architecture. */
4946 for (rego
= gdbarch_registry
;
4949 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4954 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4958 /* Ask the target for a replacement architecture. */
4959 new_gdbarch
= rego
->init (info
, rego
->arches
);
4961 /* Did the target like it? No. Reject the change. */
4962 if (new_gdbarch
== NULL
)
4965 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4969 /* Did the architecture change? No. Do nothing. */
4970 if (current_gdbarch
== new_gdbarch
)
4973 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4975 new_gdbarch
->bfd_arch_info
->printable_name
);
4979 /* Swap all data belonging to the old target out */
4980 swapout_gdbarch_swap (current_gdbarch
);
4982 /* Is this a pre-existing architecture? Yes. Move it to the front
4983 of the list of architectures (keeping the list sorted Most
4984 Recently Used) and then copy it in. */
4986 struct gdbarch_list
**list
;
4987 for (list
= ®o
->arches
;
4989 list
= &(*list
)->next
)
4991 if ((*list
)->gdbarch
== new_gdbarch
)
4993 struct gdbarch_list
*this;
4995 fprintf_unfiltered (gdb_stdlog
,
4996 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4998 new_gdbarch
->bfd_arch_info
->printable_name
);
5001 (*list
) = this->next
;
5002 /* Insert in the front. */
5003 this->next
= rego
->arches
;
5004 rego
->arches
= this;
5005 /* Copy the new architecture in. */
5006 current_gdbarch
= new_gdbarch
;
5007 swapin_gdbarch_swap (new_gdbarch
);
5008 architecture_changed_event ();
5014 /* Prepend this new architecture to the architecture list (keep the
5015 list sorted Most Recently Used). */
5017 struct gdbarch_list
*this = XMALLOC (struct gdbarch_list
);
5018 this->next
= rego
->arches
;
5019 this->gdbarch
= new_gdbarch
;
5020 rego
->arches
= this;
5023 /* Switch to this new architecture. Dump it out. */
5024 current_gdbarch
= new_gdbarch
;
5027 fprintf_unfiltered (gdb_stdlog
,
5028 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
5030 new_gdbarch
->bfd_arch_info
->printable_name
);
5033 /* Check that the newly installed architecture is valid. Plug in
5034 any post init values. */
5035 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
5036 verify_gdbarch (new_gdbarch
);
5038 /* Initialize the per-architecture memory (swap) areas.
5039 CURRENT_GDBARCH must be update before these modules are
5041 init_gdbarch_swap (new_gdbarch
);
5043 /* Initialize the per-architecture data-pointer of all parties that
5044 registered an interest in this architecture. CURRENT_GDBARCH
5045 must be updated before these modules are called. */
5046 init_gdbarch_data (new_gdbarch
);
5047 architecture_changed_event ();
5050 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
5058 /* Pointer to the target-dependent disassembly function. */
5059 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
5060 disassemble_info tm_print_insn_info
;
5063 extern void _initialize_gdbarch (void);
5066 _initialize_gdbarch (void)
5068 struct cmd_list_element
*c
;
5070 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
5071 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
5072 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
5073 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
5074 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5076 add_show_from_set (add_set_cmd ("arch",
5079 (char *)&gdbarch_debug
,
5080 "Set architecture debugging.\n\
5081 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5083 c
= add_set_cmd ("archdebug",
5086 (char *)&gdbarch_debug
,
5087 "Set architecture debugging.\n\
5088 When non-zero, architecture debugging is enabled.", &setlist
);
5090 deprecate_cmd (c
, "set debug arch");
5091 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");