1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
61 #include "floatformat.h"
63 #include "gdb_assert.h"
64 #include "gdb-events.h"
66 /* Static function declarations */
68 static void verify_gdbarch (struct gdbarch
*gdbarch
);
69 static void alloc_gdbarch_data (struct gdbarch
*);
70 static void init_gdbarch_data (struct gdbarch
*);
71 static void free_gdbarch_data (struct gdbarch
*);
72 static void init_gdbarch_swap (struct gdbarch
*);
73 static void swapout_gdbarch_swap (struct gdbarch
*);
74 static void swapin_gdbarch_swap (struct gdbarch
*);
76 /* Convenience macro for allocting typesafe memory. */
79 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
83 /* Non-zero if we want to trace architecture code. */
86 #define GDBARCH_DEBUG 0
88 int gdbarch_debug
= GDBARCH_DEBUG
;
91 /* Maintain the struct gdbarch object */
95 /* basic architectural information */
96 const struct bfd_arch_info
* bfd_arch_info
;
99 /* target specific vector. */
100 struct gdbarch_tdep
*tdep
;
101 gdbarch_dump_tdep_ftype
*dump_tdep
;
103 /* per-architecture data-pointers */
107 /* per-architecture swap-regions */
108 struct gdbarch_swap
*swap
;
110 /* Multi-arch values.
112 When extending this structure you must:
116 Declare set/get functions and define the corresponding
119 gdbarch_alloc(): If zero/NULL is not a suitable default,
120 initialize the new field.
122 verify_gdbarch(): Confirm that the target updated the field
125 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
128 ``startup_gdbarch()'': Append an initial value to the static
129 variable (base values on the host's c-type system).
131 get_gdbarch(): Implement the set/get functions (probably using
132 the macro's as shortcuts).
147 gdbarch_read_pc_ftype
*read_pc
;
148 gdbarch_write_pc_ftype
*write_pc
;
149 gdbarch_read_fp_ftype
*read_fp
;
150 gdbarch_write_fp_ftype
*write_fp
;
151 gdbarch_read_sp_ftype
*read_sp
;
152 gdbarch_write_sp_ftype
*write_sp
;
153 gdbarch_register_read_ftype
*register_read
;
154 gdbarch_register_write_ftype
*register_write
;
163 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
164 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
165 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
166 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
167 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
168 gdbarch_register_name_ftype
*register_name
;
171 gdbarch_register_byte_ftype
*register_byte
;
172 gdbarch_register_raw_size_ftype
*register_raw_size
;
173 int max_register_raw_size
;
174 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
175 int max_register_virtual_size
;
176 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
177 gdbarch_do_registers_info_ftype
*do_registers_info
;
178 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
179 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
180 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
181 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
182 int use_generic_dummy_frames
;
183 int call_dummy_location
;
184 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
185 CORE_ADDR call_dummy_start_offset
;
186 CORE_ADDR call_dummy_breakpoint_offset
;
187 int call_dummy_breakpoint_offset_p
;
188 int call_dummy_length
;
189 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
191 LONGEST
* call_dummy_words
;
192 int sizeof_call_dummy_words
;
193 int call_dummy_stack_adjust_p
;
194 int call_dummy_stack_adjust
;
195 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
196 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
197 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
198 int believe_pcc_promotion
;
199 int believe_pcc_promotion_type
;
200 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
201 gdbarch_get_saved_register_ftype
*get_saved_register
;
202 gdbarch_register_convertible_ftype
*register_convertible
;
203 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
204 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
205 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
206 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
207 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
208 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
209 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
210 gdbarch_extract_return_value_ftype
*extract_return_value
;
211 gdbarch_push_arguments_ftype
*push_arguments
;
212 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
213 gdbarch_push_return_address_ftype
*push_return_address
;
214 gdbarch_pop_frame_ftype
*pop_frame
;
215 gdbarch_store_struct_return_ftype
*store_struct_return
;
216 gdbarch_store_return_value_ftype
*store_return_value
;
217 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
218 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
219 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
220 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
221 gdbarch_skip_prologue_ftype
*skip_prologue
;
222 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
223 gdbarch_inner_than_ftype
*inner_than
;
224 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
225 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
226 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
227 CORE_ADDR decr_pc_after_break
;
228 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
229 CORE_ADDR function_start_offset
;
230 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
231 CORE_ADDR frame_args_skip
;
232 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
233 gdbarch_frame_chain_ftype
*frame_chain
;
234 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
235 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
236 gdbarch_frame_args_address_ftype
*frame_args_address
;
237 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
238 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
239 gdbarch_frame_num_args_ftype
*frame_num_args
;
240 gdbarch_stack_align_ftype
*stack_align
;
241 int extra_stack_alignment_needed
;
242 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
243 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
245 const struct floatformat
* float_format
;
246 const struct floatformat
* double_format
;
247 const struct floatformat
* long_double_format
;
248 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
249 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
250 gdbarch_software_single_step_ftype
*software_single_step
;
254 /* The default architecture uses host values (for want of a better
257 extern const struct bfd_arch_info bfd_default_arch_struct
;
259 struct gdbarch startup_gdbarch
=
261 /* basic architecture information */
262 &bfd_default_arch_struct
,
264 /* target specific vector and its dump routine */
266 /*per-architecture data-pointers and swap regions */
268 /* Multi-arch values */
272 8 * sizeof (LONGEST
),
275 8 * sizeof (long double),
334 generic_get_saved_register
,
384 /* startup_gdbarch() */
387 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
389 /* Do any initialization needed for a non-multiarch configuration
390 after the _initialize_MODULE functions have been run. */
392 initialize_non_multiarch ()
394 alloc_gdbarch_data (&startup_gdbarch
);
395 init_gdbarch_data (&startup_gdbarch
);
399 /* Create a new ``struct gdbarch'' based on information provided by
400 ``struct gdbarch_info''. */
403 gdbarch_alloc (const struct gdbarch_info
*info
,
404 struct gdbarch_tdep
*tdep
)
406 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
407 memset (gdbarch
, 0, sizeof (*gdbarch
));
409 alloc_gdbarch_data (gdbarch
);
411 gdbarch
->tdep
= tdep
;
413 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
414 gdbarch
->byte_order
= info
->byte_order
;
416 /* Force the explicit initialization of these. */
417 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
418 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
419 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
420 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
421 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
422 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
423 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
424 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
425 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
426 gdbarch
->read_pc
= generic_target_read_pc
;
427 gdbarch
->write_pc
= generic_target_write_pc
;
428 gdbarch
->read_fp
= generic_target_read_fp
;
429 gdbarch
->write_fp
= generic_target_write_fp
;
430 gdbarch
->read_sp
= generic_target_read_sp
;
431 gdbarch
->write_sp
= generic_target_write_sp
;
432 gdbarch
->num_regs
= -1;
433 gdbarch
->sp_regnum
= -1;
434 gdbarch
->fp_regnum
= -1;
435 gdbarch
->pc_regnum
= -1;
436 gdbarch
->fp0_regnum
= -1;
437 gdbarch
->npc_regnum
= -1;
438 gdbarch
->nnpc_regnum
= -1;
439 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
440 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
441 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
442 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
443 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
444 gdbarch
->register_name
= legacy_register_name
;
445 gdbarch
->register_size
= -1;
446 gdbarch
->register_bytes
= -1;
447 gdbarch
->max_register_raw_size
= -1;
448 gdbarch
->max_register_virtual_size
= -1;
449 gdbarch
->do_registers_info
= do_registers_info
;
450 gdbarch
->register_sim_regno
= default_register_sim_regno
;
451 gdbarch
->cannot_fetch_register
= cannot_register_not
;
452 gdbarch
->cannot_store_register
= cannot_register_not
;
453 gdbarch
->use_generic_dummy_frames
= -1;
454 gdbarch
->call_dummy_start_offset
= -1;
455 gdbarch
->call_dummy_breakpoint_offset
= -1;
456 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
457 gdbarch
->call_dummy_length
= -1;
458 gdbarch
->call_dummy_p
= -1;
459 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
460 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
461 gdbarch
->call_dummy_stack_adjust_p
= -1;
462 gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
463 gdbarch
->init_frame_pc
= init_frame_pc_default
;
464 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
465 gdbarch
->register_convertible
= generic_register_convertible_not
;
466 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
467 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
468 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
469 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
470 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
471 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
472 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
473 gdbarch
->decr_pc_after_break
= -1;
474 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
475 gdbarch
->function_start_offset
= -1;
476 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
477 gdbarch
->frame_args_skip
= -1;
478 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
479 gdbarch
->extra_stack_alignment_needed
= 1;
480 gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
481 gdbarch
->addr_bits_remove
= core_addr_identity
;
482 /* gdbarch_alloc() */
488 /* Free a gdbarch struct. This should never happen in normal
489 operation --- once you've created a gdbarch, you keep it around.
490 However, if an architecture's init function encounters an error
491 building the structure, it may need to clean up a partially
492 constructed gdbarch. */
495 gdbarch_free (struct gdbarch
*arch
)
497 gdb_assert (arch
!= NULL
);
498 free_gdbarch_data (arch
);
503 /* Ensure that all values in a GDBARCH are reasonable. */
506 verify_gdbarch (struct gdbarch
*gdbarch
)
508 /* Only perform sanity checks on a multi-arch target. */
512 if (gdbarch
->byte_order
== 0)
513 internal_error (__FILE__
, __LINE__
,
514 "verify_gdbarch: byte-order unset");
515 if (gdbarch
->bfd_arch_info
== NULL
)
516 internal_error (__FILE__
, __LINE__
,
517 "verify_gdbarch: bfd_arch_info unset");
518 /* Check those that need to be defined for the given multi-arch level. */
519 /* Skip verify of short_bit, invalid_p == 0 */
520 /* Skip verify of int_bit, invalid_p == 0 */
521 /* Skip verify of long_bit, invalid_p == 0 */
522 /* Skip verify of long_long_bit, invalid_p == 0 */
523 /* Skip verify of float_bit, invalid_p == 0 */
524 /* Skip verify of double_bit, invalid_p == 0 */
525 /* Skip verify of long_double_bit, invalid_p == 0 */
526 /* Skip verify of ptr_bit, invalid_p == 0 */
527 if (gdbarch
->addr_bit
== 0)
528 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
529 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
530 /* Skip verify of ieee_float, invalid_p == 0 */
531 /* Skip verify of read_pc, invalid_p == 0 */
532 /* Skip verify of write_pc, invalid_p == 0 */
533 /* Skip verify of read_fp, invalid_p == 0 */
534 /* Skip verify of write_fp, invalid_p == 0 */
535 /* Skip verify of read_sp, invalid_p == 0 */
536 /* Skip verify of write_sp, invalid_p == 0 */
537 /* Skip verify of register_read, has predicate */
538 /* Skip verify of register_write, has predicate */
539 if ((GDB_MULTI_ARCH
>= 2)
540 && (gdbarch
->num_regs
== -1))
541 internal_error (__FILE__
, __LINE__
,
542 "gdbarch: verify_gdbarch: num_regs invalid");
543 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
544 if ((GDB_MULTI_ARCH
>= 2)
545 && (gdbarch
->sp_regnum
== -1))
546 internal_error (__FILE__
, __LINE__
,
547 "gdbarch: verify_gdbarch: sp_regnum invalid");
548 if ((GDB_MULTI_ARCH
>= 2)
549 && (gdbarch
->fp_regnum
== -1))
550 internal_error (__FILE__
, __LINE__
,
551 "gdbarch: verify_gdbarch: fp_regnum invalid");
552 if ((GDB_MULTI_ARCH
>= 2)
553 && (gdbarch
->pc_regnum
== -1))
554 internal_error (__FILE__
, __LINE__
,
555 "gdbarch: verify_gdbarch: pc_regnum invalid");
556 /* Skip verify of fp0_regnum, invalid_p == 0 */
557 /* Skip verify of npc_regnum, invalid_p == 0 */
558 /* Skip verify of nnpc_regnum, invalid_p == 0 */
559 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
560 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
561 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
562 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
563 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
564 /* Skip verify of register_name, invalid_p == 0 */
565 if ((GDB_MULTI_ARCH
>= 2)
566 && (gdbarch
->register_size
== -1))
567 internal_error (__FILE__
, __LINE__
,
568 "gdbarch: verify_gdbarch: register_size invalid");
569 if ((GDB_MULTI_ARCH
>= 2)
570 && (gdbarch
->register_bytes
== -1))
571 internal_error (__FILE__
, __LINE__
,
572 "gdbarch: verify_gdbarch: register_bytes invalid");
573 if ((GDB_MULTI_ARCH
>= 2)
574 && (gdbarch
->register_byte
== 0))
575 internal_error (__FILE__
, __LINE__
,
576 "gdbarch: verify_gdbarch: register_byte invalid");
577 if ((GDB_MULTI_ARCH
>= 2)
578 && (gdbarch
->register_raw_size
== 0))
579 internal_error (__FILE__
, __LINE__
,
580 "gdbarch: verify_gdbarch: register_raw_size invalid");
581 if ((GDB_MULTI_ARCH
>= 2)
582 && (gdbarch
->max_register_raw_size
== -1))
583 internal_error (__FILE__
, __LINE__
,
584 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
585 if ((GDB_MULTI_ARCH
>= 2)
586 && (gdbarch
->register_virtual_size
== 0))
587 internal_error (__FILE__
, __LINE__
,
588 "gdbarch: verify_gdbarch: register_virtual_size invalid");
589 if ((GDB_MULTI_ARCH
>= 2)
590 && (gdbarch
->max_register_virtual_size
== -1))
591 internal_error (__FILE__
, __LINE__
,
592 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
593 if ((GDB_MULTI_ARCH
>= 2)
594 && (gdbarch
->register_virtual_type
== 0))
595 internal_error (__FILE__
, __LINE__
,
596 "gdbarch: verify_gdbarch: register_virtual_type invalid");
597 /* Skip verify of do_registers_info, invalid_p == 0 */
598 /* Skip verify of register_sim_regno, invalid_p == 0 */
599 /* Skip verify of register_bytes_ok, has predicate */
600 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
601 /* Skip verify of cannot_store_register, invalid_p == 0 */
602 if ((GDB_MULTI_ARCH
>= 1)
603 && (gdbarch
->use_generic_dummy_frames
== -1))
604 internal_error (__FILE__
, __LINE__
,
605 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
606 if ((GDB_MULTI_ARCH
>= 2)
607 && (gdbarch
->call_dummy_location
== 0))
608 internal_error (__FILE__
, __LINE__
,
609 "gdbarch: verify_gdbarch: call_dummy_location invalid");
610 if ((GDB_MULTI_ARCH
>= 2)
611 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
612 internal_error (__FILE__
, __LINE__
,
613 "gdbarch: verify_gdbarch: call_dummy_address invalid");
614 if ((GDB_MULTI_ARCH
>= 2)
615 && (gdbarch
->call_dummy_start_offset
== -1))
616 internal_error (__FILE__
, __LINE__
,
617 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
618 if ((GDB_MULTI_ARCH
>= 2)
619 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
620 internal_error (__FILE__
, __LINE__
,
621 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
622 if ((GDB_MULTI_ARCH
>= 1)
623 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
624 internal_error (__FILE__
, __LINE__
,
625 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
626 if ((GDB_MULTI_ARCH
>= 2)
627 && (gdbarch
->call_dummy_length
== -1))
628 internal_error (__FILE__
, __LINE__
,
629 "gdbarch: verify_gdbarch: call_dummy_length invalid");
630 if ((GDB_MULTI_ARCH
>= 2)
631 && (gdbarch
->pc_in_call_dummy
== 0))
632 internal_error (__FILE__
, __LINE__
,
633 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
634 if ((GDB_MULTI_ARCH
>= 1)
635 && (gdbarch
->call_dummy_p
== -1))
636 internal_error (__FILE__
, __LINE__
,
637 "gdbarch: verify_gdbarch: call_dummy_p invalid");
638 /* Skip verify of call_dummy_words, invalid_p == 0 */
639 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
640 if ((GDB_MULTI_ARCH
>= 1)
641 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
642 internal_error (__FILE__
, __LINE__
,
643 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
644 if ((GDB_MULTI_ARCH
>= 2)
645 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
646 internal_error (__FILE__
, __LINE__
,
647 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
648 if ((GDB_MULTI_ARCH
>= 2)
649 && (gdbarch
->fix_call_dummy
== 0))
650 internal_error (__FILE__
, __LINE__
,
651 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
652 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
653 /* Skip verify of init_frame_pc, invalid_p == 0 */
654 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
655 if ((GDB_MULTI_ARCH
>= 1)
656 && (gdbarch
->get_saved_register
== 0))
657 internal_error (__FILE__
, __LINE__
,
658 "gdbarch: verify_gdbarch: get_saved_register invalid");
659 /* Skip verify of register_convertible, invalid_p == 0 */
660 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
661 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
662 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
663 /* Skip verify of store_pseudo_register, invalid_p == 0 */
664 /* Skip verify of pointer_to_address, invalid_p == 0 */
665 /* Skip verify of address_to_pointer, invalid_p == 0 */
666 /* Skip verify of return_value_on_stack, invalid_p == 0 */
667 if ((GDB_MULTI_ARCH
>= 2)
668 && (gdbarch
->extract_return_value
== 0))
669 internal_error (__FILE__
, __LINE__
,
670 "gdbarch: verify_gdbarch: extract_return_value invalid");
671 if ((GDB_MULTI_ARCH
>= 1)
672 && (gdbarch
->push_arguments
== 0))
673 internal_error (__FILE__
, __LINE__
,
674 "gdbarch: verify_gdbarch: push_arguments invalid");
675 if ((GDB_MULTI_ARCH
>= 2)
676 && (gdbarch
->push_dummy_frame
== 0))
677 internal_error (__FILE__
, __LINE__
,
678 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
679 if ((GDB_MULTI_ARCH
>= 1)
680 && (gdbarch
->push_return_address
== 0))
681 internal_error (__FILE__
, __LINE__
,
682 "gdbarch: verify_gdbarch: push_return_address invalid");
683 if ((GDB_MULTI_ARCH
>= 2)
684 && (gdbarch
->pop_frame
== 0))
685 internal_error (__FILE__
, __LINE__
,
686 "gdbarch: verify_gdbarch: pop_frame invalid");
687 if ((GDB_MULTI_ARCH
>= 2)
688 && (gdbarch
->store_struct_return
== 0))
689 internal_error (__FILE__
, __LINE__
,
690 "gdbarch: verify_gdbarch: store_struct_return invalid");
691 if ((GDB_MULTI_ARCH
>= 2)
692 && (gdbarch
->store_return_value
== 0))
693 internal_error (__FILE__
, __LINE__
,
694 "gdbarch: verify_gdbarch: store_return_value invalid");
695 /* Skip verify of extract_struct_value_address, has predicate */
696 if ((GDB_MULTI_ARCH
>= 2)
697 && (gdbarch
->use_struct_convention
== 0))
698 internal_error (__FILE__
, __LINE__
,
699 "gdbarch: verify_gdbarch: use_struct_convention invalid");
700 if ((GDB_MULTI_ARCH
>= 2)
701 && (gdbarch
->frame_init_saved_regs
== 0))
702 internal_error (__FILE__
, __LINE__
,
703 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
704 if ((GDB_MULTI_ARCH
>= 2)
705 && (gdbarch
->init_extra_frame_info
== 0))
706 internal_error (__FILE__
, __LINE__
,
707 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
708 if ((GDB_MULTI_ARCH
>= 2)
709 && (gdbarch
->skip_prologue
== 0))
710 internal_error (__FILE__
, __LINE__
,
711 "gdbarch: verify_gdbarch: skip_prologue invalid");
712 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
713 if ((GDB_MULTI_ARCH
>= 2)
714 && (gdbarch
->inner_than
== 0))
715 internal_error (__FILE__
, __LINE__
,
716 "gdbarch: verify_gdbarch: inner_than invalid");
717 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
718 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
719 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
720 if ((GDB_MULTI_ARCH
>= 2)
721 && (gdbarch
->decr_pc_after_break
== -1))
722 internal_error (__FILE__
, __LINE__
,
723 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
724 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
725 if ((GDB_MULTI_ARCH
>= 2)
726 && (gdbarch
->function_start_offset
== -1))
727 internal_error (__FILE__
, __LINE__
,
728 "gdbarch: verify_gdbarch: function_start_offset invalid");
729 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
>= 2)
731 && (gdbarch
->frame_args_skip
== -1))
732 internal_error (__FILE__
, __LINE__
,
733 "gdbarch: verify_gdbarch: frame_args_skip invalid");
734 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
735 if ((GDB_MULTI_ARCH
>= 2)
736 && (gdbarch
->frame_chain
== 0))
737 internal_error (__FILE__
, __LINE__
,
738 "gdbarch: verify_gdbarch: frame_chain invalid");
739 if ((GDB_MULTI_ARCH
>= 1)
740 && (gdbarch
->frame_chain_valid
== 0))
741 internal_error (__FILE__
, __LINE__
,
742 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
743 if ((GDB_MULTI_ARCH
>= 2)
744 && (gdbarch
->frame_saved_pc
== 0))
745 internal_error (__FILE__
, __LINE__
,
746 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
747 if ((GDB_MULTI_ARCH
>= 2)
748 && (gdbarch
->frame_args_address
== 0))
749 internal_error (__FILE__
, __LINE__
,
750 "gdbarch: verify_gdbarch: frame_args_address invalid");
751 if ((GDB_MULTI_ARCH
>= 2)
752 && (gdbarch
->frame_locals_address
== 0))
753 internal_error (__FILE__
, __LINE__
,
754 "gdbarch: verify_gdbarch: frame_locals_address invalid");
755 if ((GDB_MULTI_ARCH
>= 2)
756 && (gdbarch
->saved_pc_after_call
== 0))
757 internal_error (__FILE__
, __LINE__
,
758 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
759 if ((GDB_MULTI_ARCH
>= 2)
760 && (gdbarch
->frame_num_args
== 0))
761 internal_error (__FILE__
, __LINE__
,
762 "gdbarch: verify_gdbarch: frame_num_args invalid");
763 /* Skip verify of stack_align, has predicate */
764 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
765 /* Skip verify of reg_struct_has_addr, has predicate */
766 /* Skip verify of save_dummy_frame_tos, has predicate */
767 if (gdbarch
->float_format
== 0)
768 gdbarch
->float_format
= default_float_format (gdbarch
);
769 if (gdbarch
->double_format
== 0)
770 gdbarch
->double_format
= default_double_format (gdbarch
);
771 if (gdbarch
->long_double_format
== 0)
772 gdbarch
->long_double_format
= &floatformat_unknown
;
773 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
774 /* Skip verify of addr_bits_remove, invalid_p == 0 */
775 /* Skip verify of software_single_step, has predicate */
779 /* Print out the details of the current architecture. */
781 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
782 just happens to match the global variable ``current_gdbarch''. That
783 way macros refering to that variable get the local and not the global
784 version - ulgh. Once everything is parameterised with gdbarch, this
788 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
793 #ifdef TARGET_ARCHITECTURE
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
796 XSTRING (TARGET_ARCHITECTURE
));
798 #ifdef TARGET_BYTE_ORDER
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
801 XSTRING (TARGET_BYTE_ORDER
));
803 #ifdef TARGET_SHORT_BIT
804 fprintf_unfiltered (file
,
805 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
806 XSTRING (TARGET_SHORT_BIT
));
808 #ifdef TARGET_INT_BIT
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: TARGET_INT_BIT # %s\n",
811 XSTRING (TARGET_INT_BIT
));
813 #ifdef TARGET_LONG_BIT
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
816 XSTRING (TARGET_LONG_BIT
));
818 #ifdef TARGET_LONG_LONG_BIT
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
821 XSTRING (TARGET_LONG_LONG_BIT
));
823 #ifdef TARGET_FLOAT_BIT
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
826 XSTRING (TARGET_FLOAT_BIT
));
828 #ifdef TARGET_DOUBLE_BIT
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
831 XSTRING (TARGET_DOUBLE_BIT
));
833 #ifdef TARGET_LONG_DOUBLE_BIT
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
836 XSTRING (TARGET_LONG_DOUBLE_BIT
));
838 #ifdef TARGET_PTR_BIT
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
841 XSTRING (TARGET_PTR_BIT
));
843 #ifdef TARGET_ADDR_BIT
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
846 XSTRING (TARGET_ADDR_BIT
));
848 #ifdef TARGET_BFD_VMA_BIT
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
851 XSTRING (TARGET_BFD_VMA_BIT
));
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: IEEE_FLOAT # %s\n",
856 XSTRING (IEEE_FLOAT
));
858 #ifdef TARGET_READ_PC
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: %s # %s\n",
861 "TARGET_READ_PC(ptid)",
862 XSTRING (TARGET_READ_PC (ptid
)));
864 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
865 /* Macro might contain `[{}]' when not multi-arch */
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: %s # %s\n",
868 "TARGET_WRITE_PC(val, ptid)",
869 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
871 #ifdef TARGET_READ_FP
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: %s # %s\n",
875 XSTRING (TARGET_READ_FP ()));
877 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
878 /* Macro might contain `[{}]' when not multi-arch */
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: %s # %s\n",
881 "TARGET_WRITE_FP(val)",
882 XSTRING (TARGET_WRITE_FP (val
)));
884 #ifdef TARGET_READ_SP
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: %s # %s\n",
888 XSTRING (TARGET_READ_SP ()));
890 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
891 /* Macro might contain `[{}]' when not multi-arch */
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: %s # %s\n",
894 "TARGET_WRITE_SP(val)",
895 XSTRING (TARGET_WRITE_SP (val
)));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: NUM_REGS # %s\n",
902 #ifdef NUM_PSEUDO_REGS
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
905 XSTRING (NUM_PSEUDO_REGS
));
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: SP_REGNUM # %s\n",
910 XSTRING (SP_REGNUM
));
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: FP_REGNUM # %s\n",
915 XSTRING (FP_REGNUM
));
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: PC_REGNUM # %s\n",
920 XSTRING (PC_REGNUM
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: FP0_REGNUM # %s\n",
925 XSTRING (FP0_REGNUM
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: NPC_REGNUM # %s\n",
930 XSTRING (NPC_REGNUM
));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: NNPC_REGNUM # %s\n",
935 XSTRING (NNPC_REGNUM
));
937 #ifdef STAB_REG_TO_REGNUM
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: %s # %s\n",
940 "STAB_REG_TO_REGNUM(stab_regnr)",
941 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
943 #ifdef ECOFF_REG_TO_REGNUM
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: %s # %s\n",
946 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
947 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
949 #ifdef DWARF_REG_TO_REGNUM
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: %s # %s\n",
952 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
953 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
955 #ifdef SDB_REG_TO_REGNUM
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: %s # %s\n",
958 "SDB_REG_TO_REGNUM(sdb_regnr)",
959 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
961 #ifdef DWARF2_REG_TO_REGNUM
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: %s # %s\n",
964 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
965 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: %s # %s\n",
970 "REGISTER_NAME(regnr)",
971 XSTRING (REGISTER_NAME (regnr
)));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: REGISTER_SIZE # %s\n",
976 XSTRING (REGISTER_SIZE
));
978 #ifdef REGISTER_BYTES
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: REGISTER_BYTES # %s\n",
981 XSTRING (REGISTER_BYTES
));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: %s # %s\n",
986 "REGISTER_BYTE(reg_nr)",
987 XSTRING (REGISTER_BYTE (reg_nr
)));
989 #ifdef REGISTER_RAW_SIZE
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "REGISTER_RAW_SIZE(reg_nr)",
993 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
995 #ifdef MAX_REGISTER_RAW_SIZE
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
998 XSTRING (MAX_REGISTER_RAW_SIZE
));
1000 #ifdef REGISTER_VIRTUAL_SIZE
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: %s # %s\n",
1003 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1004 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1006 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1009 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1011 #ifdef REGISTER_VIRTUAL_TYPE
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: %s # %s\n",
1014 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1015 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1017 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1018 /* Macro might contain `[{}]' when not multi-arch */
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: %s # %s\n",
1021 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1022 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1024 #ifdef REGISTER_SIM_REGNO
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: %s # %s\n",
1027 "REGISTER_SIM_REGNO(reg_nr)",
1028 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1030 #ifdef REGISTER_BYTES_OK
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: %s # %s\n",
1033 "REGISTER_BYTES_OK(nr_bytes)",
1034 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1036 #ifdef CANNOT_FETCH_REGISTER
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: %s # %s\n",
1039 "CANNOT_FETCH_REGISTER(regnum)",
1040 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
1042 #ifdef CANNOT_STORE_REGISTER
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: %s # %s\n",
1045 "CANNOT_STORE_REGISTER(regnum)",
1046 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
1048 #ifdef USE_GENERIC_DUMMY_FRAMES
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1051 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1053 #ifdef CALL_DUMMY_LOCATION
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1056 XSTRING (CALL_DUMMY_LOCATION
));
1058 #ifdef CALL_DUMMY_ADDRESS
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: %s # %s\n",
1061 "CALL_DUMMY_ADDRESS()",
1062 XSTRING (CALL_DUMMY_ADDRESS ()));
1064 #ifdef CALL_DUMMY_START_OFFSET
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1067 XSTRING (CALL_DUMMY_START_OFFSET
));
1069 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1072 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1074 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1077 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1079 #ifdef CALL_DUMMY_LENGTH
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1082 XSTRING (CALL_DUMMY_LENGTH
));
1084 #ifdef PC_IN_CALL_DUMMY
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: %s # %s\n",
1087 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1088 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1091 fprintf_unfiltered (file
,
1092 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1093 XSTRING (CALL_DUMMY_P
));
1095 #ifdef CALL_DUMMY_WORDS
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1098 XSTRING (CALL_DUMMY_WORDS
));
1100 #ifdef SIZEOF_CALL_DUMMY_WORDS
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1103 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1105 #ifdef CALL_DUMMY_STACK_ADJUST_P
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1108 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1110 #ifdef CALL_DUMMY_STACK_ADJUST
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1113 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1115 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1116 /* Macro might contain `[{}]' when not multi-arch */
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: %s # %s\n",
1119 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1120 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1122 #if defined (INIT_FRAME_PC_FIRST) && GDB_MULTI_ARCH
1123 /* Macro might contain `[{}]' when not multi-arch */
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: %s # %s\n",
1126 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1127 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1129 #if defined (INIT_FRAME_PC) && GDB_MULTI_ARCH
1130 /* Macro might contain `[{}]' when not multi-arch */
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: %s # %s\n",
1133 "INIT_FRAME_PC(fromleaf, prev)",
1134 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1136 #ifdef BELIEVE_PCC_PROMOTION
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1139 XSTRING (BELIEVE_PCC_PROMOTION
));
1141 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1144 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1146 #ifdef COERCE_FLOAT_TO_DOUBLE
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: %s # %s\n",
1149 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1150 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1152 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1153 /* Macro might contain `[{}]' when not multi-arch */
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: %s # %s\n",
1156 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1157 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1159 #ifdef REGISTER_CONVERTIBLE
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: %s # %s\n",
1162 "REGISTER_CONVERTIBLE(nr)",
1163 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1165 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1166 /* Macro might contain `[{}]' when not multi-arch */
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: %s # %s\n",
1169 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1170 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1172 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1173 /* Macro might contain `[{}]' when not multi-arch */
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: %s # %s\n",
1176 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1177 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1179 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1180 /* Macro might contain `[{}]' when not multi-arch */
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: %s # %s\n",
1183 "FETCH_PSEUDO_REGISTER(regnum)",
1184 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1186 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1187 /* Macro might contain `[{}]' when not multi-arch */
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: %s # %s\n",
1190 "STORE_PSEUDO_REGISTER(regnum)",
1191 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1193 #ifdef POINTER_TO_ADDRESS
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: %s # %s\n",
1196 "POINTER_TO_ADDRESS(type, buf)",
1197 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1199 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1200 /* Macro might contain `[{}]' when not multi-arch */
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: %s # %s\n",
1203 "ADDRESS_TO_POINTER(type, buf, addr)",
1204 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1206 #ifdef RETURN_VALUE_ON_STACK
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: %s # %s\n",
1209 "RETURN_VALUE_ON_STACK(type)",
1210 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1212 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1213 /* Macro might contain `[{}]' when not multi-arch */
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: %s # %s\n",
1216 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1217 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1219 #ifdef PUSH_ARGUMENTS
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: %s # %s\n",
1222 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1223 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1225 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1226 /* Macro might contain `[{}]' when not multi-arch */
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: %s # %s\n",
1229 "PUSH_DUMMY_FRAME(-)",
1230 XSTRING (PUSH_DUMMY_FRAME (-)));
1232 #ifdef PUSH_RETURN_ADDRESS
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: %s # %s\n",
1235 "PUSH_RETURN_ADDRESS(pc, sp)",
1236 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1238 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1239 /* Macro might contain `[{}]' when not multi-arch */
1240 fprintf_unfiltered (file
,
1241 "gdbarch_dump: %s # %s\n",
1243 XSTRING (POP_FRAME (-)));
1245 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1246 /* Macro might contain `[{}]' when not multi-arch */
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: %s # %s\n",
1249 "STORE_STRUCT_RETURN(addr, sp)",
1250 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1252 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1253 /* Macro might contain `[{}]' when not multi-arch */
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: %s # %s\n",
1256 "STORE_RETURN_VALUE(type, valbuf)",
1257 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1259 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1260 fprintf_unfiltered (file
,
1261 "gdbarch_dump: %s # %s\n",
1262 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1263 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1265 #ifdef USE_STRUCT_CONVENTION
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: %s # %s\n",
1268 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1269 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1271 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1272 /* Macro might contain `[{}]' when not multi-arch */
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: %s # %s\n",
1275 "FRAME_INIT_SAVED_REGS(frame)",
1276 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1278 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1279 /* Macro might contain `[{}]' when not multi-arch */
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: %s # %s\n",
1282 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1283 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1285 #ifdef SKIP_PROLOGUE
1286 fprintf_unfiltered (file
,
1287 "gdbarch_dump: %s # %s\n",
1288 "SKIP_PROLOGUE(ip)",
1289 XSTRING (SKIP_PROLOGUE (ip
)));
1291 #ifdef PROLOGUE_FRAMELESS_P
1292 fprintf_unfiltered (file
,
1293 "gdbarch_dump: %s # %s\n",
1294 "PROLOGUE_FRAMELESS_P(ip)",
1295 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1298 fprintf_unfiltered (file
,
1299 "gdbarch_dump: %s # %s\n",
1300 "INNER_THAN(lhs, rhs)",
1301 XSTRING (INNER_THAN (lhs
, rhs
)));
1303 #ifdef BREAKPOINT_FROM_PC
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: %s # %s\n",
1306 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1307 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1309 #ifdef MEMORY_INSERT_BREAKPOINT
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: %s # %s\n",
1312 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1313 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1315 #ifdef MEMORY_REMOVE_BREAKPOINT
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: %s # %s\n",
1318 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1319 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1321 #ifdef DECR_PC_AFTER_BREAK
1322 fprintf_unfiltered (file
,
1323 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1324 XSTRING (DECR_PC_AFTER_BREAK
));
1326 #ifdef PREPARE_TO_PROCEED
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: %s # %s\n",
1329 "PREPARE_TO_PROCEED(select_it)",
1330 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1332 #ifdef FUNCTION_START_OFFSET
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1335 XSTRING (FUNCTION_START_OFFSET
));
1337 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1338 /* Macro might contain `[{}]' when not multi-arch */
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: %s # %s\n",
1341 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1342 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1344 #ifdef FRAME_ARGS_SKIP
1345 fprintf_unfiltered (file
,
1346 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1347 XSTRING (FRAME_ARGS_SKIP
));
1349 #ifdef FRAMELESS_FUNCTION_INVOCATION
1350 fprintf_unfiltered (file
,
1351 "gdbarch_dump: %s # %s\n",
1352 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1353 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: %s # %s\n",
1358 "FRAME_CHAIN(frame)",
1359 XSTRING (FRAME_CHAIN (frame
)));
1361 #ifdef FRAME_CHAIN_VALID
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: %s # %s\n",
1364 "FRAME_CHAIN_VALID(chain, thisframe)",
1365 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1367 #ifdef FRAME_SAVED_PC
1368 fprintf_unfiltered (file
,
1369 "gdbarch_dump: %s # %s\n",
1370 "FRAME_SAVED_PC(fi)",
1371 XSTRING (FRAME_SAVED_PC (fi
)));
1373 #ifdef FRAME_ARGS_ADDRESS
1374 fprintf_unfiltered (file
,
1375 "gdbarch_dump: %s # %s\n",
1376 "FRAME_ARGS_ADDRESS(fi)",
1377 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1379 #ifdef FRAME_LOCALS_ADDRESS
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: %s # %s\n",
1382 "FRAME_LOCALS_ADDRESS(fi)",
1383 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1385 #ifdef SAVED_PC_AFTER_CALL
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: %s # %s\n",
1388 "SAVED_PC_AFTER_CALL(frame)",
1389 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1391 #ifdef FRAME_NUM_ARGS
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: %s # %s\n",
1394 "FRAME_NUM_ARGS(frame)",
1395 XSTRING (FRAME_NUM_ARGS (frame
)));
1398 fprintf_unfiltered (file
,
1399 "gdbarch_dump: %s # %s\n",
1401 XSTRING (STACK_ALIGN (sp
)));
1403 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1406 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1408 #ifdef REG_STRUCT_HAS_ADDR
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: %s # %s\n",
1411 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1412 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1414 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1415 /* Macro might contain `[{}]' when not multi-arch */
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: %s # %s\n",
1418 "SAVE_DUMMY_FRAME_TOS(sp)",
1419 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1421 #ifdef PARM_BOUNDARY
1422 fprintf_unfiltered (file
,
1423 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1424 XSTRING (PARM_BOUNDARY
));
1426 #ifdef TARGET_FLOAT_FORMAT
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1429 XSTRING (TARGET_FLOAT_FORMAT
));
1431 #ifdef TARGET_DOUBLE_FORMAT
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1434 XSTRING (TARGET_DOUBLE_FORMAT
));
1436 #ifdef TARGET_LONG_DOUBLE_FORMAT
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1439 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1441 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: %s # %s\n",
1444 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1445 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1447 #ifdef ADDR_BITS_REMOVE
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: %s # %s\n",
1450 "ADDR_BITS_REMOVE(addr)",
1451 XSTRING (ADDR_BITS_REMOVE (addr
)));
1453 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1454 /* Macro might contain `[{}]' when not multi-arch */
1455 fprintf_unfiltered (file
,
1456 "gdbarch_dump: %s # %s\n",
1457 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1458 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1460 #ifdef TARGET_ARCHITECTURE
1461 if (TARGET_ARCHITECTURE
!= NULL
)
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1464 TARGET_ARCHITECTURE
->printable_name
);
1466 #ifdef TARGET_BYTE_ORDER
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1469 (long) TARGET_BYTE_ORDER
);
1471 #ifdef TARGET_SHORT_BIT
1472 fprintf_unfiltered (file
,
1473 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1474 (long) TARGET_SHORT_BIT
);
1476 #ifdef TARGET_INT_BIT
1477 fprintf_unfiltered (file
,
1478 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1479 (long) TARGET_INT_BIT
);
1481 #ifdef TARGET_LONG_BIT
1482 fprintf_unfiltered (file
,
1483 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1484 (long) TARGET_LONG_BIT
);
1486 #ifdef TARGET_LONG_LONG_BIT
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1489 (long) TARGET_LONG_LONG_BIT
);
1491 #ifdef TARGET_FLOAT_BIT
1492 fprintf_unfiltered (file
,
1493 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1494 (long) TARGET_FLOAT_BIT
);
1496 #ifdef TARGET_DOUBLE_BIT
1497 fprintf_unfiltered (file
,
1498 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1499 (long) TARGET_DOUBLE_BIT
);
1501 #ifdef TARGET_LONG_DOUBLE_BIT
1502 fprintf_unfiltered (file
,
1503 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1504 (long) TARGET_LONG_DOUBLE_BIT
);
1506 #ifdef TARGET_PTR_BIT
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1509 (long) TARGET_PTR_BIT
);
1511 #ifdef TARGET_ADDR_BIT
1512 fprintf_unfiltered (file
,
1513 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1514 (long) TARGET_ADDR_BIT
);
1516 #ifdef TARGET_BFD_VMA_BIT
1517 fprintf_unfiltered (file
,
1518 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1519 (long) TARGET_BFD_VMA_BIT
);
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1526 #ifdef TARGET_READ_PC
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1530 (long) current_gdbarch
->read_pc
1531 /*TARGET_READ_PC ()*/);
1533 #ifdef TARGET_WRITE_PC
1535 fprintf_unfiltered (file
,
1536 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1537 (long) current_gdbarch
->write_pc
1538 /*TARGET_WRITE_PC ()*/);
1540 #ifdef TARGET_READ_FP
1542 fprintf_unfiltered (file
,
1543 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1544 (long) current_gdbarch
->read_fp
1545 /*TARGET_READ_FP ()*/);
1547 #ifdef TARGET_WRITE_FP
1549 fprintf_unfiltered (file
,
1550 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1551 (long) current_gdbarch
->write_fp
1552 /*TARGET_WRITE_FP ()*/);
1554 #ifdef TARGET_READ_SP
1556 fprintf_unfiltered (file
,
1557 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1558 (long) current_gdbarch
->read_sp
1559 /*TARGET_READ_SP ()*/);
1561 #ifdef TARGET_WRITE_SP
1563 fprintf_unfiltered (file
,
1564 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1565 (long) current_gdbarch
->write_sp
1566 /*TARGET_WRITE_SP ()*/);
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: register_read = 0x%08lx\n",
1571 (long) current_gdbarch
->register_read
);
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: register_write = 0x%08lx\n",
1575 (long) current_gdbarch
->register_write
);
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: NUM_REGS = %ld\n",
1581 #ifdef NUM_PSEUDO_REGS
1582 fprintf_unfiltered (file
,
1583 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1584 (long) NUM_PSEUDO_REGS
);
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: SP_REGNUM = %ld\n",
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: FP_REGNUM = %ld\n",
1597 fprintf_unfiltered (file
,
1598 "gdbarch_dump: PC_REGNUM = %ld\n",
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: FP0_REGNUM = %ld\n",
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: NPC_REGNUM = %ld\n",
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1614 (long) NNPC_REGNUM
);
1616 #ifdef STAB_REG_TO_REGNUM
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1620 (long) current_gdbarch
->stab_reg_to_regnum
1621 /*STAB_REG_TO_REGNUM ()*/);
1623 #ifdef ECOFF_REG_TO_REGNUM
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1627 (long) current_gdbarch
->ecoff_reg_to_regnum
1628 /*ECOFF_REG_TO_REGNUM ()*/);
1630 #ifdef DWARF_REG_TO_REGNUM
1632 fprintf_unfiltered (file
,
1633 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1634 (long) current_gdbarch
->dwarf_reg_to_regnum
1635 /*DWARF_REG_TO_REGNUM ()*/);
1637 #ifdef SDB_REG_TO_REGNUM
1639 fprintf_unfiltered (file
,
1640 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1641 (long) current_gdbarch
->sdb_reg_to_regnum
1642 /*SDB_REG_TO_REGNUM ()*/);
1644 #ifdef DWARF2_REG_TO_REGNUM
1646 fprintf_unfiltered (file
,
1647 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1648 (long) current_gdbarch
->dwarf2_reg_to_regnum
1649 /*DWARF2_REG_TO_REGNUM ()*/);
1651 #ifdef REGISTER_NAME
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1655 (long) current_gdbarch
->register_name
1656 /*REGISTER_NAME ()*/);
1658 #ifdef REGISTER_SIZE
1659 fprintf_unfiltered (file
,
1660 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1661 (long) REGISTER_SIZE
);
1663 #ifdef REGISTER_BYTES
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1666 (long) REGISTER_BYTES
);
1668 #ifdef REGISTER_BYTE
1670 fprintf_unfiltered (file
,
1671 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1672 (long) current_gdbarch
->register_byte
1673 /*REGISTER_BYTE ()*/);
1675 #ifdef REGISTER_RAW_SIZE
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1679 (long) current_gdbarch
->register_raw_size
1680 /*REGISTER_RAW_SIZE ()*/);
1682 #ifdef MAX_REGISTER_RAW_SIZE
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1685 (long) MAX_REGISTER_RAW_SIZE
);
1687 #ifdef REGISTER_VIRTUAL_SIZE
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1691 (long) current_gdbarch
->register_virtual_size
1692 /*REGISTER_VIRTUAL_SIZE ()*/);
1694 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1695 fprintf_unfiltered (file
,
1696 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1697 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1699 #ifdef REGISTER_VIRTUAL_TYPE
1701 fprintf_unfiltered (file
,
1702 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1703 (long) current_gdbarch
->register_virtual_type
1704 /*REGISTER_VIRTUAL_TYPE ()*/);
1706 #ifdef DO_REGISTERS_INFO
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1710 (long) current_gdbarch
->do_registers_info
1711 /*DO_REGISTERS_INFO ()*/);
1713 #ifdef REGISTER_SIM_REGNO
1715 fprintf_unfiltered (file
,
1716 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1717 (long) current_gdbarch
->register_sim_regno
1718 /*REGISTER_SIM_REGNO ()*/);
1720 #ifdef REGISTER_BYTES_OK
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1724 (long) current_gdbarch
->register_bytes_ok
1725 /*REGISTER_BYTES_OK ()*/);
1727 #ifdef CANNOT_FETCH_REGISTER
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
1731 (long) current_gdbarch
->cannot_fetch_register
1732 /*CANNOT_FETCH_REGISTER ()*/);
1734 #ifdef CANNOT_STORE_REGISTER
1736 fprintf_unfiltered (file
,
1737 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
1738 (long) current_gdbarch
->cannot_store_register
1739 /*CANNOT_STORE_REGISTER ()*/);
1741 #ifdef USE_GENERIC_DUMMY_FRAMES
1742 fprintf_unfiltered (file
,
1743 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1744 (long) USE_GENERIC_DUMMY_FRAMES
);
1746 #ifdef CALL_DUMMY_LOCATION
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1749 (long) CALL_DUMMY_LOCATION
);
1751 #ifdef CALL_DUMMY_ADDRESS
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1755 (long) current_gdbarch
->call_dummy_address
1756 /*CALL_DUMMY_ADDRESS ()*/);
1758 #ifdef CALL_DUMMY_START_OFFSET
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1761 (long) CALL_DUMMY_START_OFFSET
);
1763 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1764 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1765 fprintf_unfiltered (file
,
1766 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1767 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1769 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1770 fprintf_unfiltered (file
,
1771 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1772 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1774 #ifdef CALL_DUMMY_LENGTH
1775 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1778 (long) CALL_DUMMY_LENGTH
);
1780 #ifdef PC_IN_CALL_DUMMY
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1784 (long) current_gdbarch
->pc_in_call_dummy
1785 /*PC_IN_CALL_DUMMY ()*/);
1788 fprintf_unfiltered (file
,
1789 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1790 (long) CALL_DUMMY_P
);
1792 #ifdef CALL_DUMMY_WORDS
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1795 (long) CALL_DUMMY_WORDS
);
1797 #ifdef SIZEOF_CALL_DUMMY_WORDS
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1800 (long) SIZEOF_CALL_DUMMY_WORDS
);
1802 #ifdef CALL_DUMMY_STACK_ADJUST_P
1803 fprintf_unfiltered (file
,
1804 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1805 (long) CALL_DUMMY_STACK_ADJUST_P
);
1807 #ifdef CALL_DUMMY_STACK_ADJUST
1808 if (CALL_DUMMY_STACK_ADJUST_P
)
1809 fprintf_unfiltered (file
,
1810 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1811 (long) CALL_DUMMY_STACK_ADJUST
);
1813 #ifdef FIX_CALL_DUMMY
1815 fprintf_unfiltered (file
,
1816 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1817 (long) current_gdbarch
->fix_call_dummy
1818 /*FIX_CALL_DUMMY ()*/);
1820 #ifdef INIT_FRAME_PC_FIRST
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1824 (long) current_gdbarch
->init_frame_pc_first
1825 /*INIT_FRAME_PC_FIRST ()*/);
1827 #ifdef INIT_FRAME_PC
1829 fprintf_unfiltered (file
,
1830 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1831 (long) current_gdbarch
->init_frame_pc
1832 /*INIT_FRAME_PC ()*/);
1834 #ifdef BELIEVE_PCC_PROMOTION
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1837 (long) BELIEVE_PCC_PROMOTION
);
1839 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1842 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1844 #ifdef COERCE_FLOAT_TO_DOUBLE
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1848 (long) current_gdbarch
->coerce_float_to_double
1849 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1851 #ifdef GET_SAVED_REGISTER
1853 fprintf_unfiltered (file
,
1854 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1855 (long) current_gdbarch
->get_saved_register
1856 /*GET_SAVED_REGISTER ()*/);
1858 #ifdef REGISTER_CONVERTIBLE
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1862 (long) current_gdbarch
->register_convertible
1863 /*REGISTER_CONVERTIBLE ()*/);
1865 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1869 (long) current_gdbarch
->register_convert_to_virtual
1870 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1872 #ifdef REGISTER_CONVERT_TO_RAW
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1876 (long) current_gdbarch
->register_convert_to_raw
1877 /*REGISTER_CONVERT_TO_RAW ()*/);
1879 #ifdef FETCH_PSEUDO_REGISTER
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1883 (long) current_gdbarch
->fetch_pseudo_register
1884 /*FETCH_PSEUDO_REGISTER ()*/);
1886 #ifdef STORE_PSEUDO_REGISTER
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1890 (long) current_gdbarch
->store_pseudo_register
1891 /*STORE_PSEUDO_REGISTER ()*/);
1893 #ifdef POINTER_TO_ADDRESS
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1897 (long) current_gdbarch
->pointer_to_address
1898 /*POINTER_TO_ADDRESS ()*/);
1900 #ifdef ADDRESS_TO_POINTER
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1904 (long) current_gdbarch
->address_to_pointer
1905 /*ADDRESS_TO_POINTER ()*/);
1907 #ifdef RETURN_VALUE_ON_STACK
1909 fprintf_unfiltered (file
,
1910 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1911 (long) current_gdbarch
->return_value_on_stack
1912 /*RETURN_VALUE_ON_STACK ()*/);
1914 #ifdef EXTRACT_RETURN_VALUE
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1918 (long) current_gdbarch
->extract_return_value
1919 /*EXTRACT_RETURN_VALUE ()*/);
1921 #ifdef PUSH_ARGUMENTS
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1925 (long) current_gdbarch
->push_arguments
1926 /*PUSH_ARGUMENTS ()*/);
1928 #ifdef PUSH_DUMMY_FRAME
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1932 (long) current_gdbarch
->push_dummy_frame
1933 /*PUSH_DUMMY_FRAME ()*/);
1935 #ifdef PUSH_RETURN_ADDRESS
1937 fprintf_unfiltered (file
,
1938 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1939 (long) current_gdbarch
->push_return_address
1940 /*PUSH_RETURN_ADDRESS ()*/);
1944 fprintf_unfiltered (file
,
1945 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1946 (long) current_gdbarch
->pop_frame
1949 #ifdef STORE_STRUCT_RETURN
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1953 (long) current_gdbarch
->store_struct_return
1954 /*STORE_STRUCT_RETURN ()*/);
1956 #ifdef STORE_RETURN_VALUE
1958 fprintf_unfiltered (file
,
1959 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1960 (long) current_gdbarch
->store_return_value
1961 /*STORE_RETURN_VALUE ()*/);
1963 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1967 (long) current_gdbarch
->extract_struct_value_address
1968 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1970 #ifdef USE_STRUCT_CONVENTION
1972 fprintf_unfiltered (file
,
1973 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1974 (long) current_gdbarch
->use_struct_convention
1975 /*USE_STRUCT_CONVENTION ()*/);
1977 #ifdef FRAME_INIT_SAVED_REGS
1979 fprintf_unfiltered (file
,
1980 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1981 (long) current_gdbarch
->frame_init_saved_regs
1982 /*FRAME_INIT_SAVED_REGS ()*/);
1984 #ifdef INIT_EXTRA_FRAME_INFO
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1988 (long) current_gdbarch
->init_extra_frame_info
1989 /*INIT_EXTRA_FRAME_INFO ()*/);
1991 #ifdef SKIP_PROLOGUE
1993 fprintf_unfiltered (file
,
1994 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1995 (long) current_gdbarch
->skip_prologue
1996 /*SKIP_PROLOGUE ()*/);
1998 #ifdef PROLOGUE_FRAMELESS_P
2000 fprintf_unfiltered (file
,
2001 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2002 (long) current_gdbarch
->prologue_frameless_p
2003 /*PROLOGUE_FRAMELESS_P ()*/);
2007 fprintf_unfiltered (file
,
2008 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2009 (long) current_gdbarch
->inner_than
2012 #ifdef BREAKPOINT_FROM_PC
2014 fprintf_unfiltered (file
,
2015 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2016 (long) current_gdbarch
->breakpoint_from_pc
2017 /*BREAKPOINT_FROM_PC ()*/);
2019 #ifdef MEMORY_INSERT_BREAKPOINT
2021 fprintf_unfiltered (file
,
2022 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2023 (long) current_gdbarch
->memory_insert_breakpoint
2024 /*MEMORY_INSERT_BREAKPOINT ()*/);
2026 #ifdef MEMORY_REMOVE_BREAKPOINT
2028 fprintf_unfiltered (file
,
2029 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2030 (long) current_gdbarch
->memory_remove_breakpoint
2031 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2033 #ifdef DECR_PC_AFTER_BREAK
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2036 (long) DECR_PC_AFTER_BREAK
);
2038 #ifdef PREPARE_TO_PROCEED
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2042 (long) current_gdbarch
->prepare_to_proceed
2043 /*PREPARE_TO_PROCEED ()*/);
2045 #ifdef FUNCTION_START_OFFSET
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2048 (long) FUNCTION_START_OFFSET
);
2050 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2054 (long) current_gdbarch
->remote_translate_xfer_address
2055 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2057 #ifdef FRAME_ARGS_SKIP
2058 fprintf_unfiltered (file
,
2059 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2060 (long) FRAME_ARGS_SKIP
);
2062 #ifdef FRAMELESS_FUNCTION_INVOCATION
2064 fprintf_unfiltered (file
,
2065 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2066 (long) current_gdbarch
->frameless_function_invocation
2067 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2073 (long) current_gdbarch
->frame_chain
2074 /*FRAME_CHAIN ()*/);
2076 #ifdef FRAME_CHAIN_VALID
2078 fprintf_unfiltered (file
,
2079 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2080 (long) current_gdbarch
->frame_chain_valid
2081 /*FRAME_CHAIN_VALID ()*/);
2083 #ifdef FRAME_SAVED_PC
2085 fprintf_unfiltered (file
,
2086 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2087 (long) current_gdbarch
->frame_saved_pc
2088 /*FRAME_SAVED_PC ()*/);
2090 #ifdef FRAME_ARGS_ADDRESS
2092 fprintf_unfiltered (file
,
2093 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2094 (long) current_gdbarch
->frame_args_address
2095 /*FRAME_ARGS_ADDRESS ()*/);
2097 #ifdef FRAME_LOCALS_ADDRESS
2099 fprintf_unfiltered (file
,
2100 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2101 (long) current_gdbarch
->frame_locals_address
2102 /*FRAME_LOCALS_ADDRESS ()*/);
2104 #ifdef SAVED_PC_AFTER_CALL
2106 fprintf_unfiltered (file
,
2107 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2108 (long) current_gdbarch
->saved_pc_after_call
2109 /*SAVED_PC_AFTER_CALL ()*/);
2111 #ifdef FRAME_NUM_ARGS
2113 fprintf_unfiltered (file
,
2114 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2115 (long) current_gdbarch
->frame_num_args
2116 /*FRAME_NUM_ARGS ()*/);
2120 fprintf_unfiltered (file
,
2121 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2122 (long) current_gdbarch
->stack_align
2123 /*STACK_ALIGN ()*/);
2125 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2126 fprintf_unfiltered (file
,
2127 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2128 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2130 #ifdef REG_STRUCT_HAS_ADDR
2132 fprintf_unfiltered (file
,
2133 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2134 (long) current_gdbarch
->reg_struct_has_addr
2135 /*REG_STRUCT_HAS_ADDR ()*/);
2137 #ifdef SAVE_DUMMY_FRAME_TOS
2139 fprintf_unfiltered (file
,
2140 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2141 (long) current_gdbarch
->save_dummy_frame_tos
2142 /*SAVE_DUMMY_FRAME_TOS ()*/);
2144 #ifdef PARM_BOUNDARY
2145 fprintf_unfiltered (file
,
2146 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2147 (long) PARM_BOUNDARY
);
2149 #ifdef TARGET_FLOAT_FORMAT
2150 fprintf_unfiltered (file
,
2151 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2152 (long) TARGET_FLOAT_FORMAT
);
2154 #ifdef TARGET_DOUBLE_FORMAT
2155 fprintf_unfiltered (file
,
2156 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2157 (long) TARGET_DOUBLE_FORMAT
);
2159 #ifdef TARGET_LONG_DOUBLE_FORMAT
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2162 (long) TARGET_LONG_DOUBLE_FORMAT
);
2164 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2166 fprintf_unfiltered (file
,
2167 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2168 (long) current_gdbarch
->convert_from_func_ptr_addr
2169 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2171 #ifdef ADDR_BITS_REMOVE
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
2175 (long) current_gdbarch
->addr_bits_remove
2176 /*ADDR_BITS_REMOVE ()*/);
2178 #ifdef SOFTWARE_SINGLE_STEP
2180 fprintf_unfiltered (file
,
2181 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2182 (long) current_gdbarch
->software_single_step
2183 /*SOFTWARE_SINGLE_STEP ()*/);
2185 if (current_gdbarch
->dump_tdep
!= NULL
)
2186 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2189 struct gdbarch_tdep
*
2190 gdbarch_tdep (struct gdbarch
*gdbarch
)
2192 if (gdbarch_debug
>= 2)
2193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2194 return gdbarch
->tdep
;
2198 const struct bfd_arch_info
*
2199 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2201 if (gdbarch_debug
>= 2)
2202 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2203 return gdbarch
->bfd_arch_info
;
2207 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2209 if (gdbarch_debug
>= 2)
2210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2211 return gdbarch
->byte_order
;
2215 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2217 /* Skip verify of short_bit, invalid_p == 0 */
2218 if (gdbarch_debug
>= 2)
2219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2220 return gdbarch
->short_bit
;
2224 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2227 gdbarch
->short_bit
= short_bit
;
2231 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2233 /* Skip verify of int_bit, invalid_p == 0 */
2234 if (gdbarch_debug
>= 2)
2235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2236 return gdbarch
->int_bit
;
2240 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2243 gdbarch
->int_bit
= int_bit
;
2247 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2249 /* Skip verify of long_bit, invalid_p == 0 */
2250 if (gdbarch_debug
>= 2)
2251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2252 return gdbarch
->long_bit
;
2256 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2259 gdbarch
->long_bit
= long_bit
;
2263 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2265 /* Skip verify of long_long_bit, invalid_p == 0 */
2266 if (gdbarch_debug
>= 2)
2267 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2268 return gdbarch
->long_long_bit
;
2272 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2275 gdbarch
->long_long_bit
= long_long_bit
;
2279 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2281 /* Skip verify of float_bit, invalid_p == 0 */
2282 if (gdbarch_debug
>= 2)
2283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2284 return gdbarch
->float_bit
;
2288 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2291 gdbarch
->float_bit
= float_bit
;
2295 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2297 /* Skip verify of double_bit, invalid_p == 0 */
2298 if (gdbarch_debug
>= 2)
2299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2300 return gdbarch
->double_bit
;
2304 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2307 gdbarch
->double_bit
= double_bit
;
2311 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2313 /* Skip verify of long_double_bit, invalid_p == 0 */
2314 if (gdbarch_debug
>= 2)
2315 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2316 return gdbarch
->long_double_bit
;
2320 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2321 int long_double_bit
)
2323 gdbarch
->long_double_bit
= long_double_bit
;
2327 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2329 /* Skip verify of ptr_bit, invalid_p == 0 */
2330 if (gdbarch_debug
>= 2)
2331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2332 return gdbarch
->ptr_bit
;
2336 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2339 gdbarch
->ptr_bit
= ptr_bit
;
2343 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2345 if (gdbarch
->addr_bit
== 0)
2346 internal_error (__FILE__
, __LINE__
,
2347 "gdbarch: gdbarch_addr_bit invalid");
2348 if (gdbarch_debug
>= 2)
2349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2350 return gdbarch
->addr_bit
;
2354 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2357 gdbarch
->addr_bit
= addr_bit
;
2361 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2363 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2364 if (gdbarch_debug
>= 2)
2365 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2366 return gdbarch
->bfd_vma_bit
;
2370 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2373 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2377 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2379 /* Skip verify of ieee_float, invalid_p == 0 */
2380 if (gdbarch_debug
>= 2)
2381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2382 return gdbarch
->ieee_float
;
2386 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2389 gdbarch
->ieee_float
= ieee_float
;
2393 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2395 if (gdbarch
->read_pc
== 0)
2396 internal_error (__FILE__
, __LINE__
,
2397 "gdbarch: gdbarch_read_pc invalid");
2398 if (gdbarch_debug
>= 2)
2399 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2400 return gdbarch
->read_pc (ptid
);
2404 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2405 gdbarch_read_pc_ftype read_pc
)
2407 gdbarch
->read_pc
= read_pc
;
2411 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2413 if (gdbarch
->write_pc
== 0)
2414 internal_error (__FILE__
, __LINE__
,
2415 "gdbarch: gdbarch_write_pc invalid");
2416 if (gdbarch_debug
>= 2)
2417 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2418 gdbarch
->write_pc (val
, ptid
);
2422 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2423 gdbarch_write_pc_ftype write_pc
)
2425 gdbarch
->write_pc
= write_pc
;
2429 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2431 if (gdbarch
->read_fp
== 0)
2432 internal_error (__FILE__
, __LINE__
,
2433 "gdbarch: gdbarch_read_fp invalid");
2434 if (gdbarch_debug
>= 2)
2435 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2436 return gdbarch
->read_fp ();
2440 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2441 gdbarch_read_fp_ftype read_fp
)
2443 gdbarch
->read_fp
= read_fp
;
2447 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2449 if (gdbarch
->write_fp
== 0)
2450 internal_error (__FILE__
, __LINE__
,
2451 "gdbarch: gdbarch_write_fp invalid");
2452 if (gdbarch_debug
>= 2)
2453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2454 gdbarch
->write_fp (val
);
2458 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2459 gdbarch_write_fp_ftype write_fp
)
2461 gdbarch
->write_fp
= write_fp
;
2465 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2467 if (gdbarch
->read_sp
== 0)
2468 internal_error (__FILE__
, __LINE__
,
2469 "gdbarch: gdbarch_read_sp invalid");
2470 if (gdbarch_debug
>= 2)
2471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2472 return gdbarch
->read_sp ();
2476 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2477 gdbarch_read_sp_ftype read_sp
)
2479 gdbarch
->read_sp
= read_sp
;
2483 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2485 if (gdbarch
->write_sp
== 0)
2486 internal_error (__FILE__
, __LINE__
,
2487 "gdbarch: gdbarch_write_sp invalid");
2488 if (gdbarch_debug
>= 2)
2489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2490 gdbarch
->write_sp (val
);
2494 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2495 gdbarch_write_sp_ftype write_sp
)
2497 gdbarch
->write_sp
= write_sp
;
2501 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2503 return gdbarch
->register_read
!= 0;
2507 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2509 if (gdbarch
->register_read
== 0)
2510 internal_error (__FILE__
, __LINE__
,
2511 "gdbarch: gdbarch_register_read invalid");
2512 if (gdbarch_debug
>= 2)
2513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2514 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2518 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2519 gdbarch_register_read_ftype register_read
)
2521 gdbarch
->register_read
= register_read
;
2525 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2527 return gdbarch
->register_write
!= 0;
2531 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2533 if (gdbarch
->register_write
== 0)
2534 internal_error (__FILE__
, __LINE__
,
2535 "gdbarch: gdbarch_register_write invalid");
2536 if (gdbarch_debug
>= 2)
2537 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2538 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2542 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2543 gdbarch_register_write_ftype register_write
)
2545 gdbarch
->register_write
= register_write
;
2549 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2551 if (gdbarch
->num_regs
== -1)
2552 internal_error (__FILE__
, __LINE__
,
2553 "gdbarch: gdbarch_num_regs invalid");
2554 if (gdbarch_debug
>= 2)
2555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2556 return gdbarch
->num_regs
;
2560 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2563 gdbarch
->num_regs
= num_regs
;
2567 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2569 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2570 if (gdbarch_debug
>= 2)
2571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2572 return gdbarch
->num_pseudo_regs
;
2576 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2577 int num_pseudo_regs
)
2579 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2583 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2585 if (gdbarch
->sp_regnum
== -1)
2586 internal_error (__FILE__
, __LINE__
,
2587 "gdbarch: gdbarch_sp_regnum invalid");
2588 if (gdbarch_debug
>= 2)
2589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2590 return gdbarch
->sp_regnum
;
2594 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2597 gdbarch
->sp_regnum
= sp_regnum
;
2601 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2603 if (gdbarch
->fp_regnum
== -1)
2604 internal_error (__FILE__
, __LINE__
,
2605 "gdbarch: gdbarch_fp_regnum invalid");
2606 if (gdbarch_debug
>= 2)
2607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2608 return gdbarch
->fp_regnum
;
2612 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2615 gdbarch
->fp_regnum
= fp_regnum
;
2619 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2621 if (gdbarch
->pc_regnum
== -1)
2622 internal_error (__FILE__
, __LINE__
,
2623 "gdbarch: gdbarch_pc_regnum invalid");
2624 if (gdbarch_debug
>= 2)
2625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2626 return gdbarch
->pc_regnum
;
2630 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2633 gdbarch
->pc_regnum
= pc_regnum
;
2637 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2639 /* Skip verify of fp0_regnum, invalid_p == 0 */
2640 if (gdbarch_debug
>= 2)
2641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2642 return gdbarch
->fp0_regnum
;
2646 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2649 gdbarch
->fp0_regnum
= fp0_regnum
;
2653 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2655 /* Skip verify of npc_regnum, invalid_p == 0 */
2656 if (gdbarch_debug
>= 2)
2657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2658 return gdbarch
->npc_regnum
;
2662 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2665 gdbarch
->npc_regnum
= npc_regnum
;
2669 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2671 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2672 if (gdbarch_debug
>= 2)
2673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2674 return gdbarch
->nnpc_regnum
;
2678 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2681 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2685 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2687 if (gdbarch
->stab_reg_to_regnum
== 0)
2688 internal_error (__FILE__
, __LINE__
,
2689 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2690 if (gdbarch_debug
>= 2)
2691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2692 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2696 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2697 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2699 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2703 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2705 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2706 internal_error (__FILE__
, __LINE__
,
2707 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2708 if (gdbarch_debug
>= 2)
2709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2710 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2714 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2715 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2717 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2721 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2723 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2724 internal_error (__FILE__
, __LINE__
,
2725 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2726 if (gdbarch_debug
>= 2)
2727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2728 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2732 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2733 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2735 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2739 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2741 if (gdbarch
->sdb_reg_to_regnum
== 0)
2742 internal_error (__FILE__
, __LINE__
,
2743 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2744 if (gdbarch_debug
>= 2)
2745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2746 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2750 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2751 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2753 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2757 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2759 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2760 internal_error (__FILE__
, __LINE__
,
2761 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2762 if (gdbarch_debug
>= 2)
2763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2764 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2768 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2769 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2771 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2775 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2777 if (gdbarch
->register_name
== 0)
2778 internal_error (__FILE__
, __LINE__
,
2779 "gdbarch: gdbarch_register_name invalid");
2780 if (gdbarch_debug
>= 2)
2781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2782 return gdbarch
->register_name (regnr
);
2786 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2787 gdbarch_register_name_ftype register_name
)
2789 gdbarch
->register_name
= register_name
;
2793 gdbarch_register_size (struct gdbarch
*gdbarch
)
2795 if (gdbarch
->register_size
== -1)
2796 internal_error (__FILE__
, __LINE__
,
2797 "gdbarch: gdbarch_register_size invalid");
2798 if (gdbarch_debug
>= 2)
2799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2800 return gdbarch
->register_size
;
2804 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2807 gdbarch
->register_size
= register_size
;
2811 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2813 if (gdbarch
->register_bytes
== -1)
2814 internal_error (__FILE__
, __LINE__
,
2815 "gdbarch: gdbarch_register_bytes invalid");
2816 if (gdbarch_debug
>= 2)
2817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2818 return gdbarch
->register_bytes
;
2822 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2825 gdbarch
->register_bytes
= register_bytes
;
2829 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2831 if (gdbarch
->register_byte
== 0)
2832 internal_error (__FILE__
, __LINE__
,
2833 "gdbarch: gdbarch_register_byte invalid");
2834 if (gdbarch_debug
>= 2)
2835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2836 return gdbarch
->register_byte (reg_nr
);
2840 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2841 gdbarch_register_byte_ftype register_byte
)
2843 gdbarch
->register_byte
= register_byte
;
2847 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2849 if (gdbarch
->register_raw_size
== 0)
2850 internal_error (__FILE__
, __LINE__
,
2851 "gdbarch: gdbarch_register_raw_size invalid");
2852 if (gdbarch_debug
>= 2)
2853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2854 return gdbarch
->register_raw_size (reg_nr
);
2858 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2859 gdbarch_register_raw_size_ftype register_raw_size
)
2861 gdbarch
->register_raw_size
= register_raw_size
;
2865 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2867 if (gdbarch
->max_register_raw_size
== -1)
2868 internal_error (__FILE__
, __LINE__
,
2869 "gdbarch: gdbarch_max_register_raw_size invalid");
2870 if (gdbarch_debug
>= 2)
2871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2872 return gdbarch
->max_register_raw_size
;
2876 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2877 int max_register_raw_size
)
2879 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2883 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2885 if (gdbarch
->register_virtual_size
== 0)
2886 internal_error (__FILE__
, __LINE__
,
2887 "gdbarch: gdbarch_register_virtual_size invalid");
2888 if (gdbarch_debug
>= 2)
2889 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2890 return gdbarch
->register_virtual_size (reg_nr
);
2894 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2895 gdbarch_register_virtual_size_ftype register_virtual_size
)
2897 gdbarch
->register_virtual_size
= register_virtual_size
;
2901 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2903 if (gdbarch
->max_register_virtual_size
== -1)
2904 internal_error (__FILE__
, __LINE__
,
2905 "gdbarch: gdbarch_max_register_virtual_size invalid");
2906 if (gdbarch_debug
>= 2)
2907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2908 return gdbarch
->max_register_virtual_size
;
2912 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2913 int max_register_virtual_size
)
2915 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2919 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2921 if (gdbarch
->register_virtual_type
== 0)
2922 internal_error (__FILE__
, __LINE__
,
2923 "gdbarch: gdbarch_register_virtual_type invalid");
2924 if (gdbarch_debug
>= 2)
2925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2926 return gdbarch
->register_virtual_type (reg_nr
);
2930 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2931 gdbarch_register_virtual_type_ftype register_virtual_type
)
2933 gdbarch
->register_virtual_type
= register_virtual_type
;
2937 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2939 if (gdbarch
->do_registers_info
== 0)
2940 internal_error (__FILE__
, __LINE__
,
2941 "gdbarch: gdbarch_do_registers_info invalid");
2942 if (gdbarch_debug
>= 2)
2943 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2944 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2948 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2949 gdbarch_do_registers_info_ftype do_registers_info
)
2951 gdbarch
->do_registers_info
= do_registers_info
;
2955 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2957 if (gdbarch
->register_sim_regno
== 0)
2958 internal_error (__FILE__
, __LINE__
,
2959 "gdbarch: gdbarch_register_sim_regno invalid");
2960 if (gdbarch_debug
>= 2)
2961 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2962 return gdbarch
->register_sim_regno (reg_nr
);
2966 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2967 gdbarch_register_sim_regno_ftype register_sim_regno
)
2969 gdbarch
->register_sim_regno
= register_sim_regno
;
2973 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2975 return gdbarch
->register_bytes_ok
!= 0;
2979 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2981 if (gdbarch
->register_bytes_ok
== 0)
2982 internal_error (__FILE__
, __LINE__
,
2983 "gdbarch: gdbarch_register_bytes_ok invalid");
2984 if (gdbarch_debug
>= 2)
2985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2986 return gdbarch
->register_bytes_ok (nr_bytes
);
2990 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2991 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2993 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2997 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2999 if (gdbarch
->cannot_fetch_register
== 0)
3000 internal_error (__FILE__
, __LINE__
,
3001 "gdbarch: gdbarch_cannot_fetch_register invalid");
3002 if (gdbarch_debug
>= 2)
3003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
3004 return gdbarch
->cannot_fetch_register (regnum
);
3008 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
3009 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
3011 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
3015 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
3017 if (gdbarch
->cannot_store_register
== 0)
3018 internal_error (__FILE__
, __LINE__
,
3019 "gdbarch: gdbarch_cannot_store_register invalid");
3020 if (gdbarch_debug
>= 2)
3021 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
3022 return gdbarch
->cannot_store_register (regnum
);
3026 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
3027 gdbarch_cannot_store_register_ftype cannot_store_register
)
3029 gdbarch
->cannot_store_register
= cannot_store_register
;
3033 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3035 if (gdbarch
->use_generic_dummy_frames
== -1)
3036 internal_error (__FILE__
, __LINE__
,
3037 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3038 if (gdbarch_debug
>= 2)
3039 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3040 return gdbarch
->use_generic_dummy_frames
;
3044 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3045 int use_generic_dummy_frames
)
3047 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3051 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3053 if (gdbarch
->call_dummy_location
== 0)
3054 internal_error (__FILE__
, __LINE__
,
3055 "gdbarch: gdbarch_call_dummy_location invalid");
3056 if (gdbarch_debug
>= 2)
3057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3058 return gdbarch
->call_dummy_location
;
3062 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3063 int call_dummy_location
)
3065 gdbarch
->call_dummy_location
= call_dummy_location
;
3069 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3071 if (gdbarch
->call_dummy_address
== 0)
3072 internal_error (__FILE__
, __LINE__
,
3073 "gdbarch: gdbarch_call_dummy_address invalid");
3074 if (gdbarch_debug
>= 2)
3075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3076 return gdbarch
->call_dummy_address ();
3080 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3081 gdbarch_call_dummy_address_ftype call_dummy_address
)
3083 gdbarch
->call_dummy_address
= call_dummy_address
;
3087 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3089 if (gdbarch
->call_dummy_start_offset
== -1)
3090 internal_error (__FILE__
, __LINE__
,
3091 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3092 if (gdbarch_debug
>= 2)
3093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3094 return gdbarch
->call_dummy_start_offset
;
3098 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3099 CORE_ADDR call_dummy_start_offset
)
3101 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3105 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3107 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3108 internal_error (__FILE__
, __LINE__
,
3109 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3110 if (gdbarch_debug
>= 2)
3111 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3112 return gdbarch
->call_dummy_breakpoint_offset
;
3116 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3117 CORE_ADDR call_dummy_breakpoint_offset
)
3119 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3123 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3125 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3126 internal_error (__FILE__
, __LINE__
,
3127 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3128 if (gdbarch_debug
>= 2)
3129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3130 return gdbarch
->call_dummy_breakpoint_offset_p
;
3134 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3135 int call_dummy_breakpoint_offset_p
)
3137 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3141 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3143 if (gdbarch
->call_dummy_length
== -1)
3144 internal_error (__FILE__
, __LINE__
,
3145 "gdbarch: gdbarch_call_dummy_length invalid");
3146 if (gdbarch_debug
>= 2)
3147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3148 return gdbarch
->call_dummy_length
;
3152 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3153 int call_dummy_length
)
3155 gdbarch
->call_dummy_length
= call_dummy_length
;
3159 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3161 if (gdbarch
->pc_in_call_dummy
== 0)
3162 internal_error (__FILE__
, __LINE__
,
3163 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3164 if (gdbarch_debug
>= 2)
3165 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3166 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3170 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3171 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3173 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3177 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3179 if (gdbarch
->call_dummy_p
== -1)
3180 internal_error (__FILE__
, __LINE__
,
3181 "gdbarch: gdbarch_call_dummy_p invalid");
3182 if (gdbarch_debug
>= 2)
3183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3184 return gdbarch
->call_dummy_p
;
3188 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3191 gdbarch
->call_dummy_p
= call_dummy_p
;
3195 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3197 /* Skip verify of call_dummy_words, invalid_p == 0 */
3198 if (gdbarch_debug
>= 2)
3199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3200 return gdbarch
->call_dummy_words
;
3204 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3205 LONGEST
* call_dummy_words
)
3207 gdbarch
->call_dummy_words
= call_dummy_words
;
3211 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3213 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3214 if (gdbarch_debug
>= 2)
3215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3216 return gdbarch
->sizeof_call_dummy_words
;
3220 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3221 int sizeof_call_dummy_words
)
3223 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3227 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3229 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3230 internal_error (__FILE__
, __LINE__
,
3231 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3232 if (gdbarch_debug
>= 2)
3233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3234 return gdbarch
->call_dummy_stack_adjust_p
;
3238 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3239 int call_dummy_stack_adjust_p
)
3241 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3245 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3247 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3248 internal_error (__FILE__
, __LINE__
,
3249 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3250 if (gdbarch_debug
>= 2)
3251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3252 return gdbarch
->call_dummy_stack_adjust
;
3256 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3257 int call_dummy_stack_adjust
)
3259 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3263 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
)
3265 if (gdbarch
->fix_call_dummy
== 0)
3266 internal_error (__FILE__
, __LINE__
,
3267 "gdbarch: gdbarch_fix_call_dummy invalid");
3268 if (gdbarch_debug
>= 2)
3269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3270 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3274 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3275 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3277 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3281 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3283 if (gdbarch
->init_frame_pc_first
== 0)
3284 internal_error (__FILE__
, __LINE__
,
3285 "gdbarch: gdbarch_init_frame_pc_first invalid");
3286 if (gdbarch_debug
>= 2)
3287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3288 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3292 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3293 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3295 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3299 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3301 if (gdbarch
->init_frame_pc
== 0)
3302 internal_error (__FILE__
, __LINE__
,
3303 "gdbarch: gdbarch_init_frame_pc invalid");
3304 if (gdbarch_debug
>= 2)
3305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3306 gdbarch
->init_frame_pc (fromleaf
, prev
);
3310 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3311 gdbarch_init_frame_pc_ftype init_frame_pc
)
3313 gdbarch
->init_frame_pc
= init_frame_pc
;
3317 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3319 if (gdbarch_debug
>= 2)
3320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3321 return gdbarch
->believe_pcc_promotion
;
3325 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3326 int believe_pcc_promotion
)
3328 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3332 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3334 if (gdbarch_debug
>= 2)
3335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3336 return gdbarch
->believe_pcc_promotion_type
;
3340 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3341 int believe_pcc_promotion_type
)
3343 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3347 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3349 if (gdbarch
->coerce_float_to_double
== 0)
3350 internal_error (__FILE__
, __LINE__
,
3351 "gdbarch: gdbarch_coerce_float_to_double invalid");
3352 if (gdbarch_debug
>= 2)
3353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3354 return gdbarch
->coerce_float_to_double (formal
, actual
);
3358 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3359 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3361 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3365 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
)
3367 if (gdbarch
->get_saved_register
== 0)
3368 internal_error (__FILE__
, __LINE__
,
3369 "gdbarch: gdbarch_get_saved_register invalid");
3370 if (gdbarch_debug
>= 2)
3371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3372 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3376 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3377 gdbarch_get_saved_register_ftype get_saved_register
)
3379 gdbarch
->get_saved_register
= get_saved_register
;
3383 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3385 if (gdbarch
->register_convertible
== 0)
3386 internal_error (__FILE__
, __LINE__
,
3387 "gdbarch: gdbarch_register_convertible invalid");
3388 if (gdbarch_debug
>= 2)
3389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3390 return gdbarch
->register_convertible (nr
);
3394 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3395 gdbarch_register_convertible_ftype register_convertible
)
3397 gdbarch
->register_convertible
= register_convertible
;
3401 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3403 if (gdbarch
->register_convert_to_virtual
== 0)
3404 internal_error (__FILE__
, __LINE__
,
3405 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3406 if (gdbarch_debug
>= 2)
3407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3408 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3412 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3413 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3415 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3419 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3421 if (gdbarch
->register_convert_to_raw
== 0)
3422 internal_error (__FILE__
, __LINE__
,
3423 "gdbarch: gdbarch_register_convert_to_raw invalid");
3424 if (gdbarch_debug
>= 2)
3425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3426 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3430 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3431 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3433 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3437 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3439 if (gdbarch
->fetch_pseudo_register
== 0)
3440 internal_error (__FILE__
, __LINE__
,
3441 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3442 if (gdbarch_debug
>= 2)
3443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3444 gdbarch
->fetch_pseudo_register (regnum
);
3448 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3449 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3451 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3455 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3457 if (gdbarch
->store_pseudo_register
== 0)
3458 internal_error (__FILE__
, __LINE__
,
3459 "gdbarch: gdbarch_store_pseudo_register invalid");
3460 if (gdbarch_debug
>= 2)
3461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3462 gdbarch
->store_pseudo_register (regnum
);
3466 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3467 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3469 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3473 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3475 if (gdbarch
->pointer_to_address
== 0)
3476 internal_error (__FILE__
, __LINE__
,
3477 "gdbarch: gdbarch_pointer_to_address invalid");
3478 if (gdbarch_debug
>= 2)
3479 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3480 return gdbarch
->pointer_to_address (type
, buf
);
3484 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3485 gdbarch_pointer_to_address_ftype pointer_to_address
)
3487 gdbarch
->pointer_to_address
= pointer_to_address
;
3491 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3493 if (gdbarch
->address_to_pointer
== 0)
3494 internal_error (__FILE__
, __LINE__
,
3495 "gdbarch: gdbarch_address_to_pointer invalid");
3496 if (gdbarch_debug
>= 2)
3497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3498 gdbarch
->address_to_pointer (type
, buf
, addr
);
3502 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3503 gdbarch_address_to_pointer_ftype address_to_pointer
)
3505 gdbarch
->address_to_pointer
= address_to_pointer
;
3509 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3511 if (gdbarch
->return_value_on_stack
== 0)
3512 internal_error (__FILE__
, __LINE__
,
3513 "gdbarch: gdbarch_return_value_on_stack invalid");
3514 if (gdbarch_debug
>= 2)
3515 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3516 return gdbarch
->return_value_on_stack (type
);
3520 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3521 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3523 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3527 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3529 if (gdbarch
->extract_return_value
== 0)
3530 internal_error (__FILE__
, __LINE__
,
3531 "gdbarch: gdbarch_extract_return_value invalid");
3532 if (gdbarch_debug
>= 2)
3533 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3534 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3538 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3539 gdbarch_extract_return_value_ftype extract_return_value
)
3541 gdbarch
->extract_return_value
= extract_return_value
;
3545 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3547 if (gdbarch
->push_arguments
== 0)
3548 internal_error (__FILE__
, __LINE__
,
3549 "gdbarch: gdbarch_push_arguments invalid");
3550 if (gdbarch_debug
>= 2)
3551 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3552 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3556 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3557 gdbarch_push_arguments_ftype push_arguments
)
3559 gdbarch
->push_arguments
= push_arguments
;
3563 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3565 if (gdbarch
->push_dummy_frame
== 0)
3566 internal_error (__FILE__
, __LINE__
,
3567 "gdbarch: gdbarch_push_dummy_frame invalid");
3568 if (gdbarch_debug
>= 2)
3569 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3570 gdbarch
->push_dummy_frame ();
3574 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3575 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3577 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3581 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3583 if (gdbarch
->push_return_address
== 0)
3584 internal_error (__FILE__
, __LINE__
,
3585 "gdbarch: gdbarch_push_return_address invalid");
3586 if (gdbarch_debug
>= 2)
3587 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3588 return gdbarch
->push_return_address (pc
, sp
);
3592 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3593 gdbarch_push_return_address_ftype push_return_address
)
3595 gdbarch
->push_return_address
= push_return_address
;
3599 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3601 if (gdbarch
->pop_frame
== 0)
3602 internal_error (__FILE__
, __LINE__
,
3603 "gdbarch: gdbarch_pop_frame invalid");
3604 if (gdbarch_debug
>= 2)
3605 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3606 gdbarch
->pop_frame ();
3610 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3611 gdbarch_pop_frame_ftype pop_frame
)
3613 gdbarch
->pop_frame
= pop_frame
;
3617 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3619 if (gdbarch
->store_struct_return
== 0)
3620 internal_error (__FILE__
, __LINE__
,
3621 "gdbarch: gdbarch_store_struct_return invalid");
3622 if (gdbarch_debug
>= 2)
3623 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3624 gdbarch
->store_struct_return (addr
, sp
);
3628 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3629 gdbarch_store_struct_return_ftype store_struct_return
)
3631 gdbarch
->store_struct_return
= store_struct_return
;
3635 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3637 if (gdbarch
->store_return_value
== 0)
3638 internal_error (__FILE__
, __LINE__
,
3639 "gdbarch: gdbarch_store_return_value invalid");
3640 if (gdbarch_debug
>= 2)
3641 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3642 gdbarch
->store_return_value (type
, valbuf
);
3646 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3647 gdbarch_store_return_value_ftype store_return_value
)
3649 gdbarch
->store_return_value
= store_return_value
;
3653 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3655 return gdbarch
->extract_struct_value_address
!= 0;
3659 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3661 if (gdbarch
->extract_struct_value_address
== 0)
3662 internal_error (__FILE__
, __LINE__
,
3663 "gdbarch: gdbarch_extract_struct_value_address invalid");
3664 if (gdbarch_debug
>= 2)
3665 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3666 return gdbarch
->extract_struct_value_address (regbuf
);
3670 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3671 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3673 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3677 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3679 if (gdbarch
->use_struct_convention
== 0)
3680 internal_error (__FILE__
, __LINE__
,
3681 "gdbarch: gdbarch_use_struct_convention invalid");
3682 if (gdbarch_debug
>= 2)
3683 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3684 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3688 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3689 gdbarch_use_struct_convention_ftype use_struct_convention
)
3691 gdbarch
->use_struct_convention
= use_struct_convention
;
3695 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3697 if (gdbarch
->frame_init_saved_regs
== 0)
3698 internal_error (__FILE__
, __LINE__
,
3699 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3700 if (gdbarch_debug
>= 2)
3701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3702 gdbarch
->frame_init_saved_regs (frame
);
3706 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3707 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3709 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3713 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3715 if (gdbarch
->init_extra_frame_info
== 0)
3716 internal_error (__FILE__
, __LINE__
,
3717 "gdbarch: gdbarch_init_extra_frame_info invalid");
3718 if (gdbarch_debug
>= 2)
3719 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3720 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3724 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3725 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3727 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3731 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3733 if (gdbarch
->skip_prologue
== 0)
3734 internal_error (__FILE__
, __LINE__
,
3735 "gdbarch: gdbarch_skip_prologue invalid");
3736 if (gdbarch_debug
>= 2)
3737 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3738 return gdbarch
->skip_prologue (ip
);
3742 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3743 gdbarch_skip_prologue_ftype skip_prologue
)
3745 gdbarch
->skip_prologue
= skip_prologue
;
3749 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3751 if (gdbarch
->prologue_frameless_p
== 0)
3752 internal_error (__FILE__
, __LINE__
,
3753 "gdbarch: gdbarch_prologue_frameless_p invalid");
3754 if (gdbarch_debug
>= 2)
3755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3756 return gdbarch
->prologue_frameless_p (ip
);
3760 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3761 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3763 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3767 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3769 if (gdbarch
->inner_than
== 0)
3770 internal_error (__FILE__
, __LINE__
,
3771 "gdbarch: gdbarch_inner_than invalid");
3772 if (gdbarch_debug
>= 2)
3773 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3774 return gdbarch
->inner_than (lhs
, rhs
);
3778 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3779 gdbarch_inner_than_ftype inner_than
)
3781 gdbarch
->inner_than
= inner_than
;
3785 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3787 if (gdbarch
->breakpoint_from_pc
== 0)
3788 internal_error (__FILE__
, __LINE__
,
3789 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3790 if (gdbarch_debug
>= 2)
3791 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3792 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3796 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3797 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3799 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3803 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3805 if (gdbarch
->memory_insert_breakpoint
== 0)
3806 internal_error (__FILE__
, __LINE__
,
3807 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3808 if (gdbarch_debug
>= 2)
3809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3810 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3814 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3815 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3817 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3821 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3823 if (gdbarch
->memory_remove_breakpoint
== 0)
3824 internal_error (__FILE__
, __LINE__
,
3825 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3826 if (gdbarch_debug
>= 2)
3827 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3828 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3832 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3833 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3835 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3839 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3841 if (gdbarch
->decr_pc_after_break
== -1)
3842 internal_error (__FILE__
, __LINE__
,
3843 "gdbarch: gdbarch_decr_pc_after_break invalid");
3844 if (gdbarch_debug
>= 2)
3845 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3846 return gdbarch
->decr_pc_after_break
;
3850 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3851 CORE_ADDR decr_pc_after_break
)
3853 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3857 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3859 if (gdbarch
->prepare_to_proceed
== 0)
3860 internal_error (__FILE__
, __LINE__
,
3861 "gdbarch: gdbarch_prepare_to_proceed invalid");
3862 if (gdbarch_debug
>= 2)
3863 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3864 return gdbarch
->prepare_to_proceed (select_it
);
3868 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3869 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3871 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3875 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3877 if (gdbarch
->function_start_offset
== -1)
3878 internal_error (__FILE__
, __LINE__
,
3879 "gdbarch: gdbarch_function_start_offset invalid");
3880 if (gdbarch_debug
>= 2)
3881 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3882 return gdbarch
->function_start_offset
;
3886 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3887 CORE_ADDR function_start_offset
)
3889 gdbarch
->function_start_offset
= function_start_offset
;
3893 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3895 if (gdbarch
->remote_translate_xfer_address
== 0)
3896 internal_error (__FILE__
, __LINE__
,
3897 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3898 if (gdbarch_debug
>= 2)
3899 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3900 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3904 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3905 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3907 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3911 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3913 if (gdbarch
->frame_args_skip
== -1)
3914 internal_error (__FILE__
, __LINE__
,
3915 "gdbarch: gdbarch_frame_args_skip invalid");
3916 if (gdbarch_debug
>= 2)
3917 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3918 return gdbarch
->frame_args_skip
;
3922 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3923 CORE_ADDR frame_args_skip
)
3925 gdbarch
->frame_args_skip
= frame_args_skip
;
3929 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3931 if (gdbarch
->frameless_function_invocation
== 0)
3932 internal_error (__FILE__
, __LINE__
,
3933 "gdbarch: gdbarch_frameless_function_invocation invalid");
3934 if (gdbarch_debug
>= 2)
3935 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3936 return gdbarch
->frameless_function_invocation (fi
);
3940 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3941 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3943 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3947 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3949 if (gdbarch
->frame_chain
== 0)
3950 internal_error (__FILE__
, __LINE__
,
3951 "gdbarch: gdbarch_frame_chain invalid");
3952 if (gdbarch_debug
>= 2)
3953 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3954 return gdbarch
->frame_chain (frame
);
3958 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3959 gdbarch_frame_chain_ftype frame_chain
)
3961 gdbarch
->frame_chain
= frame_chain
;
3965 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3967 if (gdbarch
->frame_chain_valid
== 0)
3968 internal_error (__FILE__
, __LINE__
,
3969 "gdbarch: gdbarch_frame_chain_valid invalid");
3970 if (gdbarch_debug
>= 2)
3971 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3972 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3976 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3977 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3979 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3983 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3985 if (gdbarch
->frame_saved_pc
== 0)
3986 internal_error (__FILE__
, __LINE__
,
3987 "gdbarch: gdbarch_frame_saved_pc invalid");
3988 if (gdbarch_debug
>= 2)
3989 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3990 return gdbarch
->frame_saved_pc (fi
);
3994 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3995 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3997 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4001 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4003 if (gdbarch
->frame_args_address
== 0)
4004 internal_error (__FILE__
, __LINE__
,
4005 "gdbarch: gdbarch_frame_args_address invalid");
4006 if (gdbarch_debug
>= 2)
4007 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4008 return gdbarch
->frame_args_address (fi
);
4012 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4013 gdbarch_frame_args_address_ftype frame_args_address
)
4015 gdbarch
->frame_args_address
= frame_args_address
;
4019 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4021 if (gdbarch
->frame_locals_address
== 0)
4022 internal_error (__FILE__
, __LINE__
,
4023 "gdbarch: gdbarch_frame_locals_address invalid");
4024 if (gdbarch_debug
>= 2)
4025 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4026 return gdbarch
->frame_locals_address (fi
);
4030 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4031 gdbarch_frame_locals_address_ftype frame_locals_address
)
4033 gdbarch
->frame_locals_address
= frame_locals_address
;
4037 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4039 if (gdbarch
->saved_pc_after_call
== 0)
4040 internal_error (__FILE__
, __LINE__
,
4041 "gdbarch: gdbarch_saved_pc_after_call invalid");
4042 if (gdbarch_debug
>= 2)
4043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4044 return gdbarch
->saved_pc_after_call (frame
);
4048 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4049 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4051 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4055 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4057 if (gdbarch
->frame_num_args
== 0)
4058 internal_error (__FILE__
, __LINE__
,
4059 "gdbarch: gdbarch_frame_num_args invalid");
4060 if (gdbarch_debug
>= 2)
4061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4062 return gdbarch
->frame_num_args (frame
);
4066 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4067 gdbarch_frame_num_args_ftype frame_num_args
)
4069 gdbarch
->frame_num_args
= frame_num_args
;
4073 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4075 return gdbarch
->stack_align
!= 0;
4079 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4081 if (gdbarch
->stack_align
== 0)
4082 internal_error (__FILE__
, __LINE__
,
4083 "gdbarch: gdbarch_stack_align invalid");
4084 if (gdbarch_debug
>= 2)
4085 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4086 return gdbarch
->stack_align (sp
);
4090 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4091 gdbarch_stack_align_ftype stack_align
)
4093 gdbarch
->stack_align
= stack_align
;
4097 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4099 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4100 if (gdbarch_debug
>= 2)
4101 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4102 return gdbarch
->extra_stack_alignment_needed
;
4106 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4107 int extra_stack_alignment_needed
)
4109 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4113 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4115 return gdbarch
->reg_struct_has_addr
!= 0;
4119 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4121 if (gdbarch
->reg_struct_has_addr
== 0)
4122 internal_error (__FILE__
, __LINE__
,
4123 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4124 if (gdbarch_debug
>= 2)
4125 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4126 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4130 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4131 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4133 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4137 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4139 return gdbarch
->save_dummy_frame_tos
!= 0;
4143 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4145 if (gdbarch
->save_dummy_frame_tos
== 0)
4146 internal_error (__FILE__
, __LINE__
,
4147 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4148 if (gdbarch_debug
>= 2)
4149 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4150 gdbarch
->save_dummy_frame_tos (sp
);
4154 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4155 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4157 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4161 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4163 if (gdbarch_debug
>= 2)
4164 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4165 return gdbarch
->parm_boundary
;
4169 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4172 gdbarch
->parm_boundary
= parm_boundary
;
4175 const struct floatformat
*
4176 gdbarch_float_format (struct gdbarch
*gdbarch
)
4178 if (gdbarch_debug
>= 2)
4179 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4180 return gdbarch
->float_format
;
4184 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4185 const struct floatformat
* float_format
)
4187 gdbarch
->float_format
= float_format
;
4190 const struct floatformat
*
4191 gdbarch_double_format (struct gdbarch
*gdbarch
)
4193 if (gdbarch_debug
>= 2)
4194 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4195 return gdbarch
->double_format
;
4199 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4200 const struct floatformat
* double_format
)
4202 gdbarch
->double_format
= double_format
;
4205 const struct floatformat
*
4206 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4208 if (gdbarch_debug
>= 2)
4209 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4210 return gdbarch
->long_double_format
;
4214 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4215 const struct floatformat
* long_double_format
)
4217 gdbarch
->long_double_format
= long_double_format
;
4221 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4223 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4224 internal_error (__FILE__
, __LINE__
,
4225 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4226 if (gdbarch_debug
>= 2)
4227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4228 return gdbarch
->convert_from_func_ptr_addr (addr
);
4232 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4233 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4235 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4239 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4241 if (gdbarch
->addr_bits_remove
== 0)
4242 internal_error (__FILE__
, __LINE__
,
4243 "gdbarch: gdbarch_addr_bits_remove invalid");
4244 if (gdbarch_debug
>= 2)
4245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4246 return gdbarch
->addr_bits_remove (addr
);
4250 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4251 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4253 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4257 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4259 return gdbarch
->software_single_step
!= 0;
4263 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4265 if (gdbarch
->software_single_step
== 0)
4266 internal_error (__FILE__
, __LINE__
,
4267 "gdbarch: gdbarch_software_single_step invalid");
4268 if (gdbarch_debug
>= 2)
4269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4270 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4274 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4275 gdbarch_software_single_step_ftype software_single_step
)
4277 gdbarch
->software_single_step
= software_single_step
;
4281 /* Keep a registry of per-architecture data-pointers required by GDB
4287 gdbarch_data_init_ftype
*init
;
4288 gdbarch_data_free_ftype
*free
;
4291 struct gdbarch_data_registration
4293 struct gdbarch_data
*data
;
4294 struct gdbarch_data_registration
*next
;
4297 struct gdbarch_data_registry
4300 struct gdbarch_data_registration
*registrations
;
4303 struct gdbarch_data_registry gdbarch_data_registry
=
4308 struct gdbarch_data
*
4309 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4310 gdbarch_data_free_ftype
*free
)
4312 struct gdbarch_data_registration
**curr
;
4313 for (curr
= &gdbarch_data_registry
.registrations
;
4315 curr
= &(*curr
)->next
);
4316 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4317 (*curr
)->next
= NULL
;
4318 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4319 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4320 (*curr
)->data
->init
= init
;
4321 (*curr
)->data
->free
= free
;
4322 return (*curr
)->data
;
4326 /* Walk through all the registered users initializing each in turn. */
4329 init_gdbarch_data (struct gdbarch
*gdbarch
)
4331 struct gdbarch_data_registration
*rego
;
4332 for (rego
= gdbarch_data_registry
.registrations
;
4336 struct gdbarch_data
*data
= rego
->data
;
4337 gdb_assert (data
->index
< gdbarch
->nr_data
);
4338 if (data
->init
!= NULL
)
4340 void *pointer
= data
->init (gdbarch
);
4341 set_gdbarch_data (gdbarch
, data
, pointer
);
4346 /* Create/delete the gdbarch data vector. */
4349 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4351 gdb_assert (gdbarch
->data
== NULL
);
4352 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4353 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4357 free_gdbarch_data (struct gdbarch
*gdbarch
)
4359 struct gdbarch_data_registration
*rego
;
4360 gdb_assert (gdbarch
->data
!= NULL
);
4361 for (rego
= gdbarch_data_registry
.registrations
;
4365 struct gdbarch_data
*data
= rego
->data
;
4366 gdb_assert (data
->index
< gdbarch
->nr_data
);
4367 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4369 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4370 gdbarch
->data
[data
->index
] = NULL
;
4373 xfree (gdbarch
->data
);
4374 gdbarch
->data
= NULL
;
4378 /* Initialize the current value of thee specified per-architecture
4382 set_gdbarch_data (struct gdbarch
*gdbarch
,
4383 struct gdbarch_data
*data
,
4386 gdb_assert (data
->index
< gdbarch
->nr_data
);
4387 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4388 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4389 gdbarch
->data
[data
->index
] = pointer
;
4392 /* Return the current value of the specified per-architecture
4396 gdbarch_data (struct gdbarch_data
*data
)
4398 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4399 return current_gdbarch
->data
[data
->index
];
4404 /* Keep a registry of swapped data required by GDB modules. */
4409 struct gdbarch_swap_registration
*source
;
4410 struct gdbarch_swap
*next
;
4413 struct gdbarch_swap_registration
4416 unsigned long sizeof_data
;
4417 gdbarch_swap_ftype
*init
;
4418 struct gdbarch_swap_registration
*next
;
4421 struct gdbarch_swap_registry
4424 struct gdbarch_swap_registration
*registrations
;
4427 struct gdbarch_swap_registry gdbarch_swap_registry
=
4433 register_gdbarch_swap (void *data
,
4434 unsigned long sizeof_data
,
4435 gdbarch_swap_ftype
*init
)
4437 struct gdbarch_swap_registration
**rego
;
4438 for (rego
= &gdbarch_swap_registry
.registrations
;
4440 rego
= &(*rego
)->next
);
4441 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4442 (*rego
)->next
= NULL
;
4443 (*rego
)->init
= init
;
4444 (*rego
)->data
= data
;
4445 (*rego
)->sizeof_data
= sizeof_data
;
4450 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4452 struct gdbarch_swap_registration
*rego
;
4453 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4454 for (rego
= gdbarch_swap_registry
.registrations
;
4458 if (rego
->data
!= NULL
)
4460 (*curr
) = XMALLOC (struct gdbarch_swap
);
4461 (*curr
)->source
= rego
;
4462 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4463 (*curr
)->next
= NULL
;
4464 memset (rego
->data
, 0, rego
->sizeof_data
);
4465 curr
= &(*curr
)->next
;
4467 if (rego
->init
!= NULL
)
4473 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4475 struct gdbarch_swap
*curr
;
4476 for (curr
= gdbarch
->swap
;
4479 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4483 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4485 struct gdbarch_swap
*curr
;
4486 for (curr
= gdbarch
->swap
;
4489 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4493 /* Keep a registry of the architectures known by GDB. */
4495 struct gdbarch_registration
4497 enum bfd_architecture bfd_architecture
;
4498 gdbarch_init_ftype
*init
;
4499 gdbarch_dump_tdep_ftype
*dump_tdep
;
4500 struct gdbarch_list
*arches
;
4501 struct gdbarch_registration
*next
;
4504 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4507 append_name (const char ***buf
, int *nr
, const char *name
)
4509 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4515 gdbarch_printable_names (void)
4519 /* Accumulate a list of names based on the registed list of
4521 enum bfd_architecture a
;
4523 const char **arches
= NULL
;
4524 struct gdbarch_registration
*rego
;
4525 for (rego
= gdbarch_registry
;
4529 const struct bfd_arch_info
*ap
;
4530 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4532 internal_error (__FILE__
, __LINE__
,
4533 "gdbarch_architecture_names: multi-arch unknown");
4536 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4541 append_name (&arches
, &nr_arches
, NULL
);
4545 /* Just return all the architectures that BFD knows. Assume that
4546 the legacy architecture framework supports them. */
4547 return bfd_arch_list ();
4552 gdbarch_register (enum bfd_architecture bfd_architecture
,
4553 gdbarch_init_ftype
*init
,
4554 gdbarch_dump_tdep_ftype
*dump_tdep
)
4556 struct gdbarch_registration
**curr
;
4557 const struct bfd_arch_info
*bfd_arch_info
;
4558 /* Check that BFD recognizes this architecture */
4559 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4560 if (bfd_arch_info
== NULL
)
4562 internal_error (__FILE__
, __LINE__
,
4563 "gdbarch: Attempt to register unknown architecture (%d)",
4566 /* Check that we haven't seen this architecture before */
4567 for (curr
= &gdbarch_registry
;
4569 curr
= &(*curr
)->next
)
4571 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4572 internal_error (__FILE__
, __LINE__
,
4573 "gdbarch: Duplicate registraration of architecture (%s)",
4574 bfd_arch_info
->printable_name
);
4578 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4579 bfd_arch_info
->printable_name
,
4582 (*curr
) = XMALLOC (struct gdbarch_registration
);
4583 (*curr
)->bfd_architecture
= bfd_architecture
;
4584 (*curr
)->init
= init
;
4585 (*curr
)->dump_tdep
= dump_tdep
;
4586 (*curr
)->arches
= NULL
;
4587 (*curr
)->next
= NULL
;
4588 /* When non- multi-arch, install whatever target dump routine we've
4589 been provided - hopefully that routine has been written correctly
4590 and works regardless of multi-arch. */
4591 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4592 && startup_gdbarch
.dump_tdep
== NULL
)
4593 startup_gdbarch
.dump_tdep
= dump_tdep
;
4597 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4598 gdbarch_init_ftype
*init
)
4600 gdbarch_register (bfd_architecture
, init
, NULL
);
4604 /* Look for an architecture using gdbarch_info. Base search on only
4605 BFD_ARCH_INFO and BYTE_ORDER. */
4607 struct gdbarch_list
*
4608 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4609 const struct gdbarch_info
*info
)
4611 for (; arches
!= NULL
; arches
= arches
->next
)
4613 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4615 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4623 /* Update the current architecture. Return ZERO if the update request
4627 gdbarch_update_p (struct gdbarch_info info
)
4629 struct gdbarch
*new_gdbarch
;
4630 struct gdbarch_list
**list
;
4631 struct gdbarch_registration
*rego
;
4633 /* Fill in missing parts of the INFO struct using a number of
4634 sources: ``set ...''; INFOabfd supplied; existing target. */
4636 /* ``(gdb) set architecture ...'' */
4637 if (info
.bfd_arch_info
== NULL
4638 && !TARGET_ARCHITECTURE_AUTO
)
4639 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4640 if (info
.bfd_arch_info
== NULL
4641 && info
.abfd
!= NULL
4642 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4643 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4644 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4645 if (info
.bfd_arch_info
== NULL
)
4646 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4648 /* ``(gdb) set byte-order ...'' */
4649 if (info
.byte_order
== 0
4650 && !TARGET_BYTE_ORDER_AUTO
)
4651 info
.byte_order
= TARGET_BYTE_ORDER
;
4652 /* From the INFO struct. */
4653 if (info
.byte_order
== 0
4654 && info
.abfd
!= NULL
)
4655 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4656 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4658 /* From the current target. */
4659 if (info
.byte_order
== 0)
4660 info
.byte_order
= TARGET_BYTE_ORDER
;
4662 /* Must have found some sort of architecture. */
4663 gdb_assert (info
.bfd_arch_info
!= NULL
);
4667 fprintf_unfiltered (gdb_stdlog
,
4668 "gdbarch_update: info.bfd_arch_info %s\n",
4669 (info
.bfd_arch_info
!= NULL
4670 ? info
.bfd_arch_info
->printable_name
4672 fprintf_unfiltered (gdb_stdlog
,
4673 "gdbarch_update: info.byte_order %d (%s)\n",
4675 (info
.byte_order
== BIG_ENDIAN
? "big"
4676 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4678 fprintf_unfiltered (gdb_stdlog
,
4679 "gdbarch_update: info.abfd 0x%lx\n",
4681 fprintf_unfiltered (gdb_stdlog
,
4682 "gdbarch_update: info.tdep_info 0x%lx\n",
4683 (long) info
.tdep_info
);
4686 /* Find the target that knows about this architecture. */
4687 for (rego
= gdbarch_registry
;
4690 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4695 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4699 /* Ask the target for a replacement architecture. */
4700 new_gdbarch
= rego
->init (info
, rego
->arches
);
4702 /* Did the target like it? No. Reject the change. */
4703 if (new_gdbarch
== NULL
)
4706 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4710 /* Did the architecture change? No. Do nothing. */
4711 if (current_gdbarch
== new_gdbarch
)
4714 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4716 new_gdbarch
->bfd_arch_info
->printable_name
);
4720 /* Swap all data belonging to the old target out */
4721 swapout_gdbarch_swap (current_gdbarch
);
4723 /* Is this a pre-existing architecture? Yes. Swap it in. */
4724 for (list
= ®o
->arches
;
4726 list
= &(*list
)->next
)
4728 if ((*list
)->gdbarch
== new_gdbarch
)
4731 fprintf_unfiltered (gdb_stdlog
,
4732 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4734 new_gdbarch
->bfd_arch_info
->printable_name
);
4735 current_gdbarch
= new_gdbarch
;
4736 swapin_gdbarch_swap (new_gdbarch
);
4737 architecture_changed_event ();
4742 /* Append this new architecture to this targets list. */
4743 (*list
) = XMALLOC (struct gdbarch_list
);
4744 (*list
)->next
= NULL
;
4745 (*list
)->gdbarch
= new_gdbarch
;
4747 /* Switch to this new architecture. Dump it out. */
4748 current_gdbarch
= new_gdbarch
;
4751 fprintf_unfiltered (gdb_stdlog
,
4752 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4754 new_gdbarch
->bfd_arch_info
->printable_name
);
4757 /* Check that the newly installed architecture is valid. Plug in
4758 any post init values. */
4759 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4760 verify_gdbarch (new_gdbarch
);
4762 /* Initialize the per-architecture memory (swap) areas.
4763 CURRENT_GDBARCH must be update before these modules are
4765 init_gdbarch_swap (new_gdbarch
);
4767 /* Initialize the per-architecture data-pointer of all parties that
4768 registered an interest in this architecture. CURRENT_GDBARCH
4769 must be updated before these modules are called. */
4770 init_gdbarch_data (new_gdbarch
);
4771 architecture_changed_event ();
4774 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4782 /* Pointer to the target-dependent disassembly function. */
4783 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4784 disassemble_info tm_print_insn_info
;
4787 extern void _initialize_gdbarch (void);
4790 _initialize_gdbarch (void)
4792 struct cmd_list_element
*c
;
4794 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4795 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4796 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4797 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4798 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4800 add_show_from_set (add_set_cmd ("arch",
4803 (char *)&gdbarch_debug
,
4804 "Set architecture debugging.\n\
4805 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4807 c
= add_set_cmd ("archdebug",
4810 (char *)&gdbarch_debug
,
4811 "Set architecture debugging.\n\
4812 When non-zero, architecture debugging is enabled.", &setlist
);
4814 deprecate_cmd (c
, "set debug arch");
4815 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");