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_store_struct_return_ftype
*store_struct_return
;
215 gdbarch_store_return_value_ftype
*store_return_value
;
216 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
217 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
218 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
219 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
220 gdbarch_skip_prologue_ftype
*skip_prologue
;
221 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
222 gdbarch_inner_than_ftype
*inner_than
;
223 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
224 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
225 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
226 CORE_ADDR decr_pc_after_break
;
227 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
228 CORE_ADDR function_start_offset
;
229 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
230 CORE_ADDR frame_args_skip
;
231 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
232 gdbarch_frame_chain_ftype
*frame_chain
;
233 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
234 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
235 gdbarch_frame_args_address_ftype
*frame_args_address
;
236 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
237 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
238 gdbarch_frame_num_args_ftype
*frame_num_args
;
239 gdbarch_stack_align_ftype
*stack_align
;
240 int extra_stack_alignment_needed
;
241 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
242 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
244 const struct floatformat
* float_format
;
245 const struct floatformat
* double_format
;
246 const struct floatformat
* long_double_format
;
247 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
248 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
249 gdbarch_software_single_step_ftype
*software_single_step
;
253 /* The default architecture uses host values (for want of a better
256 extern const struct bfd_arch_info bfd_default_arch_struct
;
258 struct gdbarch startup_gdbarch
=
260 /* basic architecture information */
261 &bfd_default_arch_struct
,
263 /* target specific vector and its dump routine */
265 /*per-architecture data-pointers and swap regions */
267 /* Multi-arch values */
271 8 * sizeof (LONGEST
),
274 8 * sizeof (long double),
333 generic_get_saved_register
,
383 /* startup_gdbarch() */
386 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
388 /* Do any initialization needed for a non-multiarch configuration
389 after the _initialize_MODULE functions have been run. */
391 initialize_non_multiarch ()
393 alloc_gdbarch_data (&startup_gdbarch
);
394 init_gdbarch_data (&startup_gdbarch
);
398 /* Create a new ``struct gdbarch'' based on information provided by
399 ``struct gdbarch_info''. */
402 gdbarch_alloc (const struct gdbarch_info
*info
,
403 struct gdbarch_tdep
*tdep
)
405 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
406 memset (gdbarch
, 0, sizeof (*gdbarch
));
408 alloc_gdbarch_data (gdbarch
);
410 gdbarch
->tdep
= tdep
;
412 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
413 gdbarch
->byte_order
= info
->byte_order
;
415 /* Force the explicit initialization of these. */
416 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
417 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
418 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
419 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
420 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
421 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
422 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
423 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
424 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
425 gdbarch
->read_pc
= generic_target_read_pc
;
426 gdbarch
->write_pc
= generic_target_write_pc
;
427 gdbarch
->read_fp
= generic_target_read_fp
;
428 gdbarch
->write_fp
= generic_target_write_fp
;
429 gdbarch
->read_sp
= generic_target_read_sp
;
430 gdbarch
->write_sp
= generic_target_write_sp
;
431 gdbarch
->num_regs
= -1;
432 gdbarch
->sp_regnum
= -1;
433 gdbarch
->fp_regnum
= -1;
434 gdbarch
->pc_regnum
= -1;
435 gdbarch
->fp0_regnum
= -1;
436 gdbarch
->npc_regnum
= -1;
437 gdbarch
->nnpc_regnum
= -1;
438 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
439 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
440 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
441 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
442 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
443 gdbarch
->register_name
= legacy_register_name
;
444 gdbarch
->register_size
= -1;
445 gdbarch
->register_bytes
= -1;
446 gdbarch
->max_register_raw_size
= -1;
447 gdbarch
->max_register_virtual_size
= -1;
448 gdbarch
->do_registers_info
= do_registers_info
;
449 gdbarch
->register_sim_regno
= default_register_sim_regno
;
450 gdbarch
->cannot_fetch_register
= cannot_register_not
;
451 gdbarch
->cannot_store_register
= cannot_register_not
;
452 gdbarch
->use_generic_dummy_frames
= -1;
453 gdbarch
->call_dummy_start_offset
= -1;
454 gdbarch
->call_dummy_breakpoint_offset
= -1;
455 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
456 gdbarch
->call_dummy_length
= -1;
457 gdbarch
->call_dummy_p
= -1;
458 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
459 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
460 gdbarch
->call_dummy_stack_adjust_p
= -1;
461 gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
462 gdbarch
->init_frame_pc
= init_frame_pc_default
;
463 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
464 gdbarch
->register_convertible
= generic_register_convertible_not
;
465 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
466 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
467 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
468 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
469 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
470 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
471 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
472 gdbarch
->decr_pc_after_break
= -1;
473 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
474 gdbarch
->function_start_offset
= -1;
475 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
476 gdbarch
->frame_args_skip
= -1;
477 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
478 gdbarch
->extra_stack_alignment_needed
= 1;
479 gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
480 gdbarch
->addr_bits_remove
= core_addr_identity
;
481 /* gdbarch_alloc() */
487 /* Free a gdbarch struct. This should never happen in normal
488 operation --- once you've created a gdbarch, you keep it around.
489 However, if an architecture's init function encounters an error
490 building the structure, it may need to clean up a partially
491 constructed gdbarch. */
494 gdbarch_free (struct gdbarch
*arch
)
496 gdb_assert (arch
!= NULL
);
497 free_gdbarch_data (arch
);
502 /* Ensure that all values in a GDBARCH are reasonable. */
505 verify_gdbarch (struct gdbarch
*gdbarch
)
507 /* Only perform sanity checks on a multi-arch target. */
511 if (gdbarch
->byte_order
== 0)
512 internal_error (__FILE__
, __LINE__
,
513 "verify_gdbarch: byte-order unset");
514 if (gdbarch
->bfd_arch_info
== NULL
)
515 internal_error (__FILE__
, __LINE__
,
516 "verify_gdbarch: bfd_arch_info unset");
517 /* Check those that need to be defined for the given multi-arch level. */
518 /* Skip verify of short_bit, invalid_p == 0 */
519 /* Skip verify of int_bit, invalid_p == 0 */
520 /* Skip verify of long_bit, invalid_p == 0 */
521 /* Skip verify of long_long_bit, invalid_p == 0 */
522 /* Skip verify of float_bit, invalid_p == 0 */
523 /* Skip verify of double_bit, invalid_p == 0 */
524 /* Skip verify of long_double_bit, invalid_p == 0 */
525 /* Skip verify of ptr_bit, invalid_p == 0 */
526 if (gdbarch
->addr_bit
== 0)
527 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
528 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
529 /* Skip verify of ieee_float, invalid_p == 0 */
530 /* Skip verify of read_pc, invalid_p == 0 */
531 /* Skip verify of write_pc, invalid_p == 0 */
532 /* Skip verify of read_fp, invalid_p == 0 */
533 /* Skip verify of write_fp, invalid_p == 0 */
534 /* Skip verify of read_sp, invalid_p == 0 */
535 /* Skip verify of write_sp, invalid_p == 0 */
536 /* Skip verify of register_read, has predicate */
537 /* Skip verify of register_write, has predicate */
538 if ((GDB_MULTI_ARCH
>= 2)
539 && (gdbarch
->num_regs
== -1))
540 internal_error (__FILE__
, __LINE__
,
541 "gdbarch: verify_gdbarch: num_regs invalid");
542 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
543 if ((GDB_MULTI_ARCH
>= 2)
544 && (gdbarch
->sp_regnum
== -1))
545 internal_error (__FILE__
, __LINE__
,
546 "gdbarch: verify_gdbarch: sp_regnum invalid");
547 if ((GDB_MULTI_ARCH
>= 2)
548 && (gdbarch
->fp_regnum
== -1))
549 internal_error (__FILE__
, __LINE__
,
550 "gdbarch: verify_gdbarch: fp_regnum invalid");
551 if ((GDB_MULTI_ARCH
>= 2)
552 && (gdbarch
->pc_regnum
== -1))
553 internal_error (__FILE__
, __LINE__
,
554 "gdbarch: verify_gdbarch: pc_regnum invalid");
555 /* Skip verify of fp0_regnum, invalid_p == 0 */
556 /* Skip verify of npc_regnum, invalid_p == 0 */
557 /* Skip verify of nnpc_regnum, invalid_p == 0 */
558 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
559 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
560 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
561 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
562 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
563 /* Skip verify of register_name, invalid_p == 0 */
564 if ((GDB_MULTI_ARCH
>= 2)
565 && (gdbarch
->register_size
== -1))
566 internal_error (__FILE__
, __LINE__
,
567 "gdbarch: verify_gdbarch: register_size invalid");
568 if ((GDB_MULTI_ARCH
>= 2)
569 && (gdbarch
->register_bytes
== -1))
570 internal_error (__FILE__
, __LINE__
,
571 "gdbarch: verify_gdbarch: register_bytes invalid");
572 if ((GDB_MULTI_ARCH
>= 2)
573 && (gdbarch
->register_byte
== 0))
574 internal_error (__FILE__
, __LINE__
,
575 "gdbarch: verify_gdbarch: register_byte invalid");
576 if ((GDB_MULTI_ARCH
>= 2)
577 && (gdbarch
->register_raw_size
== 0))
578 internal_error (__FILE__
, __LINE__
,
579 "gdbarch: verify_gdbarch: register_raw_size invalid");
580 if ((GDB_MULTI_ARCH
>= 2)
581 && (gdbarch
->max_register_raw_size
== -1))
582 internal_error (__FILE__
, __LINE__
,
583 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
584 if ((GDB_MULTI_ARCH
>= 2)
585 && (gdbarch
->register_virtual_size
== 0))
586 internal_error (__FILE__
, __LINE__
,
587 "gdbarch: verify_gdbarch: register_virtual_size invalid");
588 if ((GDB_MULTI_ARCH
>= 2)
589 && (gdbarch
->max_register_virtual_size
== -1))
590 internal_error (__FILE__
, __LINE__
,
591 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
592 if ((GDB_MULTI_ARCH
>= 2)
593 && (gdbarch
->register_virtual_type
== 0))
594 internal_error (__FILE__
, __LINE__
,
595 "gdbarch: verify_gdbarch: register_virtual_type invalid");
596 /* Skip verify of do_registers_info, invalid_p == 0 */
597 /* Skip verify of register_sim_regno, invalid_p == 0 */
598 /* Skip verify of register_bytes_ok, has predicate */
599 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
600 /* Skip verify of cannot_store_register, invalid_p == 0 */
601 if ((GDB_MULTI_ARCH
>= 1)
602 && (gdbarch
->use_generic_dummy_frames
== -1))
603 internal_error (__FILE__
, __LINE__
,
604 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
605 if ((GDB_MULTI_ARCH
>= 2)
606 && (gdbarch
->call_dummy_location
== 0))
607 internal_error (__FILE__
, __LINE__
,
608 "gdbarch: verify_gdbarch: call_dummy_location invalid");
609 if ((GDB_MULTI_ARCH
>= 2)
610 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
611 internal_error (__FILE__
, __LINE__
,
612 "gdbarch: verify_gdbarch: call_dummy_address invalid");
613 if ((GDB_MULTI_ARCH
>= 2)
614 && (gdbarch
->call_dummy_start_offset
== -1))
615 internal_error (__FILE__
, __LINE__
,
616 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
617 if ((GDB_MULTI_ARCH
>= 2)
618 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
619 internal_error (__FILE__
, __LINE__
,
620 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
621 if ((GDB_MULTI_ARCH
>= 1)
622 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
623 internal_error (__FILE__
, __LINE__
,
624 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
625 if ((GDB_MULTI_ARCH
>= 2)
626 && (gdbarch
->call_dummy_length
== -1))
627 internal_error (__FILE__
, __LINE__
,
628 "gdbarch: verify_gdbarch: call_dummy_length invalid");
629 if ((GDB_MULTI_ARCH
>= 2)
630 && (gdbarch
->pc_in_call_dummy
== 0))
631 internal_error (__FILE__
, __LINE__
,
632 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
633 if ((GDB_MULTI_ARCH
>= 1)
634 && (gdbarch
->call_dummy_p
== -1))
635 internal_error (__FILE__
, __LINE__
,
636 "gdbarch: verify_gdbarch: call_dummy_p invalid");
637 /* Skip verify of call_dummy_words, invalid_p == 0 */
638 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
639 if ((GDB_MULTI_ARCH
>= 1)
640 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
641 internal_error (__FILE__
, __LINE__
,
642 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
643 if ((GDB_MULTI_ARCH
>= 2)
644 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
645 internal_error (__FILE__
, __LINE__
,
646 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
647 if ((GDB_MULTI_ARCH
>= 2)
648 && (gdbarch
->fix_call_dummy
== 0))
649 internal_error (__FILE__
, __LINE__
,
650 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
651 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
652 /* Skip verify of init_frame_pc, invalid_p == 0 */
653 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
654 if ((GDB_MULTI_ARCH
>= 1)
655 && (gdbarch
->get_saved_register
== 0))
656 internal_error (__FILE__
, __LINE__
,
657 "gdbarch: verify_gdbarch: get_saved_register invalid");
658 /* Skip verify of register_convertible, invalid_p == 0 */
659 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
660 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
661 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
662 /* Skip verify of store_pseudo_register, invalid_p == 0 */
663 /* Skip verify of pointer_to_address, invalid_p == 0 */
664 /* Skip verify of address_to_pointer, invalid_p == 0 */
665 /* Skip verify of return_value_on_stack, invalid_p == 0 */
666 if ((GDB_MULTI_ARCH
>= 2)
667 && (gdbarch
->extract_return_value
== 0))
668 internal_error (__FILE__
, __LINE__
,
669 "gdbarch: verify_gdbarch: extract_return_value invalid");
670 if ((GDB_MULTI_ARCH
>= 1)
671 && (gdbarch
->push_arguments
== 0))
672 internal_error (__FILE__
, __LINE__
,
673 "gdbarch: verify_gdbarch: push_arguments invalid");
674 if ((GDB_MULTI_ARCH
>= 2)
675 && (gdbarch
->push_dummy_frame
== 0))
676 internal_error (__FILE__
, __LINE__
,
677 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
678 if ((GDB_MULTI_ARCH
>= 1)
679 && (gdbarch
->push_return_address
== 0))
680 internal_error (__FILE__
, __LINE__
,
681 "gdbarch: verify_gdbarch: push_return_address invalid");
682 if ((GDB_MULTI_ARCH
>= 2)
683 && (gdbarch
->pop_frame
== 0))
684 internal_error (__FILE__
, __LINE__
,
685 "gdbarch: verify_gdbarch: pop_frame invalid");
686 if ((GDB_MULTI_ARCH
>= 2)
687 && (gdbarch
->store_struct_return
== 0))
688 internal_error (__FILE__
, __LINE__
,
689 "gdbarch: verify_gdbarch: store_struct_return invalid");
690 if ((GDB_MULTI_ARCH
>= 2)
691 && (gdbarch
->store_return_value
== 0))
692 internal_error (__FILE__
, __LINE__
,
693 "gdbarch: verify_gdbarch: store_return_value invalid");
694 /* Skip verify of extract_struct_value_address, has predicate */
695 if ((GDB_MULTI_ARCH
>= 2)
696 && (gdbarch
->use_struct_convention
== 0))
697 internal_error (__FILE__
, __LINE__
,
698 "gdbarch: verify_gdbarch: use_struct_convention invalid");
699 if ((GDB_MULTI_ARCH
>= 2)
700 && (gdbarch
->frame_init_saved_regs
== 0))
701 internal_error (__FILE__
, __LINE__
,
702 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
703 if ((GDB_MULTI_ARCH
>= 2)
704 && (gdbarch
->init_extra_frame_info
== 0))
705 internal_error (__FILE__
, __LINE__
,
706 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
707 if ((GDB_MULTI_ARCH
>= 2)
708 && (gdbarch
->skip_prologue
== 0))
709 internal_error (__FILE__
, __LINE__
,
710 "gdbarch: verify_gdbarch: skip_prologue invalid");
711 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
712 if ((GDB_MULTI_ARCH
>= 2)
713 && (gdbarch
->inner_than
== 0))
714 internal_error (__FILE__
, __LINE__
,
715 "gdbarch: verify_gdbarch: inner_than invalid");
716 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
717 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
718 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
719 if ((GDB_MULTI_ARCH
>= 2)
720 && (gdbarch
->decr_pc_after_break
== -1))
721 internal_error (__FILE__
, __LINE__
,
722 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
723 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
724 if ((GDB_MULTI_ARCH
>= 2)
725 && (gdbarch
->function_start_offset
== -1))
726 internal_error (__FILE__
, __LINE__
,
727 "gdbarch: verify_gdbarch: function_start_offset invalid");
728 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
729 if ((GDB_MULTI_ARCH
>= 2)
730 && (gdbarch
->frame_args_skip
== -1))
731 internal_error (__FILE__
, __LINE__
,
732 "gdbarch: verify_gdbarch: frame_args_skip invalid");
733 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
734 if ((GDB_MULTI_ARCH
>= 2)
735 && (gdbarch
->frame_chain
== 0))
736 internal_error (__FILE__
, __LINE__
,
737 "gdbarch: verify_gdbarch: frame_chain invalid");
738 if ((GDB_MULTI_ARCH
>= 1)
739 && (gdbarch
->frame_chain_valid
== 0))
740 internal_error (__FILE__
, __LINE__
,
741 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
742 if ((GDB_MULTI_ARCH
>= 2)
743 && (gdbarch
->frame_saved_pc
== 0))
744 internal_error (__FILE__
, __LINE__
,
745 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
746 if ((GDB_MULTI_ARCH
>= 2)
747 && (gdbarch
->frame_args_address
== 0))
748 internal_error (__FILE__
, __LINE__
,
749 "gdbarch: verify_gdbarch: frame_args_address invalid");
750 if ((GDB_MULTI_ARCH
>= 2)
751 && (gdbarch
->frame_locals_address
== 0))
752 internal_error (__FILE__
, __LINE__
,
753 "gdbarch: verify_gdbarch: frame_locals_address invalid");
754 if ((GDB_MULTI_ARCH
>= 2)
755 && (gdbarch
->saved_pc_after_call
== 0))
756 internal_error (__FILE__
, __LINE__
,
757 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
758 if ((GDB_MULTI_ARCH
>= 2)
759 && (gdbarch
->frame_num_args
== 0))
760 internal_error (__FILE__
, __LINE__
,
761 "gdbarch: verify_gdbarch: frame_num_args invalid");
762 /* Skip verify of stack_align, has predicate */
763 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
764 /* Skip verify of reg_struct_has_addr, has predicate */
765 /* Skip verify of save_dummy_frame_tos, has predicate */
766 if (gdbarch
->float_format
== 0)
767 gdbarch
->float_format
= default_float_format (gdbarch
);
768 if (gdbarch
->double_format
== 0)
769 gdbarch
->double_format
= default_double_format (gdbarch
);
770 if (gdbarch
->long_double_format
== 0)
771 gdbarch
->long_double_format
= &floatformat_unknown
;
772 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
773 /* Skip verify of addr_bits_remove, invalid_p == 0 */
774 /* Skip verify of software_single_step, has predicate */
778 /* Print out the details of the current architecture. */
780 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
781 just happens to match the global variable ``current_gdbarch''. That
782 way macros refering to that variable get the local and not the global
783 version - ulgh. Once everything is parameterised with gdbarch, this
787 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
789 fprintf_unfiltered (file
,
790 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
792 #ifdef TARGET_ARCHITECTURE
793 fprintf_unfiltered (file
,
794 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
795 XSTRING (TARGET_ARCHITECTURE
));
797 #ifdef TARGET_BYTE_ORDER
798 fprintf_unfiltered (file
,
799 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
800 XSTRING (TARGET_BYTE_ORDER
));
802 #ifdef TARGET_SHORT_BIT
803 fprintf_unfiltered (file
,
804 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
805 XSTRING (TARGET_SHORT_BIT
));
807 #ifdef TARGET_INT_BIT
808 fprintf_unfiltered (file
,
809 "gdbarch_dump: TARGET_INT_BIT # %s\n",
810 XSTRING (TARGET_INT_BIT
));
812 #ifdef TARGET_LONG_BIT
813 fprintf_unfiltered (file
,
814 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
815 XSTRING (TARGET_LONG_BIT
));
817 #ifdef TARGET_LONG_LONG_BIT
818 fprintf_unfiltered (file
,
819 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
820 XSTRING (TARGET_LONG_LONG_BIT
));
822 #ifdef TARGET_FLOAT_BIT
823 fprintf_unfiltered (file
,
824 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
825 XSTRING (TARGET_FLOAT_BIT
));
827 #ifdef TARGET_DOUBLE_BIT
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
830 XSTRING (TARGET_DOUBLE_BIT
));
832 #ifdef TARGET_LONG_DOUBLE_BIT
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
835 XSTRING (TARGET_LONG_DOUBLE_BIT
));
837 #ifdef TARGET_PTR_BIT
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
840 XSTRING (TARGET_PTR_BIT
));
842 #ifdef TARGET_ADDR_BIT
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
845 XSTRING (TARGET_ADDR_BIT
));
847 #ifdef TARGET_BFD_VMA_BIT
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
850 XSTRING (TARGET_BFD_VMA_BIT
));
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: IEEE_FLOAT # %s\n",
855 XSTRING (IEEE_FLOAT
));
857 #ifdef TARGET_READ_PC
858 fprintf_unfiltered (file
,
859 "gdbarch_dump: %s # %s\n",
860 "TARGET_READ_PC(ptid)",
861 XSTRING (TARGET_READ_PC (ptid
)));
863 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
864 /* Macro might contain `[{}]' when not multi-arch */
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: %s # %s\n",
867 "TARGET_WRITE_PC(val, ptid)",
868 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
870 #ifdef TARGET_READ_FP
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: %s # %s\n",
874 XSTRING (TARGET_READ_FP ()));
876 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
877 /* Macro might contain `[{}]' when not multi-arch */
878 fprintf_unfiltered (file
,
879 "gdbarch_dump: %s # %s\n",
880 "TARGET_WRITE_FP(val)",
881 XSTRING (TARGET_WRITE_FP (val
)));
883 #ifdef TARGET_READ_SP
884 fprintf_unfiltered (file
,
885 "gdbarch_dump: %s # %s\n",
887 XSTRING (TARGET_READ_SP ()));
889 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
890 /* Macro might contain `[{}]' when not multi-arch */
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: %s # %s\n",
893 "TARGET_WRITE_SP(val)",
894 XSTRING (TARGET_WRITE_SP (val
)));
897 fprintf_unfiltered (file
,
898 "gdbarch_dump: NUM_REGS # %s\n",
901 #ifdef NUM_PSEUDO_REGS
902 fprintf_unfiltered (file
,
903 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
904 XSTRING (NUM_PSEUDO_REGS
));
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: SP_REGNUM # %s\n",
909 XSTRING (SP_REGNUM
));
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: FP_REGNUM # %s\n",
914 XSTRING (FP_REGNUM
));
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: PC_REGNUM # %s\n",
919 XSTRING (PC_REGNUM
));
922 fprintf_unfiltered (file
,
923 "gdbarch_dump: FP0_REGNUM # %s\n",
924 XSTRING (FP0_REGNUM
));
927 fprintf_unfiltered (file
,
928 "gdbarch_dump: NPC_REGNUM # %s\n",
929 XSTRING (NPC_REGNUM
));
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: NNPC_REGNUM # %s\n",
934 XSTRING (NNPC_REGNUM
));
936 #ifdef STAB_REG_TO_REGNUM
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: %s # %s\n",
939 "STAB_REG_TO_REGNUM(stab_regnr)",
940 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
942 #ifdef ECOFF_REG_TO_REGNUM
943 fprintf_unfiltered (file
,
944 "gdbarch_dump: %s # %s\n",
945 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
946 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
948 #ifdef DWARF_REG_TO_REGNUM
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: %s # %s\n",
951 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
952 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
954 #ifdef SDB_REG_TO_REGNUM
955 fprintf_unfiltered (file
,
956 "gdbarch_dump: %s # %s\n",
957 "SDB_REG_TO_REGNUM(sdb_regnr)",
958 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
960 #ifdef DWARF2_REG_TO_REGNUM
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: %s # %s\n",
963 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
964 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: %s # %s\n",
969 "REGISTER_NAME(regnr)",
970 XSTRING (REGISTER_NAME (regnr
)));
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: REGISTER_SIZE # %s\n",
975 XSTRING (REGISTER_SIZE
));
977 #ifdef REGISTER_BYTES
978 fprintf_unfiltered (file
,
979 "gdbarch_dump: REGISTER_BYTES # %s\n",
980 XSTRING (REGISTER_BYTES
));
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: %s # %s\n",
985 "REGISTER_BYTE(reg_nr)",
986 XSTRING (REGISTER_BYTE (reg_nr
)));
988 #ifdef REGISTER_RAW_SIZE
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: %s # %s\n",
991 "REGISTER_RAW_SIZE(reg_nr)",
992 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
994 #ifdef MAX_REGISTER_RAW_SIZE
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
997 XSTRING (MAX_REGISTER_RAW_SIZE
));
999 #ifdef REGISTER_VIRTUAL_SIZE
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: %s # %s\n",
1002 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1003 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1005 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1008 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1010 #ifdef REGISTER_VIRTUAL_TYPE
1011 fprintf_unfiltered (file
,
1012 "gdbarch_dump: %s # %s\n",
1013 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1014 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1016 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1017 /* Macro might contain `[{}]' when not multi-arch */
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: %s # %s\n",
1020 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1021 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1023 #ifdef REGISTER_SIM_REGNO
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: %s # %s\n",
1026 "REGISTER_SIM_REGNO(reg_nr)",
1027 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1029 #ifdef REGISTER_BYTES_OK
1030 fprintf_unfiltered (file
,
1031 "gdbarch_dump: %s # %s\n",
1032 "REGISTER_BYTES_OK(nr_bytes)",
1033 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1035 #ifdef CANNOT_FETCH_REGISTER
1036 fprintf_unfiltered (file
,
1037 "gdbarch_dump: %s # %s\n",
1038 "CANNOT_FETCH_REGISTER(regnum)",
1039 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1041 #ifdef CANNOT_STORE_REGISTER
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: %s # %s\n",
1044 "CANNOT_STORE_REGISTER(regnum)",
1045 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1047 #ifdef USE_GENERIC_DUMMY_FRAMES
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1050 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1052 #ifdef CALL_DUMMY_LOCATION
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1055 XSTRING (CALL_DUMMY_LOCATION
));
1057 #ifdef CALL_DUMMY_ADDRESS
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: %s # %s\n",
1060 "CALL_DUMMY_ADDRESS()",
1061 XSTRING (CALL_DUMMY_ADDRESS ()));
1063 #ifdef CALL_DUMMY_START_OFFSET
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1066 XSTRING (CALL_DUMMY_START_OFFSET
));
1068 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1071 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1073 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1076 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1078 #ifdef CALL_DUMMY_LENGTH
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1081 XSTRING (CALL_DUMMY_LENGTH
));
1083 #ifdef PC_IN_CALL_DUMMY
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: %s # %s\n",
1086 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1087 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1092 XSTRING (CALL_DUMMY_P
));
1094 #ifdef CALL_DUMMY_WORDS
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1097 XSTRING (CALL_DUMMY_WORDS
));
1099 #ifdef SIZEOF_CALL_DUMMY_WORDS
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1102 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1104 #ifdef CALL_DUMMY_STACK_ADJUST_P
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1107 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1109 #ifdef CALL_DUMMY_STACK_ADJUST
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1112 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1114 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1115 /* Macro might contain `[{}]' when not multi-arch */
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: %s # %s\n",
1118 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1119 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1121 #if defined (INIT_FRAME_PC_FIRST) && GDB_MULTI_ARCH
1122 /* Macro might contain `[{}]' when not multi-arch */
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: %s # %s\n",
1125 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1126 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1128 #if defined (INIT_FRAME_PC) && GDB_MULTI_ARCH
1129 /* Macro might contain `[{}]' when not multi-arch */
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: %s # %s\n",
1132 "INIT_FRAME_PC(fromleaf, prev)",
1133 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1135 #ifdef BELIEVE_PCC_PROMOTION
1136 fprintf_unfiltered (file
,
1137 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1138 XSTRING (BELIEVE_PCC_PROMOTION
));
1140 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1143 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1145 #ifdef COERCE_FLOAT_TO_DOUBLE
1146 fprintf_unfiltered (file
,
1147 "gdbarch_dump: %s # %s\n",
1148 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1149 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1151 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1152 /* Macro might contain `[{}]' when not multi-arch */
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: %s # %s\n",
1155 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1156 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1158 #ifdef REGISTER_CONVERTIBLE
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: %s # %s\n",
1161 "REGISTER_CONVERTIBLE(nr)",
1162 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1164 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1165 /* Macro might contain `[{}]' when not multi-arch */
1166 fprintf_unfiltered (file
,
1167 "gdbarch_dump: %s # %s\n",
1168 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1169 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1171 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1172 /* Macro might contain `[{}]' when not multi-arch */
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: %s # %s\n",
1175 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1176 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1178 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1179 /* Macro might contain `[{}]' when not multi-arch */
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: %s # %s\n",
1182 "FETCH_PSEUDO_REGISTER(regnum)",
1183 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1185 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1186 /* Macro might contain `[{}]' when not multi-arch */
1187 fprintf_unfiltered (file
,
1188 "gdbarch_dump: %s # %s\n",
1189 "STORE_PSEUDO_REGISTER(regnum)",
1190 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1192 #ifdef POINTER_TO_ADDRESS
1193 fprintf_unfiltered (file
,
1194 "gdbarch_dump: %s # %s\n",
1195 "POINTER_TO_ADDRESS(type, buf)",
1196 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1198 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1199 /* Macro might contain `[{}]' when not multi-arch */
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: %s # %s\n",
1202 "ADDRESS_TO_POINTER(type, buf, addr)",
1203 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1205 #ifdef RETURN_VALUE_ON_STACK
1206 fprintf_unfiltered (file
,
1207 "gdbarch_dump: %s # %s\n",
1208 "RETURN_VALUE_ON_STACK(type)",
1209 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1211 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1212 /* Macro might contain `[{}]' when not multi-arch */
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: %s # %s\n",
1215 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1216 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1218 #ifdef PUSH_ARGUMENTS
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: %s # %s\n",
1221 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1222 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1224 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1225 /* Macro might contain `[{}]' when not multi-arch */
1226 fprintf_unfiltered (file
,
1227 "gdbarch_dump: %s # %s\n",
1228 "PUSH_DUMMY_FRAME(-)",
1229 XSTRING (PUSH_DUMMY_FRAME (-)));
1231 #ifdef PUSH_RETURN_ADDRESS
1232 fprintf_unfiltered (file
,
1233 "gdbarch_dump: %s # %s\n",
1234 "PUSH_RETURN_ADDRESS(pc, sp)",
1235 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1237 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1238 /* Macro might contain `[{}]' when not multi-arch */
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: %s # %s\n",
1242 XSTRING (POP_FRAME (-)));
1244 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1245 /* Macro might contain `[{}]' when not multi-arch */
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: %s # %s\n",
1248 "STORE_STRUCT_RETURN(addr, sp)",
1249 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1251 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1252 /* Macro might contain `[{}]' when not multi-arch */
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: %s # %s\n",
1255 "STORE_RETURN_VALUE(type, valbuf)",
1256 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1258 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: %s # %s\n",
1261 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1262 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1264 #ifdef USE_STRUCT_CONVENTION
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: %s # %s\n",
1267 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1268 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1270 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1271 /* Macro might contain `[{}]' when not multi-arch */
1272 fprintf_unfiltered (file
,
1273 "gdbarch_dump: %s # %s\n",
1274 "FRAME_INIT_SAVED_REGS(frame)",
1275 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1277 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1278 /* Macro might contain `[{}]' when not multi-arch */
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: %s # %s\n",
1281 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1282 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1284 #ifdef SKIP_PROLOGUE
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: %s # %s\n",
1287 "SKIP_PROLOGUE(ip)",
1288 XSTRING (SKIP_PROLOGUE (ip
)));
1290 #ifdef PROLOGUE_FRAMELESS_P
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: %s # %s\n",
1293 "PROLOGUE_FRAMELESS_P(ip)",
1294 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: %s # %s\n",
1299 "INNER_THAN(lhs, rhs)",
1300 XSTRING (INNER_THAN (lhs
, rhs
)));
1302 #ifdef BREAKPOINT_FROM_PC
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: %s # %s\n",
1305 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1306 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1308 #ifdef MEMORY_INSERT_BREAKPOINT
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: %s # %s\n",
1311 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1312 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1314 #ifdef MEMORY_REMOVE_BREAKPOINT
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: %s # %s\n",
1317 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1318 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1320 #ifdef DECR_PC_AFTER_BREAK
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1323 XSTRING (DECR_PC_AFTER_BREAK
));
1325 #ifdef PREPARE_TO_PROCEED
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: %s # %s\n",
1328 "PREPARE_TO_PROCEED(select_it)",
1329 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1331 #ifdef FUNCTION_START_OFFSET
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1334 XSTRING (FUNCTION_START_OFFSET
));
1336 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1337 /* Macro might contain `[{}]' when not multi-arch */
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: %s # %s\n",
1340 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1341 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1343 #ifdef FRAME_ARGS_SKIP
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1346 XSTRING (FRAME_ARGS_SKIP
));
1348 #ifdef FRAMELESS_FUNCTION_INVOCATION
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: %s # %s\n",
1351 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1352 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1355 fprintf_unfiltered (file
,
1356 "gdbarch_dump: %s # %s\n",
1357 "FRAME_CHAIN(frame)",
1358 XSTRING (FRAME_CHAIN (frame
)));
1360 #ifdef FRAME_CHAIN_VALID
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: %s # %s\n",
1363 "FRAME_CHAIN_VALID(chain, thisframe)",
1364 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1366 #ifdef FRAME_SAVED_PC
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: %s # %s\n",
1369 "FRAME_SAVED_PC(fi)",
1370 XSTRING (FRAME_SAVED_PC (fi
)));
1372 #ifdef FRAME_ARGS_ADDRESS
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: %s # %s\n",
1375 "FRAME_ARGS_ADDRESS(fi)",
1376 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1378 #ifdef FRAME_LOCALS_ADDRESS
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: %s # %s\n",
1381 "FRAME_LOCALS_ADDRESS(fi)",
1382 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1384 #ifdef SAVED_PC_AFTER_CALL
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: %s # %s\n",
1387 "SAVED_PC_AFTER_CALL(frame)",
1388 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1390 #ifdef FRAME_NUM_ARGS
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: %s # %s\n",
1393 "FRAME_NUM_ARGS(frame)",
1394 XSTRING (FRAME_NUM_ARGS (frame
)));
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: %s # %s\n",
1400 XSTRING (STACK_ALIGN (sp
)));
1402 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1405 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1407 #ifdef REG_STRUCT_HAS_ADDR
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: %s # %s\n",
1410 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1411 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1413 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1414 /* Macro might contain `[{}]' when not multi-arch */
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: %s # %s\n",
1417 "SAVE_DUMMY_FRAME_TOS(sp)",
1418 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1420 #ifdef PARM_BOUNDARY
1421 fprintf_unfiltered (file
,
1422 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1423 XSTRING (PARM_BOUNDARY
));
1425 #ifdef TARGET_FLOAT_FORMAT
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1428 XSTRING (TARGET_FLOAT_FORMAT
));
1430 #ifdef TARGET_DOUBLE_FORMAT
1431 fprintf_unfiltered (file
,
1432 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1433 XSTRING (TARGET_DOUBLE_FORMAT
));
1435 #ifdef TARGET_LONG_DOUBLE_FORMAT
1436 fprintf_unfiltered (file
,
1437 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1438 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1440 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: %s # %s\n",
1443 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1444 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1446 #ifdef ADDR_BITS_REMOVE
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: %s # %s\n",
1449 "ADDR_BITS_REMOVE(addr)",
1450 XSTRING (ADDR_BITS_REMOVE (addr
)));
1452 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1453 /* Macro might contain `[{}]' when not multi-arch */
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: %s # %s\n",
1456 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1457 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1459 #ifdef TARGET_ARCHITECTURE
1460 if (TARGET_ARCHITECTURE
!= NULL
)
1461 fprintf_unfiltered (file
,
1462 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1463 TARGET_ARCHITECTURE
->printable_name
);
1465 #ifdef TARGET_BYTE_ORDER
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1468 (long) TARGET_BYTE_ORDER
);
1470 #ifdef TARGET_SHORT_BIT
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1473 (long) TARGET_SHORT_BIT
);
1475 #ifdef TARGET_INT_BIT
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1478 (long) TARGET_INT_BIT
);
1480 #ifdef TARGET_LONG_BIT
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1483 (long) TARGET_LONG_BIT
);
1485 #ifdef TARGET_LONG_LONG_BIT
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1488 (long) TARGET_LONG_LONG_BIT
);
1490 #ifdef TARGET_FLOAT_BIT
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1493 (long) TARGET_FLOAT_BIT
);
1495 #ifdef TARGET_DOUBLE_BIT
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1498 (long) TARGET_DOUBLE_BIT
);
1500 #ifdef TARGET_LONG_DOUBLE_BIT
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1503 (long) TARGET_LONG_DOUBLE_BIT
);
1505 #ifdef TARGET_PTR_BIT
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1508 (long) TARGET_PTR_BIT
);
1510 #ifdef TARGET_ADDR_BIT
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1513 (long) TARGET_ADDR_BIT
);
1515 #ifdef TARGET_BFD_VMA_BIT
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1518 (long) TARGET_BFD_VMA_BIT
);
1521 fprintf_unfiltered (file
,
1522 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1525 #ifdef TARGET_READ_PC
1527 fprintf_unfiltered (file
,
1528 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1529 (long) current_gdbarch
->read_pc
1530 /*TARGET_READ_PC ()*/);
1532 #ifdef TARGET_WRITE_PC
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1536 (long) current_gdbarch
->write_pc
1537 /*TARGET_WRITE_PC ()*/);
1539 #ifdef TARGET_READ_FP
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1543 (long) current_gdbarch
->read_fp
1544 /*TARGET_READ_FP ()*/);
1546 #ifdef TARGET_WRITE_FP
1548 fprintf_unfiltered (file
,
1549 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1550 (long) current_gdbarch
->write_fp
1551 /*TARGET_WRITE_FP ()*/);
1553 #ifdef TARGET_READ_SP
1555 fprintf_unfiltered (file
,
1556 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1557 (long) current_gdbarch
->read_sp
1558 /*TARGET_READ_SP ()*/);
1560 #ifdef TARGET_WRITE_SP
1562 fprintf_unfiltered (file
,
1563 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1564 (long) current_gdbarch
->write_sp
1565 /*TARGET_WRITE_SP ()*/);
1568 fprintf_unfiltered (file
,
1569 "gdbarch_dump: register_read = 0x%08lx\n",
1570 (long) current_gdbarch
->register_read
);
1572 fprintf_unfiltered (file
,
1573 "gdbarch_dump: register_write = 0x%08lx\n",
1574 (long) current_gdbarch
->register_write
);
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: NUM_REGS = %ld\n",
1580 #ifdef NUM_PSEUDO_REGS
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1583 (long) NUM_PSEUDO_REGS
);
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: SP_REGNUM = %ld\n",
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: FP_REGNUM = %ld\n",
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: PC_REGNUM = %ld\n",
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: FP0_REGNUM = %ld\n",
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: NPC_REGNUM = %ld\n",
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1613 (long) NNPC_REGNUM
);
1615 #ifdef STAB_REG_TO_REGNUM
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1619 (long) current_gdbarch
->stab_reg_to_regnum
1620 /*STAB_REG_TO_REGNUM ()*/);
1622 #ifdef ECOFF_REG_TO_REGNUM
1624 fprintf_unfiltered (file
,
1625 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1626 (long) current_gdbarch
->ecoff_reg_to_regnum
1627 /*ECOFF_REG_TO_REGNUM ()*/);
1629 #ifdef DWARF_REG_TO_REGNUM
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1633 (long) current_gdbarch
->dwarf_reg_to_regnum
1634 /*DWARF_REG_TO_REGNUM ()*/);
1636 #ifdef SDB_REG_TO_REGNUM
1638 fprintf_unfiltered (file
,
1639 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1640 (long) current_gdbarch
->sdb_reg_to_regnum
1641 /*SDB_REG_TO_REGNUM ()*/);
1643 #ifdef DWARF2_REG_TO_REGNUM
1645 fprintf_unfiltered (file
,
1646 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1647 (long) current_gdbarch
->dwarf2_reg_to_regnum
1648 /*DWARF2_REG_TO_REGNUM ()*/);
1650 #ifdef REGISTER_NAME
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1654 (long) current_gdbarch
->register_name
1655 /*REGISTER_NAME ()*/);
1657 #ifdef REGISTER_SIZE
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1660 (long) REGISTER_SIZE
);
1662 #ifdef REGISTER_BYTES
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1665 (long) REGISTER_BYTES
);
1667 #ifdef REGISTER_BYTE
1669 fprintf_unfiltered (file
,
1670 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1671 (long) current_gdbarch
->register_byte
1672 /*REGISTER_BYTE ()*/);
1674 #ifdef REGISTER_RAW_SIZE
1676 fprintf_unfiltered (file
,
1677 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1678 (long) current_gdbarch
->register_raw_size
1679 /*REGISTER_RAW_SIZE ()*/);
1681 #ifdef MAX_REGISTER_RAW_SIZE
1682 fprintf_unfiltered (file
,
1683 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1684 (long) MAX_REGISTER_RAW_SIZE
);
1686 #ifdef REGISTER_VIRTUAL_SIZE
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1690 (long) current_gdbarch
->register_virtual_size
1691 /*REGISTER_VIRTUAL_SIZE ()*/);
1693 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1696 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1698 #ifdef REGISTER_VIRTUAL_TYPE
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1702 (long) current_gdbarch
->register_virtual_type
1703 /*REGISTER_VIRTUAL_TYPE ()*/);
1705 #ifdef DO_REGISTERS_INFO
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1709 (long) current_gdbarch
->do_registers_info
1710 /*DO_REGISTERS_INFO ()*/);
1712 #ifdef REGISTER_SIM_REGNO
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1716 (long) current_gdbarch
->register_sim_regno
1717 /*REGISTER_SIM_REGNO ()*/);
1719 #ifdef REGISTER_BYTES_OK
1721 fprintf_unfiltered (file
,
1722 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1723 (long) current_gdbarch
->register_bytes_ok
1724 /*REGISTER_BYTES_OK ()*/);
1726 #ifdef CANNOT_FETCH_REGISTER
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
1730 (long) current_gdbarch
->cannot_fetch_register
1731 /*CANNOT_FETCH_REGISTER ()*/);
1733 #ifdef CANNOT_STORE_REGISTER
1735 fprintf_unfiltered (file
,
1736 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1737 (long) current_gdbarch
->cannot_store_register
1738 /*CANNOT_STORE_REGISTER ()*/);
1740 #ifdef USE_GENERIC_DUMMY_FRAMES
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1743 (long) USE_GENERIC_DUMMY_FRAMES
);
1745 #ifdef CALL_DUMMY_LOCATION
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1748 (long) CALL_DUMMY_LOCATION
);
1750 #ifdef CALL_DUMMY_ADDRESS
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1754 (long) current_gdbarch
->call_dummy_address
1755 /*CALL_DUMMY_ADDRESS ()*/);
1757 #ifdef CALL_DUMMY_START_OFFSET
1758 fprintf_unfiltered (file
,
1759 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1760 (long) CALL_DUMMY_START_OFFSET
);
1762 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1763 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1764 fprintf_unfiltered (file
,
1765 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1766 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1768 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1771 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1773 #ifdef CALL_DUMMY_LENGTH
1774 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1775 fprintf_unfiltered (file
,
1776 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1777 (long) CALL_DUMMY_LENGTH
);
1779 #ifdef PC_IN_CALL_DUMMY
1781 fprintf_unfiltered (file
,
1782 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1783 (long) current_gdbarch
->pc_in_call_dummy
1784 /*PC_IN_CALL_DUMMY ()*/);
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1789 (long) CALL_DUMMY_P
);
1791 #ifdef CALL_DUMMY_WORDS
1792 fprintf_unfiltered (file
,
1793 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1794 (long) CALL_DUMMY_WORDS
);
1796 #ifdef SIZEOF_CALL_DUMMY_WORDS
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1799 (long) SIZEOF_CALL_DUMMY_WORDS
);
1801 #ifdef CALL_DUMMY_STACK_ADJUST_P
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1804 (long) CALL_DUMMY_STACK_ADJUST_P
);
1806 #ifdef CALL_DUMMY_STACK_ADJUST
1807 if (CALL_DUMMY_STACK_ADJUST_P
)
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1810 (long) CALL_DUMMY_STACK_ADJUST
);
1812 #ifdef FIX_CALL_DUMMY
1814 fprintf_unfiltered (file
,
1815 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1816 (long) current_gdbarch
->fix_call_dummy
1817 /*FIX_CALL_DUMMY ()*/);
1819 #ifdef INIT_FRAME_PC_FIRST
1821 fprintf_unfiltered (file
,
1822 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1823 (long) current_gdbarch
->init_frame_pc_first
1824 /*INIT_FRAME_PC_FIRST ()*/);
1826 #ifdef INIT_FRAME_PC
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1830 (long) current_gdbarch
->init_frame_pc
1831 /*INIT_FRAME_PC ()*/);
1833 #ifdef BELIEVE_PCC_PROMOTION
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1836 (long) BELIEVE_PCC_PROMOTION
);
1838 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1841 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1843 #ifdef COERCE_FLOAT_TO_DOUBLE
1845 fprintf_unfiltered (file
,
1846 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1847 (long) current_gdbarch
->coerce_float_to_double
1848 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1850 #ifdef GET_SAVED_REGISTER
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1854 (long) current_gdbarch
->get_saved_register
1855 /*GET_SAVED_REGISTER ()*/);
1857 #ifdef REGISTER_CONVERTIBLE
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1861 (long) current_gdbarch
->register_convertible
1862 /*REGISTER_CONVERTIBLE ()*/);
1864 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1868 (long) current_gdbarch
->register_convert_to_virtual
1869 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1871 #ifdef REGISTER_CONVERT_TO_RAW
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1875 (long) current_gdbarch
->register_convert_to_raw
1876 /*REGISTER_CONVERT_TO_RAW ()*/);
1878 #ifdef FETCH_PSEUDO_REGISTER
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1882 (long) current_gdbarch
->fetch_pseudo_register
1883 /*FETCH_PSEUDO_REGISTER ()*/);
1885 #ifdef STORE_PSEUDO_REGISTER
1887 fprintf_unfiltered (file
,
1888 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1889 (long) current_gdbarch
->store_pseudo_register
1890 /*STORE_PSEUDO_REGISTER ()*/);
1892 #ifdef POINTER_TO_ADDRESS
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1896 (long) current_gdbarch
->pointer_to_address
1897 /*POINTER_TO_ADDRESS ()*/);
1899 #ifdef ADDRESS_TO_POINTER
1901 fprintf_unfiltered (file
,
1902 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1903 (long) current_gdbarch
->address_to_pointer
1904 /*ADDRESS_TO_POINTER ()*/);
1906 #ifdef RETURN_VALUE_ON_STACK
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1910 (long) current_gdbarch
->return_value_on_stack
1911 /*RETURN_VALUE_ON_STACK ()*/);
1913 #ifdef EXTRACT_RETURN_VALUE
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1917 (long) current_gdbarch
->extract_return_value
1918 /*EXTRACT_RETURN_VALUE ()*/);
1920 #ifdef PUSH_ARGUMENTS
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1924 (long) current_gdbarch
->push_arguments
1925 /*PUSH_ARGUMENTS ()*/);
1927 #ifdef PUSH_DUMMY_FRAME
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1931 (long) current_gdbarch
->push_dummy_frame
1932 /*PUSH_DUMMY_FRAME ()*/);
1934 #ifdef PUSH_RETURN_ADDRESS
1936 fprintf_unfiltered (file
,
1937 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1938 (long) current_gdbarch
->push_return_address
1939 /*PUSH_RETURN_ADDRESS ()*/);
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1945 (long) current_gdbarch
->pop_frame
1948 #ifdef STORE_STRUCT_RETURN
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1952 (long) current_gdbarch
->store_struct_return
1953 /*STORE_STRUCT_RETURN ()*/);
1955 #ifdef STORE_RETURN_VALUE
1957 fprintf_unfiltered (file
,
1958 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1959 (long) current_gdbarch
->store_return_value
1960 /*STORE_RETURN_VALUE ()*/);
1962 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1964 fprintf_unfiltered (file
,
1965 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1966 (long) current_gdbarch
->extract_struct_value_address
1967 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1969 #ifdef USE_STRUCT_CONVENTION
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1973 (long) current_gdbarch
->use_struct_convention
1974 /*USE_STRUCT_CONVENTION ()*/);
1976 #ifdef FRAME_INIT_SAVED_REGS
1978 fprintf_unfiltered (file
,
1979 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1980 (long) current_gdbarch
->frame_init_saved_regs
1981 /*FRAME_INIT_SAVED_REGS ()*/);
1983 #ifdef INIT_EXTRA_FRAME_INFO
1985 fprintf_unfiltered (file
,
1986 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1987 (long) current_gdbarch
->init_extra_frame_info
1988 /*INIT_EXTRA_FRAME_INFO ()*/);
1990 #ifdef SKIP_PROLOGUE
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1994 (long) current_gdbarch
->skip_prologue
1995 /*SKIP_PROLOGUE ()*/);
1997 #ifdef PROLOGUE_FRAMELESS_P
1999 fprintf_unfiltered (file
,
2000 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2001 (long) current_gdbarch
->prologue_frameless_p
2002 /*PROLOGUE_FRAMELESS_P ()*/);
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2008 (long) current_gdbarch
->inner_than
2011 #ifdef BREAKPOINT_FROM_PC
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2015 (long) current_gdbarch
->breakpoint_from_pc
2016 /*BREAKPOINT_FROM_PC ()*/);
2018 #ifdef MEMORY_INSERT_BREAKPOINT
2020 fprintf_unfiltered (file
,
2021 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2022 (long) current_gdbarch
->memory_insert_breakpoint
2023 /*MEMORY_INSERT_BREAKPOINT ()*/);
2025 #ifdef MEMORY_REMOVE_BREAKPOINT
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2029 (long) current_gdbarch
->memory_remove_breakpoint
2030 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2032 #ifdef DECR_PC_AFTER_BREAK
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2035 (long) DECR_PC_AFTER_BREAK
);
2037 #ifdef PREPARE_TO_PROCEED
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2041 (long) current_gdbarch
->prepare_to_proceed
2042 /*PREPARE_TO_PROCEED ()*/);
2044 #ifdef FUNCTION_START_OFFSET
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2047 (long) FUNCTION_START_OFFSET
);
2049 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2051 fprintf_unfiltered (file
,
2052 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2053 (long) current_gdbarch
->remote_translate_xfer_address
2054 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2056 #ifdef FRAME_ARGS_SKIP
2057 fprintf_unfiltered (file
,
2058 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2059 (long) FRAME_ARGS_SKIP
);
2061 #ifdef FRAMELESS_FUNCTION_INVOCATION
2063 fprintf_unfiltered (file
,
2064 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2065 (long) current_gdbarch
->frameless_function_invocation
2066 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2072 (long) current_gdbarch
->frame_chain
2073 /*FRAME_CHAIN ()*/);
2075 #ifdef FRAME_CHAIN_VALID
2077 fprintf_unfiltered (file
,
2078 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2079 (long) current_gdbarch
->frame_chain_valid
2080 /*FRAME_CHAIN_VALID ()*/);
2082 #ifdef FRAME_SAVED_PC
2084 fprintf_unfiltered (file
,
2085 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2086 (long) current_gdbarch
->frame_saved_pc
2087 /*FRAME_SAVED_PC ()*/);
2089 #ifdef FRAME_ARGS_ADDRESS
2091 fprintf_unfiltered (file
,
2092 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2093 (long) current_gdbarch
->frame_args_address
2094 /*FRAME_ARGS_ADDRESS ()*/);
2096 #ifdef FRAME_LOCALS_ADDRESS
2098 fprintf_unfiltered (file
,
2099 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2100 (long) current_gdbarch
->frame_locals_address
2101 /*FRAME_LOCALS_ADDRESS ()*/);
2103 #ifdef SAVED_PC_AFTER_CALL
2105 fprintf_unfiltered (file
,
2106 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2107 (long) current_gdbarch
->saved_pc_after_call
2108 /*SAVED_PC_AFTER_CALL ()*/);
2110 #ifdef FRAME_NUM_ARGS
2112 fprintf_unfiltered (file
,
2113 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2114 (long) current_gdbarch
->frame_num_args
2115 /*FRAME_NUM_ARGS ()*/);
2119 fprintf_unfiltered (file
,
2120 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2121 (long) current_gdbarch
->stack_align
2122 /*STACK_ALIGN ()*/);
2124 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2125 fprintf_unfiltered (file
,
2126 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2127 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2129 #ifdef REG_STRUCT_HAS_ADDR
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2133 (long) current_gdbarch
->reg_struct_has_addr
2134 /*REG_STRUCT_HAS_ADDR ()*/);
2136 #ifdef SAVE_DUMMY_FRAME_TOS
2138 fprintf_unfiltered (file
,
2139 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2140 (long) current_gdbarch
->save_dummy_frame_tos
2141 /*SAVE_DUMMY_FRAME_TOS ()*/);
2143 #ifdef PARM_BOUNDARY
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2146 (long) PARM_BOUNDARY
);
2148 #ifdef TARGET_FLOAT_FORMAT
2149 fprintf_unfiltered (file
,
2150 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2151 (long) TARGET_FLOAT_FORMAT
);
2153 #ifdef TARGET_DOUBLE_FORMAT
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2156 (long) TARGET_DOUBLE_FORMAT
);
2158 #ifdef TARGET_LONG_DOUBLE_FORMAT
2159 fprintf_unfiltered (file
,
2160 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2161 (long) TARGET_LONG_DOUBLE_FORMAT
);
2163 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2165 fprintf_unfiltered (file
,
2166 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2167 (long) current_gdbarch
->convert_from_func_ptr_addr
2168 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2170 #ifdef ADDR_BITS_REMOVE
2172 fprintf_unfiltered (file
,
2173 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
2174 (long) current_gdbarch
->addr_bits_remove
2175 /*ADDR_BITS_REMOVE ()*/);
2177 #ifdef SOFTWARE_SINGLE_STEP
2179 fprintf_unfiltered (file
,
2180 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2181 (long) current_gdbarch
->software_single_step
2182 /*SOFTWARE_SINGLE_STEP ()*/);
2184 if (current_gdbarch
->dump_tdep
!= NULL
)
2185 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2188 struct gdbarch_tdep
*
2189 gdbarch_tdep (struct gdbarch
*gdbarch
)
2191 if (gdbarch_debug
>= 2)
2192 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2193 return gdbarch
->tdep
;
2197 const struct bfd_arch_info
*
2198 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2200 if (gdbarch_debug
>= 2)
2201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2202 return gdbarch
->bfd_arch_info
;
2206 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2208 if (gdbarch_debug
>= 2)
2209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2210 return gdbarch
->byte_order
;
2214 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2216 /* Skip verify of short_bit, invalid_p == 0 */
2217 if (gdbarch_debug
>= 2)
2218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2219 return gdbarch
->short_bit
;
2223 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2226 gdbarch
->short_bit
= short_bit
;
2230 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2232 /* Skip verify of int_bit, invalid_p == 0 */
2233 if (gdbarch_debug
>= 2)
2234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2235 return gdbarch
->int_bit
;
2239 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2242 gdbarch
->int_bit
= int_bit
;
2246 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2248 /* Skip verify of long_bit, invalid_p == 0 */
2249 if (gdbarch_debug
>= 2)
2250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2251 return gdbarch
->long_bit
;
2255 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2258 gdbarch
->long_bit
= long_bit
;
2262 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2264 /* Skip verify of long_long_bit, invalid_p == 0 */
2265 if (gdbarch_debug
>= 2)
2266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2267 return gdbarch
->long_long_bit
;
2271 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2274 gdbarch
->long_long_bit
= long_long_bit
;
2278 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2280 /* Skip verify of float_bit, invalid_p == 0 */
2281 if (gdbarch_debug
>= 2)
2282 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2283 return gdbarch
->float_bit
;
2287 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2290 gdbarch
->float_bit
= float_bit
;
2294 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2296 /* Skip verify of double_bit, invalid_p == 0 */
2297 if (gdbarch_debug
>= 2)
2298 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2299 return gdbarch
->double_bit
;
2303 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2306 gdbarch
->double_bit
= double_bit
;
2310 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2312 /* Skip verify of long_double_bit, invalid_p == 0 */
2313 if (gdbarch_debug
>= 2)
2314 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2315 return gdbarch
->long_double_bit
;
2319 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2320 int long_double_bit
)
2322 gdbarch
->long_double_bit
= long_double_bit
;
2326 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2328 /* Skip verify of ptr_bit, invalid_p == 0 */
2329 if (gdbarch_debug
>= 2)
2330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2331 return gdbarch
->ptr_bit
;
2335 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2338 gdbarch
->ptr_bit
= ptr_bit
;
2342 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2344 if (gdbarch
->addr_bit
== 0)
2345 internal_error (__FILE__
, __LINE__
,
2346 "gdbarch: gdbarch_addr_bit invalid");
2347 if (gdbarch_debug
>= 2)
2348 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2349 return gdbarch
->addr_bit
;
2353 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2356 gdbarch
->addr_bit
= addr_bit
;
2360 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2362 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2363 if (gdbarch_debug
>= 2)
2364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2365 return gdbarch
->bfd_vma_bit
;
2369 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2372 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2376 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2378 /* Skip verify of ieee_float, invalid_p == 0 */
2379 if (gdbarch_debug
>= 2)
2380 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2381 return gdbarch
->ieee_float
;
2385 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2388 gdbarch
->ieee_float
= ieee_float
;
2392 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2394 if (gdbarch
->read_pc
== 0)
2395 internal_error (__FILE__
, __LINE__
,
2396 "gdbarch: gdbarch_read_pc invalid");
2397 if (gdbarch_debug
>= 2)
2398 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2399 return gdbarch
->read_pc (ptid
);
2403 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2404 gdbarch_read_pc_ftype read_pc
)
2406 gdbarch
->read_pc
= read_pc
;
2410 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2412 if (gdbarch
->write_pc
== 0)
2413 internal_error (__FILE__
, __LINE__
,
2414 "gdbarch: gdbarch_write_pc invalid");
2415 if (gdbarch_debug
>= 2)
2416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2417 gdbarch
->write_pc (val
, ptid
);
2421 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2422 gdbarch_write_pc_ftype write_pc
)
2424 gdbarch
->write_pc
= write_pc
;
2428 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2430 if (gdbarch
->read_fp
== 0)
2431 internal_error (__FILE__
, __LINE__
,
2432 "gdbarch: gdbarch_read_fp invalid");
2433 if (gdbarch_debug
>= 2)
2434 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2435 return gdbarch
->read_fp ();
2439 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2440 gdbarch_read_fp_ftype read_fp
)
2442 gdbarch
->read_fp
= read_fp
;
2446 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2448 if (gdbarch
->write_fp
== 0)
2449 internal_error (__FILE__
, __LINE__
,
2450 "gdbarch: gdbarch_write_fp invalid");
2451 if (gdbarch_debug
>= 2)
2452 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2453 gdbarch
->write_fp (val
);
2457 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2458 gdbarch_write_fp_ftype write_fp
)
2460 gdbarch
->write_fp
= write_fp
;
2464 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2466 if (gdbarch
->read_sp
== 0)
2467 internal_error (__FILE__
, __LINE__
,
2468 "gdbarch: gdbarch_read_sp invalid");
2469 if (gdbarch_debug
>= 2)
2470 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2471 return gdbarch
->read_sp ();
2475 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2476 gdbarch_read_sp_ftype read_sp
)
2478 gdbarch
->read_sp
= read_sp
;
2482 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2484 if (gdbarch
->write_sp
== 0)
2485 internal_error (__FILE__
, __LINE__
,
2486 "gdbarch: gdbarch_write_sp invalid");
2487 if (gdbarch_debug
>= 2)
2488 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2489 gdbarch
->write_sp (val
);
2493 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2494 gdbarch_write_sp_ftype write_sp
)
2496 gdbarch
->write_sp
= write_sp
;
2500 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2502 return gdbarch
->register_read
!= 0;
2506 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2508 if (gdbarch
->register_read
== 0)
2509 internal_error (__FILE__
, __LINE__
,
2510 "gdbarch: gdbarch_register_read invalid");
2511 if (gdbarch_debug
>= 2)
2512 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2513 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2517 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2518 gdbarch_register_read_ftype register_read
)
2520 gdbarch
->register_read
= register_read
;
2524 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2526 return gdbarch
->register_write
!= 0;
2530 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2532 if (gdbarch
->register_write
== 0)
2533 internal_error (__FILE__
, __LINE__
,
2534 "gdbarch: gdbarch_register_write invalid");
2535 if (gdbarch_debug
>= 2)
2536 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2537 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2541 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2542 gdbarch_register_write_ftype register_write
)
2544 gdbarch
->register_write
= register_write
;
2548 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2550 if (gdbarch
->num_regs
== -1)
2551 internal_error (__FILE__
, __LINE__
,
2552 "gdbarch: gdbarch_num_regs invalid");
2553 if (gdbarch_debug
>= 2)
2554 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2555 return gdbarch
->num_regs
;
2559 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2562 gdbarch
->num_regs
= num_regs
;
2566 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2568 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2569 if (gdbarch_debug
>= 2)
2570 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2571 return gdbarch
->num_pseudo_regs
;
2575 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2576 int num_pseudo_regs
)
2578 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2582 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2584 if (gdbarch
->sp_regnum
== -1)
2585 internal_error (__FILE__
, __LINE__
,
2586 "gdbarch: gdbarch_sp_regnum invalid");
2587 if (gdbarch_debug
>= 2)
2588 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2589 return gdbarch
->sp_regnum
;
2593 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2596 gdbarch
->sp_regnum
= sp_regnum
;
2600 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2602 if (gdbarch
->fp_regnum
== -1)
2603 internal_error (__FILE__
, __LINE__
,
2604 "gdbarch: gdbarch_fp_regnum invalid");
2605 if (gdbarch_debug
>= 2)
2606 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2607 return gdbarch
->fp_regnum
;
2611 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2614 gdbarch
->fp_regnum
= fp_regnum
;
2618 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2620 if (gdbarch
->pc_regnum
== -1)
2621 internal_error (__FILE__
, __LINE__
,
2622 "gdbarch: gdbarch_pc_regnum invalid");
2623 if (gdbarch_debug
>= 2)
2624 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2625 return gdbarch
->pc_regnum
;
2629 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2632 gdbarch
->pc_regnum
= pc_regnum
;
2636 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2638 /* Skip verify of fp0_regnum, invalid_p == 0 */
2639 if (gdbarch_debug
>= 2)
2640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2641 return gdbarch
->fp0_regnum
;
2645 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2648 gdbarch
->fp0_regnum
= fp0_regnum
;
2652 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2654 /* Skip verify of npc_regnum, invalid_p == 0 */
2655 if (gdbarch_debug
>= 2)
2656 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2657 return gdbarch
->npc_regnum
;
2661 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2664 gdbarch
->npc_regnum
= npc_regnum
;
2668 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2670 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2671 if (gdbarch_debug
>= 2)
2672 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2673 return gdbarch
->nnpc_regnum
;
2677 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2680 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2684 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2686 if (gdbarch
->stab_reg_to_regnum
== 0)
2687 internal_error (__FILE__
, __LINE__
,
2688 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2689 if (gdbarch_debug
>= 2)
2690 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2691 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2695 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2696 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2698 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2702 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2704 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2705 internal_error (__FILE__
, __LINE__
,
2706 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2707 if (gdbarch_debug
>= 2)
2708 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2709 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2713 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2714 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2716 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2720 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2722 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2723 internal_error (__FILE__
, __LINE__
,
2724 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2725 if (gdbarch_debug
>= 2)
2726 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2727 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2731 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2732 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2734 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2738 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2740 if (gdbarch
->sdb_reg_to_regnum
== 0)
2741 internal_error (__FILE__
, __LINE__
,
2742 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2743 if (gdbarch_debug
>= 2)
2744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2745 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2749 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2750 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2752 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2756 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2758 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2759 internal_error (__FILE__
, __LINE__
,
2760 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2761 if (gdbarch_debug
>= 2)
2762 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2763 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2767 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2768 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2770 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2774 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2776 if (gdbarch
->register_name
== 0)
2777 internal_error (__FILE__
, __LINE__
,
2778 "gdbarch: gdbarch_register_name invalid");
2779 if (gdbarch_debug
>= 2)
2780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2781 return gdbarch
->register_name (regnr
);
2785 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2786 gdbarch_register_name_ftype register_name
)
2788 gdbarch
->register_name
= register_name
;
2792 gdbarch_register_size (struct gdbarch
*gdbarch
)
2794 if (gdbarch
->register_size
== -1)
2795 internal_error (__FILE__
, __LINE__
,
2796 "gdbarch: gdbarch_register_size invalid");
2797 if (gdbarch_debug
>= 2)
2798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2799 return gdbarch
->register_size
;
2803 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2806 gdbarch
->register_size
= register_size
;
2810 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2812 if (gdbarch
->register_bytes
== -1)
2813 internal_error (__FILE__
, __LINE__
,
2814 "gdbarch: gdbarch_register_bytes invalid");
2815 if (gdbarch_debug
>= 2)
2816 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2817 return gdbarch
->register_bytes
;
2821 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2824 gdbarch
->register_bytes
= register_bytes
;
2828 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2830 if (gdbarch
->register_byte
== 0)
2831 internal_error (__FILE__
, __LINE__
,
2832 "gdbarch: gdbarch_register_byte invalid");
2833 if (gdbarch_debug
>= 2)
2834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2835 return gdbarch
->register_byte (reg_nr
);
2839 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2840 gdbarch_register_byte_ftype register_byte
)
2842 gdbarch
->register_byte
= register_byte
;
2846 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2848 if (gdbarch
->register_raw_size
== 0)
2849 internal_error (__FILE__
, __LINE__
,
2850 "gdbarch: gdbarch_register_raw_size invalid");
2851 if (gdbarch_debug
>= 2)
2852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2853 return gdbarch
->register_raw_size (reg_nr
);
2857 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2858 gdbarch_register_raw_size_ftype register_raw_size
)
2860 gdbarch
->register_raw_size
= register_raw_size
;
2864 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2866 if (gdbarch
->max_register_raw_size
== -1)
2867 internal_error (__FILE__
, __LINE__
,
2868 "gdbarch: gdbarch_max_register_raw_size invalid");
2869 if (gdbarch_debug
>= 2)
2870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2871 return gdbarch
->max_register_raw_size
;
2875 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2876 int max_register_raw_size
)
2878 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2882 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2884 if (gdbarch
->register_virtual_size
== 0)
2885 internal_error (__FILE__
, __LINE__
,
2886 "gdbarch: gdbarch_register_virtual_size invalid");
2887 if (gdbarch_debug
>= 2)
2888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2889 return gdbarch
->register_virtual_size (reg_nr
);
2893 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2894 gdbarch_register_virtual_size_ftype register_virtual_size
)
2896 gdbarch
->register_virtual_size
= register_virtual_size
;
2900 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2902 if (gdbarch
->max_register_virtual_size
== -1)
2903 internal_error (__FILE__
, __LINE__
,
2904 "gdbarch: gdbarch_max_register_virtual_size invalid");
2905 if (gdbarch_debug
>= 2)
2906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2907 return gdbarch
->max_register_virtual_size
;
2911 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2912 int max_register_virtual_size
)
2914 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2918 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2920 if (gdbarch
->register_virtual_type
== 0)
2921 internal_error (__FILE__
, __LINE__
,
2922 "gdbarch: gdbarch_register_virtual_type invalid");
2923 if (gdbarch_debug
>= 2)
2924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2925 return gdbarch
->register_virtual_type (reg_nr
);
2929 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2930 gdbarch_register_virtual_type_ftype register_virtual_type
)
2932 gdbarch
->register_virtual_type
= register_virtual_type
;
2936 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2938 if (gdbarch
->do_registers_info
== 0)
2939 internal_error (__FILE__
, __LINE__
,
2940 "gdbarch: gdbarch_do_registers_info invalid");
2941 if (gdbarch_debug
>= 2)
2942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2943 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2947 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2948 gdbarch_do_registers_info_ftype do_registers_info
)
2950 gdbarch
->do_registers_info
= do_registers_info
;
2954 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2956 if (gdbarch
->register_sim_regno
== 0)
2957 internal_error (__FILE__
, __LINE__
,
2958 "gdbarch: gdbarch_register_sim_regno invalid");
2959 if (gdbarch_debug
>= 2)
2960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2961 return gdbarch
->register_sim_regno (reg_nr
);
2965 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2966 gdbarch_register_sim_regno_ftype register_sim_regno
)
2968 gdbarch
->register_sim_regno
= register_sim_regno
;
2972 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2974 return gdbarch
->register_bytes_ok
!= 0;
2978 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2980 if (gdbarch
->register_bytes_ok
== 0)
2981 internal_error (__FILE__
, __LINE__
,
2982 "gdbarch: gdbarch_register_bytes_ok invalid");
2983 if (gdbarch_debug
>= 2)
2984 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2985 return gdbarch
->register_bytes_ok (nr_bytes
);
2989 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2990 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2992 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2996 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2998 if (gdbarch
->cannot_fetch_register
== 0)
2999 internal_error (__FILE__
, __LINE__
,
3000 "gdbarch: gdbarch_cannot_fetch_register invalid");
3001 if (gdbarch_debug
>= 2)
3002 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3003 return gdbarch
->cannot_fetch_register (regnum
);
3007 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3008 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3010 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3014 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3016 if (gdbarch
->cannot_store_register
== 0)
3017 internal_error (__FILE__
, __LINE__
,
3018 "gdbarch: gdbarch_cannot_store_register invalid");
3019 if (gdbarch_debug
>= 2)
3020 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3021 return gdbarch
->cannot_store_register (regnum
);
3025 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3026 gdbarch_cannot_store_register_ftype cannot_store_register
)
3028 gdbarch
->cannot_store_register
= cannot_store_register
;
3032 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3034 if (gdbarch
->use_generic_dummy_frames
== -1)
3035 internal_error (__FILE__
, __LINE__
,
3036 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3037 if (gdbarch_debug
>= 2)
3038 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3039 return gdbarch
->use_generic_dummy_frames
;
3043 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3044 int use_generic_dummy_frames
)
3046 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3050 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3052 if (gdbarch
->call_dummy_location
== 0)
3053 internal_error (__FILE__
, __LINE__
,
3054 "gdbarch: gdbarch_call_dummy_location invalid");
3055 if (gdbarch_debug
>= 2)
3056 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3057 return gdbarch
->call_dummy_location
;
3061 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3062 int call_dummy_location
)
3064 gdbarch
->call_dummy_location
= call_dummy_location
;
3068 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3070 if (gdbarch
->call_dummy_address
== 0)
3071 internal_error (__FILE__
, __LINE__
,
3072 "gdbarch: gdbarch_call_dummy_address invalid");
3073 if (gdbarch_debug
>= 2)
3074 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3075 return gdbarch
->call_dummy_address ();
3079 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3080 gdbarch_call_dummy_address_ftype call_dummy_address
)
3082 gdbarch
->call_dummy_address
= call_dummy_address
;
3086 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3088 if (gdbarch
->call_dummy_start_offset
== -1)
3089 internal_error (__FILE__
, __LINE__
,
3090 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3091 if (gdbarch_debug
>= 2)
3092 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3093 return gdbarch
->call_dummy_start_offset
;
3097 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3098 CORE_ADDR call_dummy_start_offset
)
3100 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3104 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3106 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3107 internal_error (__FILE__
, __LINE__
,
3108 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3109 if (gdbarch_debug
>= 2)
3110 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3111 return gdbarch
->call_dummy_breakpoint_offset
;
3115 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3116 CORE_ADDR call_dummy_breakpoint_offset
)
3118 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3122 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3124 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3125 internal_error (__FILE__
, __LINE__
,
3126 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3127 if (gdbarch_debug
>= 2)
3128 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3129 return gdbarch
->call_dummy_breakpoint_offset_p
;
3133 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3134 int call_dummy_breakpoint_offset_p
)
3136 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3140 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3142 if (gdbarch
->call_dummy_length
== -1)
3143 internal_error (__FILE__
, __LINE__
,
3144 "gdbarch: gdbarch_call_dummy_length invalid");
3145 if (gdbarch_debug
>= 2)
3146 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3147 return gdbarch
->call_dummy_length
;
3151 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3152 int call_dummy_length
)
3154 gdbarch
->call_dummy_length
= call_dummy_length
;
3158 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3160 if (gdbarch
->pc_in_call_dummy
== 0)
3161 internal_error (__FILE__
, __LINE__
,
3162 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3163 if (gdbarch_debug
>= 2)
3164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3165 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3169 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3170 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3172 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3176 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3178 if (gdbarch
->call_dummy_p
== -1)
3179 internal_error (__FILE__
, __LINE__
,
3180 "gdbarch: gdbarch_call_dummy_p invalid");
3181 if (gdbarch_debug
>= 2)
3182 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3183 return gdbarch
->call_dummy_p
;
3187 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3190 gdbarch
->call_dummy_p
= call_dummy_p
;
3194 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3196 /* Skip verify of call_dummy_words, invalid_p == 0 */
3197 if (gdbarch_debug
>= 2)
3198 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3199 return gdbarch
->call_dummy_words
;
3203 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3204 LONGEST
* call_dummy_words
)
3206 gdbarch
->call_dummy_words
= call_dummy_words
;
3210 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3212 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3213 if (gdbarch_debug
>= 2)
3214 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3215 return gdbarch
->sizeof_call_dummy_words
;
3219 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3220 int sizeof_call_dummy_words
)
3222 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3226 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3228 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3229 internal_error (__FILE__
, __LINE__
,
3230 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3231 if (gdbarch_debug
>= 2)
3232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3233 return gdbarch
->call_dummy_stack_adjust_p
;
3237 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3238 int call_dummy_stack_adjust_p
)
3240 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3244 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3246 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3247 internal_error (__FILE__
, __LINE__
,
3248 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3249 if (gdbarch_debug
>= 2)
3250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3251 return gdbarch
->call_dummy_stack_adjust
;
3255 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3256 int call_dummy_stack_adjust
)
3258 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3262 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
)
3264 if (gdbarch
->fix_call_dummy
== 0)
3265 internal_error (__FILE__
, __LINE__
,
3266 "gdbarch: gdbarch_fix_call_dummy invalid");
3267 if (gdbarch_debug
>= 2)
3268 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3269 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3273 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3274 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3276 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3280 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3282 if (gdbarch
->init_frame_pc_first
== 0)
3283 internal_error (__FILE__
, __LINE__
,
3284 "gdbarch: gdbarch_init_frame_pc_first invalid");
3285 if (gdbarch_debug
>= 2)
3286 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3287 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3291 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3292 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3294 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3298 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3300 if (gdbarch
->init_frame_pc
== 0)
3301 internal_error (__FILE__
, __LINE__
,
3302 "gdbarch: gdbarch_init_frame_pc invalid");
3303 if (gdbarch_debug
>= 2)
3304 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3305 gdbarch
->init_frame_pc (fromleaf
, prev
);
3309 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3310 gdbarch_init_frame_pc_ftype init_frame_pc
)
3312 gdbarch
->init_frame_pc
= init_frame_pc
;
3316 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3318 if (gdbarch_debug
>= 2)
3319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3320 return gdbarch
->believe_pcc_promotion
;
3324 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3325 int believe_pcc_promotion
)
3327 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3331 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3333 if (gdbarch_debug
>= 2)
3334 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3335 return gdbarch
->believe_pcc_promotion_type
;
3339 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3340 int believe_pcc_promotion_type
)
3342 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3346 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3348 if (gdbarch
->coerce_float_to_double
== 0)
3349 internal_error (__FILE__
, __LINE__
,
3350 "gdbarch: gdbarch_coerce_float_to_double invalid");
3351 if (gdbarch_debug
>= 2)
3352 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3353 return gdbarch
->coerce_float_to_double (formal
, actual
);
3357 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3358 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3360 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3364 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
)
3366 if (gdbarch
->get_saved_register
== 0)
3367 internal_error (__FILE__
, __LINE__
,
3368 "gdbarch: gdbarch_get_saved_register invalid");
3369 if (gdbarch_debug
>= 2)
3370 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3371 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3375 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3376 gdbarch_get_saved_register_ftype get_saved_register
)
3378 gdbarch
->get_saved_register
= get_saved_register
;
3382 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3384 if (gdbarch
->register_convertible
== 0)
3385 internal_error (__FILE__
, __LINE__
,
3386 "gdbarch: gdbarch_register_convertible invalid");
3387 if (gdbarch_debug
>= 2)
3388 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3389 return gdbarch
->register_convertible (nr
);
3393 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3394 gdbarch_register_convertible_ftype register_convertible
)
3396 gdbarch
->register_convertible
= register_convertible
;
3400 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3402 if (gdbarch
->register_convert_to_virtual
== 0)
3403 internal_error (__FILE__
, __LINE__
,
3404 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3405 if (gdbarch_debug
>= 2)
3406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3407 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3411 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3412 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3414 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3418 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3420 if (gdbarch
->register_convert_to_raw
== 0)
3421 internal_error (__FILE__
, __LINE__
,
3422 "gdbarch: gdbarch_register_convert_to_raw invalid");
3423 if (gdbarch_debug
>= 2)
3424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3425 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3429 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3430 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3432 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3436 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3438 if (gdbarch
->fetch_pseudo_register
== 0)
3439 internal_error (__FILE__
, __LINE__
,
3440 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3441 if (gdbarch_debug
>= 2)
3442 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3443 gdbarch
->fetch_pseudo_register (regnum
);
3447 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3448 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3450 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3454 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3456 if (gdbarch
->store_pseudo_register
== 0)
3457 internal_error (__FILE__
, __LINE__
,
3458 "gdbarch: gdbarch_store_pseudo_register invalid");
3459 if (gdbarch_debug
>= 2)
3460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3461 gdbarch
->store_pseudo_register (regnum
);
3465 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3466 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3468 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3472 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3474 if (gdbarch
->pointer_to_address
== 0)
3475 internal_error (__FILE__
, __LINE__
,
3476 "gdbarch: gdbarch_pointer_to_address invalid");
3477 if (gdbarch_debug
>= 2)
3478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3479 return gdbarch
->pointer_to_address (type
, buf
);
3483 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3484 gdbarch_pointer_to_address_ftype pointer_to_address
)
3486 gdbarch
->pointer_to_address
= pointer_to_address
;
3490 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3492 if (gdbarch
->address_to_pointer
== 0)
3493 internal_error (__FILE__
, __LINE__
,
3494 "gdbarch: gdbarch_address_to_pointer invalid");
3495 if (gdbarch_debug
>= 2)
3496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3497 gdbarch
->address_to_pointer (type
, buf
, addr
);
3501 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3502 gdbarch_address_to_pointer_ftype address_to_pointer
)
3504 gdbarch
->address_to_pointer
= address_to_pointer
;
3508 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3510 if (gdbarch
->return_value_on_stack
== 0)
3511 internal_error (__FILE__
, __LINE__
,
3512 "gdbarch: gdbarch_return_value_on_stack invalid");
3513 if (gdbarch_debug
>= 2)
3514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3515 return gdbarch
->return_value_on_stack (type
);
3519 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3520 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3522 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3526 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3528 if (gdbarch
->extract_return_value
== 0)
3529 internal_error (__FILE__
, __LINE__
,
3530 "gdbarch: gdbarch_extract_return_value invalid");
3531 if (gdbarch_debug
>= 2)
3532 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3533 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3537 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3538 gdbarch_extract_return_value_ftype extract_return_value
)
3540 gdbarch
->extract_return_value
= extract_return_value
;
3544 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3546 if (gdbarch
->push_arguments
== 0)
3547 internal_error (__FILE__
, __LINE__
,
3548 "gdbarch: gdbarch_push_arguments invalid");
3549 if (gdbarch_debug
>= 2)
3550 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3551 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3555 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3556 gdbarch_push_arguments_ftype push_arguments
)
3558 gdbarch
->push_arguments
= push_arguments
;
3562 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3564 if (gdbarch
->push_dummy_frame
== 0)
3565 internal_error (__FILE__
, __LINE__
,
3566 "gdbarch: gdbarch_push_dummy_frame invalid");
3567 if (gdbarch_debug
>= 2)
3568 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3569 gdbarch
->push_dummy_frame ();
3573 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3574 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3576 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3580 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3582 if (gdbarch
->push_return_address
== 0)
3583 internal_error (__FILE__
, __LINE__
,
3584 "gdbarch: gdbarch_push_return_address invalid");
3585 if (gdbarch_debug
>= 2)
3586 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3587 return gdbarch
->push_return_address (pc
, sp
);
3591 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3592 gdbarch_push_return_address_ftype push_return_address
)
3594 gdbarch
->push_return_address
= push_return_address
;
3598 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3600 if (gdbarch
->pop_frame
== 0)
3601 internal_error (__FILE__
, __LINE__
,
3602 "gdbarch: gdbarch_pop_frame invalid");
3603 if (gdbarch_debug
>= 2)
3604 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3605 gdbarch
->pop_frame ();
3609 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3610 gdbarch_pop_frame_ftype pop_frame
)
3612 gdbarch
->pop_frame
= pop_frame
;
3616 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3618 if (gdbarch
->store_struct_return
== 0)
3619 internal_error (__FILE__
, __LINE__
,
3620 "gdbarch: gdbarch_store_struct_return invalid");
3621 if (gdbarch_debug
>= 2)
3622 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3623 gdbarch
->store_struct_return (addr
, sp
);
3627 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3628 gdbarch_store_struct_return_ftype store_struct_return
)
3630 gdbarch
->store_struct_return
= store_struct_return
;
3634 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3636 if (gdbarch
->store_return_value
== 0)
3637 internal_error (__FILE__
, __LINE__
,
3638 "gdbarch: gdbarch_store_return_value invalid");
3639 if (gdbarch_debug
>= 2)
3640 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3641 gdbarch
->store_return_value (type
, valbuf
);
3645 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3646 gdbarch_store_return_value_ftype store_return_value
)
3648 gdbarch
->store_return_value
= store_return_value
;
3652 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3654 return gdbarch
->extract_struct_value_address
!= 0;
3658 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3660 if (gdbarch
->extract_struct_value_address
== 0)
3661 internal_error (__FILE__
, __LINE__
,
3662 "gdbarch: gdbarch_extract_struct_value_address invalid");
3663 if (gdbarch_debug
>= 2)
3664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3665 return gdbarch
->extract_struct_value_address (regbuf
);
3669 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3670 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3672 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3676 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3678 if (gdbarch
->use_struct_convention
== 0)
3679 internal_error (__FILE__
, __LINE__
,
3680 "gdbarch: gdbarch_use_struct_convention invalid");
3681 if (gdbarch_debug
>= 2)
3682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3683 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3687 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3688 gdbarch_use_struct_convention_ftype use_struct_convention
)
3690 gdbarch
->use_struct_convention
= use_struct_convention
;
3694 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3696 if (gdbarch
->frame_init_saved_regs
== 0)
3697 internal_error (__FILE__
, __LINE__
,
3698 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3699 if (gdbarch_debug
>= 2)
3700 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3701 gdbarch
->frame_init_saved_regs (frame
);
3705 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3706 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3708 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3712 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3714 if (gdbarch
->init_extra_frame_info
== 0)
3715 internal_error (__FILE__
, __LINE__
,
3716 "gdbarch: gdbarch_init_extra_frame_info invalid");
3717 if (gdbarch_debug
>= 2)
3718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3719 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3723 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3724 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3726 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3730 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3732 if (gdbarch
->skip_prologue
== 0)
3733 internal_error (__FILE__
, __LINE__
,
3734 "gdbarch: gdbarch_skip_prologue invalid");
3735 if (gdbarch_debug
>= 2)
3736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3737 return gdbarch
->skip_prologue (ip
);
3741 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3742 gdbarch_skip_prologue_ftype skip_prologue
)
3744 gdbarch
->skip_prologue
= skip_prologue
;
3748 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3750 if (gdbarch
->prologue_frameless_p
== 0)
3751 internal_error (__FILE__
, __LINE__
,
3752 "gdbarch: gdbarch_prologue_frameless_p invalid");
3753 if (gdbarch_debug
>= 2)
3754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3755 return gdbarch
->prologue_frameless_p (ip
);
3759 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3760 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3762 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3766 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3768 if (gdbarch
->inner_than
== 0)
3769 internal_error (__FILE__
, __LINE__
,
3770 "gdbarch: gdbarch_inner_than invalid");
3771 if (gdbarch_debug
>= 2)
3772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3773 return gdbarch
->inner_than (lhs
, rhs
);
3777 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3778 gdbarch_inner_than_ftype inner_than
)
3780 gdbarch
->inner_than
= inner_than
;
3784 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3786 if (gdbarch
->breakpoint_from_pc
== 0)
3787 internal_error (__FILE__
, __LINE__
,
3788 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3789 if (gdbarch_debug
>= 2)
3790 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3791 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3795 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3796 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3798 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3802 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3804 if (gdbarch
->memory_insert_breakpoint
== 0)
3805 internal_error (__FILE__
, __LINE__
,
3806 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3807 if (gdbarch_debug
>= 2)
3808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3809 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3813 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3814 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3816 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3820 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3822 if (gdbarch
->memory_remove_breakpoint
== 0)
3823 internal_error (__FILE__
, __LINE__
,
3824 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3825 if (gdbarch_debug
>= 2)
3826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3827 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3831 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3832 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3834 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3838 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3840 if (gdbarch
->decr_pc_after_break
== -1)
3841 internal_error (__FILE__
, __LINE__
,
3842 "gdbarch: gdbarch_decr_pc_after_break invalid");
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3845 return gdbarch
->decr_pc_after_break
;
3849 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3850 CORE_ADDR decr_pc_after_break
)
3852 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3856 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3858 if (gdbarch
->prepare_to_proceed
== 0)
3859 internal_error (__FILE__
, __LINE__
,
3860 "gdbarch: gdbarch_prepare_to_proceed invalid");
3861 if (gdbarch_debug
>= 2)
3862 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3863 return gdbarch
->prepare_to_proceed (select_it
);
3867 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3868 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3870 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3874 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3876 if (gdbarch
->function_start_offset
== -1)
3877 internal_error (__FILE__
, __LINE__
,
3878 "gdbarch: gdbarch_function_start_offset invalid");
3879 if (gdbarch_debug
>= 2)
3880 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3881 return gdbarch
->function_start_offset
;
3885 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3886 CORE_ADDR function_start_offset
)
3888 gdbarch
->function_start_offset
= function_start_offset
;
3892 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3894 if (gdbarch
->remote_translate_xfer_address
== 0)
3895 internal_error (__FILE__
, __LINE__
,
3896 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3897 if (gdbarch_debug
>= 2)
3898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3899 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3903 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3904 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3906 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3910 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3912 if (gdbarch
->frame_args_skip
== -1)
3913 internal_error (__FILE__
, __LINE__
,
3914 "gdbarch: gdbarch_frame_args_skip invalid");
3915 if (gdbarch_debug
>= 2)
3916 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3917 return gdbarch
->frame_args_skip
;
3921 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3922 CORE_ADDR frame_args_skip
)
3924 gdbarch
->frame_args_skip
= frame_args_skip
;
3928 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3930 if (gdbarch
->frameless_function_invocation
== 0)
3931 internal_error (__FILE__
, __LINE__
,
3932 "gdbarch: gdbarch_frameless_function_invocation invalid");
3933 if (gdbarch_debug
>= 2)
3934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3935 return gdbarch
->frameless_function_invocation (fi
);
3939 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3940 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3942 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3946 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3948 if (gdbarch
->frame_chain
== 0)
3949 internal_error (__FILE__
, __LINE__
,
3950 "gdbarch: gdbarch_frame_chain invalid");
3951 if (gdbarch_debug
>= 2)
3952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3953 return gdbarch
->frame_chain (frame
);
3957 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3958 gdbarch_frame_chain_ftype frame_chain
)
3960 gdbarch
->frame_chain
= frame_chain
;
3964 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3966 if (gdbarch
->frame_chain_valid
== 0)
3967 internal_error (__FILE__
, __LINE__
,
3968 "gdbarch: gdbarch_frame_chain_valid invalid");
3969 if (gdbarch_debug
>= 2)
3970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3971 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3975 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3976 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3978 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3982 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3984 if (gdbarch
->frame_saved_pc
== 0)
3985 internal_error (__FILE__
, __LINE__
,
3986 "gdbarch: gdbarch_frame_saved_pc invalid");
3987 if (gdbarch_debug
>= 2)
3988 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3989 return gdbarch
->frame_saved_pc (fi
);
3993 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3994 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3996 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4000 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4002 if (gdbarch
->frame_args_address
== 0)
4003 internal_error (__FILE__
, __LINE__
,
4004 "gdbarch: gdbarch_frame_args_address invalid");
4005 if (gdbarch_debug
>= 2)
4006 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4007 return gdbarch
->frame_args_address (fi
);
4011 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4012 gdbarch_frame_args_address_ftype frame_args_address
)
4014 gdbarch
->frame_args_address
= frame_args_address
;
4018 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4020 if (gdbarch
->frame_locals_address
== 0)
4021 internal_error (__FILE__
, __LINE__
,
4022 "gdbarch: gdbarch_frame_locals_address invalid");
4023 if (gdbarch_debug
>= 2)
4024 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4025 return gdbarch
->frame_locals_address (fi
);
4029 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4030 gdbarch_frame_locals_address_ftype frame_locals_address
)
4032 gdbarch
->frame_locals_address
= frame_locals_address
;
4036 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4038 if (gdbarch
->saved_pc_after_call
== 0)
4039 internal_error (__FILE__
, __LINE__
,
4040 "gdbarch: gdbarch_saved_pc_after_call invalid");
4041 if (gdbarch_debug
>= 2)
4042 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4043 return gdbarch
->saved_pc_after_call (frame
);
4047 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4048 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4050 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4054 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4056 if (gdbarch
->frame_num_args
== 0)
4057 internal_error (__FILE__
, __LINE__
,
4058 "gdbarch: gdbarch_frame_num_args invalid");
4059 if (gdbarch_debug
>= 2)
4060 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4061 return gdbarch
->frame_num_args (frame
);
4065 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4066 gdbarch_frame_num_args_ftype frame_num_args
)
4068 gdbarch
->frame_num_args
= frame_num_args
;
4072 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4074 return gdbarch
->stack_align
!= 0;
4078 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4080 if (gdbarch
->stack_align
== 0)
4081 internal_error (__FILE__
, __LINE__
,
4082 "gdbarch: gdbarch_stack_align invalid");
4083 if (gdbarch_debug
>= 2)
4084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4085 return gdbarch
->stack_align (sp
);
4089 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4090 gdbarch_stack_align_ftype stack_align
)
4092 gdbarch
->stack_align
= stack_align
;
4096 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4098 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4099 if (gdbarch_debug
>= 2)
4100 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4101 return gdbarch
->extra_stack_alignment_needed
;
4105 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4106 int extra_stack_alignment_needed
)
4108 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4112 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4114 return gdbarch
->reg_struct_has_addr
!= 0;
4118 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4120 if (gdbarch
->reg_struct_has_addr
== 0)
4121 internal_error (__FILE__
, __LINE__
,
4122 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4123 if (gdbarch_debug
>= 2)
4124 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4125 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4129 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4130 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4132 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4136 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4138 return gdbarch
->save_dummy_frame_tos
!= 0;
4142 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4144 if (gdbarch
->save_dummy_frame_tos
== 0)
4145 internal_error (__FILE__
, __LINE__
,
4146 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4147 if (gdbarch_debug
>= 2)
4148 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4149 gdbarch
->save_dummy_frame_tos (sp
);
4153 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4154 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4156 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4160 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4162 if (gdbarch_debug
>= 2)
4163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4164 return gdbarch
->parm_boundary
;
4168 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4171 gdbarch
->parm_boundary
= parm_boundary
;
4174 const struct floatformat
*
4175 gdbarch_float_format (struct gdbarch
*gdbarch
)
4177 if (gdbarch_debug
>= 2)
4178 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4179 return gdbarch
->float_format
;
4183 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4184 const struct floatformat
* float_format
)
4186 gdbarch
->float_format
= float_format
;
4189 const struct floatformat
*
4190 gdbarch_double_format (struct gdbarch
*gdbarch
)
4192 if (gdbarch_debug
>= 2)
4193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4194 return gdbarch
->double_format
;
4198 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4199 const struct floatformat
* double_format
)
4201 gdbarch
->double_format
= double_format
;
4204 const struct floatformat
*
4205 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4207 if (gdbarch_debug
>= 2)
4208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4209 return gdbarch
->long_double_format
;
4213 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4214 const struct floatformat
* long_double_format
)
4216 gdbarch
->long_double_format
= long_double_format
;
4220 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4222 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4223 internal_error (__FILE__
, __LINE__
,
4224 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4225 if (gdbarch_debug
>= 2)
4226 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4227 return gdbarch
->convert_from_func_ptr_addr (addr
);
4231 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4232 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4234 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4238 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4240 if (gdbarch
->addr_bits_remove
== 0)
4241 internal_error (__FILE__
, __LINE__
,
4242 "gdbarch: gdbarch_addr_bits_remove invalid");
4243 if (gdbarch_debug
>= 2)
4244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4245 return gdbarch
->addr_bits_remove (addr
);
4249 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4250 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4252 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4256 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4258 return gdbarch
->software_single_step
!= 0;
4262 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4264 if (gdbarch
->software_single_step
== 0)
4265 internal_error (__FILE__
, __LINE__
,
4266 "gdbarch: gdbarch_software_single_step invalid");
4267 if (gdbarch_debug
>= 2)
4268 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4269 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4273 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4274 gdbarch_software_single_step_ftype software_single_step
)
4276 gdbarch
->software_single_step
= software_single_step
;
4280 /* Keep a registry of per-architecture data-pointers required by GDB
4286 gdbarch_data_init_ftype
*init
;
4287 gdbarch_data_free_ftype
*free
;
4290 struct gdbarch_data_registration
4292 struct gdbarch_data
*data
;
4293 struct gdbarch_data_registration
*next
;
4296 struct gdbarch_data_registry
4299 struct gdbarch_data_registration
*registrations
;
4302 struct gdbarch_data_registry gdbarch_data_registry
=
4307 struct gdbarch_data
*
4308 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4309 gdbarch_data_free_ftype
*free
)
4311 struct gdbarch_data_registration
**curr
;
4312 for (curr
= &gdbarch_data_registry
.registrations
;
4314 curr
= &(*curr
)->next
);
4315 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4316 (*curr
)->next
= NULL
;
4317 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4318 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4319 (*curr
)->data
->init
= init
;
4320 (*curr
)->data
->free
= free
;
4321 return (*curr
)->data
;
4325 /* Walk through all the registered users initializing each in turn. */
4328 init_gdbarch_data (struct gdbarch
*gdbarch
)
4330 struct gdbarch_data_registration
*rego
;
4331 for (rego
= gdbarch_data_registry
.registrations
;
4335 struct gdbarch_data
*data
= rego
->data
;
4336 gdb_assert (data
->index
< gdbarch
->nr_data
);
4337 if (data
->init
!= NULL
)
4339 void *pointer
= data
->init (gdbarch
);
4340 set_gdbarch_data (gdbarch
, data
, pointer
);
4345 /* Create/delete the gdbarch data vector. */
4348 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4350 gdb_assert (gdbarch
->data
== NULL
);
4351 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4352 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4356 free_gdbarch_data (struct gdbarch
*gdbarch
)
4358 struct gdbarch_data_registration
*rego
;
4359 gdb_assert (gdbarch
->data
!= NULL
);
4360 for (rego
= gdbarch_data_registry
.registrations
;
4364 struct gdbarch_data
*data
= rego
->data
;
4365 gdb_assert (data
->index
< gdbarch
->nr_data
);
4366 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4368 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4369 gdbarch
->data
[data
->index
] = NULL
;
4372 xfree (gdbarch
->data
);
4373 gdbarch
->data
= NULL
;
4377 /* Initialize the current value of thee specified per-architecture
4381 set_gdbarch_data (struct gdbarch
*gdbarch
,
4382 struct gdbarch_data
*data
,
4385 gdb_assert (data
->index
< gdbarch
->nr_data
);
4386 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4387 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4388 gdbarch
->data
[data
->index
] = pointer
;
4391 /* Return the current value of the specified per-architecture
4395 gdbarch_data (struct gdbarch_data
*data
)
4397 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4398 return current_gdbarch
->data
[data
->index
];
4403 /* Keep a registry of swapped data required by GDB modules. */
4408 struct gdbarch_swap_registration
*source
;
4409 struct gdbarch_swap
*next
;
4412 struct gdbarch_swap_registration
4415 unsigned long sizeof_data
;
4416 gdbarch_swap_ftype
*init
;
4417 struct gdbarch_swap_registration
*next
;
4420 struct gdbarch_swap_registry
4423 struct gdbarch_swap_registration
*registrations
;
4426 struct gdbarch_swap_registry gdbarch_swap_registry
=
4432 register_gdbarch_swap (void *data
,
4433 unsigned long sizeof_data
,
4434 gdbarch_swap_ftype
*init
)
4436 struct gdbarch_swap_registration
**rego
;
4437 for (rego
= &gdbarch_swap_registry
.registrations
;
4439 rego
= &(*rego
)->next
);
4440 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4441 (*rego
)->next
= NULL
;
4442 (*rego
)->init
= init
;
4443 (*rego
)->data
= data
;
4444 (*rego
)->sizeof_data
= sizeof_data
;
4449 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4451 struct gdbarch_swap_registration
*rego
;
4452 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4453 for (rego
= gdbarch_swap_registry
.registrations
;
4457 if (rego
->data
!= NULL
)
4459 (*curr
) = XMALLOC (struct gdbarch_swap
);
4460 (*curr
)->source
= rego
;
4461 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4462 (*curr
)->next
= NULL
;
4463 memset (rego
->data
, 0, rego
->sizeof_data
);
4464 curr
= &(*curr
)->next
;
4466 if (rego
->init
!= NULL
)
4472 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4474 struct gdbarch_swap
*curr
;
4475 for (curr
= gdbarch
->swap
;
4478 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4482 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4484 struct gdbarch_swap
*curr
;
4485 for (curr
= gdbarch
->swap
;
4488 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4492 /* Keep a registry of the architectures known by GDB. */
4494 struct gdbarch_registration
4496 enum bfd_architecture bfd_architecture
;
4497 gdbarch_init_ftype
*init
;
4498 gdbarch_dump_tdep_ftype
*dump_tdep
;
4499 struct gdbarch_list
*arches
;
4500 struct gdbarch_registration
*next
;
4503 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4506 append_name (const char ***buf
, int *nr
, const char *name
)
4508 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4514 gdbarch_printable_names (void)
4518 /* Accumulate a list of names based on the registed list of
4520 enum bfd_architecture a
;
4522 const char **arches
= NULL
;
4523 struct gdbarch_registration
*rego
;
4524 for (rego
= gdbarch_registry
;
4528 const struct bfd_arch_info
*ap
;
4529 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4531 internal_error (__FILE__
, __LINE__
,
4532 "gdbarch_architecture_names: multi-arch unknown");
4535 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4540 append_name (&arches
, &nr_arches
, NULL
);
4544 /* Just return all the architectures that BFD knows. Assume that
4545 the legacy architecture framework supports them. */
4546 return bfd_arch_list ();
4551 gdbarch_register (enum bfd_architecture bfd_architecture
,
4552 gdbarch_init_ftype
*init
,
4553 gdbarch_dump_tdep_ftype
*dump_tdep
)
4555 struct gdbarch_registration
**curr
;
4556 const struct bfd_arch_info
*bfd_arch_info
;
4557 /* Check that BFD recognizes this architecture */
4558 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4559 if (bfd_arch_info
== NULL
)
4561 internal_error (__FILE__
, __LINE__
,
4562 "gdbarch: Attempt to register unknown architecture (%d)",
4565 /* Check that we haven't seen this architecture before */
4566 for (curr
= &gdbarch_registry
;
4568 curr
= &(*curr
)->next
)
4570 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4571 internal_error (__FILE__
, __LINE__
,
4572 "gdbarch: Duplicate registraration of architecture (%s)",
4573 bfd_arch_info
->printable_name
);
4577 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4578 bfd_arch_info
->printable_name
,
4581 (*curr
) = XMALLOC (struct gdbarch_registration
);
4582 (*curr
)->bfd_architecture
= bfd_architecture
;
4583 (*curr
)->init
= init
;
4584 (*curr
)->dump_tdep
= dump_tdep
;
4585 (*curr
)->arches
= NULL
;
4586 (*curr
)->next
= NULL
;
4587 /* When non- multi-arch, install whatever target dump routine we've
4588 been provided - hopefully that routine has been written correctly
4589 and works regardless of multi-arch. */
4590 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4591 && startup_gdbarch
.dump_tdep
== NULL
)
4592 startup_gdbarch
.dump_tdep
= dump_tdep
;
4596 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4597 gdbarch_init_ftype
*init
)
4599 gdbarch_register (bfd_architecture
, init
, NULL
);
4603 /* Look for an architecture using gdbarch_info. Base search on only
4604 BFD_ARCH_INFO and BYTE_ORDER. */
4606 struct gdbarch_list
*
4607 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4608 const struct gdbarch_info
*info
)
4610 for (; arches
!= NULL
; arches
= arches
->next
)
4612 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4614 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4622 /* Update the current architecture. Return ZERO if the update request
4626 gdbarch_update_p (struct gdbarch_info info
)
4628 struct gdbarch
*new_gdbarch
;
4629 struct gdbarch_list
**list
;
4630 struct gdbarch_registration
*rego
;
4632 /* Fill in missing parts of the INFO struct using a number of
4633 sources: ``set ...''; INFOabfd supplied; existing target. */
4635 /* ``(gdb) set architecture ...'' */
4636 if (info
.bfd_arch_info
== NULL
4637 && !TARGET_ARCHITECTURE_AUTO
)
4638 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4639 if (info
.bfd_arch_info
== NULL
4640 && info
.abfd
!= NULL
4641 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4642 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4643 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4644 if (info
.bfd_arch_info
== NULL
)
4645 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4647 /* ``(gdb) set byte-order ...'' */
4648 if (info
.byte_order
== 0
4649 && !TARGET_BYTE_ORDER_AUTO
)
4650 info
.byte_order
= TARGET_BYTE_ORDER
;
4651 /* From the INFO struct. */
4652 if (info
.byte_order
== 0
4653 && info
.abfd
!= NULL
)
4654 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4655 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4657 /* From the current target. */
4658 if (info
.byte_order
== 0)
4659 info
.byte_order
= TARGET_BYTE_ORDER
;
4661 /* Must have found some sort of architecture. */
4662 gdb_assert (info
.bfd_arch_info
!= NULL
);
4666 fprintf_unfiltered (gdb_stdlog
,
4667 "gdbarch_update: info.bfd_arch_info %s\n",
4668 (info
.bfd_arch_info
!= NULL
4669 ? info
.bfd_arch_info
->printable_name
4671 fprintf_unfiltered (gdb_stdlog
,
4672 "gdbarch_update: info.byte_order %d (%s)\n",
4674 (info
.byte_order
== BIG_ENDIAN
? "big"
4675 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4677 fprintf_unfiltered (gdb_stdlog
,
4678 "gdbarch_update: info.abfd 0x%lx\n",
4680 fprintf_unfiltered (gdb_stdlog
,
4681 "gdbarch_update: info.tdep_info 0x%lx\n",
4682 (long) info
.tdep_info
);
4685 /* Find the target that knows about this architecture. */
4686 for (rego
= gdbarch_registry
;
4689 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4694 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4698 /* Ask the target for a replacement architecture. */
4699 new_gdbarch
= rego
->init (info
, rego
->arches
);
4701 /* Did the target like it? No. Reject the change. */
4702 if (new_gdbarch
== NULL
)
4705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4709 /* Did the architecture change? No. Do nothing. */
4710 if (current_gdbarch
== new_gdbarch
)
4713 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4715 new_gdbarch
->bfd_arch_info
->printable_name
);
4719 /* Swap all data belonging to the old target out */
4720 swapout_gdbarch_swap (current_gdbarch
);
4722 /* Is this a pre-existing architecture? Yes. Swap it in. */
4723 for (list
= ®o
->arches
;
4725 list
= &(*list
)->next
)
4727 if ((*list
)->gdbarch
== new_gdbarch
)
4730 fprintf_unfiltered (gdb_stdlog
,
4731 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4733 new_gdbarch
->bfd_arch_info
->printable_name
);
4734 current_gdbarch
= new_gdbarch
;
4735 swapin_gdbarch_swap (new_gdbarch
);
4740 /* Append this new architecture to this targets list. */
4741 (*list
) = XMALLOC (struct gdbarch_list
);
4742 (*list
)->next
= NULL
;
4743 (*list
)->gdbarch
= new_gdbarch
;
4745 /* Switch to this new architecture. Dump it out. */
4746 current_gdbarch
= new_gdbarch
;
4749 fprintf_unfiltered (gdb_stdlog
,
4750 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4752 new_gdbarch
->bfd_arch_info
->printable_name
);
4755 /* Check that the newly installed architecture is valid. Plug in
4756 any post init values. */
4757 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4758 verify_gdbarch (new_gdbarch
);
4760 /* Initialize the per-architecture memory (swap) areas.
4761 CURRENT_GDBARCH must be update before these modules are
4763 init_gdbarch_swap (new_gdbarch
);
4765 /* Initialize the per-architecture data-pointer of all parties that
4766 registered an interest in this architecture. CURRENT_GDBARCH
4767 must be updated before these modules are called. */
4768 init_gdbarch_data (new_gdbarch
);
4771 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4779 /* Pointer to the target-dependent disassembly function. */
4780 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4781 disassemble_info tm_print_insn_info
;
4784 extern void _initialize_gdbarch (void);
4787 _initialize_gdbarch (void)
4789 struct cmd_list_element
*c
;
4791 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4792 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4793 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4794 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4795 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4797 add_show_from_set (add_set_cmd ("arch",
4800 (char *)&gdbarch_debug
,
4801 "Set architecture debugging.\n\
4802 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4804 c
= add_set_cmd ("archdebug",
4807 (char *)&gdbarch_debug
,
4808 "Set architecture debugging.\n\
4809 When non-zero, architecture debugging is enabled.", &setlist
);
4811 deprecate_cmd (c
, "set debug arch");
4812 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");