1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
61 #include "floatformat.h"
63 #include "gdb_assert.h"
64 #include "gdb-events.h"
66 /* Static function declarations */
68 static void verify_gdbarch (struct gdbarch
*gdbarch
);
69 static void alloc_gdbarch_data (struct gdbarch
*);
70 static void init_gdbarch_data (struct gdbarch
*);
71 static void free_gdbarch_data (struct gdbarch
*);
72 static void init_gdbarch_swap (struct gdbarch
*);
73 static void swapout_gdbarch_swap (struct gdbarch
*);
74 static void swapin_gdbarch_swap (struct gdbarch
*);
76 /* Convenience macro for allocting typesafe memory. */
79 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
83 /* Non-zero if we want to trace architecture code. */
86 #define GDBARCH_DEBUG 0
88 int gdbarch_debug
= GDBARCH_DEBUG
;
91 /* Maintain the struct gdbarch object */
95 /* basic architectural information */
96 const struct bfd_arch_info
* bfd_arch_info
;
99 /* target specific vector. */
100 struct gdbarch_tdep
*tdep
;
101 gdbarch_dump_tdep_ftype
*dump_tdep
;
103 /* per-architecture data-pointers */
107 /* per-architecture swap-regions */
108 struct gdbarch_swap
*swap
;
110 /* Multi-arch values.
112 When extending this structure you must:
116 Declare set/get functions and define the corresponding
119 gdbarch_alloc(): If zero/NULL is not a suitable default,
120 initialize the new field.
122 verify_gdbarch(): Confirm that the target updated the field
125 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
128 ``startup_gdbarch()'': Append an initial value to the static
129 variable (base values on the host's c-type system).
131 get_gdbarch(): Implement the set/get functions (probably using
132 the macro's as shortcuts).
147 gdbarch_read_pc_ftype
*read_pc
;
148 gdbarch_write_pc_ftype
*write_pc
;
149 gdbarch_read_fp_ftype
*read_fp
;
150 gdbarch_write_fp_ftype
*write_fp
;
151 gdbarch_read_sp_ftype
*read_sp
;
152 gdbarch_write_sp_ftype
*write_sp
;
153 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
154 gdbarch_register_read_ftype
*register_read
;
155 gdbarch_register_write_ftype
*register_write
;
164 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
165 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
166 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
167 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
168 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
169 gdbarch_register_name_ftype
*register_name
;
172 gdbarch_register_byte_ftype
*register_byte
;
173 gdbarch_register_raw_size_ftype
*register_raw_size
;
174 int max_register_raw_size
;
175 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
176 int max_register_virtual_size
;
177 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
178 gdbarch_do_registers_info_ftype
*do_registers_info
;
179 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
180 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
181 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
182 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
183 int use_generic_dummy_frames
;
184 int call_dummy_location
;
185 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
186 CORE_ADDR call_dummy_start_offset
;
187 CORE_ADDR call_dummy_breakpoint_offset
;
188 int call_dummy_breakpoint_offset_p
;
189 int call_dummy_length
;
190 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
192 LONGEST
* call_dummy_words
;
193 int sizeof_call_dummy_words
;
194 int call_dummy_stack_adjust_p
;
195 int call_dummy_stack_adjust
;
196 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
197 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
198 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
199 int believe_pcc_promotion
;
200 int believe_pcc_promotion_type
;
201 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
202 gdbarch_get_saved_register_ftype
*get_saved_register
;
203 gdbarch_register_convertible_ftype
*register_convertible
;
204 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
205 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
206 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
207 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
208 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
209 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
210 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
211 gdbarch_extract_return_value_ftype
*extract_return_value
;
212 gdbarch_push_arguments_ftype
*push_arguments
;
213 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
214 gdbarch_push_return_address_ftype
*push_return_address
;
215 gdbarch_pop_frame_ftype
*pop_frame
;
216 gdbarch_store_struct_return_ftype
*store_struct_return
;
217 gdbarch_store_return_value_ftype
*store_return_value
;
218 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
219 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
220 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
221 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
222 gdbarch_skip_prologue_ftype
*skip_prologue
;
223 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
224 gdbarch_inner_than_ftype
*inner_than
;
225 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
226 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
227 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
228 CORE_ADDR decr_pc_after_break
;
229 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
230 CORE_ADDR function_start_offset
;
231 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
232 CORE_ADDR frame_args_skip
;
233 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
234 gdbarch_frame_chain_ftype
*frame_chain
;
235 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
236 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
237 gdbarch_frame_args_address_ftype
*frame_args_address
;
238 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
239 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
240 gdbarch_frame_num_args_ftype
*frame_num_args
;
241 gdbarch_stack_align_ftype
*stack_align
;
242 int extra_stack_alignment_needed
;
243 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
244 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
246 const struct floatformat
* float_format
;
247 const struct floatformat
* double_format
;
248 const struct floatformat
* long_double_format
;
249 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
250 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
251 gdbarch_software_single_step_ftype
*software_single_step
;
252 gdbarch_print_insn_ftype
*print_insn
;
253 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
257 /* The default architecture uses host values (for want of a better
260 extern const struct bfd_arch_info bfd_default_arch_struct
;
262 struct gdbarch startup_gdbarch
=
264 /* basic architecture information */
265 &bfd_default_arch_struct
,
267 /* target specific vector and its dump routine */
269 /*per-architecture data-pointers and swap regions */
271 /* Multi-arch values */
275 8 * sizeof (LONGEST
),
278 8 * sizeof (long double),
338 generic_get_saved_register
,
390 /* startup_gdbarch() */
393 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
395 /* Do any initialization needed for a non-multiarch configuration
396 after the _initialize_MODULE functions have been run. */
398 initialize_non_multiarch ()
400 alloc_gdbarch_data (&startup_gdbarch
);
401 init_gdbarch_data (&startup_gdbarch
);
405 /* Create a new ``struct gdbarch'' based on information provided by
406 ``struct gdbarch_info''. */
409 gdbarch_alloc (const struct gdbarch_info
*info
,
410 struct gdbarch_tdep
*tdep
)
412 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
413 memset (gdbarch
, 0, sizeof (*gdbarch
));
415 alloc_gdbarch_data (gdbarch
);
417 gdbarch
->tdep
= tdep
;
419 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
420 gdbarch
->byte_order
= info
->byte_order
;
422 /* Force the explicit initialization of these. */
423 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
424 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
425 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
426 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
427 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
428 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
429 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
430 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
431 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
432 gdbarch
->read_pc
= generic_target_read_pc
;
433 gdbarch
->write_pc
= generic_target_write_pc
;
434 gdbarch
->read_fp
= generic_target_read_fp
;
435 gdbarch
->write_fp
= generic_target_write_fp
;
436 gdbarch
->read_sp
= generic_target_read_sp
;
437 gdbarch
->write_sp
= generic_target_write_sp
;
438 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
439 gdbarch
->num_regs
= -1;
440 gdbarch
->sp_regnum
= -1;
441 gdbarch
->fp_regnum
= -1;
442 gdbarch
->pc_regnum
= -1;
443 gdbarch
->fp0_regnum
= -1;
444 gdbarch
->npc_regnum
= -1;
445 gdbarch
->nnpc_regnum
= -1;
446 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
447 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
448 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
449 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
450 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
451 gdbarch
->register_name
= legacy_register_name
;
452 gdbarch
->register_size
= -1;
453 gdbarch
->register_bytes
= -1;
454 gdbarch
->max_register_raw_size
= -1;
455 gdbarch
->max_register_virtual_size
= -1;
456 gdbarch
->do_registers_info
= do_registers_info
;
457 gdbarch
->register_sim_regno
= default_register_sim_regno
;
458 gdbarch
->cannot_fetch_register
= cannot_register_not
;
459 gdbarch
->cannot_store_register
= cannot_register_not
;
460 gdbarch
->use_generic_dummy_frames
= -1;
461 gdbarch
->call_dummy_start_offset
= -1;
462 gdbarch
->call_dummy_breakpoint_offset
= -1;
463 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
464 gdbarch
->call_dummy_length
= -1;
465 gdbarch
->call_dummy_p
= -1;
466 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
467 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
468 gdbarch
->call_dummy_stack_adjust_p
= -1;
469 gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
470 gdbarch
->init_frame_pc
= init_frame_pc_default
;
471 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
472 gdbarch
->register_convertible
= generic_register_convertible_not
;
473 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
474 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
475 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
476 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
477 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
478 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
479 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
480 gdbarch
->decr_pc_after_break
= -1;
481 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
482 gdbarch
->function_start_offset
= -1;
483 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
484 gdbarch
->frame_args_skip
= -1;
485 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
486 gdbarch
->extra_stack_alignment_needed
= 1;
487 gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
488 gdbarch
->addr_bits_remove
= core_addr_identity
;
489 gdbarch
->print_insn
= legacy_print_insn
;
490 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
491 /* gdbarch_alloc() */
497 /* Free a gdbarch struct. This should never happen in normal
498 operation --- once you've created a gdbarch, you keep it around.
499 However, if an architecture's init function encounters an error
500 building the structure, it may need to clean up a partially
501 constructed gdbarch. */
504 gdbarch_free (struct gdbarch
*arch
)
506 gdb_assert (arch
!= NULL
);
507 free_gdbarch_data (arch
);
512 /* Ensure that all values in a GDBARCH are reasonable. */
515 verify_gdbarch (struct gdbarch
*gdbarch
)
517 /* Only perform sanity checks on a multi-arch target. */
521 if (gdbarch
->byte_order
== 0)
522 internal_error (__FILE__
, __LINE__
,
523 "verify_gdbarch: byte-order unset");
524 if (gdbarch
->bfd_arch_info
== NULL
)
525 internal_error (__FILE__
, __LINE__
,
526 "verify_gdbarch: bfd_arch_info unset");
527 /* Check those that need to be defined for the given multi-arch level. */
528 /* Skip verify of short_bit, invalid_p == 0 */
529 /* Skip verify of int_bit, invalid_p == 0 */
530 /* Skip verify of long_bit, invalid_p == 0 */
531 /* Skip verify of long_long_bit, invalid_p == 0 */
532 /* Skip verify of float_bit, invalid_p == 0 */
533 /* Skip verify of double_bit, invalid_p == 0 */
534 /* Skip verify of long_double_bit, invalid_p == 0 */
535 /* Skip verify of ptr_bit, invalid_p == 0 */
536 if (gdbarch
->addr_bit
== 0)
537 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
538 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
539 /* Skip verify of ieee_float, invalid_p == 0 */
540 /* Skip verify of read_pc, invalid_p == 0 */
541 /* Skip verify of write_pc, invalid_p == 0 */
542 /* Skip verify of read_fp, invalid_p == 0 */
543 /* Skip verify of write_fp, invalid_p == 0 */
544 /* Skip verify of read_sp, invalid_p == 0 */
545 /* Skip verify of write_sp, invalid_p == 0 */
546 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
547 /* Skip verify of register_read, has predicate */
548 /* Skip verify of register_write, has predicate */
549 if ((GDB_MULTI_ARCH
>= 2)
550 && (gdbarch
->num_regs
== -1))
551 internal_error (__FILE__
, __LINE__
,
552 "gdbarch: verify_gdbarch: num_regs invalid");
553 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
554 if ((GDB_MULTI_ARCH
>= 2)
555 && (gdbarch
->sp_regnum
== -1))
556 internal_error (__FILE__
, __LINE__
,
557 "gdbarch: verify_gdbarch: sp_regnum invalid");
558 if ((GDB_MULTI_ARCH
>= 2)
559 && (gdbarch
->fp_regnum
== -1))
560 internal_error (__FILE__
, __LINE__
,
561 "gdbarch: verify_gdbarch: fp_regnum invalid");
562 if ((GDB_MULTI_ARCH
>= 2)
563 && (gdbarch
->pc_regnum
== -1))
564 internal_error (__FILE__
, __LINE__
,
565 "gdbarch: verify_gdbarch: pc_regnum invalid");
566 /* Skip verify of fp0_regnum, invalid_p == 0 */
567 /* Skip verify of npc_regnum, invalid_p == 0 */
568 /* Skip verify of nnpc_regnum, invalid_p == 0 */
569 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
570 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
571 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
572 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
573 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
574 /* Skip verify of register_name, invalid_p == 0 */
575 if ((GDB_MULTI_ARCH
>= 2)
576 && (gdbarch
->register_size
== -1))
577 internal_error (__FILE__
, __LINE__
,
578 "gdbarch: verify_gdbarch: register_size invalid");
579 if ((GDB_MULTI_ARCH
>= 2)
580 && (gdbarch
->register_bytes
== -1))
581 internal_error (__FILE__
, __LINE__
,
582 "gdbarch: verify_gdbarch: register_bytes invalid");
583 if ((GDB_MULTI_ARCH
>= 2)
584 && (gdbarch
->register_byte
== 0))
585 internal_error (__FILE__
, __LINE__
,
586 "gdbarch: verify_gdbarch: register_byte invalid");
587 if ((GDB_MULTI_ARCH
>= 2)
588 && (gdbarch
->register_raw_size
== 0))
589 internal_error (__FILE__
, __LINE__
,
590 "gdbarch: verify_gdbarch: register_raw_size invalid");
591 if ((GDB_MULTI_ARCH
>= 2)
592 && (gdbarch
->max_register_raw_size
== -1))
593 internal_error (__FILE__
, __LINE__
,
594 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
595 if ((GDB_MULTI_ARCH
>= 2)
596 && (gdbarch
->register_virtual_size
== 0))
597 internal_error (__FILE__
, __LINE__
,
598 "gdbarch: verify_gdbarch: register_virtual_size invalid");
599 if ((GDB_MULTI_ARCH
>= 2)
600 && (gdbarch
->max_register_virtual_size
== -1))
601 internal_error (__FILE__
, __LINE__
,
602 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
603 if ((GDB_MULTI_ARCH
>= 2)
604 && (gdbarch
->register_virtual_type
== 0))
605 internal_error (__FILE__
, __LINE__
,
606 "gdbarch: verify_gdbarch: register_virtual_type invalid");
607 /* Skip verify of do_registers_info, invalid_p == 0 */
608 /* Skip verify of register_sim_regno, invalid_p == 0 */
609 /* Skip verify of register_bytes_ok, has predicate */
610 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
611 /* Skip verify of cannot_store_register, invalid_p == 0 */
612 if ((GDB_MULTI_ARCH
>= 1)
613 && (gdbarch
->use_generic_dummy_frames
== -1))
614 internal_error (__FILE__
, __LINE__
,
615 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
616 if ((GDB_MULTI_ARCH
>= 2)
617 && (gdbarch
->call_dummy_location
== 0))
618 internal_error (__FILE__
, __LINE__
,
619 "gdbarch: verify_gdbarch: call_dummy_location invalid");
620 if ((GDB_MULTI_ARCH
>= 2)
621 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
622 internal_error (__FILE__
, __LINE__
,
623 "gdbarch: verify_gdbarch: call_dummy_address invalid");
624 if ((GDB_MULTI_ARCH
>= 2)
625 && (gdbarch
->call_dummy_start_offset
== -1))
626 internal_error (__FILE__
, __LINE__
,
627 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
628 if ((GDB_MULTI_ARCH
>= 2)
629 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
630 internal_error (__FILE__
, __LINE__
,
631 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
632 if ((GDB_MULTI_ARCH
>= 1)
633 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
634 internal_error (__FILE__
, __LINE__
,
635 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
636 if ((GDB_MULTI_ARCH
>= 2)
637 && (gdbarch
->call_dummy_length
== -1))
638 internal_error (__FILE__
, __LINE__
,
639 "gdbarch: verify_gdbarch: call_dummy_length invalid");
640 if ((GDB_MULTI_ARCH
>= 2)
641 && (gdbarch
->pc_in_call_dummy
== 0))
642 internal_error (__FILE__
, __LINE__
,
643 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
644 if ((GDB_MULTI_ARCH
>= 1)
645 && (gdbarch
->call_dummy_p
== -1))
646 internal_error (__FILE__
, __LINE__
,
647 "gdbarch: verify_gdbarch: call_dummy_p invalid");
648 /* Skip verify of call_dummy_words, invalid_p == 0 */
649 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
650 if ((GDB_MULTI_ARCH
>= 1)
651 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
652 internal_error (__FILE__
, __LINE__
,
653 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
654 if ((GDB_MULTI_ARCH
>= 2)
655 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
656 internal_error (__FILE__
, __LINE__
,
657 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
658 if ((GDB_MULTI_ARCH
>= 2)
659 && (gdbarch
->fix_call_dummy
== 0))
660 internal_error (__FILE__
, __LINE__
,
661 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
662 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
663 /* Skip verify of init_frame_pc, invalid_p == 0 */
664 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
665 if ((GDB_MULTI_ARCH
>= 1)
666 && (gdbarch
->get_saved_register
== 0))
667 internal_error (__FILE__
, __LINE__
,
668 "gdbarch: verify_gdbarch: get_saved_register invalid");
669 /* Skip verify of register_convertible, invalid_p == 0 */
670 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
671 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
672 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
673 /* Skip verify of store_pseudo_register, invalid_p == 0 */
674 /* Skip verify of pointer_to_address, invalid_p == 0 */
675 /* Skip verify of address_to_pointer, invalid_p == 0 */
676 /* Skip verify of return_value_on_stack, invalid_p == 0 */
677 if ((GDB_MULTI_ARCH
>= 2)
678 && (gdbarch
->extract_return_value
== 0))
679 internal_error (__FILE__
, __LINE__
,
680 "gdbarch: verify_gdbarch: extract_return_value invalid");
681 if ((GDB_MULTI_ARCH
>= 1)
682 && (gdbarch
->push_arguments
== 0))
683 internal_error (__FILE__
, __LINE__
,
684 "gdbarch: verify_gdbarch: push_arguments invalid");
685 if ((GDB_MULTI_ARCH
>= 2)
686 && (gdbarch
->push_dummy_frame
== 0))
687 internal_error (__FILE__
, __LINE__
,
688 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
689 if ((GDB_MULTI_ARCH
>= 1)
690 && (gdbarch
->push_return_address
== 0))
691 internal_error (__FILE__
, __LINE__
,
692 "gdbarch: verify_gdbarch: push_return_address invalid");
693 if ((GDB_MULTI_ARCH
>= 2)
694 && (gdbarch
->pop_frame
== 0))
695 internal_error (__FILE__
, __LINE__
,
696 "gdbarch: verify_gdbarch: pop_frame invalid");
697 if ((GDB_MULTI_ARCH
>= 2)
698 && (gdbarch
->store_struct_return
== 0))
699 internal_error (__FILE__
, __LINE__
,
700 "gdbarch: verify_gdbarch: store_struct_return invalid");
701 if ((GDB_MULTI_ARCH
>= 2)
702 && (gdbarch
->store_return_value
== 0))
703 internal_error (__FILE__
, __LINE__
,
704 "gdbarch: verify_gdbarch: store_return_value invalid");
705 /* Skip verify of extract_struct_value_address, has predicate */
706 if ((GDB_MULTI_ARCH
>= 2)
707 && (gdbarch
->use_struct_convention
== 0))
708 internal_error (__FILE__
, __LINE__
,
709 "gdbarch: verify_gdbarch: use_struct_convention invalid");
710 if ((GDB_MULTI_ARCH
>= 2)
711 && (gdbarch
->frame_init_saved_regs
== 0))
712 internal_error (__FILE__
, __LINE__
,
713 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
714 if ((GDB_MULTI_ARCH
>= 2)
715 && (gdbarch
->init_extra_frame_info
== 0))
716 internal_error (__FILE__
, __LINE__
,
717 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
718 if ((GDB_MULTI_ARCH
>= 2)
719 && (gdbarch
->skip_prologue
== 0))
720 internal_error (__FILE__
, __LINE__
,
721 "gdbarch: verify_gdbarch: skip_prologue invalid");
722 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->inner_than
== 0))
725 internal_error (__FILE__
, __LINE__
,
726 "gdbarch: verify_gdbarch: inner_than invalid");
727 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
728 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
729 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
>= 2)
731 && (gdbarch
->decr_pc_after_break
== -1))
732 internal_error (__FILE__
, __LINE__
,
733 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
734 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
735 if ((GDB_MULTI_ARCH
>= 2)
736 && (gdbarch
->function_start_offset
== -1))
737 internal_error (__FILE__
, __LINE__
,
738 "gdbarch: verify_gdbarch: function_start_offset invalid");
739 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH
>= 2)
741 && (gdbarch
->frame_args_skip
== -1))
742 internal_error (__FILE__
, __LINE__
,
743 "gdbarch: verify_gdbarch: frame_args_skip invalid");
744 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
745 if ((GDB_MULTI_ARCH
>= 2)
746 && (gdbarch
->frame_chain
== 0))
747 internal_error (__FILE__
, __LINE__
,
748 "gdbarch: verify_gdbarch: frame_chain invalid");
749 if ((GDB_MULTI_ARCH
>= 1)
750 && (gdbarch
->frame_chain_valid
== 0))
751 internal_error (__FILE__
, __LINE__
,
752 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
753 if ((GDB_MULTI_ARCH
>= 2)
754 && (gdbarch
->frame_saved_pc
== 0))
755 internal_error (__FILE__
, __LINE__
,
756 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
757 if ((GDB_MULTI_ARCH
>= 2)
758 && (gdbarch
->frame_args_address
== 0))
759 internal_error (__FILE__
, __LINE__
,
760 "gdbarch: verify_gdbarch: frame_args_address invalid");
761 if ((GDB_MULTI_ARCH
>= 2)
762 && (gdbarch
->frame_locals_address
== 0))
763 internal_error (__FILE__
, __LINE__
,
764 "gdbarch: verify_gdbarch: frame_locals_address invalid");
765 if ((GDB_MULTI_ARCH
>= 2)
766 && (gdbarch
->saved_pc_after_call
== 0))
767 internal_error (__FILE__
, __LINE__
,
768 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
769 if ((GDB_MULTI_ARCH
>= 2)
770 && (gdbarch
->frame_num_args
== 0))
771 internal_error (__FILE__
, __LINE__
,
772 "gdbarch: verify_gdbarch: frame_num_args invalid");
773 /* Skip verify of stack_align, has predicate */
774 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
775 /* Skip verify of reg_struct_has_addr, has predicate */
776 /* Skip verify of save_dummy_frame_tos, has predicate */
777 if (gdbarch
->float_format
== 0)
778 gdbarch
->float_format
= default_float_format (gdbarch
);
779 if (gdbarch
->double_format
== 0)
780 gdbarch
->double_format
= default_double_format (gdbarch
);
781 if (gdbarch
->long_double_format
== 0)
782 gdbarch
->long_double_format
= &floatformat_unknown
;
783 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
784 /* Skip verify of addr_bits_remove, invalid_p == 0 */
785 /* Skip verify of software_single_step, has predicate */
786 /* Skip verify of print_insn, invalid_p == 0 */
787 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
791 /* Print out the details of the current architecture. */
793 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
794 just happens to match the global variable ``current_gdbarch''. That
795 way macros refering to that variable get the local and not the global
796 version - ulgh. Once everything is parameterised with gdbarch, this
800 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
805 #ifdef TARGET_ARCHITECTURE
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
808 XSTRING (TARGET_ARCHITECTURE
));
810 #ifdef TARGET_BYTE_ORDER
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
813 XSTRING (TARGET_BYTE_ORDER
));
815 #ifdef TARGET_SHORT_BIT
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
818 XSTRING (TARGET_SHORT_BIT
));
820 #ifdef TARGET_INT_BIT
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: TARGET_INT_BIT # %s\n",
823 XSTRING (TARGET_INT_BIT
));
825 #ifdef TARGET_LONG_BIT
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
828 XSTRING (TARGET_LONG_BIT
));
830 #ifdef TARGET_LONG_LONG_BIT
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
833 XSTRING (TARGET_LONG_LONG_BIT
));
835 #ifdef TARGET_FLOAT_BIT
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
838 XSTRING (TARGET_FLOAT_BIT
));
840 #ifdef TARGET_DOUBLE_BIT
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
843 XSTRING (TARGET_DOUBLE_BIT
));
845 #ifdef TARGET_LONG_DOUBLE_BIT
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
848 XSTRING (TARGET_LONG_DOUBLE_BIT
));
850 #ifdef TARGET_PTR_BIT
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
853 XSTRING (TARGET_PTR_BIT
));
855 #ifdef TARGET_ADDR_BIT
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
858 XSTRING (TARGET_ADDR_BIT
));
860 #ifdef TARGET_BFD_VMA_BIT
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
863 XSTRING (TARGET_BFD_VMA_BIT
));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: IEEE_FLOAT # %s\n",
868 XSTRING (IEEE_FLOAT
));
870 #ifdef TARGET_READ_PC
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: %s # %s\n",
873 "TARGET_READ_PC(ptid)",
874 XSTRING (TARGET_READ_PC (ptid
)));
876 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
877 /* Macro might contain `[{}]' when not multi-arch */
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: %s # %s\n",
880 "TARGET_WRITE_PC(val, ptid)",
881 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
883 #ifdef TARGET_READ_FP
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: %s # %s\n",
887 XSTRING (TARGET_READ_FP ()));
889 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
890 /* Macro might contain `[{}]' when not multi-arch */
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: %s # %s\n",
893 "TARGET_WRITE_FP(val)",
894 XSTRING (TARGET_WRITE_FP (val
)));
896 #ifdef TARGET_READ_SP
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: %s # %s\n",
900 XSTRING (TARGET_READ_SP ()));
902 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
903 /* Macro might contain `[{}]' when not multi-arch */
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: %s # %s\n",
906 "TARGET_WRITE_SP(val)",
907 XSTRING (TARGET_WRITE_SP (val
)));
909 #if defined (TARGET_VIRTUAL_FRAME_POINTER) && GDB_MULTI_ARCH
910 /* Macro might contain `[{}]' when not multi-arch */
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: %s # %s\n",
913 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
914 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: NUM_REGS # %s\n",
921 #ifdef NUM_PSEUDO_REGS
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
924 XSTRING (NUM_PSEUDO_REGS
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: SP_REGNUM # %s\n",
929 XSTRING (SP_REGNUM
));
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: FP_REGNUM # %s\n",
934 XSTRING (FP_REGNUM
));
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: PC_REGNUM # %s\n",
939 XSTRING (PC_REGNUM
));
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: FP0_REGNUM # %s\n",
944 XSTRING (FP0_REGNUM
));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: NPC_REGNUM # %s\n",
949 XSTRING (NPC_REGNUM
));
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: NNPC_REGNUM # %s\n",
954 XSTRING (NNPC_REGNUM
));
956 #ifdef STAB_REG_TO_REGNUM
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: %s # %s\n",
959 "STAB_REG_TO_REGNUM(stab_regnr)",
960 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
962 #ifdef ECOFF_REG_TO_REGNUM
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: %s # %s\n",
965 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
966 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
968 #ifdef DWARF_REG_TO_REGNUM
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: %s # %s\n",
971 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
972 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
974 #ifdef SDB_REG_TO_REGNUM
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: %s # %s\n",
977 "SDB_REG_TO_REGNUM(sdb_regnr)",
978 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
980 #ifdef DWARF2_REG_TO_REGNUM
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: %s # %s\n",
983 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
984 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: %s # %s\n",
989 "REGISTER_NAME(regnr)",
990 XSTRING (REGISTER_NAME (regnr
)));
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: REGISTER_SIZE # %s\n",
995 XSTRING (REGISTER_SIZE
));
997 #ifdef REGISTER_BYTES
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: REGISTER_BYTES # %s\n",
1000 XSTRING (REGISTER_BYTES
));
1002 #ifdef REGISTER_BYTE
1003 fprintf_unfiltered (file
,
1004 "gdbarch_dump: %s # %s\n",
1005 "REGISTER_BYTE(reg_nr)",
1006 XSTRING (REGISTER_BYTE (reg_nr
)));
1008 #ifdef REGISTER_RAW_SIZE
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: %s # %s\n",
1011 "REGISTER_RAW_SIZE(reg_nr)",
1012 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1014 #ifdef MAX_REGISTER_RAW_SIZE
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1017 XSTRING (MAX_REGISTER_RAW_SIZE
));
1019 #ifdef REGISTER_VIRTUAL_SIZE
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: %s # %s\n",
1022 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1023 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1025 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1028 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1030 #ifdef REGISTER_VIRTUAL_TYPE
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: %s # %s\n",
1033 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1034 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1036 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1037 /* Macro might contain `[{}]' when not multi-arch */
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: %s # %s\n",
1040 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1041 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1043 #ifdef REGISTER_SIM_REGNO
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: %s # %s\n",
1046 "REGISTER_SIM_REGNO(reg_nr)",
1047 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1049 #ifdef REGISTER_BYTES_OK
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: %s # %s\n",
1052 "REGISTER_BYTES_OK(nr_bytes)",
1053 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1055 #ifdef CANNOT_FETCH_REGISTER
1056 fprintf_unfiltered (file
,
1057 "gdbarch_dump: %s # %s\n",
1058 "CANNOT_FETCH_REGISTER(regnum)",
1059 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1061 #ifdef CANNOT_STORE_REGISTER
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: %s # %s\n",
1064 "CANNOT_STORE_REGISTER(regnum)",
1065 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1067 #ifdef USE_GENERIC_DUMMY_FRAMES
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1070 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1072 #ifdef CALL_DUMMY_LOCATION
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1075 XSTRING (CALL_DUMMY_LOCATION
));
1077 #ifdef CALL_DUMMY_ADDRESS
1078 fprintf_unfiltered (file
,
1079 "gdbarch_dump: %s # %s\n",
1080 "CALL_DUMMY_ADDRESS()",
1081 XSTRING (CALL_DUMMY_ADDRESS ()));
1083 #ifdef CALL_DUMMY_START_OFFSET
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1086 XSTRING (CALL_DUMMY_START_OFFSET
));
1088 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1091 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1093 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1096 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1098 #ifdef CALL_DUMMY_LENGTH
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1101 XSTRING (CALL_DUMMY_LENGTH
));
1103 #ifdef PC_IN_CALL_DUMMY
1104 fprintf_unfiltered (file
,
1105 "gdbarch_dump: %s # %s\n",
1106 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1107 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1112 XSTRING (CALL_DUMMY_P
));
1114 #ifdef CALL_DUMMY_WORDS
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1117 XSTRING (CALL_DUMMY_WORDS
));
1119 #ifdef SIZEOF_CALL_DUMMY_WORDS
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1122 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1124 #ifdef CALL_DUMMY_STACK_ADJUST_P
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1127 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1129 #ifdef CALL_DUMMY_STACK_ADJUST
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1132 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1134 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1135 /* Macro might contain `[{}]' when not multi-arch */
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: %s # %s\n",
1138 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1139 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1141 #if defined (INIT_FRAME_PC_FIRST) && GDB_MULTI_ARCH
1142 /* Macro might contain `[{}]' when not multi-arch */
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: %s # %s\n",
1145 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1146 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1148 #if defined (INIT_FRAME_PC) && GDB_MULTI_ARCH
1149 /* Macro might contain `[{}]' when not multi-arch */
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: %s # %s\n",
1152 "INIT_FRAME_PC(fromleaf, prev)",
1153 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1155 #ifdef BELIEVE_PCC_PROMOTION
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1158 XSTRING (BELIEVE_PCC_PROMOTION
));
1160 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1161 fprintf_unfiltered (file
,
1162 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1163 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1165 #ifdef COERCE_FLOAT_TO_DOUBLE
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: %s # %s\n",
1168 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1169 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1171 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1172 /* Macro might contain `[{}]' when not multi-arch */
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: %s # %s\n",
1175 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1176 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1178 #ifdef REGISTER_CONVERTIBLE
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: %s # %s\n",
1181 "REGISTER_CONVERTIBLE(nr)",
1182 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1184 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1185 /* Macro might contain `[{}]' when not multi-arch */
1186 fprintf_unfiltered (file
,
1187 "gdbarch_dump: %s # %s\n",
1188 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1189 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1191 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1192 /* Macro might contain `[{}]' when not multi-arch */
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: %s # %s\n",
1195 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1196 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1198 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1199 /* Macro might contain `[{}]' when not multi-arch */
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: %s # %s\n",
1202 "FETCH_PSEUDO_REGISTER(regnum)",
1203 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1205 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1206 /* Macro might contain `[{}]' when not multi-arch */
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: %s # %s\n",
1209 "STORE_PSEUDO_REGISTER(regnum)",
1210 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1212 #ifdef POINTER_TO_ADDRESS
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: %s # %s\n",
1215 "POINTER_TO_ADDRESS(type, buf)",
1216 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1218 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1219 /* Macro might contain `[{}]' when not multi-arch */
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: %s # %s\n",
1222 "ADDRESS_TO_POINTER(type, buf, addr)",
1223 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1225 #ifdef RETURN_VALUE_ON_STACK
1226 fprintf_unfiltered (file
,
1227 "gdbarch_dump: %s # %s\n",
1228 "RETURN_VALUE_ON_STACK(type)",
1229 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1231 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1232 /* Macro might contain `[{}]' when not multi-arch */
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: %s # %s\n",
1235 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1236 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1238 #ifdef PUSH_ARGUMENTS
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: %s # %s\n",
1241 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1242 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1244 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1245 /* Macro might contain `[{}]' when not multi-arch */
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: %s # %s\n",
1248 "PUSH_DUMMY_FRAME(-)",
1249 XSTRING (PUSH_DUMMY_FRAME (-)));
1251 #ifdef PUSH_RETURN_ADDRESS
1252 fprintf_unfiltered (file
,
1253 "gdbarch_dump: %s # %s\n",
1254 "PUSH_RETURN_ADDRESS(pc, sp)",
1255 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1257 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1258 /* Macro might contain `[{}]' when not multi-arch */
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: %s # %s\n",
1262 XSTRING (POP_FRAME (-)));
1264 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1265 /* Macro might contain `[{}]' when not multi-arch */
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: %s # %s\n",
1268 "STORE_STRUCT_RETURN(addr, sp)",
1269 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1271 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1272 /* Macro might contain `[{}]' when not multi-arch */
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: %s # %s\n",
1275 "STORE_RETURN_VALUE(type, valbuf)",
1276 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1278 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: %s # %s\n",
1281 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1282 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1284 #ifdef USE_STRUCT_CONVENTION
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: %s # %s\n",
1287 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1288 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1290 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1291 /* Macro might contain `[{}]' when not multi-arch */
1292 fprintf_unfiltered (file
,
1293 "gdbarch_dump: %s # %s\n",
1294 "FRAME_INIT_SAVED_REGS(frame)",
1295 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1297 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1298 /* Macro might contain `[{}]' when not multi-arch */
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: %s # %s\n",
1301 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1302 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1304 #ifdef SKIP_PROLOGUE
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "SKIP_PROLOGUE(ip)",
1308 XSTRING (SKIP_PROLOGUE (ip
)));
1310 #ifdef PROLOGUE_FRAMELESS_P
1311 fprintf_unfiltered (file
,
1312 "gdbarch_dump: %s # %s\n",
1313 "PROLOGUE_FRAMELESS_P(ip)",
1314 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: %s # %s\n",
1319 "INNER_THAN(lhs, rhs)",
1320 XSTRING (INNER_THAN (lhs
, rhs
)));
1322 #ifdef BREAKPOINT_FROM_PC
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: %s # %s\n",
1325 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1326 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1328 #ifdef MEMORY_INSERT_BREAKPOINT
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: %s # %s\n",
1331 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1332 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1334 #ifdef MEMORY_REMOVE_BREAKPOINT
1335 fprintf_unfiltered (file
,
1336 "gdbarch_dump: %s # %s\n",
1337 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1338 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1340 #ifdef DECR_PC_AFTER_BREAK
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1343 XSTRING (DECR_PC_AFTER_BREAK
));
1345 #ifdef PREPARE_TO_PROCEED
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: %s # %s\n",
1348 "PREPARE_TO_PROCEED(select_it)",
1349 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1351 #ifdef FUNCTION_START_OFFSET
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1354 XSTRING (FUNCTION_START_OFFSET
));
1356 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1357 /* Macro might contain `[{}]' when not multi-arch */
1358 fprintf_unfiltered (file
,
1359 "gdbarch_dump: %s # %s\n",
1360 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1361 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1363 #ifdef FRAME_ARGS_SKIP
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1366 XSTRING (FRAME_ARGS_SKIP
));
1368 #ifdef FRAMELESS_FUNCTION_INVOCATION
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: %s # %s\n",
1371 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1372 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: %s # %s\n",
1377 "FRAME_CHAIN(frame)",
1378 XSTRING (FRAME_CHAIN (frame
)));
1380 #ifdef FRAME_CHAIN_VALID
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: %s # %s\n",
1383 "FRAME_CHAIN_VALID(chain, thisframe)",
1384 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1386 #ifdef FRAME_SAVED_PC
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: %s # %s\n",
1389 "FRAME_SAVED_PC(fi)",
1390 XSTRING (FRAME_SAVED_PC (fi
)));
1392 #ifdef FRAME_ARGS_ADDRESS
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: %s # %s\n",
1395 "FRAME_ARGS_ADDRESS(fi)",
1396 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1398 #ifdef FRAME_LOCALS_ADDRESS
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: %s # %s\n",
1401 "FRAME_LOCALS_ADDRESS(fi)",
1402 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1404 #ifdef SAVED_PC_AFTER_CALL
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: %s # %s\n",
1407 "SAVED_PC_AFTER_CALL(frame)",
1408 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1410 #ifdef FRAME_NUM_ARGS
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: %s # %s\n",
1413 "FRAME_NUM_ARGS(frame)",
1414 XSTRING (FRAME_NUM_ARGS (frame
)));
1417 fprintf_unfiltered (file
,
1418 "gdbarch_dump: %s # %s\n",
1420 XSTRING (STACK_ALIGN (sp
)));
1422 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1425 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1427 #ifdef REG_STRUCT_HAS_ADDR
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: %s # %s\n",
1430 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1431 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1433 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1434 /* Macro might contain `[{}]' when not multi-arch */
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: %s # %s\n",
1437 "SAVE_DUMMY_FRAME_TOS(sp)",
1438 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1440 #ifdef PARM_BOUNDARY
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1443 XSTRING (PARM_BOUNDARY
));
1445 #ifdef TARGET_FLOAT_FORMAT
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1448 XSTRING (TARGET_FLOAT_FORMAT
));
1450 #ifdef TARGET_DOUBLE_FORMAT
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1453 XSTRING (TARGET_DOUBLE_FORMAT
));
1455 #ifdef TARGET_LONG_DOUBLE_FORMAT
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1458 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1460 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: %s # %s\n",
1463 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1464 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1466 #ifdef ADDR_BITS_REMOVE
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: %s # %s\n",
1469 "ADDR_BITS_REMOVE(addr)",
1470 XSTRING (ADDR_BITS_REMOVE (addr
)));
1472 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1473 /* Macro might contain `[{}]' when not multi-arch */
1474 fprintf_unfiltered (file
,
1475 "gdbarch_dump: %s # %s\n",
1476 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1477 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1479 #ifdef TARGET_PRINT_INSN
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: %s # %s\n",
1482 "TARGET_PRINT_INSN(vma, info)",
1483 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1485 #ifdef SKIP_TRAMPOLINE_CODE
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: %s # %s\n",
1488 "SKIP_TRAMPOLINE_CODE(pc)",
1489 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1491 #ifdef TARGET_ARCHITECTURE
1492 if (TARGET_ARCHITECTURE
!= NULL
)
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1495 TARGET_ARCHITECTURE
->printable_name
);
1497 #ifdef TARGET_BYTE_ORDER
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1500 (long) TARGET_BYTE_ORDER
);
1502 #ifdef TARGET_SHORT_BIT
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1505 (long) TARGET_SHORT_BIT
);
1507 #ifdef TARGET_INT_BIT
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1510 (long) TARGET_INT_BIT
);
1512 #ifdef TARGET_LONG_BIT
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1515 (long) TARGET_LONG_BIT
);
1517 #ifdef TARGET_LONG_LONG_BIT
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1520 (long) TARGET_LONG_LONG_BIT
);
1522 #ifdef TARGET_FLOAT_BIT
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1525 (long) TARGET_FLOAT_BIT
);
1527 #ifdef TARGET_DOUBLE_BIT
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1530 (long) TARGET_DOUBLE_BIT
);
1532 #ifdef TARGET_LONG_DOUBLE_BIT
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1535 (long) TARGET_LONG_DOUBLE_BIT
);
1537 #ifdef TARGET_PTR_BIT
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1540 (long) TARGET_PTR_BIT
);
1542 #ifdef TARGET_ADDR_BIT
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1545 (long) TARGET_ADDR_BIT
);
1547 #ifdef TARGET_BFD_VMA_BIT
1548 fprintf_unfiltered (file
,
1549 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1550 (long) TARGET_BFD_VMA_BIT
);
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1557 #ifdef TARGET_READ_PC
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1561 (long) current_gdbarch
->read_pc
1562 /*TARGET_READ_PC ()*/);
1564 #ifdef TARGET_WRITE_PC
1566 fprintf_unfiltered (file
,
1567 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1568 (long) current_gdbarch
->write_pc
1569 /*TARGET_WRITE_PC ()*/);
1571 #ifdef TARGET_READ_FP
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1575 (long) current_gdbarch
->read_fp
1576 /*TARGET_READ_FP ()*/);
1578 #ifdef TARGET_WRITE_FP
1580 fprintf_unfiltered (file
,
1581 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1582 (long) current_gdbarch
->write_fp
1583 /*TARGET_WRITE_FP ()*/);
1585 #ifdef TARGET_READ_SP
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1589 (long) current_gdbarch
->read_sp
1590 /*TARGET_READ_SP ()*/);
1592 #ifdef TARGET_WRITE_SP
1594 fprintf_unfiltered (file
,
1595 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1596 (long) current_gdbarch
->write_sp
1597 /*TARGET_WRITE_SP ()*/);
1599 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
1603 (long) current_gdbarch
->virtual_frame_pointer
1604 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: register_read = 0x%08lx\n",
1609 (long) current_gdbarch
->register_read
);
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: register_write = 0x%08lx\n",
1613 (long) current_gdbarch
->register_write
);
1615 fprintf_unfiltered (file
,
1616 "gdbarch_dump: NUM_REGS = %ld\n",
1619 #ifdef NUM_PSEUDO_REGS
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1622 (long) NUM_PSEUDO_REGS
);
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: SP_REGNUM = %ld\n",
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: FP_REGNUM = %ld\n",
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: PC_REGNUM = %ld\n",
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: FP0_REGNUM = %ld\n",
1645 fprintf_unfiltered (file
,
1646 "gdbarch_dump: NPC_REGNUM = %ld\n",
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1652 (long) NNPC_REGNUM
);
1654 #ifdef STAB_REG_TO_REGNUM
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1658 (long) current_gdbarch
->stab_reg_to_regnum
1659 /*STAB_REG_TO_REGNUM ()*/);
1661 #ifdef ECOFF_REG_TO_REGNUM
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1665 (long) current_gdbarch
->ecoff_reg_to_regnum
1666 /*ECOFF_REG_TO_REGNUM ()*/);
1668 #ifdef DWARF_REG_TO_REGNUM
1670 fprintf_unfiltered (file
,
1671 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1672 (long) current_gdbarch
->dwarf_reg_to_regnum
1673 /*DWARF_REG_TO_REGNUM ()*/);
1675 #ifdef SDB_REG_TO_REGNUM
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1679 (long) current_gdbarch
->sdb_reg_to_regnum
1680 /*SDB_REG_TO_REGNUM ()*/);
1682 #ifdef DWARF2_REG_TO_REGNUM
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1686 (long) current_gdbarch
->dwarf2_reg_to_regnum
1687 /*DWARF2_REG_TO_REGNUM ()*/);
1689 #ifdef REGISTER_NAME
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1693 (long) current_gdbarch
->register_name
1694 /*REGISTER_NAME ()*/);
1696 #ifdef REGISTER_SIZE
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1699 (long) REGISTER_SIZE
);
1701 #ifdef REGISTER_BYTES
1702 fprintf_unfiltered (file
,
1703 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1704 (long) REGISTER_BYTES
);
1706 #ifdef REGISTER_BYTE
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1710 (long) current_gdbarch
->register_byte
1711 /*REGISTER_BYTE ()*/);
1713 #ifdef REGISTER_RAW_SIZE
1715 fprintf_unfiltered (file
,
1716 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1717 (long) current_gdbarch
->register_raw_size
1718 /*REGISTER_RAW_SIZE ()*/);
1720 #ifdef MAX_REGISTER_RAW_SIZE
1721 fprintf_unfiltered (file
,
1722 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1723 (long) MAX_REGISTER_RAW_SIZE
);
1725 #ifdef REGISTER_VIRTUAL_SIZE
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1729 (long) current_gdbarch
->register_virtual_size
1730 /*REGISTER_VIRTUAL_SIZE ()*/);
1732 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1735 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1737 #ifdef REGISTER_VIRTUAL_TYPE
1739 fprintf_unfiltered (file
,
1740 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1741 (long) current_gdbarch
->register_virtual_type
1742 /*REGISTER_VIRTUAL_TYPE ()*/);
1744 #ifdef DO_REGISTERS_INFO
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1748 (long) current_gdbarch
->do_registers_info
1749 /*DO_REGISTERS_INFO ()*/);
1751 #ifdef REGISTER_SIM_REGNO
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1755 (long) current_gdbarch
->register_sim_regno
1756 /*REGISTER_SIM_REGNO ()*/);
1758 #ifdef REGISTER_BYTES_OK
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1762 (long) current_gdbarch
->register_bytes_ok
1763 /*REGISTER_BYTES_OK ()*/);
1765 #ifdef CANNOT_FETCH_REGISTER
1767 fprintf_unfiltered (file
,
1768 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
1769 (long) current_gdbarch
->cannot_fetch_register
1770 /*CANNOT_FETCH_REGISTER ()*/);
1772 #ifdef CANNOT_STORE_REGISTER
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1776 (long) current_gdbarch
->cannot_store_register
1777 /*CANNOT_STORE_REGISTER ()*/);
1779 #ifdef USE_GENERIC_DUMMY_FRAMES
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1782 (long) USE_GENERIC_DUMMY_FRAMES
);
1784 #ifdef CALL_DUMMY_LOCATION
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1787 (long) CALL_DUMMY_LOCATION
);
1789 #ifdef CALL_DUMMY_ADDRESS
1791 fprintf_unfiltered (file
,
1792 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1793 (long) current_gdbarch
->call_dummy_address
1794 /*CALL_DUMMY_ADDRESS ()*/);
1796 #ifdef CALL_DUMMY_START_OFFSET
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1799 (long) CALL_DUMMY_START_OFFSET
);
1801 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1802 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1803 fprintf_unfiltered (file
,
1804 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1805 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1807 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1810 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1812 #ifdef CALL_DUMMY_LENGTH
1813 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1814 fprintf_unfiltered (file
,
1815 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1816 (long) CALL_DUMMY_LENGTH
);
1818 #ifdef PC_IN_CALL_DUMMY
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1822 (long) current_gdbarch
->pc_in_call_dummy
1823 /*PC_IN_CALL_DUMMY ()*/);
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1828 (long) CALL_DUMMY_P
);
1830 #ifdef CALL_DUMMY_WORDS
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1833 (long) CALL_DUMMY_WORDS
);
1835 #ifdef SIZEOF_CALL_DUMMY_WORDS
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1838 (long) SIZEOF_CALL_DUMMY_WORDS
);
1840 #ifdef CALL_DUMMY_STACK_ADJUST_P
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1843 (long) CALL_DUMMY_STACK_ADJUST_P
);
1845 #ifdef CALL_DUMMY_STACK_ADJUST
1846 if (CALL_DUMMY_STACK_ADJUST_P
)
1847 fprintf_unfiltered (file
,
1848 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1849 (long) CALL_DUMMY_STACK_ADJUST
);
1851 #ifdef FIX_CALL_DUMMY
1853 fprintf_unfiltered (file
,
1854 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1855 (long) current_gdbarch
->fix_call_dummy
1856 /*FIX_CALL_DUMMY ()*/);
1858 #ifdef INIT_FRAME_PC_FIRST
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1862 (long) current_gdbarch
->init_frame_pc_first
1863 /*INIT_FRAME_PC_FIRST ()*/);
1865 #ifdef INIT_FRAME_PC
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1869 (long) current_gdbarch
->init_frame_pc
1870 /*INIT_FRAME_PC ()*/);
1872 #ifdef BELIEVE_PCC_PROMOTION
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1875 (long) BELIEVE_PCC_PROMOTION
);
1877 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1880 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1882 #ifdef COERCE_FLOAT_TO_DOUBLE
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1886 (long) current_gdbarch
->coerce_float_to_double
1887 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1889 #ifdef GET_SAVED_REGISTER
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1893 (long) current_gdbarch
->get_saved_register
1894 /*GET_SAVED_REGISTER ()*/);
1896 #ifdef REGISTER_CONVERTIBLE
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1900 (long) current_gdbarch
->register_convertible
1901 /*REGISTER_CONVERTIBLE ()*/);
1903 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1907 (long) current_gdbarch
->register_convert_to_virtual
1908 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1910 #ifdef REGISTER_CONVERT_TO_RAW
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1914 (long) current_gdbarch
->register_convert_to_raw
1915 /*REGISTER_CONVERT_TO_RAW ()*/);
1917 #ifdef FETCH_PSEUDO_REGISTER
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1921 (long) current_gdbarch
->fetch_pseudo_register
1922 /*FETCH_PSEUDO_REGISTER ()*/);
1924 #ifdef STORE_PSEUDO_REGISTER
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1928 (long) current_gdbarch
->store_pseudo_register
1929 /*STORE_PSEUDO_REGISTER ()*/);
1931 #ifdef POINTER_TO_ADDRESS
1933 fprintf_unfiltered (file
,
1934 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1935 (long) current_gdbarch
->pointer_to_address
1936 /*POINTER_TO_ADDRESS ()*/);
1938 #ifdef ADDRESS_TO_POINTER
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1942 (long) current_gdbarch
->address_to_pointer
1943 /*ADDRESS_TO_POINTER ()*/);
1945 #ifdef RETURN_VALUE_ON_STACK
1947 fprintf_unfiltered (file
,
1948 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1949 (long) current_gdbarch
->return_value_on_stack
1950 /*RETURN_VALUE_ON_STACK ()*/);
1952 #ifdef EXTRACT_RETURN_VALUE
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1956 (long) current_gdbarch
->extract_return_value
1957 /*EXTRACT_RETURN_VALUE ()*/);
1959 #ifdef PUSH_ARGUMENTS
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1963 (long) current_gdbarch
->push_arguments
1964 /*PUSH_ARGUMENTS ()*/);
1966 #ifdef PUSH_DUMMY_FRAME
1968 fprintf_unfiltered (file
,
1969 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1970 (long) current_gdbarch
->push_dummy_frame
1971 /*PUSH_DUMMY_FRAME ()*/);
1973 #ifdef PUSH_RETURN_ADDRESS
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1977 (long) current_gdbarch
->push_return_address
1978 /*PUSH_RETURN_ADDRESS ()*/);
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1984 (long) current_gdbarch
->pop_frame
1987 #ifdef STORE_STRUCT_RETURN
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1991 (long) current_gdbarch
->store_struct_return
1992 /*STORE_STRUCT_RETURN ()*/);
1994 #ifdef STORE_RETURN_VALUE
1996 fprintf_unfiltered (file
,
1997 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1998 (long) current_gdbarch
->store_return_value
1999 /*STORE_RETURN_VALUE ()*/);
2001 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
2005 (long) current_gdbarch
->extract_struct_value_address
2006 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
2008 #ifdef USE_STRUCT_CONVENTION
2010 fprintf_unfiltered (file
,
2011 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2012 (long) current_gdbarch
->use_struct_convention
2013 /*USE_STRUCT_CONVENTION ()*/);
2015 #ifdef FRAME_INIT_SAVED_REGS
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
2019 (long) current_gdbarch
->frame_init_saved_regs
2020 /*FRAME_INIT_SAVED_REGS ()*/);
2022 #ifdef INIT_EXTRA_FRAME_INFO
2024 fprintf_unfiltered (file
,
2025 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
2026 (long) current_gdbarch
->init_extra_frame_info
2027 /*INIT_EXTRA_FRAME_INFO ()*/);
2029 #ifdef SKIP_PROLOGUE
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
2033 (long) current_gdbarch
->skip_prologue
2034 /*SKIP_PROLOGUE ()*/);
2036 #ifdef PROLOGUE_FRAMELESS_P
2038 fprintf_unfiltered (file
,
2039 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2040 (long) current_gdbarch
->prologue_frameless_p
2041 /*PROLOGUE_FRAMELESS_P ()*/);
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2047 (long) current_gdbarch
->inner_than
2050 #ifdef BREAKPOINT_FROM_PC
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2054 (long) current_gdbarch
->breakpoint_from_pc
2055 /*BREAKPOINT_FROM_PC ()*/);
2057 #ifdef MEMORY_INSERT_BREAKPOINT
2059 fprintf_unfiltered (file
,
2060 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2061 (long) current_gdbarch
->memory_insert_breakpoint
2062 /*MEMORY_INSERT_BREAKPOINT ()*/);
2064 #ifdef MEMORY_REMOVE_BREAKPOINT
2066 fprintf_unfiltered (file
,
2067 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2068 (long) current_gdbarch
->memory_remove_breakpoint
2069 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2071 #ifdef DECR_PC_AFTER_BREAK
2072 fprintf_unfiltered (file
,
2073 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2074 (long) DECR_PC_AFTER_BREAK
);
2076 #ifdef PREPARE_TO_PROCEED
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2080 (long) current_gdbarch
->prepare_to_proceed
2081 /*PREPARE_TO_PROCEED ()*/);
2083 #ifdef FUNCTION_START_OFFSET
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2086 (long) FUNCTION_START_OFFSET
);
2088 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2090 fprintf_unfiltered (file
,
2091 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2092 (long) current_gdbarch
->remote_translate_xfer_address
2093 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2095 #ifdef FRAME_ARGS_SKIP
2096 fprintf_unfiltered (file
,
2097 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2098 (long) FRAME_ARGS_SKIP
);
2100 #ifdef FRAMELESS_FUNCTION_INVOCATION
2102 fprintf_unfiltered (file
,
2103 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2104 (long) current_gdbarch
->frameless_function_invocation
2105 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2111 (long) current_gdbarch
->frame_chain
2112 /*FRAME_CHAIN ()*/);
2114 #ifdef FRAME_CHAIN_VALID
2116 fprintf_unfiltered (file
,
2117 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2118 (long) current_gdbarch
->frame_chain_valid
2119 /*FRAME_CHAIN_VALID ()*/);
2121 #ifdef FRAME_SAVED_PC
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2125 (long) current_gdbarch
->frame_saved_pc
2126 /*FRAME_SAVED_PC ()*/);
2128 #ifdef FRAME_ARGS_ADDRESS
2130 fprintf_unfiltered (file
,
2131 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2132 (long) current_gdbarch
->frame_args_address
2133 /*FRAME_ARGS_ADDRESS ()*/);
2135 #ifdef FRAME_LOCALS_ADDRESS
2137 fprintf_unfiltered (file
,
2138 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2139 (long) current_gdbarch
->frame_locals_address
2140 /*FRAME_LOCALS_ADDRESS ()*/);
2142 #ifdef SAVED_PC_AFTER_CALL
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2146 (long) current_gdbarch
->saved_pc_after_call
2147 /*SAVED_PC_AFTER_CALL ()*/);
2149 #ifdef FRAME_NUM_ARGS
2151 fprintf_unfiltered (file
,
2152 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2153 (long) current_gdbarch
->frame_num_args
2154 /*FRAME_NUM_ARGS ()*/);
2158 fprintf_unfiltered (file
,
2159 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2160 (long) current_gdbarch
->stack_align
2161 /*STACK_ALIGN ()*/);
2163 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2164 fprintf_unfiltered (file
,
2165 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2166 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2168 #ifdef REG_STRUCT_HAS_ADDR
2170 fprintf_unfiltered (file
,
2171 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2172 (long) current_gdbarch
->reg_struct_has_addr
2173 /*REG_STRUCT_HAS_ADDR ()*/);
2175 #ifdef SAVE_DUMMY_FRAME_TOS
2177 fprintf_unfiltered (file
,
2178 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2179 (long) current_gdbarch
->save_dummy_frame_tos
2180 /*SAVE_DUMMY_FRAME_TOS ()*/);
2182 #ifdef PARM_BOUNDARY
2183 fprintf_unfiltered (file
,
2184 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2185 (long) PARM_BOUNDARY
);
2187 #ifdef TARGET_FLOAT_FORMAT
2188 fprintf_unfiltered (file
,
2189 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2190 (long) TARGET_FLOAT_FORMAT
);
2192 #ifdef TARGET_DOUBLE_FORMAT
2193 fprintf_unfiltered (file
,
2194 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2195 (long) TARGET_DOUBLE_FORMAT
);
2197 #ifdef TARGET_LONG_DOUBLE_FORMAT
2198 fprintf_unfiltered (file
,
2199 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2200 (long) TARGET_LONG_DOUBLE_FORMAT
);
2202 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2204 fprintf_unfiltered (file
,
2205 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2206 (long) current_gdbarch
->convert_from_func_ptr_addr
2207 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2209 #ifdef ADDR_BITS_REMOVE
2211 fprintf_unfiltered (file
,
2212 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
2213 (long) current_gdbarch
->addr_bits_remove
2214 /*ADDR_BITS_REMOVE ()*/);
2216 #ifdef SOFTWARE_SINGLE_STEP
2218 fprintf_unfiltered (file
,
2219 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2220 (long) current_gdbarch
->software_single_step
2221 /*SOFTWARE_SINGLE_STEP ()*/);
2223 #ifdef TARGET_PRINT_INSN
2225 fprintf_unfiltered (file
,
2226 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
2227 (long) current_gdbarch
->print_insn
2228 /*TARGET_PRINT_INSN ()*/);
2230 #ifdef SKIP_TRAMPOLINE_CODE
2232 fprintf_unfiltered (file
,
2233 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
2234 (long) current_gdbarch
->skip_trampoline_code
2235 /*SKIP_TRAMPOLINE_CODE ()*/);
2237 if (current_gdbarch
->dump_tdep
!= NULL
)
2238 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2241 struct gdbarch_tdep
*
2242 gdbarch_tdep (struct gdbarch
*gdbarch
)
2244 if (gdbarch_debug
>= 2)
2245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2246 return gdbarch
->tdep
;
2250 const struct bfd_arch_info
*
2251 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2253 if (gdbarch_debug
>= 2)
2254 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2255 return gdbarch
->bfd_arch_info
;
2259 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2261 if (gdbarch_debug
>= 2)
2262 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2263 return gdbarch
->byte_order
;
2267 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2269 /* Skip verify of short_bit, invalid_p == 0 */
2270 if (gdbarch_debug
>= 2)
2271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2272 return gdbarch
->short_bit
;
2276 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2279 gdbarch
->short_bit
= short_bit
;
2283 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2285 /* Skip verify of int_bit, invalid_p == 0 */
2286 if (gdbarch_debug
>= 2)
2287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2288 return gdbarch
->int_bit
;
2292 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2295 gdbarch
->int_bit
= int_bit
;
2299 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2301 /* Skip verify of long_bit, invalid_p == 0 */
2302 if (gdbarch_debug
>= 2)
2303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2304 return gdbarch
->long_bit
;
2308 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2311 gdbarch
->long_bit
= long_bit
;
2315 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2317 /* Skip verify of long_long_bit, invalid_p == 0 */
2318 if (gdbarch_debug
>= 2)
2319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2320 return gdbarch
->long_long_bit
;
2324 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2327 gdbarch
->long_long_bit
= long_long_bit
;
2331 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2333 /* Skip verify of float_bit, invalid_p == 0 */
2334 if (gdbarch_debug
>= 2)
2335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2336 return gdbarch
->float_bit
;
2340 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2343 gdbarch
->float_bit
= float_bit
;
2347 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2349 /* Skip verify of double_bit, invalid_p == 0 */
2350 if (gdbarch_debug
>= 2)
2351 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2352 return gdbarch
->double_bit
;
2356 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2359 gdbarch
->double_bit
= double_bit
;
2363 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2365 /* Skip verify of long_double_bit, invalid_p == 0 */
2366 if (gdbarch_debug
>= 2)
2367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2368 return gdbarch
->long_double_bit
;
2372 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2373 int long_double_bit
)
2375 gdbarch
->long_double_bit
= long_double_bit
;
2379 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2381 /* Skip verify of ptr_bit, invalid_p == 0 */
2382 if (gdbarch_debug
>= 2)
2383 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2384 return gdbarch
->ptr_bit
;
2388 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2391 gdbarch
->ptr_bit
= ptr_bit
;
2395 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2397 if (gdbarch
->addr_bit
== 0)
2398 internal_error (__FILE__
, __LINE__
,
2399 "gdbarch: gdbarch_addr_bit invalid");
2400 if (gdbarch_debug
>= 2)
2401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2402 return gdbarch
->addr_bit
;
2406 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2409 gdbarch
->addr_bit
= addr_bit
;
2413 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2415 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2416 if (gdbarch_debug
>= 2)
2417 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2418 return gdbarch
->bfd_vma_bit
;
2422 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2425 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2429 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2431 /* Skip verify of ieee_float, invalid_p == 0 */
2432 if (gdbarch_debug
>= 2)
2433 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2434 return gdbarch
->ieee_float
;
2438 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2441 gdbarch
->ieee_float
= ieee_float
;
2445 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2447 if (gdbarch
->read_pc
== 0)
2448 internal_error (__FILE__
, __LINE__
,
2449 "gdbarch: gdbarch_read_pc invalid");
2450 if (gdbarch_debug
>= 2)
2451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2452 return gdbarch
->read_pc (ptid
);
2456 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2457 gdbarch_read_pc_ftype read_pc
)
2459 gdbarch
->read_pc
= read_pc
;
2463 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2465 if (gdbarch
->write_pc
== 0)
2466 internal_error (__FILE__
, __LINE__
,
2467 "gdbarch: gdbarch_write_pc invalid");
2468 if (gdbarch_debug
>= 2)
2469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2470 gdbarch
->write_pc (val
, ptid
);
2474 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2475 gdbarch_write_pc_ftype write_pc
)
2477 gdbarch
->write_pc
= write_pc
;
2481 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2483 if (gdbarch
->read_fp
== 0)
2484 internal_error (__FILE__
, __LINE__
,
2485 "gdbarch: gdbarch_read_fp invalid");
2486 if (gdbarch_debug
>= 2)
2487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2488 return gdbarch
->read_fp ();
2492 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2493 gdbarch_read_fp_ftype read_fp
)
2495 gdbarch
->read_fp
= read_fp
;
2499 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2501 if (gdbarch
->write_fp
== 0)
2502 internal_error (__FILE__
, __LINE__
,
2503 "gdbarch: gdbarch_write_fp invalid");
2504 if (gdbarch_debug
>= 2)
2505 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2506 gdbarch
->write_fp (val
);
2510 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2511 gdbarch_write_fp_ftype write_fp
)
2513 gdbarch
->write_fp
= write_fp
;
2517 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2519 if (gdbarch
->read_sp
== 0)
2520 internal_error (__FILE__
, __LINE__
,
2521 "gdbarch: gdbarch_read_sp invalid");
2522 if (gdbarch_debug
>= 2)
2523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2524 return gdbarch
->read_sp ();
2528 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2529 gdbarch_read_sp_ftype read_sp
)
2531 gdbarch
->read_sp
= read_sp
;
2535 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2537 if (gdbarch
->write_sp
== 0)
2538 internal_error (__FILE__
, __LINE__
,
2539 "gdbarch: gdbarch_write_sp invalid");
2540 if (gdbarch_debug
>= 2)
2541 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2542 gdbarch
->write_sp (val
);
2546 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2547 gdbarch_write_sp_ftype write_sp
)
2549 gdbarch
->write_sp
= write_sp
;
2553 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2555 if (gdbarch
->virtual_frame_pointer
== 0)
2556 internal_error (__FILE__
, __LINE__
,
2557 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2558 if (gdbarch_debug
>= 2)
2559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2560 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2564 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2565 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2567 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2571 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2573 return gdbarch
->register_read
!= 0;
2577 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2579 if (gdbarch
->register_read
== 0)
2580 internal_error (__FILE__
, __LINE__
,
2581 "gdbarch: gdbarch_register_read invalid");
2582 if (gdbarch_debug
>= 2)
2583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2584 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2588 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2589 gdbarch_register_read_ftype register_read
)
2591 gdbarch
->register_read
= register_read
;
2595 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2597 return gdbarch
->register_write
!= 0;
2601 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2603 if (gdbarch
->register_write
== 0)
2604 internal_error (__FILE__
, __LINE__
,
2605 "gdbarch: gdbarch_register_write invalid");
2606 if (gdbarch_debug
>= 2)
2607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2608 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2612 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2613 gdbarch_register_write_ftype register_write
)
2615 gdbarch
->register_write
= register_write
;
2619 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2621 if (gdbarch
->num_regs
== -1)
2622 internal_error (__FILE__
, __LINE__
,
2623 "gdbarch: gdbarch_num_regs invalid");
2624 if (gdbarch_debug
>= 2)
2625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2626 return gdbarch
->num_regs
;
2630 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2633 gdbarch
->num_regs
= num_regs
;
2637 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2639 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2640 if (gdbarch_debug
>= 2)
2641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2642 return gdbarch
->num_pseudo_regs
;
2646 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2647 int num_pseudo_regs
)
2649 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2653 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2655 if (gdbarch
->sp_regnum
== -1)
2656 internal_error (__FILE__
, __LINE__
,
2657 "gdbarch: gdbarch_sp_regnum invalid");
2658 if (gdbarch_debug
>= 2)
2659 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2660 return gdbarch
->sp_regnum
;
2664 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2667 gdbarch
->sp_regnum
= sp_regnum
;
2671 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2673 if (gdbarch
->fp_regnum
== -1)
2674 internal_error (__FILE__
, __LINE__
,
2675 "gdbarch: gdbarch_fp_regnum invalid");
2676 if (gdbarch_debug
>= 2)
2677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2678 return gdbarch
->fp_regnum
;
2682 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2685 gdbarch
->fp_regnum
= fp_regnum
;
2689 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2691 if (gdbarch
->pc_regnum
== -1)
2692 internal_error (__FILE__
, __LINE__
,
2693 "gdbarch: gdbarch_pc_regnum invalid");
2694 if (gdbarch_debug
>= 2)
2695 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2696 return gdbarch
->pc_regnum
;
2700 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2703 gdbarch
->pc_regnum
= pc_regnum
;
2707 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2709 /* Skip verify of fp0_regnum, invalid_p == 0 */
2710 if (gdbarch_debug
>= 2)
2711 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2712 return gdbarch
->fp0_regnum
;
2716 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2719 gdbarch
->fp0_regnum
= fp0_regnum
;
2723 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2725 /* Skip verify of npc_regnum, invalid_p == 0 */
2726 if (gdbarch_debug
>= 2)
2727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2728 return gdbarch
->npc_regnum
;
2732 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2735 gdbarch
->npc_regnum
= npc_regnum
;
2739 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2741 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2742 if (gdbarch_debug
>= 2)
2743 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2744 return gdbarch
->nnpc_regnum
;
2748 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2751 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2755 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2757 if (gdbarch
->stab_reg_to_regnum
== 0)
2758 internal_error (__FILE__
, __LINE__
,
2759 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2760 if (gdbarch_debug
>= 2)
2761 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2762 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2766 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2767 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2769 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2773 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2775 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2776 internal_error (__FILE__
, __LINE__
,
2777 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2778 if (gdbarch_debug
>= 2)
2779 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2780 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2784 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2785 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2787 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2791 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2793 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2794 internal_error (__FILE__
, __LINE__
,
2795 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2796 if (gdbarch_debug
>= 2)
2797 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2798 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2802 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2803 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2805 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2809 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2811 if (gdbarch
->sdb_reg_to_regnum
== 0)
2812 internal_error (__FILE__
, __LINE__
,
2813 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2814 if (gdbarch_debug
>= 2)
2815 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2816 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2820 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2821 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2823 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2827 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2829 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2830 internal_error (__FILE__
, __LINE__
,
2831 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2832 if (gdbarch_debug
>= 2)
2833 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2834 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2838 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2839 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2841 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2845 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2847 if (gdbarch
->register_name
== 0)
2848 internal_error (__FILE__
, __LINE__
,
2849 "gdbarch: gdbarch_register_name invalid");
2850 if (gdbarch_debug
>= 2)
2851 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2852 return gdbarch
->register_name (regnr
);
2856 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2857 gdbarch_register_name_ftype register_name
)
2859 gdbarch
->register_name
= register_name
;
2863 gdbarch_register_size (struct gdbarch
*gdbarch
)
2865 if (gdbarch
->register_size
== -1)
2866 internal_error (__FILE__
, __LINE__
,
2867 "gdbarch: gdbarch_register_size invalid");
2868 if (gdbarch_debug
>= 2)
2869 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2870 return gdbarch
->register_size
;
2874 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2877 gdbarch
->register_size
= register_size
;
2881 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2883 if (gdbarch
->register_bytes
== -1)
2884 internal_error (__FILE__
, __LINE__
,
2885 "gdbarch: gdbarch_register_bytes invalid");
2886 if (gdbarch_debug
>= 2)
2887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2888 return gdbarch
->register_bytes
;
2892 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2895 gdbarch
->register_bytes
= register_bytes
;
2899 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2901 if (gdbarch
->register_byte
== 0)
2902 internal_error (__FILE__
, __LINE__
,
2903 "gdbarch: gdbarch_register_byte invalid");
2904 if (gdbarch_debug
>= 2)
2905 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2906 return gdbarch
->register_byte (reg_nr
);
2910 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2911 gdbarch_register_byte_ftype register_byte
)
2913 gdbarch
->register_byte
= register_byte
;
2917 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2919 if (gdbarch
->register_raw_size
== 0)
2920 internal_error (__FILE__
, __LINE__
,
2921 "gdbarch: gdbarch_register_raw_size invalid");
2922 if (gdbarch_debug
>= 2)
2923 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2924 return gdbarch
->register_raw_size (reg_nr
);
2928 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2929 gdbarch_register_raw_size_ftype register_raw_size
)
2931 gdbarch
->register_raw_size
= register_raw_size
;
2935 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2937 if (gdbarch
->max_register_raw_size
== -1)
2938 internal_error (__FILE__
, __LINE__
,
2939 "gdbarch: gdbarch_max_register_raw_size invalid");
2940 if (gdbarch_debug
>= 2)
2941 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2942 return gdbarch
->max_register_raw_size
;
2946 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2947 int max_register_raw_size
)
2949 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2953 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2955 if (gdbarch
->register_virtual_size
== 0)
2956 internal_error (__FILE__
, __LINE__
,
2957 "gdbarch: gdbarch_register_virtual_size invalid");
2958 if (gdbarch_debug
>= 2)
2959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2960 return gdbarch
->register_virtual_size (reg_nr
);
2964 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2965 gdbarch_register_virtual_size_ftype register_virtual_size
)
2967 gdbarch
->register_virtual_size
= register_virtual_size
;
2971 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2973 if (gdbarch
->max_register_virtual_size
== -1)
2974 internal_error (__FILE__
, __LINE__
,
2975 "gdbarch: gdbarch_max_register_virtual_size invalid");
2976 if (gdbarch_debug
>= 2)
2977 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2978 return gdbarch
->max_register_virtual_size
;
2982 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2983 int max_register_virtual_size
)
2985 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2989 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2991 if (gdbarch
->register_virtual_type
== 0)
2992 internal_error (__FILE__
, __LINE__
,
2993 "gdbarch: gdbarch_register_virtual_type invalid");
2994 if (gdbarch_debug
>= 2)
2995 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2996 return gdbarch
->register_virtual_type (reg_nr
);
3000 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3001 gdbarch_register_virtual_type_ftype register_virtual_type
)
3003 gdbarch
->register_virtual_type
= register_virtual_type
;
3007 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3009 if (gdbarch
->do_registers_info
== 0)
3010 internal_error (__FILE__
, __LINE__
,
3011 "gdbarch: gdbarch_do_registers_info invalid");
3012 if (gdbarch_debug
>= 2)
3013 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
3014 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3018 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3019 gdbarch_do_registers_info_ftype do_registers_info
)
3021 gdbarch
->do_registers_info
= do_registers_info
;
3025 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3027 if (gdbarch
->register_sim_regno
== 0)
3028 internal_error (__FILE__
, __LINE__
,
3029 "gdbarch: gdbarch_register_sim_regno invalid");
3030 if (gdbarch_debug
>= 2)
3031 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3032 return gdbarch
->register_sim_regno (reg_nr
);
3036 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3037 gdbarch_register_sim_regno_ftype register_sim_regno
)
3039 gdbarch
->register_sim_regno
= register_sim_regno
;
3043 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3045 return gdbarch
->register_bytes_ok
!= 0;
3049 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3051 if (gdbarch
->register_bytes_ok
== 0)
3052 internal_error (__FILE__
, __LINE__
,
3053 "gdbarch: gdbarch_register_bytes_ok invalid");
3054 if (gdbarch_debug
>= 2)
3055 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3056 return gdbarch
->register_bytes_ok (nr_bytes
);
3060 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3061 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3063 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3067 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3069 if (gdbarch
->cannot_fetch_register
== 0)
3070 internal_error (__FILE__
, __LINE__
,
3071 "gdbarch: gdbarch_cannot_fetch_register invalid");
3072 if (gdbarch_debug
>= 2)
3073 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3074 return gdbarch
->cannot_fetch_register (regnum
);
3078 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3079 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3081 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3085 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3087 if (gdbarch
->cannot_store_register
== 0)
3088 internal_error (__FILE__
, __LINE__
,
3089 "gdbarch: gdbarch_cannot_store_register invalid");
3090 if (gdbarch_debug
>= 2)
3091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3092 return gdbarch
->cannot_store_register (regnum
);
3096 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3097 gdbarch_cannot_store_register_ftype cannot_store_register
)
3099 gdbarch
->cannot_store_register
= cannot_store_register
;
3103 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3105 if (gdbarch
->use_generic_dummy_frames
== -1)
3106 internal_error (__FILE__
, __LINE__
,
3107 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3108 if (gdbarch_debug
>= 2)
3109 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3110 return gdbarch
->use_generic_dummy_frames
;
3114 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3115 int use_generic_dummy_frames
)
3117 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3121 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3123 if (gdbarch
->call_dummy_location
== 0)
3124 internal_error (__FILE__
, __LINE__
,
3125 "gdbarch: gdbarch_call_dummy_location invalid");
3126 if (gdbarch_debug
>= 2)
3127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3128 return gdbarch
->call_dummy_location
;
3132 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3133 int call_dummy_location
)
3135 gdbarch
->call_dummy_location
= call_dummy_location
;
3139 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3141 if (gdbarch
->call_dummy_address
== 0)
3142 internal_error (__FILE__
, __LINE__
,
3143 "gdbarch: gdbarch_call_dummy_address invalid");
3144 if (gdbarch_debug
>= 2)
3145 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3146 return gdbarch
->call_dummy_address ();
3150 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3151 gdbarch_call_dummy_address_ftype call_dummy_address
)
3153 gdbarch
->call_dummy_address
= call_dummy_address
;
3157 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3159 if (gdbarch
->call_dummy_start_offset
== -1)
3160 internal_error (__FILE__
, __LINE__
,
3161 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3162 if (gdbarch_debug
>= 2)
3163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3164 return gdbarch
->call_dummy_start_offset
;
3168 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3169 CORE_ADDR call_dummy_start_offset
)
3171 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3175 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3177 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3178 internal_error (__FILE__
, __LINE__
,
3179 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3180 if (gdbarch_debug
>= 2)
3181 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3182 return gdbarch
->call_dummy_breakpoint_offset
;
3186 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3187 CORE_ADDR call_dummy_breakpoint_offset
)
3189 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3193 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3195 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3196 internal_error (__FILE__
, __LINE__
,
3197 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3198 if (gdbarch_debug
>= 2)
3199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3200 return gdbarch
->call_dummy_breakpoint_offset_p
;
3204 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3205 int call_dummy_breakpoint_offset_p
)
3207 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3211 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3213 if (gdbarch
->call_dummy_length
== -1)
3214 internal_error (__FILE__
, __LINE__
,
3215 "gdbarch: gdbarch_call_dummy_length invalid");
3216 if (gdbarch_debug
>= 2)
3217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3218 return gdbarch
->call_dummy_length
;
3222 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3223 int call_dummy_length
)
3225 gdbarch
->call_dummy_length
= call_dummy_length
;
3229 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3231 if (gdbarch
->pc_in_call_dummy
== 0)
3232 internal_error (__FILE__
, __LINE__
,
3233 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3234 if (gdbarch_debug
>= 2)
3235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3236 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3240 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3241 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3243 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3247 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3249 if (gdbarch
->call_dummy_p
== -1)
3250 internal_error (__FILE__
, __LINE__
,
3251 "gdbarch: gdbarch_call_dummy_p invalid");
3252 if (gdbarch_debug
>= 2)
3253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3254 return gdbarch
->call_dummy_p
;
3258 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3261 gdbarch
->call_dummy_p
= call_dummy_p
;
3265 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3267 /* Skip verify of call_dummy_words, invalid_p == 0 */
3268 if (gdbarch_debug
>= 2)
3269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3270 return gdbarch
->call_dummy_words
;
3274 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3275 LONGEST
* call_dummy_words
)
3277 gdbarch
->call_dummy_words
= call_dummy_words
;
3281 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3283 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3284 if (gdbarch_debug
>= 2)
3285 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3286 return gdbarch
->sizeof_call_dummy_words
;
3290 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3291 int sizeof_call_dummy_words
)
3293 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3297 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3299 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3300 internal_error (__FILE__
, __LINE__
,
3301 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3302 if (gdbarch_debug
>= 2)
3303 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3304 return gdbarch
->call_dummy_stack_adjust_p
;
3308 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3309 int call_dummy_stack_adjust_p
)
3311 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3315 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3317 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3318 internal_error (__FILE__
, __LINE__
,
3319 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3320 if (gdbarch_debug
>= 2)
3321 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3322 return gdbarch
->call_dummy_stack_adjust
;
3326 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3327 int call_dummy_stack_adjust
)
3329 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3333 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
)
3335 if (gdbarch
->fix_call_dummy
== 0)
3336 internal_error (__FILE__
, __LINE__
,
3337 "gdbarch: gdbarch_fix_call_dummy invalid");
3338 if (gdbarch_debug
>= 2)
3339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3340 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3344 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3345 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3347 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3351 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3353 if (gdbarch
->init_frame_pc_first
== 0)
3354 internal_error (__FILE__
, __LINE__
,
3355 "gdbarch: gdbarch_init_frame_pc_first invalid");
3356 if (gdbarch_debug
>= 2)
3357 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3358 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3362 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3363 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3365 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3369 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3371 if (gdbarch
->init_frame_pc
== 0)
3372 internal_error (__FILE__
, __LINE__
,
3373 "gdbarch: gdbarch_init_frame_pc invalid");
3374 if (gdbarch_debug
>= 2)
3375 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3376 gdbarch
->init_frame_pc (fromleaf
, prev
);
3380 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3381 gdbarch_init_frame_pc_ftype init_frame_pc
)
3383 gdbarch
->init_frame_pc
= init_frame_pc
;
3387 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3389 if (gdbarch_debug
>= 2)
3390 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3391 return gdbarch
->believe_pcc_promotion
;
3395 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3396 int believe_pcc_promotion
)
3398 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3402 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3404 if (gdbarch_debug
>= 2)
3405 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3406 return gdbarch
->believe_pcc_promotion_type
;
3410 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3411 int believe_pcc_promotion_type
)
3413 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3417 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3419 if (gdbarch
->coerce_float_to_double
== 0)
3420 internal_error (__FILE__
, __LINE__
,
3421 "gdbarch: gdbarch_coerce_float_to_double invalid");
3422 if (gdbarch_debug
>= 2)
3423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3424 return gdbarch
->coerce_float_to_double (formal
, actual
);
3428 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3429 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3431 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3435 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
)
3437 if (gdbarch
->get_saved_register
== 0)
3438 internal_error (__FILE__
, __LINE__
,
3439 "gdbarch: gdbarch_get_saved_register invalid");
3440 if (gdbarch_debug
>= 2)
3441 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3442 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3446 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3447 gdbarch_get_saved_register_ftype get_saved_register
)
3449 gdbarch
->get_saved_register
= get_saved_register
;
3453 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3455 if (gdbarch
->register_convertible
== 0)
3456 internal_error (__FILE__
, __LINE__
,
3457 "gdbarch: gdbarch_register_convertible invalid");
3458 if (gdbarch_debug
>= 2)
3459 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3460 return gdbarch
->register_convertible (nr
);
3464 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3465 gdbarch_register_convertible_ftype register_convertible
)
3467 gdbarch
->register_convertible
= register_convertible
;
3471 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3473 if (gdbarch
->register_convert_to_virtual
== 0)
3474 internal_error (__FILE__
, __LINE__
,
3475 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3476 if (gdbarch_debug
>= 2)
3477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3478 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3482 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3483 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3485 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3489 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3491 if (gdbarch
->register_convert_to_raw
== 0)
3492 internal_error (__FILE__
, __LINE__
,
3493 "gdbarch: gdbarch_register_convert_to_raw invalid");
3494 if (gdbarch_debug
>= 2)
3495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3496 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3500 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3501 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3503 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3507 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3509 if (gdbarch
->fetch_pseudo_register
== 0)
3510 internal_error (__FILE__
, __LINE__
,
3511 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3512 if (gdbarch_debug
>= 2)
3513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3514 gdbarch
->fetch_pseudo_register (regnum
);
3518 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3519 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3521 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3525 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3527 if (gdbarch
->store_pseudo_register
== 0)
3528 internal_error (__FILE__
, __LINE__
,
3529 "gdbarch: gdbarch_store_pseudo_register invalid");
3530 if (gdbarch_debug
>= 2)
3531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3532 gdbarch
->store_pseudo_register (regnum
);
3536 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3537 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3539 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3543 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3545 if (gdbarch
->pointer_to_address
== 0)
3546 internal_error (__FILE__
, __LINE__
,
3547 "gdbarch: gdbarch_pointer_to_address invalid");
3548 if (gdbarch_debug
>= 2)
3549 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3550 return gdbarch
->pointer_to_address (type
, buf
);
3554 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3555 gdbarch_pointer_to_address_ftype pointer_to_address
)
3557 gdbarch
->pointer_to_address
= pointer_to_address
;
3561 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3563 if (gdbarch
->address_to_pointer
== 0)
3564 internal_error (__FILE__
, __LINE__
,
3565 "gdbarch: gdbarch_address_to_pointer invalid");
3566 if (gdbarch_debug
>= 2)
3567 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3568 gdbarch
->address_to_pointer (type
, buf
, addr
);
3572 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3573 gdbarch_address_to_pointer_ftype address_to_pointer
)
3575 gdbarch
->address_to_pointer
= address_to_pointer
;
3579 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3581 if (gdbarch
->return_value_on_stack
== 0)
3582 internal_error (__FILE__
, __LINE__
,
3583 "gdbarch: gdbarch_return_value_on_stack invalid");
3584 if (gdbarch_debug
>= 2)
3585 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3586 return gdbarch
->return_value_on_stack (type
);
3590 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3591 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3593 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3597 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3599 if (gdbarch
->extract_return_value
== 0)
3600 internal_error (__FILE__
, __LINE__
,
3601 "gdbarch: gdbarch_extract_return_value invalid");
3602 if (gdbarch_debug
>= 2)
3603 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3604 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3608 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3609 gdbarch_extract_return_value_ftype extract_return_value
)
3611 gdbarch
->extract_return_value
= extract_return_value
;
3615 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3617 if (gdbarch
->push_arguments
== 0)
3618 internal_error (__FILE__
, __LINE__
,
3619 "gdbarch: gdbarch_push_arguments invalid");
3620 if (gdbarch_debug
>= 2)
3621 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3622 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3626 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3627 gdbarch_push_arguments_ftype push_arguments
)
3629 gdbarch
->push_arguments
= push_arguments
;
3633 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3635 if (gdbarch
->push_dummy_frame
== 0)
3636 internal_error (__FILE__
, __LINE__
,
3637 "gdbarch: gdbarch_push_dummy_frame invalid");
3638 if (gdbarch_debug
>= 2)
3639 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3640 gdbarch
->push_dummy_frame ();
3644 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3645 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3647 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3651 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3653 if (gdbarch
->push_return_address
== 0)
3654 internal_error (__FILE__
, __LINE__
,
3655 "gdbarch: gdbarch_push_return_address invalid");
3656 if (gdbarch_debug
>= 2)
3657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3658 return gdbarch
->push_return_address (pc
, sp
);
3662 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3663 gdbarch_push_return_address_ftype push_return_address
)
3665 gdbarch
->push_return_address
= push_return_address
;
3669 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3671 if (gdbarch
->pop_frame
== 0)
3672 internal_error (__FILE__
, __LINE__
,
3673 "gdbarch: gdbarch_pop_frame invalid");
3674 if (gdbarch_debug
>= 2)
3675 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3676 gdbarch
->pop_frame ();
3680 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3681 gdbarch_pop_frame_ftype pop_frame
)
3683 gdbarch
->pop_frame
= pop_frame
;
3687 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3689 if (gdbarch
->store_struct_return
== 0)
3690 internal_error (__FILE__
, __LINE__
,
3691 "gdbarch: gdbarch_store_struct_return invalid");
3692 if (gdbarch_debug
>= 2)
3693 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3694 gdbarch
->store_struct_return (addr
, sp
);
3698 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3699 gdbarch_store_struct_return_ftype store_struct_return
)
3701 gdbarch
->store_struct_return
= store_struct_return
;
3705 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3707 if (gdbarch
->store_return_value
== 0)
3708 internal_error (__FILE__
, __LINE__
,
3709 "gdbarch: gdbarch_store_return_value invalid");
3710 if (gdbarch_debug
>= 2)
3711 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3712 gdbarch
->store_return_value (type
, valbuf
);
3716 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3717 gdbarch_store_return_value_ftype store_return_value
)
3719 gdbarch
->store_return_value
= store_return_value
;
3723 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3725 return gdbarch
->extract_struct_value_address
!= 0;
3729 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3731 if (gdbarch
->extract_struct_value_address
== 0)
3732 internal_error (__FILE__
, __LINE__
,
3733 "gdbarch: gdbarch_extract_struct_value_address invalid");
3734 if (gdbarch_debug
>= 2)
3735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3736 return gdbarch
->extract_struct_value_address (regbuf
);
3740 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3741 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3743 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3747 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3749 if (gdbarch
->use_struct_convention
== 0)
3750 internal_error (__FILE__
, __LINE__
,
3751 "gdbarch: gdbarch_use_struct_convention invalid");
3752 if (gdbarch_debug
>= 2)
3753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3754 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3758 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3759 gdbarch_use_struct_convention_ftype use_struct_convention
)
3761 gdbarch
->use_struct_convention
= use_struct_convention
;
3765 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3767 if (gdbarch
->frame_init_saved_regs
== 0)
3768 internal_error (__FILE__
, __LINE__
,
3769 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3770 if (gdbarch_debug
>= 2)
3771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3772 gdbarch
->frame_init_saved_regs (frame
);
3776 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3777 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3779 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3783 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3785 if (gdbarch
->init_extra_frame_info
== 0)
3786 internal_error (__FILE__
, __LINE__
,
3787 "gdbarch: gdbarch_init_extra_frame_info invalid");
3788 if (gdbarch_debug
>= 2)
3789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3790 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3794 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3795 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3797 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3801 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3803 if (gdbarch
->skip_prologue
== 0)
3804 internal_error (__FILE__
, __LINE__
,
3805 "gdbarch: gdbarch_skip_prologue invalid");
3806 if (gdbarch_debug
>= 2)
3807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3808 return gdbarch
->skip_prologue (ip
);
3812 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3813 gdbarch_skip_prologue_ftype skip_prologue
)
3815 gdbarch
->skip_prologue
= skip_prologue
;
3819 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3821 if (gdbarch
->prologue_frameless_p
== 0)
3822 internal_error (__FILE__
, __LINE__
,
3823 "gdbarch: gdbarch_prologue_frameless_p invalid");
3824 if (gdbarch_debug
>= 2)
3825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3826 return gdbarch
->prologue_frameless_p (ip
);
3830 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3831 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3833 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3837 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3839 if (gdbarch
->inner_than
== 0)
3840 internal_error (__FILE__
, __LINE__
,
3841 "gdbarch: gdbarch_inner_than invalid");
3842 if (gdbarch_debug
>= 2)
3843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3844 return gdbarch
->inner_than (lhs
, rhs
);
3848 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3849 gdbarch_inner_than_ftype inner_than
)
3851 gdbarch
->inner_than
= inner_than
;
3855 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3857 if (gdbarch
->breakpoint_from_pc
== 0)
3858 internal_error (__FILE__
, __LINE__
,
3859 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3860 if (gdbarch_debug
>= 2)
3861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3862 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3866 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3867 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3869 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3873 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3875 if (gdbarch
->memory_insert_breakpoint
== 0)
3876 internal_error (__FILE__
, __LINE__
,
3877 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3878 if (gdbarch_debug
>= 2)
3879 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3880 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3884 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3885 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3887 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3891 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3893 if (gdbarch
->memory_remove_breakpoint
== 0)
3894 internal_error (__FILE__
, __LINE__
,
3895 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3896 if (gdbarch_debug
>= 2)
3897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3898 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3902 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3903 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3905 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3909 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3911 if (gdbarch
->decr_pc_after_break
== -1)
3912 internal_error (__FILE__
, __LINE__
,
3913 "gdbarch: gdbarch_decr_pc_after_break invalid");
3914 if (gdbarch_debug
>= 2)
3915 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3916 return gdbarch
->decr_pc_after_break
;
3920 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3921 CORE_ADDR decr_pc_after_break
)
3923 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3927 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3929 if (gdbarch
->prepare_to_proceed
== 0)
3930 internal_error (__FILE__
, __LINE__
,
3931 "gdbarch: gdbarch_prepare_to_proceed invalid");
3932 if (gdbarch_debug
>= 2)
3933 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3934 return gdbarch
->prepare_to_proceed (select_it
);
3938 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3939 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3941 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3945 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3947 if (gdbarch
->function_start_offset
== -1)
3948 internal_error (__FILE__
, __LINE__
,
3949 "gdbarch: gdbarch_function_start_offset invalid");
3950 if (gdbarch_debug
>= 2)
3951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3952 return gdbarch
->function_start_offset
;
3956 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3957 CORE_ADDR function_start_offset
)
3959 gdbarch
->function_start_offset
= function_start_offset
;
3963 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3965 if (gdbarch
->remote_translate_xfer_address
== 0)
3966 internal_error (__FILE__
, __LINE__
,
3967 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3968 if (gdbarch_debug
>= 2)
3969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3970 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3974 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3975 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3977 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3981 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3983 if (gdbarch
->frame_args_skip
== -1)
3984 internal_error (__FILE__
, __LINE__
,
3985 "gdbarch: gdbarch_frame_args_skip invalid");
3986 if (gdbarch_debug
>= 2)
3987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3988 return gdbarch
->frame_args_skip
;
3992 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3993 CORE_ADDR frame_args_skip
)
3995 gdbarch
->frame_args_skip
= frame_args_skip
;
3999 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4001 if (gdbarch
->frameless_function_invocation
== 0)
4002 internal_error (__FILE__
, __LINE__
,
4003 "gdbarch: gdbarch_frameless_function_invocation invalid");
4004 if (gdbarch_debug
>= 2)
4005 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4006 return gdbarch
->frameless_function_invocation (fi
);
4010 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4011 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4013 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4017 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4019 if (gdbarch
->frame_chain
== 0)
4020 internal_error (__FILE__
, __LINE__
,
4021 "gdbarch: gdbarch_frame_chain invalid");
4022 if (gdbarch_debug
>= 2)
4023 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4024 return gdbarch
->frame_chain (frame
);
4028 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4029 gdbarch_frame_chain_ftype frame_chain
)
4031 gdbarch
->frame_chain
= frame_chain
;
4035 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4037 if (gdbarch
->frame_chain_valid
== 0)
4038 internal_error (__FILE__
, __LINE__
,
4039 "gdbarch: gdbarch_frame_chain_valid invalid");
4040 if (gdbarch_debug
>= 2)
4041 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4042 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4046 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4047 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4049 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4053 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4055 if (gdbarch
->frame_saved_pc
== 0)
4056 internal_error (__FILE__
, __LINE__
,
4057 "gdbarch: gdbarch_frame_saved_pc invalid");
4058 if (gdbarch_debug
>= 2)
4059 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4060 return gdbarch
->frame_saved_pc (fi
);
4064 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4065 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4067 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4071 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4073 if (gdbarch
->frame_args_address
== 0)
4074 internal_error (__FILE__
, __LINE__
,
4075 "gdbarch: gdbarch_frame_args_address invalid");
4076 if (gdbarch_debug
>= 2)
4077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4078 return gdbarch
->frame_args_address (fi
);
4082 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4083 gdbarch_frame_args_address_ftype frame_args_address
)
4085 gdbarch
->frame_args_address
= frame_args_address
;
4089 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4091 if (gdbarch
->frame_locals_address
== 0)
4092 internal_error (__FILE__
, __LINE__
,
4093 "gdbarch: gdbarch_frame_locals_address invalid");
4094 if (gdbarch_debug
>= 2)
4095 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4096 return gdbarch
->frame_locals_address (fi
);
4100 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4101 gdbarch_frame_locals_address_ftype frame_locals_address
)
4103 gdbarch
->frame_locals_address
= frame_locals_address
;
4107 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4109 if (gdbarch
->saved_pc_after_call
== 0)
4110 internal_error (__FILE__
, __LINE__
,
4111 "gdbarch: gdbarch_saved_pc_after_call invalid");
4112 if (gdbarch_debug
>= 2)
4113 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4114 return gdbarch
->saved_pc_after_call (frame
);
4118 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4119 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4121 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4125 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4127 if (gdbarch
->frame_num_args
== 0)
4128 internal_error (__FILE__
, __LINE__
,
4129 "gdbarch: gdbarch_frame_num_args invalid");
4130 if (gdbarch_debug
>= 2)
4131 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4132 return gdbarch
->frame_num_args (frame
);
4136 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4137 gdbarch_frame_num_args_ftype frame_num_args
)
4139 gdbarch
->frame_num_args
= frame_num_args
;
4143 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4145 return gdbarch
->stack_align
!= 0;
4149 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4151 if (gdbarch
->stack_align
== 0)
4152 internal_error (__FILE__
, __LINE__
,
4153 "gdbarch: gdbarch_stack_align invalid");
4154 if (gdbarch_debug
>= 2)
4155 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4156 return gdbarch
->stack_align (sp
);
4160 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4161 gdbarch_stack_align_ftype stack_align
)
4163 gdbarch
->stack_align
= stack_align
;
4167 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4169 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4170 if (gdbarch_debug
>= 2)
4171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4172 return gdbarch
->extra_stack_alignment_needed
;
4176 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4177 int extra_stack_alignment_needed
)
4179 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4183 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4185 return gdbarch
->reg_struct_has_addr
!= 0;
4189 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4191 if (gdbarch
->reg_struct_has_addr
== 0)
4192 internal_error (__FILE__
, __LINE__
,
4193 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4194 if (gdbarch_debug
>= 2)
4195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4196 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4200 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4201 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4203 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4207 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4209 return gdbarch
->save_dummy_frame_tos
!= 0;
4213 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4215 if (gdbarch
->save_dummy_frame_tos
== 0)
4216 internal_error (__FILE__
, __LINE__
,
4217 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4218 if (gdbarch_debug
>= 2)
4219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4220 gdbarch
->save_dummy_frame_tos (sp
);
4224 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4225 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4227 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4231 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4233 if (gdbarch_debug
>= 2)
4234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4235 return gdbarch
->parm_boundary
;
4239 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4242 gdbarch
->parm_boundary
= parm_boundary
;
4245 const struct floatformat
*
4246 gdbarch_float_format (struct gdbarch
*gdbarch
)
4248 if (gdbarch_debug
>= 2)
4249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4250 return gdbarch
->float_format
;
4254 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4255 const struct floatformat
* float_format
)
4257 gdbarch
->float_format
= float_format
;
4260 const struct floatformat
*
4261 gdbarch_double_format (struct gdbarch
*gdbarch
)
4263 if (gdbarch_debug
>= 2)
4264 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4265 return gdbarch
->double_format
;
4269 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4270 const struct floatformat
* double_format
)
4272 gdbarch
->double_format
= double_format
;
4275 const struct floatformat
*
4276 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4278 if (gdbarch_debug
>= 2)
4279 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4280 return gdbarch
->long_double_format
;
4284 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4285 const struct floatformat
* long_double_format
)
4287 gdbarch
->long_double_format
= long_double_format
;
4291 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4293 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4294 internal_error (__FILE__
, __LINE__
,
4295 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4296 if (gdbarch_debug
>= 2)
4297 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4298 return gdbarch
->convert_from_func_ptr_addr (addr
);
4302 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4303 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4305 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4309 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4311 if (gdbarch
->addr_bits_remove
== 0)
4312 internal_error (__FILE__
, __LINE__
,
4313 "gdbarch: gdbarch_addr_bits_remove invalid");
4314 if (gdbarch_debug
>= 2)
4315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4316 return gdbarch
->addr_bits_remove (addr
);
4320 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4321 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4323 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4327 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4329 return gdbarch
->software_single_step
!= 0;
4333 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4335 if (gdbarch
->software_single_step
== 0)
4336 internal_error (__FILE__
, __LINE__
,
4337 "gdbarch: gdbarch_software_single_step invalid");
4338 if (gdbarch_debug
>= 2)
4339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4340 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4344 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4345 gdbarch_software_single_step_ftype software_single_step
)
4347 gdbarch
->software_single_step
= software_single_step
;
4351 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4353 if (gdbarch
->print_insn
== 0)
4354 internal_error (__FILE__
, __LINE__
,
4355 "gdbarch: gdbarch_print_insn invalid");
4356 if (gdbarch_debug
>= 2)
4357 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4358 return gdbarch
->print_insn (vma
, info
);
4362 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4363 gdbarch_print_insn_ftype print_insn
)
4365 gdbarch
->print_insn
= print_insn
;
4369 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4371 if (gdbarch
->skip_trampoline_code
== 0)
4372 internal_error (__FILE__
, __LINE__
,
4373 "gdbarch: gdbarch_skip_trampoline_code invalid");
4374 if (gdbarch_debug
>= 2)
4375 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4376 return gdbarch
->skip_trampoline_code (pc
);
4380 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4381 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4383 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4387 /* Keep a registry of per-architecture data-pointers required by GDB
4393 gdbarch_data_init_ftype
*init
;
4394 gdbarch_data_free_ftype
*free
;
4397 struct gdbarch_data_registration
4399 struct gdbarch_data
*data
;
4400 struct gdbarch_data_registration
*next
;
4403 struct gdbarch_data_registry
4406 struct gdbarch_data_registration
*registrations
;
4409 struct gdbarch_data_registry gdbarch_data_registry
=
4414 struct gdbarch_data
*
4415 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4416 gdbarch_data_free_ftype
*free
)
4418 struct gdbarch_data_registration
**curr
;
4419 for (curr
= &gdbarch_data_registry
.registrations
;
4421 curr
= &(*curr
)->next
);
4422 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4423 (*curr
)->next
= NULL
;
4424 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4425 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4426 (*curr
)->data
->init
= init
;
4427 (*curr
)->data
->free
= free
;
4428 return (*curr
)->data
;
4432 /* Walk through all the registered users initializing each in turn. */
4435 init_gdbarch_data (struct gdbarch
*gdbarch
)
4437 struct gdbarch_data_registration
*rego
;
4438 for (rego
= gdbarch_data_registry
.registrations
;
4442 struct gdbarch_data
*data
= rego
->data
;
4443 gdb_assert (data
->index
< gdbarch
->nr_data
);
4444 if (data
->init
!= NULL
)
4446 void *pointer
= data
->init (gdbarch
);
4447 set_gdbarch_data (gdbarch
, data
, pointer
);
4452 /* Create/delete the gdbarch data vector. */
4455 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4457 gdb_assert (gdbarch
->data
== NULL
);
4458 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4459 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4463 free_gdbarch_data (struct gdbarch
*gdbarch
)
4465 struct gdbarch_data_registration
*rego
;
4466 gdb_assert (gdbarch
->data
!= NULL
);
4467 for (rego
= gdbarch_data_registry
.registrations
;
4471 struct gdbarch_data
*data
= rego
->data
;
4472 gdb_assert (data
->index
< gdbarch
->nr_data
);
4473 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4475 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4476 gdbarch
->data
[data
->index
] = NULL
;
4479 xfree (gdbarch
->data
);
4480 gdbarch
->data
= NULL
;
4484 /* Initialize the current value of thee specified per-architecture
4488 set_gdbarch_data (struct gdbarch
*gdbarch
,
4489 struct gdbarch_data
*data
,
4492 gdb_assert (data
->index
< gdbarch
->nr_data
);
4493 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4494 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4495 gdbarch
->data
[data
->index
] = pointer
;
4498 /* Return the current value of the specified per-architecture
4502 gdbarch_data (struct gdbarch_data
*data
)
4504 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4505 return current_gdbarch
->data
[data
->index
];
4510 /* Keep a registry of swapped data required by GDB modules. */
4515 struct gdbarch_swap_registration
*source
;
4516 struct gdbarch_swap
*next
;
4519 struct gdbarch_swap_registration
4522 unsigned long sizeof_data
;
4523 gdbarch_swap_ftype
*init
;
4524 struct gdbarch_swap_registration
*next
;
4527 struct gdbarch_swap_registry
4530 struct gdbarch_swap_registration
*registrations
;
4533 struct gdbarch_swap_registry gdbarch_swap_registry
=
4539 register_gdbarch_swap (void *data
,
4540 unsigned long sizeof_data
,
4541 gdbarch_swap_ftype
*init
)
4543 struct gdbarch_swap_registration
**rego
;
4544 for (rego
= &gdbarch_swap_registry
.registrations
;
4546 rego
= &(*rego
)->next
);
4547 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4548 (*rego
)->next
= NULL
;
4549 (*rego
)->init
= init
;
4550 (*rego
)->data
= data
;
4551 (*rego
)->sizeof_data
= sizeof_data
;
4556 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4558 struct gdbarch_swap_registration
*rego
;
4559 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4560 for (rego
= gdbarch_swap_registry
.registrations
;
4564 if (rego
->data
!= NULL
)
4566 (*curr
) = XMALLOC (struct gdbarch_swap
);
4567 (*curr
)->source
= rego
;
4568 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4569 (*curr
)->next
= NULL
;
4570 memset (rego
->data
, 0, rego
->sizeof_data
);
4571 curr
= &(*curr
)->next
;
4573 if (rego
->init
!= NULL
)
4579 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4581 struct gdbarch_swap
*curr
;
4582 for (curr
= gdbarch
->swap
;
4585 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4589 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4591 struct gdbarch_swap
*curr
;
4592 for (curr
= gdbarch
->swap
;
4595 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4599 /* Keep a registry of the architectures known by GDB. */
4601 struct gdbarch_registration
4603 enum bfd_architecture bfd_architecture
;
4604 gdbarch_init_ftype
*init
;
4605 gdbarch_dump_tdep_ftype
*dump_tdep
;
4606 struct gdbarch_list
*arches
;
4607 struct gdbarch_registration
*next
;
4610 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4613 append_name (const char ***buf
, int *nr
, const char *name
)
4615 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4621 gdbarch_printable_names (void)
4625 /* Accumulate a list of names based on the registed list of
4627 enum bfd_architecture a
;
4629 const char **arches
= NULL
;
4630 struct gdbarch_registration
*rego
;
4631 for (rego
= gdbarch_registry
;
4635 const struct bfd_arch_info
*ap
;
4636 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4638 internal_error (__FILE__
, __LINE__
,
4639 "gdbarch_architecture_names: multi-arch unknown");
4642 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4647 append_name (&arches
, &nr_arches
, NULL
);
4651 /* Just return all the architectures that BFD knows. Assume that
4652 the legacy architecture framework supports them. */
4653 return bfd_arch_list ();
4658 gdbarch_register (enum bfd_architecture bfd_architecture
,
4659 gdbarch_init_ftype
*init
,
4660 gdbarch_dump_tdep_ftype
*dump_tdep
)
4662 struct gdbarch_registration
**curr
;
4663 const struct bfd_arch_info
*bfd_arch_info
;
4664 /* Check that BFD recognizes this architecture */
4665 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4666 if (bfd_arch_info
== NULL
)
4668 internal_error (__FILE__
, __LINE__
,
4669 "gdbarch: Attempt to register unknown architecture (%d)",
4672 /* Check that we haven't seen this architecture before */
4673 for (curr
= &gdbarch_registry
;
4675 curr
= &(*curr
)->next
)
4677 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4678 internal_error (__FILE__
, __LINE__
,
4679 "gdbarch: Duplicate registraration of architecture (%s)",
4680 bfd_arch_info
->printable_name
);
4684 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4685 bfd_arch_info
->printable_name
,
4688 (*curr
) = XMALLOC (struct gdbarch_registration
);
4689 (*curr
)->bfd_architecture
= bfd_architecture
;
4690 (*curr
)->init
= init
;
4691 (*curr
)->dump_tdep
= dump_tdep
;
4692 (*curr
)->arches
= NULL
;
4693 (*curr
)->next
= NULL
;
4694 /* When non- multi-arch, install whatever target dump routine we've
4695 been provided - hopefully that routine has been written correctly
4696 and works regardless of multi-arch. */
4697 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4698 && startup_gdbarch
.dump_tdep
== NULL
)
4699 startup_gdbarch
.dump_tdep
= dump_tdep
;
4703 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4704 gdbarch_init_ftype
*init
)
4706 gdbarch_register (bfd_architecture
, init
, NULL
);
4710 /* Look for an architecture using gdbarch_info. Base search on only
4711 BFD_ARCH_INFO and BYTE_ORDER. */
4713 struct gdbarch_list
*
4714 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4715 const struct gdbarch_info
*info
)
4717 for (; arches
!= NULL
; arches
= arches
->next
)
4719 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4721 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4729 /* Update the current architecture. Return ZERO if the update request
4733 gdbarch_update_p (struct gdbarch_info info
)
4735 struct gdbarch
*new_gdbarch
;
4736 struct gdbarch_list
**list
;
4737 struct gdbarch_registration
*rego
;
4739 /* Fill in missing parts of the INFO struct using a number of
4740 sources: ``set ...''; INFOabfd supplied; existing target. */
4742 /* ``(gdb) set architecture ...'' */
4743 if (info
.bfd_arch_info
== NULL
4744 && !TARGET_ARCHITECTURE_AUTO
)
4745 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4746 if (info
.bfd_arch_info
== NULL
4747 && info
.abfd
!= NULL
4748 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4749 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4750 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4751 if (info
.bfd_arch_info
== NULL
)
4752 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4754 /* ``(gdb) set byte-order ...'' */
4755 if (info
.byte_order
== 0
4756 && !TARGET_BYTE_ORDER_AUTO
)
4757 info
.byte_order
= TARGET_BYTE_ORDER
;
4758 /* From the INFO struct. */
4759 if (info
.byte_order
== 0
4760 && info
.abfd
!= NULL
)
4761 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4762 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4764 /* From the current target. */
4765 if (info
.byte_order
== 0)
4766 info
.byte_order
= TARGET_BYTE_ORDER
;
4768 /* Must have found some sort of architecture. */
4769 gdb_assert (info
.bfd_arch_info
!= NULL
);
4773 fprintf_unfiltered (gdb_stdlog
,
4774 "gdbarch_update: info.bfd_arch_info %s\n",
4775 (info
.bfd_arch_info
!= NULL
4776 ? info
.bfd_arch_info
->printable_name
4778 fprintf_unfiltered (gdb_stdlog
,
4779 "gdbarch_update: info.byte_order %d (%s)\n",
4781 (info
.byte_order
== BIG_ENDIAN
? "big"
4782 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4784 fprintf_unfiltered (gdb_stdlog
,
4785 "gdbarch_update: info.abfd 0x%lx\n",
4787 fprintf_unfiltered (gdb_stdlog
,
4788 "gdbarch_update: info.tdep_info 0x%lx\n",
4789 (long) info
.tdep_info
);
4792 /* Find the target that knows about this architecture. */
4793 for (rego
= gdbarch_registry
;
4796 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4801 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4805 /* Ask the target for a replacement architecture. */
4806 new_gdbarch
= rego
->init (info
, rego
->arches
);
4808 /* Did the target like it? No. Reject the change. */
4809 if (new_gdbarch
== NULL
)
4812 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4816 /* Did the architecture change? No. Do nothing. */
4817 if (current_gdbarch
== new_gdbarch
)
4820 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4822 new_gdbarch
->bfd_arch_info
->printable_name
);
4826 /* Swap all data belonging to the old target out */
4827 swapout_gdbarch_swap (current_gdbarch
);
4829 /* Is this a pre-existing architecture? Yes. Swap it in. */
4830 for (list
= ®o
->arches
;
4832 list
= &(*list
)->next
)
4834 if ((*list
)->gdbarch
== new_gdbarch
)
4837 fprintf_unfiltered (gdb_stdlog
,
4838 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4840 new_gdbarch
->bfd_arch_info
->printable_name
);
4841 current_gdbarch
= new_gdbarch
;
4842 swapin_gdbarch_swap (new_gdbarch
);
4843 architecture_changed_event ();
4848 /* Append this new architecture to this targets list. */
4849 (*list
) = XMALLOC (struct gdbarch_list
);
4850 (*list
)->next
= NULL
;
4851 (*list
)->gdbarch
= new_gdbarch
;
4853 /* Switch to this new architecture. Dump it out. */
4854 current_gdbarch
= new_gdbarch
;
4857 fprintf_unfiltered (gdb_stdlog
,
4858 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4860 new_gdbarch
->bfd_arch_info
->printable_name
);
4863 /* Check that the newly installed architecture is valid. Plug in
4864 any post init values. */
4865 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4866 verify_gdbarch (new_gdbarch
);
4868 /* Initialize the per-architecture memory (swap) areas.
4869 CURRENT_GDBARCH must be update before these modules are
4871 init_gdbarch_swap (new_gdbarch
);
4873 /* Initialize the per-architecture data-pointer of all parties that
4874 registered an interest in this architecture. CURRENT_GDBARCH
4875 must be updated before these modules are called. */
4876 init_gdbarch_data (new_gdbarch
);
4877 architecture_changed_event ();
4880 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4888 /* Pointer to the target-dependent disassembly function. */
4889 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4890 disassemble_info tm_print_insn_info
;
4893 extern void _initialize_gdbarch (void);
4896 _initialize_gdbarch (void)
4898 struct cmd_list_element
*c
;
4900 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4901 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4902 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4903 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4904 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4906 add_show_from_set (add_set_cmd ("arch",
4909 (char *)&gdbarch_debug
,
4910 "Set architecture debugging.\n\
4911 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4913 c
= add_set_cmd ("archdebug",
4916 (char *)&gdbarch_debug
,
4917 "Set architecture debugging.\n\
4918 When non-zero, architecture debugging is enabled.", &setlist
);
4920 deprecate_cmd (c
, "set debug arch");
4921 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");