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"
65 /* Static function declarations */
67 static void verify_gdbarch (struct gdbarch
*gdbarch
);
68 static void alloc_gdbarch_data (struct gdbarch
*);
69 static void init_gdbarch_data (struct gdbarch
*);
70 static void free_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_swap (struct gdbarch
*);
72 static void swapout_gdbarch_swap (struct gdbarch
*);
73 static void swapin_gdbarch_swap (struct gdbarch
*);
75 /* Convenience macro for allocting typesafe memory. */
78 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
82 /* Non-zero if we want to trace architecture code. */
85 #define GDBARCH_DEBUG 0
87 int gdbarch_debug
= GDBARCH_DEBUG
;
90 /* Maintain the struct gdbarch object */
94 /* basic architectural information */
95 const struct bfd_arch_info
* bfd_arch_info
;
98 /* target specific vector. */
99 struct gdbarch_tdep
*tdep
;
100 gdbarch_dump_tdep_ftype
*dump_tdep
;
102 /* per-architecture data-pointers */
106 /* per-architecture swap-regions */
107 struct gdbarch_swap
*swap
;
109 /* Multi-arch values.
111 When extending this structure you must:
115 Declare set/get functions and define the corresponding
118 gdbarch_alloc(): If zero/NULL is not a suitable default,
119 initialize the new field.
121 verify_gdbarch(): Confirm that the target updated the field
124 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
127 ``startup_gdbarch()'': Append an initial value to the static
128 variable (base values on the host's c-type system).
130 get_gdbarch(): Implement the set/get functions (probably using
131 the macro's as shortcuts).
146 gdbarch_read_pc_ftype
*read_pc
;
147 gdbarch_write_pc_ftype
*write_pc
;
148 gdbarch_read_fp_ftype
*read_fp
;
149 gdbarch_write_fp_ftype
*write_fp
;
150 gdbarch_read_sp_ftype
*read_sp
;
151 gdbarch_write_sp_ftype
*write_sp
;
152 gdbarch_register_read_ftype
*register_read
;
153 gdbarch_register_write_ftype
*register_write
;
162 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
163 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
164 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
165 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
166 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
167 gdbarch_register_name_ftype
*register_name
;
170 gdbarch_register_byte_ftype
*register_byte
;
171 gdbarch_register_raw_size_ftype
*register_raw_size
;
172 int max_register_raw_size
;
173 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
174 int max_register_virtual_size
;
175 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
176 gdbarch_do_registers_info_ftype
*do_registers_info
;
177 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
178 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
179 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
180 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
181 int use_generic_dummy_frames
;
182 int call_dummy_location
;
183 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
184 CORE_ADDR call_dummy_start_offset
;
185 CORE_ADDR call_dummy_breakpoint_offset
;
186 int call_dummy_breakpoint_offset_p
;
187 int call_dummy_length
;
188 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
190 LONGEST
* call_dummy_words
;
191 int sizeof_call_dummy_words
;
192 int call_dummy_stack_adjust_p
;
193 int call_dummy_stack_adjust
;
194 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
195 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
196 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
197 int believe_pcc_promotion
;
198 int believe_pcc_promotion_type
;
199 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
200 gdbarch_get_saved_register_ftype
*get_saved_register
;
201 gdbarch_register_convertible_ftype
*register_convertible
;
202 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
203 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
204 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
205 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
206 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
207 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
208 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
209 gdbarch_extract_return_value_ftype
*extract_return_value
;
210 gdbarch_push_arguments_ftype
*push_arguments
;
211 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
212 gdbarch_push_return_address_ftype
*push_return_address
;
213 gdbarch_pop_frame_ftype
*pop_frame
;
214 gdbarch_d10v_make_daddr_ftype
*d10v_make_daddr
;
215 gdbarch_d10v_make_iaddr_ftype
*d10v_make_iaddr
;
216 gdbarch_d10v_daddr_p_ftype
*d10v_daddr_p
;
217 gdbarch_d10v_iaddr_p_ftype
*d10v_iaddr_p
;
218 gdbarch_d10v_convert_daddr_to_raw_ftype
*d10v_convert_daddr_to_raw
;
219 gdbarch_d10v_convert_iaddr_to_raw_ftype
*d10v_convert_iaddr_to_raw
;
220 gdbarch_store_struct_return_ftype
*store_struct_return
;
221 gdbarch_store_return_value_ftype
*store_return_value
;
222 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
223 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
224 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
225 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
226 gdbarch_skip_prologue_ftype
*skip_prologue
;
227 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
228 gdbarch_inner_than_ftype
*inner_than
;
229 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
230 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
231 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
232 CORE_ADDR decr_pc_after_break
;
233 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
234 CORE_ADDR function_start_offset
;
235 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
236 CORE_ADDR frame_args_skip
;
237 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
238 gdbarch_frame_chain_ftype
*frame_chain
;
239 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
240 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
241 gdbarch_frame_args_address_ftype
*frame_args_address
;
242 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
243 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
244 gdbarch_frame_num_args_ftype
*frame_num_args
;
245 gdbarch_stack_align_ftype
*stack_align
;
246 int extra_stack_alignment_needed
;
247 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
248 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
250 const struct floatformat
* float_format
;
251 const struct floatformat
* double_format
;
252 const struct floatformat
* long_double_format
;
253 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
254 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
255 gdbarch_software_single_step_ftype
*software_single_step
;
259 /* The default architecture uses host values (for want of a better
262 extern const struct bfd_arch_info bfd_default_arch_struct
;
264 struct gdbarch startup_gdbarch
=
266 /* basic architecture information */
267 &bfd_default_arch_struct
,
269 /* target specific vector and its dump routine */
271 /*per-architecture data-pointers and swap regions */
273 /* Multi-arch values */
277 8 * sizeof (LONGEST
),
280 8 * sizeof (long double),
339 generic_get_saved_register
,
395 /* startup_gdbarch() */
398 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
400 /* Do any initialization needed for a non-multiarch configuration
401 after the _initialize_MODULE functions have been run. */
403 initialize_non_multiarch ()
405 alloc_gdbarch_data (&startup_gdbarch
);
406 init_gdbarch_data (&startup_gdbarch
);
410 /* Create a new ``struct gdbarch'' based on information provided by
411 ``struct gdbarch_info''. */
414 gdbarch_alloc (const struct gdbarch_info
*info
,
415 struct gdbarch_tdep
*tdep
)
417 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
418 memset (gdbarch
, 0, sizeof (*gdbarch
));
420 alloc_gdbarch_data (gdbarch
);
422 gdbarch
->tdep
= tdep
;
424 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
425 gdbarch
->byte_order
= info
->byte_order
;
427 /* Force the explicit initialization of these. */
428 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
429 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
430 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
431 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
432 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
433 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
434 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
435 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
436 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
437 gdbarch
->read_pc
= generic_target_read_pc
;
438 gdbarch
->write_pc
= generic_target_write_pc
;
439 gdbarch
->read_fp
= generic_target_read_fp
;
440 gdbarch
->write_fp
= generic_target_write_fp
;
441 gdbarch
->read_sp
= generic_target_read_sp
;
442 gdbarch
->write_sp
= generic_target_write_sp
;
443 gdbarch
->num_regs
= -1;
444 gdbarch
->sp_regnum
= -1;
445 gdbarch
->fp_regnum
= -1;
446 gdbarch
->pc_regnum
= -1;
447 gdbarch
->fp0_regnum
= -1;
448 gdbarch
->npc_regnum
= -1;
449 gdbarch
->nnpc_regnum
= -1;
450 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
451 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
452 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
453 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
454 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
455 gdbarch
->register_name
= legacy_register_name
;
456 gdbarch
->register_size
= -1;
457 gdbarch
->register_bytes
= -1;
458 gdbarch
->max_register_raw_size
= -1;
459 gdbarch
->max_register_virtual_size
= -1;
460 gdbarch
->do_registers_info
= do_registers_info
;
461 gdbarch
->register_sim_regno
= default_register_sim_regno
;
462 gdbarch
->cannot_fetch_register
= cannot_register_not
;
463 gdbarch
->cannot_store_register
= cannot_register_not
;
464 gdbarch
->use_generic_dummy_frames
= -1;
465 gdbarch
->call_dummy_start_offset
= -1;
466 gdbarch
->call_dummy_breakpoint_offset
= -1;
467 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
468 gdbarch
->call_dummy_length
= -1;
469 gdbarch
->call_dummy_p
= -1;
470 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
471 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
472 gdbarch
->call_dummy_stack_adjust_p
= -1;
473 gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
474 gdbarch
->init_frame_pc
= init_frame_pc_noop
;
475 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
476 gdbarch
->register_convertible
= generic_register_convertible_not
;
477 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
478 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
479 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
480 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
481 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
482 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
483 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
484 gdbarch
->decr_pc_after_break
= -1;
485 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
486 gdbarch
->function_start_offset
= -1;
487 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
488 gdbarch
->frame_args_skip
= -1;
489 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
490 gdbarch
->extra_stack_alignment_needed
= 1;
491 gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
492 gdbarch
->addr_bits_remove
= core_addr_identity
;
493 /* gdbarch_alloc() */
499 /* Free a gdbarch struct. This should never happen in normal
500 operation --- once you've created a gdbarch, you keep it around.
501 However, if an architecture's init function encounters an error
502 building the structure, it may need to clean up a partially
503 constructed gdbarch. */
506 gdbarch_free (struct gdbarch
*arch
)
508 gdb_assert (arch
!= NULL
);
509 free_gdbarch_data (arch
);
514 /* Ensure that all values in a GDBARCH are reasonable. */
517 verify_gdbarch (struct gdbarch
*gdbarch
)
519 /* Only perform sanity checks on a multi-arch target. */
523 if (gdbarch
->byte_order
== 0)
524 internal_error (__FILE__
, __LINE__
,
525 "verify_gdbarch: byte-order unset");
526 if (gdbarch
->bfd_arch_info
== NULL
)
527 internal_error (__FILE__
, __LINE__
,
528 "verify_gdbarch: bfd_arch_info unset");
529 /* Check those that need to be defined for the given multi-arch level. */
530 /* Skip verify of short_bit, invalid_p == 0 */
531 /* Skip verify of int_bit, invalid_p == 0 */
532 /* Skip verify of long_bit, invalid_p == 0 */
533 /* Skip verify of long_long_bit, invalid_p == 0 */
534 /* Skip verify of float_bit, invalid_p == 0 */
535 /* Skip verify of double_bit, invalid_p == 0 */
536 /* Skip verify of long_double_bit, invalid_p == 0 */
537 /* Skip verify of ptr_bit, invalid_p == 0 */
538 if (gdbarch
->addr_bit
== 0)
539 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
540 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
541 /* Skip verify of ieee_float, invalid_p == 0 */
542 /* Skip verify of read_pc, invalid_p == 0 */
543 /* Skip verify of write_pc, invalid_p == 0 */
544 /* Skip verify of read_fp, invalid_p == 0 */
545 /* Skip verify of write_fp, invalid_p == 0 */
546 /* Skip verify of read_sp, invalid_p == 0 */
547 /* Skip verify of write_sp, invalid_p == 0 */
548 /* Skip verify of register_read, has predicate */
549 /* Skip verify of register_write, has predicate */
550 if ((GDB_MULTI_ARCH
>= 2)
551 && (gdbarch
->num_regs
== -1))
552 internal_error (__FILE__
, __LINE__
,
553 "gdbarch: verify_gdbarch: num_regs invalid");
554 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
555 if ((GDB_MULTI_ARCH
>= 2)
556 && (gdbarch
->sp_regnum
== -1))
557 internal_error (__FILE__
, __LINE__
,
558 "gdbarch: verify_gdbarch: sp_regnum invalid");
559 if ((GDB_MULTI_ARCH
>= 2)
560 && (gdbarch
->fp_regnum
== -1))
561 internal_error (__FILE__
, __LINE__
,
562 "gdbarch: verify_gdbarch: fp_regnum invalid");
563 if ((GDB_MULTI_ARCH
>= 2)
564 && (gdbarch
->pc_regnum
== -1))
565 internal_error (__FILE__
, __LINE__
,
566 "gdbarch: verify_gdbarch: pc_regnum invalid");
567 /* Skip verify of fp0_regnum, invalid_p == 0 */
568 /* Skip verify of npc_regnum, invalid_p == 0 */
569 /* Skip verify of nnpc_regnum, invalid_p == 0 */
570 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
571 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
572 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
573 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
574 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
575 /* Skip verify of register_name, invalid_p == 0 */
576 if ((GDB_MULTI_ARCH
>= 2)
577 && (gdbarch
->register_size
== -1))
578 internal_error (__FILE__
, __LINE__
,
579 "gdbarch: verify_gdbarch: register_size invalid");
580 if ((GDB_MULTI_ARCH
>= 2)
581 && (gdbarch
->register_bytes
== -1))
582 internal_error (__FILE__
, __LINE__
,
583 "gdbarch: verify_gdbarch: register_bytes invalid");
584 if ((GDB_MULTI_ARCH
>= 2)
585 && (gdbarch
->register_byte
== 0))
586 internal_error (__FILE__
, __LINE__
,
587 "gdbarch: verify_gdbarch: register_byte invalid");
588 if ((GDB_MULTI_ARCH
>= 2)
589 && (gdbarch
->register_raw_size
== 0))
590 internal_error (__FILE__
, __LINE__
,
591 "gdbarch: verify_gdbarch: register_raw_size invalid");
592 if ((GDB_MULTI_ARCH
>= 2)
593 && (gdbarch
->max_register_raw_size
== -1))
594 internal_error (__FILE__
, __LINE__
,
595 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
596 if ((GDB_MULTI_ARCH
>= 2)
597 && (gdbarch
->register_virtual_size
== 0))
598 internal_error (__FILE__
, __LINE__
,
599 "gdbarch: verify_gdbarch: register_virtual_size invalid");
600 if ((GDB_MULTI_ARCH
>= 2)
601 && (gdbarch
->max_register_virtual_size
== -1))
602 internal_error (__FILE__
, __LINE__
,
603 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
604 if ((GDB_MULTI_ARCH
>= 2)
605 && (gdbarch
->register_virtual_type
== 0))
606 internal_error (__FILE__
, __LINE__
,
607 "gdbarch: verify_gdbarch: register_virtual_type invalid");
608 /* Skip verify of do_registers_info, invalid_p == 0 */
609 /* Skip verify of register_sim_regno, invalid_p == 0 */
610 /* Skip verify of register_bytes_ok, has predicate */
611 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
612 /* Skip verify of cannot_store_register, invalid_p == 0 */
613 if ((GDB_MULTI_ARCH
>= 1)
614 && (gdbarch
->use_generic_dummy_frames
== -1))
615 internal_error (__FILE__
, __LINE__
,
616 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
617 if ((GDB_MULTI_ARCH
>= 2)
618 && (gdbarch
->call_dummy_location
== 0))
619 internal_error (__FILE__
, __LINE__
,
620 "gdbarch: verify_gdbarch: call_dummy_location invalid");
621 if ((GDB_MULTI_ARCH
>= 2)
622 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
623 internal_error (__FILE__
, __LINE__
,
624 "gdbarch: verify_gdbarch: call_dummy_address invalid");
625 if ((GDB_MULTI_ARCH
>= 2)
626 && (gdbarch
->call_dummy_start_offset
== -1))
627 internal_error (__FILE__
, __LINE__
,
628 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
629 if ((GDB_MULTI_ARCH
>= 2)
630 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
631 internal_error (__FILE__
, __LINE__
,
632 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
633 if ((GDB_MULTI_ARCH
>= 1)
634 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
635 internal_error (__FILE__
, __LINE__
,
636 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
637 if ((GDB_MULTI_ARCH
>= 2)
638 && (gdbarch
->call_dummy_length
== -1))
639 internal_error (__FILE__
, __LINE__
,
640 "gdbarch: verify_gdbarch: call_dummy_length invalid");
641 if ((GDB_MULTI_ARCH
>= 2)
642 && (gdbarch
->pc_in_call_dummy
== 0))
643 internal_error (__FILE__
, __LINE__
,
644 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
645 if ((GDB_MULTI_ARCH
>= 1)
646 && (gdbarch
->call_dummy_p
== -1))
647 internal_error (__FILE__
, __LINE__
,
648 "gdbarch: verify_gdbarch: call_dummy_p invalid");
649 /* Skip verify of call_dummy_words, invalid_p == 0 */
650 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
651 if ((GDB_MULTI_ARCH
>= 1)
652 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
653 internal_error (__FILE__
, __LINE__
,
654 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
655 if ((GDB_MULTI_ARCH
>= 2)
656 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
657 internal_error (__FILE__
, __LINE__
,
658 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
659 if ((GDB_MULTI_ARCH
>= 2)
660 && (gdbarch
->fix_call_dummy
== 0))
661 internal_error (__FILE__
, __LINE__
,
662 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
663 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
664 /* Skip verify of init_frame_pc, invalid_p == 0 */
665 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
666 if ((GDB_MULTI_ARCH
>= 1)
667 && (gdbarch
->get_saved_register
== 0))
668 internal_error (__FILE__
, __LINE__
,
669 "gdbarch: verify_gdbarch: get_saved_register invalid");
670 /* Skip verify of register_convertible, invalid_p == 0 */
671 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
672 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
673 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
674 /* Skip verify of store_pseudo_register, invalid_p == 0 */
675 /* Skip verify of pointer_to_address, invalid_p == 0 */
676 /* Skip verify of address_to_pointer, invalid_p == 0 */
677 /* Skip verify of return_value_on_stack, invalid_p == 0 */
678 if ((GDB_MULTI_ARCH
>= 2)
679 && (gdbarch
->extract_return_value
== 0))
680 internal_error (__FILE__
, __LINE__
,
681 "gdbarch: verify_gdbarch: extract_return_value invalid");
682 if ((GDB_MULTI_ARCH
>= 1)
683 && (gdbarch
->push_arguments
== 0))
684 internal_error (__FILE__
, __LINE__
,
685 "gdbarch: verify_gdbarch: push_arguments invalid");
686 if ((GDB_MULTI_ARCH
>= 2)
687 && (gdbarch
->push_dummy_frame
== 0))
688 internal_error (__FILE__
, __LINE__
,
689 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
690 if ((GDB_MULTI_ARCH
>= 1)
691 && (gdbarch
->push_return_address
== 0))
692 internal_error (__FILE__
, __LINE__
,
693 "gdbarch: verify_gdbarch: push_return_address invalid");
694 if ((GDB_MULTI_ARCH
>= 2)
695 && (gdbarch
->pop_frame
== 0))
696 internal_error (__FILE__
, __LINE__
,
697 "gdbarch: verify_gdbarch: pop_frame invalid");
698 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
699 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
700 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
701 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
702 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
703 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
704 if ((GDB_MULTI_ARCH
>= 2)
705 && (gdbarch
->store_struct_return
== 0))
706 internal_error (__FILE__
, __LINE__
,
707 "gdbarch: verify_gdbarch: store_struct_return invalid");
708 if ((GDB_MULTI_ARCH
>= 2)
709 && (gdbarch
->store_return_value
== 0))
710 internal_error (__FILE__
, __LINE__
,
711 "gdbarch: verify_gdbarch: store_return_value invalid");
712 /* Skip verify of extract_struct_value_address, has predicate */
713 if ((GDB_MULTI_ARCH
>= 2)
714 && (gdbarch
->use_struct_convention
== 0))
715 internal_error (__FILE__
, __LINE__
,
716 "gdbarch: verify_gdbarch: use_struct_convention invalid");
717 if ((GDB_MULTI_ARCH
>= 2)
718 && (gdbarch
->frame_init_saved_regs
== 0))
719 internal_error (__FILE__
, __LINE__
,
720 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
721 if ((GDB_MULTI_ARCH
>= 2)
722 && (gdbarch
->init_extra_frame_info
== 0))
723 internal_error (__FILE__
, __LINE__
,
724 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
725 if ((GDB_MULTI_ARCH
>= 2)
726 && (gdbarch
->skip_prologue
== 0))
727 internal_error (__FILE__
, __LINE__
,
728 "gdbarch: verify_gdbarch: skip_prologue invalid");
729 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
>= 2)
731 && (gdbarch
->inner_than
== 0))
732 internal_error (__FILE__
, __LINE__
,
733 "gdbarch: verify_gdbarch: inner_than invalid");
734 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
735 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
736 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
737 if ((GDB_MULTI_ARCH
>= 2)
738 && (gdbarch
->decr_pc_after_break
== -1))
739 internal_error (__FILE__
, __LINE__
,
740 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
741 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
742 if ((GDB_MULTI_ARCH
>= 2)
743 && (gdbarch
->function_start_offset
== -1))
744 internal_error (__FILE__
, __LINE__
,
745 "gdbarch: verify_gdbarch: function_start_offset invalid");
746 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
747 if ((GDB_MULTI_ARCH
>= 2)
748 && (gdbarch
->frame_args_skip
== -1))
749 internal_error (__FILE__
, __LINE__
,
750 "gdbarch: verify_gdbarch: frame_args_skip invalid");
751 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
752 if ((GDB_MULTI_ARCH
>= 2)
753 && (gdbarch
->frame_chain
== 0))
754 internal_error (__FILE__
, __LINE__
,
755 "gdbarch: verify_gdbarch: frame_chain invalid");
756 if ((GDB_MULTI_ARCH
>= 1)
757 && (gdbarch
->frame_chain_valid
== 0))
758 internal_error (__FILE__
, __LINE__
,
759 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
760 if ((GDB_MULTI_ARCH
>= 2)
761 && (gdbarch
->frame_saved_pc
== 0))
762 internal_error (__FILE__
, __LINE__
,
763 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
764 if ((GDB_MULTI_ARCH
>= 2)
765 && (gdbarch
->frame_args_address
== 0))
766 internal_error (__FILE__
, __LINE__
,
767 "gdbarch: verify_gdbarch: frame_args_address invalid");
768 if ((GDB_MULTI_ARCH
>= 2)
769 && (gdbarch
->frame_locals_address
== 0))
770 internal_error (__FILE__
, __LINE__
,
771 "gdbarch: verify_gdbarch: frame_locals_address invalid");
772 if ((GDB_MULTI_ARCH
>= 2)
773 && (gdbarch
->saved_pc_after_call
== 0))
774 internal_error (__FILE__
, __LINE__
,
775 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
776 if ((GDB_MULTI_ARCH
>= 2)
777 && (gdbarch
->frame_num_args
== 0))
778 internal_error (__FILE__
, __LINE__
,
779 "gdbarch: verify_gdbarch: frame_num_args invalid");
780 /* Skip verify of stack_align, has predicate */
781 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
782 /* Skip verify of reg_struct_has_addr, has predicate */
783 /* Skip verify of save_dummy_frame_tos, has predicate */
784 if (gdbarch
->float_format
== 0)
785 gdbarch
->float_format
= default_float_format (gdbarch
);
786 if (gdbarch
->double_format
== 0)
787 gdbarch
->double_format
= default_double_format (gdbarch
);
788 if (gdbarch
->long_double_format
== 0)
789 gdbarch
->long_double_format
= &floatformat_unknown
;
790 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
791 /* Skip verify of addr_bits_remove, invalid_p == 0 */
792 /* Skip verify of software_single_step, has predicate */
796 /* Print out the details of the current architecture. */
798 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
799 just happens to match the global variable ``current_gdbarch''. That
800 way macros refering to that variable get the local and not the global
801 version - ulgh. Once everything is parameterised with gdbarch, this
805 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
807 fprintf_unfiltered (file
,
808 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
810 #ifdef TARGET_ARCHITECTURE
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
813 XSTRING (TARGET_ARCHITECTURE
));
815 #ifdef TARGET_BYTE_ORDER
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
818 XSTRING (TARGET_BYTE_ORDER
));
820 #ifdef TARGET_SHORT_BIT
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
823 XSTRING (TARGET_SHORT_BIT
));
825 #ifdef TARGET_INT_BIT
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: TARGET_INT_BIT # %s\n",
828 XSTRING (TARGET_INT_BIT
));
830 #ifdef TARGET_LONG_BIT
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
833 XSTRING (TARGET_LONG_BIT
));
835 #ifdef TARGET_LONG_LONG_BIT
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
838 XSTRING (TARGET_LONG_LONG_BIT
));
840 #ifdef TARGET_FLOAT_BIT
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
843 XSTRING (TARGET_FLOAT_BIT
));
845 #ifdef TARGET_DOUBLE_BIT
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
848 XSTRING (TARGET_DOUBLE_BIT
));
850 #ifdef TARGET_LONG_DOUBLE_BIT
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
853 XSTRING (TARGET_LONG_DOUBLE_BIT
));
855 #ifdef TARGET_PTR_BIT
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
858 XSTRING (TARGET_PTR_BIT
));
860 #ifdef TARGET_ADDR_BIT
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
863 XSTRING (TARGET_ADDR_BIT
));
865 #ifdef TARGET_BFD_VMA_BIT
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
868 XSTRING (TARGET_BFD_VMA_BIT
));
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: IEEE_FLOAT # %s\n",
873 XSTRING (IEEE_FLOAT
));
875 #ifdef TARGET_READ_PC
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: %s # %s\n",
878 "TARGET_READ_PC(ptid)",
879 XSTRING (TARGET_READ_PC (ptid
)));
881 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
882 /* Macro might contain `[{}]' when not multi-arch */
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: %s # %s\n",
885 "TARGET_WRITE_PC(val, ptid)",
886 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
888 #ifdef TARGET_READ_FP
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: %s # %s\n",
892 XSTRING (TARGET_READ_FP ()));
894 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
895 /* Macro might contain `[{}]' when not multi-arch */
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: %s # %s\n",
898 "TARGET_WRITE_FP(val)",
899 XSTRING (TARGET_WRITE_FP (val
)));
901 #ifdef TARGET_READ_SP
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: %s # %s\n",
905 XSTRING (TARGET_READ_SP ()));
907 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
908 /* Macro might contain `[{}]' when not multi-arch */
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: %s # %s\n",
911 "TARGET_WRITE_SP(val)",
912 XSTRING (TARGET_WRITE_SP (val
)));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: NUM_REGS # %s\n",
919 #ifdef NUM_PSEUDO_REGS
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
922 XSTRING (NUM_PSEUDO_REGS
));
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: SP_REGNUM # %s\n",
927 XSTRING (SP_REGNUM
));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: FP_REGNUM # %s\n",
932 XSTRING (FP_REGNUM
));
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: PC_REGNUM # %s\n",
937 XSTRING (PC_REGNUM
));
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: FP0_REGNUM # %s\n",
942 XSTRING (FP0_REGNUM
));
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: NPC_REGNUM # %s\n",
947 XSTRING (NPC_REGNUM
));
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: NNPC_REGNUM # %s\n",
952 XSTRING (NNPC_REGNUM
));
954 #ifdef STAB_REG_TO_REGNUM
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: %s # %s\n",
957 "STAB_REG_TO_REGNUM(stab_regnr)",
958 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
960 #ifdef ECOFF_REG_TO_REGNUM
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: %s # %s\n",
963 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
964 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
966 #ifdef DWARF_REG_TO_REGNUM
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: %s # %s\n",
969 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
970 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
972 #ifdef SDB_REG_TO_REGNUM
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: %s # %s\n",
975 "SDB_REG_TO_REGNUM(sdb_regnr)",
976 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
978 #ifdef DWARF2_REG_TO_REGNUM
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: %s # %s\n",
981 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
982 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: %s # %s\n",
987 "REGISTER_NAME(regnr)",
988 XSTRING (REGISTER_NAME (regnr
)));
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: REGISTER_SIZE # %s\n",
993 XSTRING (REGISTER_SIZE
));
995 #ifdef REGISTER_BYTES
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: REGISTER_BYTES # %s\n",
998 XSTRING (REGISTER_BYTES
));
1000 #ifdef REGISTER_BYTE
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: %s # %s\n",
1003 "REGISTER_BYTE(reg_nr)",
1004 XSTRING (REGISTER_BYTE (reg_nr
)));
1006 #ifdef REGISTER_RAW_SIZE
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: %s # %s\n",
1009 "REGISTER_RAW_SIZE(reg_nr)",
1010 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1012 #ifdef MAX_REGISTER_RAW_SIZE
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1015 XSTRING (MAX_REGISTER_RAW_SIZE
));
1017 #ifdef REGISTER_VIRTUAL_SIZE
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: %s # %s\n",
1020 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1021 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1023 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1026 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1028 #ifdef REGISTER_VIRTUAL_TYPE
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: %s # %s\n",
1031 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1032 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1034 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1035 /* Macro might contain `[{}]' when not multi-arch */
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: %s # %s\n",
1038 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1039 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1041 #ifdef REGISTER_SIM_REGNO
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: %s # %s\n",
1044 "REGISTER_SIM_REGNO(reg_nr)",
1045 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1047 #ifdef REGISTER_BYTES_OK
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: %s # %s\n",
1050 "REGISTER_BYTES_OK(nr_bytes)",
1051 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1053 #ifdef CANNOT_FETCH_REGISTER
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: %s # %s\n",
1056 "CANNOT_FETCH_REGISTER(reg_nr)",
1057 XSTRING (CANNOT_FETCH_REGISTER (reg_nr
)));
1059 #ifdef CANNOT_STORE_REGISTER
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: %s # %s\n",
1062 "CANNOT_STORE_REGISTER(reg_nr)",
1063 XSTRING (CANNOT_STORE_REGISTER (reg_nr
)));
1065 #ifdef USE_GENERIC_DUMMY_FRAMES
1066 fprintf_unfiltered (file
,
1067 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1068 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1070 #ifdef CALL_DUMMY_LOCATION
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1073 XSTRING (CALL_DUMMY_LOCATION
));
1075 #ifdef CALL_DUMMY_ADDRESS
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: %s # %s\n",
1078 "CALL_DUMMY_ADDRESS()",
1079 XSTRING (CALL_DUMMY_ADDRESS ()));
1081 #ifdef CALL_DUMMY_START_OFFSET
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1084 XSTRING (CALL_DUMMY_START_OFFSET
));
1086 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1087 fprintf_unfiltered (file
,
1088 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1089 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1091 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1094 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1096 #ifdef CALL_DUMMY_LENGTH
1097 fprintf_unfiltered (file
,
1098 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1099 XSTRING (CALL_DUMMY_LENGTH
));
1101 #ifdef PC_IN_CALL_DUMMY
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: %s # %s\n",
1104 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1105 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1110 XSTRING (CALL_DUMMY_P
));
1112 #ifdef CALL_DUMMY_WORDS
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1115 XSTRING (CALL_DUMMY_WORDS
));
1117 #ifdef SIZEOF_CALL_DUMMY_WORDS
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1120 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1122 #ifdef CALL_DUMMY_STACK_ADJUST_P
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1125 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1127 #ifdef CALL_DUMMY_STACK_ADJUST
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1130 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1132 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1133 /* Macro might contain `[{}]' when not multi-arch */
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: %s # %s\n",
1136 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1137 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1139 #if defined (INIT_FRAME_PC_FIRST) && GDB_MULTI_ARCH
1140 /* Macro might contain `[{}]' when not multi-arch */
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: %s # %s\n",
1143 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1144 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1146 #if defined (INIT_FRAME_PC) && GDB_MULTI_ARCH
1147 /* Macro might contain `[{}]' when not multi-arch */
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: %s # %s\n",
1150 "INIT_FRAME_PC(fromleaf, prev)",
1151 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1153 #ifdef BELIEVE_PCC_PROMOTION
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1156 XSTRING (BELIEVE_PCC_PROMOTION
));
1158 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1161 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1163 #ifdef COERCE_FLOAT_TO_DOUBLE
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: %s # %s\n",
1166 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1167 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1169 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1170 /* Macro might contain `[{}]' when not multi-arch */
1171 fprintf_unfiltered (file
,
1172 "gdbarch_dump: %s # %s\n",
1173 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1174 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1176 #ifdef REGISTER_CONVERTIBLE
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: %s # %s\n",
1179 "REGISTER_CONVERTIBLE(nr)",
1180 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1182 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1183 /* Macro might contain `[{}]' when not multi-arch */
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: %s # %s\n",
1186 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1187 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1189 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1190 /* Macro might contain `[{}]' when not multi-arch */
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: %s # %s\n",
1193 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1194 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1196 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1197 /* Macro might contain `[{}]' when not multi-arch */
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: %s # %s\n",
1200 "FETCH_PSEUDO_REGISTER(regnum)",
1201 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1203 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1204 /* Macro might contain `[{}]' when not multi-arch */
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: %s # %s\n",
1207 "STORE_PSEUDO_REGISTER(regnum)",
1208 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1210 #ifdef POINTER_TO_ADDRESS
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "POINTER_TO_ADDRESS(type, buf)",
1214 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1216 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1217 /* Macro might contain `[{}]' when not multi-arch */
1218 fprintf_unfiltered (file
,
1219 "gdbarch_dump: %s # %s\n",
1220 "ADDRESS_TO_POINTER(type, buf, addr)",
1221 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1223 #ifdef RETURN_VALUE_ON_STACK
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: %s # %s\n",
1226 "RETURN_VALUE_ON_STACK(type)",
1227 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1229 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1230 /* Macro might contain `[{}]' when not multi-arch */
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: %s # %s\n",
1233 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1234 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1236 #ifdef PUSH_ARGUMENTS
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: %s # %s\n",
1239 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1240 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1242 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1243 /* Macro might contain `[{}]' when not multi-arch */
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: %s # %s\n",
1246 "PUSH_DUMMY_FRAME(-)",
1247 XSTRING (PUSH_DUMMY_FRAME (-)));
1249 #ifdef PUSH_RETURN_ADDRESS
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: %s # %s\n",
1252 "PUSH_RETURN_ADDRESS(pc, sp)",
1253 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1255 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1256 /* Macro might contain `[{}]' when not multi-arch */
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: %s # %s\n",
1260 XSTRING (POP_FRAME (-)));
1262 #ifdef D10V_MAKE_DADDR
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: %s # %s\n",
1265 "D10V_MAKE_DADDR(x)",
1266 XSTRING (D10V_MAKE_DADDR (x
)));
1268 #ifdef D10V_MAKE_IADDR
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: %s # %s\n",
1271 "D10V_MAKE_IADDR(x)",
1272 XSTRING (D10V_MAKE_IADDR (x
)));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: %s # %s\n",
1278 XSTRING (D10V_DADDR_P (x
)));
1281 fprintf_unfiltered (file
,
1282 "gdbarch_dump: %s # %s\n",
1284 XSTRING (D10V_IADDR_P (x
)));
1286 #ifdef D10V_CONVERT_DADDR_TO_RAW
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: %s # %s\n",
1289 "D10V_CONVERT_DADDR_TO_RAW(x)",
1290 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1292 #ifdef D10V_CONVERT_IADDR_TO_RAW
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "D10V_CONVERT_IADDR_TO_RAW(x)",
1296 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1298 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1299 /* Macro might contain `[{}]' when not multi-arch */
1300 fprintf_unfiltered (file
,
1301 "gdbarch_dump: %s # %s\n",
1302 "STORE_STRUCT_RETURN(addr, sp)",
1303 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1305 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1306 /* Macro might contain `[{}]' when not multi-arch */
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: %s # %s\n",
1309 "STORE_RETURN_VALUE(type, valbuf)",
1310 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1312 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: %s # %s\n",
1315 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1316 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1318 #ifdef USE_STRUCT_CONVENTION
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: %s # %s\n",
1321 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1322 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1324 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1325 /* Macro might contain `[{}]' when not multi-arch */
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: %s # %s\n",
1328 "FRAME_INIT_SAVED_REGS(frame)",
1329 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1331 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1332 /* Macro might contain `[{}]' when not multi-arch */
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: %s # %s\n",
1335 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1336 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1338 #ifdef SKIP_PROLOGUE
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: %s # %s\n",
1341 "SKIP_PROLOGUE(ip)",
1342 XSTRING (SKIP_PROLOGUE (ip
)));
1344 #ifdef PROLOGUE_FRAMELESS_P
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: %s # %s\n",
1347 "PROLOGUE_FRAMELESS_P(ip)",
1348 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: %s # %s\n",
1353 "INNER_THAN(lhs, rhs)",
1354 XSTRING (INNER_THAN (lhs
, rhs
)));
1356 #ifdef BREAKPOINT_FROM_PC
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: %s # %s\n",
1359 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1360 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1362 #ifdef MEMORY_INSERT_BREAKPOINT
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: %s # %s\n",
1365 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1366 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1368 #ifdef MEMORY_REMOVE_BREAKPOINT
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: %s # %s\n",
1371 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1372 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1374 #ifdef DECR_PC_AFTER_BREAK
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1377 XSTRING (DECR_PC_AFTER_BREAK
));
1379 #ifdef PREPARE_TO_PROCEED
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: %s # %s\n",
1382 "PREPARE_TO_PROCEED(select_it)",
1383 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1385 #ifdef FUNCTION_START_OFFSET
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1388 XSTRING (FUNCTION_START_OFFSET
));
1390 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1391 /* Macro might contain `[{}]' when not multi-arch */
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: %s # %s\n",
1394 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1395 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1397 #ifdef FRAME_ARGS_SKIP
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1400 XSTRING (FRAME_ARGS_SKIP
));
1402 #ifdef FRAMELESS_FUNCTION_INVOCATION
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: %s # %s\n",
1405 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1406 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: %s # %s\n",
1411 "FRAME_CHAIN(frame)",
1412 XSTRING (FRAME_CHAIN (frame
)));
1414 #ifdef FRAME_CHAIN_VALID
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: %s # %s\n",
1417 "FRAME_CHAIN_VALID(chain, thisframe)",
1418 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1420 #ifdef FRAME_SAVED_PC
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: %s # %s\n",
1423 "FRAME_SAVED_PC(fi)",
1424 XSTRING (FRAME_SAVED_PC (fi
)));
1426 #ifdef FRAME_ARGS_ADDRESS
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: %s # %s\n",
1429 "FRAME_ARGS_ADDRESS(fi)",
1430 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1432 #ifdef FRAME_LOCALS_ADDRESS
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: %s # %s\n",
1435 "FRAME_LOCALS_ADDRESS(fi)",
1436 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1438 #ifdef SAVED_PC_AFTER_CALL
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: %s # %s\n",
1441 "SAVED_PC_AFTER_CALL(frame)",
1442 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1444 #ifdef FRAME_NUM_ARGS
1445 fprintf_unfiltered (file
,
1446 "gdbarch_dump: %s # %s\n",
1447 "FRAME_NUM_ARGS(frame)",
1448 XSTRING (FRAME_NUM_ARGS (frame
)));
1451 fprintf_unfiltered (file
,
1452 "gdbarch_dump: %s # %s\n",
1454 XSTRING (STACK_ALIGN (sp
)));
1456 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1459 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1461 #ifdef REG_STRUCT_HAS_ADDR
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: %s # %s\n",
1464 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1465 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1467 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1468 /* Macro might contain `[{}]' when not multi-arch */
1469 fprintf_unfiltered (file
,
1470 "gdbarch_dump: %s # %s\n",
1471 "SAVE_DUMMY_FRAME_TOS(sp)",
1472 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1474 #ifdef PARM_BOUNDARY
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1477 XSTRING (PARM_BOUNDARY
));
1479 #ifdef TARGET_FLOAT_FORMAT
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1482 XSTRING (TARGET_FLOAT_FORMAT
));
1484 #ifdef TARGET_DOUBLE_FORMAT
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1487 XSTRING (TARGET_DOUBLE_FORMAT
));
1489 #ifdef TARGET_LONG_DOUBLE_FORMAT
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1492 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1494 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: %s # %s\n",
1497 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1498 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1500 #ifdef ADDR_BITS_REMOVE
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: %s # %s\n",
1503 "ADDR_BITS_REMOVE(addr)",
1504 XSTRING (ADDR_BITS_REMOVE (addr
)));
1506 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1507 /* Macro might contain `[{}]' when not multi-arch */
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: %s # %s\n",
1510 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1511 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1513 #ifdef TARGET_ARCHITECTURE
1514 if (TARGET_ARCHITECTURE
!= NULL
)
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1517 TARGET_ARCHITECTURE
->printable_name
);
1519 #ifdef TARGET_BYTE_ORDER
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1522 (long) TARGET_BYTE_ORDER
);
1524 #ifdef TARGET_SHORT_BIT
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1527 (long) TARGET_SHORT_BIT
);
1529 #ifdef TARGET_INT_BIT
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1532 (long) TARGET_INT_BIT
);
1534 #ifdef TARGET_LONG_BIT
1535 fprintf_unfiltered (file
,
1536 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1537 (long) TARGET_LONG_BIT
);
1539 #ifdef TARGET_LONG_LONG_BIT
1540 fprintf_unfiltered (file
,
1541 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1542 (long) TARGET_LONG_LONG_BIT
);
1544 #ifdef TARGET_FLOAT_BIT
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1547 (long) TARGET_FLOAT_BIT
);
1549 #ifdef TARGET_DOUBLE_BIT
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1552 (long) TARGET_DOUBLE_BIT
);
1554 #ifdef TARGET_LONG_DOUBLE_BIT
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1557 (long) TARGET_LONG_DOUBLE_BIT
);
1559 #ifdef TARGET_PTR_BIT
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1562 (long) TARGET_PTR_BIT
);
1564 #ifdef TARGET_ADDR_BIT
1565 fprintf_unfiltered (file
,
1566 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1567 (long) TARGET_ADDR_BIT
);
1569 #ifdef TARGET_BFD_VMA_BIT
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1572 (long) TARGET_BFD_VMA_BIT
);
1575 fprintf_unfiltered (file
,
1576 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1579 #ifdef TARGET_READ_PC
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1583 (long) current_gdbarch
->read_pc
1584 /*TARGET_READ_PC ()*/);
1586 #ifdef TARGET_WRITE_PC
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1590 (long) current_gdbarch
->write_pc
1591 /*TARGET_WRITE_PC ()*/);
1593 #ifdef TARGET_READ_FP
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1597 (long) current_gdbarch
->read_fp
1598 /*TARGET_READ_FP ()*/);
1600 #ifdef TARGET_WRITE_FP
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1604 (long) current_gdbarch
->write_fp
1605 /*TARGET_WRITE_FP ()*/);
1607 #ifdef TARGET_READ_SP
1609 fprintf_unfiltered (file
,
1610 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1611 (long) current_gdbarch
->read_sp
1612 /*TARGET_READ_SP ()*/);
1614 #ifdef TARGET_WRITE_SP
1616 fprintf_unfiltered (file
,
1617 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1618 (long) current_gdbarch
->write_sp
1619 /*TARGET_WRITE_SP ()*/);
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: register_read = 0x%08lx\n",
1624 (long) current_gdbarch
->register_read
);
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: register_write = 0x%08lx\n",
1628 (long) current_gdbarch
->register_write
);
1630 fprintf_unfiltered (file
,
1631 "gdbarch_dump: NUM_REGS = %ld\n",
1634 #ifdef NUM_PSEUDO_REGS
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1637 (long) NUM_PSEUDO_REGS
);
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: SP_REGNUM = %ld\n",
1645 fprintf_unfiltered (file
,
1646 "gdbarch_dump: FP_REGNUM = %ld\n",
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: PC_REGNUM = %ld\n",
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: FP0_REGNUM = %ld\n",
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: NPC_REGNUM = %ld\n",
1665 fprintf_unfiltered (file
,
1666 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1667 (long) NNPC_REGNUM
);
1669 #ifdef STAB_REG_TO_REGNUM
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1673 (long) current_gdbarch
->stab_reg_to_regnum
1674 /*STAB_REG_TO_REGNUM ()*/);
1676 #ifdef ECOFF_REG_TO_REGNUM
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1680 (long) current_gdbarch
->ecoff_reg_to_regnum
1681 /*ECOFF_REG_TO_REGNUM ()*/);
1683 #ifdef DWARF_REG_TO_REGNUM
1685 fprintf_unfiltered (file
,
1686 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1687 (long) current_gdbarch
->dwarf_reg_to_regnum
1688 /*DWARF_REG_TO_REGNUM ()*/);
1690 #ifdef SDB_REG_TO_REGNUM
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1694 (long) current_gdbarch
->sdb_reg_to_regnum
1695 /*SDB_REG_TO_REGNUM ()*/);
1697 #ifdef DWARF2_REG_TO_REGNUM
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1701 (long) current_gdbarch
->dwarf2_reg_to_regnum
1702 /*DWARF2_REG_TO_REGNUM ()*/);
1704 #ifdef REGISTER_NAME
1706 fprintf_unfiltered (file
,
1707 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1708 (long) current_gdbarch
->register_name
1709 /*REGISTER_NAME ()*/);
1711 #ifdef REGISTER_SIZE
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1714 (long) REGISTER_SIZE
);
1716 #ifdef REGISTER_BYTES
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1719 (long) REGISTER_BYTES
);
1721 #ifdef REGISTER_BYTE
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1725 (long) current_gdbarch
->register_byte
1726 /*REGISTER_BYTE ()*/);
1728 #ifdef REGISTER_RAW_SIZE
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1732 (long) current_gdbarch
->register_raw_size
1733 /*REGISTER_RAW_SIZE ()*/);
1735 #ifdef MAX_REGISTER_RAW_SIZE
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1738 (long) MAX_REGISTER_RAW_SIZE
);
1740 #ifdef REGISTER_VIRTUAL_SIZE
1742 fprintf_unfiltered (file
,
1743 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1744 (long) current_gdbarch
->register_virtual_size
1745 /*REGISTER_VIRTUAL_SIZE ()*/);
1747 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1748 fprintf_unfiltered (file
,
1749 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1750 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1752 #ifdef REGISTER_VIRTUAL_TYPE
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1756 (long) current_gdbarch
->register_virtual_type
1757 /*REGISTER_VIRTUAL_TYPE ()*/);
1759 #ifdef DO_REGISTERS_INFO
1761 fprintf_unfiltered (file
,
1762 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1763 (long) current_gdbarch
->do_registers_info
1764 /*DO_REGISTERS_INFO ()*/);
1766 #ifdef REGISTER_SIM_REGNO
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1770 (long) current_gdbarch
->register_sim_regno
1771 /*REGISTER_SIM_REGNO ()*/);
1773 #ifdef REGISTER_BYTES_OK
1775 fprintf_unfiltered (file
,
1776 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1777 (long) current_gdbarch
->register_bytes_ok
1778 /*REGISTER_BYTES_OK ()*/);
1780 #ifdef CANNOT_FETCH_REGISTER
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
1784 (long) current_gdbarch
->cannot_fetch_register
1785 /*CANNOT_FETCH_REGISTER ()*/);
1787 #ifdef CANNOT_STORE_REGISTER
1789 fprintf_unfiltered (file
,
1790 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1791 (long) current_gdbarch
->cannot_store_register
1792 /*CANNOT_STORE_REGISTER ()*/);
1794 #ifdef USE_GENERIC_DUMMY_FRAMES
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1797 (long) USE_GENERIC_DUMMY_FRAMES
);
1799 #ifdef CALL_DUMMY_LOCATION
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1802 (long) CALL_DUMMY_LOCATION
);
1804 #ifdef CALL_DUMMY_ADDRESS
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1808 (long) current_gdbarch
->call_dummy_address
1809 /*CALL_DUMMY_ADDRESS ()*/);
1811 #ifdef CALL_DUMMY_START_OFFSET
1812 fprintf_unfiltered (file
,
1813 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1814 (long) CALL_DUMMY_START_OFFSET
);
1816 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1817 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1820 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1822 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1823 fprintf_unfiltered (file
,
1824 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1825 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1827 #ifdef CALL_DUMMY_LENGTH
1828 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1829 fprintf_unfiltered (file
,
1830 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1831 (long) CALL_DUMMY_LENGTH
);
1833 #ifdef PC_IN_CALL_DUMMY
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1837 (long) current_gdbarch
->pc_in_call_dummy
1838 /*PC_IN_CALL_DUMMY ()*/);
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1843 (long) CALL_DUMMY_P
);
1845 #ifdef CALL_DUMMY_WORDS
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1848 (long) CALL_DUMMY_WORDS
);
1850 #ifdef SIZEOF_CALL_DUMMY_WORDS
1851 fprintf_unfiltered (file
,
1852 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1853 (long) SIZEOF_CALL_DUMMY_WORDS
);
1855 #ifdef CALL_DUMMY_STACK_ADJUST_P
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1858 (long) CALL_DUMMY_STACK_ADJUST_P
);
1860 #ifdef CALL_DUMMY_STACK_ADJUST
1861 if (CALL_DUMMY_STACK_ADJUST_P
)
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1864 (long) CALL_DUMMY_STACK_ADJUST
);
1866 #ifdef FIX_CALL_DUMMY
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1870 (long) current_gdbarch
->fix_call_dummy
1871 /*FIX_CALL_DUMMY ()*/);
1873 #ifdef INIT_FRAME_PC_FIRST
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1877 (long) current_gdbarch
->init_frame_pc_first
1878 /*INIT_FRAME_PC_FIRST ()*/);
1880 #ifdef INIT_FRAME_PC
1882 fprintf_unfiltered (file
,
1883 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1884 (long) current_gdbarch
->init_frame_pc
1885 /*INIT_FRAME_PC ()*/);
1887 #ifdef BELIEVE_PCC_PROMOTION
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1890 (long) BELIEVE_PCC_PROMOTION
);
1892 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1893 fprintf_unfiltered (file
,
1894 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1895 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1897 #ifdef COERCE_FLOAT_TO_DOUBLE
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1901 (long) current_gdbarch
->coerce_float_to_double
1902 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1904 #ifdef GET_SAVED_REGISTER
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1908 (long) current_gdbarch
->get_saved_register
1909 /*GET_SAVED_REGISTER ()*/);
1911 #ifdef REGISTER_CONVERTIBLE
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1915 (long) current_gdbarch
->register_convertible
1916 /*REGISTER_CONVERTIBLE ()*/);
1918 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1922 (long) current_gdbarch
->register_convert_to_virtual
1923 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1925 #ifdef REGISTER_CONVERT_TO_RAW
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1929 (long) current_gdbarch
->register_convert_to_raw
1930 /*REGISTER_CONVERT_TO_RAW ()*/);
1932 #ifdef FETCH_PSEUDO_REGISTER
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1936 (long) current_gdbarch
->fetch_pseudo_register
1937 /*FETCH_PSEUDO_REGISTER ()*/);
1939 #ifdef STORE_PSEUDO_REGISTER
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1943 (long) current_gdbarch
->store_pseudo_register
1944 /*STORE_PSEUDO_REGISTER ()*/);
1946 #ifdef POINTER_TO_ADDRESS
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1950 (long) current_gdbarch
->pointer_to_address
1951 /*POINTER_TO_ADDRESS ()*/);
1953 #ifdef ADDRESS_TO_POINTER
1955 fprintf_unfiltered (file
,
1956 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1957 (long) current_gdbarch
->address_to_pointer
1958 /*ADDRESS_TO_POINTER ()*/);
1960 #ifdef RETURN_VALUE_ON_STACK
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1964 (long) current_gdbarch
->return_value_on_stack
1965 /*RETURN_VALUE_ON_STACK ()*/);
1967 #ifdef EXTRACT_RETURN_VALUE
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1971 (long) current_gdbarch
->extract_return_value
1972 /*EXTRACT_RETURN_VALUE ()*/);
1974 #ifdef PUSH_ARGUMENTS
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1978 (long) current_gdbarch
->push_arguments
1979 /*PUSH_ARGUMENTS ()*/);
1981 #ifdef PUSH_DUMMY_FRAME
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1985 (long) current_gdbarch
->push_dummy_frame
1986 /*PUSH_DUMMY_FRAME ()*/);
1988 #ifdef PUSH_RETURN_ADDRESS
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1992 (long) current_gdbarch
->push_return_address
1993 /*PUSH_RETURN_ADDRESS ()*/);
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1999 (long) current_gdbarch
->pop_frame
2002 #ifdef D10V_MAKE_DADDR
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
2006 (long) current_gdbarch
->d10v_make_daddr
2007 /*D10V_MAKE_DADDR ()*/);
2009 #ifdef D10V_MAKE_IADDR
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
2013 (long) current_gdbarch
->d10v_make_iaddr
2014 /*D10V_MAKE_IADDR ()*/);
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
2020 (long) current_gdbarch
->d10v_daddr_p
2021 /*D10V_DADDR_P ()*/);
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
2027 (long) current_gdbarch
->d10v_iaddr_p
2028 /*D10V_IADDR_P ()*/);
2030 #ifdef D10V_CONVERT_DADDR_TO_RAW
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
2034 (long) current_gdbarch
->d10v_convert_daddr_to_raw
2035 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
2037 #ifdef D10V_CONVERT_IADDR_TO_RAW
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
2041 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
2042 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
2044 #ifdef STORE_STRUCT_RETURN
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
2048 (long) current_gdbarch
->store_struct_return
2049 /*STORE_STRUCT_RETURN ()*/);
2051 #ifdef STORE_RETURN_VALUE
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
2055 (long) current_gdbarch
->store_return_value
2056 /*STORE_RETURN_VALUE ()*/);
2058 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
2062 (long) current_gdbarch
->extract_struct_value_address
2063 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
2065 #ifdef USE_STRUCT_CONVENTION
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2069 (long) current_gdbarch
->use_struct_convention
2070 /*USE_STRUCT_CONVENTION ()*/);
2072 #ifdef FRAME_INIT_SAVED_REGS
2074 fprintf_unfiltered (file
,
2075 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
2076 (long) current_gdbarch
->frame_init_saved_regs
2077 /*FRAME_INIT_SAVED_REGS ()*/);
2079 #ifdef INIT_EXTRA_FRAME_INFO
2081 fprintf_unfiltered (file
,
2082 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
2083 (long) current_gdbarch
->init_extra_frame_info
2084 /*INIT_EXTRA_FRAME_INFO ()*/);
2086 #ifdef SKIP_PROLOGUE
2088 fprintf_unfiltered (file
,
2089 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
2090 (long) current_gdbarch
->skip_prologue
2091 /*SKIP_PROLOGUE ()*/);
2093 #ifdef PROLOGUE_FRAMELESS_P
2095 fprintf_unfiltered (file
,
2096 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2097 (long) current_gdbarch
->prologue_frameless_p
2098 /*PROLOGUE_FRAMELESS_P ()*/);
2102 fprintf_unfiltered (file
,
2103 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2104 (long) current_gdbarch
->inner_than
2107 #ifdef BREAKPOINT_FROM_PC
2109 fprintf_unfiltered (file
,
2110 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2111 (long) current_gdbarch
->breakpoint_from_pc
2112 /*BREAKPOINT_FROM_PC ()*/);
2114 #ifdef MEMORY_INSERT_BREAKPOINT
2116 fprintf_unfiltered (file
,
2117 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2118 (long) current_gdbarch
->memory_insert_breakpoint
2119 /*MEMORY_INSERT_BREAKPOINT ()*/);
2121 #ifdef MEMORY_REMOVE_BREAKPOINT
2123 fprintf_unfiltered (file
,
2124 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2125 (long) current_gdbarch
->memory_remove_breakpoint
2126 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2128 #ifdef DECR_PC_AFTER_BREAK
2129 fprintf_unfiltered (file
,
2130 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2131 (long) DECR_PC_AFTER_BREAK
);
2133 #ifdef PREPARE_TO_PROCEED
2135 fprintf_unfiltered (file
,
2136 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2137 (long) current_gdbarch
->prepare_to_proceed
2138 /*PREPARE_TO_PROCEED ()*/);
2140 #ifdef FUNCTION_START_OFFSET
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2143 (long) FUNCTION_START_OFFSET
);
2145 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2147 fprintf_unfiltered (file
,
2148 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2149 (long) current_gdbarch
->remote_translate_xfer_address
2150 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2152 #ifdef FRAME_ARGS_SKIP
2153 fprintf_unfiltered (file
,
2154 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2155 (long) FRAME_ARGS_SKIP
);
2157 #ifdef FRAMELESS_FUNCTION_INVOCATION
2159 fprintf_unfiltered (file
,
2160 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2161 (long) current_gdbarch
->frameless_function_invocation
2162 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2166 fprintf_unfiltered (file
,
2167 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2168 (long) current_gdbarch
->frame_chain
2169 /*FRAME_CHAIN ()*/);
2171 #ifdef FRAME_CHAIN_VALID
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2175 (long) current_gdbarch
->frame_chain_valid
2176 /*FRAME_CHAIN_VALID ()*/);
2178 #ifdef FRAME_SAVED_PC
2180 fprintf_unfiltered (file
,
2181 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2182 (long) current_gdbarch
->frame_saved_pc
2183 /*FRAME_SAVED_PC ()*/);
2185 #ifdef FRAME_ARGS_ADDRESS
2187 fprintf_unfiltered (file
,
2188 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2189 (long) current_gdbarch
->frame_args_address
2190 /*FRAME_ARGS_ADDRESS ()*/);
2192 #ifdef FRAME_LOCALS_ADDRESS
2194 fprintf_unfiltered (file
,
2195 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2196 (long) current_gdbarch
->frame_locals_address
2197 /*FRAME_LOCALS_ADDRESS ()*/);
2199 #ifdef SAVED_PC_AFTER_CALL
2201 fprintf_unfiltered (file
,
2202 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2203 (long) current_gdbarch
->saved_pc_after_call
2204 /*SAVED_PC_AFTER_CALL ()*/);
2206 #ifdef FRAME_NUM_ARGS
2208 fprintf_unfiltered (file
,
2209 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2210 (long) current_gdbarch
->frame_num_args
2211 /*FRAME_NUM_ARGS ()*/);
2215 fprintf_unfiltered (file
,
2216 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2217 (long) current_gdbarch
->stack_align
2218 /*STACK_ALIGN ()*/);
2220 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2221 fprintf_unfiltered (file
,
2222 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2223 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2225 #ifdef REG_STRUCT_HAS_ADDR
2227 fprintf_unfiltered (file
,
2228 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2229 (long) current_gdbarch
->reg_struct_has_addr
2230 /*REG_STRUCT_HAS_ADDR ()*/);
2232 #ifdef SAVE_DUMMY_FRAME_TOS
2234 fprintf_unfiltered (file
,
2235 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2236 (long) current_gdbarch
->save_dummy_frame_tos
2237 /*SAVE_DUMMY_FRAME_TOS ()*/);
2239 #ifdef PARM_BOUNDARY
2240 fprintf_unfiltered (file
,
2241 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2242 (long) PARM_BOUNDARY
);
2244 #ifdef TARGET_FLOAT_FORMAT
2245 fprintf_unfiltered (file
,
2246 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2247 (long) TARGET_FLOAT_FORMAT
);
2249 #ifdef TARGET_DOUBLE_FORMAT
2250 fprintf_unfiltered (file
,
2251 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2252 (long) TARGET_DOUBLE_FORMAT
);
2254 #ifdef TARGET_LONG_DOUBLE_FORMAT
2255 fprintf_unfiltered (file
,
2256 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2257 (long) TARGET_LONG_DOUBLE_FORMAT
);
2259 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2261 fprintf_unfiltered (file
,
2262 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2263 (long) current_gdbarch
->convert_from_func_ptr_addr
2264 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2266 #ifdef ADDR_BITS_REMOVE
2268 fprintf_unfiltered (file
,
2269 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
2270 (long) current_gdbarch
->addr_bits_remove
2271 /*ADDR_BITS_REMOVE ()*/);
2273 #ifdef SOFTWARE_SINGLE_STEP
2275 fprintf_unfiltered (file
,
2276 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2277 (long) current_gdbarch
->software_single_step
2278 /*SOFTWARE_SINGLE_STEP ()*/);
2280 if (current_gdbarch
->dump_tdep
!= NULL
)
2281 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2284 struct gdbarch_tdep
*
2285 gdbarch_tdep (struct gdbarch
*gdbarch
)
2287 if (gdbarch_debug
>= 2)
2288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2289 return gdbarch
->tdep
;
2293 const struct bfd_arch_info
*
2294 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2296 if (gdbarch_debug
>= 2)
2297 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2298 return gdbarch
->bfd_arch_info
;
2302 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2304 if (gdbarch_debug
>= 2)
2305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2306 return gdbarch
->byte_order
;
2310 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2312 /* Skip verify of short_bit, invalid_p == 0 */
2313 if (gdbarch_debug
>= 2)
2314 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2315 return gdbarch
->short_bit
;
2319 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2322 gdbarch
->short_bit
= short_bit
;
2326 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2328 /* Skip verify of int_bit, invalid_p == 0 */
2329 if (gdbarch_debug
>= 2)
2330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2331 return gdbarch
->int_bit
;
2335 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2338 gdbarch
->int_bit
= int_bit
;
2342 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2344 /* Skip verify of long_bit, invalid_p == 0 */
2345 if (gdbarch_debug
>= 2)
2346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2347 return gdbarch
->long_bit
;
2351 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2354 gdbarch
->long_bit
= long_bit
;
2358 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2360 /* Skip verify of long_long_bit, invalid_p == 0 */
2361 if (gdbarch_debug
>= 2)
2362 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2363 return gdbarch
->long_long_bit
;
2367 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2370 gdbarch
->long_long_bit
= long_long_bit
;
2374 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2376 /* Skip verify of float_bit, invalid_p == 0 */
2377 if (gdbarch_debug
>= 2)
2378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2379 return gdbarch
->float_bit
;
2383 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2386 gdbarch
->float_bit
= float_bit
;
2390 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2392 /* Skip verify of double_bit, invalid_p == 0 */
2393 if (gdbarch_debug
>= 2)
2394 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2395 return gdbarch
->double_bit
;
2399 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2402 gdbarch
->double_bit
= double_bit
;
2406 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2408 /* Skip verify of long_double_bit, invalid_p == 0 */
2409 if (gdbarch_debug
>= 2)
2410 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2411 return gdbarch
->long_double_bit
;
2415 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2416 int long_double_bit
)
2418 gdbarch
->long_double_bit
= long_double_bit
;
2422 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2424 /* Skip verify of ptr_bit, invalid_p == 0 */
2425 if (gdbarch_debug
>= 2)
2426 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2427 return gdbarch
->ptr_bit
;
2431 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2434 gdbarch
->ptr_bit
= ptr_bit
;
2438 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2440 if (gdbarch
->addr_bit
== 0)
2441 internal_error (__FILE__
, __LINE__
,
2442 "gdbarch: gdbarch_addr_bit invalid");
2443 if (gdbarch_debug
>= 2)
2444 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2445 return gdbarch
->addr_bit
;
2449 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2452 gdbarch
->addr_bit
= addr_bit
;
2456 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2458 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2459 if (gdbarch_debug
>= 2)
2460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2461 return gdbarch
->bfd_vma_bit
;
2465 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2468 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2472 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2474 /* Skip verify of ieee_float, invalid_p == 0 */
2475 if (gdbarch_debug
>= 2)
2476 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2477 return gdbarch
->ieee_float
;
2481 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2484 gdbarch
->ieee_float
= ieee_float
;
2488 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2490 if (gdbarch
->read_pc
== 0)
2491 internal_error (__FILE__
, __LINE__
,
2492 "gdbarch: gdbarch_read_pc invalid");
2493 if (gdbarch_debug
>= 2)
2494 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2495 return gdbarch
->read_pc (ptid
);
2499 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2500 gdbarch_read_pc_ftype read_pc
)
2502 gdbarch
->read_pc
= read_pc
;
2506 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2508 if (gdbarch
->write_pc
== 0)
2509 internal_error (__FILE__
, __LINE__
,
2510 "gdbarch: gdbarch_write_pc invalid");
2511 if (gdbarch_debug
>= 2)
2512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2513 gdbarch
->write_pc (val
, ptid
);
2517 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2518 gdbarch_write_pc_ftype write_pc
)
2520 gdbarch
->write_pc
= write_pc
;
2524 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2526 if (gdbarch
->read_fp
== 0)
2527 internal_error (__FILE__
, __LINE__
,
2528 "gdbarch: gdbarch_read_fp invalid");
2529 if (gdbarch_debug
>= 2)
2530 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2531 return gdbarch
->read_fp ();
2535 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2536 gdbarch_read_fp_ftype read_fp
)
2538 gdbarch
->read_fp
= read_fp
;
2542 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2544 if (gdbarch
->write_fp
== 0)
2545 internal_error (__FILE__
, __LINE__
,
2546 "gdbarch: gdbarch_write_fp invalid");
2547 if (gdbarch_debug
>= 2)
2548 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2549 gdbarch
->write_fp (val
);
2553 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2554 gdbarch_write_fp_ftype write_fp
)
2556 gdbarch
->write_fp
= write_fp
;
2560 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2562 if (gdbarch
->read_sp
== 0)
2563 internal_error (__FILE__
, __LINE__
,
2564 "gdbarch: gdbarch_read_sp invalid");
2565 if (gdbarch_debug
>= 2)
2566 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2567 return gdbarch
->read_sp ();
2571 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2572 gdbarch_read_sp_ftype read_sp
)
2574 gdbarch
->read_sp
= read_sp
;
2578 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2580 if (gdbarch
->write_sp
== 0)
2581 internal_error (__FILE__
, __LINE__
,
2582 "gdbarch: gdbarch_write_sp invalid");
2583 if (gdbarch_debug
>= 2)
2584 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2585 gdbarch
->write_sp (val
);
2589 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2590 gdbarch_write_sp_ftype write_sp
)
2592 gdbarch
->write_sp
= write_sp
;
2596 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2598 return gdbarch
->register_read
!= 0;
2602 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2604 if (gdbarch
->register_read
== 0)
2605 internal_error (__FILE__
, __LINE__
,
2606 "gdbarch: gdbarch_register_read invalid");
2607 if (gdbarch_debug
>= 2)
2608 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2609 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2613 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2614 gdbarch_register_read_ftype register_read
)
2616 gdbarch
->register_read
= register_read
;
2620 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2622 return gdbarch
->register_write
!= 0;
2626 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2628 if (gdbarch
->register_write
== 0)
2629 internal_error (__FILE__
, __LINE__
,
2630 "gdbarch: gdbarch_register_write invalid");
2631 if (gdbarch_debug
>= 2)
2632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2633 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2637 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2638 gdbarch_register_write_ftype register_write
)
2640 gdbarch
->register_write
= register_write
;
2644 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2646 if (gdbarch
->num_regs
== -1)
2647 internal_error (__FILE__
, __LINE__
,
2648 "gdbarch: gdbarch_num_regs invalid");
2649 if (gdbarch_debug
>= 2)
2650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2651 return gdbarch
->num_regs
;
2655 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2658 gdbarch
->num_regs
= num_regs
;
2662 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2664 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2665 if (gdbarch_debug
>= 2)
2666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2667 return gdbarch
->num_pseudo_regs
;
2671 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2672 int num_pseudo_regs
)
2674 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2678 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2680 if (gdbarch
->sp_regnum
== -1)
2681 internal_error (__FILE__
, __LINE__
,
2682 "gdbarch: gdbarch_sp_regnum invalid");
2683 if (gdbarch_debug
>= 2)
2684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2685 return gdbarch
->sp_regnum
;
2689 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2692 gdbarch
->sp_regnum
= sp_regnum
;
2696 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2698 if (gdbarch
->fp_regnum
== -1)
2699 internal_error (__FILE__
, __LINE__
,
2700 "gdbarch: gdbarch_fp_regnum invalid");
2701 if (gdbarch_debug
>= 2)
2702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2703 return gdbarch
->fp_regnum
;
2707 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2710 gdbarch
->fp_regnum
= fp_regnum
;
2714 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2716 if (gdbarch
->pc_regnum
== -1)
2717 internal_error (__FILE__
, __LINE__
,
2718 "gdbarch: gdbarch_pc_regnum invalid");
2719 if (gdbarch_debug
>= 2)
2720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2721 return gdbarch
->pc_regnum
;
2725 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2728 gdbarch
->pc_regnum
= pc_regnum
;
2732 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2734 /* Skip verify of fp0_regnum, invalid_p == 0 */
2735 if (gdbarch_debug
>= 2)
2736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2737 return gdbarch
->fp0_regnum
;
2741 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2744 gdbarch
->fp0_regnum
= fp0_regnum
;
2748 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2750 /* Skip verify of npc_regnum, invalid_p == 0 */
2751 if (gdbarch_debug
>= 2)
2752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2753 return gdbarch
->npc_regnum
;
2757 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2760 gdbarch
->npc_regnum
= npc_regnum
;
2764 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2766 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2767 if (gdbarch_debug
>= 2)
2768 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2769 return gdbarch
->nnpc_regnum
;
2773 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2776 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2780 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2782 if (gdbarch
->stab_reg_to_regnum
== 0)
2783 internal_error (__FILE__
, __LINE__
,
2784 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2785 if (gdbarch_debug
>= 2)
2786 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2787 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2791 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2792 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2794 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2798 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2800 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2801 internal_error (__FILE__
, __LINE__
,
2802 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2803 if (gdbarch_debug
>= 2)
2804 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2805 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2809 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2810 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2812 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2816 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2818 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2819 internal_error (__FILE__
, __LINE__
,
2820 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2821 if (gdbarch_debug
>= 2)
2822 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2823 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2827 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2828 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2830 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2834 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2836 if (gdbarch
->sdb_reg_to_regnum
== 0)
2837 internal_error (__FILE__
, __LINE__
,
2838 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2839 if (gdbarch_debug
>= 2)
2840 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2841 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2845 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2846 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2848 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2852 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2854 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2855 internal_error (__FILE__
, __LINE__
,
2856 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2857 if (gdbarch_debug
>= 2)
2858 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2859 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2863 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2864 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2866 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2870 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2872 if (gdbarch
->register_name
== 0)
2873 internal_error (__FILE__
, __LINE__
,
2874 "gdbarch: gdbarch_register_name invalid");
2875 if (gdbarch_debug
>= 2)
2876 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2877 return gdbarch
->register_name (regnr
);
2881 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2882 gdbarch_register_name_ftype register_name
)
2884 gdbarch
->register_name
= register_name
;
2888 gdbarch_register_size (struct gdbarch
*gdbarch
)
2890 if (gdbarch
->register_size
== -1)
2891 internal_error (__FILE__
, __LINE__
,
2892 "gdbarch: gdbarch_register_size invalid");
2893 if (gdbarch_debug
>= 2)
2894 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2895 return gdbarch
->register_size
;
2899 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2902 gdbarch
->register_size
= register_size
;
2906 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2908 if (gdbarch
->register_bytes
== -1)
2909 internal_error (__FILE__
, __LINE__
,
2910 "gdbarch: gdbarch_register_bytes invalid");
2911 if (gdbarch_debug
>= 2)
2912 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2913 return gdbarch
->register_bytes
;
2917 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2920 gdbarch
->register_bytes
= register_bytes
;
2924 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2926 if (gdbarch
->register_byte
== 0)
2927 internal_error (__FILE__
, __LINE__
,
2928 "gdbarch: gdbarch_register_byte invalid");
2929 if (gdbarch_debug
>= 2)
2930 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2931 return gdbarch
->register_byte (reg_nr
);
2935 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2936 gdbarch_register_byte_ftype register_byte
)
2938 gdbarch
->register_byte
= register_byte
;
2942 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2944 if (gdbarch
->register_raw_size
== 0)
2945 internal_error (__FILE__
, __LINE__
,
2946 "gdbarch: gdbarch_register_raw_size invalid");
2947 if (gdbarch_debug
>= 2)
2948 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2949 return gdbarch
->register_raw_size (reg_nr
);
2953 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2954 gdbarch_register_raw_size_ftype register_raw_size
)
2956 gdbarch
->register_raw_size
= register_raw_size
;
2960 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2962 if (gdbarch
->max_register_raw_size
== -1)
2963 internal_error (__FILE__
, __LINE__
,
2964 "gdbarch: gdbarch_max_register_raw_size invalid");
2965 if (gdbarch_debug
>= 2)
2966 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2967 return gdbarch
->max_register_raw_size
;
2971 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2972 int max_register_raw_size
)
2974 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2978 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2980 if (gdbarch
->register_virtual_size
== 0)
2981 internal_error (__FILE__
, __LINE__
,
2982 "gdbarch: gdbarch_register_virtual_size invalid");
2983 if (gdbarch_debug
>= 2)
2984 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2985 return gdbarch
->register_virtual_size (reg_nr
);
2989 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2990 gdbarch_register_virtual_size_ftype register_virtual_size
)
2992 gdbarch
->register_virtual_size
= register_virtual_size
;
2996 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2998 if (gdbarch
->max_register_virtual_size
== -1)
2999 internal_error (__FILE__
, __LINE__
,
3000 "gdbarch: gdbarch_max_register_virtual_size invalid");
3001 if (gdbarch_debug
>= 2)
3002 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
3003 return gdbarch
->max_register_virtual_size
;
3007 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
3008 int max_register_virtual_size
)
3010 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
3014 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
3016 if (gdbarch
->register_virtual_type
== 0)
3017 internal_error (__FILE__
, __LINE__
,
3018 "gdbarch: gdbarch_register_virtual_type invalid");
3019 if (gdbarch_debug
>= 2)
3020 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
3021 return gdbarch
->register_virtual_type (reg_nr
);
3025 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
3026 gdbarch_register_virtual_type_ftype register_virtual_type
)
3028 gdbarch
->register_virtual_type
= register_virtual_type
;
3032 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
3034 if (gdbarch
->do_registers_info
== 0)
3035 internal_error (__FILE__
, __LINE__
,
3036 "gdbarch: gdbarch_do_registers_info invalid");
3037 if (gdbarch_debug
>= 2)
3038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
3039 gdbarch
->do_registers_info (reg_nr
, fpregs
);
3043 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
3044 gdbarch_do_registers_info_ftype do_registers_info
)
3046 gdbarch
->do_registers_info
= do_registers_info
;
3050 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
3052 if (gdbarch
->register_sim_regno
== 0)
3053 internal_error (__FILE__
, __LINE__
,
3054 "gdbarch: gdbarch_register_sim_regno invalid");
3055 if (gdbarch_debug
>= 2)
3056 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
3057 return gdbarch
->register_sim_regno (reg_nr
);
3061 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
3062 gdbarch_register_sim_regno_ftype register_sim_regno
)
3064 gdbarch
->register_sim_regno
= register_sim_regno
;
3068 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3070 return gdbarch
->register_bytes_ok
!= 0;
3074 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3076 if (gdbarch
->register_bytes_ok
== 0)
3077 internal_error (__FILE__
, __LINE__
,
3078 "gdbarch: gdbarch_register_bytes_ok invalid");
3079 if (gdbarch_debug
>= 2)
3080 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3081 return gdbarch
->register_bytes_ok (nr_bytes
);
3085 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3086 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3088 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3092 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int reg_nr
)
3094 if (gdbarch
->cannot_fetch_register
== 0)
3095 internal_error (__FILE__
, __LINE__
,
3096 "gdbarch: gdbarch_cannot_fetch_register invalid");
3097 if (gdbarch_debug
>= 2)
3098 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3099 return gdbarch
->cannot_fetch_register (reg_nr
);
3103 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3104 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3106 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3110 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int reg_nr
)
3112 if (gdbarch
->cannot_store_register
== 0)
3113 internal_error (__FILE__
, __LINE__
,
3114 "gdbarch: gdbarch_cannot_store_register invalid");
3115 if (gdbarch_debug
>= 2)
3116 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3117 return gdbarch
->cannot_store_register (reg_nr
);
3121 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3122 gdbarch_cannot_store_register_ftype cannot_store_register
)
3124 gdbarch
->cannot_store_register
= cannot_store_register
;
3128 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3130 if (gdbarch
->use_generic_dummy_frames
== -1)
3131 internal_error (__FILE__
, __LINE__
,
3132 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3133 if (gdbarch_debug
>= 2)
3134 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3135 return gdbarch
->use_generic_dummy_frames
;
3139 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3140 int use_generic_dummy_frames
)
3142 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3146 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3148 if (gdbarch
->call_dummy_location
== 0)
3149 internal_error (__FILE__
, __LINE__
,
3150 "gdbarch: gdbarch_call_dummy_location invalid");
3151 if (gdbarch_debug
>= 2)
3152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3153 return gdbarch
->call_dummy_location
;
3157 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3158 int call_dummy_location
)
3160 gdbarch
->call_dummy_location
= call_dummy_location
;
3164 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3166 if (gdbarch
->call_dummy_address
== 0)
3167 internal_error (__FILE__
, __LINE__
,
3168 "gdbarch: gdbarch_call_dummy_address invalid");
3169 if (gdbarch_debug
>= 2)
3170 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3171 return gdbarch
->call_dummy_address ();
3175 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3176 gdbarch_call_dummy_address_ftype call_dummy_address
)
3178 gdbarch
->call_dummy_address
= call_dummy_address
;
3182 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3184 if (gdbarch
->call_dummy_start_offset
== -1)
3185 internal_error (__FILE__
, __LINE__
,
3186 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3187 if (gdbarch_debug
>= 2)
3188 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3189 return gdbarch
->call_dummy_start_offset
;
3193 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3194 CORE_ADDR call_dummy_start_offset
)
3196 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3200 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3202 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3203 internal_error (__FILE__
, __LINE__
,
3204 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3205 if (gdbarch_debug
>= 2)
3206 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3207 return gdbarch
->call_dummy_breakpoint_offset
;
3211 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3212 CORE_ADDR call_dummy_breakpoint_offset
)
3214 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3218 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3220 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3221 internal_error (__FILE__
, __LINE__
,
3222 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3223 if (gdbarch_debug
>= 2)
3224 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3225 return gdbarch
->call_dummy_breakpoint_offset_p
;
3229 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3230 int call_dummy_breakpoint_offset_p
)
3232 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3236 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3238 if (gdbarch
->call_dummy_length
== -1)
3239 internal_error (__FILE__
, __LINE__
,
3240 "gdbarch: gdbarch_call_dummy_length invalid");
3241 if (gdbarch_debug
>= 2)
3242 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3243 return gdbarch
->call_dummy_length
;
3247 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3248 int call_dummy_length
)
3250 gdbarch
->call_dummy_length
= call_dummy_length
;
3254 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3256 if (gdbarch
->pc_in_call_dummy
== 0)
3257 internal_error (__FILE__
, __LINE__
,
3258 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3259 if (gdbarch_debug
>= 2)
3260 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3261 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3265 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3266 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3268 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3272 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3274 if (gdbarch
->call_dummy_p
== -1)
3275 internal_error (__FILE__
, __LINE__
,
3276 "gdbarch: gdbarch_call_dummy_p invalid");
3277 if (gdbarch_debug
>= 2)
3278 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3279 return gdbarch
->call_dummy_p
;
3283 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3286 gdbarch
->call_dummy_p
= call_dummy_p
;
3290 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3292 /* Skip verify of call_dummy_words, invalid_p == 0 */
3293 if (gdbarch_debug
>= 2)
3294 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3295 return gdbarch
->call_dummy_words
;
3299 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3300 LONGEST
* call_dummy_words
)
3302 gdbarch
->call_dummy_words
= call_dummy_words
;
3306 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3308 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3311 return gdbarch
->sizeof_call_dummy_words
;
3315 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3316 int sizeof_call_dummy_words
)
3318 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3322 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3324 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3325 internal_error (__FILE__
, __LINE__
,
3326 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3327 if (gdbarch_debug
>= 2)
3328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3329 return gdbarch
->call_dummy_stack_adjust_p
;
3333 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3334 int call_dummy_stack_adjust_p
)
3336 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3340 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3342 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3343 internal_error (__FILE__
, __LINE__
,
3344 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3345 if (gdbarch_debug
>= 2)
3346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3347 return gdbarch
->call_dummy_stack_adjust
;
3351 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3352 int call_dummy_stack_adjust
)
3354 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3358 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
)
3360 if (gdbarch
->fix_call_dummy
== 0)
3361 internal_error (__FILE__
, __LINE__
,
3362 "gdbarch: gdbarch_fix_call_dummy invalid");
3363 if (gdbarch_debug
>= 2)
3364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3365 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3369 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3370 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3372 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3376 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3378 if (gdbarch
->init_frame_pc_first
== 0)
3379 internal_error (__FILE__
, __LINE__
,
3380 "gdbarch: gdbarch_init_frame_pc_first invalid");
3381 if (gdbarch_debug
>= 2)
3382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3383 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3387 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3388 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3390 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3394 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3396 if (gdbarch
->init_frame_pc
== 0)
3397 internal_error (__FILE__
, __LINE__
,
3398 "gdbarch: gdbarch_init_frame_pc invalid");
3399 if (gdbarch_debug
>= 2)
3400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3401 gdbarch
->init_frame_pc (fromleaf
, prev
);
3405 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3406 gdbarch_init_frame_pc_ftype init_frame_pc
)
3408 gdbarch
->init_frame_pc
= init_frame_pc
;
3412 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3414 if (gdbarch_debug
>= 2)
3415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3416 return gdbarch
->believe_pcc_promotion
;
3420 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3421 int believe_pcc_promotion
)
3423 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3427 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3429 if (gdbarch_debug
>= 2)
3430 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3431 return gdbarch
->believe_pcc_promotion_type
;
3435 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3436 int believe_pcc_promotion_type
)
3438 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3442 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3444 if (gdbarch
->coerce_float_to_double
== 0)
3445 internal_error (__FILE__
, __LINE__
,
3446 "gdbarch: gdbarch_coerce_float_to_double invalid");
3447 if (gdbarch_debug
>= 2)
3448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3449 return gdbarch
->coerce_float_to_double (formal
, actual
);
3453 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3454 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3456 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3460 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
)
3462 if (gdbarch
->get_saved_register
== 0)
3463 internal_error (__FILE__
, __LINE__
,
3464 "gdbarch: gdbarch_get_saved_register invalid");
3465 if (gdbarch_debug
>= 2)
3466 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3467 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3471 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3472 gdbarch_get_saved_register_ftype get_saved_register
)
3474 gdbarch
->get_saved_register
= get_saved_register
;
3478 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3480 if (gdbarch
->register_convertible
== 0)
3481 internal_error (__FILE__
, __LINE__
,
3482 "gdbarch: gdbarch_register_convertible invalid");
3483 if (gdbarch_debug
>= 2)
3484 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3485 return gdbarch
->register_convertible (nr
);
3489 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3490 gdbarch_register_convertible_ftype register_convertible
)
3492 gdbarch
->register_convertible
= register_convertible
;
3496 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3498 if (gdbarch
->register_convert_to_virtual
== 0)
3499 internal_error (__FILE__
, __LINE__
,
3500 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3501 if (gdbarch_debug
>= 2)
3502 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3503 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3507 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3508 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3510 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3514 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3516 if (gdbarch
->register_convert_to_raw
== 0)
3517 internal_error (__FILE__
, __LINE__
,
3518 "gdbarch: gdbarch_register_convert_to_raw invalid");
3519 if (gdbarch_debug
>= 2)
3520 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3521 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3525 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3526 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3528 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3532 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3534 if (gdbarch
->fetch_pseudo_register
== 0)
3535 internal_error (__FILE__
, __LINE__
,
3536 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3537 if (gdbarch_debug
>= 2)
3538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3539 gdbarch
->fetch_pseudo_register (regnum
);
3543 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3544 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3546 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3550 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3552 if (gdbarch
->store_pseudo_register
== 0)
3553 internal_error (__FILE__
, __LINE__
,
3554 "gdbarch: gdbarch_store_pseudo_register invalid");
3555 if (gdbarch_debug
>= 2)
3556 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3557 gdbarch
->store_pseudo_register (regnum
);
3561 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3562 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3564 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3568 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3570 if (gdbarch
->pointer_to_address
== 0)
3571 internal_error (__FILE__
, __LINE__
,
3572 "gdbarch: gdbarch_pointer_to_address invalid");
3573 if (gdbarch_debug
>= 2)
3574 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3575 return gdbarch
->pointer_to_address (type
, buf
);
3579 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3580 gdbarch_pointer_to_address_ftype pointer_to_address
)
3582 gdbarch
->pointer_to_address
= pointer_to_address
;
3586 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3588 if (gdbarch
->address_to_pointer
== 0)
3589 internal_error (__FILE__
, __LINE__
,
3590 "gdbarch: gdbarch_address_to_pointer invalid");
3591 if (gdbarch_debug
>= 2)
3592 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3593 gdbarch
->address_to_pointer (type
, buf
, addr
);
3597 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3598 gdbarch_address_to_pointer_ftype address_to_pointer
)
3600 gdbarch
->address_to_pointer
= address_to_pointer
;
3604 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3606 if (gdbarch
->return_value_on_stack
== 0)
3607 internal_error (__FILE__
, __LINE__
,
3608 "gdbarch: gdbarch_return_value_on_stack invalid");
3609 if (gdbarch_debug
>= 2)
3610 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3611 return gdbarch
->return_value_on_stack (type
);
3615 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3616 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3618 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3622 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3624 if (gdbarch
->extract_return_value
== 0)
3625 internal_error (__FILE__
, __LINE__
,
3626 "gdbarch: gdbarch_extract_return_value invalid");
3627 if (gdbarch_debug
>= 2)
3628 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3629 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3633 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3634 gdbarch_extract_return_value_ftype extract_return_value
)
3636 gdbarch
->extract_return_value
= extract_return_value
;
3640 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3642 if (gdbarch
->push_arguments
== 0)
3643 internal_error (__FILE__
, __LINE__
,
3644 "gdbarch: gdbarch_push_arguments invalid");
3645 if (gdbarch_debug
>= 2)
3646 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3647 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3651 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3652 gdbarch_push_arguments_ftype push_arguments
)
3654 gdbarch
->push_arguments
= push_arguments
;
3658 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3660 if (gdbarch
->push_dummy_frame
== 0)
3661 internal_error (__FILE__
, __LINE__
,
3662 "gdbarch: gdbarch_push_dummy_frame invalid");
3663 if (gdbarch_debug
>= 2)
3664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3665 gdbarch
->push_dummy_frame ();
3669 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3670 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3672 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3676 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3678 if (gdbarch
->push_return_address
== 0)
3679 internal_error (__FILE__
, __LINE__
,
3680 "gdbarch: gdbarch_push_return_address invalid");
3681 if (gdbarch_debug
>= 2)
3682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3683 return gdbarch
->push_return_address (pc
, sp
);
3687 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3688 gdbarch_push_return_address_ftype push_return_address
)
3690 gdbarch
->push_return_address
= push_return_address
;
3694 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3696 if (gdbarch
->pop_frame
== 0)
3697 internal_error (__FILE__
, __LINE__
,
3698 "gdbarch: gdbarch_pop_frame invalid");
3699 if (gdbarch_debug
>= 2)
3700 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3701 gdbarch
->pop_frame ();
3705 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3706 gdbarch_pop_frame_ftype pop_frame
)
3708 gdbarch
->pop_frame
= pop_frame
;
3712 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3714 if (gdbarch
->d10v_make_daddr
== 0)
3715 internal_error (__FILE__
, __LINE__
,
3716 "gdbarch: gdbarch_d10v_make_daddr invalid");
3717 if (gdbarch_debug
>= 2)
3718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3719 return gdbarch
->d10v_make_daddr (x
);
3723 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3724 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3726 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3730 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3732 if (gdbarch
->d10v_make_iaddr
== 0)
3733 internal_error (__FILE__
, __LINE__
,
3734 "gdbarch: gdbarch_d10v_make_iaddr invalid");
3735 if (gdbarch_debug
>= 2)
3736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3737 return gdbarch
->d10v_make_iaddr (x
);
3741 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3742 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3744 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3748 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3750 if (gdbarch
->d10v_daddr_p
== 0)
3751 internal_error (__FILE__
, __LINE__
,
3752 "gdbarch: gdbarch_d10v_daddr_p invalid");
3753 if (gdbarch_debug
>= 2)
3754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3755 return gdbarch
->d10v_daddr_p (x
);
3759 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3760 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3762 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3766 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3768 if (gdbarch
->d10v_iaddr_p
== 0)
3769 internal_error (__FILE__
, __LINE__
,
3770 "gdbarch: gdbarch_d10v_iaddr_p invalid");
3771 if (gdbarch_debug
>= 2)
3772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3773 return gdbarch
->d10v_iaddr_p (x
);
3777 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3778 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3780 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3784 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3786 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3787 internal_error (__FILE__
, __LINE__
,
3788 "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3789 if (gdbarch_debug
>= 2)
3790 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3791 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3795 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3796 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3798 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3802 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3804 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3805 internal_error (__FILE__
, __LINE__
,
3806 "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3807 if (gdbarch_debug
>= 2)
3808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3809 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3813 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3814 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3816 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3820 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3822 if (gdbarch
->store_struct_return
== 0)
3823 internal_error (__FILE__
, __LINE__
,
3824 "gdbarch: gdbarch_store_struct_return invalid");
3825 if (gdbarch_debug
>= 2)
3826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3827 gdbarch
->store_struct_return (addr
, sp
);
3831 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3832 gdbarch_store_struct_return_ftype store_struct_return
)
3834 gdbarch
->store_struct_return
= store_struct_return
;
3838 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3840 if (gdbarch
->store_return_value
== 0)
3841 internal_error (__FILE__
, __LINE__
,
3842 "gdbarch: gdbarch_store_return_value invalid");
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3845 gdbarch
->store_return_value (type
, valbuf
);
3849 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3850 gdbarch_store_return_value_ftype store_return_value
)
3852 gdbarch
->store_return_value
= store_return_value
;
3856 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3858 return gdbarch
->extract_struct_value_address
!= 0;
3862 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3864 if (gdbarch
->extract_struct_value_address
== 0)
3865 internal_error (__FILE__
, __LINE__
,
3866 "gdbarch: gdbarch_extract_struct_value_address invalid");
3867 if (gdbarch_debug
>= 2)
3868 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3869 return gdbarch
->extract_struct_value_address (regbuf
);
3873 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3874 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3876 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3880 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3882 if (gdbarch
->use_struct_convention
== 0)
3883 internal_error (__FILE__
, __LINE__
,
3884 "gdbarch: gdbarch_use_struct_convention invalid");
3885 if (gdbarch_debug
>= 2)
3886 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3887 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3891 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3892 gdbarch_use_struct_convention_ftype use_struct_convention
)
3894 gdbarch
->use_struct_convention
= use_struct_convention
;
3898 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3900 if (gdbarch
->frame_init_saved_regs
== 0)
3901 internal_error (__FILE__
, __LINE__
,
3902 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3903 if (gdbarch_debug
>= 2)
3904 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3905 gdbarch
->frame_init_saved_regs (frame
);
3909 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3910 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3912 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3916 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3918 if (gdbarch
->init_extra_frame_info
== 0)
3919 internal_error (__FILE__
, __LINE__
,
3920 "gdbarch: gdbarch_init_extra_frame_info invalid");
3921 if (gdbarch_debug
>= 2)
3922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3923 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3927 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3928 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3930 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3934 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3936 if (gdbarch
->skip_prologue
== 0)
3937 internal_error (__FILE__
, __LINE__
,
3938 "gdbarch: gdbarch_skip_prologue invalid");
3939 if (gdbarch_debug
>= 2)
3940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3941 return gdbarch
->skip_prologue (ip
);
3945 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3946 gdbarch_skip_prologue_ftype skip_prologue
)
3948 gdbarch
->skip_prologue
= skip_prologue
;
3952 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3954 if (gdbarch
->prologue_frameless_p
== 0)
3955 internal_error (__FILE__
, __LINE__
,
3956 "gdbarch: gdbarch_prologue_frameless_p invalid");
3957 if (gdbarch_debug
>= 2)
3958 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3959 return gdbarch
->prologue_frameless_p (ip
);
3963 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3964 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3966 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3970 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3972 if (gdbarch
->inner_than
== 0)
3973 internal_error (__FILE__
, __LINE__
,
3974 "gdbarch: gdbarch_inner_than invalid");
3975 if (gdbarch_debug
>= 2)
3976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3977 return gdbarch
->inner_than (lhs
, rhs
);
3981 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3982 gdbarch_inner_than_ftype inner_than
)
3984 gdbarch
->inner_than
= inner_than
;
3988 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3990 if (gdbarch
->breakpoint_from_pc
== 0)
3991 internal_error (__FILE__
, __LINE__
,
3992 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3993 if (gdbarch_debug
>= 2)
3994 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3995 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3999 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
4000 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
4002 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
4006 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4008 if (gdbarch
->memory_insert_breakpoint
== 0)
4009 internal_error (__FILE__
, __LINE__
,
4010 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
4011 if (gdbarch_debug
>= 2)
4012 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
4013 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
4017 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
4018 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
4020 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
4024 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
4026 if (gdbarch
->memory_remove_breakpoint
== 0)
4027 internal_error (__FILE__
, __LINE__
,
4028 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
4029 if (gdbarch_debug
>= 2)
4030 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
4031 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
4035 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
4036 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
4038 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
4042 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
4044 if (gdbarch
->decr_pc_after_break
== -1)
4045 internal_error (__FILE__
, __LINE__
,
4046 "gdbarch: gdbarch_decr_pc_after_break invalid");
4047 if (gdbarch_debug
>= 2)
4048 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
4049 return gdbarch
->decr_pc_after_break
;
4053 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
4054 CORE_ADDR decr_pc_after_break
)
4056 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
4060 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
4062 if (gdbarch
->prepare_to_proceed
== 0)
4063 internal_error (__FILE__
, __LINE__
,
4064 "gdbarch: gdbarch_prepare_to_proceed invalid");
4065 if (gdbarch_debug
>= 2)
4066 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
4067 return gdbarch
->prepare_to_proceed (select_it
);
4071 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
4072 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
4074 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
4078 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
4080 if (gdbarch
->function_start_offset
== -1)
4081 internal_error (__FILE__
, __LINE__
,
4082 "gdbarch: gdbarch_function_start_offset invalid");
4083 if (gdbarch_debug
>= 2)
4084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
4085 return gdbarch
->function_start_offset
;
4089 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
4090 CORE_ADDR function_start_offset
)
4092 gdbarch
->function_start_offset
= function_start_offset
;
4096 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
4098 if (gdbarch
->remote_translate_xfer_address
== 0)
4099 internal_error (__FILE__
, __LINE__
,
4100 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
4101 if (gdbarch_debug
>= 2)
4102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
4103 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
4107 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
4108 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
4110 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
4114 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
4116 if (gdbarch
->frame_args_skip
== -1)
4117 internal_error (__FILE__
, __LINE__
,
4118 "gdbarch: gdbarch_frame_args_skip invalid");
4119 if (gdbarch_debug
>= 2)
4120 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
4121 return gdbarch
->frame_args_skip
;
4125 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
4126 CORE_ADDR frame_args_skip
)
4128 gdbarch
->frame_args_skip
= frame_args_skip
;
4132 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4134 if (gdbarch
->frameless_function_invocation
== 0)
4135 internal_error (__FILE__
, __LINE__
,
4136 "gdbarch: gdbarch_frameless_function_invocation invalid");
4137 if (gdbarch_debug
>= 2)
4138 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
4139 return gdbarch
->frameless_function_invocation (fi
);
4143 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4144 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4146 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4150 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4152 if (gdbarch
->frame_chain
== 0)
4153 internal_error (__FILE__
, __LINE__
,
4154 "gdbarch: gdbarch_frame_chain invalid");
4155 if (gdbarch_debug
>= 2)
4156 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4157 return gdbarch
->frame_chain (frame
);
4161 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4162 gdbarch_frame_chain_ftype frame_chain
)
4164 gdbarch
->frame_chain
= frame_chain
;
4168 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4170 if (gdbarch
->frame_chain_valid
== 0)
4171 internal_error (__FILE__
, __LINE__
,
4172 "gdbarch: gdbarch_frame_chain_valid invalid");
4173 if (gdbarch_debug
>= 2)
4174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4175 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4179 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4180 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4182 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4186 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4188 if (gdbarch
->frame_saved_pc
== 0)
4189 internal_error (__FILE__
, __LINE__
,
4190 "gdbarch: gdbarch_frame_saved_pc invalid");
4191 if (gdbarch_debug
>= 2)
4192 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4193 return gdbarch
->frame_saved_pc (fi
);
4197 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4198 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4200 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4204 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4206 if (gdbarch
->frame_args_address
== 0)
4207 internal_error (__FILE__
, __LINE__
,
4208 "gdbarch: gdbarch_frame_args_address invalid");
4209 if (gdbarch_debug
>= 2)
4210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4211 return gdbarch
->frame_args_address (fi
);
4215 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4216 gdbarch_frame_args_address_ftype frame_args_address
)
4218 gdbarch
->frame_args_address
= frame_args_address
;
4222 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4224 if (gdbarch
->frame_locals_address
== 0)
4225 internal_error (__FILE__
, __LINE__
,
4226 "gdbarch: gdbarch_frame_locals_address invalid");
4227 if (gdbarch_debug
>= 2)
4228 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4229 return gdbarch
->frame_locals_address (fi
);
4233 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4234 gdbarch_frame_locals_address_ftype frame_locals_address
)
4236 gdbarch
->frame_locals_address
= frame_locals_address
;
4240 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4242 if (gdbarch
->saved_pc_after_call
== 0)
4243 internal_error (__FILE__
, __LINE__
,
4244 "gdbarch: gdbarch_saved_pc_after_call invalid");
4245 if (gdbarch_debug
>= 2)
4246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4247 return gdbarch
->saved_pc_after_call (frame
);
4251 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4252 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4254 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4258 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4260 if (gdbarch
->frame_num_args
== 0)
4261 internal_error (__FILE__
, __LINE__
,
4262 "gdbarch: gdbarch_frame_num_args invalid");
4263 if (gdbarch_debug
>= 2)
4264 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4265 return gdbarch
->frame_num_args (frame
);
4269 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4270 gdbarch_frame_num_args_ftype frame_num_args
)
4272 gdbarch
->frame_num_args
= frame_num_args
;
4276 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4278 return gdbarch
->stack_align
!= 0;
4282 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4284 if (gdbarch
->stack_align
== 0)
4285 internal_error (__FILE__
, __LINE__
,
4286 "gdbarch: gdbarch_stack_align invalid");
4287 if (gdbarch_debug
>= 2)
4288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4289 return gdbarch
->stack_align (sp
);
4293 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4294 gdbarch_stack_align_ftype stack_align
)
4296 gdbarch
->stack_align
= stack_align
;
4300 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4302 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4303 if (gdbarch_debug
>= 2)
4304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4305 return gdbarch
->extra_stack_alignment_needed
;
4309 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4310 int extra_stack_alignment_needed
)
4312 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4316 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4318 return gdbarch
->reg_struct_has_addr
!= 0;
4322 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4324 if (gdbarch
->reg_struct_has_addr
== 0)
4325 internal_error (__FILE__
, __LINE__
,
4326 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4327 if (gdbarch_debug
>= 2)
4328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4329 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4333 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4334 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4336 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4340 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4342 return gdbarch
->save_dummy_frame_tos
!= 0;
4346 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4348 if (gdbarch
->save_dummy_frame_tos
== 0)
4349 internal_error (__FILE__
, __LINE__
,
4350 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4351 if (gdbarch_debug
>= 2)
4352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4353 gdbarch
->save_dummy_frame_tos (sp
);
4357 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4358 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4360 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4364 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4366 if (gdbarch_debug
>= 2)
4367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4368 return gdbarch
->parm_boundary
;
4372 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4375 gdbarch
->parm_boundary
= parm_boundary
;
4378 const struct floatformat
*
4379 gdbarch_float_format (struct gdbarch
*gdbarch
)
4381 if (gdbarch_debug
>= 2)
4382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4383 return gdbarch
->float_format
;
4387 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4388 const struct floatformat
* float_format
)
4390 gdbarch
->float_format
= float_format
;
4393 const struct floatformat
*
4394 gdbarch_double_format (struct gdbarch
*gdbarch
)
4396 if (gdbarch_debug
>= 2)
4397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4398 return gdbarch
->double_format
;
4402 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4403 const struct floatformat
* double_format
)
4405 gdbarch
->double_format
= double_format
;
4408 const struct floatformat
*
4409 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4411 if (gdbarch_debug
>= 2)
4412 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4413 return gdbarch
->long_double_format
;
4417 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4418 const struct floatformat
* long_double_format
)
4420 gdbarch
->long_double_format
= long_double_format
;
4424 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4426 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4427 internal_error (__FILE__
, __LINE__
,
4428 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4429 if (gdbarch_debug
>= 2)
4430 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4431 return gdbarch
->convert_from_func_ptr_addr (addr
);
4435 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4436 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4438 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4442 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4444 if (gdbarch
->addr_bits_remove
== 0)
4445 internal_error (__FILE__
, __LINE__
,
4446 "gdbarch: gdbarch_addr_bits_remove invalid");
4447 if (gdbarch_debug
>= 2)
4448 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4449 return gdbarch
->addr_bits_remove (addr
);
4453 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4454 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4456 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4460 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4462 return gdbarch
->software_single_step
!= 0;
4466 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4468 if (gdbarch
->software_single_step
== 0)
4469 internal_error (__FILE__
, __LINE__
,
4470 "gdbarch: gdbarch_software_single_step invalid");
4471 if (gdbarch_debug
>= 2)
4472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4473 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4477 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4478 gdbarch_software_single_step_ftype software_single_step
)
4480 gdbarch
->software_single_step
= software_single_step
;
4484 /* Keep a registry of per-architecture data-pointers required by GDB
4490 gdbarch_data_init_ftype
*init
;
4491 gdbarch_data_free_ftype
*free
;
4494 struct gdbarch_data_registration
4496 struct gdbarch_data
*data
;
4497 struct gdbarch_data_registration
*next
;
4500 struct gdbarch_data_registry
4503 struct gdbarch_data_registration
*registrations
;
4506 struct gdbarch_data_registry gdbarch_data_registry
=
4511 struct gdbarch_data
*
4512 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4513 gdbarch_data_free_ftype
*free
)
4515 struct gdbarch_data_registration
**curr
;
4516 for (curr
= &gdbarch_data_registry
.registrations
;
4518 curr
= &(*curr
)->next
);
4519 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4520 (*curr
)->next
= NULL
;
4521 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4522 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4523 (*curr
)->data
->init
= init
;
4524 (*curr
)->data
->free
= free
;
4525 return (*curr
)->data
;
4529 /* Walk through all the registered users initializing each in turn. */
4532 init_gdbarch_data (struct gdbarch
*gdbarch
)
4534 struct gdbarch_data_registration
*rego
;
4535 for (rego
= gdbarch_data_registry
.registrations
;
4539 struct gdbarch_data
*data
= rego
->data
;
4540 gdb_assert (data
->index
< gdbarch
->nr_data
);
4541 if (data
->init
!= NULL
)
4543 void *pointer
= data
->init (gdbarch
);
4544 set_gdbarch_data (gdbarch
, data
, pointer
);
4549 /* Create/delete the gdbarch data vector. */
4552 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4554 gdb_assert (gdbarch
->data
== NULL
);
4555 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4556 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4560 free_gdbarch_data (struct gdbarch
*gdbarch
)
4562 struct gdbarch_data_registration
*rego
;
4563 gdb_assert (gdbarch
->data
!= NULL
);
4564 for (rego
= gdbarch_data_registry
.registrations
;
4568 struct gdbarch_data
*data
= rego
->data
;
4569 gdb_assert (data
->index
< gdbarch
->nr_data
);
4570 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4572 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4573 gdbarch
->data
[data
->index
] = NULL
;
4576 xfree (gdbarch
->data
);
4577 gdbarch
->data
= NULL
;
4581 /* Initialize the current value of thee specified per-architecture
4585 set_gdbarch_data (struct gdbarch
*gdbarch
,
4586 struct gdbarch_data
*data
,
4589 gdb_assert (data
->index
< gdbarch
->nr_data
);
4590 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4591 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4592 gdbarch
->data
[data
->index
] = pointer
;
4595 /* Return the current value of the specified per-architecture
4599 gdbarch_data (struct gdbarch_data
*data
)
4601 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4602 return current_gdbarch
->data
[data
->index
];
4607 /* Keep a registry of swapped data required by GDB modules. */
4612 struct gdbarch_swap_registration
*source
;
4613 struct gdbarch_swap
*next
;
4616 struct gdbarch_swap_registration
4619 unsigned long sizeof_data
;
4620 gdbarch_swap_ftype
*init
;
4621 struct gdbarch_swap_registration
*next
;
4624 struct gdbarch_swap_registry
4627 struct gdbarch_swap_registration
*registrations
;
4630 struct gdbarch_swap_registry gdbarch_swap_registry
=
4636 register_gdbarch_swap (void *data
,
4637 unsigned long sizeof_data
,
4638 gdbarch_swap_ftype
*init
)
4640 struct gdbarch_swap_registration
**rego
;
4641 for (rego
= &gdbarch_swap_registry
.registrations
;
4643 rego
= &(*rego
)->next
);
4644 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4645 (*rego
)->next
= NULL
;
4646 (*rego
)->init
= init
;
4647 (*rego
)->data
= data
;
4648 (*rego
)->sizeof_data
= sizeof_data
;
4653 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4655 struct gdbarch_swap_registration
*rego
;
4656 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4657 for (rego
= gdbarch_swap_registry
.registrations
;
4661 if (rego
->data
!= NULL
)
4663 (*curr
) = XMALLOC (struct gdbarch_swap
);
4664 (*curr
)->source
= rego
;
4665 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4666 (*curr
)->next
= NULL
;
4667 memset (rego
->data
, 0, rego
->sizeof_data
);
4668 curr
= &(*curr
)->next
;
4670 if (rego
->init
!= NULL
)
4676 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4678 struct gdbarch_swap
*curr
;
4679 for (curr
= gdbarch
->swap
;
4682 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4686 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4688 struct gdbarch_swap
*curr
;
4689 for (curr
= gdbarch
->swap
;
4692 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4696 /* Keep a registry of the architectures known by GDB. */
4698 struct gdbarch_registration
4700 enum bfd_architecture bfd_architecture
;
4701 gdbarch_init_ftype
*init
;
4702 gdbarch_dump_tdep_ftype
*dump_tdep
;
4703 struct gdbarch_list
*arches
;
4704 struct gdbarch_registration
*next
;
4707 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4710 append_name (const char ***buf
, int *nr
, const char *name
)
4712 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4718 gdbarch_printable_names (void)
4722 /* Accumulate a list of names based on the registed list of
4724 enum bfd_architecture a
;
4726 const char **arches
= NULL
;
4727 struct gdbarch_registration
*rego
;
4728 for (rego
= gdbarch_registry
;
4732 const struct bfd_arch_info
*ap
;
4733 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4735 internal_error (__FILE__
, __LINE__
,
4736 "gdbarch_architecture_names: multi-arch unknown");
4739 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4744 append_name (&arches
, &nr_arches
, NULL
);
4748 /* Just return all the architectures that BFD knows. Assume that
4749 the legacy architecture framework supports them. */
4750 return bfd_arch_list ();
4755 gdbarch_register (enum bfd_architecture bfd_architecture
,
4756 gdbarch_init_ftype
*init
,
4757 gdbarch_dump_tdep_ftype
*dump_tdep
)
4759 struct gdbarch_registration
**curr
;
4760 const struct bfd_arch_info
*bfd_arch_info
;
4761 /* Check that BFD recognizes this architecture */
4762 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4763 if (bfd_arch_info
== NULL
)
4765 internal_error (__FILE__
, __LINE__
,
4766 "gdbarch: Attempt to register unknown architecture (%d)",
4769 /* Check that we haven't seen this architecture before */
4770 for (curr
= &gdbarch_registry
;
4772 curr
= &(*curr
)->next
)
4774 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4775 internal_error (__FILE__
, __LINE__
,
4776 "gdbarch: Duplicate registraration of architecture (%s)",
4777 bfd_arch_info
->printable_name
);
4781 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4782 bfd_arch_info
->printable_name
,
4785 (*curr
) = XMALLOC (struct gdbarch_registration
);
4786 (*curr
)->bfd_architecture
= bfd_architecture
;
4787 (*curr
)->init
= init
;
4788 (*curr
)->dump_tdep
= dump_tdep
;
4789 (*curr
)->arches
= NULL
;
4790 (*curr
)->next
= NULL
;
4791 /* When non- multi-arch, install whatever target dump routine we've
4792 been provided - hopefully that routine has been written correctly
4793 and works regardless of multi-arch. */
4794 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4795 && startup_gdbarch
.dump_tdep
== NULL
)
4796 startup_gdbarch
.dump_tdep
= dump_tdep
;
4800 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4801 gdbarch_init_ftype
*init
)
4803 gdbarch_register (bfd_architecture
, init
, NULL
);
4807 /* Look for an architecture using gdbarch_info. Base search on only
4808 BFD_ARCH_INFO and BYTE_ORDER. */
4810 struct gdbarch_list
*
4811 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4812 const struct gdbarch_info
*info
)
4814 for (; arches
!= NULL
; arches
= arches
->next
)
4816 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4818 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4826 /* Update the current architecture. Return ZERO if the update request
4830 gdbarch_update_p (struct gdbarch_info info
)
4832 struct gdbarch
*new_gdbarch
;
4833 struct gdbarch_list
**list
;
4834 struct gdbarch_registration
*rego
;
4836 /* Fill in missing parts of the INFO struct using a number of
4837 sources: ``set ...''; INFOabfd supplied; existing target. */
4839 /* ``(gdb) set architecture ...'' */
4840 if (info
.bfd_arch_info
== NULL
4841 && !TARGET_ARCHITECTURE_AUTO
)
4842 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4843 if (info
.bfd_arch_info
== NULL
4844 && info
.abfd
!= NULL
4845 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4846 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4847 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4848 if (info
.bfd_arch_info
== NULL
)
4849 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4851 /* ``(gdb) set byte-order ...'' */
4852 if (info
.byte_order
== 0
4853 && !TARGET_BYTE_ORDER_AUTO
)
4854 info
.byte_order
= TARGET_BYTE_ORDER
;
4855 /* From the INFO struct. */
4856 if (info
.byte_order
== 0
4857 && info
.abfd
!= NULL
)
4858 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4859 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4861 /* From the current target. */
4862 if (info
.byte_order
== 0)
4863 info
.byte_order
= TARGET_BYTE_ORDER
;
4865 /* Must have found some sort of architecture. */
4866 gdb_assert (info
.bfd_arch_info
!= NULL
);
4870 fprintf_unfiltered (gdb_stdlog
,
4871 "gdbarch_update: info.bfd_arch_info %s\n",
4872 (info
.bfd_arch_info
!= NULL
4873 ? info
.bfd_arch_info
->printable_name
4875 fprintf_unfiltered (gdb_stdlog
,
4876 "gdbarch_update: info.byte_order %d (%s)\n",
4878 (info
.byte_order
== BIG_ENDIAN
? "big"
4879 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4881 fprintf_unfiltered (gdb_stdlog
,
4882 "gdbarch_update: info.abfd 0x%lx\n",
4884 fprintf_unfiltered (gdb_stdlog
,
4885 "gdbarch_update: info.tdep_info 0x%lx\n",
4886 (long) info
.tdep_info
);
4889 /* Find the target that knows about this architecture. */
4890 for (rego
= gdbarch_registry
;
4893 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4902 /* Ask the target for a replacement architecture. */
4903 new_gdbarch
= rego
->init (info
, rego
->arches
);
4905 /* Did the target like it? No. Reject the change. */
4906 if (new_gdbarch
== NULL
)
4909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4913 /* Did the architecture change? No. Do nothing. */
4914 if (current_gdbarch
== new_gdbarch
)
4917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4919 new_gdbarch
->bfd_arch_info
->printable_name
);
4923 /* Swap all data belonging to the old target out */
4924 swapout_gdbarch_swap (current_gdbarch
);
4926 /* Is this a pre-existing architecture? Yes. Swap it in. */
4927 for (list
= ®o
->arches
;
4929 list
= &(*list
)->next
)
4931 if ((*list
)->gdbarch
== new_gdbarch
)
4934 fprintf_unfiltered (gdb_stdlog
,
4935 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4937 new_gdbarch
->bfd_arch_info
->printable_name
);
4938 current_gdbarch
= new_gdbarch
;
4939 swapin_gdbarch_swap (new_gdbarch
);
4944 /* Append this new architecture to this targets list. */
4945 (*list
) = XMALLOC (struct gdbarch_list
);
4946 (*list
)->next
= NULL
;
4947 (*list
)->gdbarch
= new_gdbarch
;
4949 /* Switch to this new architecture. Dump it out. */
4950 current_gdbarch
= new_gdbarch
;
4953 fprintf_unfiltered (gdb_stdlog
,
4954 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4956 new_gdbarch
->bfd_arch_info
->printable_name
);
4959 /* Check that the newly installed architecture is valid. Plug in
4960 any post init values. */
4961 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4962 verify_gdbarch (new_gdbarch
);
4964 /* Initialize the per-architecture memory (swap) areas.
4965 CURRENT_GDBARCH must be update before these modules are
4967 init_gdbarch_swap (new_gdbarch
);
4969 /* Initialize the per-architecture data-pointer of all parties that
4970 registered an interest in this architecture. CURRENT_GDBARCH
4971 must be updated before these modules are called. */
4972 init_gdbarch_data (new_gdbarch
);
4975 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4983 /* Pointer to the target-dependent disassembly function. */
4984 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4985 disassemble_info tm_print_insn_info
;
4988 extern void _initialize_gdbarch (void);
4991 _initialize_gdbarch (void)
4993 struct cmd_list_element
*c
;
4995 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4996 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4997 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4998 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4999 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
5001 add_show_from_set (add_set_cmd ("arch",
5004 (char *)&gdbarch_debug
,
5005 "Set architecture debugging.\n\
5006 When non-zero, architecture debugging is enabled.", &setdebuglist
),
5008 c
= add_set_cmd ("archdebug",
5011 (char *)&gdbarch_debug
,
5012 "Set architecture debugging.\n\
5013 When non-zero, architecture debugging is enabled.", &setlist
);
5015 deprecate_cmd (c
, "set debug arch");
5016 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");