1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
61 #include "floatformat.h"
63 #include "gdb_assert.h"
64 #include "gdb-events.h"
66 /* Static function declarations */
68 static void verify_gdbarch (struct gdbarch
*gdbarch
);
69 static void alloc_gdbarch_data (struct gdbarch
*);
70 static void init_gdbarch_data (struct gdbarch
*);
71 static void free_gdbarch_data (struct gdbarch
*);
72 static void init_gdbarch_swap (struct gdbarch
*);
73 static void swapout_gdbarch_swap (struct gdbarch
*);
74 static void swapin_gdbarch_swap (struct gdbarch
*);
76 /* Convenience macro for allocting typesafe memory. */
79 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
83 /* Non-zero if we want to trace architecture code. */
86 #define GDBARCH_DEBUG 0
88 int gdbarch_debug
= GDBARCH_DEBUG
;
91 /* Maintain the struct gdbarch object */
95 /* basic architectural information */
96 const struct bfd_arch_info
* bfd_arch_info
;
99 /* target specific vector. */
100 struct gdbarch_tdep
*tdep
;
101 gdbarch_dump_tdep_ftype
*dump_tdep
;
103 /* per-architecture data-pointers */
107 /* per-architecture swap-regions */
108 struct gdbarch_swap
*swap
;
110 /* Multi-arch values.
112 When extending this structure you must:
116 Declare set/get functions and define the corresponding
119 gdbarch_alloc(): If zero/NULL is not a suitable default,
120 initialize the new field.
122 verify_gdbarch(): Confirm that the target updated the field
125 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
128 ``startup_gdbarch()'': Append an initial value to the static
129 variable (base values on the host's c-type system).
131 get_gdbarch(): Implement the set/get functions (probably using
132 the macro's as shortcuts).
147 gdbarch_read_pc_ftype
*read_pc
;
148 gdbarch_write_pc_ftype
*write_pc
;
149 gdbarch_read_fp_ftype
*read_fp
;
150 gdbarch_write_fp_ftype
*write_fp
;
151 gdbarch_read_sp_ftype
*read_sp
;
152 gdbarch_write_sp_ftype
*write_sp
;
153 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
154 gdbarch_register_read_ftype
*register_read
;
155 gdbarch_register_write_ftype
*register_write
;
164 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
165 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
166 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
167 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
168 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
169 gdbarch_register_name_ftype
*register_name
;
172 gdbarch_register_byte_ftype
*register_byte
;
173 gdbarch_register_raw_size_ftype
*register_raw_size
;
174 int max_register_raw_size
;
175 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
176 int max_register_virtual_size
;
177 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
178 gdbarch_do_registers_info_ftype
*do_registers_info
;
179 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
180 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
181 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
182 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
183 int use_generic_dummy_frames
;
184 int call_dummy_location
;
185 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
186 CORE_ADDR call_dummy_start_offset
;
187 CORE_ADDR call_dummy_breakpoint_offset
;
188 int call_dummy_breakpoint_offset_p
;
189 int call_dummy_length
;
190 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
192 LONGEST
* call_dummy_words
;
193 int sizeof_call_dummy_words
;
194 int call_dummy_stack_adjust_p
;
195 int call_dummy_stack_adjust
;
196 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
197 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
198 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
199 int believe_pcc_promotion
;
200 int believe_pcc_promotion_type
;
201 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
202 gdbarch_get_saved_register_ftype
*get_saved_register
;
203 gdbarch_register_convertible_ftype
*register_convertible
;
204 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
205 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
206 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
207 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
208 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
209 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
210 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
211 gdbarch_extract_return_value_ftype
*extract_return_value
;
212 gdbarch_push_arguments_ftype
*push_arguments
;
213 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
214 gdbarch_push_return_address_ftype
*push_return_address
;
215 gdbarch_pop_frame_ftype
*pop_frame
;
216 gdbarch_store_struct_return_ftype
*store_struct_return
;
217 gdbarch_store_return_value_ftype
*store_return_value
;
218 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
219 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
220 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
221 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
222 gdbarch_skip_prologue_ftype
*skip_prologue
;
223 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
224 gdbarch_inner_than_ftype
*inner_than
;
225 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
226 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
227 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
228 CORE_ADDR decr_pc_after_break
;
229 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
230 CORE_ADDR function_start_offset
;
231 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
232 CORE_ADDR frame_args_skip
;
233 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
234 gdbarch_frame_chain_ftype
*frame_chain
;
235 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
236 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
237 gdbarch_frame_args_address_ftype
*frame_args_address
;
238 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
239 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
240 gdbarch_frame_num_args_ftype
*frame_num_args
;
241 gdbarch_stack_align_ftype
*stack_align
;
242 int extra_stack_alignment_needed
;
243 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
244 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
246 const struct floatformat
* float_format
;
247 const struct floatformat
* double_format
;
248 const struct floatformat
* long_double_format
;
249 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
250 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
251 gdbarch_software_single_step_ftype
*software_single_step
;
252 gdbarch_print_insn_ftype
*print_insn
;
253 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
257 /* The default architecture uses host values (for want of a better
260 extern const struct bfd_arch_info bfd_default_arch_struct
;
262 struct gdbarch startup_gdbarch
=
264 /* basic architecture information */
265 &bfd_default_arch_struct
,
267 /* target specific vector and its dump routine */
269 /*per-architecture data-pointers and swap regions */
271 /* Multi-arch values */
275 8 * sizeof (LONGEST
),
278 8 * sizeof (long double),
338 generic_get_saved_register
,
390 /* startup_gdbarch() */
393 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
395 /* Do any initialization needed for a non-multiarch configuration
396 after the _initialize_MODULE functions have been run. */
398 initialize_non_multiarch ()
400 alloc_gdbarch_data (&startup_gdbarch
);
401 init_gdbarch_data (&startup_gdbarch
);
405 /* Create a new ``struct gdbarch'' based on information provided by
406 ``struct gdbarch_info''. */
409 gdbarch_alloc (const struct gdbarch_info
*info
,
410 struct gdbarch_tdep
*tdep
)
412 /* NOTE: The new architecture variable is named ``current_gdbarch''
413 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
414 the current local architecture and not the previous global
415 architecture. This ensures that the new architectures initial
416 values are not influenced by the previous architecture. Once
417 everything is parameterised with gdbarch, this will go away. */
418 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
419 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
421 alloc_gdbarch_data (current_gdbarch
);
423 current_gdbarch
->tdep
= tdep
;
425 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
426 current_gdbarch
->byte_order
= info
->byte_order
;
428 /* Force the explicit initialization of these. */
429 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
430 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
431 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
432 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
433 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
434 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
435 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
436 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
437 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
438 current_gdbarch
->read_pc
= generic_target_read_pc
;
439 current_gdbarch
->write_pc
= generic_target_write_pc
;
440 current_gdbarch
->read_fp
= generic_target_read_fp
;
441 current_gdbarch
->write_fp
= generic_target_write_fp
;
442 current_gdbarch
->read_sp
= generic_target_read_sp
;
443 current_gdbarch
->write_sp
= generic_target_write_sp
;
444 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
445 current_gdbarch
->num_regs
= -1;
446 current_gdbarch
->sp_regnum
= -1;
447 current_gdbarch
->fp_regnum
= -1;
448 current_gdbarch
->pc_regnum
= -1;
449 current_gdbarch
->fp0_regnum
= -1;
450 current_gdbarch
->npc_regnum
= -1;
451 current_gdbarch
->nnpc_regnum
= -1;
452 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
453 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
454 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
455 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
456 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
457 current_gdbarch
->register_name
= legacy_register_name
;
458 current_gdbarch
->register_size
= -1;
459 current_gdbarch
->register_bytes
= -1;
460 current_gdbarch
->max_register_raw_size
= -1;
461 current_gdbarch
->max_register_virtual_size
= -1;
462 current_gdbarch
->do_registers_info
= do_registers_info
;
463 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
464 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
465 current_gdbarch
->cannot_store_register
= cannot_register_not
;
466 current_gdbarch
->use_generic_dummy_frames
= -1;
467 current_gdbarch
->call_dummy_start_offset
= -1;
468 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
469 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
470 current_gdbarch
->call_dummy_length
= -1;
471 current_gdbarch
->call_dummy_p
= -1;
472 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
473 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
474 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
475 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
476 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
477 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
478 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
479 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
480 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
481 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
482 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
483 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
484 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
485 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
486 current_gdbarch
->decr_pc_after_break
= -1;
487 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
488 current_gdbarch
->function_start_offset
= -1;
489 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
490 current_gdbarch
->frame_args_skip
= -1;
491 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
492 current_gdbarch
->extra_stack_alignment_needed
= 1;
493 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
494 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
495 current_gdbarch
->print_insn
= legacy_print_insn
;
496 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
497 /* gdbarch_alloc() */
499 return current_gdbarch
;
503 /* Free a gdbarch struct. This should never happen in normal
504 operation --- once you've created a gdbarch, you keep it around.
505 However, if an architecture's init function encounters an error
506 building the structure, it may need to clean up a partially
507 constructed gdbarch. */
510 gdbarch_free (struct gdbarch
*arch
)
512 gdb_assert (arch
!= NULL
);
513 free_gdbarch_data (arch
);
518 /* Ensure that all values in a GDBARCH are reasonable. */
521 verify_gdbarch (struct gdbarch
*gdbarch
)
523 /* Only perform sanity checks on a multi-arch target. */
527 if (gdbarch
->byte_order
== 0)
528 internal_error (__FILE__
, __LINE__
,
529 "verify_gdbarch: byte-order unset");
530 if (gdbarch
->bfd_arch_info
== NULL
)
531 internal_error (__FILE__
, __LINE__
,
532 "verify_gdbarch: bfd_arch_info unset");
533 /* Check those that need to be defined for the given multi-arch level. */
534 /* Skip verify of short_bit, invalid_p == 0 */
535 /* Skip verify of int_bit, invalid_p == 0 */
536 /* Skip verify of long_bit, invalid_p == 0 */
537 /* Skip verify of long_long_bit, invalid_p == 0 */
538 /* Skip verify of float_bit, invalid_p == 0 */
539 /* Skip verify of double_bit, invalid_p == 0 */
540 /* Skip verify of long_double_bit, invalid_p == 0 */
541 /* Skip verify of ptr_bit, invalid_p == 0 */
542 if (gdbarch
->addr_bit
== 0)
543 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
544 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
545 /* Skip verify of ieee_float, invalid_p == 0 */
546 /* Skip verify of read_pc, invalid_p == 0 */
547 /* Skip verify of write_pc, invalid_p == 0 */
548 /* Skip verify of read_fp, invalid_p == 0 */
549 /* Skip verify of write_fp, invalid_p == 0 */
550 /* Skip verify of read_sp, invalid_p == 0 */
551 /* Skip verify of write_sp, invalid_p == 0 */
552 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
553 /* Skip verify of register_read, has predicate */
554 /* Skip verify of register_write, has predicate */
555 if ((GDB_MULTI_ARCH
>= 2)
556 && (gdbarch
->num_regs
== -1))
557 internal_error (__FILE__
, __LINE__
,
558 "gdbarch: verify_gdbarch: num_regs invalid");
559 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
560 if ((GDB_MULTI_ARCH
>= 2)
561 && (gdbarch
->sp_regnum
== -1))
562 internal_error (__FILE__
, __LINE__
,
563 "gdbarch: verify_gdbarch: sp_regnum invalid");
564 if ((GDB_MULTI_ARCH
>= 2)
565 && (gdbarch
->fp_regnum
== -1))
566 internal_error (__FILE__
, __LINE__
,
567 "gdbarch: verify_gdbarch: fp_regnum invalid");
568 if ((GDB_MULTI_ARCH
>= 2)
569 && (gdbarch
->pc_regnum
== -1))
570 internal_error (__FILE__
, __LINE__
,
571 "gdbarch: verify_gdbarch: pc_regnum invalid");
572 /* Skip verify of fp0_regnum, invalid_p == 0 */
573 /* Skip verify of npc_regnum, invalid_p == 0 */
574 /* Skip verify of nnpc_regnum, invalid_p == 0 */
575 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
576 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
577 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
578 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
579 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
580 /* Skip verify of register_name, invalid_p == 0 */
581 if ((GDB_MULTI_ARCH
>= 2)
582 && (gdbarch
->register_size
== -1))
583 internal_error (__FILE__
, __LINE__
,
584 "gdbarch: verify_gdbarch: register_size invalid");
585 if ((GDB_MULTI_ARCH
>= 2)
586 && (gdbarch
->register_bytes
== -1))
587 internal_error (__FILE__
, __LINE__
,
588 "gdbarch: verify_gdbarch: register_bytes invalid");
589 if ((GDB_MULTI_ARCH
>= 2)
590 && (gdbarch
->register_byte
== 0))
591 internal_error (__FILE__
, __LINE__
,
592 "gdbarch: verify_gdbarch: register_byte invalid");
593 if ((GDB_MULTI_ARCH
>= 2)
594 && (gdbarch
->register_raw_size
== 0))
595 internal_error (__FILE__
, __LINE__
,
596 "gdbarch: verify_gdbarch: register_raw_size invalid");
597 if ((GDB_MULTI_ARCH
>= 2)
598 && (gdbarch
->max_register_raw_size
== -1))
599 internal_error (__FILE__
, __LINE__
,
600 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
601 if ((GDB_MULTI_ARCH
>= 2)
602 && (gdbarch
->register_virtual_size
== 0))
603 internal_error (__FILE__
, __LINE__
,
604 "gdbarch: verify_gdbarch: register_virtual_size invalid");
605 if ((GDB_MULTI_ARCH
>= 2)
606 && (gdbarch
->max_register_virtual_size
== -1))
607 internal_error (__FILE__
, __LINE__
,
608 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
609 if ((GDB_MULTI_ARCH
>= 2)
610 && (gdbarch
->register_virtual_type
== 0))
611 internal_error (__FILE__
, __LINE__
,
612 "gdbarch: verify_gdbarch: register_virtual_type invalid");
613 /* Skip verify of do_registers_info, invalid_p == 0 */
614 /* Skip verify of register_sim_regno, invalid_p == 0 */
615 /* Skip verify of register_bytes_ok, has predicate */
616 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
617 /* Skip verify of cannot_store_register, invalid_p == 0 */
618 if ((GDB_MULTI_ARCH
>= 1)
619 && (gdbarch
->use_generic_dummy_frames
== -1))
620 internal_error (__FILE__
, __LINE__
,
621 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
622 if ((GDB_MULTI_ARCH
>= 2)
623 && (gdbarch
->call_dummy_location
== 0))
624 internal_error (__FILE__
, __LINE__
,
625 "gdbarch: verify_gdbarch: call_dummy_location invalid");
626 if ((GDB_MULTI_ARCH
>= 2)
627 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
628 internal_error (__FILE__
, __LINE__
,
629 "gdbarch: verify_gdbarch: call_dummy_address invalid");
630 if ((GDB_MULTI_ARCH
>= 2)
631 && (gdbarch
->call_dummy_start_offset
== -1))
632 internal_error (__FILE__
, __LINE__
,
633 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
634 if ((GDB_MULTI_ARCH
>= 2)
635 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
636 internal_error (__FILE__
, __LINE__
,
637 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
638 if ((GDB_MULTI_ARCH
>= 1)
639 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
640 internal_error (__FILE__
, __LINE__
,
641 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
642 if ((GDB_MULTI_ARCH
>= 2)
643 && (gdbarch
->call_dummy_length
== -1))
644 internal_error (__FILE__
, __LINE__
,
645 "gdbarch: verify_gdbarch: call_dummy_length invalid");
646 if ((GDB_MULTI_ARCH
>= 2)
647 && (gdbarch
->pc_in_call_dummy
== 0))
648 internal_error (__FILE__
, __LINE__
,
649 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
650 if ((GDB_MULTI_ARCH
>= 1)
651 && (gdbarch
->call_dummy_p
== -1))
652 internal_error (__FILE__
, __LINE__
,
653 "gdbarch: verify_gdbarch: call_dummy_p invalid");
654 /* Skip verify of call_dummy_words, invalid_p == 0 */
655 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
656 if ((GDB_MULTI_ARCH
>= 1)
657 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
658 internal_error (__FILE__
, __LINE__
,
659 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
660 if ((GDB_MULTI_ARCH
>= 2)
661 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
662 internal_error (__FILE__
, __LINE__
,
663 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
664 if ((GDB_MULTI_ARCH
>= 2)
665 && (gdbarch
->fix_call_dummy
== 0))
666 internal_error (__FILE__
, __LINE__
,
667 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
668 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
669 /* Skip verify of init_frame_pc, invalid_p == 0 */
670 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
671 if ((GDB_MULTI_ARCH
>= 1)
672 && (gdbarch
->get_saved_register
== 0))
673 internal_error (__FILE__
, __LINE__
,
674 "gdbarch: verify_gdbarch: get_saved_register invalid");
675 /* Skip verify of register_convertible, invalid_p == 0 */
676 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
677 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
678 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
679 /* Skip verify of store_pseudo_register, invalid_p == 0 */
680 /* Skip verify of pointer_to_address, invalid_p == 0 */
681 /* Skip verify of address_to_pointer, invalid_p == 0 */
682 /* Skip verify of return_value_on_stack, invalid_p == 0 */
683 if ((GDB_MULTI_ARCH
>= 2)
684 && (gdbarch
->extract_return_value
== 0))
685 internal_error (__FILE__
, __LINE__
,
686 "gdbarch: verify_gdbarch: extract_return_value invalid");
687 if ((GDB_MULTI_ARCH
>= 1)
688 && (gdbarch
->push_arguments
== 0))
689 internal_error (__FILE__
, __LINE__
,
690 "gdbarch: verify_gdbarch: push_arguments invalid");
691 if ((GDB_MULTI_ARCH
>= 2)
692 && (gdbarch
->push_dummy_frame
== 0))
693 internal_error (__FILE__
, __LINE__
,
694 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
695 if ((GDB_MULTI_ARCH
>= 1)
696 && (gdbarch
->push_return_address
== 0))
697 internal_error (__FILE__
, __LINE__
,
698 "gdbarch: verify_gdbarch: push_return_address invalid");
699 if ((GDB_MULTI_ARCH
>= 2)
700 && (gdbarch
->pop_frame
== 0))
701 internal_error (__FILE__
, __LINE__
,
702 "gdbarch: verify_gdbarch: pop_frame invalid");
703 if ((GDB_MULTI_ARCH
>= 2)
704 && (gdbarch
->store_struct_return
== 0))
705 internal_error (__FILE__
, __LINE__
,
706 "gdbarch: verify_gdbarch: store_struct_return invalid");
707 if ((GDB_MULTI_ARCH
>= 2)
708 && (gdbarch
->store_return_value
== 0))
709 internal_error (__FILE__
, __LINE__
,
710 "gdbarch: verify_gdbarch: store_return_value invalid");
711 /* Skip verify of extract_struct_value_address, has predicate */
712 if ((GDB_MULTI_ARCH
>= 2)
713 && (gdbarch
->use_struct_convention
== 0))
714 internal_error (__FILE__
, __LINE__
,
715 "gdbarch: verify_gdbarch: use_struct_convention invalid");
716 if ((GDB_MULTI_ARCH
>= 2)
717 && (gdbarch
->frame_init_saved_regs
== 0))
718 internal_error (__FILE__
, __LINE__
,
719 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
720 if ((GDB_MULTI_ARCH
>= 2)
721 && (gdbarch
->init_extra_frame_info
== 0))
722 internal_error (__FILE__
, __LINE__
,
723 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
724 if ((GDB_MULTI_ARCH
>= 2)
725 && (gdbarch
->skip_prologue
== 0))
726 internal_error (__FILE__
, __LINE__
,
727 "gdbarch: verify_gdbarch: skip_prologue invalid");
728 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
729 if ((GDB_MULTI_ARCH
>= 2)
730 && (gdbarch
->inner_than
== 0))
731 internal_error (__FILE__
, __LINE__
,
732 "gdbarch: verify_gdbarch: inner_than invalid");
733 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
734 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
735 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH
>= 2)
737 && (gdbarch
->decr_pc_after_break
== -1))
738 internal_error (__FILE__
, __LINE__
,
739 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
740 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
741 if ((GDB_MULTI_ARCH
>= 2)
742 && (gdbarch
->function_start_offset
== -1))
743 internal_error (__FILE__
, __LINE__
,
744 "gdbarch: verify_gdbarch: function_start_offset invalid");
745 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
746 if ((GDB_MULTI_ARCH
>= 2)
747 && (gdbarch
->frame_args_skip
== -1))
748 internal_error (__FILE__
, __LINE__
,
749 "gdbarch: verify_gdbarch: frame_args_skip invalid");
750 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
751 if ((GDB_MULTI_ARCH
>= 2)
752 && (gdbarch
->frame_chain
== 0))
753 internal_error (__FILE__
, __LINE__
,
754 "gdbarch: verify_gdbarch: frame_chain invalid");
755 if ((GDB_MULTI_ARCH
>= 1)
756 && (gdbarch
->frame_chain_valid
== 0))
757 internal_error (__FILE__
, __LINE__
,
758 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
759 if ((GDB_MULTI_ARCH
>= 2)
760 && (gdbarch
->frame_saved_pc
== 0))
761 internal_error (__FILE__
, __LINE__
,
762 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
763 if ((GDB_MULTI_ARCH
>= 2)
764 && (gdbarch
->frame_args_address
== 0))
765 internal_error (__FILE__
, __LINE__
,
766 "gdbarch: verify_gdbarch: frame_args_address invalid");
767 if ((GDB_MULTI_ARCH
>= 2)
768 && (gdbarch
->frame_locals_address
== 0))
769 internal_error (__FILE__
, __LINE__
,
770 "gdbarch: verify_gdbarch: frame_locals_address invalid");
771 if ((GDB_MULTI_ARCH
>= 2)
772 && (gdbarch
->saved_pc_after_call
== 0))
773 internal_error (__FILE__
, __LINE__
,
774 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
775 if ((GDB_MULTI_ARCH
>= 2)
776 && (gdbarch
->frame_num_args
== 0))
777 internal_error (__FILE__
, __LINE__
,
778 "gdbarch: verify_gdbarch: frame_num_args invalid");
779 /* Skip verify of stack_align, has predicate */
780 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
781 /* Skip verify of reg_struct_has_addr, has predicate */
782 /* Skip verify of save_dummy_frame_tos, has predicate */
783 if (gdbarch
->float_format
== 0)
784 gdbarch
->float_format
= default_float_format (gdbarch
);
785 if (gdbarch
->double_format
== 0)
786 gdbarch
->double_format
= default_double_format (gdbarch
);
787 if (gdbarch
->long_double_format
== 0)
788 gdbarch
->long_double_format
= &floatformat_unknown
;
789 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
790 /* Skip verify of addr_bits_remove, invalid_p == 0 */
791 /* Skip verify of software_single_step, has predicate */
792 /* Skip verify of print_insn, invalid_p == 0 */
793 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
797 /* Print out the details of the current architecture. */
799 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
800 just happens to match the global variable ``current_gdbarch''. That
801 way macros refering to that variable get the local and not the global
802 version - ulgh. Once everything is parameterised with gdbarch, this
806 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
808 fprintf_unfiltered (file
,
809 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: register_read = 0x%08lx\n",
814 (long) current_gdbarch
->register_read
);
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: register_write = 0x%08lx\n",
818 (long) current_gdbarch
->register_write
);
819 #ifdef ADDRESS_TO_POINTER
821 /* Macro might contain `[{}]' when not multi-arch */
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: %s # %s\n",
824 "ADDRESS_TO_POINTER(type, buf, addr)",
825 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
830 (long) current_gdbarch
->address_to_pointer
831 /*ADDRESS_TO_POINTER ()*/);
833 #ifdef ADDR_BITS_REMOVE
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: %s # %s\n",
836 "ADDR_BITS_REMOVE(addr)",
837 XSTRING (ADDR_BITS_REMOVE (addr
)));
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
841 (long) current_gdbarch
->addr_bits_remove
842 /*ADDR_BITS_REMOVE ()*/);
844 #ifdef BELIEVE_PCC_PROMOTION
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
847 XSTRING (BELIEVE_PCC_PROMOTION
));
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
850 (long) BELIEVE_PCC_PROMOTION
);
852 #ifdef BELIEVE_PCC_PROMOTION_TYPE
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
855 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
858 (long) BELIEVE_PCC_PROMOTION_TYPE
);
860 #ifdef BREAKPOINT_FROM_PC
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: %s # %s\n",
863 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
864 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
868 (long) current_gdbarch
->breakpoint_from_pc
869 /*BREAKPOINT_FROM_PC ()*/);
871 #ifdef CALL_DUMMY_ADDRESS
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: %s # %s\n",
874 "CALL_DUMMY_ADDRESS()",
875 XSTRING (CALL_DUMMY_ADDRESS ()));
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
879 (long) current_gdbarch
->call_dummy_address
880 /*CALL_DUMMY_ADDRESS ()*/);
882 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
883 fprintf_unfiltered (file
,
884 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
885 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
886 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
889 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
891 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
894 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
897 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
899 #ifdef CALL_DUMMY_LENGTH
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
902 XSTRING (CALL_DUMMY_LENGTH
));
903 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
906 (long) CALL_DUMMY_LENGTH
);
908 #ifdef CALL_DUMMY_LOCATION
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
911 XSTRING (CALL_DUMMY_LOCATION
));
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
914 (long) CALL_DUMMY_LOCATION
);
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: CALL_DUMMY_P # %s\n",
919 XSTRING (CALL_DUMMY_P
));
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
922 (long) CALL_DUMMY_P
);
924 #ifdef CALL_DUMMY_STACK_ADJUST
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
927 XSTRING (CALL_DUMMY_STACK_ADJUST
));
928 if (CALL_DUMMY_STACK_ADJUST_P
)
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
931 (long) CALL_DUMMY_STACK_ADJUST
);
933 #ifdef CALL_DUMMY_STACK_ADJUST_P
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
936 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
939 (long) CALL_DUMMY_STACK_ADJUST_P
);
941 #ifdef CALL_DUMMY_START_OFFSET
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
944 XSTRING (CALL_DUMMY_START_OFFSET
));
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
947 (long) CALL_DUMMY_START_OFFSET
);
949 #ifdef CALL_DUMMY_WORDS
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
952 XSTRING (CALL_DUMMY_WORDS
));
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
955 (long) CALL_DUMMY_WORDS
);
957 #ifdef CANNOT_FETCH_REGISTER
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: %s # %s\n",
960 "CANNOT_FETCH_REGISTER(regnum)",
961 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
965 (long) current_gdbarch
->cannot_fetch_register
966 /*CANNOT_FETCH_REGISTER ()*/);
968 #ifdef CANNOT_STORE_REGISTER
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: %s # %s\n",
971 "CANNOT_STORE_REGISTER(regnum)",
972 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
976 (long) current_gdbarch
->cannot_store_register
977 /*CANNOT_STORE_REGISTER ()*/);
979 #ifdef COERCE_FLOAT_TO_DOUBLE
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: %s # %s\n",
982 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
983 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
987 (long) current_gdbarch
->coerce_float_to_double
988 /*COERCE_FLOAT_TO_DOUBLE ()*/);
990 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: %s # %s\n",
993 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
994 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
998 (long) current_gdbarch
->convert_from_func_ptr_addr
999 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1001 #ifdef DECR_PC_AFTER_BREAK
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1004 XSTRING (DECR_PC_AFTER_BREAK
));
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1007 (long) DECR_PC_AFTER_BREAK
);
1009 #ifdef DO_REGISTERS_INFO
1011 /* Macro might contain `[{}]' when not multi-arch */
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: %s # %s\n",
1014 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1015 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1020 (long) current_gdbarch
->do_registers_info
1021 /*DO_REGISTERS_INFO ()*/);
1023 #ifdef DWARF2_REG_TO_REGNUM
1024 fprintf_unfiltered (file
,
1025 "gdbarch_dump: %s # %s\n",
1026 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1027 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1031 (long) current_gdbarch
->dwarf2_reg_to_regnum
1032 /*DWARF2_REG_TO_REGNUM ()*/);
1034 #ifdef DWARF_REG_TO_REGNUM
1035 fprintf_unfiltered (file
,
1036 "gdbarch_dump: %s # %s\n",
1037 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1038 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1042 (long) current_gdbarch
->dwarf_reg_to_regnum
1043 /*DWARF_REG_TO_REGNUM ()*/);
1045 #ifdef ECOFF_REG_TO_REGNUM
1046 fprintf_unfiltered (file
,
1047 "gdbarch_dump: %s # %s\n",
1048 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1049 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1051 fprintf_unfiltered (file
,
1052 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1053 (long) current_gdbarch
->ecoff_reg_to_regnum
1054 /*ECOFF_REG_TO_REGNUM ()*/);
1056 #ifdef EXTRACT_RETURN_VALUE
1058 /* Macro might contain `[{}]' when not multi-arch */
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: %s # %s\n",
1061 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1062 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1067 (long) current_gdbarch
->extract_return_value
1068 /*EXTRACT_RETURN_VALUE ()*/);
1070 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1071 fprintf_unfiltered (file
,
1072 "gdbarch_dump: %s # %s\n",
1073 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1074 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1078 (long) current_gdbarch
->extract_struct_value_address
1079 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1081 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1082 fprintf_unfiltered (file
,
1083 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1084 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1087 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
1089 #ifdef FETCH_PSEUDO_REGISTER
1091 /* Macro might contain `[{}]' when not multi-arch */
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: %s # %s\n",
1094 "FETCH_PSEUDO_REGISTER(regnum)",
1095 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1098 fprintf_unfiltered (file
,
1099 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1100 (long) current_gdbarch
->fetch_pseudo_register
1101 /*FETCH_PSEUDO_REGISTER ()*/);
1103 #ifdef FIX_CALL_DUMMY
1105 /* Macro might contain `[{}]' when not multi-arch */
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: %s # %s\n",
1108 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1109 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1114 (long) current_gdbarch
->fix_call_dummy
1115 /*FIX_CALL_DUMMY ()*/);
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: FP0_REGNUM # %s\n",
1120 XSTRING (FP0_REGNUM
));
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: FP0_REGNUM = %ld\n",
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: FP_REGNUM # %s\n",
1128 XSTRING (FP_REGNUM
));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: FP_REGNUM = %ld\n",
1133 #ifdef FRAMELESS_FUNCTION_INVOCATION
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: %s # %s\n",
1136 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1137 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1141 (long) current_gdbarch
->frameless_function_invocation
1142 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1144 #ifdef FRAME_ARGS_ADDRESS
1145 fprintf_unfiltered (file
,
1146 "gdbarch_dump: %s # %s\n",
1147 "FRAME_ARGS_ADDRESS(fi)",
1148 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1152 (long) current_gdbarch
->frame_args_address
1153 /*FRAME_ARGS_ADDRESS ()*/);
1155 #ifdef FRAME_ARGS_SKIP
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1158 XSTRING (FRAME_ARGS_SKIP
));
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1161 (long) FRAME_ARGS_SKIP
);
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: %s # %s\n",
1166 "FRAME_CHAIN(frame)",
1167 XSTRING (FRAME_CHAIN (frame
)));
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1171 (long) current_gdbarch
->frame_chain
1172 /*FRAME_CHAIN ()*/);
1174 #ifdef FRAME_CHAIN_VALID
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "FRAME_CHAIN_VALID(chain, thisframe)",
1178 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1180 fprintf_unfiltered (file
,
1181 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1182 (long) current_gdbarch
->frame_chain_valid
1183 /*FRAME_CHAIN_VALID ()*/);
1185 #ifdef FRAME_INIT_SAVED_REGS
1187 /* Macro might contain `[{}]' when not multi-arch */
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: %s # %s\n",
1190 "FRAME_INIT_SAVED_REGS(frame)",
1191 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1196 (long) current_gdbarch
->frame_init_saved_regs
1197 /*FRAME_INIT_SAVED_REGS ()*/);
1199 #ifdef FRAME_LOCALS_ADDRESS
1200 fprintf_unfiltered (file
,
1201 "gdbarch_dump: %s # %s\n",
1202 "FRAME_LOCALS_ADDRESS(fi)",
1203 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1207 (long) current_gdbarch
->frame_locals_address
1208 /*FRAME_LOCALS_ADDRESS ()*/);
1210 #ifdef FRAME_NUM_ARGS
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1213 "FRAME_NUM_ARGS(frame)",
1214 XSTRING (FRAME_NUM_ARGS (frame
)));
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1218 (long) current_gdbarch
->frame_num_args
1219 /*FRAME_NUM_ARGS ()*/);
1221 #ifdef FRAME_SAVED_PC
1222 fprintf_unfiltered (file
,
1223 "gdbarch_dump: %s # %s\n",
1224 "FRAME_SAVED_PC(fi)",
1225 XSTRING (FRAME_SAVED_PC (fi
)));
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1229 (long) current_gdbarch
->frame_saved_pc
1230 /*FRAME_SAVED_PC ()*/);
1232 #ifdef FUNCTION_START_OFFSET
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1235 XSTRING (FUNCTION_START_OFFSET
));
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1238 (long) FUNCTION_START_OFFSET
);
1240 #ifdef GET_SAVED_REGISTER
1242 /* Macro might contain `[{}]' when not multi-arch */
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: %s # %s\n",
1245 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1246 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1251 (long) current_gdbarch
->get_saved_register
1252 /*GET_SAVED_REGISTER ()*/);
1255 fprintf_unfiltered (file
,
1256 "gdbarch_dump: IEEE_FLOAT # %s\n",
1257 XSTRING (IEEE_FLOAT
));
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1262 #ifdef INIT_EXTRA_FRAME_INFO
1264 /* Macro might contain `[{}]' when not multi-arch */
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: %s # %s\n",
1267 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1268 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1273 (long) current_gdbarch
->init_extra_frame_info
1274 /*INIT_EXTRA_FRAME_INFO ()*/);
1276 #ifdef INIT_FRAME_PC
1278 /* Macro might contain `[{}]' when not multi-arch */
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: %s # %s\n",
1281 "INIT_FRAME_PC(fromleaf, prev)",
1282 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1285 fprintf_unfiltered (file
,
1286 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1287 (long) current_gdbarch
->init_frame_pc
1288 /*INIT_FRAME_PC ()*/);
1290 #ifdef INIT_FRAME_PC_FIRST
1292 /* Macro might contain `[{}]' when not multi-arch */
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1296 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1301 (long) current_gdbarch
->init_frame_pc_first
1302 /*INIT_FRAME_PC_FIRST ()*/);
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "INNER_THAN(lhs, rhs)",
1308 XSTRING (INNER_THAN (lhs
, rhs
)));
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1312 (long) current_gdbarch
->inner_than
1315 #ifdef MAX_REGISTER_RAW_SIZE
1316 fprintf_unfiltered (file
,
1317 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1318 XSTRING (MAX_REGISTER_RAW_SIZE
));
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1321 (long) MAX_REGISTER_RAW_SIZE
);
1323 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1326 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1329 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1331 #ifdef MEMORY_INSERT_BREAKPOINT
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: %s # %s\n",
1334 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1335 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1339 (long) current_gdbarch
->memory_insert_breakpoint
1340 /*MEMORY_INSERT_BREAKPOINT ()*/);
1342 #ifdef MEMORY_REMOVE_BREAKPOINT
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: %s # %s\n",
1345 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1346 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1350 (long) current_gdbarch
->memory_remove_breakpoint
1351 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: NNPC_REGNUM # %s\n",
1356 XSTRING (NNPC_REGNUM
));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1359 (long) NNPC_REGNUM
);
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: NPC_REGNUM # %s\n",
1364 XSTRING (NPC_REGNUM
));
1365 fprintf_unfiltered (file
,
1366 "gdbarch_dump: NPC_REGNUM = %ld\n",
1369 #ifdef NUM_PSEUDO_REGS
1370 fprintf_unfiltered (file
,
1371 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1372 XSTRING (NUM_PSEUDO_REGS
));
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1375 (long) NUM_PSEUDO_REGS
);
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: NUM_REGS # %s\n",
1380 XSTRING (NUM_REGS
));
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: NUM_REGS = %ld\n",
1385 #ifdef PARM_BOUNDARY
1386 fprintf_unfiltered (file
,
1387 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1388 XSTRING (PARM_BOUNDARY
));
1389 fprintf_unfiltered (file
,
1390 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1391 (long) PARM_BOUNDARY
);
1393 #ifdef PC_IN_CALL_DUMMY
1394 fprintf_unfiltered (file
,
1395 "gdbarch_dump: %s # %s\n",
1396 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1397 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1401 (long) current_gdbarch
->pc_in_call_dummy
1402 /*PC_IN_CALL_DUMMY ()*/);
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: PC_REGNUM # %s\n",
1407 XSTRING (PC_REGNUM
));
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: PC_REGNUM = %ld\n",
1412 #ifdef POINTER_TO_ADDRESS
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: %s # %s\n",
1415 "POINTER_TO_ADDRESS(type, buf)",
1416 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1418 fprintf_unfiltered (file
,
1419 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1420 (long) current_gdbarch
->pointer_to_address
1421 /*POINTER_TO_ADDRESS ()*/);
1425 /* Macro might contain `[{}]' when not multi-arch */
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: %s # %s\n",
1429 XSTRING (POP_FRAME (-)));
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1434 (long) current_gdbarch
->pop_frame
1437 #ifdef PREPARE_TO_PROCEED
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: %s # %s\n",
1440 "PREPARE_TO_PROCEED(select_it)",
1441 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1445 (long) current_gdbarch
->prepare_to_proceed
1446 /*PREPARE_TO_PROCEED ()*/);
1448 #ifdef PROLOGUE_FRAMELESS_P
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: %s # %s\n",
1451 "PROLOGUE_FRAMELESS_P(ip)",
1452 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1456 (long) current_gdbarch
->prologue_frameless_p
1457 /*PROLOGUE_FRAMELESS_P ()*/);
1459 #ifdef PUSH_ARGUMENTS
1460 fprintf_unfiltered (file
,
1461 "gdbarch_dump: %s # %s\n",
1462 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1463 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1465 fprintf_unfiltered (file
,
1466 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1467 (long) current_gdbarch
->push_arguments
1468 /*PUSH_ARGUMENTS ()*/);
1470 #ifdef PUSH_DUMMY_FRAME
1472 /* Macro might contain `[{}]' when not multi-arch */
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: %s # %s\n",
1475 "PUSH_DUMMY_FRAME(-)",
1476 XSTRING (PUSH_DUMMY_FRAME (-)));
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1481 (long) current_gdbarch
->push_dummy_frame
1482 /*PUSH_DUMMY_FRAME ()*/);
1484 #ifdef PUSH_RETURN_ADDRESS
1485 fprintf_unfiltered (file
,
1486 "gdbarch_dump: %s # %s\n",
1487 "PUSH_RETURN_ADDRESS(pc, sp)",
1488 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1492 (long) current_gdbarch
->push_return_address
1493 /*PUSH_RETURN_ADDRESS ()*/);
1495 #ifdef REGISTER_BYTE
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: %s # %s\n",
1498 "REGISTER_BYTE(reg_nr)",
1499 XSTRING (REGISTER_BYTE (reg_nr
)));
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1503 (long) current_gdbarch
->register_byte
1504 /*REGISTER_BYTE ()*/);
1506 #ifdef REGISTER_BYTES
1507 fprintf_unfiltered (file
,
1508 "gdbarch_dump: REGISTER_BYTES # %s\n",
1509 XSTRING (REGISTER_BYTES
));
1510 fprintf_unfiltered (file
,
1511 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1512 (long) REGISTER_BYTES
);
1514 #ifdef REGISTER_BYTES_OK
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: %s # %s\n",
1517 "REGISTER_BYTES_OK(nr_bytes)",
1518 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1522 (long) current_gdbarch
->register_bytes_ok
1523 /*REGISTER_BYTES_OK ()*/);
1525 #ifdef REGISTER_CONVERTIBLE
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: %s # %s\n",
1528 "REGISTER_CONVERTIBLE(nr)",
1529 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1533 (long) current_gdbarch
->register_convertible
1534 /*REGISTER_CONVERTIBLE ()*/);
1536 #ifdef REGISTER_CONVERT_TO_RAW
1538 /* Macro might contain `[{}]' when not multi-arch */
1539 fprintf_unfiltered (file
,
1540 "gdbarch_dump: %s # %s\n",
1541 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1542 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1547 (long) current_gdbarch
->register_convert_to_raw
1548 /*REGISTER_CONVERT_TO_RAW ()*/);
1550 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1552 /* Macro might contain `[{}]' when not multi-arch */
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: %s # %s\n",
1555 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1556 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1561 (long) current_gdbarch
->register_convert_to_virtual
1562 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1564 #ifdef REGISTER_NAME
1565 fprintf_unfiltered (file
,
1566 "gdbarch_dump: %s # %s\n",
1567 "REGISTER_NAME(regnr)",
1568 XSTRING (REGISTER_NAME (regnr
)));
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1572 (long) current_gdbarch
->register_name
1573 /*REGISTER_NAME ()*/);
1575 #ifdef REGISTER_RAW_SIZE
1576 fprintf_unfiltered (file
,
1577 "gdbarch_dump: %s # %s\n",
1578 "REGISTER_RAW_SIZE(reg_nr)",
1579 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1583 (long) current_gdbarch
->register_raw_size
1584 /*REGISTER_RAW_SIZE ()*/);
1586 #ifdef REGISTER_SIM_REGNO
1587 fprintf_unfiltered (file
,
1588 "gdbarch_dump: %s # %s\n",
1589 "REGISTER_SIM_REGNO(reg_nr)",
1590 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1594 (long) current_gdbarch
->register_sim_regno
1595 /*REGISTER_SIM_REGNO ()*/);
1597 #ifdef REGISTER_SIZE
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: REGISTER_SIZE # %s\n",
1600 XSTRING (REGISTER_SIZE
));
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1603 (long) REGISTER_SIZE
);
1605 #ifdef REGISTER_VIRTUAL_SIZE
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: %s # %s\n",
1608 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1609 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1613 (long) current_gdbarch
->register_virtual_size
1614 /*REGISTER_VIRTUAL_SIZE ()*/);
1616 #ifdef REGISTER_VIRTUAL_TYPE
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: %s # %s\n",
1619 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1620 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1624 (long) current_gdbarch
->register_virtual_type
1625 /*REGISTER_VIRTUAL_TYPE ()*/);
1627 #ifdef REG_STRUCT_HAS_ADDR
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: %s # %s\n",
1630 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1631 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1635 (long) current_gdbarch
->reg_struct_has_addr
1636 /*REG_STRUCT_HAS_ADDR ()*/);
1638 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1640 /* Macro might contain `[{}]' when not multi-arch */
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: %s # %s\n",
1643 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1644 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1649 (long) current_gdbarch
->remote_translate_xfer_address
1650 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1652 #ifdef RETURN_VALUE_ON_STACK
1653 fprintf_unfiltered (file
,
1654 "gdbarch_dump: %s # %s\n",
1655 "RETURN_VALUE_ON_STACK(type)",
1656 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1660 (long) current_gdbarch
->return_value_on_stack
1661 /*RETURN_VALUE_ON_STACK ()*/);
1663 #ifdef SAVED_PC_AFTER_CALL
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: %s # %s\n",
1666 "SAVED_PC_AFTER_CALL(frame)",
1667 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1669 fprintf_unfiltered (file
,
1670 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1671 (long) current_gdbarch
->saved_pc_after_call
1672 /*SAVED_PC_AFTER_CALL ()*/);
1674 #ifdef SAVE_DUMMY_FRAME_TOS
1676 /* Macro might contain `[{}]' when not multi-arch */
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: %s # %s\n",
1679 "SAVE_DUMMY_FRAME_TOS(sp)",
1680 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1685 (long) current_gdbarch
->save_dummy_frame_tos
1686 /*SAVE_DUMMY_FRAME_TOS ()*/);
1688 #ifdef SDB_REG_TO_REGNUM
1689 fprintf_unfiltered (file
,
1690 "gdbarch_dump: %s # %s\n",
1691 "SDB_REG_TO_REGNUM(sdb_regnr)",
1692 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1696 (long) current_gdbarch
->sdb_reg_to_regnum
1697 /*SDB_REG_TO_REGNUM ()*/);
1699 #ifdef SIZEOF_CALL_DUMMY_WORDS
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1702 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1705 (long) SIZEOF_CALL_DUMMY_WORDS
);
1707 #ifdef SKIP_PROLOGUE
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: %s # %s\n",
1710 "SKIP_PROLOGUE(ip)",
1711 XSTRING (SKIP_PROLOGUE (ip
)));
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1715 (long) current_gdbarch
->skip_prologue
1716 /*SKIP_PROLOGUE ()*/);
1718 #ifdef SKIP_TRAMPOLINE_CODE
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: %s # %s\n",
1721 "SKIP_TRAMPOLINE_CODE(pc)",
1722 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1724 fprintf_unfiltered (file
,
1725 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1726 (long) current_gdbarch
->skip_trampoline_code
1727 /*SKIP_TRAMPOLINE_CODE ()*/);
1729 #ifdef SOFTWARE_SINGLE_STEP
1731 /* Macro might contain `[{}]' when not multi-arch */
1732 fprintf_unfiltered (file
,
1733 "gdbarch_dump: %s # %s\n",
1734 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1735 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1740 (long) current_gdbarch
->software_single_step
1741 /*SOFTWARE_SINGLE_STEP ()*/);
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: SP_REGNUM # %s\n",
1746 XSTRING (SP_REGNUM
));
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: SP_REGNUM = %ld\n",
1751 #ifdef STAB_REG_TO_REGNUM
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: %s # %s\n",
1754 "STAB_REG_TO_REGNUM(stab_regnr)",
1755 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1759 (long) current_gdbarch
->stab_reg_to_regnum
1760 /*STAB_REG_TO_REGNUM ()*/);
1763 fprintf_unfiltered (file
,
1764 "gdbarch_dump: %s # %s\n",
1766 XSTRING (STACK_ALIGN (sp
)));
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1770 (long) current_gdbarch
->stack_align
1771 /*STACK_ALIGN ()*/);
1773 #ifdef STORE_PSEUDO_REGISTER
1775 /* Macro might contain `[{}]' when not multi-arch */
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: %s # %s\n",
1778 "STORE_PSEUDO_REGISTER(regnum)",
1779 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1784 (long) current_gdbarch
->store_pseudo_register
1785 /*STORE_PSEUDO_REGISTER ()*/);
1787 #ifdef STORE_RETURN_VALUE
1789 /* Macro might contain `[{}]' when not multi-arch */
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: %s # %s\n",
1792 "STORE_RETURN_VALUE(type, valbuf)",
1793 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1798 (long) current_gdbarch
->store_return_value
1799 /*STORE_RETURN_VALUE ()*/);
1801 #ifdef STORE_STRUCT_RETURN
1803 /* Macro might contain `[{}]' when not multi-arch */
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: %s # %s\n",
1806 "STORE_STRUCT_RETURN(addr, sp)",
1807 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1812 (long) current_gdbarch
->store_struct_return
1813 /*STORE_STRUCT_RETURN ()*/);
1815 #ifdef TARGET_ADDR_BIT
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1818 XSTRING (TARGET_ADDR_BIT
));
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1821 (long) TARGET_ADDR_BIT
);
1823 #ifdef TARGET_ARCHITECTURE
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1826 XSTRING (TARGET_ARCHITECTURE
));
1827 if (TARGET_ARCHITECTURE
!= NULL
)
1828 fprintf_unfiltered (file
,
1829 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1830 TARGET_ARCHITECTURE
->printable_name
);
1832 #ifdef TARGET_BFD_VMA_BIT
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1835 XSTRING (TARGET_BFD_VMA_BIT
));
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1838 (long) TARGET_BFD_VMA_BIT
);
1840 #ifdef TARGET_BYTE_ORDER
1841 fprintf_unfiltered (file
,
1842 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1843 XSTRING (TARGET_BYTE_ORDER
));
1844 fprintf_unfiltered (file
,
1845 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1846 (long) TARGET_BYTE_ORDER
);
1848 #ifdef TARGET_DOUBLE_BIT
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1851 XSTRING (TARGET_DOUBLE_BIT
));
1852 fprintf_unfiltered (file
,
1853 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1854 (long) TARGET_DOUBLE_BIT
);
1856 #ifdef TARGET_DOUBLE_FORMAT
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1859 XSTRING (TARGET_DOUBLE_FORMAT
));
1860 fprintf_unfiltered (file
,
1861 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1862 (long) TARGET_DOUBLE_FORMAT
);
1864 #ifdef TARGET_FLOAT_BIT
1865 fprintf_unfiltered (file
,
1866 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1867 XSTRING (TARGET_FLOAT_BIT
));
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1870 (long) TARGET_FLOAT_BIT
);
1872 #ifdef TARGET_FLOAT_FORMAT
1873 fprintf_unfiltered (file
,
1874 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1875 XSTRING (TARGET_FLOAT_FORMAT
));
1876 fprintf_unfiltered (file
,
1877 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1878 (long) TARGET_FLOAT_FORMAT
);
1880 #ifdef TARGET_INT_BIT
1881 fprintf_unfiltered (file
,
1882 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1883 XSTRING (TARGET_INT_BIT
));
1884 fprintf_unfiltered (file
,
1885 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1886 (long) TARGET_INT_BIT
);
1888 #ifdef TARGET_LONG_BIT
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1891 XSTRING (TARGET_LONG_BIT
));
1892 fprintf_unfiltered (file
,
1893 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1894 (long) TARGET_LONG_BIT
);
1896 #ifdef TARGET_LONG_DOUBLE_BIT
1897 fprintf_unfiltered (file
,
1898 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1899 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1900 fprintf_unfiltered (file
,
1901 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1902 (long) TARGET_LONG_DOUBLE_BIT
);
1904 #ifdef TARGET_LONG_DOUBLE_FORMAT
1905 fprintf_unfiltered (file
,
1906 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1907 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1908 fprintf_unfiltered (file
,
1909 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1910 (long) TARGET_LONG_DOUBLE_FORMAT
);
1912 #ifdef TARGET_LONG_LONG_BIT
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1915 XSTRING (TARGET_LONG_LONG_BIT
));
1916 fprintf_unfiltered (file
,
1917 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1918 (long) TARGET_LONG_LONG_BIT
);
1920 #ifdef TARGET_PRINT_INSN
1921 fprintf_unfiltered (file
,
1922 "gdbarch_dump: %s # %s\n",
1923 "TARGET_PRINT_INSN(vma, info)",
1924 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1928 (long) current_gdbarch
->print_insn
1929 /*TARGET_PRINT_INSN ()*/);
1931 #ifdef TARGET_PTR_BIT
1932 fprintf_unfiltered (file
,
1933 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1934 XSTRING (TARGET_PTR_BIT
));
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1937 (long) TARGET_PTR_BIT
);
1939 #ifdef TARGET_READ_FP
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: %s # %s\n",
1943 XSTRING (TARGET_READ_FP ()));
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1947 (long) current_gdbarch
->read_fp
1948 /*TARGET_READ_FP ()*/);
1950 #ifdef TARGET_READ_PC
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: %s # %s\n",
1953 "TARGET_READ_PC(ptid)",
1954 XSTRING (TARGET_READ_PC (ptid
)));
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1958 (long) current_gdbarch
->read_pc
1959 /*TARGET_READ_PC ()*/);
1961 #ifdef TARGET_READ_SP
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: %s # %s\n",
1965 XSTRING (TARGET_READ_SP ()));
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1969 (long) current_gdbarch
->read_sp
1970 /*TARGET_READ_SP ()*/);
1972 #ifdef TARGET_SHORT_BIT
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1975 XSTRING (TARGET_SHORT_BIT
));
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1978 (long) TARGET_SHORT_BIT
);
1980 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1982 /* Macro might contain `[{}]' when not multi-arch */
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: %s # %s\n",
1985 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1986 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
1989 fprintf_unfiltered (file
,
1990 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
1991 (long) current_gdbarch
->virtual_frame_pointer
1992 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
1994 #ifdef TARGET_WRITE_FP
1996 /* Macro might contain `[{}]' when not multi-arch */
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: %s # %s\n",
1999 "TARGET_WRITE_FP(val)",
2000 XSTRING (TARGET_WRITE_FP (val
)));
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2005 (long) current_gdbarch
->write_fp
2006 /*TARGET_WRITE_FP ()*/);
2008 #ifdef TARGET_WRITE_PC
2010 /* Macro might contain `[{}]' when not multi-arch */
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: %s # %s\n",
2013 "TARGET_WRITE_PC(val, ptid)",
2014 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2019 (long) current_gdbarch
->write_pc
2020 /*TARGET_WRITE_PC ()*/);
2022 #ifdef TARGET_WRITE_SP
2024 /* Macro might contain `[{}]' when not multi-arch */
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: %s # %s\n",
2027 "TARGET_WRITE_SP(val)",
2028 XSTRING (TARGET_WRITE_SP (val
)));
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2033 (long) current_gdbarch
->write_sp
2034 /*TARGET_WRITE_SP ()*/);
2036 #ifdef USE_GENERIC_DUMMY_FRAMES
2037 fprintf_unfiltered (file
,
2038 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2039 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2042 (long) USE_GENERIC_DUMMY_FRAMES
);
2044 #ifdef USE_STRUCT_CONVENTION
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: %s # %s\n",
2047 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2048 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2050 fprintf_unfiltered (file
,
2051 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2052 (long) current_gdbarch
->use_struct_convention
2053 /*USE_STRUCT_CONVENTION ()*/);
2055 if (current_gdbarch
->dump_tdep
!= NULL
)
2056 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2059 struct gdbarch_tdep
*
2060 gdbarch_tdep (struct gdbarch
*gdbarch
)
2062 if (gdbarch_debug
>= 2)
2063 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2064 return gdbarch
->tdep
;
2068 const struct bfd_arch_info
*
2069 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2071 if (gdbarch_debug
>= 2)
2072 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2073 return gdbarch
->bfd_arch_info
;
2077 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2079 if (gdbarch_debug
>= 2)
2080 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2081 return gdbarch
->byte_order
;
2085 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2087 /* Skip verify of short_bit, invalid_p == 0 */
2088 if (gdbarch_debug
>= 2)
2089 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2090 return gdbarch
->short_bit
;
2094 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2097 gdbarch
->short_bit
= short_bit
;
2101 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2103 /* Skip verify of int_bit, invalid_p == 0 */
2104 if (gdbarch_debug
>= 2)
2105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2106 return gdbarch
->int_bit
;
2110 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2113 gdbarch
->int_bit
= int_bit
;
2117 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2119 /* Skip verify of long_bit, invalid_p == 0 */
2120 if (gdbarch_debug
>= 2)
2121 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2122 return gdbarch
->long_bit
;
2126 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2129 gdbarch
->long_bit
= long_bit
;
2133 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2135 /* Skip verify of long_long_bit, invalid_p == 0 */
2136 if (gdbarch_debug
>= 2)
2137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2138 return gdbarch
->long_long_bit
;
2142 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2145 gdbarch
->long_long_bit
= long_long_bit
;
2149 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2151 /* Skip verify of float_bit, invalid_p == 0 */
2152 if (gdbarch_debug
>= 2)
2153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2154 return gdbarch
->float_bit
;
2158 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2161 gdbarch
->float_bit
= float_bit
;
2165 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2167 /* Skip verify of double_bit, invalid_p == 0 */
2168 if (gdbarch_debug
>= 2)
2169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2170 return gdbarch
->double_bit
;
2174 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2177 gdbarch
->double_bit
= double_bit
;
2181 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2183 /* Skip verify of long_double_bit, invalid_p == 0 */
2184 if (gdbarch_debug
>= 2)
2185 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2186 return gdbarch
->long_double_bit
;
2190 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2191 int long_double_bit
)
2193 gdbarch
->long_double_bit
= long_double_bit
;
2197 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2199 /* Skip verify of ptr_bit, invalid_p == 0 */
2200 if (gdbarch_debug
>= 2)
2201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2202 return gdbarch
->ptr_bit
;
2206 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2209 gdbarch
->ptr_bit
= ptr_bit
;
2213 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2215 if (gdbarch
->addr_bit
== 0)
2216 internal_error (__FILE__
, __LINE__
,
2217 "gdbarch: gdbarch_addr_bit invalid");
2218 if (gdbarch_debug
>= 2)
2219 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2220 return gdbarch
->addr_bit
;
2224 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2227 gdbarch
->addr_bit
= addr_bit
;
2231 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2233 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2234 if (gdbarch_debug
>= 2)
2235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2236 return gdbarch
->bfd_vma_bit
;
2240 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2243 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2247 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2249 /* Skip verify of ieee_float, invalid_p == 0 */
2250 if (gdbarch_debug
>= 2)
2251 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2252 return gdbarch
->ieee_float
;
2256 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2259 gdbarch
->ieee_float
= ieee_float
;
2263 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2265 if (gdbarch
->read_pc
== 0)
2266 internal_error (__FILE__
, __LINE__
,
2267 "gdbarch: gdbarch_read_pc invalid");
2268 if (gdbarch_debug
>= 2)
2269 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2270 return gdbarch
->read_pc (ptid
);
2274 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2275 gdbarch_read_pc_ftype read_pc
)
2277 gdbarch
->read_pc
= read_pc
;
2281 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2283 if (gdbarch
->write_pc
== 0)
2284 internal_error (__FILE__
, __LINE__
,
2285 "gdbarch: gdbarch_write_pc invalid");
2286 if (gdbarch_debug
>= 2)
2287 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2288 gdbarch
->write_pc (val
, ptid
);
2292 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2293 gdbarch_write_pc_ftype write_pc
)
2295 gdbarch
->write_pc
= write_pc
;
2299 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2301 if (gdbarch
->read_fp
== 0)
2302 internal_error (__FILE__
, __LINE__
,
2303 "gdbarch: gdbarch_read_fp invalid");
2304 if (gdbarch_debug
>= 2)
2305 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2306 return gdbarch
->read_fp ();
2310 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2311 gdbarch_read_fp_ftype read_fp
)
2313 gdbarch
->read_fp
= read_fp
;
2317 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2319 if (gdbarch
->write_fp
== 0)
2320 internal_error (__FILE__
, __LINE__
,
2321 "gdbarch: gdbarch_write_fp invalid");
2322 if (gdbarch_debug
>= 2)
2323 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2324 gdbarch
->write_fp (val
);
2328 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2329 gdbarch_write_fp_ftype write_fp
)
2331 gdbarch
->write_fp
= write_fp
;
2335 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2337 if (gdbarch
->read_sp
== 0)
2338 internal_error (__FILE__
, __LINE__
,
2339 "gdbarch: gdbarch_read_sp invalid");
2340 if (gdbarch_debug
>= 2)
2341 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2342 return gdbarch
->read_sp ();
2346 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2347 gdbarch_read_sp_ftype read_sp
)
2349 gdbarch
->read_sp
= read_sp
;
2353 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2355 if (gdbarch
->write_sp
== 0)
2356 internal_error (__FILE__
, __LINE__
,
2357 "gdbarch: gdbarch_write_sp invalid");
2358 if (gdbarch_debug
>= 2)
2359 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2360 gdbarch
->write_sp (val
);
2364 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2365 gdbarch_write_sp_ftype write_sp
)
2367 gdbarch
->write_sp
= write_sp
;
2371 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2373 if (gdbarch
->virtual_frame_pointer
== 0)
2374 internal_error (__FILE__
, __LINE__
,
2375 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2376 if (gdbarch_debug
>= 2)
2377 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2378 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2382 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2383 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2385 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2389 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2391 return gdbarch
->register_read
!= 0;
2395 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2397 if (gdbarch
->register_read
== 0)
2398 internal_error (__FILE__
, __LINE__
,
2399 "gdbarch: gdbarch_register_read invalid");
2400 if (gdbarch_debug
>= 2)
2401 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2402 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2406 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2407 gdbarch_register_read_ftype register_read
)
2409 gdbarch
->register_read
= register_read
;
2413 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2415 return gdbarch
->register_write
!= 0;
2419 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2421 if (gdbarch
->register_write
== 0)
2422 internal_error (__FILE__
, __LINE__
,
2423 "gdbarch: gdbarch_register_write invalid");
2424 if (gdbarch_debug
>= 2)
2425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2426 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2430 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2431 gdbarch_register_write_ftype register_write
)
2433 gdbarch
->register_write
= register_write
;
2437 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2439 if (gdbarch
->num_regs
== -1)
2440 internal_error (__FILE__
, __LINE__
,
2441 "gdbarch: gdbarch_num_regs invalid");
2442 if (gdbarch_debug
>= 2)
2443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2444 return gdbarch
->num_regs
;
2448 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2451 gdbarch
->num_regs
= num_regs
;
2455 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2457 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2458 if (gdbarch_debug
>= 2)
2459 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2460 return gdbarch
->num_pseudo_regs
;
2464 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2465 int num_pseudo_regs
)
2467 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2471 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2473 if (gdbarch
->sp_regnum
== -1)
2474 internal_error (__FILE__
, __LINE__
,
2475 "gdbarch: gdbarch_sp_regnum invalid");
2476 if (gdbarch_debug
>= 2)
2477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2478 return gdbarch
->sp_regnum
;
2482 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2485 gdbarch
->sp_regnum
= sp_regnum
;
2489 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2491 if (gdbarch
->fp_regnum
== -1)
2492 internal_error (__FILE__
, __LINE__
,
2493 "gdbarch: gdbarch_fp_regnum invalid");
2494 if (gdbarch_debug
>= 2)
2495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2496 return gdbarch
->fp_regnum
;
2500 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2503 gdbarch
->fp_regnum
= fp_regnum
;
2507 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2509 if (gdbarch
->pc_regnum
== -1)
2510 internal_error (__FILE__
, __LINE__
,
2511 "gdbarch: gdbarch_pc_regnum invalid");
2512 if (gdbarch_debug
>= 2)
2513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2514 return gdbarch
->pc_regnum
;
2518 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2521 gdbarch
->pc_regnum
= pc_regnum
;
2525 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2527 /* Skip verify of fp0_regnum, invalid_p == 0 */
2528 if (gdbarch_debug
>= 2)
2529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2530 return gdbarch
->fp0_regnum
;
2534 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2537 gdbarch
->fp0_regnum
= fp0_regnum
;
2541 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2543 /* Skip verify of npc_regnum, invalid_p == 0 */
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2546 return gdbarch
->npc_regnum
;
2550 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2553 gdbarch
->npc_regnum
= npc_regnum
;
2557 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2559 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2560 if (gdbarch_debug
>= 2)
2561 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2562 return gdbarch
->nnpc_regnum
;
2566 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2569 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2573 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2575 if (gdbarch
->stab_reg_to_regnum
== 0)
2576 internal_error (__FILE__
, __LINE__
,
2577 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2578 if (gdbarch_debug
>= 2)
2579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2580 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2584 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2585 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2587 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2591 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2593 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2594 internal_error (__FILE__
, __LINE__
,
2595 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2596 if (gdbarch_debug
>= 2)
2597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2598 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2602 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2603 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2605 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2609 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2611 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2612 internal_error (__FILE__
, __LINE__
,
2613 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2614 if (gdbarch_debug
>= 2)
2615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2616 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2620 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2621 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2623 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2627 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2629 if (gdbarch
->sdb_reg_to_regnum
== 0)
2630 internal_error (__FILE__
, __LINE__
,
2631 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2632 if (gdbarch_debug
>= 2)
2633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2634 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2638 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2639 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2641 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2645 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2647 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2648 internal_error (__FILE__
, __LINE__
,
2649 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2650 if (gdbarch_debug
>= 2)
2651 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2652 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2656 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2657 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2659 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2663 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2665 if (gdbarch
->register_name
== 0)
2666 internal_error (__FILE__
, __LINE__
,
2667 "gdbarch: gdbarch_register_name invalid");
2668 if (gdbarch_debug
>= 2)
2669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2670 return gdbarch
->register_name (regnr
);
2674 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2675 gdbarch_register_name_ftype register_name
)
2677 gdbarch
->register_name
= register_name
;
2681 gdbarch_register_size (struct gdbarch
*gdbarch
)
2683 if (gdbarch
->register_size
== -1)
2684 internal_error (__FILE__
, __LINE__
,
2685 "gdbarch: gdbarch_register_size invalid");
2686 if (gdbarch_debug
>= 2)
2687 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2688 return gdbarch
->register_size
;
2692 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2695 gdbarch
->register_size
= register_size
;
2699 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2701 if (gdbarch
->register_bytes
== -1)
2702 internal_error (__FILE__
, __LINE__
,
2703 "gdbarch: gdbarch_register_bytes invalid");
2704 if (gdbarch_debug
>= 2)
2705 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2706 return gdbarch
->register_bytes
;
2710 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2713 gdbarch
->register_bytes
= register_bytes
;
2717 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2719 if (gdbarch
->register_byte
== 0)
2720 internal_error (__FILE__
, __LINE__
,
2721 "gdbarch: gdbarch_register_byte invalid");
2722 if (gdbarch_debug
>= 2)
2723 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2724 return gdbarch
->register_byte (reg_nr
);
2728 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2729 gdbarch_register_byte_ftype register_byte
)
2731 gdbarch
->register_byte
= register_byte
;
2735 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2737 if (gdbarch
->register_raw_size
== 0)
2738 internal_error (__FILE__
, __LINE__
,
2739 "gdbarch: gdbarch_register_raw_size invalid");
2740 if (gdbarch_debug
>= 2)
2741 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2742 return gdbarch
->register_raw_size (reg_nr
);
2746 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2747 gdbarch_register_raw_size_ftype register_raw_size
)
2749 gdbarch
->register_raw_size
= register_raw_size
;
2753 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2755 if (gdbarch
->max_register_raw_size
== -1)
2756 internal_error (__FILE__
, __LINE__
,
2757 "gdbarch: gdbarch_max_register_raw_size invalid");
2758 if (gdbarch_debug
>= 2)
2759 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2760 return gdbarch
->max_register_raw_size
;
2764 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2765 int max_register_raw_size
)
2767 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2771 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2773 if (gdbarch
->register_virtual_size
== 0)
2774 internal_error (__FILE__
, __LINE__
,
2775 "gdbarch: gdbarch_register_virtual_size invalid");
2776 if (gdbarch_debug
>= 2)
2777 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2778 return gdbarch
->register_virtual_size (reg_nr
);
2782 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2783 gdbarch_register_virtual_size_ftype register_virtual_size
)
2785 gdbarch
->register_virtual_size
= register_virtual_size
;
2789 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2791 if (gdbarch
->max_register_virtual_size
== -1)
2792 internal_error (__FILE__
, __LINE__
,
2793 "gdbarch: gdbarch_max_register_virtual_size invalid");
2794 if (gdbarch_debug
>= 2)
2795 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2796 return gdbarch
->max_register_virtual_size
;
2800 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2801 int max_register_virtual_size
)
2803 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2807 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2809 if (gdbarch
->register_virtual_type
== 0)
2810 internal_error (__FILE__
, __LINE__
,
2811 "gdbarch: gdbarch_register_virtual_type invalid");
2812 if (gdbarch_debug
>= 2)
2813 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2814 return gdbarch
->register_virtual_type (reg_nr
);
2818 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2819 gdbarch_register_virtual_type_ftype register_virtual_type
)
2821 gdbarch
->register_virtual_type
= register_virtual_type
;
2825 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2827 if (gdbarch
->do_registers_info
== 0)
2828 internal_error (__FILE__
, __LINE__
,
2829 "gdbarch: gdbarch_do_registers_info invalid");
2830 if (gdbarch_debug
>= 2)
2831 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2832 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2836 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2837 gdbarch_do_registers_info_ftype do_registers_info
)
2839 gdbarch
->do_registers_info
= do_registers_info
;
2843 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2845 if (gdbarch
->register_sim_regno
== 0)
2846 internal_error (__FILE__
, __LINE__
,
2847 "gdbarch: gdbarch_register_sim_regno invalid");
2848 if (gdbarch_debug
>= 2)
2849 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2850 return gdbarch
->register_sim_regno (reg_nr
);
2854 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2855 gdbarch_register_sim_regno_ftype register_sim_regno
)
2857 gdbarch
->register_sim_regno
= register_sim_regno
;
2861 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2863 return gdbarch
->register_bytes_ok
!= 0;
2867 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2869 if (gdbarch
->register_bytes_ok
== 0)
2870 internal_error (__FILE__
, __LINE__
,
2871 "gdbarch: gdbarch_register_bytes_ok invalid");
2872 if (gdbarch_debug
>= 2)
2873 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2874 return gdbarch
->register_bytes_ok (nr_bytes
);
2878 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2879 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2881 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2885 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2887 if (gdbarch
->cannot_fetch_register
== 0)
2888 internal_error (__FILE__
, __LINE__
,
2889 "gdbarch: gdbarch_cannot_fetch_register invalid");
2890 if (gdbarch_debug
>= 2)
2891 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2892 return gdbarch
->cannot_fetch_register (regnum
);
2896 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2897 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2899 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2903 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2905 if (gdbarch
->cannot_store_register
== 0)
2906 internal_error (__FILE__
, __LINE__
,
2907 "gdbarch: gdbarch_cannot_store_register invalid");
2908 if (gdbarch_debug
>= 2)
2909 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2910 return gdbarch
->cannot_store_register (regnum
);
2914 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2915 gdbarch_cannot_store_register_ftype cannot_store_register
)
2917 gdbarch
->cannot_store_register
= cannot_store_register
;
2921 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2923 if (gdbarch
->use_generic_dummy_frames
== -1)
2924 internal_error (__FILE__
, __LINE__
,
2925 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2926 if (gdbarch_debug
>= 2)
2927 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2928 return gdbarch
->use_generic_dummy_frames
;
2932 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2933 int use_generic_dummy_frames
)
2935 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2939 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2941 if (gdbarch
->call_dummy_location
== 0)
2942 internal_error (__FILE__
, __LINE__
,
2943 "gdbarch: gdbarch_call_dummy_location invalid");
2944 if (gdbarch_debug
>= 2)
2945 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2946 return gdbarch
->call_dummy_location
;
2950 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2951 int call_dummy_location
)
2953 gdbarch
->call_dummy_location
= call_dummy_location
;
2957 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2959 if (gdbarch
->call_dummy_address
== 0)
2960 internal_error (__FILE__
, __LINE__
,
2961 "gdbarch: gdbarch_call_dummy_address invalid");
2962 if (gdbarch_debug
>= 2)
2963 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2964 return gdbarch
->call_dummy_address ();
2968 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2969 gdbarch_call_dummy_address_ftype call_dummy_address
)
2971 gdbarch
->call_dummy_address
= call_dummy_address
;
2975 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2977 if (gdbarch
->call_dummy_start_offset
== -1)
2978 internal_error (__FILE__
, __LINE__
,
2979 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2980 if (gdbarch_debug
>= 2)
2981 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2982 return gdbarch
->call_dummy_start_offset
;
2986 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
2987 CORE_ADDR call_dummy_start_offset
)
2989 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
2993 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
2995 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
2996 internal_error (__FILE__
, __LINE__
,
2997 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2998 if (gdbarch_debug
>= 2)
2999 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3000 return gdbarch
->call_dummy_breakpoint_offset
;
3004 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3005 CORE_ADDR call_dummy_breakpoint_offset
)
3007 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3011 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3013 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3014 internal_error (__FILE__
, __LINE__
,
3015 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3016 if (gdbarch_debug
>= 2)
3017 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3018 return gdbarch
->call_dummy_breakpoint_offset_p
;
3022 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3023 int call_dummy_breakpoint_offset_p
)
3025 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3029 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3031 if (gdbarch
->call_dummy_length
== -1)
3032 internal_error (__FILE__
, __LINE__
,
3033 "gdbarch: gdbarch_call_dummy_length invalid");
3034 if (gdbarch_debug
>= 2)
3035 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3036 return gdbarch
->call_dummy_length
;
3040 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3041 int call_dummy_length
)
3043 gdbarch
->call_dummy_length
= call_dummy_length
;
3047 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3049 if (gdbarch
->pc_in_call_dummy
== 0)
3050 internal_error (__FILE__
, __LINE__
,
3051 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3052 if (gdbarch_debug
>= 2)
3053 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3054 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3058 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3059 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3061 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3065 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3067 if (gdbarch
->call_dummy_p
== -1)
3068 internal_error (__FILE__
, __LINE__
,
3069 "gdbarch: gdbarch_call_dummy_p invalid");
3070 if (gdbarch_debug
>= 2)
3071 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3072 return gdbarch
->call_dummy_p
;
3076 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3079 gdbarch
->call_dummy_p
= call_dummy_p
;
3083 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3085 /* Skip verify of call_dummy_words, invalid_p == 0 */
3086 if (gdbarch_debug
>= 2)
3087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3088 return gdbarch
->call_dummy_words
;
3092 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3093 LONGEST
* call_dummy_words
)
3095 gdbarch
->call_dummy_words
= call_dummy_words
;
3099 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3101 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3102 if (gdbarch_debug
>= 2)
3103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3104 return gdbarch
->sizeof_call_dummy_words
;
3108 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3109 int sizeof_call_dummy_words
)
3111 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3115 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3117 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3118 internal_error (__FILE__
, __LINE__
,
3119 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3120 if (gdbarch_debug
>= 2)
3121 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3122 return gdbarch
->call_dummy_stack_adjust_p
;
3126 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3127 int call_dummy_stack_adjust_p
)
3129 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3133 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3135 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3136 internal_error (__FILE__
, __LINE__
,
3137 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3138 if (gdbarch_debug
>= 2)
3139 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3140 return gdbarch
->call_dummy_stack_adjust
;
3144 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3145 int call_dummy_stack_adjust
)
3147 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3151 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
)
3153 if (gdbarch
->fix_call_dummy
== 0)
3154 internal_error (__FILE__
, __LINE__
,
3155 "gdbarch: gdbarch_fix_call_dummy invalid");
3156 if (gdbarch_debug
>= 2)
3157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3158 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3162 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3163 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3165 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3169 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3171 if (gdbarch
->init_frame_pc_first
== 0)
3172 internal_error (__FILE__
, __LINE__
,
3173 "gdbarch: gdbarch_init_frame_pc_first invalid");
3174 if (gdbarch_debug
>= 2)
3175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3176 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3180 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3181 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3183 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3187 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3189 if (gdbarch
->init_frame_pc
== 0)
3190 internal_error (__FILE__
, __LINE__
,
3191 "gdbarch: gdbarch_init_frame_pc invalid");
3192 if (gdbarch_debug
>= 2)
3193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3194 gdbarch
->init_frame_pc (fromleaf
, prev
);
3198 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3199 gdbarch_init_frame_pc_ftype init_frame_pc
)
3201 gdbarch
->init_frame_pc
= init_frame_pc
;
3205 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3209 return gdbarch
->believe_pcc_promotion
;
3213 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3214 int believe_pcc_promotion
)
3216 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3220 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3222 if (gdbarch_debug
>= 2)
3223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3224 return gdbarch
->believe_pcc_promotion_type
;
3228 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3229 int believe_pcc_promotion_type
)
3231 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3235 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3237 if (gdbarch
->coerce_float_to_double
== 0)
3238 internal_error (__FILE__
, __LINE__
,
3239 "gdbarch: gdbarch_coerce_float_to_double invalid");
3240 if (gdbarch_debug
>= 2)
3241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3242 return gdbarch
->coerce_float_to_double (formal
, actual
);
3246 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3247 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3249 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3253 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
)
3255 if (gdbarch
->get_saved_register
== 0)
3256 internal_error (__FILE__
, __LINE__
,
3257 "gdbarch: gdbarch_get_saved_register invalid");
3258 if (gdbarch_debug
>= 2)
3259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3260 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3264 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3265 gdbarch_get_saved_register_ftype get_saved_register
)
3267 gdbarch
->get_saved_register
= get_saved_register
;
3271 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3273 if (gdbarch
->register_convertible
== 0)
3274 internal_error (__FILE__
, __LINE__
,
3275 "gdbarch: gdbarch_register_convertible invalid");
3276 if (gdbarch_debug
>= 2)
3277 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3278 return gdbarch
->register_convertible (nr
);
3282 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3283 gdbarch_register_convertible_ftype register_convertible
)
3285 gdbarch
->register_convertible
= register_convertible
;
3289 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3291 if (gdbarch
->register_convert_to_virtual
== 0)
3292 internal_error (__FILE__
, __LINE__
,
3293 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3294 if (gdbarch_debug
>= 2)
3295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3296 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3300 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3301 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3303 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3307 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3309 if (gdbarch
->register_convert_to_raw
== 0)
3310 internal_error (__FILE__
, __LINE__
,
3311 "gdbarch: gdbarch_register_convert_to_raw invalid");
3312 if (gdbarch_debug
>= 2)
3313 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3314 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3318 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3319 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3321 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3325 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3327 if (gdbarch
->fetch_pseudo_register
== 0)
3328 internal_error (__FILE__
, __LINE__
,
3329 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3330 if (gdbarch_debug
>= 2)
3331 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3332 gdbarch
->fetch_pseudo_register (regnum
);
3336 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3337 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3339 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3343 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3345 if (gdbarch
->store_pseudo_register
== 0)
3346 internal_error (__FILE__
, __LINE__
,
3347 "gdbarch: gdbarch_store_pseudo_register invalid");
3348 if (gdbarch_debug
>= 2)
3349 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3350 gdbarch
->store_pseudo_register (regnum
);
3354 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3355 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3357 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3361 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3363 if (gdbarch
->pointer_to_address
== 0)
3364 internal_error (__FILE__
, __LINE__
,
3365 "gdbarch: gdbarch_pointer_to_address invalid");
3366 if (gdbarch_debug
>= 2)
3367 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3368 return gdbarch
->pointer_to_address (type
, buf
);
3372 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3373 gdbarch_pointer_to_address_ftype pointer_to_address
)
3375 gdbarch
->pointer_to_address
= pointer_to_address
;
3379 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3381 if (gdbarch
->address_to_pointer
== 0)
3382 internal_error (__FILE__
, __LINE__
,
3383 "gdbarch: gdbarch_address_to_pointer invalid");
3384 if (gdbarch_debug
>= 2)
3385 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3386 gdbarch
->address_to_pointer (type
, buf
, addr
);
3390 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3391 gdbarch_address_to_pointer_ftype address_to_pointer
)
3393 gdbarch
->address_to_pointer
= address_to_pointer
;
3397 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3399 if (gdbarch
->return_value_on_stack
== 0)
3400 internal_error (__FILE__
, __LINE__
,
3401 "gdbarch: gdbarch_return_value_on_stack invalid");
3402 if (gdbarch_debug
>= 2)
3403 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3404 return gdbarch
->return_value_on_stack (type
);
3408 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3409 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3411 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3415 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3417 if (gdbarch
->extract_return_value
== 0)
3418 internal_error (__FILE__
, __LINE__
,
3419 "gdbarch: gdbarch_extract_return_value invalid");
3420 if (gdbarch_debug
>= 2)
3421 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3422 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3426 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3427 gdbarch_extract_return_value_ftype extract_return_value
)
3429 gdbarch
->extract_return_value
= extract_return_value
;
3433 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3435 if (gdbarch
->push_arguments
== 0)
3436 internal_error (__FILE__
, __LINE__
,
3437 "gdbarch: gdbarch_push_arguments invalid");
3438 if (gdbarch_debug
>= 2)
3439 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3440 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3444 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3445 gdbarch_push_arguments_ftype push_arguments
)
3447 gdbarch
->push_arguments
= push_arguments
;
3451 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3453 if (gdbarch
->push_dummy_frame
== 0)
3454 internal_error (__FILE__
, __LINE__
,
3455 "gdbarch: gdbarch_push_dummy_frame invalid");
3456 if (gdbarch_debug
>= 2)
3457 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3458 gdbarch
->push_dummy_frame ();
3462 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3463 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3465 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3469 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3471 if (gdbarch
->push_return_address
== 0)
3472 internal_error (__FILE__
, __LINE__
,
3473 "gdbarch: gdbarch_push_return_address invalid");
3474 if (gdbarch_debug
>= 2)
3475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3476 return gdbarch
->push_return_address (pc
, sp
);
3480 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3481 gdbarch_push_return_address_ftype push_return_address
)
3483 gdbarch
->push_return_address
= push_return_address
;
3487 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3489 if (gdbarch
->pop_frame
== 0)
3490 internal_error (__FILE__
, __LINE__
,
3491 "gdbarch: gdbarch_pop_frame invalid");
3492 if (gdbarch_debug
>= 2)
3493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3494 gdbarch
->pop_frame ();
3498 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3499 gdbarch_pop_frame_ftype pop_frame
)
3501 gdbarch
->pop_frame
= pop_frame
;
3505 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3507 if (gdbarch
->store_struct_return
== 0)
3508 internal_error (__FILE__
, __LINE__
,
3509 "gdbarch: gdbarch_store_struct_return invalid");
3510 if (gdbarch_debug
>= 2)
3511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3512 gdbarch
->store_struct_return (addr
, sp
);
3516 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3517 gdbarch_store_struct_return_ftype store_struct_return
)
3519 gdbarch
->store_struct_return
= store_struct_return
;
3523 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3525 if (gdbarch
->store_return_value
== 0)
3526 internal_error (__FILE__
, __LINE__
,
3527 "gdbarch: gdbarch_store_return_value invalid");
3528 if (gdbarch_debug
>= 2)
3529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3530 gdbarch
->store_return_value (type
, valbuf
);
3534 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3535 gdbarch_store_return_value_ftype store_return_value
)
3537 gdbarch
->store_return_value
= store_return_value
;
3541 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3543 return gdbarch
->extract_struct_value_address
!= 0;
3547 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3549 if (gdbarch
->extract_struct_value_address
== 0)
3550 internal_error (__FILE__
, __LINE__
,
3551 "gdbarch: gdbarch_extract_struct_value_address invalid");
3552 if (gdbarch_debug
>= 2)
3553 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3554 return gdbarch
->extract_struct_value_address (regbuf
);
3558 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3559 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3561 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3565 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3567 if (gdbarch
->use_struct_convention
== 0)
3568 internal_error (__FILE__
, __LINE__
,
3569 "gdbarch: gdbarch_use_struct_convention invalid");
3570 if (gdbarch_debug
>= 2)
3571 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3572 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3576 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3577 gdbarch_use_struct_convention_ftype use_struct_convention
)
3579 gdbarch
->use_struct_convention
= use_struct_convention
;
3583 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3585 if (gdbarch
->frame_init_saved_regs
== 0)
3586 internal_error (__FILE__
, __LINE__
,
3587 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3588 if (gdbarch_debug
>= 2)
3589 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3590 gdbarch
->frame_init_saved_regs (frame
);
3594 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3595 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3597 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3601 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3603 if (gdbarch
->init_extra_frame_info
== 0)
3604 internal_error (__FILE__
, __LINE__
,
3605 "gdbarch: gdbarch_init_extra_frame_info invalid");
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3608 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3612 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3613 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3615 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3619 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3621 if (gdbarch
->skip_prologue
== 0)
3622 internal_error (__FILE__
, __LINE__
,
3623 "gdbarch: gdbarch_skip_prologue invalid");
3624 if (gdbarch_debug
>= 2)
3625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3626 return gdbarch
->skip_prologue (ip
);
3630 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3631 gdbarch_skip_prologue_ftype skip_prologue
)
3633 gdbarch
->skip_prologue
= skip_prologue
;
3637 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3639 if (gdbarch
->prologue_frameless_p
== 0)
3640 internal_error (__FILE__
, __LINE__
,
3641 "gdbarch: gdbarch_prologue_frameless_p invalid");
3642 if (gdbarch_debug
>= 2)
3643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3644 return gdbarch
->prologue_frameless_p (ip
);
3648 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3649 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3651 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3655 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3657 if (gdbarch
->inner_than
== 0)
3658 internal_error (__FILE__
, __LINE__
,
3659 "gdbarch: gdbarch_inner_than invalid");
3660 if (gdbarch_debug
>= 2)
3661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3662 return gdbarch
->inner_than (lhs
, rhs
);
3666 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3667 gdbarch_inner_than_ftype inner_than
)
3669 gdbarch
->inner_than
= inner_than
;
3673 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3675 if (gdbarch
->breakpoint_from_pc
== 0)
3676 internal_error (__FILE__
, __LINE__
,
3677 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3678 if (gdbarch_debug
>= 2)
3679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3680 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3684 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3685 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3687 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3691 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3693 if (gdbarch
->memory_insert_breakpoint
== 0)
3694 internal_error (__FILE__
, __LINE__
,
3695 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3696 if (gdbarch_debug
>= 2)
3697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3698 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3702 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3703 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3705 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3709 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3711 if (gdbarch
->memory_remove_breakpoint
== 0)
3712 internal_error (__FILE__
, __LINE__
,
3713 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3714 if (gdbarch_debug
>= 2)
3715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3716 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3720 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3721 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3723 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3727 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3729 if (gdbarch
->decr_pc_after_break
== -1)
3730 internal_error (__FILE__
, __LINE__
,
3731 "gdbarch: gdbarch_decr_pc_after_break invalid");
3732 if (gdbarch_debug
>= 2)
3733 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3734 return gdbarch
->decr_pc_after_break
;
3738 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3739 CORE_ADDR decr_pc_after_break
)
3741 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3745 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3747 if (gdbarch
->prepare_to_proceed
== 0)
3748 internal_error (__FILE__
, __LINE__
,
3749 "gdbarch: gdbarch_prepare_to_proceed invalid");
3750 if (gdbarch_debug
>= 2)
3751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3752 return gdbarch
->prepare_to_proceed (select_it
);
3756 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3757 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3759 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3763 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3765 if (gdbarch
->function_start_offset
== -1)
3766 internal_error (__FILE__
, __LINE__
,
3767 "gdbarch: gdbarch_function_start_offset invalid");
3768 if (gdbarch_debug
>= 2)
3769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3770 return gdbarch
->function_start_offset
;
3774 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3775 CORE_ADDR function_start_offset
)
3777 gdbarch
->function_start_offset
= function_start_offset
;
3781 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3783 if (gdbarch
->remote_translate_xfer_address
== 0)
3784 internal_error (__FILE__
, __LINE__
,
3785 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3786 if (gdbarch_debug
>= 2)
3787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3788 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3792 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3793 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3795 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3799 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3801 if (gdbarch
->frame_args_skip
== -1)
3802 internal_error (__FILE__
, __LINE__
,
3803 "gdbarch: gdbarch_frame_args_skip invalid");
3804 if (gdbarch_debug
>= 2)
3805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3806 return gdbarch
->frame_args_skip
;
3810 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3811 CORE_ADDR frame_args_skip
)
3813 gdbarch
->frame_args_skip
= frame_args_skip
;
3817 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3819 if (gdbarch
->frameless_function_invocation
== 0)
3820 internal_error (__FILE__
, __LINE__
,
3821 "gdbarch: gdbarch_frameless_function_invocation invalid");
3822 if (gdbarch_debug
>= 2)
3823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3824 return gdbarch
->frameless_function_invocation (fi
);
3828 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3829 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3831 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3835 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3837 if (gdbarch
->frame_chain
== 0)
3838 internal_error (__FILE__
, __LINE__
,
3839 "gdbarch: gdbarch_frame_chain invalid");
3840 if (gdbarch_debug
>= 2)
3841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3842 return gdbarch
->frame_chain (frame
);
3846 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3847 gdbarch_frame_chain_ftype frame_chain
)
3849 gdbarch
->frame_chain
= frame_chain
;
3853 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3855 if (gdbarch
->frame_chain_valid
== 0)
3856 internal_error (__FILE__
, __LINE__
,
3857 "gdbarch: gdbarch_frame_chain_valid invalid");
3858 if (gdbarch_debug
>= 2)
3859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3860 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3864 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3865 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3867 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3871 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3873 if (gdbarch
->frame_saved_pc
== 0)
3874 internal_error (__FILE__
, __LINE__
,
3875 "gdbarch: gdbarch_frame_saved_pc invalid");
3876 if (gdbarch_debug
>= 2)
3877 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3878 return gdbarch
->frame_saved_pc (fi
);
3882 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3883 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3885 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3889 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3891 if (gdbarch
->frame_args_address
== 0)
3892 internal_error (__FILE__
, __LINE__
,
3893 "gdbarch: gdbarch_frame_args_address invalid");
3894 if (gdbarch_debug
>= 2)
3895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3896 return gdbarch
->frame_args_address (fi
);
3900 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3901 gdbarch_frame_args_address_ftype frame_args_address
)
3903 gdbarch
->frame_args_address
= frame_args_address
;
3907 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3909 if (gdbarch
->frame_locals_address
== 0)
3910 internal_error (__FILE__
, __LINE__
,
3911 "gdbarch: gdbarch_frame_locals_address invalid");
3912 if (gdbarch_debug
>= 2)
3913 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3914 return gdbarch
->frame_locals_address (fi
);
3918 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3919 gdbarch_frame_locals_address_ftype frame_locals_address
)
3921 gdbarch
->frame_locals_address
= frame_locals_address
;
3925 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3927 if (gdbarch
->saved_pc_after_call
== 0)
3928 internal_error (__FILE__
, __LINE__
,
3929 "gdbarch: gdbarch_saved_pc_after_call invalid");
3930 if (gdbarch_debug
>= 2)
3931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3932 return gdbarch
->saved_pc_after_call (frame
);
3936 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3937 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3939 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3943 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3945 if (gdbarch
->frame_num_args
== 0)
3946 internal_error (__FILE__
, __LINE__
,
3947 "gdbarch: gdbarch_frame_num_args invalid");
3948 if (gdbarch_debug
>= 2)
3949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3950 return gdbarch
->frame_num_args (frame
);
3954 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3955 gdbarch_frame_num_args_ftype frame_num_args
)
3957 gdbarch
->frame_num_args
= frame_num_args
;
3961 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
3963 return gdbarch
->stack_align
!= 0;
3967 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3969 if (gdbarch
->stack_align
== 0)
3970 internal_error (__FILE__
, __LINE__
,
3971 "gdbarch: gdbarch_stack_align invalid");
3972 if (gdbarch_debug
>= 2)
3973 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
3974 return gdbarch
->stack_align (sp
);
3978 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
3979 gdbarch_stack_align_ftype stack_align
)
3981 gdbarch
->stack_align
= stack_align
;
3985 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
3987 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
3988 if (gdbarch_debug
>= 2)
3989 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
3990 return gdbarch
->extra_stack_alignment_needed
;
3994 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
3995 int extra_stack_alignment_needed
)
3997 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4001 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4003 return gdbarch
->reg_struct_has_addr
!= 0;
4007 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4009 if (gdbarch
->reg_struct_has_addr
== 0)
4010 internal_error (__FILE__
, __LINE__
,
4011 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4012 if (gdbarch_debug
>= 2)
4013 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4014 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4018 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4019 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4021 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4025 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4027 return gdbarch
->save_dummy_frame_tos
!= 0;
4031 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4033 if (gdbarch
->save_dummy_frame_tos
== 0)
4034 internal_error (__FILE__
, __LINE__
,
4035 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4036 if (gdbarch_debug
>= 2)
4037 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4038 gdbarch
->save_dummy_frame_tos (sp
);
4042 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4043 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4045 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4049 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4051 if (gdbarch_debug
>= 2)
4052 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4053 return gdbarch
->parm_boundary
;
4057 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4060 gdbarch
->parm_boundary
= parm_boundary
;
4063 const struct floatformat
*
4064 gdbarch_float_format (struct gdbarch
*gdbarch
)
4066 if (gdbarch_debug
>= 2)
4067 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4068 return gdbarch
->float_format
;
4072 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4073 const struct floatformat
* float_format
)
4075 gdbarch
->float_format
= float_format
;
4078 const struct floatformat
*
4079 gdbarch_double_format (struct gdbarch
*gdbarch
)
4081 if (gdbarch_debug
>= 2)
4082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4083 return gdbarch
->double_format
;
4087 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4088 const struct floatformat
* double_format
)
4090 gdbarch
->double_format
= double_format
;
4093 const struct floatformat
*
4094 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4096 if (gdbarch_debug
>= 2)
4097 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4098 return gdbarch
->long_double_format
;
4102 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4103 const struct floatformat
* long_double_format
)
4105 gdbarch
->long_double_format
= long_double_format
;
4109 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4111 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4112 internal_error (__FILE__
, __LINE__
,
4113 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4114 if (gdbarch_debug
>= 2)
4115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4116 return gdbarch
->convert_from_func_ptr_addr (addr
);
4120 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4121 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4123 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4127 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4129 if (gdbarch
->addr_bits_remove
== 0)
4130 internal_error (__FILE__
, __LINE__
,
4131 "gdbarch: gdbarch_addr_bits_remove invalid");
4132 if (gdbarch_debug
>= 2)
4133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4134 return gdbarch
->addr_bits_remove (addr
);
4138 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4139 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4141 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4145 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4147 return gdbarch
->software_single_step
!= 0;
4151 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4153 if (gdbarch
->software_single_step
== 0)
4154 internal_error (__FILE__
, __LINE__
,
4155 "gdbarch: gdbarch_software_single_step invalid");
4156 if (gdbarch_debug
>= 2)
4157 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4158 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4162 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4163 gdbarch_software_single_step_ftype software_single_step
)
4165 gdbarch
->software_single_step
= software_single_step
;
4169 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4171 if (gdbarch
->print_insn
== 0)
4172 internal_error (__FILE__
, __LINE__
,
4173 "gdbarch: gdbarch_print_insn invalid");
4174 if (gdbarch_debug
>= 2)
4175 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4176 return gdbarch
->print_insn (vma
, info
);
4180 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4181 gdbarch_print_insn_ftype print_insn
)
4183 gdbarch
->print_insn
= print_insn
;
4187 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4189 if (gdbarch
->skip_trampoline_code
== 0)
4190 internal_error (__FILE__
, __LINE__
,
4191 "gdbarch: gdbarch_skip_trampoline_code invalid");
4192 if (gdbarch_debug
>= 2)
4193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4194 return gdbarch
->skip_trampoline_code (pc
);
4198 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4199 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4201 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4205 /* Keep a registry of per-architecture data-pointers required by GDB
4211 gdbarch_data_init_ftype
*init
;
4212 gdbarch_data_free_ftype
*free
;
4215 struct gdbarch_data_registration
4217 struct gdbarch_data
*data
;
4218 struct gdbarch_data_registration
*next
;
4221 struct gdbarch_data_registry
4224 struct gdbarch_data_registration
*registrations
;
4227 struct gdbarch_data_registry gdbarch_data_registry
=
4232 struct gdbarch_data
*
4233 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4234 gdbarch_data_free_ftype
*free
)
4236 struct gdbarch_data_registration
**curr
;
4237 for (curr
= &gdbarch_data_registry
.registrations
;
4239 curr
= &(*curr
)->next
);
4240 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4241 (*curr
)->next
= NULL
;
4242 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4243 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4244 (*curr
)->data
->init
= init
;
4245 (*curr
)->data
->free
= free
;
4246 return (*curr
)->data
;
4250 /* Walk through all the registered users initializing each in turn. */
4253 init_gdbarch_data (struct gdbarch
*gdbarch
)
4255 struct gdbarch_data_registration
*rego
;
4256 for (rego
= gdbarch_data_registry
.registrations
;
4260 struct gdbarch_data
*data
= rego
->data
;
4261 gdb_assert (data
->index
< gdbarch
->nr_data
);
4262 if (data
->init
!= NULL
)
4264 void *pointer
= data
->init (gdbarch
);
4265 set_gdbarch_data (gdbarch
, data
, pointer
);
4270 /* Create/delete the gdbarch data vector. */
4273 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4275 gdb_assert (gdbarch
->data
== NULL
);
4276 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4277 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4281 free_gdbarch_data (struct gdbarch
*gdbarch
)
4283 struct gdbarch_data_registration
*rego
;
4284 gdb_assert (gdbarch
->data
!= NULL
);
4285 for (rego
= gdbarch_data_registry
.registrations
;
4289 struct gdbarch_data
*data
= rego
->data
;
4290 gdb_assert (data
->index
< gdbarch
->nr_data
);
4291 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4293 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4294 gdbarch
->data
[data
->index
] = NULL
;
4297 xfree (gdbarch
->data
);
4298 gdbarch
->data
= NULL
;
4302 /* Initialize the current value of thee specified per-architecture
4306 set_gdbarch_data (struct gdbarch
*gdbarch
,
4307 struct gdbarch_data
*data
,
4310 gdb_assert (data
->index
< gdbarch
->nr_data
);
4311 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4312 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4313 gdbarch
->data
[data
->index
] = pointer
;
4316 /* Return the current value of the specified per-architecture
4320 gdbarch_data (struct gdbarch_data
*data
)
4322 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4323 return current_gdbarch
->data
[data
->index
];
4328 /* Keep a registry of swapped data required by GDB modules. */
4333 struct gdbarch_swap_registration
*source
;
4334 struct gdbarch_swap
*next
;
4337 struct gdbarch_swap_registration
4340 unsigned long sizeof_data
;
4341 gdbarch_swap_ftype
*init
;
4342 struct gdbarch_swap_registration
*next
;
4345 struct gdbarch_swap_registry
4348 struct gdbarch_swap_registration
*registrations
;
4351 struct gdbarch_swap_registry gdbarch_swap_registry
=
4357 register_gdbarch_swap (void *data
,
4358 unsigned long sizeof_data
,
4359 gdbarch_swap_ftype
*init
)
4361 struct gdbarch_swap_registration
**rego
;
4362 for (rego
= &gdbarch_swap_registry
.registrations
;
4364 rego
= &(*rego
)->next
);
4365 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4366 (*rego
)->next
= NULL
;
4367 (*rego
)->init
= init
;
4368 (*rego
)->data
= data
;
4369 (*rego
)->sizeof_data
= sizeof_data
;
4374 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4376 struct gdbarch_swap_registration
*rego
;
4377 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4378 for (rego
= gdbarch_swap_registry
.registrations
;
4382 if (rego
->data
!= NULL
)
4384 (*curr
) = XMALLOC (struct gdbarch_swap
);
4385 (*curr
)->source
= rego
;
4386 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4387 (*curr
)->next
= NULL
;
4388 memset (rego
->data
, 0, rego
->sizeof_data
);
4389 curr
= &(*curr
)->next
;
4391 if (rego
->init
!= NULL
)
4397 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4399 struct gdbarch_swap
*curr
;
4400 for (curr
= gdbarch
->swap
;
4403 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4407 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4409 struct gdbarch_swap
*curr
;
4410 for (curr
= gdbarch
->swap
;
4413 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4417 /* Keep a registry of the architectures known by GDB. */
4419 struct gdbarch_registration
4421 enum bfd_architecture bfd_architecture
;
4422 gdbarch_init_ftype
*init
;
4423 gdbarch_dump_tdep_ftype
*dump_tdep
;
4424 struct gdbarch_list
*arches
;
4425 struct gdbarch_registration
*next
;
4428 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4431 append_name (const char ***buf
, int *nr
, const char *name
)
4433 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4439 gdbarch_printable_names (void)
4443 /* Accumulate a list of names based on the registed list of
4445 enum bfd_architecture a
;
4447 const char **arches
= NULL
;
4448 struct gdbarch_registration
*rego
;
4449 for (rego
= gdbarch_registry
;
4453 const struct bfd_arch_info
*ap
;
4454 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4456 internal_error (__FILE__
, __LINE__
,
4457 "gdbarch_architecture_names: multi-arch unknown");
4460 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4465 append_name (&arches
, &nr_arches
, NULL
);
4469 /* Just return all the architectures that BFD knows. Assume that
4470 the legacy architecture framework supports them. */
4471 return bfd_arch_list ();
4476 gdbarch_register (enum bfd_architecture bfd_architecture
,
4477 gdbarch_init_ftype
*init
,
4478 gdbarch_dump_tdep_ftype
*dump_tdep
)
4480 struct gdbarch_registration
**curr
;
4481 const struct bfd_arch_info
*bfd_arch_info
;
4482 /* Check that BFD recognizes this architecture */
4483 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4484 if (bfd_arch_info
== NULL
)
4486 internal_error (__FILE__
, __LINE__
,
4487 "gdbarch: Attempt to register unknown architecture (%d)",
4490 /* Check that we haven't seen this architecture before */
4491 for (curr
= &gdbarch_registry
;
4493 curr
= &(*curr
)->next
)
4495 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4496 internal_error (__FILE__
, __LINE__
,
4497 "gdbarch: Duplicate registraration of architecture (%s)",
4498 bfd_arch_info
->printable_name
);
4502 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4503 bfd_arch_info
->printable_name
,
4506 (*curr
) = XMALLOC (struct gdbarch_registration
);
4507 (*curr
)->bfd_architecture
= bfd_architecture
;
4508 (*curr
)->init
= init
;
4509 (*curr
)->dump_tdep
= dump_tdep
;
4510 (*curr
)->arches
= NULL
;
4511 (*curr
)->next
= NULL
;
4512 /* When non- multi-arch, install whatever target dump routine we've
4513 been provided - hopefully that routine has been written correctly
4514 and works regardless of multi-arch. */
4515 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4516 && startup_gdbarch
.dump_tdep
== NULL
)
4517 startup_gdbarch
.dump_tdep
= dump_tdep
;
4521 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4522 gdbarch_init_ftype
*init
)
4524 gdbarch_register (bfd_architecture
, init
, NULL
);
4528 /* Look for an architecture using gdbarch_info. Base search on only
4529 BFD_ARCH_INFO and BYTE_ORDER. */
4531 struct gdbarch_list
*
4532 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4533 const struct gdbarch_info
*info
)
4535 for (; arches
!= NULL
; arches
= arches
->next
)
4537 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4539 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4547 /* Update the current architecture. Return ZERO if the update request
4551 gdbarch_update_p (struct gdbarch_info info
)
4553 struct gdbarch
*new_gdbarch
;
4554 struct gdbarch_list
**list
;
4555 struct gdbarch_registration
*rego
;
4557 /* Fill in missing parts of the INFO struct using a number of
4558 sources: ``set ...''; INFOabfd supplied; existing target. */
4560 /* ``(gdb) set architecture ...'' */
4561 if (info
.bfd_arch_info
== NULL
4562 && !TARGET_ARCHITECTURE_AUTO
)
4563 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4564 if (info
.bfd_arch_info
== NULL
4565 && info
.abfd
!= NULL
4566 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4567 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4568 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4569 if (info
.bfd_arch_info
== NULL
)
4570 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4572 /* ``(gdb) set byte-order ...'' */
4573 if (info
.byte_order
== 0
4574 && !TARGET_BYTE_ORDER_AUTO
)
4575 info
.byte_order
= TARGET_BYTE_ORDER
;
4576 /* From the INFO struct. */
4577 if (info
.byte_order
== 0
4578 && info
.abfd
!= NULL
)
4579 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4580 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4582 /* From the current target. */
4583 if (info
.byte_order
== 0)
4584 info
.byte_order
= TARGET_BYTE_ORDER
;
4586 /* Must have found some sort of architecture. */
4587 gdb_assert (info
.bfd_arch_info
!= NULL
);
4591 fprintf_unfiltered (gdb_stdlog
,
4592 "gdbarch_update: info.bfd_arch_info %s\n",
4593 (info
.bfd_arch_info
!= NULL
4594 ? info
.bfd_arch_info
->printable_name
4596 fprintf_unfiltered (gdb_stdlog
,
4597 "gdbarch_update: info.byte_order %d (%s)\n",
4599 (info
.byte_order
== BIG_ENDIAN
? "big"
4600 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4602 fprintf_unfiltered (gdb_stdlog
,
4603 "gdbarch_update: info.abfd 0x%lx\n",
4605 fprintf_unfiltered (gdb_stdlog
,
4606 "gdbarch_update: info.tdep_info 0x%lx\n",
4607 (long) info
.tdep_info
);
4610 /* Find the target that knows about this architecture. */
4611 for (rego
= gdbarch_registry
;
4614 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4619 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4623 /* Ask the target for a replacement architecture. */
4624 new_gdbarch
= rego
->init (info
, rego
->arches
);
4626 /* Did the target like it? No. Reject the change. */
4627 if (new_gdbarch
== NULL
)
4630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4634 /* Did the architecture change? No. Do nothing. */
4635 if (current_gdbarch
== new_gdbarch
)
4638 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4640 new_gdbarch
->bfd_arch_info
->printable_name
);
4644 /* Swap all data belonging to the old target out */
4645 swapout_gdbarch_swap (current_gdbarch
);
4647 /* Is this a pre-existing architecture? Yes. Swap it in. */
4648 for (list
= ®o
->arches
;
4650 list
= &(*list
)->next
)
4652 if ((*list
)->gdbarch
== new_gdbarch
)
4655 fprintf_unfiltered (gdb_stdlog
,
4656 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4658 new_gdbarch
->bfd_arch_info
->printable_name
);
4659 current_gdbarch
= new_gdbarch
;
4660 swapin_gdbarch_swap (new_gdbarch
);
4661 architecture_changed_event ();
4666 /* Append this new architecture to this targets list. */
4667 (*list
) = XMALLOC (struct gdbarch_list
);
4668 (*list
)->next
= NULL
;
4669 (*list
)->gdbarch
= new_gdbarch
;
4671 /* Switch to this new architecture. Dump it out. */
4672 current_gdbarch
= new_gdbarch
;
4675 fprintf_unfiltered (gdb_stdlog
,
4676 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4678 new_gdbarch
->bfd_arch_info
->printable_name
);
4681 /* Check that the newly installed architecture is valid. Plug in
4682 any post init values. */
4683 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4684 verify_gdbarch (new_gdbarch
);
4686 /* Initialize the per-architecture memory (swap) areas.
4687 CURRENT_GDBARCH must be update before these modules are
4689 init_gdbarch_swap (new_gdbarch
);
4691 /* Initialize the per-architecture data-pointer of all parties that
4692 registered an interest in this architecture. CURRENT_GDBARCH
4693 must be updated before these modules are called. */
4694 init_gdbarch_data (new_gdbarch
);
4695 architecture_changed_event ();
4698 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4706 /* Pointer to the target-dependent disassembly function. */
4707 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4708 disassemble_info tm_print_insn_info
;
4711 extern void _initialize_gdbarch (void);
4714 _initialize_gdbarch (void)
4716 struct cmd_list_element
*c
;
4718 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4719 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4720 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4721 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4722 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4724 add_show_from_set (add_set_cmd ("arch",
4727 (char *)&gdbarch_debug
,
4728 "Set architecture debugging.\n\
4729 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4731 c
= add_set_cmd ("archdebug",
4734 (char *)&gdbarch_debug
,
4735 "Set architecture debugging.\n\
4736 When non-zero, architecture debugging is enabled.", &setlist
);
4738 deprecate_cmd (c
, "set debug arch");
4739 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");