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 */
58 #include "value.h" /* For old tm.h/nm.h macros. */
62 #include "floatformat.h"
64 #include "gdb_assert.h"
65 #include "gdb-events.h"
67 /* Static function declarations */
69 static void verify_gdbarch (struct gdbarch
*gdbarch
);
70 static void alloc_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_data (struct gdbarch
*);
72 static void free_gdbarch_data (struct gdbarch
*);
73 static void init_gdbarch_swap (struct gdbarch
*);
74 static void swapout_gdbarch_swap (struct gdbarch
*);
75 static void swapin_gdbarch_swap (struct gdbarch
*);
77 /* Convenience macro for allocting typesafe memory. */
80 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
84 /* Non-zero if we want to trace architecture code. */
87 #define GDBARCH_DEBUG 0
89 int gdbarch_debug
= GDBARCH_DEBUG
;
92 /* Maintain the struct gdbarch object */
96 /* basic architectural information */
97 const struct bfd_arch_info
* bfd_arch_info
;
100 /* target specific vector. */
101 struct gdbarch_tdep
*tdep
;
102 gdbarch_dump_tdep_ftype
*dump_tdep
;
104 /* per-architecture data-pointers */
108 /* per-architecture swap-regions */
109 struct gdbarch_swap
*swap
;
111 /* Multi-arch values.
113 When extending this structure you must:
117 Declare set/get functions and define the corresponding
120 gdbarch_alloc(): If zero/NULL is not a suitable default,
121 initialize the new field.
123 verify_gdbarch(): Confirm that the target updated the field
126 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
129 ``startup_gdbarch()'': Append an initial value to the static
130 variable (base values on the host's c-type system).
132 get_gdbarch(): Implement the set/get functions (probably using
133 the macro's as shortcuts).
148 gdbarch_read_pc_ftype
*read_pc
;
149 gdbarch_write_pc_ftype
*write_pc
;
150 gdbarch_read_fp_ftype
*read_fp
;
151 gdbarch_write_fp_ftype
*write_fp
;
152 gdbarch_read_sp_ftype
*read_sp
;
153 gdbarch_write_sp_ftype
*write_sp
;
154 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
155 gdbarch_register_read_ftype
*register_read
;
156 gdbarch_register_write_ftype
*register_write
;
165 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
166 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
167 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
168 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
169 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
170 gdbarch_register_name_ftype
*register_name
;
173 gdbarch_register_byte_ftype
*register_byte
;
174 gdbarch_register_raw_size_ftype
*register_raw_size
;
175 int max_register_raw_size
;
176 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
177 int max_register_virtual_size
;
178 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
179 gdbarch_do_registers_info_ftype
*do_registers_info
;
180 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
181 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
182 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
183 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
184 int use_generic_dummy_frames
;
185 int call_dummy_location
;
186 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
187 CORE_ADDR call_dummy_start_offset
;
188 CORE_ADDR call_dummy_breakpoint_offset
;
189 int call_dummy_breakpoint_offset_p
;
190 int call_dummy_length
;
191 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
193 LONGEST
* call_dummy_words
;
194 int sizeof_call_dummy_words
;
195 int call_dummy_stack_adjust_p
;
196 int call_dummy_stack_adjust
;
197 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
198 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
199 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
200 int believe_pcc_promotion
;
201 int believe_pcc_promotion_type
;
202 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
203 gdbarch_get_saved_register_ftype
*get_saved_register
;
204 gdbarch_register_convertible_ftype
*register_convertible
;
205 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
206 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
207 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
208 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
209 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
210 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
211 gdbarch_integer_to_address_ftype
*integer_to_address
;
212 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
213 gdbarch_extract_return_value_ftype
*extract_return_value
;
214 gdbarch_push_arguments_ftype
*push_arguments
;
215 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
216 gdbarch_push_return_address_ftype
*push_return_address
;
217 gdbarch_pop_frame_ftype
*pop_frame
;
218 gdbarch_store_struct_return_ftype
*store_struct_return
;
219 gdbarch_store_return_value_ftype
*store_return_value
;
220 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
221 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
222 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
223 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
224 gdbarch_skip_prologue_ftype
*skip_prologue
;
225 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
226 gdbarch_inner_than_ftype
*inner_than
;
227 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
228 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
229 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
230 CORE_ADDR decr_pc_after_break
;
231 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
232 CORE_ADDR function_start_offset
;
233 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
234 CORE_ADDR frame_args_skip
;
235 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
236 gdbarch_frame_chain_ftype
*frame_chain
;
237 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
238 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
239 gdbarch_frame_args_address_ftype
*frame_args_address
;
240 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
241 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
242 gdbarch_frame_num_args_ftype
*frame_num_args
;
243 gdbarch_stack_align_ftype
*stack_align
;
244 int extra_stack_alignment_needed
;
245 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
246 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
248 const struct floatformat
* float_format
;
249 const struct floatformat
* double_format
;
250 const struct floatformat
* long_double_format
;
251 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
252 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
253 gdbarch_software_single_step_ftype
*software_single_step
;
254 gdbarch_print_insn_ftype
*print_insn
;
255 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
256 gdbarch_in_solib_call_trampoline_ftype
*in_solib_call_trampoline
;
260 /* The default architecture uses host values (for want of a better
263 extern const struct bfd_arch_info bfd_default_arch_struct
;
265 struct gdbarch startup_gdbarch
=
267 /* basic architecture information */
268 &bfd_default_arch_struct
,
270 /* target specific vector and its dump routine */
272 /*per-architecture data-pointers and swap regions */
274 /* Multi-arch values */
278 8 * sizeof (LONGEST
),
281 8 * sizeof (long double),
341 generic_get_saved_register
,
395 /* startup_gdbarch() */
398 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
400 /* Do any initialization needed for a non-multiarch configuration
401 after the _initialize_MODULE functions have been run. */
403 initialize_non_multiarch ()
405 alloc_gdbarch_data (&startup_gdbarch
);
406 init_gdbarch_data (&startup_gdbarch
);
410 /* Create a new ``struct gdbarch'' based on information provided by
411 ``struct gdbarch_info''. */
414 gdbarch_alloc (const struct gdbarch_info
*info
,
415 struct gdbarch_tdep
*tdep
)
417 /* NOTE: The new architecture variable is named ``current_gdbarch''
418 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
419 the current local architecture and not the previous global
420 architecture. This ensures that the new architectures initial
421 values are not influenced by the previous architecture. Once
422 everything is parameterised with gdbarch, this will go away. */
423 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
424 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
426 alloc_gdbarch_data (current_gdbarch
);
428 current_gdbarch
->tdep
= tdep
;
430 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
431 current_gdbarch
->byte_order
= info
->byte_order
;
433 /* Force the explicit initialization of these. */
434 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
435 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
436 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
437 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
438 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
439 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
440 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
441 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
442 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
443 current_gdbarch
->read_pc
= generic_target_read_pc
;
444 current_gdbarch
->write_pc
= generic_target_write_pc
;
445 current_gdbarch
->read_fp
= generic_target_read_fp
;
446 current_gdbarch
->write_fp
= generic_target_write_fp
;
447 current_gdbarch
->read_sp
= generic_target_read_sp
;
448 current_gdbarch
->write_sp
= generic_target_write_sp
;
449 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
450 current_gdbarch
->num_regs
= -1;
451 current_gdbarch
->sp_regnum
= -1;
452 current_gdbarch
->fp_regnum
= -1;
453 current_gdbarch
->pc_regnum
= -1;
454 current_gdbarch
->fp0_regnum
= -1;
455 current_gdbarch
->npc_regnum
= -1;
456 current_gdbarch
->nnpc_regnum
= -1;
457 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
458 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
459 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
460 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
461 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
462 current_gdbarch
->register_name
= legacy_register_name
;
463 current_gdbarch
->register_size
= -1;
464 current_gdbarch
->register_bytes
= -1;
465 current_gdbarch
->max_register_raw_size
= -1;
466 current_gdbarch
->max_register_virtual_size
= -1;
467 current_gdbarch
->do_registers_info
= do_registers_info
;
468 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
469 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
470 current_gdbarch
->cannot_store_register
= cannot_register_not
;
471 current_gdbarch
->use_generic_dummy_frames
= -1;
472 current_gdbarch
->call_dummy_start_offset
= -1;
473 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
474 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
475 current_gdbarch
->call_dummy_length
= -1;
476 current_gdbarch
->call_dummy_p
= -1;
477 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
478 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
479 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
480 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
481 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
482 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
483 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
484 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
485 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
486 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
487 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
488 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
489 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
490 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
491 current_gdbarch
->decr_pc_after_break
= -1;
492 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
493 current_gdbarch
->function_start_offset
= -1;
494 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
495 current_gdbarch
->frame_args_skip
= -1;
496 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
497 current_gdbarch
->extra_stack_alignment_needed
= 1;
498 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
499 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
500 current_gdbarch
->print_insn
= legacy_print_insn
;
501 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
502 current_gdbarch
->in_solib_call_trampoline
= generic_in_solib_call_trampoline
;
503 /* gdbarch_alloc() */
505 return current_gdbarch
;
509 /* Free a gdbarch struct. This should never happen in normal
510 operation --- once you've created a gdbarch, you keep it around.
511 However, if an architecture's init function encounters an error
512 building the structure, it may need to clean up a partially
513 constructed gdbarch. */
516 gdbarch_free (struct gdbarch
*arch
)
518 gdb_assert (arch
!= NULL
);
519 free_gdbarch_data (arch
);
524 /* Ensure that all values in a GDBARCH are reasonable. */
527 verify_gdbarch (struct gdbarch
*gdbarch
)
529 /* Only perform sanity checks on a multi-arch target. */
533 if (gdbarch
->byte_order
== 0)
534 internal_error (__FILE__
, __LINE__
,
535 "verify_gdbarch: byte-order unset");
536 if (gdbarch
->bfd_arch_info
== NULL
)
537 internal_error (__FILE__
, __LINE__
,
538 "verify_gdbarch: bfd_arch_info unset");
539 /* Check those that need to be defined for the given multi-arch level. */
540 /* Skip verify of short_bit, invalid_p == 0 */
541 /* Skip verify of int_bit, invalid_p == 0 */
542 /* Skip verify of long_bit, invalid_p == 0 */
543 /* Skip verify of long_long_bit, invalid_p == 0 */
544 /* Skip verify of float_bit, invalid_p == 0 */
545 /* Skip verify of double_bit, invalid_p == 0 */
546 /* Skip verify of long_double_bit, invalid_p == 0 */
547 /* Skip verify of ptr_bit, invalid_p == 0 */
548 if (gdbarch
->addr_bit
== 0)
549 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
550 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
551 /* Skip verify of ieee_float, invalid_p == 0 */
552 /* Skip verify of read_pc, invalid_p == 0 */
553 /* Skip verify of write_pc, invalid_p == 0 */
554 /* Skip verify of read_fp, invalid_p == 0 */
555 /* Skip verify of write_fp, invalid_p == 0 */
556 /* Skip verify of read_sp, invalid_p == 0 */
557 /* Skip verify of write_sp, invalid_p == 0 */
558 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
559 /* Skip verify of register_read, has predicate */
560 /* Skip verify of register_write, has predicate */
561 if ((GDB_MULTI_ARCH
>= 2)
562 && (gdbarch
->num_regs
== -1))
563 internal_error (__FILE__
, __LINE__
,
564 "gdbarch: verify_gdbarch: num_regs invalid");
565 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
566 if ((GDB_MULTI_ARCH
>= 2)
567 && (gdbarch
->sp_regnum
== -1))
568 internal_error (__FILE__
, __LINE__
,
569 "gdbarch: verify_gdbarch: sp_regnum invalid");
570 if ((GDB_MULTI_ARCH
>= 2)
571 && (gdbarch
->fp_regnum
== -1))
572 internal_error (__FILE__
, __LINE__
,
573 "gdbarch: verify_gdbarch: fp_regnum invalid");
574 if ((GDB_MULTI_ARCH
>= 2)
575 && (gdbarch
->pc_regnum
== -1))
576 internal_error (__FILE__
, __LINE__
,
577 "gdbarch: verify_gdbarch: pc_regnum invalid");
578 /* Skip verify of fp0_regnum, invalid_p == 0 */
579 /* Skip verify of npc_regnum, invalid_p == 0 */
580 /* Skip verify of nnpc_regnum, invalid_p == 0 */
581 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
582 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
583 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
584 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
585 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
586 /* Skip verify of register_name, invalid_p == 0 */
587 if ((GDB_MULTI_ARCH
>= 2)
588 && (gdbarch
->register_size
== -1))
589 internal_error (__FILE__
, __LINE__
,
590 "gdbarch: verify_gdbarch: register_size invalid");
591 if ((GDB_MULTI_ARCH
>= 2)
592 && (gdbarch
->register_bytes
== -1))
593 internal_error (__FILE__
, __LINE__
,
594 "gdbarch: verify_gdbarch: register_bytes invalid");
595 if ((GDB_MULTI_ARCH
>= 2)
596 && (gdbarch
->register_byte
== 0))
597 internal_error (__FILE__
, __LINE__
,
598 "gdbarch: verify_gdbarch: register_byte invalid");
599 if ((GDB_MULTI_ARCH
>= 2)
600 && (gdbarch
->register_raw_size
== 0))
601 internal_error (__FILE__
, __LINE__
,
602 "gdbarch: verify_gdbarch: register_raw_size invalid");
603 if ((GDB_MULTI_ARCH
>= 2)
604 && (gdbarch
->max_register_raw_size
== -1))
605 internal_error (__FILE__
, __LINE__
,
606 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
607 if ((GDB_MULTI_ARCH
>= 2)
608 && (gdbarch
->register_virtual_size
== 0))
609 internal_error (__FILE__
, __LINE__
,
610 "gdbarch: verify_gdbarch: register_virtual_size invalid");
611 if ((GDB_MULTI_ARCH
>= 2)
612 && (gdbarch
->max_register_virtual_size
== -1))
613 internal_error (__FILE__
, __LINE__
,
614 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
615 if ((GDB_MULTI_ARCH
>= 2)
616 && (gdbarch
->register_virtual_type
== 0))
617 internal_error (__FILE__
, __LINE__
,
618 "gdbarch: verify_gdbarch: register_virtual_type invalid");
619 /* Skip verify of do_registers_info, invalid_p == 0 */
620 /* Skip verify of register_sim_regno, invalid_p == 0 */
621 /* Skip verify of register_bytes_ok, has predicate */
622 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
623 /* Skip verify of cannot_store_register, invalid_p == 0 */
624 if ((GDB_MULTI_ARCH
>= 1)
625 && (gdbarch
->use_generic_dummy_frames
== -1))
626 internal_error (__FILE__
, __LINE__
,
627 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
628 if ((GDB_MULTI_ARCH
>= 2)
629 && (gdbarch
->call_dummy_location
== 0))
630 internal_error (__FILE__
, __LINE__
,
631 "gdbarch: verify_gdbarch: call_dummy_location invalid");
632 if ((GDB_MULTI_ARCH
>= 2)
633 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
634 internal_error (__FILE__
, __LINE__
,
635 "gdbarch: verify_gdbarch: call_dummy_address invalid");
636 if ((GDB_MULTI_ARCH
>= 2)
637 && (gdbarch
->call_dummy_start_offset
== -1))
638 internal_error (__FILE__
, __LINE__
,
639 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
640 if ((GDB_MULTI_ARCH
>= 2)
641 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
642 internal_error (__FILE__
, __LINE__
,
643 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
644 if ((GDB_MULTI_ARCH
>= 1)
645 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
646 internal_error (__FILE__
, __LINE__
,
647 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
648 if ((GDB_MULTI_ARCH
>= 2)
649 && (gdbarch
->call_dummy_length
== -1))
650 internal_error (__FILE__
, __LINE__
,
651 "gdbarch: verify_gdbarch: call_dummy_length invalid");
652 if ((GDB_MULTI_ARCH
>= 2)
653 && (gdbarch
->pc_in_call_dummy
== 0))
654 internal_error (__FILE__
, __LINE__
,
655 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
656 if ((GDB_MULTI_ARCH
>= 1)
657 && (gdbarch
->call_dummy_p
== -1))
658 internal_error (__FILE__
, __LINE__
,
659 "gdbarch: verify_gdbarch: call_dummy_p invalid");
660 /* Skip verify of call_dummy_words, invalid_p == 0 */
661 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
662 if ((GDB_MULTI_ARCH
>= 1)
663 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
664 internal_error (__FILE__
, __LINE__
,
665 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
666 if ((GDB_MULTI_ARCH
>= 2)
667 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
668 internal_error (__FILE__
, __LINE__
,
669 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
670 if ((GDB_MULTI_ARCH
>= 2)
671 && (gdbarch
->fix_call_dummy
== 0))
672 internal_error (__FILE__
, __LINE__
,
673 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
674 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
675 /* Skip verify of init_frame_pc, invalid_p == 0 */
676 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
677 if ((GDB_MULTI_ARCH
>= 1)
678 && (gdbarch
->get_saved_register
== 0))
679 internal_error (__FILE__
, __LINE__
,
680 "gdbarch: verify_gdbarch: get_saved_register invalid");
681 /* Skip verify of register_convertible, invalid_p == 0 */
682 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
683 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
684 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
685 /* Skip verify of store_pseudo_register, invalid_p == 0 */
686 /* Skip verify of pointer_to_address, invalid_p == 0 */
687 /* Skip verify of address_to_pointer, invalid_p == 0 */
688 /* Skip verify of integer_to_address, has predicate */
689 /* Skip verify of return_value_on_stack, invalid_p == 0 */
690 if ((GDB_MULTI_ARCH
>= 2)
691 && (gdbarch
->extract_return_value
== 0))
692 internal_error (__FILE__
, __LINE__
,
693 "gdbarch: verify_gdbarch: extract_return_value invalid");
694 if ((GDB_MULTI_ARCH
>= 1)
695 && (gdbarch
->push_arguments
== 0))
696 internal_error (__FILE__
, __LINE__
,
697 "gdbarch: verify_gdbarch: push_arguments invalid");
698 if ((GDB_MULTI_ARCH
>= 2)
699 && (gdbarch
->push_dummy_frame
== 0))
700 internal_error (__FILE__
, __LINE__
,
701 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
702 if ((GDB_MULTI_ARCH
>= 1)
703 && (gdbarch
->push_return_address
== 0))
704 internal_error (__FILE__
, __LINE__
,
705 "gdbarch: verify_gdbarch: push_return_address invalid");
706 if ((GDB_MULTI_ARCH
>= 2)
707 && (gdbarch
->pop_frame
== 0))
708 internal_error (__FILE__
, __LINE__
,
709 "gdbarch: verify_gdbarch: pop_frame invalid");
710 if ((GDB_MULTI_ARCH
>= 2)
711 && (gdbarch
->store_struct_return
== 0))
712 internal_error (__FILE__
, __LINE__
,
713 "gdbarch: verify_gdbarch: store_struct_return invalid");
714 if ((GDB_MULTI_ARCH
>= 2)
715 && (gdbarch
->store_return_value
== 0))
716 internal_error (__FILE__
, __LINE__
,
717 "gdbarch: verify_gdbarch: store_return_value invalid");
718 /* Skip verify of extract_struct_value_address, has predicate */
719 if ((GDB_MULTI_ARCH
>= 2)
720 && (gdbarch
->use_struct_convention
== 0))
721 internal_error (__FILE__
, __LINE__
,
722 "gdbarch: verify_gdbarch: use_struct_convention invalid");
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->frame_init_saved_regs
== 0))
725 internal_error (__FILE__
, __LINE__
,
726 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
727 if ((GDB_MULTI_ARCH
>= 2)
728 && (gdbarch
->init_extra_frame_info
== 0))
729 internal_error (__FILE__
, __LINE__
,
730 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
731 if ((GDB_MULTI_ARCH
>= 2)
732 && (gdbarch
->skip_prologue
== 0))
733 internal_error (__FILE__
, __LINE__
,
734 "gdbarch: verify_gdbarch: skip_prologue invalid");
735 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH
>= 2)
737 && (gdbarch
->inner_than
== 0))
738 internal_error (__FILE__
, __LINE__
,
739 "gdbarch: verify_gdbarch: inner_than invalid");
740 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
741 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
742 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
743 if ((GDB_MULTI_ARCH
>= 2)
744 && (gdbarch
->decr_pc_after_break
== -1))
745 internal_error (__FILE__
, __LINE__
,
746 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
747 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
748 if ((GDB_MULTI_ARCH
>= 2)
749 && (gdbarch
->function_start_offset
== -1))
750 internal_error (__FILE__
, __LINE__
,
751 "gdbarch: verify_gdbarch: function_start_offset invalid");
752 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
753 if ((GDB_MULTI_ARCH
>= 2)
754 && (gdbarch
->frame_args_skip
== -1))
755 internal_error (__FILE__
, __LINE__
,
756 "gdbarch: verify_gdbarch: frame_args_skip invalid");
757 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
758 if ((GDB_MULTI_ARCH
>= 2)
759 && (gdbarch
->frame_chain
== 0))
760 internal_error (__FILE__
, __LINE__
,
761 "gdbarch: verify_gdbarch: frame_chain invalid");
762 if ((GDB_MULTI_ARCH
>= 1)
763 && (gdbarch
->frame_chain_valid
== 0))
764 internal_error (__FILE__
, __LINE__
,
765 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
766 if ((GDB_MULTI_ARCH
>= 2)
767 && (gdbarch
->frame_saved_pc
== 0))
768 internal_error (__FILE__
, __LINE__
,
769 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
770 if ((GDB_MULTI_ARCH
>= 2)
771 && (gdbarch
->frame_args_address
== 0))
772 internal_error (__FILE__
, __LINE__
,
773 "gdbarch: verify_gdbarch: frame_args_address invalid");
774 if ((GDB_MULTI_ARCH
>= 2)
775 && (gdbarch
->frame_locals_address
== 0))
776 internal_error (__FILE__
, __LINE__
,
777 "gdbarch: verify_gdbarch: frame_locals_address invalid");
778 if ((GDB_MULTI_ARCH
>= 2)
779 && (gdbarch
->saved_pc_after_call
== 0))
780 internal_error (__FILE__
, __LINE__
,
781 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
782 if ((GDB_MULTI_ARCH
>= 2)
783 && (gdbarch
->frame_num_args
== 0))
784 internal_error (__FILE__
, __LINE__
,
785 "gdbarch: verify_gdbarch: frame_num_args invalid");
786 /* Skip verify of stack_align, has predicate */
787 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
788 /* Skip verify of reg_struct_has_addr, has predicate */
789 /* Skip verify of save_dummy_frame_tos, has predicate */
790 if (gdbarch
->float_format
== 0)
791 gdbarch
->float_format
= default_float_format (gdbarch
);
792 if (gdbarch
->double_format
== 0)
793 gdbarch
->double_format
= default_double_format (gdbarch
);
794 if (gdbarch
->long_double_format
== 0)
795 gdbarch
->long_double_format
= &floatformat_unknown
;
796 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
797 /* Skip verify of addr_bits_remove, invalid_p == 0 */
798 /* Skip verify of software_single_step, has predicate */
799 /* Skip verify of print_insn, invalid_p == 0 */
800 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
801 /* Skip verify of in_solib_call_trampoline, invalid_p == 0 */
805 /* Print out the details of the current architecture. */
807 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
808 just happens to match the global variable ``current_gdbarch''. That
809 way macros refering to that variable get the local and not the global
810 version - ulgh. Once everything is parameterised with gdbarch, this
814 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: register_read = 0x%08lx\n",
822 (long) current_gdbarch
->register_read
);
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: register_write = 0x%08lx\n",
826 (long) current_gdbarch
->register_write
);
827 #ifdef ADDRESS_TO_POINTER
829 /* Macro might contain `[{}]' when not multi-arch */
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: %s # %s\n",
832 "ADDRESS_TO_POINTER(type, buf, addr)",
833 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
838 (long) current_gdbarch
->address_to_pointer
839 /*ADDRESS_TO_POINTER ()*/);
841 #ifdef ADDR_BITS_REMOVE
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: %s # %s\n",
844 "ADDR_BITS_REMOVE(addr)",
845 XSTRING (ADDR_BITS_REMOVE (addr
)));
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
849 (long) current_gdbarch
->addr_bits_remove
850 /*ADDR_BITS_REMOVE ()*/);
852 #ifdef BELIEVE_PCC_PROMOTION
853 fprintf_unfiltered (file
,
854 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
855 XSTRING (BELIEVE_PCC_PROMOTION
));
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
858 (long) BELIEVE_PCC_PROMOTION
);
860 #ifdef BELIEVE_PCC_PROMOTION_TYPE
861 fprintf_unfiltered (file
,
862 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
863 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
864 fprintf_unfiltered (file
,
865 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
866 (long) BELIEVE_PCC_PROMOTION_TYPE
);
868 #ifdef BREAKPOINT_FROM_PC
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: %s # %s\n",
871 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
872 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
874 fprintf_unfiltered (file
,
875 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
876 (long) current_gdbarch
->breakpoint_from_pc
877 /*BREAKPOINT_FROM_PC ()*/);
879 #ifdef CALL_DUMMY_ADDRESS
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: %s # %s\n",
882 "CALL_DUMMY_ADDRESS()",
883 XSTRING (CALL_DUMMY_ADDRESS ()));
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
887 (long) current_gdbarch
->call_dummy_address
888 /*CALL_DUMMY_ADDRESS ()*/);
890 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
893 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
894 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
897 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
899 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
902 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
905 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
907 #ifdef CALL_DUMMY_LENGTH
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
910 XSTRING (CALL_DUMMY_LENGTH
));
911 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
912 fprintf_unfiltered (file
,
913 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
914 (long) CALL_DUMMY_LENGTH
);
916 #ifdef CALL_DUMMY_LOCATION
917 fprintf_unfiltered (file
,
918 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
919 XSTRING (CALL_DUMMY_LOCATION
));
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
922 (long) CALL_DUMMY_LOCATION
);
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: CALL_DUMMY_P # %s\n",
927 XSTRING (CALL_DUMMY_P
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
930 (long) CALL_DUMMY_P
);
932 #ifdef CALL_DUMMY_STACK_ADJUST
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
935 XSTRING (CALL_DUMMY_STACK_ADJUST
));
936 if (CALL_DUMMY_STACK_ADJUST_P
)
937 fprintf_unfiltered (file
,
938 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
939 (long) CALL_DUMMY_STACK_ADJUST
);
941 #ifdef CALL_DUMMY_STACK_ADJUST_P
942 fprintf_unfiltered (file
,
943 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
944 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
947 (long) CALL_DUMMY_STACK_ADJUST_P
);
949 #ifdef CALL_DUMMY_START_OFFSET
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
952 XSTRING (CALL_DUMMY_START_OFFSET
));
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
955 (long) CALL_DUMMY_START_OFFSET
);
957 #ifdef CALL_DUMMY_WORDS
958 fprintf_unfiltered (file
,
959 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
960 XSTRING (CALL_DUMMY_WORDS
));
961 fprintf_unfiltered (file
,
962 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
963 (long) CALL_DUMMY_WORDS
);
965 #ifdef CANNOT_FETCH_REGISTER
966 fprintf_unfiltered (file
,
967 "gdbarch_dump: %s # %s\n",
968 "CANNOT_FETCH_REGISTER(regnum)",
969 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
973 (long) current_gdbarch
->cannot_fetch_register
974 /*CANNOT_FETCH_REGISTER ()*/);
976 #ifdef CANNOT_STORE_REGISTER
977 fprintf_unfiltered (file
,
978 "gdbarch_dump: %s # %s\n",
979 "CANNOT_STORE_REGISTER(regnum)",
980 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
982 fprintf_unfiltered (file
,
983 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
984 (long) current_gdbarch
->cannot_store_register
985 /*CANNOT_STORE_REGISTER ()*/);
987 #ifdef COERCE_FLOAT_TO_DOUBLE
988 fprintf_unfiltered (file
,
989 "gdbarch_dump: %s # %s\n",
990 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
991 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
995 (long) current_gdbarch
->coerce_float_to_double
996 /*COERCE_FLOAT_TO_DOUBLE ()*/);
998 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: %s # %s\n",
1001 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1002 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1006 (long) current_gdbarch
->convert_from_func_ptr_addr
1007 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1009 #ifdef DECR_PC_AFTER_BREAK
1010 fprintf_unfiltered (file
,
1011 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1012 XSTRING (DECR_PC_AFTER_BREAK
));
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1015 (long) DECR_PC_AFTER_BREAK
);
1017 #ifdef DO_REGISTERS_INFO
1019 /* Macro might contain `[{}]' when not multi-arch */
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: %s # %s\n",
1022 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1023 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1028 (long) current_gdbarch
->do_registers_info
1029 /*DO_REGISTERS_INFO ()*/);
1031 #ifdef DWARF2_REG_TO_REGNUM
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: %s # %s\n",
1034 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1035 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1039 (long) current_gdbarch
->dwarf2_reg_to_regnum
1040 /*DWARF2_REG_TO_REGNUM ()*/);
1042 #ifdef DWARF_REG_TO_REGNUM
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: %s # %s\n",
1045 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1046 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1050 (long) current_gdbarch
->dwarf_reg_to_regnum
1051 /*DWARF_REG_TO_REGNUM ()*/);
1053 #ifdef ECOFF_REG_TO_REGNUM
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: %s # %s\n",
1056 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1057 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1061 (long) current_gdbarch
->ecoff_reg_to_regnum
1062 /*ECOFF_REG_TO_REGNUM ()*/);
1064 #ifdef EXTRACT_RETURN_VALUE
1066 /* Macro might contain `[{}]' when not multi-arch */
1067 fprintf_unfiltered (file
,
1068 "gdbarch_dump: %s # %s\n",
1069 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1070 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1075 (long) current_gdbarch
->extract_return_value
1076 /*EXTRACT_RETURN_VALUE ()*/);
1078 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: %s # %s\n",
1081 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1082 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1086 (long) current_gdbarch
->extract_struct_value_address
1087 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1089 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1092 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1093 fprintf_unfiltered (file
,
1094 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1095 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
1097 #ifdef FETCH_PSEUDO_REGISTER
1099 /* Macro might contain `[{}]' when not multi-arch */
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: %s # %s\n",
1102 "FETCH_PSEUDO_REGISTER(regnum)",
1103 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1108 (long) current_gdbarch
->fetch_pseudo_register
1109 /*FETCH_PSEUDO_REGISTER ()*/);
1111 #ifdef FIX_CALL_DUMMY
1113 /* Macro might contain `[{}]' when not multi-arch */
1114 fprintf_unfiltered (file
,
1115 "gdbarch_dump: %s # %s\n",
1116 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1117 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1122 (long) current_gdbarch
->fix_call_dummy
1123 /*FIX_CALL_DUMMY ()*/);
1126 fprintf_unfiltered (file
,
1127 "gdbarch_dump: FP0_REGNUM # %s\n",
1128 XSTRING (FP0_REGNUM
));
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: FP0_REGNUM = %ld\n",
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: FP_REGNUM # %s\n",
1136 XSTRING (FP_REGNUM
));
1137 fprintf_unfiltered (file
,
1138 "gdbarch_dump: FP_REGNUM = %ld\n",
1141 #ifdef FRAMELESS_FUNCTION_INVOCATION
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: %s # %s\n",
1144 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1145 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1147 fprintf_unfiltered (file
,
1148 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1149 (long) current_gdbarch
->frameless_function_invocation
1150 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1152 #ifdef FRAME_ARGS_ADDRESS
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: %s # %s\n",
1155 "FRAME_ARGS_ADDRESS(fi)",
1156 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1160 (long) current_gdbarch
->frame_args_address
1161 /*FRAME_ARGS_ADDRESS ()*/);
1163 #ifdef FRAME_ARGS_SKIP
1164 fprintf_unfiltered (file
,
1165 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1166 XSTRING (FRAME_ARGS_SKIP
));
1167 fprintf_unfiltered (file
,
1168 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1169 (long) FRAME_ARGS_SKIP
);
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: %s # %s\n",
1174 "FRAME_CHAIN(frame)",
1175 XSTRING (FRAME_CHAIN (frame
)));
1177 fprintf_unfiltered (file
,
1178 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1179 (long) current_gdbarch
->frame_chain
1180 /*FRAME_CHAIN ()*/);
1182 #ifdef FRAME_CHAIN_VALID
1183 fprintf_unfiltered (file
,
1184 "gdbarch_dump: %s # %s\n",
1185 "FRAME_CHAIN_VALID(chain, thisframe)",
1186 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1190 (long) current_gdbarch
->frame_chain_valid
1191 /*FRAME_CHAIN_VALID ()*/);
1193 #ifdef FRAME_INIT_SAVED_REGS
1195 /* Macro might contain `[{}]' when not multi-arch */
1196 fprintf_unfiltered (file
,
1197 "gdbarch_dump: %s # %s\n",
1198 "FRAME_INIT_SAVED_REGS(frame)",
1199 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1204 (long) current_gdbarch
->frame_init_saved_regs
1205 /*FRAME_INIT_SAVED_REGS ()*/);
1207 #ifdef FRAME_LOCALS_ADDRESS
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: %s # %s\n",
1210 "FRAME_LOCALS_ADDRESS(fi)",
1211 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1213 fprintf_unfiltered (file
,
1214 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1215 (long) current_gdbarch
->frame_locals_address
1216 /*FRAME_LOCALS_ADDRESS ()*/);
1218 #ifdef FRAME_NUM_ARGS
1219 fprintf_unfiltered (file
,
1220 "gdbarch_dump: %s # %s\n",
1221 "FRAME_NUM_ARGS(frame)",
1222 XSTRING (FRAME_NUM_ARGS (frame
)));
1224 fprintf_unfiltered (file
,
1225 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1226 (long) current_gdbarch
->frame_num_args
1227 /*FRAME_NUM_ARGS ()*/);
1229 #ifdef FRAME_SAVED_PC
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: %s # %s\n",
1232 "FRAME_SAVED_PC(fi)",
1233 XSTRING (FRAME_SAVED_PC (fi
)));
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1237 (long) current_gdbarch
->frame_saved_pc
1238 /*FRAME_SAVED_PC ()*/);
1240 #ifdef FUNCTION_START_OFFSET
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1243 XSTRING (FUNCTION_START_OFFSET
));
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1246 (long) FUNCTION_START_OFFSET
);
1248 #ifdef GET_SAVED_REGISTER
1250 /* Macro might contain `[{}]' when not multi-arch */
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: %s # %s\n",
1253 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1254 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1259 (long) current_gdbarch
->get_saved_register
1260 /*GET_SAVED_REGISTER ()*/);
1263 fprintf_unfiltered (file
,
1264 "gdbarch_dump: IEEE_FLOAT # %s\n",
1265 XSTRING (IEEE_FLOAT
));
1266 fprintf_unfiltered (file
,
1267 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1270 #ifdef INIT_EXTRA_FRAME_INFO
1272 /* Macro might contain `[{}]' when not multi-arch */
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: %s # %s\n",
1275 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1276 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1281 (long) current_gdbarch
->init_extra_frame_info
1282 /*INIT_EXTRA_FRAME_INFO ()*/);
1284 #ifdef INIT_FRAME_PC
1286 /* Macro might contain `[{}]' when not multi-arch */
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: %s # %s\n",
1289 "INIT_FRAME_PC(fromleaf, prev)",
1290 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1295 (long) current_gdbarch
->init_frame_pc
1296 /*INIT_FRAME_PC ()*/);
1298 #ifdef INIT_FRAME_PC_FIRST
1300 /* Macro might contain `[{}]' when not multi-arch */
1301 fprintf_unfiltered (file
,
1302 "gdbarch_dump: %s # %s\n",
1303 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1304 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1307 fprintf_unfiltered (file
,
1308 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1309 (long) current_gdbarch
->init_frame_pc_first
1310 /*INIT_FRAME_PC_FIRST ()*/);
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: %s # %s\n",
1315 "INNER_THAN(lhs, rhs)",
1316 XSTRING (INNER_THAN (lhs
, rhs
)));
1318 fprintf_unfiltered (file
,
1319 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1320 (long) current_gdbarch
->inner_than
1323 #ifdef INTEGER_TO_ADDRESS
1324 fprintf_unfiltered (file
,
1325 "gdbarch_dump: %s # %s\n",
1326 "INTEGER_TO_ADDRESS(type, buf)",
1327 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1331 (long) current_gdbarch
->integer_to_address
1332 /*INTEGER_TO_ADDRESS ()*/);
1334 #ifdef IN_SOLIB_CALL_TRAMPOLINE
1335 fprintf_unfiltered (file
,
1336 "gdbarch_dump: %s # %s\n",
1337 "IN_SOLIB_CALL_TRAMPOLINE(pc, name)",
1338 XSTRING (IN_SOLIB_CALL_TRAMPOLINE (pc
, name
)));
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: IN_SOLIB_CALL_TRAMPOLINE = 0x%08lx\n",
1342 (long) current_gdbarch
->in_solib_call_trampoline
1343 /*IN_SOLIB_CALL_TRAMPOLINE ()*/);
1345 #ifdef MAX_REGISTER_RAW_SIZE
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1348 XSTRING (MAX_REGISTER_RAW_SIZE
));
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1351 (long) MAX_REGISTER_RAW_SIZE
);
1353 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1354 fprintf_unfiltered (file
,
1355 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1356 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1359 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1361 #ifdef MEMORY_INSERT_BREAKPOINT
1362 fprintf_unfiltered (file
,
1363 "gdbarch_dump: %s # %s\n",
1364 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1365 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1369 (long) current_gdbarch
->memory_insert_breakpoint
1370 /*MEMORY_INSERT_BREAKPOINT ()*/);
1372 #ifdef MEMORY_REMOVE_BREAKPOINT
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: %s # %s\n",
1375 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1376 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1380 (long) current_gdbarch
->memory_remove_breakpoint
1381 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: NNPC_REGNUM # %s\n",
1386 XSTRING (NNPC_REGNUM
));
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1389 (long) NNPC_REGNUM
);
1392 fprintf_unfiltered (file
,
1393 "gdbarch_dump: NPC_REGNUM # %s\n",
1394 XSTRING (NPC_REGNUM
));
1395 fprintf_unfiltered (file
,
1396 "gdbarch_dump: NPC_REGNUM = %ld\n",
1399 #ifdef NUM_PSEUDO_REGS
1400 fprintf_unfiltered (file
,
1401 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1402 XSTRING (NUM_PSEUDO_REGS
));
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1405 (long) NUM_PSEUDO_REGS
);
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: NUM_REGS # %s\n",
1410 XSTRING (NUM_REGS
));
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: NUM_REGS = %ld\n",
1415 #ifdef PARM_BOUNDARY
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1418 XSTRING (PARM_BOUNDARY
));
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1421 (long) PARM_BOUNDARY
);
1423 #ifdef PC_IN_CALL_DUMMY
1424 fprintf_unfiltered (file
,
1425 "gdbarch_dump: %s # %s\n",
1426 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1427 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1431 (long) current_gdbarch
->pc_in_call_dummy
1432 /*PC_IN_CALL_DUMMY ()*/);
1435 fprintf_unfiltered (file
,
1436 "gdbarch_dump: PC_REGNUM # %s\n",
1437 XSTRING (PC_REGNUM
));
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: PC_REGNUM = %ld\n",
1442 #ifdef POINTER_TO_ADDRESS
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: %s # %s\n",
1445 "POINTER_TO_ADDRESS(type, buf)",
1446 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1450 (long) current_gdbarch
->pointer_to_address
1451 /*POINTER_TO_ADDRESS ()*/);
1455 /* Macro might contain `[{}]' when not multi-arch */
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: %s # %s\n",
1459 XSTRING (POP_FRAME (-)));
1462 fprintf_unfiltered (file
,
1463 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1464 (long) current_gdbarch
->pop_frame
1467 #ifdef PREPARE_TO_PROCEED
1468 fprintf_unfiltered (file
,
1469 "gdbarch_dump: %s # %s\n",
1470 "PREPARE_TO_PROCEED(select_it)",
1471 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1475 (long) current_gdbarch
->prepare_to_proceed
1476 /*PREPARE_TO_PROCEED ()*/);
1478 #ifdef PROLOGUE_FRAMELESS_P
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: %s # %s\n",
1481 "PROLOGUE_FRAMELESS_P(ip)",
1482 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1484 fprintf_unfiltered (file
,
1485 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1486 (long) current_gdbarch
->prologue_frameless_p
1487 /*PROLOGUE_FRAMELESS_P ()*/);
1489 #ifdef PUSH_ARGUMENTS
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: %s # %s\n",
1492 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1493 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1497 (long) current_gdbarch
->push_arguments
1498 /*PUSH_ARGUMENTS ()*/);
1500 #ifdef PUSH_DUMMY_FRAME
1502 /* Macro might contain `[{}]' when not multi-arch */
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: %s # %s\n",
1505 "PUSH_DUMMY_FRAME(-)",
1506 XSTRING (PUSH_DUMMY_FRAME (-)));
1509 fprintf_unfiltered (file
,
1510 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1511 (long) current_gdbarch
->push_dummy_frame
1512 /*PUSH_DUMMY_FRAME ()*/);
1514 #ifdef PUSH_RETURN_ADDRESS
1515 fprintf_unfiltered (file
,
1516 "gdbarch_dump: %s # %s\n",
1517 "PUSH_RETURN_ADDRESS(pc, sp)",
1518 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1522 (long) current_gdbarch
->push_return_address
1523 /*PUSH_RETURN_ADDRESS ()*/);
1525 #ifdef REGISTER_BYTE
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: %s # %s\n",
1528 "REGISTER_BYTE(reg_nr)",
1529 XSTRING (REGISTER_BYTE (reg_nr
)));
1531 fprintf_unfiltered (file
,
1532 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1533 (long) current_gdbarch
->register_byte
1534 /*REGISTER_BYTE ()*/);
1536 #ifdef REGISTER_BYTES
1537 fprintf_unfiltered (file
,
1538 "gdbarch_dump: REGISTER_BYTES # %s\n",
1539 XSTRING (REGISTER_BYTES
));
1540 fprintf_unfiltered (file
,
1541 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1542 (long) REGISTER_BYTES
);
1544 #ifdef REGISTER_BYTES_OK
1545 fprintf_unfiltered (file
,
1546 "gdbarch_dump: %s # %s\n",
1547 "REGISTER_BYTES_OK(nr_bytes)",
1548 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1552 (long) current_gdbarch
->register_bytes_ok
1553 /*REGISTER_BYTES_OK ()*/);
1555 #ifdef REGISTER_CONVERTIBLE
1556 fprintf_unfiltered (file
,
1557 "gdbarch_dump: %s # %s\n",
1558 "REGISTER_CONVERTIBLE(nr)",
1559 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1561 fprintf_unfiltered (file
,
1562 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1563 (long) current_gdbarch
->register_convertible
1564 /*REGISTER_CONVERTIBLE ()*/);
1566 #ifdef REGISTER_CONVERT_TO_RAW
1568 /* Macro might contain `[{}]' when not multi-arch */
1569 fprintf_unfiltered (file
,
1570 "gdbarch_dump: %s # %s\n",
1571 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1572 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1575 fprintf_unfiltered (file
,
1576 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1577 (long) current_gdbarch
->register_convert_to_raw
1578 /*REGISTER_CONVERT_TO_RAW ()*/);
1580 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1582 /* Macro might contain `[{}]' when not multi-arch */
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: %s # %s\n",
1585 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1586 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1589 fprintf_unfiltered (file
,
1590 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1591 (long) current_gdbarch
->register_convert_to_virtual
1592 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1594 #ifdef REGISTER_NAME
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: %s # %s\n",
1597 "REGISTER_NAME(regnr)",
1598 XSTRING (REGISTER_NAME (regnr
)));
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1602 (long) current_gdbarch
->register_name
1603 /*REGISTER_NAME ()*/);
1605 #ifdef REGISTER_RAW_SIZE
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: %s # %s\n",
1608 "REGISTER_RAW_SIZE(reg_nr)",
1609 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1613 (long) current_gdbarch
->register_raw_size
1614 /*REGISTER_RAW_SIZE ()*/);
1616 #ifdef REGISTER_SIM_REGNO
1617 fprintf_unfiltered (file
,
1618 "gdbarch_dump: %s # %s\n",
1619 "REGISTER_SIM_REGNO(reg_nr)",
1620 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1624 (long) current_gdbarch
->register_sim_regno
1625 /*REGISTER_SIM_REGNO ()*/);
1627 #ifdef REGISTER_SIZE
1628 fprintf_unfiltered (file
,
1629 "gdbarch_dump: REGISTER_SIZE # %s\n",
1630 XSTRING (REGISTER_SIZE
));
1631 fprintf_unfiltered (file
,
1632 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1633 (long) REGISTER_SIZE
);
1635 #ifdef REGISTER_VIRTUAL_SIZE
1636 fprintf_unfiltered (file
,
1637 "gdbarch_dump: %s # %s\n",
1638 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1639 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1643 (long) current_gdbarch
->register_virtual_size
1644 /*REGISTER_VIRTUAL_SIZE ()*/);
1646 #ifdef REGISTER_VIRTUAL_TYPE
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: %s # %s\n",
1649 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1650 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1654 (long) current_gdbarch
->register_virtual_type
1655 /*REGISTER_VIRTUAL_TYPE ()*/);
1657 #ifdef REG_STRUCT_HAS_ADDR
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: %s # %s\n",
1660 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1661 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1665 (long) current_gdbarch
->reg_struct_has_addr
1666 /*REG_STRUCT_HAS_ADDR ()*/);
1668 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1670 /* Macro might contain `[{}]' when not multi-arch */
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: %s # %s\n",
1673 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1674 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1679 (long) current_gdbarch
->remote_translate_xfer_address
1680 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1682 #ifdef RETURN_VALUE_ON_STACK
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: %s # %s\n",
1685 "RETURN_VALUE_ON_STACK(type)",
1686 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1690 (long) current_gdbarch
->return_value_on_stack
1691 /*RETURN_VALUE_ON_STACK ()*/);
1693 #ifdef SAVED_PC_AFTER_CALL
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: %s # %s\n",
1696 "SAVED_PC_AFTER_CALL(frame)",
1697 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1701 (long) current_gdbarch
->saved_pc_after_call
1702 /*SAVED_PC_AFTER_CALL ()*/);
1704 #ifdef SAVE_DUMMY_FRAME_TOS
1706 /* Macro might contain `[{}]' when not multi-arch */
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: %s # %s\n",
1709 "SAVE_DUMMY_FRAME_TOS(sp)",
1710 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1715 (long) current_gdbarch
->save_dummy_frame_tos
1716 /*SAVE_DUMMY_FRAME_TOS ()*/);
1718 #ifdef SDB_REG_TO_REGNUM
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: %s # %s\n",
1721 "SDB_REG_TO_REGNUM(sdb_regnr)",
1722 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1724 fprintf_unfiltered (file
,
1725 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1726 (long) current_gdbarch
->sdb_reg_to_regnum
1727 /*SDB_REG_TO_REGNUM ()*/);
1729 #ifdef SIZEOF_CALL_DUMMY_WORDS
1730 fprintf_unfiltered (file
,
1731 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1732 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1735 (long) SIZEOF_CALL_DUMMY_WORDS
);
1737 #ifdef SKIP_PROLOGUE
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: %s # %s\n",
1740 "SKIP_PROLOGUE(ip)",
1741 XSTRING (SKIP_PROLOGUE (ip
)));
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1745 (long) current_gdbarch
->skip_prologue
1746 /*SKIP_PROLOGUE ()*/);
1748 #ifdef SKIP_TRAMPOLINE_CODE
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: %s # %s\n",
1751 "SKIP_TRAMPOLINE_CODE(pc)",
1752 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1754 fprintf_unfiltered (file
,
1755 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1756 (long) current_gdbarch
->skip_trampoline_code
1757 /*SKIP_TRAMPOLINE_CODE ()*/);
1759 #ifdef SOFTWARE_SINGLE_STEP
1761 /* Macro might contain `[{}]' when not multi-arch */
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: %s # %s\n",
1764 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1765 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1768 fprintf_unfiltered (file
,
1769 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1770 (long) current_gdbarch
->software_single_step
1771 /*SOFTWARE_SINGLE_STEP ()*/);
1774 fprintf_unfiltered (file
,
1775 "gdbarch_dump: SP_REGNUM # %s\n",
1776 XSTRING (SP_REGNUM
));
1777 fprintf_unfiltered (file
,
1778 "gdbarch_dump: SP_REGNUM = %ld\n",
1781 #ifdef STAB_REG_TO_REGNUM
1782 fprintf_unfiltered (file
,
1783 "gdbarch_dump: %s # %s\n",
1784 "STAB_REG_TO_REGNUM(stab_regnr)",
1785 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1787 fprintf_unfiltered (file
,
1788 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1789 (long) current_gdbarch
->stab_reg_to_regnum
1790 /*STAB_REG_TO_REGNUM ()*/);
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: %s # %s\n",
1796 XSTRING (STACK_ALIGN (sp
)));
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1800 (long) current_gdbarch
->stack_align
1801 /*STACK_ALIGN ()*/);
1803 #ifdef STORE_PSEUDO_REGISTER
1805 /* Macro might contain `[{}]' when not multi-arch */
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: %s # %s\n",
1808 "STORE_PSEUDO_REGISTER(regnum)",
1809 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1812 fprintf_unfiltered (file
,
1813 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1814 (long) current_gdbarch
->store_pseudo_register
1815 /*STORE_PSEUDO_REGISTER ()*/);
1817 #ifdef STORE_RETURN_VALUE
1819 /* Macro might contain `[{}]' when not multi-arch */
1820 fprintf_unfiltered (file
,
1821 "gdbarch_dump: %s # %s\n",
1822 "STORE_RETURN_VALUE(type, valbuf)",
1823 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1828 (long) current_gdbarch
->store_return_value
1829 /*STORE_RETURN_VALUE ()*/);
1831 #ifdef STORE_STRUCT_RETURN
1833 /* Macro might contain `[{}]' when not multi-arch */
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: %s # %s\n",
1836 "STORE_STRUCT_RETURN(addr, sp)",
1837 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1842 (long) current_gdbarch
->store_struct_return
1843 /*STORE_STRUCT_RETURN ()*/);
1845 #ifdef TARGET_ADDR_BIT
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1848 XSTRING (TARGET_ADDR_BIT
));
1849 fprintf_unfiltered (file
,
1850 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1851 (long) TARGET_ADDR_BIT
);
1853 #ifdef TARGET_ARCHITECTURE
1854 fprintf_unfiltered (file
,
1855 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1856 XSTRING (TARGET_ARCHITECTURE
));
1857 if (TARGET_ARCHITECTURE
!= NULL
)
1858 fprintf_unfiltered (file
,
1859 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1860 TARGET_ARCHITECTURE
->printable_name
);
1862 #ifdef TARGET_BFD_VMA_BIT
1863 fprintf_unfiltered (file
,
1864 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1865 XSTRING (TARGET_BFD_VMA_BIT
));
1866 fprintf_unfiltered (file
,
1867 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1868 (long) TARGET_BFD_VMA_BIT
);
1870 #ifdef TARGET_BYTE_ORDER
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1873 XSTRING (TARGET_BYTE_ORDER
));
1874 fprintf_unfiltered (file
,
1875 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1876 (long) TARGET_BYTE_ORDER
);
1878 #ifdef TARGET_DOUBLE_BIT
1879 fprintf_unfiltered (file
,
1880 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1881 XSTRING (TARGET_DOUBLE_BIT
));
1882 fprintf_unfiltered (file
,
1883 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1884 (long) TARGET_DOUBLE_BIT
);
1886 #ifdef TARGET_DOUBLE_FORMAT
1887 fprintf_unfiltered (file
,
1888 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1889 XSTRING (TARGET_DOUBLE_FORMAT
));
1890 fprintf_unfiltered (file
,
1891 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1892 (long) TARGET_DOUBLE_FORMAT
);
1894 #ifdef TARGET_FLOAT_BIT
1895 fprintf_unfiltered (file
,
1896 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1897 XSTRING (TARGET_FLOAT_BIT
));
1898 fprintf_unfiltered (file
,
1899 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1900 (long) TARGET_FLOAT_BIT
);
1902 #ifdef TARGET_FLOAT_FORMAT
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1905 XSTRING (TARGET_FLOAT_FORMAT
));
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1908 (long) TARGET_FLOAT_FORMAT
);
1910 #ifdef TARGET_INT_BIT
1911 fprintf_unfiltered (file
,
1912 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1913 XSTRING (TARGET_INT_BIT
));
1914 fprintf_unfiltered (file
,
1915 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1916 (long) TARGET_INT_BIT
);
1918 #ifdef TARGET_LONG_BIT
1919 fprintf_unfiltered (file
,
1920 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1921 XSTRING (TARGET_LONG_BIT
));
1922 fprintf_unfiltered (file
,
1923 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1924 (long) TARGET_LONG_BIT
);
1926 #ifdef TARGET_LONG_DOUBLE_BIT
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1929 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1930 fprintf_unfiltered (file
,
1931 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1932 (long) TARGET_LONG_DOUBLE_BIT
);
1934 #ifdef TARGET_LONG_DOUBLE_FORMAT
1935 fprintf_unfiltered (file
,
1936 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1937 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1940 (long) TARGET_LONG_DOUBLE_FORMAT
);
1942 #ifdef TARGET_LONG_LONG_BIT
1943 fprintf_unfiltered (file
,
1944 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1945 XSTRING (TARGET_LONG_LONG_BIT
));
1946 fprintf_unfiltered (file
,
1947 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1948 (long) TARGET_LONG_LONG_BIT
);
1950 #ifdef TARGET_PRINT_INSN
1951 fprintf_unfiltered (file
,
1952 "gdbarch_dump: %s # %s\n",
1953 "TARGET_PRINT_INSN(vma, info)",
1954 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1958 (long) current_gdbarch
->print_insn
1959 /*TARGET_PRINT_INSN ()*/);
1961 #ifdef TARGET_PTR_BIT
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1964 XSTRING (TARGET_PTR_BIT
));
1965 fprintf_unfiltered (file
,
1966 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1967 (long) TARGET_PTR_BIT
);
1969 #ifdef TARGET_READ_FP
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: %s # %s\n",
1973 XSTRING (TARGET_READ_FP ()));
1975 fprintf_unfiltered (file
,
1976 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1977 (long) current_gdbarch
->read_fp
1978 /*TARGET_READ_FP ()*/);
1980 #ifdef TARGET_READ_PC
1981 fprintf_unfiltered (file
,
1982 "gdbarch_dump: %s # %s\n",
1983 "TARGET_READ_PC(ptid)",
1984 XSTRING (TARGET_READ_PC (ptid
)));
1986 fprintf_unfiltered (file
,
1987 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1988 (long) current_gdbarch
->read_pc
1989 /*TARGET_READ_PC ()*/);
1991 #ifdef TARGET_READ_SP
1992 fprintf_unfiltered (file
,
1993 "gdbarch_dump: %s # %s\n",
1995 XSTRING (TARGET_READ_SP ()));
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1999 (long) current_gdbarch
->read_sp
2000 /*TARGET_READ_SP ()*/);
2002 #ifdef TARGET_SHORT_BIT
2003 fprintf_unfiltered (file
,
2004 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
2005 XSTRING (TARGET_SHORT_BIT
));
2006 fprintf_unfiltered (file
,
2007 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
2008 (long) TARGET_SHORT_BIT
);
2010 #ifdef TARGET_VIRTUAL_FRAME_POINTER
2012 /* Macro might contain `[{}]' when not multi-arch */
2013 fprintf_unfiltered (file
,
2014 "gdbarch_dump: %s # %s\n",
2015 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2016 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2019 fprintf_unfiltered (file
,
2020 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2021 (long) current_gdbarch
->virtual_frame_pointer
2022 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2024 #ifdef TARGET_WRITE_FP
2026 /* Macro might contain `[{}]' when not multi-arch */
2027 fprintf_unfiltered (file
,
2028 "gdbarch_dump: %s # %s\n",
2029 "TARGET_WRITE_FP(val)",
2030 XSTRING (TARGET_WRITE_FP (val
)));
2033 fprintf_unfiltered (file
,
2034 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2035 (long) current_gdbarch
->write_fp
2036 /*TARGET_WRITE_FP ()*/);
2038 #ifdef TARGET_WRITE_PC
2040 /* Macro might contain `[{}]' when not multi-arch */
2041 fprintf_unfiltered (file
,
2042 "gdbarch_dump: %s # %s\n",
2043 "TARGET_WRITE_PC(val, ptid)",
2044 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2047 fprintf_unfiltered (file
,
2048 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2049 (long) current_gdbarch
->write_pc
2050 /*TARGET_WRITE_PC ()*/);
2052 #ifdef TARGET_WRITE_SP
2054 /* Macro might contain `[{}]' when not multi-arch */
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: %s # %s\n",
2057 "TARGET_WRITE_SP(val)",
2058 XSTRING (TARGET_WRITE_SP (val
)));
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2063 (long) current_gdbarch
->write_sp
2064 /*TARGET_WRITE_SP ()*/);
2066 #ifdef USE_GENERIC_DUMMY_FRAMES
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2069 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2072 (long) USE_GENERIC_DUMMY_FRAMES
);
2074 #ifdef USE_STRUCT_CONVENTION
2075 fprintf_unfiltered (file
,
2076 "gdbarch_dump: %s # %s\n",
2077 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2078 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2080 fprintf_unfiltered (file
,
2081 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2082 (long) current_gdbarch
->use_struct_convention
2083 /*USE_STRUCT_CONVENTION ()*/);
2085 if (current_gdbarch
->dump_tdep
!= NULL
)
2086 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2089 struct gdbarch_tdep
*
2090 gdbarch_tdep (struct gdbarch
*gdbarch
)
2092 if (gdbarch_debug
>= 2)
2093 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2094 return gdbarch
->tdep
;
2098 const struct bfd_arch_info
*
2099 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2101 if (gdbarch_debug
>= 2)
2102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2103 return gdbarch
->bfd_arch_info
;
2107 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2109 if (gdbarch_debug
>= 2)
2110 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2111 return gdbarch
->byte_order
;
2115 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2117 /* Skip verify of short_bit, invalid_p == 0 */
2118 if (gdbarch_debug
>= 2)
2119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2120 return gdbarch
->short_bit
;
2124 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2127 gdbarch
->short_bit
= short_bit
;
2131 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2133 /* Skip verify of int_bit, invalid_p == 0 */
2134 if (gdbarch_debug
>= 2)
2135 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2136 return gdbarch
->int_bit
;
2140 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2143 gdbarch
->int_bit
= int_bit
;
2147 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2149 /* Skip verify of long_bit, invalid_p == 0 */
2150 if (gdbarch_debug
>= 2)
2151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2152 return gdbarch
->long_bit
;
2156 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2159 gdbarch
->long_bit
= long_bit
;
2163 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2165 /* Skip verify of long_long_bit, invalid_p == 0 */
2166 if (gdbarch_debug
>= 2)
2167 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2168 return gdbarch
->long_long_bit
;
2172 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2175 gdbarch
->long_long_bit
= long_long_bit
;
2179 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2181 /* Skip verify of float_bit, invalid_p == 0 */
2182 if (gdbarch_debug
>= 2)
2183 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2184 return gdbarch
->float_bit
;
2188 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2191 gdbarch
->float_bit
= float_bit
;
2195 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2197 /* Skip verify of double_bit, invalid_p == 0 */
2198 if (gdbarch_debug
>= 2)
2199 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2200 return gdbarch
->double_bit
;
2204 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2207 gdbarch
->double_bit
= double_bit
;
2211 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2213 /* Skip verify of long_double_bit, invalid_p == 0 */
2214 if (gdbarch_debug
>= 2)
2215 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2216 return gdbarch
->long_double_bit
;
2220 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2221 int long_double_bit
)
2223 gdbarch
->long_double_bit
= long_double_bit
;
2227 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2229 /* Skip verify of ptr_bit, invalid_p == 0 */
2230 if (gdbarch_debug
>= 2)
2231 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2232 return gdbarch
->ptr_bit
;
2236 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2239 gdbarch
->ptr_bit
= ptr_bit
;
2243 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2245 if (gdbarch
->addr_bit
== 0)
2246 internal_error (__FILE__
, __LINE__
,
2247 "gdbarch: gdbarch_addr_bit invalid");
2248 if (gdbarch_debug
>= 2)
2249 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2250 return gdbarch
->addr_bit
;
2254 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2257 gdbarch
->addr_bit
= addr_bit
;
2261 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2263 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2264 if (gdbarch_debug
>= 2)
2265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2266 return gdbarch
->bfd_vma_bit
;
2270 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2273 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2277 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2279 /* Skip verify of ieee_float, invalid_p == 0 */
2280 if (gdbarch_debug
>= 2)
2281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2282 return gdbarch
->ieee_float
;
2286 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2289 gdbarch
->ieee_float
= ieee_float
;
2293 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2295 if (gdbarch
->read_pc
== 0)
2296 internal_error (__FILE__
, __LINE__
,
2297 "gdbarch: gdbarch_read_pc invalid");
2298 if (gdbarch_debug
>= 2)
2299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2300 return gdbarch
->read_pc (ptid
);
2304 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2305 gdbarch_read_pc_ftype read_pc
)
2307 gdbarch
->read_pc
= read_pc
;
2311 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2313 if (gdbarch
->write_pc
== 0)
2314 internal_error (__FILE__
, __LINE__
,
2315 "gdbarch: gdbarch_write_pc invalid");
2316 if (gdbarch_debug
>= 2)
2317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2318 gdbarch
->write_pc (val
, ptid
);
2322 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2323 gdbarch_write_pc_ftype write_pc
)
2325 gdbarch
->write_pc
= write_pc
;
2329 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2331 if (gdbarch
->read_fp
== 0)
2332 internal_error (__FILE__
, __LINE__
,
2333 "gdbarch: gdbarch_read_fp invalid");
2334 if (gdbarch_debug
>= 2)
2335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2336 return gdbarch
->read_fp ();
2340 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2341 gdbarch_read_fp_ftype read_fp
)
2343 gdbarch
->read_fp
= read_fp
;
2347 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2349 if (gdbarch
->write_fp
== 0)
2350 internal_error (__FILE__
, __LINE__
,
2351 "gdbarch: gdbarch_write_fp invalid");
2352 if (gdbarch_debug
>= 2)
2353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2354 gdbarch
->write_fp (val
);
2358 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2359 gdbarch_write_fp_ftype write_fp
)
2361 gdbarch
->write_fp
= write_fp
;
2365 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2367 if (gdbarch
->read_sp
== 0)
2368 internal_error (__FILE__
, __LINE__
,
2369 "gdbarch: gdbarch_read_sp invalid");
2370 if (gdbarch_debug
>= 2)
2371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2372 return gdbarch
->read_sp ();
2376 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2377 gdbarch_read_sp_ftype read_sp
)
2379 gdbarch
->read_sp
= read_sp
;
2383 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2385 if (gdbarch
->write_sp
== 0)
2386 internal_error (__FILE__
, __LINE__
,
2387 "gdbarch: gdbarch_write_sp invalid");
2388 if (gdbarch_debug
>= 2)
2389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2390 gdbarch
->write_sp (val
);
2394 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2395 gdbarch_write_sp_ftype write_sp
)
2397 gdbarch
->write_sp
= write_sp
;
2401 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2403 if (gdbarch
->virtual_frame_pointer
== 0)
2404 internal_error (__FILE__
, __LINE__
,
2405 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2406 if (gdbarch_debug
>= 2)
2407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2408 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2412 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2413 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2415 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2419 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2421 return gdbarch
->register_read
!= 0;
2425 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2427 if (gdbarch
->register_read
== 0)
2428 internal_error (__FILE__
, __LINE__
,
2429 "gdbarch: gdbarch_register_read invalid");
2430 if (gdbarch_debug
>= 2)
2431 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2432 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2436 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2437 gdbarch_register_read_ftype register_read
)
2439 gdbarch
->register_read
= register_read
;
2443 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2445 return gdbarch
->register_write
!= 0;
2449 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2451 if (gdbarch
->register_write
== 0)
2452 internal_error (__FILE__
, __LINE__
,
2453 "gdbarch: gdbarch_register_write invalid");
2454 if (gdbarch_debug
>= 2)
2455 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2456 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2460 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2461 gdbarch_register_write_ftype register_write
)
2463 gdbarch
->register_write
= register_write
;
2467 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2469 if (gdbarch
->num_regs
== -1)
2470 internal_error (__FILE__
, __LINE__
,
2471 "gdbarch: gdbarch_num_regs invalid");
2472 if (gdbarch_debug
>= 2)
2473 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2474 return gdbarch
->num_regs
;
2478 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2481 gdbarch
->num_regs
= num_regs
;
2485 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2487 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2488 if (gdbarch_debug
>= 2)
2489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2490 return gdbarch
->num_pseudo_regs
;
2494 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2495 int num_pseudo_regs
)
2497 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2501 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2503 if (gdbarch
->sp_regnum
== -1)
2504 internal_error (__FILE__
, __LINE__
,
2505 "gdbarch: gdbarch_sp_regnum invalid");
2506 if (gdbarch_debug
>= 2)
2507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2508 return gdbarch
->sp_regnum
;
2512 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2515 gdbarch
->sp_regnum
= sp_regnum
;
2519 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2521 if (gdbarch
->fp_regnum
== -1)
2522 internal_error (__FILE__
, __LINE__
,
2523 "gdbarch: gdbarch_fp_regnum invalid");
2524 if (gdbarch_debug
>= 2)
2525 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2526 return gdbarch
->fp_regnum
;
2530 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2533 gdbarch
->fp_regnum
= fp_regnum
;
2537 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2539 if (gdbarch
->pc_regnum
== -1)
2540 internal_error (__FILE__
, __LINE__
,
2541 "gdbarch: gdbarch_pc_regnum invalid");
2542 if (gdbarch_debug
>= 2)
2543 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2544 return gdbarch
->pc_regnum
;
2548 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2551 gdbarch
->pc_regnum
= pc_regnum
;
2555 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2557 /* Skip verify of fp0_regnum, invalid_p == 0 */
2558 if (gdbarch_debug
>= 2)
2559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2560 return gdbarch
->fp0_regnum
;
2564 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2567 gdbarch
->fp0_regnum
= fp0_regnum
;
2571 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2573 /* Skip verify of npc_regnum, invalid_p == 0 */
2574 if (gdbarch_debug
>= 2)
2575 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2576 return gdbarch
->npc_regnum
;
2580 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2583 gdbarch
->npc_regnum
= npc_regnum
;
2587 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2589 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2590 if (gdbarch_debug
>= 2)
2591 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2592 return gdbarch
->nnpc_regnum
;
2596 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2599 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2603 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2605 if (gdbarch
->stab_reg_to_regnum
== 0)
2606 internal_error (__FILE__
, __LINE__
,
2607 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2608 if (gdbarch_debug
>= 2)
2609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2610 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2614 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2615 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2617 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2621 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2623 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2624 internal_error (__FILE__
, __LINE__
,
2625 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2626 if (gdbarch_debug
>= 2)
2627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2628 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2632 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2633 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2635 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2639 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2641 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2642 internal_error (__FILE__
, __LINE__
,
2643 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2644 if (gdbarch_debug
>= 2)
2645 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2646 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2650 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2651 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2653 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2657 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2659 if (gdbarch
->sdb_reg_to_regnum
== 0)
2660 internal_error (__FILE__
, __LINE__
,
2661 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2662 if (gdbarch_debug
>= 2)
2663 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2664 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2668 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2669 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2671 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2675 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2677 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2678 internal_error (__FILE__
, __LINE__
,
2679 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2680 if (gdbarch_debug
>= 2)
2681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2682 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2686 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2687 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2689 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2693 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2695 if (gdbarch
->register_name
== 0)
2696 internal_error (__FILE__
, __LINE__
,
2697 "gdbarch: gdbarch_register_name invalid");
2698 if (gdbarch_debug
>= 2)
2699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2700 return gdbarch
->register_name (regnr
);
2704 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2705 gdbarch_register_name_ftype register_name
)
2707 gdbarch
->register_name
= register_name
;
2711 gdbarch_register_size (struct gdbarch
*gdbarch
)
2713 if (gdbarch
->register_size
== -1)
2714 internal_error (__FILE__
, __LINE__
,
2715 "gdbarch: gdbarch_register_size invalid");
2716 if (gdbarch_debug
>= 2)
2717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2718 return gdbarch
->register_size
;
2722 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2725 gdbarch
->register_size
= register_size
;
2729 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2731 if (gdbarch
->register_bytes
== -1)
2732 internal_error (__FILE__
, __LINE__
,
2733 "gdbarch: gdbarch_register_bytes invalid");
2734 if (gdbarch_debug
>= 2)
2735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2736 return gdbarch
->register_bytes
;
2740 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2743 gdbarch
->register_bytes
= register_bytes
;
2747 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2749 if (gdbarch
->register_byte
== 0)
2750 internal_error (__FILE__
, __LINE__
,
2751 "gdbarch: gdbarch_register_byte invalid");
2752 if (gdbarch_debug
>= 2)
2753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2754 return gdbarch
->register_byte (reg_nr
);
2758 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2759 gdbarch_register_byte_ftype register_byte
)
2761 gdbarch
->register_byte
= register_byte
;
2765 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2767 if (gdbarch
->register_raw_size
== 0)
2768 internal_error (__FILE__
, __LINE__
,
2769 "gdbarch: gdbarch_register_raw_size invalid");
2770 if (gdbarch_debug
>= 2)
2771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2772 return gdbarch
->register_raw_size (reg_nr
);
2776 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2777 gdbarch_register_raw_size_ftype register_raw_size
)
2779 gdbarch
->register_raw_size
= register_raw_size
;
2783 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2785 if (gdbarch
->max_register_raw_size
== -1)
2786 internal_error (__FILE__
, __LINE__
,
2787 "gdbarch: gdbarch_max_register_raw_size invalid");
2788 if (gdbarch_debug
>= 2)
2789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2790 return gdbarch
->max_register_raw_size
;
2794 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2795 int max_register_raw_size
)
2797 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2801 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2803 if (gdbarch
->register_virtual_size
== 0)
2804 internal_error (__FILE__
, __LINE__
,
2805 "gdbarch: gdbarch_register_virtual_size invalid");
2806 if (gdbarch_debug
>= 2)
2807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2808 return gdbarch
->register_virtual_size (reg_nr
);
2812 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2813 gdbarch_register_virtual_size_ftype register_virtual_size
)
2815 gdbarch
->register_virtual_size
= register_virtual_size
;
2819 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2821 if (gdbarch
->max_register_virtual_size
== -1)
2822 internal_error (__FILE__
, __LINE__
,
2823 "gdbarch: gdbarch_max_register_virtual_size invalid");
2824 if (gdbarch_debug
>= 2)
2825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2826 return gdbarch
->max_register_virtual_size
;
2830 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2831 int max_register_virtual_size
)
2833 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2837 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2839 if (gdbarch
->register_virtual_type
== 0)
2840 internal_error (__FILE__
, __LINE__
,
2841 "gdbarch: gdbarch_register_virtual_type invalid");
2842 if (gdbarch_debug
>= 2)
2843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2844 return gdbarch
->register_virtual_type (reg_nr
);
2848 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2849 gdbarch_register_virtual_type_ftype register_virtual_type
)
2851 gdbarch
->register_virtual_type
= register_virtual_type
;
2855 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2857 if (gdbarch
->do_registers_info
== 0)
2858 internal_error (__FILE__
, __LINE__
,
2859 "gdbarch: gdbarch_do_registers_info invalid");
2860 if (gdbarch_debug
>= 2)
2861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2862 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2866 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2867 gdbarch_do_registers_info_ftype do_registers_info
)
2869 gdbarch
->do_registers_info
= do_registers_info
;
2873 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2875 if (gdbarch
->register_sim_regno
== 0)
2876 internal_error (__FILE__
, __LINE__
,
2877 "gdbarch: gdbarch_register_sim_regno invalid");
2878 if (gdbarch_debug
>= 2)
2879 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2880 return gdbarch
->register_sim_regno (reg_nr
);
2884 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2885 gdbarch_register_sim_regno_ftype register_sim_regno
)
2887 gdbarch
->register_sim_regno
= register_sim_regno
;
2891 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2893 return gdbarch
->register_bytes_ok
!= 0;
2897 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2899 if (gdbarch
->register_bytes_ok
== 0)
2900 internal_error (__FILE__
, __LINE__
,
2901 "gdbarch: gdbarch_register_bytes_ok invalid");
2902 if (gdbarch_debug
>= 2)
2903 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2904 return gdbarch
->register_bytes_ok (nr_bytes
);
2908 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2909 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2911 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2915 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2917 if (gdbarch
->cannot_fetch_register
== 0)
2918 internal_error (__FILE__
, __LINE__
,
2919 "gdbarch: gdbarch_cannot_fetch_register invalid");
2920 if (gdbarch_debug
>= 2)
2921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2922 return gdbarch
->cannot_fetch_register (regnum
);
2926 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2927 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2929 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2933 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2935 if (gdbarch
->cannot_store_register
== 0)
2936 internal_error (__FILE__
, __LINE__
,
2937 "gdbarch: gdbarch_cannot_store_register invalid");
2938 if (gdbarch_debug
>= 2)
2939 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2940 return gdbarch
->cannot_store_register (regnum
);
2944 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2945 gdbarch_cannot_store_register_ftype cannot_store_register
)
2947 gdbarch
->cannot_store_register
= cannot_store_register
;
2951 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2953 if (gdbarch
->use_generic_dummy_frames
== -1)
2954 internal_error (__FILE__
, __LINE__
,
2955 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2956 if (gdbarch_debug
>= 2)
2957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2958 return gdbarch
->use_generic_dummy_frames
;
2962 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2963 int use_generic_dummy_frames
)
2965 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2969 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2971 if (gdbarch
->call_dummy_location
== 0)
2972 internal_error (__FILE__
, __LINE__
,
2973 "gdbarch: gdbarch_call_dummy_location invalid");
2974 if (gdbarch_debug
>= 2)
2975 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2976 return gdbarch
->call_dummy_location
;
2980 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2981 int call_dummy_location
)
2983 gdbarch
->call_dummy_location
= call_dummy_location
;
2987 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2989 if (gdbarch
->call_dummy_address
== 0)
2990 internal_error (__FILE__
, __LINE__
,
2991 "gdbarch: gdbarch_call_dummy_address invalid");
2992 if (gdbarch_debug
>= 2)
2993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2994 return gdbarch
->call_dummy_address ();
2998 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2999 gdbarch_call_dummy_address_ftype call_dummy_address
)
3001 gdbarch
->call_dummy_address
= call_dummy_address
;
3005 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3007 if (gdbarch
->call_dummy_start_offset
== -1)
3008 internal_error (__FILE__
, __LINE__
,
3009 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3010 if (gdbarch_debug
>= 2)
3011 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3012 return gdbarch
->call_dummy_start_offset
;
3016 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3017 CORE_ADDR call_dummy_start_offset
)
3019 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3023 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3025 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3026 internal_error (__FILE__
, __LINE__
,
3027 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3028 if (gdbarch_debug
>= 2)
3029 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3030 return gdbarch
->call_dummy_breakpoint_offset
;
3034 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3035 CORE_ADDR call_dummy_breakpoint_offset
)
3037 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3041 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3043 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3044 internal_error (__FILE__
, __LINE__
,
3045 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3046 if (gdbarch_debug
>= 2)
3047 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3048 return gdbarch
->call_dummy_breakpoint_offset_p
;
3052 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3053 int call_dummy_breakpoint_offset_p
)
3055 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3059 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3061 if (gdbarch
->call_dummy_length
== -1)
3062 internal_error (__FILE__
, __LINE__
,
3063 "gdbarch: gdbarch_call_dummy_length invalid");
3064 if (gdbarch_debug
>= 2)
3065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3066 return gdbarch
->call_dummy_length
;
3070 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3071 int call_dummy_length
)
3073 gdbarch
->call_dummy_length
= call_dummy_length
;
3077 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3079 if (gdbarch
->pc_in_call_dummy
== 0)
3080 internal_error (__FILE__
, __LINE__
,
3081 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3082 if (gdbarch_debug
>= 2)
3083 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3084 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3088 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3089 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3091 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3095 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3097 if (gdbarch
->call_dummy_p
== -1)
3098 internal_error (__FILE__
, __LINE__
,
3099 "gdbarch: gdbarch_call_dummy_p invalid");
3100 if (gdbarch_debug
>= 2)
3101 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3102 return gdbarch
->call_dummy_p
;
3106 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3109 gdbarch
->call_dummy_p
= call_dummy_p
;
3113 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3115 /* Skip verify of call_dummy_words, invalid_p == 0 */
3116 if (gdbarch_debug
>= 2)
3117 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3118 return gdbarch
->call_dummy_words
;
3122 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3123 LONGEST
* call_dummy_words
)
3125 gdbarch
->call_dummy_words
= call_dummy_words
;
3129 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3131 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3132 if (gdbarch_debug
>= 2)
3133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3134 return gdbarch
->sizeof_call_dummy_words
;
3138 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3139 int sizeof_call_dummy_words
)
3141 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3145 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3147 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3148 internal_error (__FILE__
, __LINE__
,
3149 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3150 if (gdbarch_debug
>= 2)
3151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3152 return gdbarch
->call_dummy_stack_adjust_p
;
3156 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3157 int call_dummy_stack_adjust_p
)
3159 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3163 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3165 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3166 internal_error (__FILE__
, __LINE__
,
3167 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3168 if (gdbarch_debug
>= 2)
3169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3170 return gdbarch
->call_dummy_stack_adjust
;
3174 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3175 int call_dummy_stack_adjust
)
3177 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3181 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
)
3183 if (gdbarch
->fix_call_dummy
== 0)
3184 internal_error (__FILE__
, __LINE__
,
3185 "gdbarch: gdbarch_fix_call_dummy invalid");
3186 if (gdbarch_debug
>= 2)
3187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3188 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3192 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3193 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3195 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3199 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3201 if (gdbarch
->init_frame_pc_first
== 0)
3202 internal_error (__FILE__
, __LINE__
,
3203 "gdbarch: gdbarch_init_frame_pc_first invalid");
3204 if (gdbarch_debug
>= 2)
3205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3206 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3210 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3211 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3213 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3217 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3219 if (gdbarch
->init_frame_pc
== 0)
3220 internal_error (__FILE__
, __LINE__
,
3221 "gdbarch: gdbarch_init_frame_pc invalid");
3222 if (gdbarch_debug
>= 2)
3223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3224 gdbarch
->init_frame_pc (fromleaf
, prev
);
3228 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3229 gdbarch_init_frame_pc_ftype init_frame_pc
)
3231 gdbarch
->init_frame_pc
= init_frame_pc
;
3235 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3237 if (gdbarch_debug
>= 2)
3238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3239 return gdbarch
->believe_pcc_promotion
;
3243 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3244 int believe_pcc_promotion
)
3246 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3250 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3252 if (gdbarch_debug
>= 2)
3253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3254 return gdbarch
->believe_pcc_promotion_type
;
3258 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3259 int believe_pcc_promotion_type
)
3261 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3265 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3267 if (gdbarch
->coerce_float_to_double
== 0)
3268 internal_error (__FILE__
, __LINE__
,
3269 "gdbarch: gdbarch_coerce_float_to_double invalid");
3270 if (gdbarch_debug
>= 2)
3271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3272 return gdbarch
->coerce_float_to_double (formal
, actual
);
3276 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3277 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3279 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3283 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
)
3285 if (gdbarch
->get_saved_register
== 0)
3286 internal_error (__FILE__
, __LINE__
,
3287 "gdbarch: gdbarch_get_saved_register invalid");
3288 if (gdbarch_debug
>= 2)
3289 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3290 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3294 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3295 gdbarch_get_saved_register_ftype get_saved_register
)
3297 gdbarch
->get_saved_register
= get_saved_register
;
3301 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3303 if (gdbarch
->register_convertible
== 0)
3304 internal_error (__FILE__
, __LINE__
,
3305 "gdbarch: gdbarch_register_convertible invalid");
3306 if (gdbarch_debug
>= 2)
3307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3308 return gdbarch
->register_convertible (nr
);
3312 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3313 gdbarch_register_convertible_ftype register_convertible
)
3315 gdbarch
->register_convertible
= register_convertible
;
3319 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3321 if (gdbarch
->register_convert_to_virtual
== 0)
3322 internal_error (__FILE__
, __LINE__
,
3323 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3324 if (gdbarch_debug
>= 2)
3325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3326 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3330 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3331 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3333 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3337 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3339 if (gdbarch
->register_convert_to_raw
== 0)
3340 internal_error (__FILE__
, __LINE__
,
3341 "gdbarch: gdbarch_register_convert_to_raw invalid");
3342 if (gdbarch_debug
>= 2)
3343 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3344 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3348 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3349 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3351 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3355 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3357 if (gdbarch
->fetch_pseudo_register
== 0)
3358 internal_error (__FILE__
, __LINE__
,
3359 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3360 if (gdbarch_debug
>= 2)
3361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3362 gdbarch
->fetch_pseudo_register (regnum
);
3366 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3367 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3369 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3373 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3375 if (gdbarch
->store_pseudo_register
== 0)
3376 internal_error (__FILE__
, __LINE__
,
3377 "gdbarch: gdbarch_store_pseudo_register invalid");
3378 if (gdbarch_debug
>= 2)
3379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3380 gdbarch
->store_pseudo_register (regnum
);
3384 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3385 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3387 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3391 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3393 if (gdbarch
->pointer_to_address
== 0)
3394 internal_error (__FILE__
, __LINE__
,
3395 "gdbarch: gdbarch_pointer_to_address invalid");
3396 if (gdbarch_debug
>= 2)
3397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3398 return gdbarch
->pointer_to_address (type
, buf
);
3402 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3403 gdbarch_pointer_to_address_ftype pointer_to_address
)
3405 gdbarch
->pointer_to_address
= pointer_to_address
;
3409 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3411 if (gdbarch
->address_to_pointer
== 0)
3412 internal_error (__FILE__
, __LINE__
,
3413 "gdbarch: gdbarch_address_to_pointer invalid");
3414 if (gdbarch_debug
>= 2)
3415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3416 gdbarch
->address_to_pointer (type
, buf
, addr
);
3420 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3421 gdbarch_address_to_pointer_ftype address_to_pointer
)
3423 gdbarch
->address_to_pointer
= address_to_pointer
;
3427 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3429 return gdbarch
->integer_to_address
!= 0;
3433 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3435 if (gdbarch
->integer_to_address
== 0)
3436 internal_error (__FILE__
, __LINE__
,
3437 "gdbarch: gdbarch_integer_to_address invalid");
3438 if (gdbarch_debug
>= 2)
3439 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3440 return gdbarch
->integer_to_address (type
, buf
);
3444 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3445 gdbarch_integer_to_address_ftype integer_to_address
)
3447 gdbarch
->integer_to_address
= integer_to_address
;
3451 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3453 if (gdbarch
->return_value_on_stack
== 0)
3454 internal_error (__FILE__
, __LINE__
,
3455 "gdbarch: gdbarch_return_value_on_stack invalid");
3456 if (gdbarch_debug
>= 2)
3457 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3458 return gdbarch
->return_value_on_stack (type
);
3462 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3463 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3465 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3469 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3471 if (gdbarch
->extract_return_value
== 0)
3472 internal_error (__FILE__
, __LINE__
,
3473 "gdbarch: gdbarch_extract_return_value invalid");
3474 if (gdbarch_debug
>= 2)
3475 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3476 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3480 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3481 gdbarch_extract_return_value_ftype extract_return_value
)
3483 gdbarch
->extract_return_value
= extract_return_value
;
3487 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3489 if (gdbarch
->push_arguments
== 0)
3490 internal_error (__FILE__
, __LINE__
,
3491 "gdbarch: gdbarch_push_arguments invalid");
3492 if (gdbarch_debug
>= 2)
3493 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3494 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3498 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3499 gdbarch_push_arguments_ftype push_arguments
)
3501 gdbarch
->push_arguments
= push_arguments
;
3505 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3507 if (gdbarch
->push_dummy_frame
== 0)
3508 internal_error (__FILE__
, __LINE__
,
3509 "gdbarch: gdbarch_push_dummy_frame invalid");
3510 if (gdbarch_debug
>= 2)
3511 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3512 gdbarch
->push_dummy_frame ();
3516 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3517 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3519 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3523 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3525 if (gdbarch
->push_return_address
== 0)
3526 internal_error (__FILE__
, __LINE__
,
3527 "gdbarch: gdbarch_push_return_address invalid");
3528 if (gdbarch_debug
>= 2)
3529 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3530 return gdbarch
->push_return_address (pc
, sp
);
3534 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3535 gdbarch_push_return_address_ftype push_return_address
)
3537 gdbarch
->push_return_address
= push_return_address
;
3541 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3543 if (gdbarch
->pop_frame
== 0)
3544 internal_error (__FILE__
, __LINE__
,
3545 "gdbarch: gdbarch_pop_frame invalid");
3546 if (gdbarch_debug
>= 2)
3547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3548 gdbarch
->pop_frame ();
3552 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3553 gdbarch_pop_frame_ftype pop_frame
)
3555 gdbarch
->pop_frame
= pop_frame
;
3559 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3561 if (gdbarch
->store_struct_return
== 0)
3562 internal_error (__FILE__
, __LINE__
,
3563 "gdbarch: gdbarch_store_struct_return invalid");
3564 if (gdbarch_debug
>= 2)
3565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3566 gdbarch
->store_struct_return (addr
, sp
);
3570 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3571 gdbarch_store_struct_return_ftype store_struct_return
)
3573 gdbarch
->store_struct_return
= store_struct_return
;
3577 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3579 if (gdbarch
->store_return_value
== 0)
3580 internal_error (__FILE__
, __LINE__
,
3581 "gdbarch: gdbarch_store_return_value invalid");
3582 if (gdbarch_debug
>= 2)
3583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3584 gdbarch
->store_return_value (type
, valbuf
);
3588 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3589 gdbarch_store_return_value_ftype store_return_value
)
3591 gdbarch
->store_return_value
= store_return_value
;
3595 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3597 return gdbarch
->extract_struct_value_address
!= 0;
3601 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3603 if (gdbarch
->extract_struct_value_address
== 0)
3604 internal_error (__FILE__
, __LINE__
,
3605 "gdbarch: gdbarch_extract_struct_value_address invalid");
3606 if (gdbarch_debug
>= 2)
3607 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3608 return gdbarch
->extract_struct_value_address (regbuf
);
3612 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3613 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3615 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3619 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3621 if (gdbarch
->use_struct_convention
== 0)
3622 internal_error (__FILE__
, __LINE__
,
3623 "gdbarch: gdbarch_use_struct_convention invalid");
3624 if (gdbarch_debug
>= 2)
3625 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3626 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3630 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3631 gdbarch_use_struct_convention_ftype use_struct_convention
)
3633 gdbarch
->use_struct_convention
= use_struct_convention
;
3637 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3639 if (gdbarch
->frame_init_saved_regs
== 0)
3640 internal_error (__FILE__
, __LINE__
,
3641 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3642 if (gdbarch_debug
>= 2)
3643 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3644 gdbarch
->frame_init_saved_regs (frame
);
3648 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3649 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3651 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3655 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3657 if (gdbarch
->init_extra_frame_info
== 0)
3658 internal_error (__FILE__
, __LINE__
,
3659 "gdbarch: gdbarch_init_extra_frame_info invalid");
3660 if (gdbarch_debug
>= 2)
3661 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3662 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3666 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3667 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3669 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3673 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3675 if (gdbarch
->skip_prologue
== 0)
3676 internal_error (__FILE__
, __LINE__
,
3677 "gdbarch: gdbarch_skip_prologue invalid");
3678 if (gdbarch_debug
>= 2)
3679 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3680 return gdbarch
->skip_prologue (ip
);
3684 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3685 gdbarch_skip_prologue_ftype skip_prologue
)
3687 gdbarch
->skip_prologue
= skip_prologue
;
3691 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3693 if (gdbarch
->prologue_frameless_p
== 0)
3694 internal_error (__FILE__
, __LINE__
,
3695 "gdbarch: gdbarch_prologue_frameless_p invalid");
3696 if (gdbarch_debug
>= 2)
3697 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3698 return gdbarch
->prologue_frameless_p (ip
);
3702 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3703 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3705 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3709 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3711 if (gdbarch
->inner_than
== 0)
3712 internal_error (__FILE__
, __LINE__
,
3713 "gdbarch: gdbarch_inner_than invalid");
3714 if (gdbarch_debug
>= 2)
3715 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3716 return gdbarch
->inner_than (lhs
, rhs
);
3720 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3721 gdbarch_inner_than_ftype inner_than
)
3723 gdbarch
->inner_than
= inner_than
;
3727 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3729 if (gdbarch
->breakpoint_from_pc
== 0)
3730 internal_error (__FILE__
, __LINE__
,
3731 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3732 if (gdbarch_debug
>= 2)
3733 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3734 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3738 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3739 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3741 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3745 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3747 if (gdbarch
->memory_insert_breakpoint
== 0)
3748 internal_error (__FILE__
, __LINE__
,
3749 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3750 if (gdbarch_debug
>= 2)
3751 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3752 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3756 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3757 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3759 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3763 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3765 if (gdbarch
->memory_remove_breakpoint
== 0)
3766 internal_error (__FILE__
, __LINE__
,
3767 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3768 if (gdbarch_debug
>= 2)
3769 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3770 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3774 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3775 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3777 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3781 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3783 if (gdbarch
->decr_pc_after_break
== -1)
3784 internal_error (__FILE__
, __LINE__
,
3785 "gdbarch: gdbarch_decr_pc_after_break invalid");
3786 if (gdbarch_debug
>= 2)
3787 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3788 return gdbarch
->decr_pc_after_break
;
3792 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3793 CORE_ADDR decr_pc_after_break
)
3795 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3799 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3801 if (gdbarch
->prepare_to_proceed
== 0)
3802 internal_error (__FILE__
, __LINE__
,
3803 "gdbarch: gdbarch_prepare_to_proceed invalid");
3804 if (gdbarch_debug
>= 2)
3805 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3806 return gdbarch
->prepare_to_proceed (select_it
);
3810 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3811 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3813 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3817 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3819 if (gdbarch
->function_start_offset
== -1)
3820 internal_error (__FILE__
, __LINE__
,
3821 "gdbarch: gdbarch_function_start_offset invalid");
3822 if (gdbarch_debug
>= 2)
3823 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3824 return gdbarch
->function_start_offset
;
3828 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3829 CORE_ADDR function_start_offset
)
3831 gdbarch
->function_start_offset
= function_start_offset
;
3835 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3837 if (gdbarch
->remote_translate_xfer_address
== 0)
3838 internal_error (__FILE__
, __LINE__
,
3839 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3840 if (gdbarch_debug
>= 2)
3841 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3842 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3846 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3847 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3849 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3853 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3855 if (gdbarch
->frame_args_skip
== -1)
3856 internal_error (__FILE__
, __LINE__
,
3857 "gdbarch: gdbarch_frame_args_skip invalid");
3858 if (gdbarch_debug
>= 2)
3859 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3860 return gdbarch
->frame_args_skip
;
3864 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3865 CORE_ADDR frame_args_skip
)
3867 gdbarch
->frame_args_skip
= frame_args_skip
;
3871 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3873 if (gdbarch
->frameless_function_invocation
== 0)
3874 internal_error (__FILE__
, __LINE__
,
3875 "gdbarch: gdbarch_frameless_function_invocation invalid");
3876 if (gdbarch_debug
>= 2)
3877 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3878 return gdbarch
->frameless_function_invocation (fi
);
3882 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3883 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3885 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3889 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3891 if (gdbarch
->frame_chain
== 0)
3892 internal_error (__FILE__
, __LINE__
,
3893 "gdbarch: gdbarch_frame_chain invalid");
3894 if (gdbarch_debug
>= 2)
3895 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3896 return gdbarch
->frame_chain (frame
);
3900 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3901 gdbarch_frame_chain_ftype frame_chain
)
3903 gdbarch
->frame_chain
= frame_chain
;
3907 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3909 if (gdbarch
->frame_chain_valid
== 0)
3910 internal_error (__FILE__
, __LINE__
,
3911 "gdbarch: gdbarch_frame_chain_valid invalid");
3912 if (gdbarch_debug
>= 2)
3913 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3914 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3918 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3919 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3921 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3925 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3927 if (gdbarch
->frame_saved_pc
== 0)
3928 internal_error (__FILE__
, __LINE__
,
3929 "gdbarch: gdbarch_frame_saved_pc invalid");
3930 if (gdbarch_debug
>= 2)
3931 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3932 return gdbarch
->frame_saved_pc (fi
);
3936 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3937 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3939 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3943 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3945 if (gdbarch
->frame_args_address
== 0)
3946 internal_error (__FILE__
, __LINE__
,
3947 "gdbarch: gdbarch_frame_args_address invalid");
3948 if (gdbarch_debug
>= 2)
3949 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3950 return gdbarch
->frame_args_address (fi
);
3954 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3955 gdbarch_frame_args_address_ftype frame_args_address
)
3957 gdbarch
->frame_args_address
= frame_args_address
;
3961 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3963 if (gdbarch
->frame_locals_address
== 0)
3964 internal_error (__FILE__
, __LINE__
,
3965 "gdbarch: gdbarch_frame_locals_address invalid");
3966 if (gdbarch_debug
>= 2)
3967 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3968 return gdbarch
->frame_locals_address (fi
);
3972 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3973 gdbarch_frame_locals_address_ftype frame_locals_address
)
3975 gdbarch
->frame_locals_address
= frame_locals_address
;
3979 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3981 if (gdbarch
->saved_pc_after_call
== 0)
3982 internal_error (__FILE__
, __LINE__
,
3983 "gdbarch: gdbarch_saved_pc_after_call invalid");
3984 if (gdbarch_debug
>= 2)
3985 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3986 return gdbarch
->saved_pc_after_call (frame
);
3990 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3991 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3993 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3997 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3999 if (gdbarch
->frame_num_args
== 0)
4000 internal_error (__FILE__
, __LINE__
,
4001 "gdbarch: gdbarch_frame_num_args invalid");
4002 if (gdbarch_debug
>= 2)
4003 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4004 return gdbarch
->frame_num_args (frame
);
4008 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4009 gdbarch_frame_num_args_ftype frame_num_args
)
4011 gdbarch
->frame_num_args
= frame_num_args
;
4015 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4017 return gdbarch
->stack_align
!= 0;
4021 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4023 if (gdbarch
->stack_align
== 0)
4024 internal_error (__FILE__
, __LINE__
,
4025 "gdbarch: gdbarch_stack_align invalid");
4026 if (gdbarch_debug
>= 2)
4027 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4028 return gdbarch
->stack_align (sp
);
4032 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4033 gdbarch_stack_align_ftype stack_align
)
4035 gdbarch
->stack_align
= stack_align
;
4039 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4041 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4042 if (gdbarch_debug
>= 2)
4043 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4044 return gdbarch
->extra_stack_alignment_needed
;
4048 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4049 int extra_stack_alignment_needed
)
4051 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4055 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4057 return gdbarch
->reg_struct_has_addr
!= 0;
4061 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4063 if (gdbarch
->reg_struct_has_addr
== 0)
4064 internal_error (__FILE__
, __LINE__
,
4065 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4066 if (gdbarch_debug
>= 2)
4067 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4068 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4072 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4073 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4075 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4079 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4081 return gdbarch
->save_dummy_frame_tos
!= 0;
4085 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4087 if (gdbarch
->save_dummy_frame_tos
== 0)
4088 internal_error (__FILE__
, __LINE__
,
4089 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4090 if (gdbarch_debug
>= 2)
4091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4092 gdbarch
->save_dummy_frame_tos (sp
);
4096 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4097 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4099 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4103 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4105 if (gdbarch_debug
>= 2)
4106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4107 return gdbarch
->parm_boundary
;
4111 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4114 gdbarch
->parm_boundary
= parm_boundary
;
4117 const struct floatformat
*
4118 gdbarch_float_format (struct gdbarch
*gdbarch
)
4120 if (gdbarch_debug
>= 2)
4121 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4122 return gdbarch
->float_format
;
4126 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4127 const struct floatformat
* float_format
)
4129 gdbarch
->float_format
= float_format
;
4132 const struct floatformat
*
4133 gdbarch_double_format (struct gdbarch
*gdbarch
)
4135 if (gdbarch_debug
>= 2)
4136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4137 return gdbarch
->double_format
;
4141 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4142 const struct floatformat
* double_format
)
4144 gdbarch
->double_format
= double_format
;
4147 const struct floatformat
*
4148 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4150 if (gdbarch_debug
>= 2)
4151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4152 return gdbarch
->long_double_format
;
4156 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4157 const struct floatformat
* long_double_format
)
4159 gdbarch
->long_double_format
= long_double_format
;
4163 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4165 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4166 internal_error (__FILE__
, __LINE__
,
4167 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4168 if (gdbarch_debug
>= 2)
4169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4170 return gdbarch
->convert_from_func_ptr_addr (addr
);
4174 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4175 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4177 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4181 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4183 if (gdbarch
->addr_bits_remove
== 0)
4184 internal_error (__FILE__
, __LINE__
,
4185 "gdbarch: gdbarch_addr_bits_remove invalid");
4186 if (gdbarch_debug
>= 2)
4187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4188 return gdbarch
->addr_bits_remove (addr
);
4192 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4193 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4195 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4199 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4201 return gdbarch
->software_single_step
!= 0;
4205 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4207 if (gdbarch
->software_single_step
== 0)
4208 internal_error (__FILE__
, __LINE__
,
4209 "gdbarch: gdbarch_software_single_step invalid");
4210 if (gdbarch_debug
>= 2)
4211 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4212 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4216 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4217 gdbarch_software_single_step_ftype software_single_step
)
4219 gdbarch
->software_single_step
= software_single_step
;
4223 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4225 if (gdbarch
->print_insn
== 0)
4226 internal_error (__FILE__
, __LINE__
,
4227 "gdbarch: gdbarch_print_insn invalid");
4228 if (gdbarch_debug
>= 2)
4229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4230 return gdbarch
->print_insn (vma
, info
);
4234 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4235 gdbarch_print_insn_ftype print_insn
)
4237 gdbarch
->print_insn
= print_insn
;
4241 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4243 if (gdbarch
->skip_trampoline_code
== 0)
4244 internal_error (__FILE__
, __LINE__
,
4245 "gdbarch: gdbarch_skip_trampoline_code invalid");
4246 if (gdbarch_debug
>= 2)
4247 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4248 return gdbarch
->skip_trampoline_code (pc
);
4252 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4253 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4255 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4259 gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
, CORE_ADDR pc
, char *name
)
4261 if (gdbarch
->in_solib_call_trampoline
== 0)
4262 internal_error (__FILE__
, __LINE__
,
4263 "gdbarch: gdbarch_in_solib_call_trampoline invalid");
4264 if (gdbarch_debug
>= 2)
4265 fprintf_unfiltered (gdb_stdlog
, "gdbarch_in_solib_call_trampoline called\n");
4266 return gdbarch
->in_solib_call_trampoline (pc
, name
);
4270 set_gdbarch_in_solib_call_trampoline (struct gdbarch
*gdbarch
,
4271 gdbarch_in_solib_call_trampoline_ftype in_solib_call_trampoline
)
4273 gdbarch
->in_solib_call_trampoline
= in_solib_call_trampoline
;
4277 /* Keep a registry of per-architecture data-pointers required by GDB
4283 gdbarch_data_init_ftype
*init
;
4284 gdbarch_data_free_ftype
*free
;
4287 struct gdbarch_data_registration
4289 struct gdbarch_data
*data
;
4290 struct gdbarch_data_registration
*next
;
4293 struct gdbarch_data_registry
4296 struct gdbarch_data_registration
*registrations
;
4299 struct gdbarch_data_registry gdbarch_data_registry
=
4304 struct gdbarch_data
*
4305 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4306 gdbarch_data_free_ftype
*free
)
4308 struct gdbarch_data_registration
**curr
;
4309 for (curr
= &gdbarch_data_registry
.registrations
;
4311 curr
= &(*curr
)->next
);
4312 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4313 (*curr
)->next
= NULL
;
4314 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4315 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4316 (*curr
)->data
->init
= init
;
4317 (*curr
)->data
->free
= free
;
4318 return (*curr
)->data
;
4322 /* Walk through all the registered users initializing each in turn. */
4325 init_gdbarch_data (struct gdbarch
*gdbarch
)
4327 struct gdbarch_data_registration
*rego
;
4328 for (rego
= gdbarch_data_registry
.registrations
;
4332 struct gdbarch_data
*data
= rego
->data
;
4333 gdb_assert (data
->index
< gdbarch
->nr_data
);
4334 if (data
->init
!= NULL
)
4336 void *pointer
= data
->init (gdbarch
);
4337 set_gdbarch_data (gdbarch
, data
, pointer
);
4342 /* Create/delete the gdbarch data vector. */
4345 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4347 gdb_assert (gdbarch
->data
== NULL
);
4348 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4349 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4353 free_gdbarch_data (struct gdbarch
*gdbarch
)
4355 struct gdbarch_data_registration
*rego
;
4356 gdb_assert (gdbarch
->data
!= NULL
);
4357 for (rego
= gdbarch_data_registry
.registrations
;
4361 struct gdbarch_data
*data
= rego
->data
;
4362 gdb_assert (data
->index
< gdbarch
->nr_data
);
4363 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4365 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4366 gdbarch
->data
[data
->index
] = NULL
;
4369 xfree (gdbarch
->data
);
4370 gdbarch
->data
= NULL
;
4374 /* Initialize the current value of thee specified per-architecture
4378 set_gdbarch_data (struct gdbarch
*gdbarch
,
4379 struct gdbarch_data
*data
,
4382 gdb_assert (data
->index
< gdbarch
->nr_data
);
4383 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4384 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4385 gdbarch
->data
[data
->index
] = pointer
;
4388 /* Return the current value of the specified per-architecture
4392 gdbarch_data (struct gdbarch_data
*data
)
4394 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4395 return current_gdbarch
->data
[data
->index
];
4400 /* Keep a registry of swapped data required by GDB modules. */
4405 struct gdbarch_swap_registration
*source
;
4406 struct gdbarch_swap
*next
;
4409 struct gdbarch_swap_registration
4412 unsigned long sizeof_data
;
4413 gdbarch_swap_ftype
*init
;
4414 struct gdbarch_swap_registration
*next
;
4417 struct gdbarch_swap_registry
4420 struct gdbarch_swap_registration
*registrations
;
4423 struct gdbarch_swap_registry gdbarch_swap_registry
=
4429 register_gdbarch_swap (void *data
,
4430 unsigned long sizeof_data
,
4431 gdbarch_swap_ftype
*init
)
4433 struct gdbarch_swap_registration
**rego
;
4434 for (rego
= &gdbarch_swap_registry
.registrations
;
4436 rego
= &(*rego
)->next
);
4437 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4438 (*rego
)->next
= NULL
;
4439 (*rego
)->init
= init
;
4440 (*rego
)->data
= data
;
4441 (*rego
)->sizeof_data
= sizeof_data
;
4446 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4448 struct gdbarch_swap_registration
*rego
;
4449 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4450 for (rego
= gdbarch_swap_registry
.registrations
;
4454 if (rego
->data
!= NULL
)
4456 (*curr
) = XMALLOC (struct gdbarch_swap
);
4457 (*curr
)->source
= rego
;
4458 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4459 (*curr
)->next
= NULL
;
4460 memset (rego
->data
, 0, rego
->sizeof_data
);
4461 curr
= &(*curr
)->next
;
4463 if (rego
->init
!= NULL
)
4469 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4471 struct gdbarch_swap
*curr
;
4472 for (curr
= gdbarch
->swap
;
4475 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4479 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4481 struct gdbarch_swap
*curr
;
4482 for (curr
= gdbarch
->swap
;
4485 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4489 /* Keep a registry of the architectures known by GDB. */
4491 struct gdbarch_registration
4493 enum bfd_architecture bfd_architecture
;
4494 gdbarch_init_ftype
*init
;
4495 gdbarch_dump_tdep_ftype
*dump_tdep
;
4496 struct gdbarch_list
*arches
;
4497 struct gdbarch_registration
*next
;
4500 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4503 append_name (const char ***buf
, int *nr
, const char *name
)
4505 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4511 gdbarch_printable_names (void)
4515 /* Accumulate a list of names based on the registed list of
4517 enum bfd_architecture a
;
4519 const char **arches
= NULL
;
4520 struct gdbarch_registration
*rego
;
4521 for (rego
= gdbarch_registry
;
4525 const struct bfd_arch_info
*ap
;
4526 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4528 internal_error (__FILE__
, __LINE__
,
4529 "gdbarch_architecture_names: multi-arch unknown");
4532 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4537 append_name (&arches
, &nr_arches
, NULL
);
4541 /* Just return all the architectures that BFD knows. Assume that
4542 the legacy architecture framework supports them. */
4543 return bfd_arch_list ();
4548 gdbarch_register (enum bfd_architecture bfd_architecture
,
4549 gdbarch_init_ftype
*init
,
4550 gdbarch_dump_tdep_ftype
*dump_tdep
)
4552 struct gdbarch_registration
**curr
;
4553 const struct bfd_arch_info
*bfd_arch_info
;
4554 /* Check that BFD recognizes this architecture */
4555 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4556 if (bfd_arch_info
== NULL
)
4558 internal_error (__FILE__
, __LINE__
,
4559 "gdbarch: Attempt to register unknown architecture (%d)",
4562 /* Check that we haven't seen this architecture before */
4563 for (curr
= &gdbarch_registry
;
4565 curr
= &(*curr
)->next
)
4567 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4568 internal_error (__FILE__
, __LINE__
,
4569 "gdbarch: Duplicate registraration of architecture (%s)",
4570 bfd_arch_info
->printable_name
);
4574 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4575 bfd_arch_info
->printable_name
,
4578 (*curr
) = XMALLOC (struct gdbarch_registration
);
4579 (*curr
)->bfd_architecture
= bfd_architecture
;
4580 (*curr
)->init
= init
;
4581 (*curr
)->dump_tdep
= dump_tdep
;
4582 (*curr
)->arches
= NULL
;
4583 (*curr
)->next
= NULL
;
4584 /* When non- multi-arch, install whatever target dump routine we've
4585 been provided - hopefully that routine has been written correctly
4586 and works regardless of multi-arch. */
4587 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4588 && startup_gdbarch
.dump_tdep
== NULL
)
4589 startup_gdbarch
.dump_tdep
= dump_tdep
;
4593 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4594 gdbarch_init_ftype
*init
)
4596 gdbarch_register (bfd_architecture
, init
, NULL
);
4600 /* Look for an architecture using gdbarch_info. Base search on only
4601 BFD_ARCH_INFO and BYTE_ORDER. */
4603 struct gdbarch_list
*
4604 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4605 const struct gdbarch_info
*info
)
4607 for (; arches
!= NULL
; arches
= arches
->next
)
4609 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4611 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4619 /* Update the current architecture. Return ZERO if the update request
4623 gdbarch_update_p (struct gdbarch_info info
)
4625 struct gdbarch
*new_gdbarch
;
4626 struct gdbarch_list
**list
;
4627 struct gdbarch_registration
*rego
;
4629 /* Fill in missing parts of the INFO struct using a number of
4630 sources: ``set ...''; INFOabfd supplied; existing target. */
4632 /* ``(gdb) set architecture ...'' */
4633 if (info
.bfd_arch_info
== NULL
4634 && !TARGET_ARCHITECTURE_AUTO
)
4635 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4636 if (info
.bfd_arch_info
== NULL
4637 && info
.abfd
!= NULL
4638 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4639 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4640 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4641 if (info
.bfd_arch_info
== NULL
)
4642 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4644 /* ``(gdb) set byte-order ...'' */
4645 if (info
.byte_order
== 0
4646 && !TARGET_BYTE_ORDER_AUTO
)
4647 info
.byte_order
= TARGET_BYTE_ORDER
;
4648 /* From the INFO struct. */
4649 if (info
.byte_order
== 0
4650 && info
.abfd
!= NULL
)
4651 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4652 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4654 /* From the current target. */
4655 if (info
.byte_order
== 0)
4656 info
.byte_order
= TARGET_BYTE_ORDER
;
4658 /* Must have found some sort of architecture. */
4659 gdb_assert (info
.bfd_arch_info
!= NULL
);
4663 fprintf_unfiltered (gdb_stdlog
,
4664 "gdbarch_update: info.bfd_arch_info %s\n",
4665 (info
.bfd_arch_info
!= NULL
4666 ? info
.bfd_arch_info
->printable_name
4668 fprintf_unfiltered (gdb_stdlog
,
4669 "gdbarch_update: info.byte_order %d (%s)\n",
4671 (info
.byte_order
== BIG_ENDIAN
? "big"
4672 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4674 fprintf_unfiltered (gdb_stdlog
,
4675 "gdbarch_update: info.abfd 0x%lx\n",
4677 fprintf_unfiltered (gdb_stdlog
,
4678 "gdbarch_update: info.tdep_info 0x%lx\n",
4679 (long) info
.tdep_info
);
4682 /* Find the target that knows about this architecture. */
4683 for (rego
= gdbarch_registry
;
4686 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4695 /* Ask the target for a replacement architecture. */
4696 new_gdbarch
= rego
->init (info
, rego
->arches
);
4698 /* Did the target like it? No. Reject the change. */
4699 if (new_gdbarch
== NULL
)
4702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4706 /* Did the architecture change? No. Do nothing. */
4707 if (current_gdbarch
== new_gdbarch
)
4710 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4712 new_gdbarch
->bfd_arch_info
->printable_name
);
4716 /* Swap all data belonging to the old target out */
4717 swapout_gdbarch_swap (current_gdbarch
);
4719 /* Is this a pre-existing architecture? Yes. Swap it in. */
4720 for (list
= ®o
->arches
;
4722 list
= &(*list
)->next
)
4724 if ((*list
)->gdbarch
== new_gdbarch
)
4727 fprintf_unfiltered (gdb_stdlog
,
4728 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4730 new_gdbarch
->bfd_arch_info
->printable_name
);
4731 current_gdbarch
= new_gdbarch
;
4732 swapin_gdbarch_swap (new_gdbarch
);
4733 architecture_changed_event ();
4738 /* Append this new architecture to this targets list. */
4739 (*list
) = XMALLOC (struct gdbarch_list
);
4740 (*list
)->next
= NULL
;
4741 (*list
)->gdbarch
= new_gdbarch
;
4743 /* Switch to this new architecture. Dump it out. */
4744 current_gdbarch
= new_gdbarch
;
4747 fprintf_unfiltered (gdb_stdlog
,
4748 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4750 new_gdbarch
->bfd_arch_info
->printable_name
);
4753 /* Check that the newly installed architecture is valid. Plug in
4754 any post init values. */
4755 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4756 verify_gdbarch (new_gdbarch
);
4758 /* Initialize the per-architecture memory (swap) areas.
4759 CURRENT_GDBARCH must be update before these modules are
4761 init_gdbarch_swap (new_gdbarch
);
4763 /* Initialize the per-architecture data-pointer of all parties that
4764 registered an interest in this architecture. CURRENT_GDBARCH
4765 must be updated before these modules are called. */
4766 init_gdbarch_data (new_gdbarch
);
4767 architecture_changed_event ();
4770 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4778 /* Pointer to the target-dependent disassembly function. */
4779 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4780 disassemble_info tm_print_insn_info
;
4783 extern void _initialize_gdbarch (void);
4786 _initialize_gdbarch (void)
4788 struct cmd_list_element
*c
;
4790 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4791 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4792 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4793 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4794 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4796 add_show_from_set (add_set_cmd ("arch",
4799 (char *)&gdbarch_debug
,
4800 "Set architecture debugging.\n\
4801 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4803 c
= add_set_cmd ("archdebug",
4806 (char *)&gdbarch_debug
,
4807 "Set architecture debugging.\n\
4808 When non-zero, architecture debugging is enabled.", &setlist
);
4810 deprecate_cmd (c
, "set debug arch");
4811 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");