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_skip_trampoline_code_ftype
*skip_trampoline_code
;
256 /* The default architecture uses host values (for want of a better
259 extern const struct bfd_arch_info bfd_default_arch_struct
;
261 struct gdbarch startup_gdbarch
=
263 /* basic architecture information */
264 &bfd_default_arch_struct
,
266 /* target specific vector and its dump routine */
268 /*per-architecture data-pointers and swap regions */
270 /* Multi-arch values */
274 8 * sizeof (LONGEST
),
277 8 * sizeof (long double),
337 generic_get_saved_register
,
388 /* startup_gdbarch() */
391 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
393 /* Do any initialization needed for a non-multiarch configuration
394 after the _initialize_MODULE functions have been run. */
396 initialize_non_multiarch ()
398 alloc_gdbarch_data (&startup_gdbarch
);
399 init_gdbarch_data (&startup_gdbarch
);
403 /* Create a new ``struct gdbarch'' based on information provided by
404 ``struct gdbarch_info''. */
407 gdbarch_alloc (const struct gdbarch_info
*info
,
408 struct gdbarch_tdep
*tdep
)
410 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
411 memset (gdbarch
, 0, sizeof (*gdbarch
));
413 alloc_gdbarch_data (gdbarch
);
415 gdbarch
->tdep
= tdep
;
417 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
418 gdbarch
->byte_order
= info
->byte_order
;
420 /* Force the explicit initialization of these. */
421 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
422 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
423 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
424 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
425 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
426 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
427 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
428 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
429 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
430 gdbarch
->read_pc
= generic_target_read_pc
;
431 gdbarch
->write_pc
= generic_target_write_pc
;
432 gdbarch
->read_fp
= generic_target_read_fp
;
433 gdbarch
->write_fp
= generic_target_write_fp
;
434 gdbarch
->read_sp
= generic_target_read_sp
;
435 gdbarch
->write_sp
= generic_target_write_sp
;
436 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
437 gdbarch
->num_regs
= -1;
438 gdbarch
->sp_regnum
= -1;
439 gdbarch
->fp_regnum
= -1;
440 gdbarch
->pc_regnum
= -1;
441 gdbarch
->fp0_regnum
= -1;
442 gdbarch
->npc_regnum
= -1;
443 gdbarch
->nnpc_regnum
= -1;
444 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
445 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
446 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
447 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
448 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
449 gdbarch
->register_name
= legacy_register_name
;
450 gdbarch
->register_size
= -1;
451 gdbarch
->register_bytes
= -1;
452 gdbarch
->max_register_raw_size
= -1;
453 gdbarch
->max_register_virtual_size
= -1;
454 gdbarch
->do_registers_info
= do_registers_info
;
455 gdbarch
->register_sim_regno
= default_register_sim_regno
;
456 gdbarch
->cannot_fetch_register
= cannot_register_not
;
457 gdbarch
->cannot_store_register
= cannot_register_not
;
458 gdbarch
->use_generic_dummy_frames
= -1;
459 gdbarch
->call_dummy_start_offset
= -1;
460 gdbarch
->call_dummy_breakpoint_offset
= -1;
461 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
462 gdbarch
->call_dummy_length
= -1;
463 gdbarch
->call_dummy_p
= -1;
464 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
465 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
466 gdbarch
->call_dummy_stack_adjust_p
= -1;
467 gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
468 gdbarch
->init_frame_pc
= init_frame_pc_default
;
469 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
470 gdbarch
->register_convertible
= generic_register_convertible_not
;
471 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
472 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
473 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
474 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
475 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
476 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
477 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
478 gdbarch
->decr_pc_after_break
= -1;
479 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
480 gdbarch
->function_start_offset
= -1;
481 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
482 gdbarch
->frame_args_skip
= -1;
483 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
484 gdbarch
->extra_stack_alignment_needed
= 1;
485 gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
486 gdbarch
->addr_bits_remove
= core_addr_identity
;
487 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
488 /* gdbarch_alloc() */
494 /* Free a gdbarch struct. This should never happen in normal
495 operation --- once you've created a gdbarch, you keep it around.
496 However, if an architecture's init function encounters an error
497 building the structure, it may need to clean up a partially
498 constructed gdbarch. */
501 gdbarch_free (struct gdbarch
*arch
)
503 gdb_assert (arch
!= NULL
);
504 free_gdbarch_data (arch
);
509 /* Ensure that all values in a GDBARCH are reasonable. */
512 verify_gdbarch (struct gdbarch
*gdbarch
)
514 /* Only perform sanity checks on a multi-arch target. */
518 if (gdbarch
->byte_order
== 0)
519 internal_error (__FILE__
, __LINE__
,
520 "verify_gdbarch: byte-order unset");
521 if (gdbarch
->bfd_arch_info
== NULL
)
522 internal_error (__FILE__
, __LINE__
,
523 "verify_gdbarch: bfd_arch_info unset");
524 /* Check those that need to be defined for the given multi-arch level. */
525 /* Skip verify of short_bit, invalid_p == 0 */
526 /* Skip verify of int_bit, invalid_p == 0 */
527 /* Skip verify of long_bit, invalid_p == 0 */
528 /* Skip verify of long_long_bit, invalid_p == 0 */
529 /* Skip verify of float_bit, invalid_p == 0 */
530 /* Skip verify of double_bit, invalid_p == 0 */
531 /* Skip verify of long_double_bit, invalid_p == 0 */
532 /* Skip verify of ptr_bit, invalid_p == 0 */
533 if (gdbarch
->addr_bit
== 0)
534 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
535 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
536 /* Skip verify of ieee_float, invalid_p == 0 */
537 /* Skip verify of read_pc, invalid_p == 0 */
538 /* Skip verify of write_pc, invalid_p == 0 */
539 /* Skip verify of read_fp, invalid_p == 0 */
540 /* Skip verify of write_fp, invalid_p == 0 */
541 /* Skip verify of read_sp, invalid_p == 0 */
542 /* Skip verify of write_sp, invalid_p == 0 */
543 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
544 /* Skip verify of register_read, has predicate */
545 /* Skip verify of register_write, has predicate */
546 if ((GDB_MULTI_ARCH
>= 2)
547 && (gdbarch
->num_regs
== -1))
548 internal_error (__FILE__
, __LINE__
,
549 "gdbarch: verify_gdbarch: num_regs invalid");
550 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
551 if ((GDB_MULTI_ARCH
>= 2)
552 && (gdbarch
->sp_regnum
== -1))
553 internal_error (__FILE__
, __LINE__
,
554 "gdbarch: verify_gdbarch: sp_regnum invalid");
555 if ((GDB_MULTI_ARCH
>= 2)
556 && (gdbarch
->fp_regnum
== -1))
557 internal_error (__FILE__
, __LINE__
,
558 "gdbarch: verify_gdbarch: fp_regnum invalid");
559 if ((GDB_MULTI_ARCH
>= 2)
560 && (gdbarch
->pc_regnum
== -1))
561 internal_error (__FILE__
, __LINE__
,
562 "gdbarch: verify_gdbarch: pc_regnum invalid");
563 /* Skip verify of fp0_regnum, invalid_p == 0 */
564 /* Skip verify of npc_regnum, invalid_p == 0 */
565 /* Skip verify of nnpc_regnum, invalid_p == 0 */
566 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
567 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
568 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
569 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
570 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
571 /* Skip verify of register_name, invalid_p == 0 */
572 if ((GDB_MULTI_ARCH
>= 2)
573 && (gdbarch
->register_size
== -1))
574 internal_error (__FILE__
, __LINE__
,
575 "gdbarch: verify_gdbarch: register_size invalid");
576 if ((GDB_MULTI_ARCH
>= 2)
577 && (gdbarch
->register_bytes
== -1))
578 internal_error (__FILE__
, __LINE__
,
579 "gdbarch: verify_gdbarch: register_bytes invalid");
580 if ((GDB_MULTI_ARCH
>= 2)
581 && (gdbarch
->register_byte
== 0))
582 internal_error (__FILE__
, __LINE__
,
583 "gdbarch: verify_gdbarch: register_byte invalid");
584 if ((GDB_MULTI_ARCH
>= 2)
585 && (gdbarch
->register_raw_size
== 0))
586 internal_error (__FILE__
, __LINE__
,
587 "gdbarch: verify_gdbarch: register_raw_size invalid");
588 if ((GDB_MULTI_ARCH
>= 2)
589 && (gdbarch
->max_register_raw_size
== -1))
590 internal_error (__FILE__
, __LINE__
,
591 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
592 if ((GDB_MULTI_ARCH
>= 2)
593 && (gdbarch
->register_virtual_size
== 0))
594 internal_error (__FILE__
, __LINE__
,
595 "gdbarch: verify_gdbarch: register_virtual_size invalid");
596 if ((GDB_MULTI_ARCH
>= 2)
597 && (gdbarch
->max_register_virtual_size
== -1))
598 internal_error (__FILE__
, __LINE__
,
599 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
600 if ((GDB_MULTI_ARCH
>= 2)
601 && (gdbarch
->register_virtual_type
== 0))
602 internal_error (__FILE__
, __LINE__
,
603 "gdbarch: verify_gdbarch: register_virtual_type invalid");
604 /* Skip verify of do_registers_info, invalid_p == 0 */
605 /* Skip verify of register_sim_regno, invalid_p == 0 */
606 /* Skip verify of register_bytes_ok, has predicate */
607 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
608 /* Skip verify of cannot_store_register, invalid_p == 0 */
609 if ((GDB_MULTI_ARCH
>= 1)
610 && (gdbarch
->use_generic_dummy_frames
== -1))
611 internal_error (__FILE__
, __LINE__
,
612 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
613 if ((GDB_MULTI_ARCH
>= 2)
614 && (gdbarch
->call_dummy_location
== 0))
615 internal_error (__FILE__
, __LINE__
,
616 "gdbarch: verify_gdbarch: call_dummy_location invalid");
617 if ((GDB_MULTI_ARCH
>= 2)
618 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
619 internal_error (__FILE__
, __LINE__
,
620 "gdbarch: verify_gdbarch: call_dummy_address invalid");
621 if ((GDB_MULTI_ARCH
>= 2)
622 && (gdbarch
->call_dummy_start_offset
== -1))
623 internal_error (__FILE__
, __LINE__
,
624 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
625 if ((GDB_MULTI_ARCH
>= 2)
626 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
627 internal_error (__FILE__
, __LINE__
,
628 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
629 if ((GDB_MULTI_ARCH
>= 1)
630 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
631 internal_error (__FILE__
, __LINE__
,
632 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
633 if ((GDB_MULTI_ARCH
>= 2)
634 && (gdbarch
->call_dummy_length
== -1))
635 internal_error (__FILE__
, __LINE__
,
636 "gdbarch: verify_gdbarch: call_dummy_length invalid");
637 if ((GDB_MULTI_ARCH
>= 2)
638 && (gdbarch
->pc_in_call_dummy
== 0))
639 internal_error (__FILE__
, __LINE__
,
640 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
641 if ((GDB_MULTI_ARCH
>= 1)
642 && (gdbarch
->call_dummy_p
== -1))
643 internal_error (__FILE__
, __LINE__
,
644 "gdbarch: verify_gdbarch: call_dummy_p invalid");
645 /* Skip verify of call_dummy_words, invalid_p == 0 */
646 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
647 if ((GDB_MULTI_ARCH
>= 1)
648 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
649 internal_error (__FILE__
, __LINE__
,
650 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
651 if ((GDB_MULTI_ARCH
>= 2)
652 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
653 internal_error (__FILE__
, __LINE__
,
654 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
655 if ((GDB_MULTI_ARCH
>= 2)
656 && (gdbarch
->fix_call_dummy
== 0))
657 internal_error (__FILE__
, __LINE__
,
658 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
659 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
660 /* Skip verify of init_frame_pc, invalid_p == 0 */
661 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
662 if ((GDB_MULTI_ARCH
>= 1)
663 && (gdbarch
->get_saved_register
== 0))
664 internal_error (__FILE__
, __LINE__
,
665 "gdbarch: verify_gdbarch: get_saved_register invalid");
666 /* Skip verify of register_convertible, invalid_p == 0 */
667 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
668 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
669 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
670 /* Skip verify of store_pseudo_register, invalid_p == 0 */
671 /* Skip verify of pointer_to_address, invalid_p == 0 */
672 /* Skip verify of address_to_pointer, invalid_p == 0 */
673 /* Skip verify of return_value_on_stack, invalid_p == 0 */
674 if ((GDB_MULTI_ARCH
>= 2)
675 && (gdbarch
->extract_return_value
== 0))
676 internal_error (__FILE__
, __LINE__
,
677 "gdbarch: verify_gdbarch: extract_return_value invalid");
678 if ((GDB_MULTI_ARCH
>= 1)
679 && (gdbarch
->push_arguments
== 0))
680 internal_error (__FILE__
, __LINE__
,
681 "gdbarch: verify_gdbarch: push_arguments invalid");
682 if ((GDB_MULTI_ARCH
>= 2)
683 && (gdbarch
->push_dummy_frame
== 0))
684 internal_error (__FILE__
, __LINE__
,
685 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
686 if ((GDB_MULTI_ARCH
>= 1)
687 && (gdbarch
->push_return_address
== 0))
688 internal_error (__FILE__
, __LINE__
,
689 "gdbarch: verify_gdbarch: push_return_address invalid");
690 if ((GDB_MULTI_ARCH
>= 2)
691 && (gdbarch
->pop_frame
== 0))
692 internal_error (__FILE__
, __LINE__
,
693 "gdbarch: verify_gdbarch: pop_frame invalid");
694 if ((GDB_MULTI_ARCH
>= 2)
695 && (gdbarch
->store_struct_return
== 0))
696 internal_error (__FILE__
, __LINE__
,
697 "gdbarch: verify_gdbarch: store_struct_return invalid");
698 if ((GDB_MULTI_ARCH
>= 2)
699 && (gdbarch
->store_return_value
== 0))
700 internal_error (__FILE__
, __LINE__
,
701 "gdbarch: verify_gdbarch: store_return_value invalid");
702 /* Skip verify of extract_struct_value_address, has predicate */
703 if ((GDB_MULTI_ARCH
>= 2)
704 && (gdbarch
->use_struct_convention
== 0))
705 internal_error (__FILE__
, __LINE__
,
706 "gdbarch: verify_gdbarch: use_struct_convention invalid");
707 if ((GDB_MULTI_ARCH
>= 2)
708 && (gdbarch
->frame_init_saved_regs
== 0))
709 internal_error (__FILE__
, __LINE__
,
710 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
711 if ((GDB_MULTI_ARCH
>= 2)
712 && (gdbarch
->init_extra_frame_info
== 0))
713 internal_error (__FILE__
, __LINE__
,
714 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
715 if ((GDB_MULTI_ARCH
>= 2)
716 && (gdbarch
->skip_prologue
== 0))
717 internal_error (__FILE__
, __LINE__
,
718 "gdbarch: verify_gdbarch: skip_prologue invalid");
719 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
720 if ((GDB_MULTI_ARCH
>= 2)
721 && (gdbarch
->inner_than
== 0))
722 internal_error (__FILE__
, __LINE__
,
723 "gdbarch: verify_gdbarch: inner_than invalid");
724 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
725 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
726 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
727 if ((GDB_MULTI_ARCH
>= 2)
728 && (gdbarch
->decr_pc_after_break
== -1))
729 internal_error (__FILE__
, __LINE__
,
730 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
731 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
>= 2)
733 && (gdbarch
->function_start_offset
== -1))
734 internal_error (__FILE__
, __LINE__
,
735 "gdbarch: verify_gdbarch: function_start_offset invalid");
736 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
737 if ((GDB_MULTI_ARCH
>= 2)
738 && (gdbarch
->frame_args_skip
== -1))
739 internal_error (__FILE__
, __LINE__
,
740 "gdbarch: verify_gdbarch: frame_args_skip invalid");
741 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
742 if ((GDB_MULTI_ARCH
>= 2)
743 && (gdbarch
->frame_chain
== 0))
744 internal_error (__FILE__
, __LINE__
,
745 "gdbarch: verify_gdbarch: frame_chain invalid");
746 if ((GDB_MULTI_ARCH
>= 1)
747 && (gdbarch
->frame_chain_valid
== 0))
748 internal_error (__FILE__
, __LINE__
,
749 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
750 if ((GDB_MULTI_ARCH
>= 2)
751 && (gdbarch
->frame_saved_pc
== 0))
752 internal_error (__FILE__
, __LINE__
,
753 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
754 if ((GDB_MULTI_ARCH
>= 2)
755 && (gdbarch
->frame_args_address
== 0))
756 internal_error (__FILE__
, __LINE__
,
757 "gdbarch: verify_gdbarch: frame_args_address invalid");
758 if ((GDB_MULTI_ARCH
>= 2)
759 && (gdbarch
->frame_locals_address
== 0))
760 internal_error (__FILE__
, __LINE__
,
761 "gdbarch: verify_gdbarch: frame_locals_address invalid");
762 if ((GDB_MULTI_ARCH
>= 2)
763 && (gdbarch
->saved_pc_after_call
== 0))
764 internal_error (__FILE__
, __LINE__
,
765 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
766 if ((GDB_MULTI_ARCH
>= 2)
767 && (gdbarch
->frame_num_args
== 0))
768 internal_error (__FILE__
, __LINE__
,
769 "gdbarch: verify_gdbarch: frame_num_args invalid");
770 /* Skip verify of stack_align, has predicate */
771 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
772 /* Skip verify of reg_struct_has_addr, has predicate */
773 /* Skip verify of save_dummy_frame_tos, has predicate */
774 if (gdbarch
->float_format
== 0)
775 gdbarch
->float_format
= default_float_format (gdbarch
);
776 if (gdbarch
->double_format
== 0)
777 gdbarch
->double_format
= default_double_format (gdbarch
);
778 if (gdbarch
->long_double_format
== 0)
779 gdbarch
->long_double_format
= &floatformat_unknown
;
780 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
781 /* Skip verify of addr_bits_remove, invalid_p == 0 */
782 /* Skip verify of software_single_step, has predicate */
783 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
787 /* Print out the details of the current architecture. */
789 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
790 just happens to match the global variable ``current_gdbarch''. That
791 way macros refering to that variable get the local and not the global
792 version - ulgh. Once everything is parameterised with gdbarch, this
796 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
798 fprintf_unfiltered (file
,
799 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
801 #ifdef TARGET_ARCHITECTURE
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
804 XSTRING (TARGET_ARCHITECTURE
));
806 #ifdef TARGET_BYTE_ORDER
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
809 XSTRING (TARGET_BYTE_ORDER
));
811 #ifdef TARGET_SHORT_BIT
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
814 XSTRING (TARGET_SHORT_BIT
));
816 #ifdef TARGET_INT_BIT
817 fprintf_unfiltered (file
,
818 "gdbarch_dump: TARGET_INT_BIT # %s\n",
819 XSTRING (TARGET_INT_BIT
));
821 #ifdef TARGET_LONG_BIT
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
824 XSTRING (TARGET_LONG_BIT
));
826 #ifdef TARGET_LONG_LONG_BIT
827 fprintf_unfiltered (file
,
828 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
829 XSTRING (TARGET_LONG_LONG_BIT
));
831 #ifdef TARGET_FLOAT_BIT
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
834 XSTRING (TARGET_FLOAT_BIT
));
836 #ifdef TARGET_DOUBLE_BIT
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
839 XSTRING (TARGET_DOUBLE_BIT
));
841 #ifdef TARGET_LONG_DOUBLE_BIT
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
844 XSTRING (TARGET_LONG_DOUBLE_BIT
));
846 #ifdef TARGET_PTR_BIT
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
849 XSTRING (TARGET_PTR_BIT
));
851 #ifdef TARGET_ADDR_BIT
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
854 XSTRING (TARGET_ADDR_BIT
));
856 #ifdef TARGET_BFD_VMA_BIT
857 fprintf_unfiltered (file
,
858 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
859 XSTRING (TARGET_BFD_VMA_BIT
));
862 fprintf_unfiltered (file
,
863 "gdbarch_dump: IEEE_FLOAT # %s\n",
864 XSTRING (IEEE_FLOAT
));
866 #ifdef TARGET_READ_PC
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: %s # %s\n",
869 "TARGET_READ_PC(ptid)",
870 XSTRING (TARGET_READ_PC (ptid
)));
872 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
873 /* Macro might contain `[{}]' when not multi-arch */
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: %s # %s\n",
876 "TARGET_WRITE_PC(val, ptid)",
877 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
879 #ifdef TARGET_READ_FP
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: %s # %s\n",
883 XSTRING (TARGET_READ_FP ()));
885 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
886 /* Macro might contain `[{}]' when not multi-arch */
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: %s # %s\n",
889 "TARGET_WRITE_FP(val)",
890 XSTRING (TARGET_WRITE_FP (val
)));
892 #ifdef TARGET_READ_SP
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: %s # %s\n",
896 XSTRING (TARGET_READ_SP ()));
898 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
899 /* Macro might contain `[{}]' when not multi-arch */
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: %s # %s\n",
902 "TARGET_WRITE_SP(val)",
903 XSTRING (TARGET_WRITE_SP (val
)));
905 #if defined (TARGET_VIRTUAL_FRAME_POINTER) && GDB_MULTI_ARCH
906 /* Macro might contain `[{}]' when not multi-arch */
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: %s # %s\n",
909 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
910 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: NUM_REGS # %s\n",
917 #ifdef NUM_PSEUDO_REGS
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
920 XSTRING (NUM_PSEUDO_REGS
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: SP_REGNUM # %s\n",
925 XSTRING (SP_REGNUM
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: FP_REGNUM # %s\n",
930 XSTRING (FP_REGNUM
));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: PC_REGNUM # %s\n",
935 XSTRING (PC_REGNUM
));
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: FP0_REGNUM # %s\n",
940 XSTRING (FP0_REGNUM
));
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: NPC_REGNUM # %s\n",
945 XSTRING (NPC_REGNUM
));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: NNPC_REGNUM # %s\n",
950 XSTRING (NNPC_REGNUM
));
952 #ifdef STAB_REG_TO_REGNUM
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: %s # %s\n",
955 "STAB_REG_TO_REGNUM(stab_regnr)",
956 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
958 #ifdef ECOFF_REG_TO_REGNUM
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: %s # %s\n",
961 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
962 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
964 #ifdef DWARF_REG_TO_REGNUM
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: %s # %s\n",
967 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
968 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
970 #ifdef SDB_REG_TO_REGNUM
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: %s # %s\n",
973 "SDB_REG_TO_REGNUM(sdb_regnr)",
974 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
976 #ifdef DWARF2_REG_TO_REGNUM
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: %s # %s\n",
979 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
980 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: %s # %s\n",
985 "REGISTER_NAME(regnr)",
986 XSTRING (REGISTER_NAME (regnr
)));
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: REGISTER_SIZE # %s\n",
991 XSTRING (REGISTER_SIZE
));
993 #ifdef REGISTER_BYTES
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: REGISTER_BYTES # %s\n",
996 XSTRING (REGISTER_BYTES
));
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: %s # %s\n",
1001 "REGISTER_BYTE(reg_nr)",
1002 XSTRING (REGISTER_BYTE (reg_nr
)));
1004 #ifdef REGISTER_RAW_SIZE
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: %s # %s\n",
1007 "REGISTER_RAW_SIZE(reg_nr)",
1008 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1010 #ifdef MAX_REGISTER_RAW_SIZE
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1013 XSTRING (MAX_REGISTER_RAW_SIZE
));
1015 #ifdef REGISTER_VIRTUAL_SIZE
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: %s # %s\n",
1018 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1019 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1021 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1024 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1026 #ifdef REGISTER_VIRTUAL_TYPE
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: %s # %s\n",
1029 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1030 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1032 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1033 /* Macro might contain `[{}]' when not multi-arch */
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: %s # %s\n",
1036 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1037 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1039 #ifdef REGISTER_SIM_REGNO
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: %s # %s\n",
1042 "REGISTER_SIM_REGNO(reg_nr)",
1043 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1045 #ifdef REGISTER_BYTES_OK
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: %s # %s\n",
1048 "REGISTER_BYTES_OK(nr_bytes)",
1049 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1051 #ifdef CANNOT_FETCH_REGISTER
1052 fprintf_unfiltered (file
,
1053 "gdbarch_dump: %s # %s\n",
1054 "CANNOT_FETCH_REGISTER(regnum)",
1055 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1057 #ifdef CANNOT_STORE_REGISTER
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: %s # %s\n",
1060 "CANNOT_STORE_REGISTER(regnum)",
1061 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1063 #ifdef USE_GENERIC_DUMMY_FRAMES
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1066 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1068 #ifdef CALL_DUMMY_LOCATION
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1071 XSTRING (CALL_DUMMY_LOCATION
));
1073 #ifdef CALL_DUMMY_ADDRESS
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: %s # %s\n",
1076 "CALL_DUMMY_ADDRESS()",
1077 XSTRING (CALL_DUMMY_ADDRESS ()));
1079 #ifdef CALL_DUMMY_START_OFFSET
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1082 XSTRING (CALL_DUMMY_START_OFFSET
));
1084 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1087 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1089 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1092 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1094 #ifdef CALL_DUMMY_LENGTH
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1097 XSTRING (CALL_DUMMY_LENGTH
));
1099 #ifdef PC_IN_CALL_DUMMY
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: %s # %s\n",
1102 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1103 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1108 XSTRING (CALL_DUMMY_P
));
1110 #ifdef CALL_DUMMY_WORDS
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1113 XSTRING (CALL_DUMMY_WORDS
));
1115 #ifdef SIZEOF_CALL_DUMMY_WORDS
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1118 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1120 #ifdef CALL_DUMMY_STACK_ADJUST_P
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1123 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1125 #ifdef CALL_DUMMY_STACK_ADJUST
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1128 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1130 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1131 /* Macro might contain `[{}]' when not multi-arch */
1132 fprintf_unfiltered (file
,
1133 "gdbarch_dump: %s # %s\n",
1134 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1135 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1137 #if defined (INIT_FRAME_PC_FIRST) && GDB_MULTI_ARCH
1138 /* Macro might contain `[{}]' when not multi-arch */
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: %s # %s\n",
1141 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1142 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1144 #if defined (INIT_FRAME_PC) && GDB_MULTI_ARCH
1145 /* Macro might contain `[{}]' when not multi-arch */
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: %s # %s\n",
1148 "INIT_FRAME_PC(fromleaf, prev)",
1149 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1151 #ifdef BELIEVE_PCC_PROMOTION
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1154 XSTRING (BELIEVE_PCC_PROMOTION
));
1156 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1157 fprintf_unfiltered (file
,
1158 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1159 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1161 #ifdef COERCE_FLOAT_TO_DOUBLE
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: %s # %s\n",
1164 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1165 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1167 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1168 /* Macro might contain `[{}]' when not multi-arch */
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: %s # %s\n",
1171 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1172 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1174 #ifdef REGISTER_CONVERTIBLE
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "REGISTER_CONVERTIBLE(nr)",
1178 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1180 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1181 /* Macro might contain `[{}]' when not multi-arch */
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: %s # %s\n",
1184 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1185 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1187 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1188 /* Macro might contain `[{}]' when not multi-arch */
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: %s # %s\n",
1191 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1192 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1194 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1195 /* Macro might contain `[{}]' when not multi-arch */
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: %s # %s\n",
1198 "FETCH_PSEUDO_REGISTER(regnum)",
1199 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1201 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1202 /* Macro might contain `[{}]' when not multi-arch */
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: %s # %s\n",
1205 "STORE_PSEUDO_REGISTER(regnum)",
1206 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1208 #ifdef POINTER_TO_ADDRESS
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: %s # %s\n",
1211 "POINTER_TO_ADDRESS(type, buf)",
1212 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1214 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1215 /* Macro might contain `[{}]' when not multi-arch */
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: %s # %s\n",
1218 "ADDRESS_TO_POINTER(type, buf, addr)",
1219 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1221 #ifdef RETURN_VALUE_ON_STACK
1222 fprintf_unfiltered (file
,
1223 "gdbarch_dump: %s # %s\n",
1224 "RETURN_VALUE_ON_STACK(type)",
1225 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1227 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1228 /* Macro might contain `[{}]' when not multi-arch */
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: %s # %s\n",
1231 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1232 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1234 #ifdef PUSH_ARGUMENTS
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: %s # %s\n",
1237 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1238 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1240 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1241 /* Macro might contain `[{}]' when not multi-arch */
1242 fprintf_unfiltered (file
,
1243 "gdbarch_dump: %s # %s\n",
1244 "PUSH_DUMMY_FRAME(-)",
1245 XSTRING (PUSH_DUMMY_FRAME (-)));
1247 #ifdef PUSH_RETURN_ADDRESS
1248 fprintf_unfiltered (file
,
1249 "gdbarch_dump: %s # %s\n",
1250 "PUSH_RETURN_ADDRESS(pc, sp)",
1251 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1253 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1254 /* Macro might contain `[{}]' when not multi-arch */
1255 fprintf_unfiltered (file
,
1256 "gdbarch_dump: %s # %s\n",
1258 XSTRING (POP_FRAME (-)));
1260 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1261 /* Macro might contain `[{}]' when not multi-arch */
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: %s # %s\n",
1264 "STORE_STRUCT_RETURN(addr, sp)",
1265 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1267 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1268 /* Macro might contain `[{}]' when not multi-arch */
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: %s # %s\n",
1271 "STORE_RETURN_VALUE(type, valbuf)",
1272 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1274 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: %s # %s\n",
1277 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1278 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1280 #ifdef USE_STRUCT_CONVENTION
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: %s # %s\n",
1283 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1284 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1286 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1287 /* Macro might contain `[{}]' when not multi-arch */
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: %s # %s\n",
1290 "FRAME_INIT_SAVED_REGS(frame)",
1291 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1293 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1294 /* Macro might contain `[{}]' when not multi-arch */
1295 fprintf_unfiltered (file
,
1296 "gdbarch_dump: %s # %s\n",
1297 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1298 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1300 #ifdef SKIP_PROLOGUE
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: %s # %s\n",
1303 "SKIP_PROLOGUE(ip)",
1304 XSTRING (SKIP_PROLOGUE (ip
)));
1306 #ifdef PROLOGUE_FRAMELESS_P
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: %s # %s\n",
1309 "PROLOGUE_FRAMELESS_P(ip)",
1310 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: %s # %s\n",
1315 "INNER_THAN(lhs, rhs)",
1316 XSTRING (INNER_THAN (lhs
, rhs
)));
1318 #ifdef BREAKPOINT_FROM_PC
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: %s # %s\n",
1321 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1322 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1324 #ifdef MEMORY_INSERT_BREAKPOINT
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: %s # %s\n",
1327 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1328 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1330 #ifdef MEMORY_REMOVE_BREAKPOINT
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: %s # %s\n",
1333 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1334 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1336 #ifdef DECR_PC_AFTER_BREAK
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1339 XSTRING (DECR_PC_AFTER_BREAK
));
1341 #ifdef PREPARE_TO_PROCEED
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: %s # %s\n",
1344 "PREPARE_TO_PROCEED(select_it)",
1345 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1347 #ifdef FUNCTION_START_OFFSET
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1350 XSTRING (FUNCTION_START_OFFSET
));
1352 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1353 /* Macro might contain `[{}]' when not multi-arch */
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: %s # %s\n",
1356 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1357 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1359 #ifdef FRAME_ARGS_SKIP
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1362 XSTRING (FRAME_ARGS_SKIP
));
1364 #ifdef FRAMELESS_FUNCTION_INVOCATION
1365 fprintf_unfiltered (file
,
1366 "gdbarch_dump: %s # %s\n",
1367 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1368 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1371 fprintf_unfiltered (file
,
1372 "gdbarch_dump: %s # %s\n",
1373 "FRAME_CHAIN(frame)",
1374 XSTRING (FRAME_CHAIN (frame
)));
1376 #ifdef FRAME_CHAIN_VALID
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: %s # %s\n",
1379 "FRAME_CHAIN_VALID(chain, thisframe)",
1380 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1382 #ifdef FRAME_SAVED_PC
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: %s # %s\n",
1385 "FRAME_SAVED_PC(fi)",
1386 XSTRING (FRAME_SAVED_PC (fi
)));
1388 #ifdef FRAME_ARGS_ADDRESS
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: %s # %s\n",
1391 "FRAME_ARGS_ADDRESS(fi)",
1392 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1394 #ifdef FRAME_LOCALS_ADDRESS
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: %s # %s\n",
1397 "FRAME_LOCALS_ADDRESS(fi)",
1398 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1400 #ifdef SAVED_PC_AFTER_CALL
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: %s # %s\n",
1403 "SAVED_PC_AFTER_CALL(frame)",
1404 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1406 #ifdef FRAME_NUM_ARGS
1407 fprintf_unfiltered (file
,
1408 "gdbarch_dump: %s # %s\n",
1409 "FRAME_NUM_ARGS(frame)",
1410 XSTRING (FRAME_NUM_ARGS (frame
)));
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: %s # %s\n",
1416 XSTRING (STACK_ALIGN (sp
)));
1418 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1421 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1423 #ifdef REG_STRUCT_HAS_ADDR
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: %s # %s\n",
1426 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1427 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1429 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1430 /* Macro might contain `[{}]' when not multi-arch */
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: %s # %s\n",
1433 "SAVE_DUMMY_FRAME_TOS(sp)",
1434 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1436 #ifdef PARM_BOUNDARY
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1439 XSTRING (PARM_BOUNDARY
));
1441 #ifdef TARGET_FLOAT_FORMAT
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1444 XSTRING (TARGET_FLOAT_FORMAT
));
1446 #ifdef TARGET_DOUBLE_FORMAT
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1449 XSTRING (TARGET_DOUBLE_FORMAT
));
1451 #ifdef TARGET_LONG_DOUBLE_FORMAT
1452 fprintf_unfiltered (file
,
1453 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1454 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1456 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: %s # %s\n",
1459 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1460 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1462 #ifdef ADDR_BITS_REMOVE
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: %s # %s\n",
1465 "ADDR_BITS_REMOVE(addr)",
1466 XSTRING (ADDR_BITS_REMOVE (addr
)));
1468 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1469 /* Macro might contain `[{}]' when not multi-arch */
1470 fprintf_unfiltered (file
,
1471 "gdbarch_dump: %s # %s\n",
1472 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1473 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1475 #ifdef SKIP_TRAMPOLINE_CODE
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: %s # %s\n",
1478 "SKIP_TRAMPOLINE_CODE(pc)",
1479 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1481 #ifdef TARGET_ARCHITECTURE
1482 if (TARGET_ARCHITECTURE
!= NULL
)
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1485 TARGET_ARCHITECTURE
->printable_name
);
1487 #ifdef TARGET_BYTE_ORDER
1488 fprintf_unfiltered (file
,
1489 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1490 (long) TARGET_BYTE_ORDER
);
1492 #ifdef TARGET_SHORT_BIT
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1495 (long) TARGET_SHORT_BIT
);
1497 #ifdef TARGET_INT_BIT
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1500 (long) TARGET_INT_BIT
);
1502 #ifdef TARGET_LONG_BIT
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1505 (long) TARGET_LONG_BIT
);
1507 #ifdef TARGET_LONG_LONG_BIT
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1510 (long) TARGET_LONG_LONG_BIT
);
1512 #ifdef TARGET_FLOAT_BIT
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1515 (long) TARGET_FLOAT_BIT
);
1517 #ifdef TARGET_DOUBLE_BIT
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1520 (long) TARGET_DOUBLE_BIT
);
1522 #ifdef TARGET_LONG_DOUBLE_BIT
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1525 (long) TARGET_LONG_DOUBLE_BIT
);
1527 #ifdef TARGET_PTR_BIT
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1530 (long) TARGET_PTR_BIT
);
1532 #ifdef TARGET_ADDR_BIT
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1535 (long) TARGET_ADDR_BIT
);
1537 #ifdef TARGET_BFD_VMA_BIT
1538 fprintf_unfiltered (file
,
1539 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1540 (long) TARGET_BFD_VMA_BIT
);
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1547 #ifdef TARGET_READ_PC
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1551 (long) current_gdbarch
->read_pc
1552 /*TARGET_READ_PC ()*/);
1554 #ifdef TARGET_WRITE_PC
1556 fprintf_unfiltered (file
,
1557 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1558 (long) current_gdbarch
->write_pc
1559 /*TARGET_WRITE_PC ()*/);
1561 #ifdef TARGET_READ_FP
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1565 (long) current_gdbarch
->read_fp
1566 /*TARGET_READ_FP ()*/);
1568 #ifdef TARGET_WRITE_FP
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1572 (long) current_gdbarch
->write_fp
1573 /*TARGET_WRITE_FP ()*/);
1575 #ifdef TARGET_READ_SP
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1579 (long) current_gdbarch
->read_sp
1580 /*TARGET_READ_SP ()*/);
1582 #ifdef TARGET_WRITE_SP
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1586 (long) current_gdbarch
->write_sp
1587 /*TARGET_WRITE_SP ()*/);
1589 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
1593 (long) current_gdbarch
->virtual_frame_pointer
1594 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: register_read = 0x%08lx\n",
1599 (long) current_gdbarch
->register_read
);
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: register_write = 0x%08lx\n",
1603 (long) current_gdbarch
->register_write
);
1605 fprintf_unfiltered (file
,
1606 "gdbarch_dump: NUM_REGS = %ld\n",
1609 #ifdef NUM_PSEUDO_REGS
1610 fprintf_unfiltered (file
,
1611 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1612 (long) NUM_PSEUDO_REGS
);
1615 fprintf_unfiltered (file
,
1616 "gdbarch_dump: SP_REGNUM = %ld\n",
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: FP_REGNUM = %ld\n",
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: PC_REGNUM = %ld\n",
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: FP0_REGNUM = %ld\n",
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: NPC_REGNUM = %ld\n",
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1642 (long) NNPC_REGNUM
);
1644 #ifdef STAB_REG_TO_REGNUM
1646 fprintf_unfiltered (file
,
1647 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1648 (long) current_gdbarch
->stab_reg_to_regnum
1649 /*STAB_REG_TO_REGNUM ()*/);
1651 #ifdef ECOFF_REG_TO_REGNUM
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1655 (long) current_gdbarch
->ecoff_reg_to_regnum
1656 /*ECOFF_REG_TO_REGNUM ()*/);
1658 #ifdef DWARF_REG_TO_REGNUM
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1662 (long) current_gdbarch
->dwarf_reg_to_regnum
1663 /*DWARF_REG_TO_REGNUM ()*/);
1665 #ifdef SDB_REG_TO_REGNUM
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1669 (long) current_gdbarch
->sdb_reg_to_regnum
1670 /*SDB_REG_TO_REGNUM ()*/);
1672 #ifdef DWARF2_REG_TO_REGNUM
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1676 (long) current_gdbarch
->dwarf2_reg_to_regnum
1677 /*DWARF2_REG_TO_REGNUM ()*/);
1679 #ifdef REGISTER_NAME
1681 fprintf_unfiltered (file
,
1682 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1683 (long) current_gdbarch
->register_name
1684 /*REGISTER_NAME ()*/);
1686 #ifdef REGISTER_SIZE
1687 fprintf_unfiltered (file
,
1688 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1689 (long) REGISTER_SIZE
);
1691 #ifdef REGISTER_BYTES
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1694 (long) REGISTER_BYTES
);
1696 #ifdef REGISTER_BYTE
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1700 (long) current_gdbarch
->register_byte
1701 /*REGISTER_BYTE ()*/);
1703 #ifdef REGISTER_RAW_SIZE
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1707 (long) current_gdbarch
->register_raw_size
1708 /*REGISTER_RAW_SIZE ()*/);
1710 #ifdef MAX_REGISTER_RAW_SIZE
1711 fprintf_unfiltered (file
,
1712 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1713 (long) MAX_REGISTER_RAW_SIZE
);
1715 #ifdef REGISTER_VIRTUAL_SIZE
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1719 (long) current_gdbarch
->register_virtual_size
1720 /*REGISTER_VIRTUAL_SIZE ()*/);
1722 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1725 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1727 #ifdef REGISTER_VIRTUAL_TYPE
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1731 (long) current_gdbarch
->register_virtual_type
1732 /*REGISTER_VIRTUAL_TYPE ()*/);
1734 #ifdef DO_REGISTERS_INFO
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1738 (long) current_gdbarch
->do_registers_info
1739 /*DO_REGISTERS_INFO ()*/);
1741 #ifdef REGISTER_SIM_REGNO
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1745 (long) current_gdbarch
->register_sim_regno
1746 /*REGISTER_SIM_REGNO ()*/);
1748 #ifdef REGISTER_BYTES_OK
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1752 (long) current_gdbarch
->register_bytes_ok
1753 /*REGISTER_BYTES_OK ()*/);
1755 #ifdef CANNOT_FETCH_REGISTER
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
1759 (long) current_gdbarch
->cannot_fetch_register
1760 /*CANNOT_FETCH_REGISTER ()*/);
1762 #ifdef CANNOT_STORE_REGISTER
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1766 (long) current_gdbarch
->cannot_store_register
1767 /*CANNOT_STORE_REGISTER ()*/);
1769 #ifdef USE_GENERIC_DUMMY_FRAMES
1770 fprintf_unfiltered (file
,
1771 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1772 (long) USE_GENERIC_DUMMY_FRAMES
);
1774 #ifdef CALL_DUMMY_LOCATION
1775 fprintf_unfiltered (file
,
1776 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1777 (long) CALL_DUMMY_LOCATION
);
1779 #ifdef CALL_DUMMY_ADDRESS
1781 fprintf_unfiltered (file
,
1782 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1783 (long) current_gdbarch
->call_dummy_address
1784 /*CALL_DUMMY_ADDRESS ()*/);
1786 #ifdef CALL_DUMMY_START_OFFSET
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1789 (long) CALL_DUMMY_START_OFFSET
);
1791 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1792 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1795 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1797 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1800 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1802 #ifdef CALL_DUMMY_LENGTH
1803 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1806 (long) CALL_DUMMY_LENGTH
);
1808 #ifdef PC_IN_CALL_DUMMY
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1812 (long) current_gdbarch
->pc_in_call_dummy
1813 /*PC_IN_CALL_DUMMY ()*/);
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1818 (long) CALL_DUMMY_P
);
1820 #ifdef CALL_DUMMY_WORDS
1821 fprintf_unfiltered (file
,
1822 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1823 (long) CALL_DUMMY_WORDS
);
1825 #ifdef SIZEOF_CALL_DUMMY_WORDS
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1828 (long) SIZEOF_CALL_DUMMY_WORDS
);
1830 #ifdef CALL_DUMMY_STACK_ADJUST_P
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1833 (long) CALL_DUMMY_STACK_ADJUST_P
);
1835 #ifdef CALL_DUMMY_STACK_ADJUST
1836 if (CALL_DUMMY_STACK_ADJUST_P
)
1837 fprintf_unfiltered (file
,
1838 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1839 (long) CALL_DUMMY_STACK_ADJUST
);
1841 #ifdef FIX_CALL_DUMMY
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1845 (long) current_gdbarch
->fix_call_dummy
1846 /*FIX_CALL_DUMMY ()*/);
1848 #ifdef INIT_FRAME_PC_FIRST
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1852 (long) current_gdbarch
->init_frame_pc_first
1853 /*INIT_FRAME_PC_FIRST ()*/);
1855 #ifdef INIT_FRAME_PC
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1859 (long) current_gdbarch
->init_frame_pc
1860 /*INIT_FRAME_PC ()*/);
1862 #ifdef BELIEVE_PCC_PROMOTION
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1865 (long) BELIEVE_PCC_PROMOTION
);
1867 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1870 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1872 #ifdef COERCE_FLOAT_TO_DOUBLE
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1876 (long) current_gdbarch
->coerce_float_to_double
1877 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1879 #ifdef GET_SAVED_REGISTER
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1883 (long) current_gdbarch
->get_saved_register
1884 /*GET_SAVED_REGISTER ()*/);
1886 #ifdef REGISTER_CONVERTIBLE
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1890 (long) current_gdbarch
->register_convertible
1891 /*REGISTER_CONVERTIBLE ()*/);
1893 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1897 (long) current_gdbarch
->register_convert_to_virtual
1898 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1900 #ifdef REGISTER_CONVERT_TO_RAW
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1904 (long) current_gdbarch
->register_convert_to_raw
1905 /*REGISTER_CONVERT_TO_RAW ()*/);
1907 #ifdef FETCH_PSEUDO_REGISTER
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1911 (long) current_gdbarch
->fetch_pseudo_register
1912 /*FETCH_PSEUDO_REGISTER ()*/);
1914 #ifdef STORE_PSEUDO_REGISTER
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1918 (long) current_gdbarch
->store_pseudo_register
1919 /*STORE_PSEUDO_REGISTER ()*/);
1921 #ifdef POINTER_TO_ADDRESS
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1925 (long) current_gdbarch
->pointer_to_address
1926 /*POINTER_TO_ADDRESS ()*/);
1928 #ifdef ADDRESS_TO_POINTER
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1932 (long) current_gdbarch
->address_to_pointer
1933 /*ADDRESS_TO_POINTER ()*/);
1935 #ifdef RETURN_VALUE_ON_STACK
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1939 (long) current_gdbarch
->return_value_on_stack
1940 /*RETURN_VALUE_ON_STACK ()*/);
1942 #ifdef EXTRACT_RETURN_VALUE
1944 fprintf_unfiltered (file
,
1945 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1946 (long) current_gdbarch
->extract_return_value
1947 /*EXTRACT_RETURN_VALUE ()*/);
1949 #ifdef PUSH_ARGUMENTS
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1953 (long) current_gdbarch
->push_arguments
1954 /*PUSH_ARGUMENTS ()*/);
1956 #ifdef PUSH_DUMMY_FRAME
1958 fprintf_unfiltered (file
,
1959 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1960 (long) current_gdbarch
->push_dummy_frame
1961 /*PUSH_DUMMY_FRAME ()*/);
1963 #ifdef PUSH_RETURN_ADDRESS
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1967 (long) current_gdbarch
->push_return_address
1968 /*PUSH_RETURN_ADDRESS ()*/);
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1974 (long) current_gdbarch
->pop_frame
1977 #ifdef STORE_STRUCT_RETURN
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1981 (long) current_gdbarch
->store_struct_return
1982 /*STORE_STRUCT_RETURN ()*/);
1984 #ifdef STORE_RETURN_VALUE
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1988 (long) current_gdbarch
->store_return_value
1989 /*STORE_RETURN_VALUE ()*/);
1991 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1995 (long) current_gdbarch
->extract_struct_value_address
1996 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1998 #ifdef USE_STRUCT_CONVENTION
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2002 (long) current_gdbarch
->use_struct_convention
2003 /*USE_STRUCT_CONVENTION ()*/);
2005 #ifdef FRAME_INIT_SAVED_REGS
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
2009 (long) current_gdbarch
->frame_init_saved_regs
2010 /*FRAME_INIT_SAVED_REGS ()*/);
2012 #ifdef INIT_EXTRA_FRAME_INFO
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
2016 (long) current_gdbarch
->init_extra_frame_info
2017 /*INIT_EXTRA_FRAME_INFO ()*/);
2019 #ifdef SKIP_PROLOGUE
2021 fprintf_unfiltered (file
,
2022 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
2023 (long) current_gdbarch
->skip_prologue
2024 /*SKIP_PROLOGUE ()*/);
2026 #ifdef PROLOGUE_FRAMELESS_P
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2030 (long) current_gdbarch
->prologue_frameless_p
2031 /*PROLOGUE_FRAMELESS_P ()*/);
2035 fprintf_unfiltered (file
,
2036 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2037 (long) current_gdbarch
->inner_than
2040 #ifdef BREAKPOINT_FROM_PC
2042 fprintf_unfiltered (file
,
2043 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2044 (long) current_gdbarch
->breakpoint_from_pc
2045 /*BREAKPOINT_FROM_PC ()*/);
2047 #ifdef MEMORY_INSERT_BREAKPOINT
2049 fprintf_unfiltered (file
,
2050 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2051 (long) current_gdbarch
->memory_insert_breakpoint
2052 /*MEMORY_INSERT_BREAKPOINT ()*/);
2054 #ifdef MEMORY_REMOVE_BREAKPOINT
2056 fprintf_unfiltered (file
,
2057 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2058 (long) current_gdbarch
->memory_remove_breakpoint
2059 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2061 #ifdef DECR_PC_AFTER_BREAK
2062 fprintf_unfiltered (file
,
2063 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2064 (long) DECR_PC_AFTER_BREAK
);
2066 #ifdef PREPARE_TO_PROCEED
2068 fprintf_unfiltered (file
,
2069 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2070 (long) current_gdbarch
->prepare_to_proceed
2071 /*PREPARE_TO_PROCEED ()*/);
2073 #ifdef FUNCTION_START_OFFSET
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2076 (long) FUNCTION_START_OFFSET
);
2078 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2080 fprintf_unfiltered (file
,
2081 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2082 (long) current_gdbarch
->remote_translate_xfer_address
2083 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2085 #ifdef FRAME_ARGS_SKIP
2086 fprintf_unfiltered (file
,
2087 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2088 (long) FRAME_ARGS_SKIP
);
2090 #ifdef FRAMELESS_FUNCTION_INVOCATION
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2094 (long) current_gdbarch
->frameless_function_invocation
2095 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2101 (long) current_gdbarch
->frame_chain
2102 /*FRAME_CHAIN ()*/);
2104 #ifdef FRAME_CHAIN_VALID
2106 fprintf_unfiltered (file
,
2107 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2108 (long) current_gdbarch
->frame_chain_valid
2109 /*FRAME_CHAIN_VALID ()*/);
2111 #ifdef FRAME_SAVED_PC
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2115 (long) current_gdbarch
->frame_saved_pc
2116 /*FRAME_SAVED_PC ()*/);
2118 #ifdef FRAME_ARGS_ADDRESS
2120 fprintf_unfiltered (file
,
2121 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2122 (long) current_gdbarch
->frame_args_address
2123 /*FRAME_ARGS_ADDRESS ()*/);
2125 #ifdef FRAME_LOCALS_ADDRESS
2127 fprintf_unfiltered (file
,
2128 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2129 (long) current_gdbarch
->frame_locals_address
2130 /*FRAME_LOCALS_ADDRESS ()*/);
2132 #ifdef SAVED_PC_AFTER_CALL
2134 fprintf_unfiltered (file
,
2135 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2136 (long) current_gdbarch
->saved_pc_after_call
2137 /*SAVED_PC_AFTER_CALL ()*/);
2139 #ifdef FRAME_NUM_ARGS
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2143 (long) current_gdbarch
->frame_num_args
2144 /*FRAME_NUM_ARGS ()*/);
2148 fprintf_unfiltered (file
,
2149 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2150 (long) current_gdbarch
->stack_align
2151 /*STACK_ALIGN ()*/);
2153 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2156 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2158 #ifdef REG_STRUCT_HAS_ADDR
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2162 (long) current_gdbarch
->reg_struct_has_addr
2163 /*REG_STRUCT_HAS_ADDR ()*/);
2165 #ifdef SAVE_DUMMY_FRAME_TOS
2167 fprintf_unfiltered (file
,
2168 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2169 (long) current_gdbarch
->save_dummy_frame_tos
2170 /*SAVE_DUMMY_FRAME_TOS ()*/);
2172 #ifdef PARM_BOUNDARY
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2175 (long) PARM_BOUNDARY
);
2177 #ifdef TARGET_FLOAT_FORMAT
2178 fprintf_unfiltered (file
,
2179 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2180 (long) TARGET_FLOAT_FORMAT
);
2182 #ifdef TARGET_DOUBLE_FORMAT
2183 fprintf_unfiltered (file
,
2184 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2185 (long) TARGET_DOUBLE_FORMAT
);
2187 #ifdef TARGET_LONG_DOUBLE_FORMAT
2188 fprintf_unfiltered (file
,
2189 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2190 (long) TARGET_LONG_DOUBLE_FORMAT
);
2192 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2194 fprintf_unfiltered (file
,
2195 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2196 (long) current_gdbarch
->convert_from_func_ptr_addr
2197 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2199 #ifdef ADDR_BITS_REMOVE
2201 fprintf_unfiltered (file
,
2202 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
2203 (long) current_gdbarch
->addr_bits_remove
2204 /*ADDR_BITS_REMOVE ()*/);
2206 #ifdef SOFTWARE_SINGLE_STEP
2208 fprintf_unfiltered (file
,
2209 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2210 (long) current_gdbarch
->software_single_step
2211 /*SOFTWARE_SINGLE_STEP ()*/);
2213 #ifdef SKIP_TRAMPOLINE_CODE
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
2217 (long) current_gdbarch
->skip_trampoline_code
2218 /*SKIP_TRAMPOLINE_CODE ()*/);
2220 if (current_gdbarch
->dump_tdep
!= NULL
)
2221 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2224 struct gdbarch_tdep
*
2225 gdbarch_tdep (struct gdbarch
*gdbarch
)
2227 if (gdbarch_debug
>= 2)
2228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2229 return gdbarch
->tdep
;
2233 const struct bfd_arch_info
*
2234 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2236 if (gdbarch_debug
>= 2)
2237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2238 return gdbarch
->bfd_arch_info
;
2242 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2244 if (gdbarch_debug
>= 2)
2245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2246 return gdbarch
->byte_order
;
2250 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2252 /* Skip verify of short_bit, invalid_p == 0 */
2253 if (gdbarch_debug
>= 2)
2254 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2255 return gdbarch
->short_bit
;
2259 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2262 gdbarch
->short_bit
= short_bit
;
2266 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2268 /* Skip verify of int_bit, invalid_p == 0 */
2269 if (gdbarch_debug
>= 2)
2270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2271 return gdbarch
->int_bit
;
2275 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2278 gdbarch
->int_bit
= int_bit
;
2282 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2284 /* Skip verify of long_bit, invalid_p == 0 */
2285 if (gdbarch_debug
>= 2)
2286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2287 return gdbarch
->long_bit
;
2291 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2294 gdbarch
->long_bit
= long_bit
;
2298 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2300 /* Skip verify of long_long_bit, invalid_p == 0 */
2301 if (gdbarch_debug
>= 2)
2302 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2303 return gdbarch
->long_long_bit
;
2307 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2310 gdbarch
->long_long_bit
= long_long_bit
;
2314 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2316 /* Skip verify of float_bit, invalid_p == 0 */
2317 if (gdbarch_debug
>= 2)
2318 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2319 return gdbarch
->float_bit
;
2323 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2326 gdbarch
->float_bit
= float_bit
;
2330 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2332 /* Skip verify of double_bit, invalid_p == 0 */
2333 if (gdbarch_debug
>= 2)
2334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2335 return gdbarch
->double_bit
;
2339 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2342 gdbarch
->double_bit
= double_bit
;
2346 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2348 /* Skip verify of long_double_bit, invalid_p == 0 */
2349 if (gdbarch_debug
>= 2)
2350 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2351 return gdbarch
->long_double_bit
;
2355 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2356 int long_double_bit
)
2358 gdbarch
->long_double_bit
= long_double_bit
;
2362 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2364 /* Skip verify of ptr_bit, invalid_p == 0 */
2365 if (gdbarch_debug
>= 2)
2366 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2367 return gdbarch
->ptr_bit
;
2371 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2374 gdbarch
->ptr_bit
= ptr_bit
;
2378 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2380 if (gdbarch
->addr_bit
== 0)
2381 internal_error (__FILE__
, __LINE__
,
2382 "gdbarch: gdbarch_addr_bit invalid");
2383 if (gdbarch_debug
>= 2)
2384 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2385 return gdbarch
->addr_bit
;
2389 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2392 gdbarch
->addr_bit
= addr_bit
;
2396 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2398 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2399 if (gdbarch_debug
>= 2)
2400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2401 return gdbarch
->bfd_vma_bit
;
2405 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2408 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2412 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2414 /* Skip verify of ieee_float, invalid_p == 0 */
2415 if (gdbarch_debug
>= 2)
2416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2417 return gdbarch
->ieee_float
;
2421 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2424 gdbarch
->ieee_float
= ieee_float
;
2428 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2430 if (gdbarch
->read_pc
== 0)
2431 internal_error (__FILE__
, __LINE__
,
2432 "gdbarch: gdbarch_read_pc invalid");
2433 if (gdbarch_debug
>= 2)
2434 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2435 return gdbarch
->read_pc (ptid
);
2439 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2440 gdbarch_read_pc_ftype read_pc
)
2442 gdbarch
->read_pc
= read_pc
;
2446 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2448 if (gdbarch
->write_pc
== 0)
2449 internal_error (__FILE__
, __LINE__
,
2450 "gdbarch: gdbarch_write_pc invalid");
2451 if (gdbarch_debug
>= 2)
2452 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2453 gdbarch
->write_pc (val
, ptid
);
2457 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2458 gdbarch_write_pc_ftype write_pc
)
2460 gdbarch
->write_pc
= write_pc
;
2464 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2466 if (gdbarch
->read_fp
== 0)
2467 internal_error (__FILE__
, __LINE__
,
2468 "gdbarch: gdbarch_read_fp invalid");
2469 if (gdbarch_debug
>= 2)
2470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2471 return gdbarch
->read_fp ();
2475 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2476 gdbarch_read_fp_ftype read_fp
)
2478 gdbarch
->read_fp
= read_fp
;
2482 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2484 if (gdbarch
->write_fp
== 0)
2485 internal_error (__FILE__
, __LINE__
,
2486 "gdbarch: gdbarch_write_fp invalid");
2487 if (gdbarch_debug
>= 2)
2488 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2489 gdbarch
->write_fp (val
);
2493 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2494 gdbarch_write_fp_ftype write_fp
)
2496 gdbarch
->write_fp
= write_fp
;
2500 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2502 if (gdbarch
->read_sp
== 0)
2503 internal_error (__FILE__
, __LINE__
,
2504 "gdbarch: gdbarch_read_sp invalid");
2505 if (gdbarch_debug
>= 2)
2506 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2507 return gdbarch
->read_sp ();
2511 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2512 gdbarch_read_sp_ftype read_sp
)
2514 gdbarch
->read_sp
= read_sp
;
2518 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2520 if (gdbarch
->write_sp
== 0)
2521 internal_error (__FILE__
, __LINE__
,
2522 "gdbarch: gdbarch_write_sp invalid");
2523 if (gdbarch_debug
>= 2)
2524 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2525 gdbarch
->write_sp (val
);
2529 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2530 gdbarch_write_sp_ftype write_sp
)
2532 gdbarch
->write_sp
= write_sp
;
2536 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2538 if (gdbarch
->virtual_frame_pointer
== 0)
2539 internal_error (__FILE__
, __LINE__
,
2540 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2541 if (gdbarch_debug
>= 2)
2542 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2543 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2547 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2548 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2550 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2554 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2556 return gdbarch
->register_read
!= 0;
2560 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2562 if (gdbarch
->register_read
== 0)
2563 internal_error (__FILE__
, __LINE__
,
2564 "gdbarch: gdbarch_register_read invalid");
2565 if (gdbarch_debug
>= 2)
2566 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2567 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2571 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2572 gdbarch_register_read_ftype register_read
)
2574 gdbarch
->register_read
= register_read
;
2578 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2580 return gdbarch
->register_write
!= 0;
2584 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2586 if (gdbarch
->register_write
== 0)
2587 internal_error (__FILE__
, __LINE__
,
2588 "gdbarch: gdbarch_register_write invalid");
2589 if (gdbarch_debug
>= 2)
2590 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2591 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2595 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2596 gdbarch_register_write_ftype register_write
)
2598 gdbarch
->register_write
= register_write
;
2602 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2604 if (gdbarch
->num_regs
== -1)
2605 internal_error (__FILE__
, __LINE__
,
2606 "gdbarch: gdbarch_num_regs invalid");
2607 if (gdbarch_debug
>= 2)
2608 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2609 return gdbarch
->num_regs
;
2613 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2616 gdbarch
->num_regs
= num_regs
;
2620 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2622 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2623 if (gdbarch_debug
>= 2)
2624 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2625 return gdbarch
->num_pseudo_regs
;
2629 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2630 int num_pseudo_regs
)
2632 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2636 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2638 if (gdbarch
->sp_regnum
== -1)
2639 internal_error (__FILE__
, __LINE__
,
2640 "gdbarch: gdbarch_sp_regnum invalid");
2641 if (gdbarch_debug
>= 2)
2642 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2643 return gdbarch
->sp_regnum
;
2647 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2650 gdbarch
->sp_regnum
= sp_regnum
;
2654 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2656 if (gdbarch
->fp_regnum
== -1)
2657 internal_error (__FILE__
, __LINE__
,
2658 "gdbarch: gdbarch_fp_regnum invalid");
2659 if (gdbarch_debug
>= 2)
2660 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2661 return gdbarch
->fp_regnum
;
2665 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2668 gdbarch
->fp_regnum
= fp_regnum
;
2672 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2674 if (gdbarch
->pc_regnum
== -1)
2675 internal_error (__FILE__
, __LINE__
,
2676 "gdbarch: gdbarch_pc_regnum invalid");
2677 if (gdbarch_debug
>= 2)
2678 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2679 return gdbarch
->pc_regnum
;
2683 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2686 gdbarch
->pc_regnum
= pc_regnum
;
2690 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2692 /* Skip verify of fp0_regnum, invalid_p == 0 */
2693 if (gdbarch_debug
>= 2)
2694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2695 return gdbarch
->fp0_regnum
;
2699 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2702 gdbarch
->fp0_regnum
= fp0_regnum
;
2706 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2708 /* Skip verify of npc_regnum, invalid_p == 0 */
2709 if (gdbarch_debug
>= 2)
2710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2711 return gdbarch
->npc_regnum
;
2715 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2718 gdbarch
->npc_regnum
= npc_regnum
;
2722 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2724 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2725 if (gdbarch_debug
>= 2)
2726 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2727 return gdbarch
->nnpc_regnum
;
2731 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2734 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2738 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2740 if (gdbarch
->stab_reg_to_regnum
== 0)
2741 internal_error (__FILE__
, __LINE__
,
2742 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2743 if (gdbarch_debug
>= 2)
2744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2745 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2749 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2750 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2752 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2756 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2758 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2759 internal_error (__FILE__
, __LINE__
,
2760 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2761 if (gdbarch_debug
>= 2)
2762 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2763 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2767 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2768 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2770 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2774 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2776 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2777 internal_error (__FILE__
, __LINE__
,
2778 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2779 if (gdbarch_debug
>= 2)
2780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2781 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2785 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2786 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2788 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2792 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2794 if (gdbarch
->sdb_reg_to_regnum
== 0)
2795 internal_error (__FILE__
, __LINE__
,
2796 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2797 if (gdbarch_debug
>= 2)
2798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2799 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2803 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2804 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2806 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2810 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2812 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2813 internal_error (__FILE__
, __LINE__
,
2814 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2815 if (gdbarch_debug
>= 2)
2816 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2817 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2821 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2822 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2824 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2828 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2830 if (gdbarch
->register_name
== 0)
2831 internal_error (__FILE__
, __LINE__
,
2832 "gdbarch: gdbarch_register_name invalid");
2833 if (gdbarch_debug
>= 2)
2834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2835 return gdbarch
->register_name (regnr
);
2839 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2840 gdbarch_register_name_ftype register_name
)
2842 gdbarch
->register_name
= register_name
;
2846 gdbarch_register_size (struct gdbarch
*gdbarch
)
2848 if (gdbarch
->register_size
== -1)
2849 internal_error (__FILE__
, __LINE__
,
2850 "gdbarch: gdbarch_register_size invalid");
2851 if (gdbarch_debug
>= 2)
2852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2853 return gdbarch
->register_size
;
2857 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2860 gdbarch
->register_size
= register_size
;
2864 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2866 if (gdbarch
->register_bytes
== -1)
2867 internal_error (__FILE__
, __LINE__
,
2868 "gdbarch: gdbarch_register_bytes invalid");
2869 if (gdbarch_debug
>= 2)
2870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2871 return gdbarch
->register_bytes
;
2875 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2878 gdbarch
->register_bytes
= register_bytes
;
2882 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2884 if (gdbarch
->register_byte
== 0)
2885 internal_error (__FILE__
, __LINE__
,
2886 "gdbarch: gdbarch_register_byte invalid");
2887 if (gdbarch_debug
>= 2)
2888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2889 return gdbarch
->register_byte (reg_nr
);
2893 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2894 gdbarch_register_byte_ftype register_byte
)
2896 gdbarch
->register_byte
= register_byte
;
2900 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2902 if (gdbarch
->register_raw_size
== 0)
2903 internal_error (__FILE__
, __LINE__
,
2904 "gdbarch: gdbarch_register_raw_size invalid");
2905 if (gdbarch_debug
>= 2)
2906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2907 return gdbarch
->register_raw_size (reg_nr
);
2911 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2912 gdbarch_register_raw_size_ftype register_raw_size
)
2914 gdbarch
->register_raw_size
= register_raw_size
;
2918 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2920 if (gdbarch
->max_register_raw_size
== -1)
2921 internal_error (__FILE__
, __LINE__
,
2922 "gdbarch: gdbarch_max_register_raw_size invalid");
2923 if (gdbarch_debug
>= 2)
2924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2925 return gdbarch
->max_register_raw_size
;
2929 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2930 int max_register_raw_size
)
2932 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2936 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2938 if (gdbarch
->register_virtual_size
== 0)
2939 internal_error (__FILE__
, __LINE__
,
2940 "gdbarch: gdbarch_register_virtual_size invalid");
2941 if (gdbarch_debug
>= 2)
2942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2943 return gdbarch
->register_virtual_size (reg_nr
);
2947 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2948 gdbarch_register_virtual_size_ftype register_virtual_size
)
2950 gdbarch
->register_virtual_size
= register_virtual_size
;
2954 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2956 if (gdbarch
->max_register_virtual_size
== -1)
2957 internal_error (__FILE__
, __LINE__
,
2958 "gdbarch: gdbarch_max_register_virtual_size invalid");
2959 if (gdbarch_debug
>= 2)
2960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2961 return gdbarch
->max_register_virtual_size
;
2965 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2966 int max_register_virtual_size
)
2968 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2972 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2974 if (gdbarch
->register_virtual_type
== 0)
2975 internal_error (__FILE__
, __LINE__
,
2976 "gdbarch: gdbarch_register_virtual_type invalid");
2977 if (gdbarch_debug
>= 2)
2978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2979 return gdbarch
->register_virtual_type (reg_nr
);
2983 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2984 gdbarch_register_virtual_type_ftype register_virtual_type
)
2986 gdbarch
->register_virtual_type
= register_virtual_type
;
2990 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2992 if (gdbarch
->do_registers_info
== 0)
2993 internal_error (__FILE__
, __LINE__
,
2994 "gdbarch: gdbarch_do_registers_info invalid");
2995 if (gdbarch_debug
>= 2)
2996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2997 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3001 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3002 gdbarch_do_registers_info_ftype do_registers_info
)
3004 gdbarch
->do_registers_info
= do_registers_info
;
3008 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3010 if (gdbarch
->register_sim_regno
== 0)
3011 internal_error (__FILE__
, __LINE__
,
3012 "gdbarch: gdbarch_register_sim_regno invalid");
3013 if (gdbarch_debug
>= 2)
3014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3015 return gdbarch
->register_sim_regno (reg_nr
);
3019 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3020 gdbarch_register_sim_regno_ftype register_sim_regno
)
3022 gdbarch
->register_sim_regno
= register_sim_regno
;
3026 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3028 return gdbarch
->register_bytes_ok
!= 0;
3032 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3034 if (gdbarch
->register_bytes_ok
== 0)
3035 internal_error (__FILE__
, __LINE__
,
3036 "gdbarch: gdbarch_register_bytes_ok invalid");
3037 if (gdbarch_debug
>= 2)
3038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3039 return gdbarch
->register_bytes_ok (nr_bytes
);
3043 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3044 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3046 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3050 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
3052 if (gdbarch
->cannot_fetch_register
== 0)
3053 internal_error (__FILE__
, __LINE__
,
3054 "gdbarch: gdbarch_cannot_fetch_register invalid");
3055 if (gdbarch_debug
>= 2)
3056 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3057 return gdbarch
->cannot_fetch_register (regnum
);
3061 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3062 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3064 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3068 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3070 if (gdbarch
->cannot_store_register
== 0)
3071 internal_error (__FILE__
, __LINE__
,
3072 "gdbarch: gdbarch_cannot_store_register invalid");
3073 if (gdbarch_debug
>= 2)
3074 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3075 return gdbarch
->cannot_store_register (regnum
);
3079 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3080 gdbarch_cannot_store_register_ftype cannot_store_register
)
3082 gdbarch
->cannot_store_register
= cannot_store_register
;
3086 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3088 if (gdbarch
->use_generic_dummy_frames
== -1)
3089 internal_error (__FILE__
, __LINE__
,
3090 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3091 if (gdbarch_debug
>= 2)
3092 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3093 return gdbarch
->use_generic_dummy_frames
;
3097 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3098 int use_generic_dummy_frames
)
3100 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3104 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3106 if (gdbarch
->call_dummy_location
== 0)
3107 internal_error (__FILE__
, __LINE__
,
3108 "gdbarch: gdbarch_call_dummy_location invalid");
3109 if (gdbarch_debug
>= 2)
3110 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3111 return gdbarch
->call_dummy_location
;
3115 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3116 int call_dummy_location
)
3118 gdbarch
->call_dummy_location
= call_dummy_location
;
3122 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3124 if (gdbarch
->call_dummy_address
== 0)
3125 internal_error (__FILE__
, __LINE__
,
3126 "gdbarch: gdbarch_call_dummy_address invalid");
3127 if (gdbarch_debug
>= 2)
3128 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3129 return gdbarch
->call_dummy_address ();
3133 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3134 gdbarch_call_dummy_address_ftype call_dummy_address
)
3136 gdbarch
->call_dummy_address
= call_dummy_address
;
3140 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3142 if (gdbarch
->call_dummy_start_offset
== -1)
3143 internal_error (__FILE__
, __LINE__
,
3144 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3145 if (gdbarch_debug
>= 2)
3146 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3147 return gdbarch
->call_dummy_start_offset
;
3151 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3152 CORE_ADDR call_dummy_start_offset
)
3154 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3158 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3160 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3161 internal_error (__FILE__
, __LINE__
,
3162 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3163 if (gdbarch_debug
>= 2)
3164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3165 return gdbarch
->call_dummy_breakpoint_offset
;
3169 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3170 CORE_ADDR call_dummy_breakpoint_offset
)
3172 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3176 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3178 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3179 internal_error (__FILE__
, __LINE__
,
3180 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3181 if (gdbarch_debug
>= 2)
3182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3183 return gdbarch
->call_dummy_breakpoint_offset_p
;
3187 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3188 int call_dummy_breakpoint_offset_p
)
3190 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3194 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3196 if (gdbarch
->call_dummy_length
== -1)
3197 internal_error (__FILE__
, __LINE__
,
3198 "gdbarch: gdbarch_call_dummy_length invalid");
3199 if (gdbarch_debug
>= 2)
3200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3201 return gdbarch
->call_dummy_length
;
3205 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3206 int call_dummy_length
)
3208 gdbarch
->call_dummy_length
= call_dummy_length
;
3212 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3214 if (gdbarch
->pc_in_call_dummy
== 0)
3215 internal_error (__FILE__
, __LINE__
,
3216 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3217 if (gdbarch_debug
>= 2)
3218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3219 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3223 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3224 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3226 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3230 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3232 if (gdbarch
->call_dummy_p
== -1)
3233 internal_error (__FILE__
, __LINE__
,
3234 "gdbarch: gdbarch_call_dummy_p invalid");
3235 if (gdbarch_debug
>= 2)
3236 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3237 return gdbarch
->call_dummy_p
;
3241 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3244 gdbarch
->call_dummy_p
= call_dummy_p
;
3248 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3250 /* Skip verify of call_dummy_words, invalid_p == 0 */
3251 if (gdbarch_debug
>= 2)
3252 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3253 return gdbarch
->call_dummy_words
;
3257 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3258 LONGEST
* call_dummy_words
)
3260 gdbarch
->call_dummy_words
= call_dummy_words
;
3264 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3266 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3267 if (gdbarch_debug
>= 2)
3268 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3269 return gdbarch
->sizeof_call_dummy_words
;
3273 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3274 int sizeof_call_dummy_words
)
3276 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3280 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3282 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3283 internal_error (__FILE__
, __LINE__
,
3284 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3285 if (gdbarch_debug
>= 2)
3286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3287 return gdbarch
->call_dummy_stack_adjust_p
;
3291 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3292 int call_dummy_stack_adjust_p
)
3294 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3298 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3300 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3301 internal_error (__FILE__
, __LINE__
,
3302 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3303 if (gdbarch_debug
>= 2)
3304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3305 return gdbarch
->call_dummy_stack_adjust
;
3309 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3310 int call_dummy_stack_adjust
)
3312 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3316 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
)
3318 if (gdbarch
->fix_call_dummy
== 0)
3319 internal_error (__FILE__
, __LINE__
,
3320 "gdbarch: gdbarch_fix_call_dummy invalid");
3321 if (gdbarch_debug
>= 2)
3322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3323 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3327 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3328 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3330 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3334 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3336 if (gdbarch
->init_frame_pc_first
== 0)
3337 internal_error (__FILE__
, __LINE__
,
3338 "gdbarch: gdbarch_init_frame_pc_first invalid");
3339 if (gdbarch_debug
>= 2)
3340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3341 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3345 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3346 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3348 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3352 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3354 if (gdbarch
->init_frame_pc
== 0)
3355 internal_error (__FILE__
, __LINE__
,
3356 "gdbarch: gdbarch_init_frame_pc invalid");
3357 if (gdbarch_debug
>= 2)
3358 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3359 gdbarch
->init_frame_pc (fromleaf
, prev
);
3363 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3364 gdbarch_init_frame_pc_ftype init_frame_pc
)
3366 gdbarch
->init_frame_pc
= init_frame_pc
;
3370 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3372 if (gdbarch_debug
>= 2)
3373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3374 return gdbarch
->believe_pcc_promotion
;
3378 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3379 int believe_pcc_promotion
)
3381 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3385 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3387 if (gdbarch_debug
>= 2)
3388 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3389 return gdbarch
->believe_pcc_promotion_type
;
3393 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3394 int believe_pcc_promotion_type
)
3396 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3400 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3402 if (gdbarch
->coerce_float_to_double
== 0)
3403 internal_error (__FILE__
, __LINE__
,
3404 "gdbarch: gdbarch_coerce_float_to_double invalid");
3405 if (gdbarch_debug
>= 2)
3406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3407 return gdbarch
->coerce_float_to_double (formal
, actual
);
3411 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3412 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3414 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3418 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
)
3420 if (gdbarch
->get_saved_register
== 0)
3421 internal_error (__FILE__
, __LINE__
,
3422 "gdbarch: gdbarch_get_saved_register invalid");
3423 if (gdbarch_debug
>= 2)
3424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3425 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3429 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3430 gdbarch_get_saved_register_ftype get_saved_register
)
3432 gdbarch
->get_saved_register
= get_saved_register
;
3436 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3438 if (gdbarch
->register_convertible
== 0)
3439 internal_error (__FILE__
, __LINE__
,
3440 "gdbarch: gdbarch_register_convertible invalid");
3441 if (gdbarch_debug
>= 2)
3442 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3443 return gdbarch
->register_convertible (nr
);
3447 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3448 gdbarch_register_convertible_ftype register_convertible
)
3450 gdbarch
->register_convertible
= register_convertible
;
3454 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3456 if (gdbarch
->register_convert_to_virtual
== 0)
3457 internal_error (__FILE__
, __LINE__
,
3458 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3459 if (gdbarch_debug
>= 2)
3460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3461 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3465 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3466 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3468 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3472 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3474 if (gdbarch
->register_convert_to_raw
== 0)
3475 internal_error (__FILE__
, __LINE__
,
3476 "gdbarch: gdbarch_register_convert_to_raw invalid");
3477 if (gdbarch_debug
>= 2)
3478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3479 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3483 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3484 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3486 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3490 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3492 if (gdbarch
->fetch_pseudo_register
== 0)
3493 internal_error (__FILE__
, __LINE__
,
3494 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3495 if (gdbarch_debug
>= 2)
3496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3497 gdbarch
->fetch_pseudo_register (regnum
);
3501 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3502 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3504 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3508 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3510 if (gdbarch
->store_pseudo_register
== 0)
3511 internal_error (__FILE__
, __LINE__
,
3512 "gdbarch: gdbarch_store_pseudo_register invalid");
3513 if (gdbarch_debug
>= 2)
3514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3515 gdbarch
->store_pseudo_register (regnum
);
3519 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3520 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3522 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3526 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3528 if (gdbarch
->pointer_to_address
== 0)
3529 internal_error (__FILE__
, __LINE__
,
3530 "gdbarch: gdbarch_pointer_to_address invalid");
3531 if (gdbarch_debug
>= 2)
3532 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3533 return gdbarch
->pointer_to_address (type
, buf
);
3537 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3538 gdbarch_pointer_to_address_ftype pointer_to_address
)
3540 gdbarch
->pointer_to_address
= pointer_to_address
;
3544 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3546 if (gdbarch
->address_to_pointer
== 0)
3547 internal_error (__FILE__
, __LINE__
,
3548 "gdbarch: gdbarch_address_to_pointer invalid");
3549 if (gdbarch_debug
>= 2)
3550 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3551 gdbarch
->address_to_pointer (type
, buf
, addr
);
3555 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3556 gdbarch_address_to_pointer_ftype address_to_pointer
)
3558 gdbarch
->address_to_pointer
= address_to_pointer
;
3562 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3564 if (gdbarch
->return_value_on_stack
== 0)
3565 internal_error (__FILE__
, __LINE__
,
3566 "gdbarch: gdbarch_return_value_on_stack invalid");
3567 if (gdbarch_debug
>= 2)
3568 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3569 return gdbarch
->return_value_on_stack (type
);
3573 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3574 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3576 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3580 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3582 if (gdbarch
->extract_return_value
== 0)
3583 internal_error (__FILE__
, __LINE__
,
3584 "gdbarch: gdbarch_extract_return_value invalid");
3585 if (gdbarch_debug
>= 2)
3586 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3587 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3591 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3592 gdbarch_extract_return_value_ftype extract_return_value
)
3594 gdbarch
->extract_return_value
= extract_return_value
;
3598 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3600 if (gdbarch
->push_arguments
== 0)
3601 internal_error (__FILE__
, __LINE__
,
3602 "gdbarch: gdbarch_push_arguments invalid");
3603 if (gdbarch_debug
>= 2)
3604 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3605 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3609 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3610 gdbarch_push_arguments_ftype push_arguments
)
3612 gdbarch
->push_arguments
= push_arguments
;
3616 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3618 if (gdbarch
->push_dummy_frame
== 0)
3619 internal_error (__FILE__
, __LINE__
,
3620 "gdbarch: gdbarch_push_dummy_frame invalid");
3621 if (gdbarch_debug
>= 2)
3622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3623 gdbarch
->push_dummy_frame ();
3627 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3628 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3630 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3634 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3636 if (gdbarch
->push_return_address
== 0)
3637 internal_error (__FILE__
, __LINE__
,
3638 "gdbarch: gdbarch_push_return_address invalid");
3639 if (gdbarch_debug
>= 2)
3640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3641 return gdbarch
->push_return_address (pc
, sp
);
3645 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3646 gdbarch_push_return_address_ftype push_return_address
)
3648 gdbarch
->push_return_address
= push_return_address
;
3652 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3654 if (gdbarch
->pop_frame
== 0)
3655 internal_error (__FILE__
, __LINE__
,
3656 "gdbarch: gdbarch_pop_frame invalid");
3657 if (gdbarch_debug
>= 2)
3658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3659 gdbarch
->pop_frame ();
3663 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3664 gdbarch_pop_frame_ftype pop_frame
)
3666 gdbarch
->pop_frame
= pop_frame
;
3670 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3672 if (gdbarch
->store_struct_return
== 0)
3673 internal_error (__FILE__
, __LINE__
,
3674 "gdbarch: gdbarch_store_struct_return invalid");
3675 if (gdbarch_debug
>= 2)
3676 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3677 gdbarch
->store_struct_return (addr
, sp
);
3681 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3682 gdbarch_store_struct_return_ftype store_struct_return
)
3684 gdbarch
->store_struct_return
= store_struct_return
;
3688 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3690 if (gdbarch
->store_return_value
== 0)
3691 internal_error (__FILE__
, __LINE__
,
3692 "gdbarch: gdbarch_store_return_value invalid");
3693 if (gdbarch_debug
>= 2)
3694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3695 gdbarch
->store_return_value (type
, valbuf
);
3699 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3700 gdbarch_store_return_value_ftype store_return_value
)
3702 gdbarch
->store_return_value
= store_return_value
;
3706 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3708 return gdbarch
->extract_struct_value_address
!= 0;
3712 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3714 if (gdbarch
->extract_struct_value_address
== 0)
3715 internal_error (__FILE__
, __LINE__
,
3716 "gdbarch: gdbarch_extract_struct_value_address invalid");
3717 if (gdbarch_debug
>= 2)
3718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3719 return gdbarch
->extract_struct_value_address (regbuf
);
3723 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3724 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3726 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3730 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3732 if (gdbarch
->use_struct_convention
== 0)
3733 internal_error (__FILE__
, __LINE__
,
3734 "gdbarch: gdbarch_use_struct_convention invalid");
3735 if (gdbarch_debug
>= 2)
3736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3737 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3741 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3742 gdbarch_use_struct_convention_ftype use_struct_convention
)
3744 gdbarch
->use_struct_convention
= use_struct_convention
;
3748 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3750 if (gdbarch
->frame_init_saved_regs
== 0)
3751 internal_error (__FILE__
, __LINE__
,
3752 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3753 if (gdbarch_debug
>= 2)
3754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3755 gdbarch
->frame_init_saved_regs (frame
);
3759 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3760 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3762 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3766 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3768 if (gdbarch
->init_extra_frame_info
== 0)
3769 internal_error (__FILE__
, __LINE__
,
3770 "gdbarch: gdbarch_init_extra_frame_info invalid");
3771 if (gdbarch_debug
>= 2)
3772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3773 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3777 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3778 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3780 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3784 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3786 if (gdbarch
->skip_prologue
== 0)
3787 internal_error (__FILE__
, __LINE__
,
3788 "gdbarch: gdbarch_skip_prologue invalid");
3789 if (gdbarch_debug
>= 2)
3790 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3791 return gdbarch
->skip_prologue (ip
);
3795 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3796 gdbarch_skip_prologue_ftype skip_prologue
)
3798 gdbarch
->skip_prologue
= skip_prologue
;
3802 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3804 if (gdbarch
->prologue_frameless_p
== 0)
3805 internal_error (__FILE__
, __LINE__
,
3806 "gdbarch: gdbarch_prologue_frameless_p invalid");
3807 if (gdbarch_debug
>= 2)
3808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3809 return gdbarch
->prologue_frameless_p (ip
);
3813 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3814 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3816 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3820 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3822 if (gdbarch
->inner_than
== 0)
3823 internal_error (__FILE__
, __LINE__
,
3824 "gdbarch: gdbarch_inner_than invalid");
3825 if (gdbarch_debug
>= 2)
3826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3827 return gdbarch
->inner_than (lhs
, rhs
);
3831 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3832 gdbarch_inner_than_ftype inner_than
)
3834 gdbarch
->inner_than
= inner_than
;
3838 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3840 if (gdbarch
->breakpoint_from_pc
== 0)
3841 internal_error (__FILE__
, __LINE__
,
3842 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3845 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3849 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3850 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3852 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3856 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3858 if (gdbarch
->memory_insert_breakpoint
== 0)
3859 internal_error (__FILE__
, __LINE__
,
3860 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3861 if (gdbarch_debug
>= 2)
3862 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3863 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3867 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3868 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3870 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3874 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3876 if (gdbarch
->memory_remove_breakpoint
== 0)
3877 internal_error (__FILE__
, __LINE__
,
3878 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3879 if (gdbarch_debug
>= 2)
3880 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3881 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3885 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3886 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3888 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3892 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3894 if (gdbarch
->decr_pc_after_break
== -1)
3895 internal_error (__FILE__
, __LINE__
,
3896 "gdbarch: gdbarch_decr_pc_after_break invalid");
3897 if (gdbarch_debug
>= 2)
3898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3899 return gdbarch
->decr_pc_after_break
;
3903 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3904 CORE_ADDR decr_pc_after_break
)
3906 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3910 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3912 if (gdbarch
->prepare_to_proceed
== 0)
3913 internal_error (__FILE__
, __LINE__
,
3914 "gdbarch: gdbarch_prepare_to_proceed invalid");
3915 if (gdbarch_debug
>= 2)
3916 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3917 return gdbarch
->prepare_to_proceed (select_it
);
3921 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3922 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3924 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3928 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3930 if (gdbarch
->function_start_offset
== -1)
3931 internal_error (__FILE__
, __LINE__
,
3932 "gdbarch: gdbarch_function_start_offset invalid");
3933 if (gdbarch_debug
>= 2)
3934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3935 return gdbarch
->function_start_offset
;
3939 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3940 CORE_ADDR function_start_offset
)
3942 gdbarch
->function_start_offset
= function_start_offset
;
3946 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3948 if (gdbarch
->remote_translate_xfer_address
== 0)
3949 internal_error (__FILE__
, __LINE__
,
3950 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3951 if (gdbarch_debug
>= 2)
3952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3953 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3957 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3958 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3960 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3964 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3966 if (gdbarch
->frame_args_skip
== -1)
3967 internal_error (__FILE__
, __LINE__
,
3968 "gdbarch: gdbarch_frame_args_skip invalid");
3969 if (gdbarch_debug
>= 2)
3970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3971 return gdbarch
->frame_args_skip
;
3975 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3976 CORE_ADDR frame_args_skip
)
3978 gdbarch
->frame_args_skip
= frame_args_skip
;
3982 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3984 if (gdbarch
->frameless_function_invocation
== 0)
3985 internal_error (__FILE__
, __LINE__
,
3986 "gdbarch: gdbarch_frameless_function_invocation invalid");
3987 if (gdbarch_debug
>= 2)
3988 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3989 return gdbarch
->frameless_function_invocation (fi
);
3993 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3994 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3996 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4000 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4002 if (gdbarch
->frame_chain
== 0)
4003 internal_error (__FILE__
, __LINE__
,
4004 "gdbarch: gdbarch_frame_chain invalid");
4005 if (gdbarch_debug
>= 2)
4006 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4007 return gdbarch
->frame_chain (frame
);
4011 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4012 gdbarch_frame_chain_ftype frame_chain
)
4014 gdbarch
->frame_chain
= frame_chain
;
4018 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4020 if (gdbarch
->frame_chain_valid
== 0)
4021 internal_error (__FILE__
, __LINE__
,
4022 "gdbarch: gdbarch_frame_chain_valid invalid");
4023 if (gdbarch_debug
>= 2)
4024 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4025 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4029 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4030 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4032 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4036 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4038 if (gdbarch
->frame_saved_pc
== 0)
4039 internal_error (__FILE__
, __LINE__
,
4040 "gdbarch: gdbarch_frame_saved_pc invalid");
4041 if (gdbarch_debug
>= 2)
4042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4043 return gdbarch
->frame_saved_pc (fi
);
4047 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4048 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4050 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4054 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4056 if (gdbarch
->frame_args_address
== 0)
4057 internal_error (__FILE__
, __LINE__
,
4058 "gdbarch: gdbarch_frame_args_address invalid");
4059 if (gdbarch_debug
>= 2)
4060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4061 return gdbarch
->frame_args_address (fi
);
4065 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4066 gdbarch_frame_args_address_ftype frame_args_address
)
4068 gdbarch
->frame_args_address
= frame_args_address
;
4072 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4074 if (gdbarch
->frame_locals_address
== 0)
4075 internal_error (__FILE__
, __LINE__
,
4076 "gdbarch: gdbarch_frame_locals_address invalid");
4077 if (gdbarch_debug
>= 2)
4078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4079 return gdbarch
->frame_locals_address (fi
);
4083 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4084 gdbarch_frame_locals_address_ftype frame_locals_address
)
4086 gdbarch
->frame_locals_address
= frame_locals_address
;
4090 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4092 if (gdbarch
->saved_pc_after_call
== 0)
4093 internal_error (__FILE__
, __LINE__
,
4094 "gdbarch: gdbarch_saved_pc_after_call invalid");
4095 if (gdbarch_debug
>= 2)
4096 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4097 return gdbarch
->saved_pc_after_call (frame
);
4101 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4102 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4104 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4108 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4110 if (gdbarch
->frame_num_args
== 0)
4111 internal_error (__FILE__
, __LINE__
,
4112 "gdbarch: gdbarch_frame_num_args invalid");
4113 if (gdbarch_debug
>= 2)
4114 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4115 return gdbarch
->frame_num_args (frame
);
4119 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4120 gdbarch_frame_num_args_ftype frame_num_args
)
4122 gdbarch
->frame_num_args
= frame_num_args
;
4126 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4128 return gdbarch
->stack_align
!= 0;
4132 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4134 if (gdbarch
->stack_align
== 0)
4135 internal_error (__FILE__
, __LINE__
,
4136 "gdbarch: gdbarch_stack_align invalid");
4137 if (gdbarch_debug
>= 2)
4138 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4139 return gdbarch
->stack_align (sp
);
4143 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4144 gdbarch_stack_align_ftype stack_align
)
4146 gdbarch
->stack_align
= stack_align
;
4150 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4152 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4153 if (gdbarch_debug
>= 2)
4154 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4155 return gdbarch
->extra_stack_alignment_needed
;
4159 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4160 int extra_stack_alignment_needed
)
4162 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4166 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4168 return gdbarch
->reg_struct_has_addr
!= 0;
4172 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4174 if (gdbarch
->reg_struct_has_addr
== 0)
4175 internal_error (__FILE__
, __LINE__
,
4176 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4177 if (gdbarch_debug
>= 2)
4178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4179 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4183 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4184 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4186 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4190 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4192 return gdbarch
->save_dummy_frame_tos
!= 0;
4196 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4198 if (gdbarch
->save_dummy_frame_tos
== 0)
4199 internal_error (__FILE__
, __LINE__
,
4200 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4201 if (gdbarch_debug
>= 2)
4202 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4203 gdbarch
->save_dummy_frame_tos (sp
);
4207 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4208 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4210 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4214 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4216 if (gdbarch_debug
>= 2)
4217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4218 return gdbarch
->parm_boundary
;
4222 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4225 gdbarch
->parm_boundary
= parm_boundary
;
4228 const struct floatformat
*
4229 gdbarch_float_format (struct gdbarch
*gdbarch
)
4231 if (gdbarch_debug
>= 2)
4232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4233 return gdbarch
->float_format
;
4237 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4238 const struct floatformat
* float_format
)
4240 gdbarch
->float_format
= float_format
;
4243 const struct floatformat
*
4244 gdbarch_double_format (struct gdbarch
*gdbarch
)
4246 if (gdbarch_debug
>= 2)
4247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4248 return gdbarch
->double_format
;
4252 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4253 const struct floatformat
* double_format
)
4255 gdbarch
->double_format
= double_format
;
4258 const struct floatformat
*
4259 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4261 if (gdbarch_debug
>= 2)
4262 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4263 return gdbarch
->long_double_format
;
4267 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4268 const struct floatformat
* long_double_format
)
4270 gdbarch
->long_double_format
= long_double_format
;
4274 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4276 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4277 internal_error (__FILE__
, __LINE__
,
4278 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4279 if (gdbarch_debug
>= 2)
4280 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4281 return gdbarch
->convert_from_func_ptr_addr (addr
);
4285 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4286 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4288 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4292 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4294 if (gdbarch
->addr_bits_remove
== 0)
4295 internal_error (__FILE__
, __LINE__
,
4296 "gdbarch: gdbarch_addr_bits_remove invalid");
4297 if (gdbarch_debug
>= 2)
4298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4299 return gdbarch
->addr_bits_remove (addr
);
4303 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4304 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4306 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4310 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4312 return gdbarch
->software_single_step
!= 0;
4316 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4318 if (gdbarch
->software_single_step
== 0)
4319 internal_error (__FILE__
, __LINE__
,
4320 "gdbarch: gdbarch_software_single_step invalid");
4321 if (gdbarch_debug
>= 2)
4322 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4323 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4327 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4328 gdbarch_software_single_step_ftype software_single_step
)
4330 gdbarch
->software_single_step
= software_single_step
;
4334 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4336 if (gdbarch
->skip_trampoline_code
== 0)
4337 internal_error (__FILE__
, __LINE__
,
4338 "gdbarch: gdbarch_skip_trampoline_code invalid");
4339 if (gdbarch_debug
>= 2)
4340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4341 return gdbarch
->skip_trampoline_code (pc
);
4345 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4346 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4348 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4352 /* Keep a registry of per-architecture data-pointers required by GDB
4358 gdbarch_data_init_ftype
*init
;
4359 gdbarch_data_free_ftype
*free
;
4362 struct gdbarch_data_registration
4364 struct gdbarch_data
*data
;
4365 struct gdbarch_data_registration
*next
;
4368 struct gdbarch_data_registry
4371 struct gdbarch_data_registration
*registrations
;
4374 struct gdbarch_data_registry gdbarch_data_registry
=
4379 struct gdbarch_data
*
4380 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4381 gdbarch_data_free_ftype
*free
)
4383 struct gdbarch_data_registration
**curr
;
4384 for (curr
= &gdbarch_data_registry
.registrations
;
4386 curr
= &(*curr
)->next
);
4387 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4388 (*curr
)->next
= NULL
;
4389 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4390 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4391 (*curr
)->data
->init
= init
;
4392 (*curr
)->data
->free
= free
;
4393 return (*curr
)->data
;
4397 /* Walk through all the registered users initializing each in turn. */
4400 init_gdbarch_data (struct gdbarch
*gdbarch
)
4402 struct gdbarch_data_registration
*rego
;
4403 for (rego
= gdbarch_data_registry
.registrations
;
4407 struct gdbarch_data
*data
= rego
->data
;
4408 gdb_assert (data
->index
< gdbarch
->nr_data
);
4409 if (data
->init
!= NULL
)
4411 void *pointer
= data
->init (gdbarch
);
4412 set_gdbarch_data (gdbarch
, data
, pointer
);
4417 /* Create/delete the gdbarch data vector. */
4420 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4422 gdb_assert (gdbarch
->data
== NULL
);
4423 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4424 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4428 free_gdbarch_data (struct gdbarch
*gdbarch
)
4430 struct gdbarch_data_registration
*rego
;
4431 gdb_assert (gdbarch
->data
!= NULL
);
4432 for (rego
= gdbarch_data_registry
.registrations
;
4436 struct gdbarch_data
*data
= rego
->data
;
4437 gdb_assert (data
->index
< gdbarch
->nr_data
);
4438 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4440 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4441 gdbarch
->data
[data
->index
] = NULL
;
4444 xfree (gdbarch
->data
);
4445 gdbarch
->data
= NULL
;
4449 /* Initialize the current value of thee specified per-architecture
4453 set_gdbarch_data (struct gdbarch
*gdbarch
,
4454 struct gdbarch_data
*data
,
4457 gdb_assert (data
->index
< gdbarch
->nr_data
);
4458 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4459 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4460 gdbarch
->data
[data
->index
] = pointer
;
4463 /* Return the current value of the specified per-architecture
4467 gdbarch_data (struct gdbarch_data
*data
)
4469 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4470 return current_gdbarch
->data
[data
->index
];
4475 /* Keep a registry of swapped data required by GDB modules. */
4480 struct gdbarch_swap_registration
*source
;
4481 struct gdbarch_swap
*next
;
4484 struct gdbarch_swap_registration
4487 unsigned long sizeof_data
;
4488 gdbarch_swap_ftype
*init
;
4489 struct gdbarch_swap_registration
*next
;
4492 struct gdbarch_swap_registry
4495 struct gdbarch_swap_registration
*registrations
;
4498 struct gdbarch_swap_registry gdbarch_swap_registry
=
4504 register_gdbarch_swap (void *data
,
4505 unsigned long sizeof_data
,
4506 gdbarch_swap_ftype
*init
)
4508 struct gdbarch_swap_registration
**rego
;
4509 for (rego
= &gdbarch_swap_registry
.registrations
;
4511 rego
= &(*rego
)->next
);
4512 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4513 (*rego
)->next
= NULL
;
4514 (*rego
)->init
= init
;
4515 (*rego
)->data
= data
;
4516 (*rego
)->sizeof_data
= sizeof_data
;
4521 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4523 struct gdbarch_swap_registration
*rego
;
4524 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4525 for (rego
= gdbarch_swap_registry
.registrations
;
4529 if (rego
->data
!= NULL
)
4531 (*curr
) = XMALLOC (struct gdbarch_swap
);
4532 (*curr
)->source
= rego
;
4533 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4534 (*curr
)->next
= NULL
;
4535 memset (rego
->data
, 0, rego
->sizeof_data
);
4536 curr
= &(*curr
)->next
;
4538 if (rego
->init
!= NULL
)
4544 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4546 struct gdbarch_swap
*curr
;
4547 for (curr
= gdbarch
->swap
;
4550 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4554 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4556 struct gdbarch_swap
*curr
;
4557 for (curr
= gdbarch
->swap
;
4560 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4564 /* Keep a registry of the architectures known by GDB. */
4566 struct gdbarch_registration
4568 enum bfd_architecture bfd_architecture
;
4569 gdbarch_init_ftype
*init
;
4570 gdbarch_dump_tdep_ftype
*dump_tdep
;
4571 struct gdbarch_list
*arches
;
4572 struct gdbarch_registration
*next
;
4575 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4578 append_name (const char ***buf
, int *nr
, const char *name
)
4580 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4586 gdbarch_printable_names (void)
4590 /* Accumulate a list of names based on the registed list of
4592 enum bfd_architecture a
;
4594 const char **arches
= NULL
;
4595 struct gdbarch_registration
*rego
;
4596 for (rego
= gdbarch_registry
;
4600 const struct bfd_arch_info
*ap
;
4601 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4603 internal_error (__FILE__
, __LINE__
,
4604 "gdbarch_architecture_names: multi-arch unknown");
4607 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4612 append_name (&arches
, &nr_arches
, NULL
);
4616 /* Just return all the architectures that BFD knows. Assume that
4617 the legacy architecture framework supports them. */
4618 return bfd_arch_list ();
4623 gdbarch_register (enum bfd_architecture bfd_architecture
,
4624 gdbarch_init_ftype
*init
,
4625 gdbarch_dump_tdep_ftype
*dump_tdep
)
4627 struct gdbarch_registration
**curr
;
4628 const struct bfd_arch_info
*bfd_arch_info
;
4629 /* Check that BFD recognizes this architecture */
4630 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4631 if (bfd_arch_info
== NULL
)
4633 internal_error (__FILE__
, __LINE__
,
4634 "gdbarch: Attempt to register unknown architecture (%d)",
4637 /* Check that we haven't seen this architecture before */
4638 for (curr
= &gdbarch_registry
;
4640 curr
= &(*curr
)->next
)
4642 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4643 internal_error (__FILE__
, __LINE__
,
4644 "gdbarch: Duplicate registraration of architecture (%s)",
4645 bfd_arch_info
->printable_name
);
4649 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4650 bfd_arch_info
->printable_name
,
4653 (*curr
) = XMALLOC (struct gdbarch_registration
);
4654 (*curr
)->bfd_architecture
= bfd_architecture
;
4655 (*curr
)->init
= init
;
4656 (*curr
)->dump_tdep
= dump_tdep
;
4657 (*curr
)->arches
= NULL
;
4658 (*curr
)->next
= NULL
;
4659 /* When non- multi-arch, install whatever target dump routine we've
4660 been provided - hopefully that routine has been written correctly
4661 and works regardless of multi-arch. */
4662 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4663 && startup_gdbarch
.dump_tdep
== NULL
)
4664 startup_gdbarch
.dump_tdep
= dump_tdep
;
4668 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4669 gdbarch_init_ftype
*init
)
4671 gdbarch_register (bfd_architecture
, init
, NULL
);
4675 /* Look for an architecture using gdbarch_info. Base search on only
4676 BFD_ARCH_INFO and BYTE_ORDER. */
4678 struct gdbarch_list
*
4679 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4680 const struct gdbarch_info
*info
)
4682 for (; arches
!= NULL
; arches
= arches
->next
)
4684 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4686 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4694 /* Update the current architecture. Return ZERO if the update request
4698 gdbarch_update_p (struct gdbarch_info info
)
4700 struct gdbarch
*new_gdbarch
;
4701 struct gdbarch_list
**list
;
4702 struct gdbarch_registration
*rego
;
4704 /* Fill in missing parts of the INFO struct using a number of
4705 sources: ``set ...''; INFOabfd supplied; existing target. */
4707 /* ``(gdb) set architecture ...'' */
4708 if (info
.bfd_arch_info
== NULL
4709 && !TARGET_ARCHITECTURE_AUTO
)
4710 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4711 if (info
.bfd_arch_info
== NULL
4712 && info
.abfd
!= NULL
4713 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4714 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4715 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4716 if (info
.bfd_arch_info
== NULL
)
4717 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4719 /* ``(gdb) set byte-order ...'' */
4720 if (info
.byte_order
== 0
4721 && !TARGET_BYTE_ORDER_AUTO
)
4722 info
.byte_order
= TARGET_BYTE_ORDER
;
4723 /* From the INFO struct. */
4724 if (info
.byte_order
== 0
4725 && info
.abfd
!= NULL
)
4726 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4727 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4729 /* From the current target. */
4730 if (info
.byte_order
== 0)
4731 info
.byte_order
= TARGET_BYTE_ORDER
;
4733 /* Must have found some sort of architecture. */
4734 gdb_assert (info
.bfd_arch_info
!= NULL
);
4738 fprintf_unfiltered (gdb_stdlog
,
4739 "gdbarch_update: info.bfd_arch_info %s\n",
4740 (info
.bfd_arch_info
!= NULL
4741 ? info
.bfd_arch_info
->printable_name
4743 fprintf_unfiltered (gdb_stdlog
,
4744 "gdbarch_update: info.byte_order %d (%s)\n",
4746 (info
.byte_order
== BIG_ENDIAN
? "big"
4747 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4749 fprintf_unfiltered (gdb_stdlog
,
4750 "gdbarch_update: info.abfd 0x%lx\n",
4752 fprintf_unfiltered (gdb_stdlog
,
4753 "gdbarch_update: info.tdep_info 0x%lx\n",
4754 (long) info
.tdep_info
);
4757 /* Find the target that knows about this architecture. */
4758 for (rego
= gdbarch_registry
;
4761 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4766 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4770 /* Ask the target for a replacement architecture. */
4771 new_gdbarch
= rego
->init (info
, rego
->arches
);
4773 /* Did the target like it? No. Reject the change. */
4774 if (new_gdbarch
== NULL
)
4777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4781 /* Did the architecture change? No. Do nothing. */
4782 if (current_gdbarch
== new_gdbarch
)
4785 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4787 new_gdbarch
->bfd_arch_info
->printable_name
);
4791 /* Swap all data belonging to the old target out */
4792 swapout_gdbarch_swap (current_gdbarch
);
4794 /* Is this a pre-existing architecture? Yes. Swap it in. */
4795 for (list
= ®o
->arches
;
4797 list
= &(*list
)->next
)
4799 if ((*list
)->gdbarch
== new_gdbarch
)
4802 fprintf_unfiltered (gdb_stdlog
,
4803 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4805 new_gdbarch
->bfd_arch_info
->printable_name
);
4806 current_gdbarch
= new_gdbarch
;
4807 swapin_gdbarch_swap (new_gdbarch
);
4808 architecture_changed_event ();
4813 /* Append this new architecture to this targets list. */
4814 (*list
) = XMALLOC (struct gdbarch_list
);
4815 (*list
)->next
= NULL
;
4816 (*list
)->gdbarch
= new_gdbarch
;
4818 /* Switch to this new architecture. Dump it out. */
4819 current_gdbarch
= new_gdbarch
;
4822 fprintf_unfiltered (gdb_stdlog
,
4823 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4825 new_gdbarch
->bfd_arch_info
->printable_name
);
4828 /* Check that the newly installed architecture is valid. Plug in
4829 any post init values. */
4830 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4831 verify_gdbarch (new_gdbarch
);
4833 /* Initialize the per-architecture memory (swap) areas.
4834 CURRENT_GDBARCH must be update before these modules are
4836 init_gdbarch_swap (new_gdbarch
);
4838 /* Initialize the per-architecture data-pointer of all parties that
4839 registered an interest in this architecture. CURRENT_GDBARCH
4840 must be updated before these modules are called. */
4841 init_gdbarch_data (new_gdbarch
);
4842 architecture_changed_event ();
4845 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4853 /* Pointer to the target-dependent disassembly function. */
4854 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4855 disassemble_info tm_print_insn_info
;
4858 extern void _initialize_gdbarch (void);
4861 _initialize_gdbarch (void)
4863 struct cmd_list_element
*c
;
4865 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4866 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4867 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4868 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4869 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4871 add_show_from_set (add_set_cmd ("arch",
4874 (char *)&gdbarch_debug
,
4875 "Set architecture debugging.\n\
4876 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4878 c
= add_set_cmd ("archdebug",
4881 (char *)&gdbarch_debug
,
4882 "Set architecture debugging.\n\
4883 When non-zero, architecture debugging is enabled.", &setlist
);
4885 deprecate_cmd (c
, "set debug arch");
4886 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");