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_integer_to_address_ftype
*integer_to_address
;
211 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
212 gdbarch_extract_return_value_ftype
*extract_return_value
;
213 gdbarch_push_arguments_ftype
*push_arguments
;
214 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
215 gdbarch_push_return_address_ftype
*push_return_address
;
216 gdbarch_pop_frame_ftype
*pop_frame
;
217 gdbarch_store_struct_return_ftype
*store_struct_return
;
218 gdbarch_store_return_value_ftype
*store_return_value
;
219 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
220 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
221 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
222 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
223 gdbarch_skip_prologue_ftype
*skip_prologue
;
224 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
225 gdbarch_inner_than_ftype
*inner_than
;
226 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
227 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
228 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
229 CORE_ADDR decr_pc_after_break
;
230 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
231 CORE_ADDR function_start_offset
;
232 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
233 CORE_ADDR frame_args_skip
;
234 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
235 gdbarch_frame_chain_ftype
*frame_chain
;
236 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
237 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
238 gdbarch_frame_args_address_ftype
*frame_args_address
;
239 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
240 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
241 gdbarch_frame_num_args_ftype
*frame_num_args
;
242 gdbarch_stack_align_ftype
*stack_align
;
243 int extra_stack_alignment_needed
;
244 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
245 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
247 const struct floatformat
* float_format
;
248 const struct floatformat
* double_format
;
249 const struct floatformat
* long_double_format
;
250 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
251 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
252 gdbarch_software_single_step_ftype
*software_single_step
;
253 gdbarch_print_insn_ftype
*print_insn
;
254 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
258 /* The default architecture uses host values (for want of a better
261 extern const struct bfd_arch_info bfd_default_arch_struct
;
263 struct gdbarch startup_gdbarch
=
265 /* basic architecture information */
266 &bfd_default_arch_struct
,
268 /* target specific vector and its dump routine */
270 /*per-architecture data-pointers and swap regions */
272 /* Multi-arch values */
276 8 * sizeof (LONGEST
),
279 8 * sizeof (long double),
339 generic_get_saved_register
,
392 /* startup_gdbarch() */
395 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
397 /* Do any initialization needed for a non-multiarch configuration
398 after the _initialize_MODULE functions have been run. */
400 initialize_non_multiarch ()
402 alloc_gdbarch_data (&startup_gdbarch
);
403 init_gdbarch_data (&startup_gdbarch
);
407 /* Create a new ``struct gdbarch'' based on information provided by
408 ``struct gdbarch_info''. */
411 gdbarch_alloc (const struct gdbarch_info
*info
,
412 struct gdbarch_tdep
*tdep
)
414 /* NOTE: The new architecture variable is named ``current_gdbarch''
415 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
416 the current local architecture and not the previous global
417 architecture. This ensures that the new architectures initial
418 values are not influenced by the previous architecture. Once
419 everything is parameterised with gdbarch, this will go away. */
420 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
421 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
423 alloc_gdbarch_data (current_gdbarch
);
425 current_gdbarch
->tdep
= tdep
;
427 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
428 current_gdbarch
->byte_order
= info
->byte_order
;
430 /* Force the explicit initialization of these. */
431 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
432 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
433 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
434 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
435 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
436 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
437 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
438 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
439 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
440 current_gdbarch
->read_pc
= generic_target_read_pc
;
441 current_gdbarch
->write_pc
= generic_target_write_pc
;
442 current_gdbarch
->read_fp
= generic_target_read_fp
;
443 current_gdbarch
->write_fp
= generic_target_write_fp
;
444 current_gdbarch
->read_sp
= generic_target_read_sp
;
445 current_gdbarch
->write_sp
= generic_target_write_sp
;
446 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
447 current_gdbarch
->num_regs
= -1;
448 current_gdbarch
->sp_regnum
= -1;
449 current_gdbarch
->fp_regnum
= -1;
450 current_gdbarch
->pc_regnum
= -1;
451 current_gdbarch
->fp0_regnum
= -1;
452 current_gdbarch
->npc_regnum
= -1;
453 current_gdbarch
->nnpc_regnum
= -1;
454 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
455 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
456 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
457 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
458 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
459 current_gdbarch
->register_name
= legacy_register_name
;
460 current_gdbarch
->register_size
= -1;
461 current_gdbarch
->register_bytes
= -1;
462 current_gdbarch
->max_register_raw_size
= -1;
463 current_gdbarch
->max_register_virtual_size
= -1;
464 current_gdbarch
->do_registers_info
= do_registers_info
;
465 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
466 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
467 current_gdbarch
->cannot_store_register
= cannot_register_not
;
468 current_gdbarch
->use_generic_dummy_frames
= -1;
469 current_gdbarch
->call_dummy_start_offset
= -1;
470 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
471 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
472 current_gdbarch
->call_dummy_length
= -1;
473 current_gdbarch
->call_dummy_p
= -1;
474 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
475 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
476 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
477 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
478 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
479 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
480 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
481 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
482 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
483 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
484 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
485 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
486 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
487 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
488 current_gdbarch
->decr_pc_after_break
= -1;
489 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
490 current_gdbarch
->function_start_offset
= -1;
491 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
492 current_gdbarch
->frame_args_skip
= -1;
493 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
494 current_gdbarch
->extra_stack_alignment_needed
= 1;
495 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
496 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
497 current_gdbarch
->print_insn
= legacy_print_insn
;
498 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
499 /* gdbarch_alloc() */
501 return current_gdbarch
;
505 /* Free a gdbarch struct. This should never happen in normal
506 operation --- once you've created a gdbarch, you keep it around.
507 However, if an architecture's init function encounters an error
508 building the structure, it may need to clean up a partially
509 constructed gdbarch. */
512 gdbarch_free (struct gdbarch
*arch
)
514 gdb_assert (arch
!= NULL
);
515 free_gdbarch_data (arch
);
520 /* Ensure that all values in a GDBARCH are reasonable. */
523 verify_gdbarch (struct gdbarch
*gdbarch
)
525 /* Only perform sanity checks on a multi-arch target. */
529 if (gdbarch
->byte_order
== 0)
530 internal_error (__FILE__
, __LINE__
,
531 "verify_gdbarch: byte-order unset");
532 if (gdbarch
->bfd_arch_info
== NULL
)
533 internal_error (__FILE__
, __LINE__
,
534 "verify_gdbarch: bfd_arch_info unset");
535 /* Check those that need to be defined for the given multi-arch level. */
536 /* Skip verify of short_bit, invalid_p == 0 */
537 /* Skip verify of int_bit, invalid_p == 0 */
538 /* Skip verify of long_bit, invalid_p == 0 */
539 /* Skip verify of long_long_bit, invalid_p == 0 */
540 /* Skip verify of float_bit, invalid_p == 0 */
541 /* Skip verify of double_bit, invalid_p == 0 */
542 /* Skip verify of long_double_bit, invalid_p == 0 */
543 /* Skip verify of ptr_bit, invalid_p == 0 */
544 if (gdbarch
->addr_bit
== 0)
545 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
546 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
547 /* Skip verify of ieee_float, invalid_p == 0 */
548 /* Skip verify of read_pc, invalid_p == 0 */
549 /* Skip verify of write_pc, invalid_p == 0 */
550 /* Skip verify of read_fp, invalid_p == 0 */
551 /* Skip verify of write_fp, invalid_p == 0 */
552 /* Skip verify of read_sp, invalid_p == 0 */
553 /* Skip verify of write_sp, invalid_p == 0 */
554 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
555 /* Skip verify of register_read, has predicate */
556 /* Skip verify of register_write, has predicate */
557 if ((GDB_MULTI_ARCH
>= 2)
558 && (gdbarch
->num_regs
== -1))
559 internal_error (__FILE__
, __LINE__
,
560 "gdbarch: verify_gdbarch: num_regs invalid");
561 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
562 if ((GDB_MULTI_ARCH
>= 2)
563 && (gdbarch
->sp_regnum
== -1))
564 internal_error (__FILE__
, __LINE__
,
565 "gdbarch: verify_gdbarch: sp_regnum invalid");
566 if ((GDB_MULTI_ARCH
>= 2)
567 && (gdbarch
->fp_regnum
== -1))
568 internal_error (__FILE__
, __LINE__
,
569 "gdbarch: verify_gdbarch: fp_regnum invalid");
570 if ((GDB_MULTI_ARCH
>= 2)
571 && (gdbarch
->pc_regnum
== -1))
572 internal_error (__FILE__
, __LINE__
,
573 "gdbarch: verify_gdbarch: pc_regnum invalid");
574 /* Skip verify of fp0_regnum, invalid_p == 0 */
575 /* Skip verify of npc_regnum, invalid_p == 0 */
576 /* Skip verify of nnpc_regnum, invalid_p == 0 */
577 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
578 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
579 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
580 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
581 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
582 /* Skip verify of register_name, invalid_p == 0 */
583 if ((GDB_MULTI_ARCH
>= 2)
584 && (gdbarch
->register_size
== -1))
585 internal_error (__FILE__
, __LINE__
,
586 "gdbarch: verify_gdbarch: register_size invalid");
587 if ((GDB_MULTI_ARCH
>= 2)
588 && (gdbarch
->register_bytes
== -1))
589 internal_error (__FILE__
, __LINE__
,
590 "gdbarch: verify_gdbarch: register_bytes invalid");
591 if ((GDB_MULTI_ARCH
>= 2)
592 && (gdbarch
->register_byte
== 0))
593 internal_error (__FILE__
, __LINE__
,
594 "gdbarch: verify_gdbarch: register_byte invalid");
595 if ((GDB_MULTI_ARCH
>= 2)
596 && (gdbarch
->register_raw_size
== 0))
597 internal_error (__FILE__
, __LINE__
,
598 "gdbarch: verify_gdbarch: register_raw_size invalid");
599 if ((GDB_MULTI_ARCH
>= 2)
600 && (gdbarch
->max_register_raw_size
== -1))
601 internal_error (__FILE__
, __LINE__
,
602 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
603 if ((GDB_MULTI_ARCH
>= 2)
604 && (gdbarch
->register_virtual_size
== 0))
605 internal_error (__FILE__
, __LINE__
,
606 "gdbarch: verify_gdbarch: register_virtual_size invalid");
607 if ((GDB_MULTI_ARCH
>= 2)
608 && (gdbarch
->max_register_virtual_size
== -1))
609 internal_error (__FILE__
, __LINE__
,
610 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
611 if ((GDB_MULTI_ARCH
>= 2)
612 && (gdbarch
->register_virtual_type
== 0))
613 internal_error (__FILE__
, __LINE__
,
614 "gdbarch: verify_gdbarch: register_virtual_type invalid");
615 /* Skip verify of do_registers_info, invalid_p == 0 */
616 /* Skip verify of register_sim_regno, invalid_p == 0 */
617 /* Skip verify of register_bytes_ok, has predicate */
618 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
619 /* Skip verify of cannot_store_register, invalid_p == 0 */
620 if ((GDB_MULTI_ARCH
>= 1)
621 && (gdbarch
->use_generic_dummy_frames
== -1))
622 internal_error (__FILE__
, __LINE__
,
623 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
624 if ((GDB_MULTI_ARCH
>= 2)
625 && (gdbarch
->call_dummy_location
== 0))
626 internal_error (__FILE__
, __LINE__
,
627 "gdbarch: verify_gdbarch: call_dummy_location invalid");
628 if ((GDB_MULTI_ARCH
>= 2)
629 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
630 internal_error (__FILE__
, __LINE__
,
631 "gdbarch: verify_gdbarch: call_dummy_address invalid");
632 if ((GDB_MULTI_ARCH
>= 2)
633 && (gdbarch
->call_dummy_start_offset
== -1))
634 internal_error (__FILE__
, __LINE__
,
635 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
636 if ((GDB_MULTI_ARCH
>= 2)
637 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
638 internal_error (__FILE__
, __LINE__
,
639 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
640 if ((GDB_MULTI_ARCH
>= 1)
641 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
642 internal_error (__FILE__
, __LINE__
,
643 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
644 if ((GDB_MULTI_ARCH
>= 2)
645 && (gdbarch
->call_dummy_length
== -1))
646 internal_error (__FILE__
, __LINE__
,
647 "gdbarch: verify_gdbarch: call_dummy_length invalid");
648 if ((GDB_MULTI_ARCH
>= 2)
649 && (gdbarch
->pc_in_call_dummy
== 0))
650 internal_error (__FILE__
, __LINE__
,
651 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
652 if ((GDB_MULTI_ARCH
>= 1)
653 && (gdbarch
->call_dummy_p
== -1))
654 internal_error (__FILE__
, __LINE__
,
655 "gdbarch: verify_gdbarch: call_dummy_p invalid");
656 /* Skip verify of call_dummy_words, invalid_p == 0 */
657 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
658 if ((GDB_MULTI_ARCH
>= 1)
659 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
660 internal_error (__FILE__
, __LINE__
,
661 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
662 if ((GDB_MULTI_ARCH
>= 2)
663 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
664 internal_error (__FILE__
, __LINE__
,
665 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
666 if ((GDB_MULTI_ARCH
>= 2)
667 && (gdbarch
->fix_call_dummy
== 0))
668 internal_error (__FILE__
, __LINE__
,
669 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
670 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
671 /* Skip verify of init_frame_pc, invalid_p == 0 */
672 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
673 if ((GDB_MULTI_ARCH
>= 1)
674 && (gdbarch
->get_saved_register
== 0))
675 internal_error (__FILE__
, __LINE__
,
676 "gdbarch: verify_gdbarch: get_saved_register invalid");
677 /* Skip verify of register_convertible, invalid_p == 0 */
678 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
679 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
680 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
681 /* Skip verify of store_pseudo_register, invalid_p == 0 */
682 /* Skip verify of pointer_to_address, invalid_p == 0 */
683 /* Skip verify of address_to_pointer, invalid_p == 0 */
684 /* Skip verify of integer_to_address, has predicate */
685 /* Skip verify of return_value_on_stack, invalid_p == 0 */
686 if ((GDB_MULTI_ARCH
>= 2)
687 && (gdbarch
->extract_return_value
== 0))
688 internal_error (__FILE__
, __LINE__
,
689 "gdbarch: verify_gdbarch: extract_return_value invalid");
690 if ((GDB_MULTI_ARCH
>= 1)
691 && (gdbarch
->push_arguments
== 0))
692 internal_error (__FILE__
, __LINE__
,
693 "gdbarch: verify_gdbarch: push_arguments invalid");
694 if ((GDB_MULTI_ARCH
>= 2)
695 && (gdbarch
->push_dummy_frame
== 0))
696 internal_error (__FILE__
, __LINE__
,
697 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
698 if ((GDB_MULTI_ARCH
>= 1)
699 && (gdbarch
->push_return_address
== 0))
700 internal_error (__FILE__
, __LINE__
,
701 "gdbarch: verify_gdbarch: push_return_address invalid");
702 if ((GDB_MULTI_ARCH
>= 2)
703 && (gdbarch
->pop_frame
== 0))
704 internal_error (__FILE__
, __LINE__
,
705 "gdbarch: verify_gdbarch: pop_frame invalid");
706 if ((GDB_MULTI_ARCH
>= 2)
707 && (gdbarch
->store_struct_return
== 0))
708 internal_error (__FILE__
, __LINE__
,
709 "gdbarch: verify_gdbarch: store_struct_return invalid");
710 if ((GDB_MULTI_ARCH
>= 2)
711 && (gdbarch
->store_return_value
== 0))
712 internal_error (__FILE__
, __LINE__
,
713 "gdbarch: verify_gdbarch: store_return_value invalid");
714 /* Skip verify of extract_struct_value_address, has predicate */
715 if ((GDB_MULTI_ARCH
>= 2)
716 && (gdbarch
->use_struct_convention
== 0))
717 internal_error (__FILE__
, __LINE__
,
718 "gdbarch: verify_gdbarch: use_struct_convention invalid");
719 if ((GDB_MULTI_ARCH
>= 2)
720 && (gdbarch
->frame_init_saved_regs
== 0))
721 internal_error (__FILE__
, __LINE__
,
722 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->init_extra_frame_info
== 0))
725 internal_error (__FILE__
, __LINE__
,
726 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
727 if ((GDB_MULTI_ARCH
>= 2)
728 && (gdbarch
->skip_prologue
== 0))
729 internal_error (__FILE__
, __LINE__
,
730 "gdbarch: verify_gdbarch: skip_prologue invalid");
731 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
732 if ((GDB_MULTI_ARCH
>= 2)
733 && (gdbarch
->inner_than
== 0))
734 internal_error (__FILE__
, __LINE__
,
735 "gdbarch: verify_gdbarch: inner_than invalid");
736 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
737 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
738 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
739 if ((GDB_MULTI_ARCH
>= 2)
740 && (gdbarch
->decr_pc_after_break
== -1))
741 internal_error (__FILE__
, __LINE__
,
742 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
743 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
744 if ((GDB_MULTI_ARCH
>= 2)
745 && (gdbarch
->function_start_offset
== -1))
746 internal_error (__FILE__
, __LINE__
,
747 "gdbarch: verify_gdbarch: function_start_offset invalid");
748 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
749 if ((GDB_MULTI_ARCH
>= 2)
750 && (gdbarch
->frame_args_skip
== -1))
751 internal_error (__FILE__
, __LINE__
,
752 "gdbarch: verify_gdbarch: frame_args_skip invalid");
753 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
754 if ((GDB_MULTI_ARCH
>= 2)
755 && (gdbarch
->frame_chain
== 0))
756 internal_error (__FILE__
, __LINE__
,
757 "gdbarch: verify_gdbarch: frame_chain invalid");
758 if ((GDB_MULTI_ARCH
>= 1)
759 && (gdbarch
->frame_chain_valid
== 0))
760 internal_error (__FILE__
, __LINE__
,
761 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
762 if ((GDB_MULTI_ARCH
>= 2)
763 && (gdbarch
->frame_saved_pc
== 0))
764 internal_error (__FILE__
, __LINE__
,
765 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
766 if ((GDB_MULTI_ARCH
>= 2)
767 && (gdbarch
->frame_args_address
== 0))
768 internal_error (__FILE__
, __LINE__
,
769 "gdbarch: verify_gdbarch: frame_args_address invalid");
770 if ((GDB_MULTI_ARCH
>= 2)
771 && (gdbarch
->frame_locals_address
== 0))
772 internal_error (__FILE__
, __LINE__
,
773 "gdbarch: verify_gdbarch: frame_locals_address invalid");
774 if ((GDB_MULTI_ARCH
>= 2)
775 && (gdbarch
->saved_pc_after_call
== 0))
776 internal_error (__FILE__
, __LINE__
,
777 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
778 if ((GDB_MULTI_ARCH
>= 2)
779 && (gdbarch
->frame_num_args
== 0))
780 internal_error (__FILE__
, __LINE__
,
781 "gdbarch: verify_gdbarch: frame_num_args invalid");
782 /* Skip verify of stack_align, has predicate */
783 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
784 /* Skip verify of reg_struct_has_addr, has predicate */
785 /* Skip verify of save_dummy_frame_tos, has predicate */
786 if (gdbarch
->float_format
== 0)
787 gdbarch
->float_format
= default_float_format (gdbarch
);
788 if (gdbarch
->double_format
== 0)
789 gdbarch
->double_format
= default_double_format (gdbarch
);
790 if (gdbarch
->long_double_format
== 0)
791 gdbarch
->long_double_format
= &floatformat_unknown
;
792 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
793 /* Skip verify of addr_bits_remove, invalid_p == 0 */
794 /* Skip verify of software_single_step, has predicate */
795 /* Skip verify of print_insn, invalid_p == 0 */
796 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
800 /* Print out the details of the current architecture. */
802 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
803 just happens to match the global variable ``current_gdbarch''. That
804 way macros refering to that variable get the local and not the global
805 version - ulgh. Once everything is parameterised with gdbarch, this
809 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: register_read = 0x%08lx\n",
817 (long) current_gdbarch
->register_read
);
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: register_write = 0x%08lx\n",
821 (long) current_gdbarch
->register_write
);
822 #ifdef ADDRESS_TO_POINTER
824 /* Macro might contain `[{}]' when not multi-arch */
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: %s # %s\n",
827 "ADDRESS_TO_POINTER(type, buf, addr)",
828 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
833 (long) current_gdbarch
->address_to_pointer
834 /*ADDRESS_TO_POINTER ()*/);
836 #ifdef ADDR_BITS_REMOVE
837 fprintf_unfiltered (file
,
838 "gdbarch_dump: %s # %s\n",
839 "ADDR_BITS_REMOVE(addr)",
840 XSTRING (ADDR_BITS_REMOVE (addr
)));
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
844 (long) current_gdbarch
->addr_bits_remove
845 /*ADDR_BITS_REMOVE ()*/);
847 #ifdef BELIEVE_PCC_PROMOTION
848 fprintf_unfiltered (file
,
849 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
850 XSTRING (BELIEVE_PCC_PROMOTION
));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
853 (long) BELIEVE_PCC_PROMOTION
);
855 #ifdef BELIEVE_PCC_PROMOTION_TYPE
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
858 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
861 (long) BELIEVE_PCC_PROMOTION_TYPE
);
863 #ifdef BREAKPOINT_FROM_PC
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: %s # %s\n",
866 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
867 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
871 (long) current_gdbarch
->breakpoint_from_pc
872 /*BREAKPOINT_FROM_PC ()*/);
874 #ifdef CALL_DUMMY_ADDRESS
875 fprintf_unfiltered (file
,
876 "gdbarch_dump: %s # %s\n",
877 "CALL_DUMMY_ADDRESS()",
878 XSTRING (CALL_DUMMY_ADDRESS ()));
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
882 (long) current_gdbarch
->call_dummy_address
883 /*CALL_DUMMY_ADDRESS ()*/);
885 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
888 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
889 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
890 fprintf_unfiltered (file
,
891 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
892 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
894 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
897 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
900 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
902 #ifdef CALL_DUMMY_LENGTH
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
905 XSTRING (CALL_DUMMY_LENGTH
));
906 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
907 fprintf_unfiltered (file
,
908 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
909 (long) CALL_DUMMY_LENGTH
);
911 #ifdef CALL_DUMMY_LOCATION
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
914 XSTRING (CALL_DUMMY_LOCATION
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
917 (long) CALL_DUMMY_LOCATION
);
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_P # %s\n",
922 XSTRING (CALL_DUMMY_P
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
925 (long) CALL_DUMMY_P
);
927 #ifdef CALL_DUMMY_STACK_ADJUST
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
930 XSTRING (CALL_DUMMY_STACK_ADJUST
));
931 if (CALL_DUMMY_STACK_ADJUST_P
)
932 fprintf_unfiltered (file
,
933 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
934 (long) CALL_DUMMY_STACK_ADJUST
);
936 #ifdef CALL_DUMMY_STACK_ADJUST_P
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
939 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
940 fprintf_unfiltered (file
,
941 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
942 (long) CALL_DUMMY_STACK_ADJUST_P
);
944 #ifdef CALL_DUMMY_START_OFFSET
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
947 XSTRING (CALL_DUMMY_START_OFFSET
));
948 fprintf_unfiltered (file
,
949 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
950 (long) CALL_DUMMY_START_OFFSET
);
952 #ifdef CALL_DUMMY_WORDS
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
955 XSTRING (CALL_DUMMY_WORDS
));
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
958 (long) CALL_DUMMY_WORDS
);
960 #ifdef CANNOT_FETCH_REGISTER
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: %s # %s\n",
963 "CANNOT_FETCH_REGISTER(regnum)",
964 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
968 (long) current_gdbarch
->cannot_fetch_register
969 /*CANNOT_FETCH_REGISTER ()*/);
971 #ifdef CANNOT_STORE_REGISTER
972 fprintf_unfiltered (file
,
973 "gdbarch_dump: %s # %s\n",
974 "CANNOT_STORE_REGISTER(regnum)",
975 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
979 (long) current_gdbarch
->cannot_store_register
980 /*CANNOT_STORE_REGISTER ()*/);
982 #ifdef COERCE_FLOAT_TO_DOUBLE
983 fprintf_unfiltered (file
,
984 "gdbarch_dump: %s # %s\n",
985 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
986 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
990 (long) current_gdbarch
->coerce_float_to_double
991 /*COERCE_FLOAT_TO_DOUBLE ()*/);
993 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
994 fprintf_unfiltered (file
,
995 "gdbarch_dump: %s # %s\n",
996 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
997 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1001 (long) current_gdbarch
->convert_from_func_ptr_addr
1002 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1004 #ifdef DECR_PC_AFTER_BREAK
1005 fprintf_unfiltered (file
,
1006 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1007 XSTRING (DECR_PC_AFTER_BREAK
));
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1010 (long) DECR_PC_AFTER_BREAK
);
1012 #ifdef DO_REGISTERS_INFO
1014 /* Macro might contain `[{}]' when not multi-arch */
1015 fprintf_unfiltered (file
,
1016 "gdbarch_dump: %s # %s\n",
1017 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1018 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1021 fprintf_unfiltered (file
,
1022 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1023 (long) current_gdbarch
->do_registers_info
1024 /*DO_REGISTERS_INFO ()*/);
1026 #ifdef DWARF2_REG_TO_REGNUM
1027 fprintf_unfiltered (file
,
1028 "gdbarch_dump: %s # %s\n",
1029 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1030 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1034 (long) current_gdbarch
->dwarf2_reg_to_regnum
1035 /*DWARF2_REG_TO_REGNUM ()*/);
1037 #ifdef DWARF_REG_TO_REGNUM
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: %s # %s\n",
1040 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1041 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1045 (long) current_gdbarch
->dwarf_reg_to_regnum
1046 /*DWARF_REG_TO_REGNUM ()*/);
1048 #ifdef ECOFF_REG_TO_REGNUM
1049 fprintf_unfiltered (file
,
1050 "gdbarch_dump: %s # %s\n",
1051 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1052 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1056 (long) current_gdbarch
->ecoff_reg_to_regnum
1057 /*ECOFF_REG_TO_REGNUM ()*/);
1059 #ifdef EXTRACT_RETURN_VALUE
1061 /* Macro might contain `[{}]' when not multi-arch */
1062 fprintf_unfiltered (file
,
1063 "gdbarch_dump: %s # %s\n",
1064 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1065 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1070 (long) current_gdbarch
->extract_return_value
1071 /*EXTRACT_RETURN_VALUE ()*/);
1073 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: %s # %s\n",
1076 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1077 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1081 (long) current_gdbarch
->extract_struct_value_address
1082 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1084 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1087 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1088 fprintf_unfiltered (file
,
1089 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1090 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
1092 #ifdef FETCH_PSEUDO_REGISTER
1094 /* Macro might contain `[{}]' when not multi-arch */
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: %s # %s\n",
1097 "FETCH_PSEUDO_REGISTER(regnum)",
1098 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1101 fprintf_unfiltered (file
,
1102 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1103 (long) current_gdbarch
->fetch_pseudo_register
1104 /*FETCH_PSEUDO_REGISTER ()*/);
1106 #ifdef FIX_CALL_DUMMY
1108 /* Macro might contain `[{}]' when not multi-arch */
1109 fprintf_unfiltered (file
,
1110 "gdbarch_dump: %s # %s\n",
1111 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1112 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1117 (long) current_gdbarch
->fix_call_dummy
1118 /*FIX_CALL_DUMMY ()*/);
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: FP0_REGNUM # %s\n",
1123 XSTRING (FP0_REGNUM
));
1124 fprintf_unfiltered (file
,
1125 "gdbarch_dump: FP0_REGNUM = %ld\n",
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: FP_REGNUM # %s\n",
1131 XSTRING (FP_REGNUM
));
1132 fprintf_unfiltered (file
,
1133 "gdbarch_dump: FP_REGNUM = %ld\n",
1136 #ifdef FRAMELESS_FUNCTION_INVOCATION
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: %s # %s\n",
1139 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1140 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1144 (long) current_gdbarch
->frameless_function_invocation
1145 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1147 #ifdef FRAME_ARGS_ADDRESS
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: %s # %s\n",
1150 "FRAME_ARGS_ADDRESS(fi)",
1151 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1155 (long) current_gdbarch
->frame_args_address
1156 /*FRAME_ARGS_ADDRESS ()*/);
1158 #ifdef FRAME_ARGS_SKIP
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1161 XSTRING (FRAME_ARGS_SKIP
));
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1164 (long) FRAME_ARGS_SKIP
);
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: %s # %s\n",
1169 "FRAME_CHAIN(frame)",
1170 XSTRING (FRAME_CHAIN (frame
)));
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1174 (long) current_gdbarch
->frame_chain
1175 /*FRAME_CHAIN ()*/);
1177 #ifdef FRAME_CHAIN_VALID
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: %s # %s\n",
1180 "FRAME_CHAIN_VALID(chain, thisframe)",
1181 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1183 fprintf_unfiltered (file
,
1184 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1185 (long) current_gdbarch
->frame_chain_valid
1186 /*FRAME_CHAIN_VALID ()*/);
1188 #ifdef FRAME_INIT_SAVED_REGS
1190 /* Macro might contain `[{}]' when not multi-arch */
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: %s # %s\n",
1193 "FRAME_INIT_SAVED_REGS(frame)",
1194 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1197 fprintf_unfiltered (file
,
1198 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1199 (long) current_gdbarch
->frame_init_saved_regs
1200 /*FRAME_INIT_SAVED_REGS ()*/);
1202 #ifdef FRAME_LOCALS_ADDRESS
1203 fprintf_unfiltered (file
,
1204 "gdbarch_dump: %s # %s\n",
1205 "FRAME_LOCALS_ADDRESS(fi)",
1206 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1210 (long) current_gdbarch
->frame_locals_address
1211 /*FRAME_LOCALS_ADDRESS ()*/);
1213 #ifdef FRAME_NUM_ARGS
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: %s # %s\n",
1216 "FRAME_NUM_ARGS(frame)",
1217 XSTRING (FRAME_NUM_ARGS (frame
)));
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1221 (long) current_gdbarch
->frame_num_args
1222 /*FRAME_NUM_ARGS ()*/);
1224 #ifdef FRAME_SAVED_PC
1225 fprintf_unfiltered (file
,
1226 "gdbarch_dump: %s # %s\n",
1227 "FRAME_SAVED_PC(fi)",
1228 XSTRING (FRAME_SAVED_PC (fi
)));
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1232 (long) current_gdbarch
->frame_saved_pc
1233 /*FRAME_SAVED_PC ()*/);
1235 #ifdef FUNCTION_START_OFFSET
1236 fprintf_unfiltered (file
,
1237 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1238 XSTRING (FUNCTION_START_OFFSET
));
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1241 (long) FUNCTION_START_OFFSET
);
1243 #ifdef GET_SAVED_REGISTER
1245 /* Macro might contain `[{}]' when not multi-arch */
1246 fprintf_unfiltered (file
,
1247 "gdbarch_dump: %s # %s\n",
1248 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1249 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1252 fprintf_unfiltered (file
,
1253 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1254 (long) current_gdbarch
->get_saved_register
1255 /*GET_SAVED_REGISTER ()*/);
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: IEEE_FLOAT # %s\n",
1260 XSTRING (IEEE_FLOAT
));
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1265 #ifdef INIT_EXTRA_FRAME_INFO
1267 /* Macro might contain `[{}]' when not multi-arch */
1268 fprintf_unfiltered (file
,
1269 "gdbarch_dump: %s # %s\n",
1270 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1271 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1274 fprintf_unfiltered (file
,
1275 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1276 (long) current_gdbarch
->init_extra_frame_info
1277 /*INIT_EXTRA_FRAME_INFO ()*/);
1279 #ifdef INIT_FRAME_PC
1281 /* Macro might contain `[{}]' when not multi-arch */
1282 fprintf_unfiltered (file
,
1283 "gdbarch_dump: %s # %s\n",
1284 "INIT_FRAME_PC(fromleaf, prev)",
1285 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1288 fprintf_unfiltered (file
,
1289 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1290 (long) current_gdbarch
->init_frame_pc
1291 /*INIT_FRAME_PC ()*/);
1293 #ifdef INIT_FRAME_PC_FIRST
1295 /* Macro might contain `[{}]' when not multi-arch */
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: %s # %s\n",
1298 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1299 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1304 (long) current_gdbarch
->init_frame_pc_first
1305 /*INIT_FRAME_PC_FIRST ()*/);
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: %s # %s\n",
1310 "INNER_THAN(lhs, rhs)",
1311 XSTRING (INNER_THAN (lhs
, rhs
)));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1315 (long) current_gdbarch
->inner_than
1318 #ifdef INTEGER_TO_ADDRESS
1319 fprintf_unfiltered (file
,
1320 "gdbarch_dump: %s # %s\n",
1321 "INTEGER_TO_ADDRESS(type, buf)",
1322 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1326 (long) current_gdbarch
->integer_to_address
1327 /*INTEGER_TO_ADDRESS ()*/);
1329 #ifdef MAX_REGISTER_RAW_SIZE
1330 fprintf_unfiltered (file
,
1331 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1332 XSTRING (MAX_REGISTER_RAW_SIZE
));
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1335 (long) MAX_REGISTER_RAW_SIZE
);
1337 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1340 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1341 fprintf_unfiltered (file
,
1342 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1343 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1345 #ifdef MEMORY_INSERT_BREAKPOINT
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: %s # %s\n",
1348 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1349 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1353 (long) current_gdbarch
->memory_insert_breakpoint
1354 /*MEMORY_INSERT_BREAKPOINT ()*/);
1356 #ifdef MEMORY_REMOVE_BREAKPOINT
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: %s # %s\n",
1359 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1360 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1364 (long) current_gdbarch
->memory_remove_breakpoint
1365 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1368 fprintf_unfiltered (file
,
1369 "gdbarch_dump: NNPC_REGNUM # %s\n",
1370 XSTRING (NNPC_REGNUM
));
1371 fprintf_unfiltered (file
,
1372 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1373 (long) NNPC_REGNUM
);
1376 fprintf_unfiltered (file
,
1377 "gdbarch_dump: NPC_REGNUM # %s\n",
1378 XSTRING (NPC_REGNUM
));
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: NPC_REGNUM = %ld\n",
1383 #ifdef NUM_PSEUDO_REGS
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1386 XSTRING (NUM_PSEUDO_REGS
));
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1389 (long) NUM_PSEUDO_REGS
);
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: NUM_REGS # %s\n",
1394 XSTRING (NUM_REGS
));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: NUM_REGS = %ld\n",
1399 #ifdef PARM_BOUNDARY
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1402 XSTRING (PARM_BOUNDARY
));
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1405 (long) PARM_BOUNDARY
);
1407 #ifdef PC_IN_CALL_DUMMY
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: %s # %s\n",
1410 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1411 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1413 fprintf_unfiltered (file
,
1414 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1415 (long) current_gdbarch
->pc_in_call_dummy
1416 /*PC_IN_CALL_DUMMY ()*/);
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: PC_REGNUM # %s\n",
1421 XSTRING (PC_REGNUM
));
1422 fprintf_unfiltered (file
,
1423 "gdbarch_dump: PC_REGNUM = %ld\n",
1426 #ifdef POINTER_TO_ADDRESS
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: %s # %s\n",
1429 "POINTER_TO_ADDRESS(type, buf)",
1430 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1434 (long) current_gdbarch
->pointer_to_address
1435 /*POINTER_TO_ADDRESS ()*/);
1439 /* Macro might contain `[{}]' when not multi-arch */
1440 fprintf_unfiltered (file
,
1441 "gdbarch_dump: %s # %s\n",
1443 XSTRING (POP_FRAME (-)));
1446 fprintf_unfiltered (file
,
1447 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1448 (long) current_gdbarch
->pop_frame
1451 #ifdef PREPARE_TO_PROCEED
1452 fprintf_unfiltered (file
,
1453 "gdbarch_dump: %s # %s\n",
1454 "PREPARE_TO_PROCEED(select_it)",
1455 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1457 fprintf_unfiltered (file
,
1458 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1459 (long) current_gdbarch
->prepare_to_proceed
1460 /*PREPARE_TO_PROCEED ()*/);
1462 #ifdef PROLOGUE_FRAMELESS_P
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: %s # %s\n",
1465 "PROLOGUE_FRAMELESS_P(ip)",
1466 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1468 fprintf_unfiltered (file
,
1469 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1470 (long) current_gdbarch
->prologue_frameless_p
1471 /*PROLOGUE_FRAMELESS_P ()*/);
1473 #ifdef PUSH_ARGUMENTS
1474 fprintf_unfiltered (file
,
1475 "gdbarch_dump: %s # %s\n",
1476 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1477 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1481 (long) current_gdbarch
->push_arguments
1482 /*PUSH_ARGUMENTS ()*/);
1484 #ifdef PUSH_DUMMY_FRAME
1486 /* Macro might contain `[{}]' when not multi-arch */
1487 fprintf_unfiltered (file
,
1488 "gdbarch_dump: %s # %s\n",
1489 "PUSH_DUMMY_FRAME(-)",
1490 XSTRING (PUSH_DUMMY_FRAME (-)));
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1495 (long) current_gdbarch
->push_dummy_frame
1496 /*PUSH_DUMMY_FRAME ()*/);
1498 #ifdef PUSH_RETURN_ADDRESS
1499 fprintf_unfiltered (file
,
1500 "gdbarch_dump: %s # %s\n",
1501 "PUSH_RETURN_ADDRESS(pc, sp)",
1502 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1504 fprintf_unfiltered (file
,
1505 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1506 (long) current_gdbarch
->push_return_address
1507 /*PUSH_RETURN_ADDRESS ()*/);
1509 #ifdef REGISTER_BYTE
1510 fprintf_unfiltered (file
,
1511 "gdbarch_dump: %s # %s\n",
1512 "REGISTER_BYTE(reg_nr)",
1513 XSTRING (REGISTER_BYTE (reg_nr
)));
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1517 (long) current_gdbarch
->register_byte
1518 /*REGISTER_BYTE ()*/);
1520 #ifdef REGISTER_BYTES
1521 fprintf_unfiltered (file
,
1522 "gdbarch_dump: REGISTER_BYTES # %s\n",
1523 XSTRING (REGISTER_BYTES
));
1524 fprintf_unfiltered (file
,
1525 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1526 (long) REGISTER_BYTES
);
1528 #ifdef REGISTER_BYTES_OK
1529 fprintf_unfiltered (file
,
1530 "gdbarch_dump: %s # %s\n",
1531 "REGISTER_BYTES_OK(nr_bytes)",
1532 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1534 fprintf_unfiltered (file
,
1535 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1536 (long) current_gdbarch
->register_bytes_ok
1537 /*REGISTER_BYTES_OK ()*/);
1539 #ifdef REGISTER_CONVERTIBLE
1540 fprintf_unfiltered (file
,
1541 "gdbarch_dump: %s # %s\n",
1542 "REGISTER_CONVERTIBLE(nr)",
1543 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1547 (long) current_gdbarch
->register_convertible
1548 /*REGISTER_CONVERTIBLE ()*/);
1550 #ifdef REGISTER_CONVERT_TO_RAW
1552 /* Macro might contain `[{}]' when not multi-arch */
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: %s # %s\n",
1555 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1556 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1561 (long) current_gdbarch
->register_convert_to_raw
1562 /*REGISTER_CONVERT_TO_RAW ()*/);
1564 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1566 /* Macro might contain `[{}]' when not multi-arch */
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: %s # %s\n",
1569 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1570 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1575 (long) current_gdbarch
->register_convert_to_virtual
1576 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1578 #ifdef REGISTER_NAME
1579 fprintf_unfiltered (file
,
1580 "gdbarch_dump: %s # %s\n",
1581 "REGISTER_NAME(regnr)",
1582 XSTRING (REGISTER_NAME (regnr
)));
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1586 (long) current_gdbarch
->register_name
1587 /*REGISTER_NAME ()*/);
1589 #ifdef REGISTER_RAW_SIZE
1590 fprintf_unfiltered (file
,
1591 "gdbarch_dump: %s # %s\n",
1592 "REGISTER_RAW_SIZE(reg_nr)",
1593 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1597 (long) current_gdbarch
->register_raw_size
1598 /*REGISTER_RAW_SIZE ()*/);
1600 #ifdef REGISTER_SIM_REGNO
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: %s # %s\n",
1603 "REGISTER_SIM_REGNO(reg_nr)",
1604 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1608 (long) current_gdbarch
->register_sim_regno
1609 /*REGISTER_SIM_REGNO ()*/);
1611 #ifdef REGISTER_SIZE
1612 fprintf_unfiltered (file
,
1613 "gdbarch_dump: REGISTER_SIZE # %s\n",
1614 XSTRING (REGISTER_SIZE
));
1615 fprintf_unfiltered (file
,
1616 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1617 (long) REGISTER_SIZE
);
1619 #ifdef REGISTER_VIRTUAL_SIZE
1620 fprintf_unfiltered (file
,
1621 "gdbarch_dump: %s # %s\n",
1622 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1623 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1625 fprintf_unfiltered (file
,
1626 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1627 (long) current_gdbarch
->register_virtual_size
1628 /*REGISTER_VIRTUAL_SIZE ()*/);
1630 #ifdef REGISTER_VIRTUAL_TYPE
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: %s # %s\n",
1633 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1634 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1636 fprintf_unfiltered (file
,
1637 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1638 (long) current_gdbarch
->register_virtual_type
1639 /*REGISTER_VIRTUAL_TYPE ()*/);
1641 #ifdef REG_STRUCT_HAS_ADDR
1642 fprintf_unfiltered (file
,
1643 "gdbarch_dump: %s # %s\n",
1644 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1645 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1649 (long) current_gdbarch
->reg_struct_has_addr
1650 /*REG_STRUCT_HAS_ADDR ()*/);
1652 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1654 /* Macro might contain `[{}]' when not multi-arch */
1655 fprintf_unfiltered (file
,
1656 "gdbarch_dump: %s # %s\n",
1657 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1658 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1661 fprintf_unfiltered (file
,
1662 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1663 (long) current_gdbarch
->remote_translate_xfer_address
1664 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1666 #ifdef RETURN_VALUE_ON_STACK
1667 fprintf_unfiltered (file
,
1668 "gdbarch_dump: %s # %s\n",
1669 "RETURN_VALUE_ON_STACK(type)",
1670 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1672 fprintf_unfiltered (file
,
1673 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1674 (long) current_gdbarch
->return_value_on_stack
1675 /*RETURN_VALUE_ON_STACK ()*/);
1677 #ifdef SAVED_PC_AFTER_CALL
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: %s # %s\n",
1680 "SAVED_PC_AFTER_CALL(frame)",
1681 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1685 (long) current_gdbarch
->saved_pc_after_call
1686 /*SAVED_PC_AFTER_CALL ()*/);
1688 #ifdef SAVE_DUMMY_FRAME_TOS
1690 /* Macro might contain `[{}]' when not multi-arch */
1691 fprintf_unfiltered (file
,
1692 "gdbarch_dump: %s # %s\n",
1693 "SAVE_DUMMY_FRAME_TOS(sp)",
1694 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1699 (long) current_gdbarch
->save_dummy_frame_tos
1700 /*SAVE_DUMMY_FRAME_TOS ()*/);
1702 #ifdef SDB_REG_TO_REGNUM
1703 fprintf_unfiltered (file
,
1704 "gdbarch_dump: %s # %s\n",
1705 "SDB_REG_TO_REGNUM(sdb_regnr)",
1706 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1708 fprintf_unfiltered (file
,
1709 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1710 (long) current_gdbarch
->sdb_reg_to_regnum
1711 /*SDB_REG_TO_REGNUM ()*/);
1713 #ifdef SIZEOF_CALL_DUMMY_WORDS
1714 fprintf_unfiltered (file
,
1715 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1716 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1717 fprintf_unfiltered (file
,
1718 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1719 (long) SIZEOF_CALL_DUMMY_WORDS
);
1721 #ifdef SKIP_PROLOGUE
1722 fprintf_unfiltered (file
,
1723 "gdbarch_dump: %s # %s\n",
1724 "SKIP_PROLOGUE(ip)",
1725 XSTRING (SKIP_PROLOGUE (ip
)));
1727 fprintf_unfiltered (file
,
1728 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1729 (long) current_gdbarch
->skip_prologue
1730 /*SKIP_PROLOGUE ()*/);
1732 #ifdef SKIP_TRAMPOLINE_CODE
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: %s # %s\n",
1735 "SKIP_TRAMPOLINE_CODE(pc)",
1736 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1740 (long) current_gdbarch
->skip_trampoline_code
1741 /*SKIP_TRAMPOLINE_CODE ()*/);
1743 #ifdef SOFTWARE_SINGLE_STEP
1745 /* Macro might contain `[{}]' when not multi-arch */
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: %s # %s\n",
1748 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1749 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1754 (long) current_gdbarch
->software_single_step
1755 /*SOFTWARE_SINGLE_STEP ()*/);
1758 fprintf_unfiltered (file
,
1759 "gdbarch_dump: SP_REGNUM # %s\n",
1760 XSTRING (SP_REGNUM
));
1761 fprintf_unfiltered (file
,
1762 "gdbarch_dump: SP_REGNUM = %ld\n",
1765 #ifdef STAB_REG_TO_REGNUM
1766 fprintf_unfiltered (file
,
1767 "gdbarch_dump: %s # %s\n",
1768 "STAB_REG_TO_REGNUM(stab_regnr)",
1769 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1771 fprintf_unfiltered (file
,
1772 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1773 (long) current_gdbarch
->stab_reg_to_regnum
1774 /*STAB_REG_TO_REGNUM ()*/);
1777 fprintf_unfiltered (file
,
1778 "gdbarch_dump: %s # %s\n",
1780 XSTRING (STACK_ALIGN (sp
)));
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1784 (long) current_gdbarch
->stack_align
1785 /*STACK_ALIGN ()*/);
1787 #ifdef STORE_PSEUDO_REGISTER
1789 /* Macro might contain `[{}]' when not multi-arch */
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: %s # %s\n",
1792 "STORE_PSEUDO_REGISTER(regnum)",
1793 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1798 (long) current_gdbarch
->store_pseudo_register
1799 /*STORE_PSEUDO_REGISTER ()*/);
1801 #ifdef STORE_RETURN_VALUE
1803 /* Macro might contain `[{}]' when not multi-arch */
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: %s # %s\n",
1806 "STORE_RETURN_VALUE(type, valbuf)",
1807 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1812 (long) current_gdbarch
->store_return_value
1813 /*STORE_RETURN_VALUE ()*/);
1815 #ifdef STORE_STRUCT_RETURN
1817 /* Macro might contain `[{}]' when not multi-arch */
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: %s # %s\n",
1820 "STORE_STRUCT_RETURN(addr, sp)",
1821 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1824 fprintf_unfiltered (file
,
1825 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1826 (long) current_gdbarch
->store_struct_return
1827 /*STORE_STRUCT_RETURN ()*/);
1829 #ifdef TARGET_ADDR_BIT
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1832 XSTRING (TARGET_ADDR_BIT
));
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1835 (long) TARGET_ADDR_BIT
);
1837 #ifdef TARGET_ARCHITECTURE
1838 fprintf_unfiltered (file
,
1839 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1840 XSTRING (TARGET_ARCHITECTURE
));
1841 if (TARGET_ARCHITECTURE
!= NULL
)
1842 fprintf_unfiltered (file
,
1843 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1844 TARGET_ARCHITECTURE
->printable_name
);
1846 #ifdef TARGET_BFD_VMA_BIT
1847 fprintf_unfiltered (file
,
1848 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1849 XSTRING (TARGET_BFD_VMA_BIT
));
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1852 (long) TARGET_BFD_VMA_BIT
);
1854 #ifdef TARGET_BYTE_ORDER
1855 fprintf_unfiltered (file
,
1856 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1857 XSTRING (TARGET_BYTE_ORDER
));
1858 fprintf_unfiltered (file
,
1859 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1860 (long) TARGET_BYTE_ORDER
);
1862 #ifdef TARGET_DOUBLE_BIT
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1865 XSTRING (TARGET_DOUBLE_BIT
));
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1868 (long) TARGET_DOUBLE_BIT
);
1870 #ifdef TARGET_DOUBLE_FORMAT
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1873 XSTRING (TARGET_DOUBLE_FORMAT
));
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1876 (long) TARGET_DOUBLE_FORMAT
);
1878 #ifdef TARGET_FLOAT_BIT
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1881 XSTRING (TARGET_FLOAT_BIT
));
1882 fprintf_unfiltered (file
,
1883 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1884 (long) TARGET_FLOAT_BIT
);
1886 #ifdef TARGET_FLOAT_FORMAT
1887 fprintf_unfiltered (file
,
1888 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1889 XSTRING (TARGET_FLOAT_FORMAT
));
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1892 (long) TARGET_FLOAT_FORMAT
);
1894 #ifdef TARGET_INT_BIT
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1897 XSTRING (TARGET_INT_BIT
));
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1900 (long) TARGET_INT_BIT
);
1902 #ifdef TARGET_LONG_BIT
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1905 XSTRING (TARGET_LONG_BIT
));
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1908 (long) TARGET_LONG_BIT
);
1910 #ifdef TARGET_LONG_DOUBLE_BIT
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1913 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1916 (long) TARGET_LONG_DOUBLE_BIT
);
1918 #ifdef TARGET_LONG_DOUBLE_FORMAT
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1921 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1924 (long) TARGET_LONG_DOUBLE_FORMAT
);
1926 #ifdef TARGET_LONG_LONG_BIT
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1929 XSTRING (TARGET_LONG_LONG_BIT
));
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1932 (long) TARGET_LONG_LONG_BIT
);
1934 #ifdef TARGET_PRINT_INSN
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: %s # %s\n",
1937 "TARGET_PRINT_INSN(vma, info)",
1938 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1940 fprintf_unfiltered (file
,
1941 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1942 (long) current_gdbarch
->print_insn
1943 /*TARGET_PRINT_INSN ()*/);
1945 #ifdef TARGET_PTR_BIT
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1948 XSTRING (TARGET_PTR_BIT
));
1949 fprintf_unfiltered (file
,
1950 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1951 (long) TARGET_PTR_BIT
);
1953 #ifdef TARGET_READ_FP
1954 fprintf_unfiltered (file
,
1955 "gdbarch_dump: %s # %s\n",
1957 XSTRING (TARGET_READ_FP ()));
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1961 (long) current_gdbarch
->read_fp
1962 /*TARGET_READ_FP ()*/);
1964 #ifdef TARGET_READ_PC
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: %s # %s\n",
1967 "TARGET_READ_PC(ptid)",
1968 XSTRING (TARGET_READ_PC (ptid
)));
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1972 (long) current_gdbarch
->read_pc
1973 /*TARGET_READ_PC ()*/);
1975 #ifdef TARGET_READ_SP
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: %s # %s\n",
1979 XSTRING (TARGET_READ_SP ()));
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1983 (long) current_gdbarch
->read_sp
1984 /*TARGET_READ_SP ()*/);
1986 #ifdef TARGET_SHORT_BIT
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1989 XSTRING (TARGET_SHORT_BIT
));
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1992 (long) TARGET_SHORT_BIT
);
1994 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1996 /* Macro might contain `[{}]' when not multi-arch */
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: %s # %s\n",
1999 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2000 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2005 (long) current_gdbarch
->virtual_frame_pointer
2006 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2008 #ifdef TARGET_WRITE_FP
2010 /* Macro might contain `[{}]' when not multi-arch */
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: %s # %s\n",
2013 "TARGET_WRITE_FP(val)",
2014 XSTRING (TARGET_WRITE_FP (val
)));
2017 fprintf_unfiltered (file
,
2018 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2019 (long) current_gdbarch
->write_fp
2020 /*TARGET_WRITE_FP ()*/);
2022 #ifdef TARGET_WRITE_PC
2024 /* Macro might contain `[{}]' when not multi-arch */
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: %s # %s\n",
2027 "TARGET_WRITE_PC(val, ptid)",
2028 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2033 (long) current_gdbarch
->write_pc
2034 /*TARGET_WRITE_PC ()*/);
2036 #ifdef TARGET_WRITE_SP
2038 /* Macro might contain `[{}]' when not multi-arch */
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: %s # %s\n",
2041 "TARGET_WRITE_SP(val)",
2042 XSTRING (TARGET_WRITE_SP (val
)));
2045 fprintf_unfiltered (file
,
2046 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2047 (long) current_gdbarch
->write_sp
2048 /*TARGET_WRITE_SP ()*/);
2050 #ifdef USE_GENERIC_DUMMY_FRAMES
2051 fprintf_unfiltered (file
,
2052 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2053 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2054 fprintf_unfiltered (file
,
2055 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2056 (long) USE_GENERIC_DUMMY_FRAMES
);
2058 #ifdef USE_STRUCT_CONVENTION
2059 fprintf_unfiltered (file
,
2060 "gdbarch_dump: %s # %s\n",
2061 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2062 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2064 fprintf_unfiltered (file
,
2065 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2066 (long) current_gdbarch
->use_struct_convention
2067 /*USE_STRUCT_CONVENTION ()*/);
2069 if (current_gdbarch
->dump_tdep
!= NULL
)
2070 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2073 struct gdbarch_tdep
*
2074 gdbarch_tdep (struct gdbarch
*gdbarch
)
2076 if (gdbarch_debug
>= 2)
2077 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2078 return gdbarch
->tdep
;
2082 const struct bfd_arch_info
*
2083 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2085 if (gdbarch_debug
>= 2)
2086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2087 return gdbarch
->bfd_arch_info
;
2091 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2093 if (gdbarch_debug
>= 2)
2094 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2095 return gdbarch
->byte_order
;
2099 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2101 /* Skip verify of short_bit, invalid_p == 0 */
2102 if (gdbarch_debug
>= 2)
2103 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2104 return gdbarch
->short_bit
;
2108 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2111 gdbarch
->short_bit
= short_bit
;
2115 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2117 /* Skip verify of int_bit, invalid_p == 0 */
2118 if (gdbarch_debug
>= 2)
2119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2120 return gdbarch
->int_bit
;
2124 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2127 gdbarch
->int_bit
= int_bit
;
2131 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2133 /* Skip verify of long_bit, invalid_p == 0 */
2134 if (gdbarch_debug
>= 2)
2135 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2136 return gdbarch
->long_bit
;
2140 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2143 gdbarch
->long_bit
= long_bit
;
2147 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2149 /* Skip verify of long_long_bit, invalid_p == 0 */
2150 if (gdbarch_debug
>= 2)
2151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2152 return gdbarch
->long_long_bit
;
2156 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2159 gdbarch
->long_long_bit
= long_long_bit
;
2163 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2165 /* Skip verify of float_bit, invalid_p == 0 */
2166 if (gdbarch_debug
>= 2)
2167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2168 return gdbarch
->float_bit
;
2172 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2175 gdbarch
->float_bit
= float_bit
;
2179 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2181 /* Skip verify of double_bit, invalid_p == 0 */
2182 if (gdbarch_debug
>= 2)
2183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2184 return gdbarch
->double_bit
;
2188 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2191 gdbarch
->double_bit
= double_bit
;
2195 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2197 /* Skip verify of long_double_bit, invalid_p == 0 */
2198 if (gdbarch_debug
>= 2)
2199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2200 return gdbarch
->long_double_bit
;
2204 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2205 int long_double_bit
)
2207 gdbarch
->long_double_bit
= long_double_bit
;
2211 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2213 /* Skip verify of ptr_bit, invalid_p == 0 */
2214 if (gdbarch_debug
>= 2)
2215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2216 return gdbarch
->ptr_bit
;
2220 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2223 gdbarch
->ptr_bit
= ptr_bit
;
2227 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2229 if (gdbarch
->addr_bit
== 0)
2230 internal_error (__FILE__
, __LINE__
,
2231 "gdbarch: gdbarch_addr_bit invalid");
2232 if (gdbarch_debug
>= 2)
2233 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2234 return gdbarch
->addr_bit
;
2238 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2241 gdbarch
->addr_bit
= addr_bit
;
2245 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2247 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2248 if (gdbarch_debug
>= 2)
2249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2250 return gdbarch
->bfd_vma_bit
;
2254 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2257 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2261 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2263 /* Skip verify of ieee_float, invalid_p == 0 */
2264 if (gdbarch_debug
>= 2)
2265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2266 return gdbarch
->ieee_float
;
2270 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2273 gdbarch
->ieee_float
= ieee_float
;
2277 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2279 if (gdbarch
->read_pc
== 0)
2280 internal_error (__FILE__
, __LINE__
,
2281 "gdbarch: gdbarch_read_pc invalid");
2282 if (gdbarch_debug
>= 2)
2283 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2284 return gdbarch
->read_pc (ptid
);
2288 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2289 gdbarch_read_pc_ftype read_pc
)
2291 gdbarch
->read_pc
= read_pc
;
2295 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2297 if (gdbarch
->write_pc
== 0)
2298 internal_error (__FILE__
, __LINE__
,
2299 "gdbarch: gdbarch_write_pc invalid");
2300 if (gdbarch_debug
>= 2)
2301 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2302 gdbarch
->write_pc (val
, ptid
);
2306 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2307 gdbarch_write_pc_ftype write_pc
)
2309 gdbarch
->write_pc
= write_pc
;
2313 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2315 if (gdbarch
->read_fp
== 0)
2316 internal_error (__FILE__
, __LINE__
,
2317 "gdbarch: gdbarch_read_fp invalid");
2318 if (gdbarch_debug
>= 2)
2319 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2320 return gdbarch
->read_fp ();
2324 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2325 gdbarch_read_fp_ftype read_fp
)
2327 gdbarch
->read_fp
= read_fp
;
2331 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2333 if (gdbarch
->write_fp
== 0)
2334 internal_error (__FILE__
, __LINE__
,
2335 "gdbarch: gdbarch_write_fp invalid");
2336 if (gdbarch_debug
>= 2)
2337 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2338 gdbarch
->write_fp (val
);
2342 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2343 gdbarch_write_fp_ftype write_fp
)
2345 gdbarch
->write_fp
= write_fp
;
2349 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2351 if (gdbarch
->read_sp
== 0)
2352 internal_error (__FILE__
, __LINE__
,
2353 "gdbarch: gdbarch_read_sp invalid");
2354 if (gdbarch_debug
>= 2)
2355 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2356 return gdbarch
->read_sp ();
2360 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2361 gdbarch_read_sp_ftype read_sp
)
2363 gdbarch
->read_sp
= read_sp
;
2367 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2369 if (gdbarch
->write_sp
== 0)
2370 internal_error (__FILE__
, __LINE__
,
2371 "gdbarch: gdbarch_write_sp invalid");
2372 if (gdbarch_debug
>= 2)
2373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2374 gdbarch
->write_sp (val
);
2378 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2379 gdbarch_write_sp_ftype write_sp
)
2381 gdbarch
->write_sp
= write_sp
;
2385 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2387 if (gdbarch
->virtual_frame_pointer
== 0)
2388 internal_error (__FILE__
, __LINE__
,
2389 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2390 if (gdbarch_debug
>= 2)
2391 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2392 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2396 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2397 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2399 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2403 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2405 return gdbarch
->register_read
!= 0;
2409 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2411 if (gdbarch
->register_read
== 0)
2412 internal_error (__FILE__
, __LINE__
,
2413 "gdbarch: gdbarch_register_read invalid");
2414 if (gdbarch_debug
>= 2)
2415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2416 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2420 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2421 gdbarch_register_read_ftype register_read
)
2423 gdbarch
->register_read
= register_read
;
2427 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2429 return gdbarch
->register_write
!= 0;
2433 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2435 if (gdbarch
->register_write
== 0)
2436 internal_error (__FILE__
, __LINE__
,
2437 "gdbarch: gdbarch_register_write invalid");
2438 if (gdbarch_debug
>= 2)
2439 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2440 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2444 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2445 gdbarch_register_write_ftype register_write
)
2447 gdbarch
->register_write
= register_write
;
2451 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2453 if (gdbarch
->num_regs
== -1)
2454 internal_error (__FILE__
, __LINE__
,
2455 "gdbarch: gdbarch_num_regs invalid");
2456 if (gdbarch_debug
>= 2)
2457 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2458 return gdbarch
->num_regs
;
2462 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2465 gdbarch
->num_regs
= num_regs
;
2469 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2471 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2472 if (gdbarch_debug
>= 2)
2473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2474 return gdbarch
->num_pseudo_regs
;
2478 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2479 int num_pseudo_regs
)
2481 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2485 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2487 if (gdbarch
->sp_regnum
== -1)
2488 internal_error (__FILE__
, __LINE__
,
2489 "gdbarch: gdbarch_sp_regnum invalid");
2490 if (gdbarch_debug
>= 2)
2491 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2492 return gdbarch
->sp_regnum
;
2496 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2499 gdbarch
->sp_regnum
= sp_regnum
;
2503 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2505 if (gdbarch
->fp_regnum
== -1)
2506 internal_error (__FILE__
, __LINE__
,
2507 "gdbarch: gdbarch_fp_regnum invalid");
2508 if (gdbarch_debug
>= 2)
2509 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2510 return gdbarch
->fp_regnum
;
2514 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2517 gdbarch
->fp_regnum
= fp_regnum
;
2521 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2523 if (gdbarch
->pc_regnum
== -1)
2524 internal_error (__FILE__
, __LINE__
,
2525 "gdbarch: gdbarch_pc_regnum invalid");
2526 if (gdbarch_debug
>= 2)
2527 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2528 return gdbarch
->pc_regnum
;
2532 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2535 gdbarch
->pc_regnum
= pc_regnum
;
2539 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2541 /* Skip verify of fp0_regnum, invalid_p == 0 */
2542 if (gdbarch_debug
>= 2)
2543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2544 return gdbarch
->fp0_regnum
;
2548 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2551 gdbarch
->fp0_regnum
= fp0_regnum
;
2555 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2557 /* Skip verify of npc_regnum, invalid_p == 0 */
2558 if (gdbarch_debug
>= 2)
2559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2560 return gdbarch
->npc_regnum
;
2564 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2567 gdbarch
->npc_regnum
= npc_regnum
;
2571 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2573 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2574 if (gdbarch_debug
>= 2)
2575 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2576 return gdbarch
->nnpc_regnum
;
2580 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2583 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2587 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2589 if (gdbarch
->stab_reg_to_regnum
== 0)
2590 internal_error (__FILE__
, __LINE__
,
2591 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2592 if (gdbarch_debug
>= 2)
2593 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2594 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2598 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2599 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2601 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2605 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2607 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2608 internal_error (__FILE__
, __LINE__
,
2609 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2610 if (gdbarch_debug
>= 2)
2611 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2612 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2616 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2617 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2619 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2623 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2625 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2626 internal_error (__FILE__
, __LINE__
,
2627 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2628 if (gdbarch_debug
>= 2)
2629 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2630 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2634 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2635 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2637 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2641 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2643 if (gdbarch
->sdb_reg_to_regnum
== 0)
2644 internal_error (__FILE__
, __LINE__
,
2645 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2646 if (gdbarch_debug
>= 2)
2647 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2648 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2652 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2653 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2655 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2659 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2661 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2662 internal_error (__FILE__
, __LINE__
,
2663 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2664 if (gdbarch_debug
>= 2)
2665 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2666 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2670 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2671 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2673 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2677 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2679 if (gdbarch
->register_name
== 0)
2680 internal_error (__FILE__
, __LINE__
,
2681 "gdbarch: gdbarch_register_name invalid");
2682 if (gdbarch_debug
>= 2)
2683 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2684 return gdbarch
->register_name (regnr
);
2688 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2689 gdbarch_register_name_ftype register_name
)
2691 gdbarch
->register_name
= register_name
;
2695 gdbarch_register_size (struct gdbarch
*gdbarch
)
2697 if (gdbarch
->register_size
== -1)
2698 internal_error (__FILE__
, __LINE__
,
2699 "gdbarch: gdbarch_register_size invalid");
2700 if (gdbarch_debug
>= 2)
2701 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2702 return gdbarch
->register_size
;
2706 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2709 gdbarch
->register_size
= register_size
;
2713 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2715 if (gdbarch
->register_bytes
== -1)
2716 internal_error (__FILE__
, __LINE__
,
2717 "gdbarch: gdbarch_register_bytes invalid");
2718 if (gdbarch_debug
>= 2)
2719 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2720 return gdbarch
->register_bytes
;
2724 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2727 gdbarch
->register_bytes
= register_bytes
;
2731 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2733 if (gdbarch
->register_byte
== 0)
2734 internal_error (__FILE__
, __LINE__
,
2735 "gdbarch: gdbarch_register_byte invalid");
2736 if (gdbarch_debug
>= 2)
2737 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2738 return gdbarch
->register_byte (reg_nr
);
2742 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2743 gdbarch_register_byte_ftype register_byte
)
2745 gdbarch
->register_byte
= register_byte
;
2749 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2751 if (gdbarch
->register_raw_size
== 0)
2752 internal_error (__FILE__
, __LINE__
,
2753 "gdbarch: gdbarch_register_raw_size invalid");
2754 if (gdbarch_debug
>= 2)
2755 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2756 return gdbarch
->register_raw_size (reg_nr
);
2760 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2761 gdbarch_register_raw_size_ftype register_raw_size
)
2763 gdbarch
->register_raw_size
= register_raw_size
;
2767 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2769 if (gdbarch
->max_register_raw_size
== -1)
2770 internal_error (__FILE__
, __LINE__
,
2771 "gdbarch: gdbarch_max_register_raw_size invalid");
2772 if (gdbarch_debug
>= 2)
2773 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2774 return gdbarch
->max_register_raw_size
;
2778 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2779 int max_register_raw_size
)
2781 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2785 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2787 if (gdbarch
->register_virtual_size
== 0)
2788 internal_error (__FILE__
, __LINE__
,
2789 "gdbarch: gdbarch_register_virtual_size invalid");
2790 if (gdbarch_debug
>= 2)
2791 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2792 return gdbarch
->register_virtual_size (reg_nr
);
2796 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2797 gdbarch_register_virtual_size_ftype register_virtual_size
)
2799 gdbarch
->register_virtual_size
= register_virtual_size
;
2803 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2805 if (gdbarch
->max_register_virtual_size
== -1)
2806 internal_error (__FILE__
, __LINE__
,
2807 "gdbarch: gdbarch_max_register_virtual_size invalid");
2808 if (gdbarch_debug
>= 2)
2809 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2810 return gdbarch
->max_register_virtual_size
;
2814 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2815 int max_register_virtual_size
)
2817 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2821 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2823 if (gdbarch
->register_virtual_type
== 0)
2824 internal_error (__FILE__
, __LINE__
,
2825 "gdbarch: gdbarch_register_virtual_type invalid");
2826 if (gdbarch_debug
>= 2)
2827 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2828 return gdbarch
->register_virtual_type (reg_nr
);
2832 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2833 gdbarch_register_virtual_type_ftype register_virtual_type
)
2835 gdbarch
->register_virtual_type
= register_virtual_type
;
2839 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2841 if (gdbarch
->do_registers_info
== 0)
2842 internal_error (__FILE__
, __LINE__
,
2843 "gdbarch: gdbarch_do_registers_info invalid");
2844 if (gdbarch_debug
>= 2)
2845 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2846 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2850 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2851 gdbarch_do_registers_info_ftype do_registers_info
)
2853 gdbarch
->do_registers_info
= do_registers_info
;
2857 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2859 if (gdbarch
->register_sim_regno
== 0)
2860 internal_error (__FILE__
, __LINE__
,
2861 "gdbarch: gdbarch_register_sim_regno invalid");
2862 if (gdbarch_debug
>= 2)
2863 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2864 return gdbarch
->register_sim_regno (reg_nr
);
2868 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2869 gdbarch_register_sim_regno_ftype register_sim_regno
)
2871 gdbarch
->register_sim_regno
= register_sim_regno
;
2875 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2877 return gdbarch
->register_bytes_ok
!= 0;
2881 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2883 if (gdbarch
->register_bytes_ok
== 0)
2884 internal_error (__FILE__
, __LINE__
,
2885 "gdbarch: gdbarch_register_bytes_ok invalid");
2886 if (gdbarch_debug
>= 2)
2887 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2888 return gdbarch
->register_bytes_ok (nr_bytes
);
2892 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2893 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2895 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2899 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2901 if (gdbarch
->cannot_fetch_register
== 0)
2902 internal_error (__FILE__
, __LINE__
,
2903 "gdbarch: gdbarch_cannot_fetch_register invalid");
2904 if (gdbarch_debug
>= 2)
2905 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2906 return gdbarch
->cannot_fetch_register (regnum
);
2910 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2911 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2913 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2917 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2919 if (gdbarch
->cannot_store_register
== 0)
2920 internal_error (__FILE__
, __LINE__
,
2921 "gdbarch: gdbarch_cannot_store_register invalid");
2922 if (gdbarch_debug
>= 2)
2923 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2924 return gdbarch
->cannot_store_register (regnum
);
2928 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2929 gdbarch_cannot_store_register_ftype cannot_store_register
)
2931 gdbarch
->cannot_store_register
= cannot_store_register
;
2935 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2937 if (gdbarch
->use_generic_dummy_frames
== -1)
2938 internal_error (__FILE__
, __LINE__
,
2939 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2940 if (gdbarch_debug
>= 2)
2941 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2942 return gdbarch
->use_generic_dummy_frames
;
2946 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2947 int use_generic_dummy_frames
)
2949 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2953 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2955 if (gdbarch
->call_dummy_location
== 0)
2956 internal_error (__FILE__
, __LINE__
,
2957 "gdbarch: gdbarch_call_dummy_location invalid");
2958 if (gdbarch_debug
>= 2)
2959 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2960 return gdbarch
->call_dummy_location
;
2964 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2965 int call_dummy_location
)
2967 gdbarch
->call_dummy_location
= call_dummy_location
;
2971 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2973 if (gdbarch
->call_dummy_address
== 0)
2974 internal_error (__FILE__
, __LINE__
,
2975 "gdbarch: gdbarch_call_dummy_address invalid");
2976 if (gdbarch_debug
>= 2)
2977 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2978 return gdbarch
->call_dummy_address ();
2982 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2983 gdbarch_call_dummy_address_ftype call_dummy_address
)
2985 gdbarch
->call_dummy_address
= call_dummy_address
;
2989 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2991 if (gdbarch
->call_dummy_start_offset
== -1)
2992 internal_error (__FILE__
, __LINE__
,
2993 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2994 if (gdbarch_debug
>= 2)
2995 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2996 return gdbarch
->call_dummy_start_offset
;
3000 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3001 CORE_ADDR call_dummy_start_offset
)
3003 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3007 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3009 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3010 internal_error (__FILE__
, __LINE__
,
3011 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3012 if (gdbarch_debug
>= 2)
3013 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3014 return gdbarch
->call_dummy_breakpoint_offset
;
3018 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3019 CORE_ADDR call_dummy_breakpoint_offset
)
3021 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3025 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3027 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3028 internal_error (__FILE__
, __LINE__
,
3029 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3030 if (gdbarch_debug
>= 2)
3031 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3032 return gdbarch
->call_dummy_breakpoint_offset_p
;
3036 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3037 int call_dummy_breakpoint_offset_p
)
3039 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3043 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3045 if (gdbarch
->call_dummy_length
== -1)
3046 internal_error (__FILE__
, __LINE__
,
3047 "gdbarch: gdbarch_call_dummy_length invalid");
3048 if (gdbarch_debug
>= 2)
3049 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3050 return gdbarch
->call_dummy_length
;
3054 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3055 int call_dummy_length
)
3057 gdbarch
->call_dummy_length
= call_dummy_length
;
3061 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3063 if (gdbarch
->pc_in_call_dummy
== 0)
3064 internal_error (__FILE__
, __LINE__
,
3065 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3066 if (gdbarch_debug
>= 2)
3067 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3068 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3072 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3073 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3075 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3079 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3081 if (gdbarch
->call_dummy_p
== -1)
3082 internal_error (__FILE__
, __LINE__
,
3083 "gdbarch: gdbarch_call_dummy_p invalid");
3084 if (gdbarch_debug
>= 2)
3085 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3086 return gdbarch
->call_dummy_p
;
3090 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3093 gdbarch
->call_dummy_p
= call_dummy_p
;
3097 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3099 /* Skip verify of call_dummy_words, invalid_p == 0 */
3100 if (gdbarch_debug
>= 2)
3101 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3102 return gdbarch
->call_dummy_words
;
3106 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3107 LONGEST
* call_dummy_words
)
3109 gdbarch
->call_dummy_words
= call_dummy_words
;
3113 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3115 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3116 if (gdbarch_debug
>= 2)
3117 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3118 return gdbarch
->sizeof_call_dummy_words
;
3122 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3123 int sizeof_call_dummy_words
)
3125 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3129 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3131 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3132 internal_error (__FILE__
, __LINE__
,
3133 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3134 if (gdbarch_debug
>= 2)
3135 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3136 return gdbarch
->call_dummy_stack_adjust_p
;
3140 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3141 int call_dummy_stack_adjust_p
)
3143 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3147 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3149 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3150 internal_error (__FILE__
, __LINE__
,
3151 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3152 if (gdbarch_debug
>= 2)
3153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3154 return gdbarch
->call_dummy_stack_adjust
;
3158 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3159 int call_dummy_stack_adjust
)
3161 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3165 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
)
3167 if (gdbarch
->fix_call_dummy
== 0)
3168 internal_error (__FILE__
, __LINE__
,
3169 "gdbarch: gdbarch_fix_call_dummy invalid");
3170 if (gdbarch_debug
>= 2)
3171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3172 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3176 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3177 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3179 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3183 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3185 if (gdbarch
->init_frame_pc_first
== 0)
3186 internal_error (__FILE__
, __LINE__
,
3187 "gdbarch: gdbarch_init_frame_pc_first invalid");
3188 if (gdbarch_debug
>= 2)
3189 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3190 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3194 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3195 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3197 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3201 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3203 if (gdbarch
->init_frame_pc
== 0)
3204 internal_error (__FILE__
, __LINE__
,
3205 "gdbarch: gdbarch_init_frame_pc invalid");
3206 if (gdbarch_debug
>= 2)
3207 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3208 gdbarch
->init_frame_pc (fromleaf
, prev
);
3212 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3213 gdbarch_init_frame_pc_ftype init_frame_pc
)
3215 gdbarch
->init_frame_pc
= init_frame_pc
;
3219 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3221 if (gdbarch_debug
>= 2)
3222 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3223 return gdbarch
->believe_pcc_promotion
;
3227 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3228 int believe_pcc_promotion
)
3230 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3234 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3236 if (gdbarch_debug
>= 2)
3237 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3238 return gdbarch
->believe_pcc_promotion_type
;
3242 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3243 int believe_pcc_promotion_type
)
3245 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3249 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3251 if (gdbarch
->coerce_float_to_double
== 0)
3252 internal_error (__FILE__
, __LINE__
,
3253 "gdbarch: gdbarch_coerce_float_to_double invalid");
3254 if (gdbarch_debug
>= 2)
3255 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3256 return gdbarch
->coerce_float_to_double (formal
, actual
);
3260 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3261 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3263 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3267 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
)
3269 if (gdbarch
->get_saved_register
== 0)
3270 internal_error (__FILE__
, __LINE__
,
3271 "gdbarch: gdbarch_get_saved_register invalid");
3272 if (gdbarch_debug
>= 2)
3273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3274 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3278 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3279 gdbarch_get_saved_register_ftype get_saved_register
)
3281 gdbarch
->get_saved_register
= get_saved_register
;
3285 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3287 if (gdbarch
->register_convertible
== 0)
3288 internal_error (__FILE__
, __LINE__
,
3289 "gdbarch: gdbarch_register_convertible invalid");
3290 if (gdbarch_debug
>= 2)
3291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3292 return gdbarch
->register_convertible (nr
);
3296 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3297 gdbarch_register_convertible_ftype register_convertible
)
3299 gdbarch
->register_convertible
= register_convertible
;
3303 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3305 if (gdbarch
->register_convert_to_virtual
== 0)
3306 internal_error (__FILE__
, __LINE__
,
3307 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3308 if (gdbarch_debug
>= 2)
3309 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3310 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3314 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3315 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3317 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3321 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3323 if (gdbarch
->register_convert_to_raw
== 0)
3324 internal_error (__FILE__
, __LINE__
,
3325 "gdbarch: gdbarch_register_convert_to_raw invalid");
3326 if (gdbarch_debug
>= 2)
3327 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3328 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3332 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3333 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3335 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3339 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3341 if (gdbarch
->fetch_pseudo_register
== 0)
3342 internal_error (__FILE__
, __LINE__
,
3343 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3344 if (gdbarch_debug
>= 2)
3345 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3346 gdbarch
->fetch_pseudo_register (regnum
);
3350 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3351 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3353 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3357 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3359 if (gdbarch
->store_pseudo_register
== 0)
3360 internal_error (__FILE__
, __LINE__
,
3361 "gdbarch: gdbarch_store_pseudo_register invalid");
3362 if (gdbarch_debug
>= 2)
3363 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3364 gdbarch
->store_pseudo_register (regnum
);
3368 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3369 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3371 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3375 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3377 if (gdbarch
->pointer_to_address
== 0)
3378 internal_error (__FILE__
, __LINE__
,
3379 "gdbarch: gdbarch_pointer_to_address invalid");
3380 if (gdbarch_debug
>= 2)
3381 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3382 return gdbarch
->pointer_to_address (type
, buf
);
3386 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3387 gdbarch_pointer_to_address_ftype pointer_to_address
)
3389 gdbarch
->pointer_to_address
= pointer_to_address
;
3393 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3395 if (gdbarch
->address_to_pointer
== 0)
3396 internal_error (__FILE__
, __LINE__
,
3397 "gdbarch: gdbarch_address_to_pointer invalid");
3398 if (gdbarch_debug
>= 2)
3399 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3400 gdbarch
->address_to_pointer (type
, buf
, addr
);
3404 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3405 gdbarch_address_to_pointer_ftype address_to_pointer
)
3407 gdbarch
->address_to_pointer
= address_to_pointer
;
3411 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3413 return gdbarch
->integer_to_address
!= 0;
3417 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3419 if (gdbarch
->integer_to_address
== 0)
3420 internal_error (__FILE__
, __LINE__
,
3421 "gdbarch: gdbarch_integer_to_address invalid");
3422 if (gdbarch_debug
>= 2)
3423 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3424 return gdbarch
->integer_to_address (type
, buf
);
3428 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3429 gdbarch_integer_to_address_ftype integer_to_address
)
3431 gdbarch
->integer_to_address
= integer_to_address
;
3435 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3437 if (gdbarch
->return_value_on_stack
== 0)
3438 internal_error (__FILE__
, __LINE__
,
3439 "gdbarch: gdbarch_return_value_on_stack invalid");
3440 if (gdbarch_debug
>= 2)
3441 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3442 return gdbarch
->return_value_on_stack (type
);
3446 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3447 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3449 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3453 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3455 if (gdbarch
->extract_return_value
== 0)
3456 internal_error (__FILE__
, __LINE__
,
3457 "gdbarch: gdbarch_extract_return_value invalid");
3458 if (gdbarch_debug
>= 2)
3459 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3460 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3464 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3465 gdbarch_extract_return_value_ftype extract_return_value
)
3467 gdbarch
->extract_return_value
= extract_return_value
;
3471 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3473 if (gdbarch
->push_arguments
== 0)
3474 internal_error (__FILE__
, __LINE__
,
3475 "gdbarch: gdbarch_push_arguments invalid");
3476 if (gdbarch_debug
>= 2)
3477 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3478 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3482 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3483 gdbarch_push_arguments_ftype push_arguments
)
3485 gdbarch
->push_arguments
= push_arguments
;
3489 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3491 if (gdbarch
->push_dummy_frame
== 0)
3492 internal_error (__FILE__
, __LINE__
,
3493 "gdbarch: gdbarch_push_dummy_frame invalid");
3494 if (gdbarch_debug
>= 2)
3495 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3496 gdbarch
->push_dummy_frame ();
3500 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3501 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3503 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3507 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3509 if (gdbarch
->push_return_address
== 0)
3510 internal_error (__FILE__
, __LINE__
,
3511 "gdbarch: gdbarch_push_return_address invalid");
3512 if (gdbarch_debug
>= 2)
3513 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3514 return gdbarch
->push_return_address (pc
, sp
);
3518 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3519 gdbarch_push_return_address_ftype push_return_address
)
3521 gdbarch
->push_return_address
= push_return_address
;
3525 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3527 if (gdbarch
->pop_frame
== 0)
3528 internal_error (__FILE__
, __LINE__
,
3529 "gdbarch: gdbarch_pop_frame invalid");
3530 if (gdbarch_debug
>= 2)
3531 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3532 gdbarch
->pop_frame ();
3536 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3537 gdbarch_pop_frame_ftype pop_frame
)
3539 gdbarch
->pop_frame
= pop_frame
;
3543 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3545 if (gdbarch
->store_struct_return
== 0)
3546 internal_error (__FILE__
, __LINE__
,
3547 "gdbarch: gdbarch_store_struct_return invalid");
3548 if (gdbarch_debug
>= 2)
3549 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3550 gdbarch
->store_struct_return (addr
, sp
);
3554 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3555 gdbarch_store_struct_return_ftype store_struct_return
)
3557 gdbarch
->store_struct_return
= store_struct_return
;
3561 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3563 if (gdbarch
->store_return_value
== 0)
3564 internal_error (__FILE__
, __LINE__
,
3565 "gdbarch: gdbarch_store_return_value invalid");
3566 if (gdbarch_debug
>= 2)
3567 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3568 gdbarch
->store_return_value (type
, valbuf
);
3572 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3573 gdbarch_store_return_value_ftype store_return_value
)
3575 gdbarch
->store_return_value
= store_return_value
;
3579 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3581 return gdbarch
->extract_struct_value_address
!= 0;
3585 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3587 if (gdbarch
->extract_struct_value_address
== 0)
3588 internal_error (__FILE__
, __LINE__
,
3589 "gdbarch: gdbarch_extract_struct_value_address invalid");
3590 if (gdbarch_debug
>= 2)
3591 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3592 return gdbarch
->extract_struct_value_address (regbuf
);
3596 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3597 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3599 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3603 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3605 if (gdbarch
->use_struct_convention
== 0)
3606 internal_error (__FILE__
, __LINE__
,
3607 "gdbarch: gdbarch_use_struct_convention invalid");
3608 if (gdbarch_debug
>= 2)
3609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3610 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3614 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3615 gdbarch_use_struct_convention_ftype use_struct_convention
)
3617 gdbarch
->use_struct_convention
= use_struct_convention
;
3621 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3623 if (gdbarch
->frame_init_saved_regs
== 0)
3624 internal_error (__FILE__
, __LINE__
,
3625 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3626 if (gdbarch_debug
>= 2)
3627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3628 gdbarch
->frame_init_saved_regs (frame
);
3632 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3633 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3635 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3639 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3641 if (gdbarch
->init_extra_frame_info
== 0)
3642 internal_error (__FILE__
, __LINE__
,
3643 "gdbarch: gdbarch_init_extra_frame_info invalid");
3644 if (gdbarch_debug
>= 2)
3645 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3646 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3650 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3651 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3653 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3657 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3659 if (gdbarch
->skip_prologue
== 0)
3660 internal_error (__FILE__
, __LINE__
,
3661 "gdbarch: gdbarch_skip_prologue invalid");
3662 if (gdbarch_debug
>= 2)
3663 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3664 return gdbarch
->skip_prologue (ip
);
3668 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3669 gdbarch_skip_prologue_ftype skip_prologue
)
3671 gdbarch
->skip_prologue
= skip_prologue
;
3675 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3677 if (gdbarch
->prologue_frameless_p
== 0)
3678 internal_error (__FILE__
, __LINE__
,
3679 "gdbarch: gdbarch_prologue_frameless_p invalid");
3680 if (gdbarch_debug
>= 2)
3681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3682 return gdbarch
->prologue_frameless_p (ip
);
3686 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3687 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3689 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3693 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3695 if (gdbarch
->inner_than
== 0)
3696 internal_error (__FILE__
, __LINE__
,
3697 "gdbarch: gdbarch_inner_than invalid");
3698 if (gdbarch_debug
>= 2)
3699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3700 return gdbarch
->inner_than (lhs
, rhs
);
3704 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3705 gdbarch_inner_than_ftype inner_than
)
3707 gdbarch
->inner_than
= inner_than
;
3711 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3713 if (gdbarch
->breakpoint_from_pc
== 0)
3714 internal_error (__FILE__
, __LINE__
,
3715 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3716 if (gdbarch_debug
>= 2)
3717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3718 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3722 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3723 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3725 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3729 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3731 if (gdbarch
->memory_insert_breakpoint
== 0)
3732 internal_error (__FILE__
, __LINE__
,
3733 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3734 if (gdbarch_debug
>= 2)
3735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3736 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3740 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3741 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3743 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3747 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3749 if (gdbarch
->memory_remove_breakpoint
== 0)
3750 internal_error (__FILE__
, __LINE__
,
3751 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3752 if (gdbarch_debug
>= 2)
3753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3754 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3758 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3759 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3761 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3765 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3767 if (gdbarch
->decr_pc_after_break
== -1)
3768 internal_error (__FILE__
, __LINE__
,
3769 "gdbarch: gdbarch_decr_pc_after_break invalid");
3770 if (gdbarch_debug
>= 2)
3771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3772 return gdbarch
->decr_pc_after_break
;
3776 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3777 CORE_ADDR decr_pc_after_break
)
3779 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3783 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3785 if (gdbarch
->prepare_to_proceed
== 0)
3786 internal_error (__FILE__
, __LINE__
,
3787 "gdbarch: gdbarch_prepare_to_proceed invalid");
3788 if (gdbarch_debug
>= 2)
3789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3790 return gdbarch
->prepare_to_proceed (select_it
);
3794 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3795 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3797 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3801 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3803 if (gdbarch
->function_start_offset
== -1)
3804 internal_error (__FILE__
, __LINE__
,
3805 "gdbarch: gdbarch_function_start_offset invalid");
3806 if (gdbarch_debug
>= 2)
3807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3808 return gdbarch
->function_start_offset
;
3812 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3813 CORE_ADDR function_start_offset
)
3815 gdbarch
->function_start_offset
= function_start_offset
;
3819 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3821 if (gdbarch
->remote_translate_xfer_address
== 0)
3822 internal_error (__FILE__
, __LINE__
,
3823 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3824 if (gdbarch_debug
>= 2)
3825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3826 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3830 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3831 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3833 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3837 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3839 if (gdbarch
->frame_args_skip
== -1)
3840 internal_error (__FILE__
, __LINE__
,
3841 "gdbarch: gdbarch_frame_args_skip invalid");
3842 if (gdbarch_debug
>= 2)
3843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3844 return gdbarch
->frame_args_skip
;
3848 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3849 CORE_ADDR frame_args_skip
)
3851 gdbarch
->frame_args_skip
= frame_args_skip
;
3855 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3857 if (gdbarch
->frameless_function_invocation
== 0)
3858 internal_error (__FILE__
, __LINE__
,
3859 "gdbarch: gdbarch_frameless_function_invocation invalid");
3860 if (gdbarch_debug
>= 2)
3861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3862 return gdbarch
->frameless_function_invocation (fi
);
3866 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3867 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3869 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3873 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3875 if (gdbarch
->frame_chain
== 0)
3876 internal_error (__FILE__
, __LINE__
,
3877 "gdbarch: gdbarch_frame_chain invalid");
3878 if (gdbarch_debug
>= 2)
3879 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3880 return gdbarch
->frame_chain (frame
);
3884 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3885 gdbarch_frame_chain_ftype frame_chain
)
3887 gdbarch
->frame_chain
= frame_chain
;
3891 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3893 if (gdbarch
->frame_chain_valid
== 0)
3894 internal_error (__FILE__
, __LINE__
,
3895 "gdbarch: gdbarch_frame_chain_valid invalid");
3896 if (gdbarch_debug
>= 2)
3897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3898 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3902 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3903 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3905 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3909 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3911 if (gdbarch
->frame_saved_pc
== 0)
3912 internal_error (__FILE__
, __LINE__
,
3913 "gdbarch: gdbarch_frame_saved_pc invalid");
3914 if (gdbarch_debug
>= 2)
3915 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3916 return gdbarch
->frame_saved_pc (fi
);
3920 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3921 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3923 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3927 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3929 if (gdbarch
->frame_args_address
== 0)
3930 internal_error (__FILE__
, __LINE__
,
3931 "gdbarch: gdbarch_frame_args_address invalid");
3932 if (gdbarch_debug
>= 2)
3933 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3934 return gdbarch
->frame_args_address (fi
);
3938 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3939 gdbarch_frame_args_address_ftype frame_args_address
)
3941 gdbarch
->frame_args_address
= frame_args_address
;
3945 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3947 if (gdbarch
->frame_locals_address
== 0)
3948 internal_error (__FILE__
, __LINE__
,
3949 "gdbarch: gdbarch_frame_locals_address invalid");
3950 if (gdbarch_debug
>= 2)
3951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3952 return gdbarch
->frame_locals_address (fi
);
3956 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3957 gdbarch_frame_locals_address_ftype frame_locals_address
)
3959 gdbarch
->frame_locals_address
= frame_locals_address
;
3963 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3965 if (gdbarch
->saved_pc_after_call
== 0)
3966 internal_error (__FILE__
, __LINE__
,
3967 "gdbarch: gdbarch_saved_pc_after_call invalid");
3968 if (gdbarch_debug
>= 2)
3969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3970 return gdbarch
->saved_pc_after_call (frame
);
3974 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3975 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3977 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3981 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3983 if (gdbarch
->frame_num_args
== 0)
3984 internal_error (__FILE__
, __LINE__
,
3985 "gdbarch: gdbarch_frame_num_args invalid");
3986 if (gdbarch_debug
>= 2)
3987 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3988 return gdbarch
->frame_num_args (frame
);
3992 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3993 gdbarch_frame_num_args_ftype frame_num_args
)
3995 gdbarch
->frame_num_args
= frame_num_args
;
3999 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4001 return gdbarch
->stack_align
!= 0;
4005 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4007 if (gdbarch
->stack_align
== 0)
4008 internal_error (__FILE__
, __LINE__
,
4009 "gdbarch: gdbarch_stack_align invalid");
4010 if (gdbarch_debug
>= 2)
4011 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4012 return gdbarch
->stack_align (sp
);
4016 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4017 gdbarch_stack_align_ftype stack_align
)
4019 gdbarch
->stack_align
= stack_align
;
4023 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4025 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4026 if (gdbarch_debug
>= 2)
4027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4028 return gdbarch
->extra_stack_alignment_needed
;
4032 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4033 int extra_stack_alignment_needed
)
4035 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4039 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4041 return gdbarch
->reg_struct_has_addr
!= 0;
4045 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4047 if (gdbarch
->reg_struct_has_addr
== 0)
4048 internal_error (__FILE__
, __LINE__
,
4049 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4050 if (gdbarch_debug
>= 2)
4051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4052 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4056 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4057 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4059 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4063 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4065 return gdbarch
->save_dummy_frame_tos
!= 0;
4069 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4071 if (gdbarch
->save_dummy_frame_tos
== 0)
4072 internal_error (__FILE__
, __LINE__
,
4073 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4074 if (gdbarch_debug
>= 2)
4075 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4076 gdbarch
->save_dummy_frame_tos (sp
);
4080 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4081 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4083 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4087 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4089 if (gdbarch_debug
>= 2)
4090 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4091 return gdbarch
->parm_boundary
;
4095 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4098 gdbarch
->parm_boundary
= parm_boundary
;
4101 const struct floatformat
*
4102 gdbarch_float_format (struct gdbarch
*gdbarch
)
4104 if (gdbarch_debug
>= 2)
4105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4106 return gdbarch
->float_format
;
4110 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4111 const struct floatformat
* float_format
)
4113 gdbarch
->float_format
= float_format
;
4116 const struct floatformat
*
4117 gdbarch_double_format (struct gdbarch
*gdbarch
)
4119 if (gdbarch_debug
>= 2)
4120 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4121 return gdbarch
->double_format
;
4125 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4126 const struct floatformat
* double_format
)
4128 gdbarch
->double_format
= double_format
;
4131 const struct floatformat
*
4132 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4134 if (gdbarch_debug
>= 2)
4135 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4136 return gdbarch
->long_double_format
;
4140 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4141 const struct floatformat
* long_double_format
)
4143 gdbarch
->long_double_format
= long_double_format
;
4147 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4149 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4150 internal_error (__FILE__
, __LINE__
,
4151 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4152 if (gdbarch_debug
>= 2)
4153 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4154 return gdbarch
->convert_from_func_ptr_addr (addr
);
4158 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4159 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4161 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4165 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4167 if (gdbarch
->addr_bits_remove
== 0)
4168 internal_error (__FILE__
, __LINE__
,
4169 "gdbarch: gdbarch_addr_bits_remove invalid");
4170 if (gdbarch_debug
>= 2)
4171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4172 return gdbarch
->addr_bits_remove (addr
);
4176 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4177 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4179 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4183 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4185 return gdbarch
->software_single_step
!= 0;
4189 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4191 if (gdbarch
->software_single_step
== 0)
4192 internal_error (__FILE__
, __LINE__
,
4193 "gdbarch: gdbarch_software_single_step invalid");
4194 if (gdbarch_debug
>= 2)
4195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4196 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4200 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4201 gdbarch_software_single_step_ftype software_single_step
)
4203 gdbarch
->software_single_step
= software_single_step
;
4207 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4209 if (gdbarch
->print_insn
== 0)
4210 internal_error (__FILE__
, __LINE__
,
4211 "gdbarch: gdbarch_print_insn invalid");
4212 if (gdbarch_debug
>= 2)
4213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4214 return gdbarch
->print_insn (vma
, info
);
4218 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4219 gdbarch_print_insn_ftype print_insn
)
4221 gdbarch
->print_insn
= print_insn
;
4225 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4227 if (gdbarch
->skip_trampoline_code
== 0)
4228 internal_error (__FILE__
, __LINE__
,
4229 "gdbarch: gdbarch_skip_trampoline_code invalid");
4230 if (gdbarch_debug
>= 2)
4231 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4232 return gdbarch
->skip_trampoline_code (pc
);
4236 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4237 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4239 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4243 /* Keep a registry of per-architecture data-pointers required by GDB
4249 gdbarch_data_init_ftype
*init
;
4250 gdbarch_data_free_ftype
*free
;
4253 struct gdbarch_data_registration
4255 struct gdbarch_data
*data
;
4256 struct gdbarch_data_registration
*next
;
4259 struct gdbarch_data_registry
4262 struct gdbarch_data_registration
*registrations
;
4265 struct gdbarch_data_registry gdbarch_data_registry
=
4270 struct gdbarch_data
*
4271 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4272 gdbarch_data_free_ftype
*free
)
4274 struct gdbarch_data_registration
**curr
;
4275 for (curr
= &gdbarch_data_registry
.registrations
;
4277 curr
= &(*curr
)->next
);
4278 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4279 (*curr
)->next
= NULL
;
4280 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4281 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4282 (*curr
)->data
->init
= init
;
4283 (*curr
)->data
->free
= free
;
4284 return (*curr
)->data
;
4288 /* Walk through all the registered users initializing each in turn. */
4291 init_gdbarch_data (struct gdbarch
*gdbarch
)
4293 struct gdbarch_data_registration
*rego
;
4294 for (rego
= gdbarch_data_registry
.registrations
;
4298 struct gdbarch_data
*data
= rego
->data
;
4299 gdb_assert (data
->index
< gdbarch
->nr_data
);
4300 if (data
->init
!= NULL
)
4302 void *pointer
= data
->init (gdbarch
);
4303 set_gdbarch_data (gdbarch
, data
, pointer
);
4308 /* Create/delete the gdbarch data vector. */
4311 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4313 gdb_assert (gdbarch
->data
== NULL
);
4314 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4315 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4319 free_gdbarch_data (struct gdbarch
*gdbarch
)
4321 struct gdbarch_data_registration
*rego
;
4322 gdb_assert (gdbarch
->data
!= NULL
);
4323 for (rego
= gdbarch_data_registry
.registrations
;
4327 struct gdbarch_data
*data
= rego
->data
;
4328 gdb_assert (data
->index
< gdbarch
->nr_data
);
4329 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4331 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4332 gdbarch
->data
[data
->index
] = NULL
;
4335 xfree (gdbarch
->data
);
4336 gdbarch
->data
= NULL
;
4340 /* Initialize the current value of thee specified per-architecture
4344 set_gdbarch_data (struct gdbarch
*gdbarch
,
4345 struct gdbarch_data
*data
,
4348 gdb_assert (data
->index
< gdbarch
->nr_data
);
4349 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4350 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4351 gdbarch
->data
[data
->index
] = pointer
;
4354 /* Return the current value of the specified per-architecture
4358 gdbarch_data (struct gdbarch_data
*data
)
4360 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4361 return current_gdbarch
->data
[data
->index
];
4366 /* Keep a registry of swapped data required by GDB modules. */
4371 struct gdbarch_swap_registration
*source
;
4372 struct gdbarch_swap
*next
;
4375 struct gdbarch_swap_registration
4378 unsigned long sizeof_data
;
4379 gdbarch_swap_ftype
*init
;
4380 struct gdbarch_swap_registration
*next
;
4383 struct gdbarch_swap_registry
4386 struct gdbarch_swap_registration
*registrations
;
4389 struct gdbarch_swap_registry gdbarch_swap_registry
=
4395 register_gdbarch_swap (void *data
,
4396 unsigned long sizeof_data
,
4397 gdbarch_swap_ftype
*init
)
4399 struct gdbarch_swap_registration
**rego
;
4400 for (rego
= &gdbarch_swap_registry
.registrations
;
4402 rego
= &(*rego
)->next
);
4403 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4404 (*rego
)->next
= NULL
;
4405 (*rego
)->init
= init
;
4406 (*rego
)->data
= data
;
4407 (*rego
)->sizeof_data
= sizeof_data
;
4412 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4414 struct gdbarch_swap_registration
*rego
;
4415 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4416 for (rego
= gdbarch_swap_registry
.registrations
;
4420 if (rego
->data
!= NULL
)
4422 (*curr
) = XMALLOC (struct gdbarch_swap
);
4423 (*curr
)->source
= rego
;
4424 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4425 (*curr
)->next
= NULL
;
4426 memset (rego
->data
, 0, rego
->sizeof_data
);
4427 curr
= &(*curr
)->next
;
4429 if (rego
->init
!= NULL
)
4435 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4437 struct gdbarch_swap
*curr
;
4438 for (curr
= gdbarch
->swap
;
4441 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4445 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4447 struct gdbarch_swap
*curr
;
4448 for (curr
= gdbarch
->swap
;
4451 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4455 /* Keep a registry of the architectures known by GDB. */
4457 struct gdbarch_registration
4459 enum bfd_architecture bfd_architecture
;
4460 gdbarch_init_ftype
*init
;
4461 gdbarch_dump_tdep_ftype
*dump_tdep
;
4462 struct gdbarch_list
*arches
;
4463 struct gdbarch_registration
*next
;
4466 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4469 append_name (const char ***buf
, int *nr
, const char *name
)
4471 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4477 gdbarch_printable_names (void)
4481 /* Accumulate a list of names based on the registed list of
4483 enum bfd_architecture a
;
4485 const char **arches
= NULL
;
4486 struct gdbarch_registration
*rego
;
4487 for (rego
= gdbarch_registry
;
4491 const struct bfd_arch_info
*ap
;
4492 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4494 internal_error (__FILE__
, __LINE__
,
4495 "gdbarch_architecture_names: multi-arch unknown");
4498 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4503 append_name (&arches
, &nr_arches
, NULL
);
4507 /* Just return all the architectures that BFD knows. Assume that
4508 the legacy architecture framework supports them. */
4509 return bfd_arch_list ();
4514 gdbarch_register (enum bfd_architecture bfd_architecture
,
4515 gdbarch_init_ftype
*init
,
4516 gdbarch_dump_tdep_ftype
*dump_tdep
)
4518 struct gdbarch_registration
**curr
;
4519 const struct bfd_arch_info
*bfd_arch_info
;
4520 /* Check that BFD recognizes this architecture */
4521 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4522 if (bfd_arch_info
== NULL
)
4524 internal_error (__FILE__
, __LINE__
,
4525 "gdbarch: Attempt to register unknown architecture (%d)",
4528 /* Check that we haven't seen this architecture before */
4529 for (curr
= &gdbarch_registry
;
4531 curr
= &(*curr
)->next
)
4533 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4534 internal_error (__FILE__
, __LINE__
,
4535 "gdbarch: Duplicate registraration of architecture (%s)",
4536 bfd_arch_info
->printable_name
);
4540 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4541 bfd_arch_info
->printable_name
,
4544 (*curr
) = XMALLOC (struct gdbarch_registration
);
4545 (*curr
)->bfd_architecture
= bfd_architecture
;
4546 (*curr
)->init
= init
;
4547 (*curr
)->dump_tdep
= dump_tdep
;
4548 (*curr
)->arches
= NULL
;
4549 (*curr
)->next
= NULL
;
4550 /* When non- multi-arch, install whatever target dump routine we've
4551 been provided - hopefully that routine has been written correctly
4552 and works regardless of multi-arch. */
4553 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4554 && startup_gdbarch
.dump_tdep
== NULL
)
4555 startup_gdbarch
.dump_tdep
= dump_tdep
;
4559 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4560 gdbarch_init_ftype
*init
)
4562 gdbarch_register (bfd_architecture
, init
, NULL
);
4566 /* Look for an architecture using gdbarch_info. Base search on only
4567 BFD_ARCH_INFO and BYTE_ORDER. */
4569 struct gdbarch_list
*
4570 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4571 const struct gdbarch_info
*info
)
4573 for (; arches
!= NULL
; arches
= arches
->next
)
4575 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4577 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4585 /* Update the current architecture. Return ZERO if the update request
4589 gdbarch_update_p (struct gdbarch_info info
)
4591 struct gdbarch
*new_gdbarch
;
4592 struct gdbarch_list
**list
;
4593 struct gdbarch_registration
*rego
;
4595 /* Fill in missing parts of the INFO struct using a number of
4596 sources: ``set ...''; INFOabfd supplied; existing target. */
4598 /* ``(gdb) set architecture ...'' */
4599 if (info
.bfd_arch_info
== NULL
4600 && !TARGET_ARCHITECTURE_AUTO
)
4601 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4602 if (info
.bfd_arch_info
== NULL
4603 && info
.abfd
!= NULL
4604 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4605 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4606 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4607 if (info
.bfd_arch_info
== NULL
)
4608 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4610 /* ``(gdb) set byte-order ...'' */
4611 if (info
.byte_order
== 0
4612 && !TARGET_BYTE_ORDER_AUTO
)
4613 info
.byte_order
= TARGET_BYTE_ORDER
;
4614 /* From the INFO struct. */
4615 if (info
.byte_order
== 0
4616 && info
.abfd
!= NULL
)
4617 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4618 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4620 /* From the current target. */
4621 if (info
.byte_order
== 0)
4622 info
.byte_order
= TARGET_BYTE_ORDER
;
4624 /* Must have found some sort of architecture. */
4625 gdb_assert (info
.bfd_arch_info
!= NULL
);
4629 fprintf_unfiltered (gdb_stdlog
,
4630 "gdbarch_update: info.bfd_arch_info %s\n",
4631 (info
.bfd_arch_info
!= NULL
4632 ? info
.bfd_arch_info
->printable_name
4634 fprintf_unfiltered (gdb_stdlog
,
4635 "gdbarch_update: info.byte_order %d (%s)\n",
4637 (info
.byte_order
== BIG_ENDIAN
? "big"
4638 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4640 fprintf_unfiltered (gdb_stdlog
,
4641 "gdbarch_update: info.abfd 0x%lx\n",
4643 fprintf_unfiltered (gdb_stdlog
,
4644 "gdbarch_update: info.tdep_info 0x%lx\n",
4645 (long) info
.tdep_info
);
4648 /* Find the target that knows about this architecture. */
4649 for (rego
= gdbarch_registry
;
4652 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4657 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4661 /* Ask the target for a replacement architecture. */
4662 new_gdbarch
= rego
->init (info
, rego
->arches
);
4664 /* Did the target like it? No. Reject the change. */
4665 if (new_gdbarch
== NULL
)
4668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4672 /* Did the architecture change? No. Do nothing. */
4673 if (current_gdbarch
== new_gdbarch
)
4676 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4678 new_gdbarch
->bfd_arch_info
->printable_name
);
4682 /* Swap all data belonging to the old target out */
4683 swapout_gdbarch_swap (current_gdbarch
);
4685 /* Is this a pre-existing architecture? Yes. Swap it in. */
4686 for (list
= ®o
->arches
;
4688 list
= &(*list
)->next
)
4690 if ((*list
)->gdbarch
== new_gdbarch
)
4693 fprintf_unfiltered (gdb_stdlog
,
4694 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4696 new_gdbarch
->bfd_arch_info
->printable_name
);
4697 current_gdbarch
= new_gdbarch
;
4698 swapin_gdbarch_swap (new_gdbarch
);
4699 architecture_changed_event ();
4704 /* Append this new architecture to this targets list. */
4705 (*list
) = XMALLOC (struct gdbarch_list
);
4706 (*list
)->next
= NULL
;
4707 (*list
)->gdbarch
= new_gdbarch
;
4709 /* Switch to this new architecture. Dump it out. */
4710 current_gdbarch
= new_gdbarch
;
4713 fprintf_unfiltered (gdb_stdlog
,
4714 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4716 new_gdbarch
->bfd_arch_info
->printable_name
);
4719 /* Check that the newly installed architecture is valid. Plug in
4720 any post init values. */
4721 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4722 verify_gdbarch (new_gdbarch
);
4724 /* Initialize the per-architecture memory (swap) areas.
4725 CURRENT_GDBARCH must be update before these modules are
4727 init_gdbarch_swap (new_gdbarch
);
4729 /* Initialize the per-architecture data-pointer of all parties that
4730 registered an interest in this architecture. CURRENT_GDBARCH
4731 must be updated before these modules are called. */
4732 init_gdbarch_data (new_gdbarch
);
4733 architecture_changed_event ();
4736 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4744 /* Pointer to the target-dependent disassembly function. */
4745 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4746 disassemble_info tm_print_insn_info
;
4749 extern void _initialize_gdbarch (void);
4752 _initialize_gdbarch (void)
4754 struct cmd_list_element
*c
;
4756 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4757 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4758 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4759 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4760 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4762 add_show_from_set (add_set_cmd ("arch",
4765 (char *)&gdbarch_debug
,
4766 "Set architecture debugging.\n\
4767 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4769 c
= add_set_cmd ("archdebug",
4772 (char *)&gdbarch_debug
,
4773 "Set architecture debugging.\n\
4774 When non-zero, architecture debugging is enabled.", &setlist
);
4776 deprecate_cmd (c
, "set debug arch");
4777 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");