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
;
259 /* The default architecture uses host values (for want of a better
262 extern const struct bfd_arch_info bfd_default_arch_struct
;
264 struct gdbarch startup_gdbarch
=
266 /* basic architecture information */
267 &bfd_default_arch_struct
,
269 /* target specific vector and its dump routine */
271 /*per-architecture data-pointers and swap regions */
273 /* Multi-arch values */
277 8 * sizeof (LONGEST
),
280 8 * sizeof (long double),
340 generic_get_saved_register
,
393 /* startup_gdbarch() */
396 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
398 /* Do any initialization needed for a non-multiarch configuration
399 after the _initialize_MODULE functions have been run. */
401 initialize_non_multiarch ()
403 alloc_gdbarch_data (&startup_gdbarch
);
404 init_gdbarch_data (&startup_gdbarch
);
408 /* Create a new ``struct gdbarch'' based on information provided by
409 ``struct gdbarch_info''. */
412 gdbarch_alloc (const struct gdbarch_info
*info
,
413 struct gdbarch_tdep
*tdep
)
415 /* NOTE: The new architecture variable is named ``current_gdbarch''
416 so that macros such as TARGET_DOUBLE_BIT, when expanded, refer to
417 the current local architecture and not the previous global
418 architecture. This ensures that the new architectures initial
419 values are not influenced by the previous architecture. Once
420 everything is parameterised with gdbarch, this will go away. */
421 struct gdbarch
*current_gdbarch
= XMALLOC (struct gdbarch
);
422 memset (current_gdbarch
, 0, sizeof (*current_gdbarch
));
424 alloc_gdbarch_data (current_gdbarch
);
426 current_gdbarch
->tdep
= tdep
;
428 current_gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
429 current_gdbarch
->byte_order
= info
->byte_order
;
431 /* Force the explicit initialization of these. */
432 current_gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
433 current_gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
434 current_gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
435 current_gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
436 current_gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
437 current_gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
438 current_gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
439 current_gdbarch
->ptr_bit
= TARGET_INT_BIT
;
440 current_gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
441 current_gdbarch
->read_pc
= generic_target_read_pc
;
442 current_gdbarch
->write_pc
= generic_target_write_pc
;
443 current_gdbarch
->read_fp
= generic_target_read_fp
;
444 current_gdbarch
->write_fp
= generic_target_write_fp
;
445 current_gdbarch
->read_sp
= generic_target_read_sp
;
446 current_gdbarch
->write_sp
= generic_target_write_sp
;
447 current_gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
448 current_gdbarch
->num_regs
= -1;
449 current_gdbarch
->sp_regnum
= -1;
450 current_gdbarch
->fp_regnum
= -1;
451 current_gdbarch
->pc_regnum
= -1;
452 current_gdbarch
->fp0_regnum
= -1;
453 current_gdbarch
->npc_regnum
= -1;
454 current_gdbarch
->nnpc_regnum
= -1;
455 current_gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
456 current_gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
457 current_gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
458 current_gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
459 current_gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
460 current_gdbarch
->register_name
= legacy_register_name
;
461 current_gdbarch
->register_size
= -1;
462 current_gdbarch
->register_bytes
= -1;
463 current_gdbarch
->max_register_raw_size
= -1;
464 current_gdbarch
->max_register_virtual_size
= -1;
465 current_gdbarch
->do_registers_info
= do_registers_info
;
466 current_gdbarch
->register_sim_regno
= default_register_sim_regno
;
467 current_gdbarch
->cannot_fetch_register
= cannot_register_not
;
468 current_gdbarch
->cannot_store_register
= cannot_register_not
;
469 current_gdbarch
->use_generic_dummy_frames
= -1;
470 current_gdbarch
->call_dummy_start_offset
= -1;
471 current_gdbarch
->call_dummy_breakpoint_offset
= -1;
472 current_gdbarch
->call_dummy_breakpoint_offset_p
= -1;
473 current_gdbarch
->call_dummy_length
= -1;
474 current_gdbarch
->call_dummy_p
= -1;
475 current_gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
476 current_gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
477 current_gdbarch
->call_dummy_stack_adjust_p
= -1;
478 current_gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
479 current_gdbarch
->init_frame_pc
= init_frame_pc_default
;
480 current_gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
481 current_gdbarch
->register_convertible
= generic_register_convertible_not
;
482 current_gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
483 current_gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
484 current_gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
485 current_gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
486 current_gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
487 current_gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
488 current_gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
489 current_gdbarch
->decr_pc_after_break
= -1;
490 current_gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
491 current_gdbarch
->function_start_offset
= -1;
492 current_gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
493 current_gdbarch
->frame_args_skip
= -1;
494 current_gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
495 current_gdbarch
->extra_stack_alignment_needed
= 1;
496 current_gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
497 current_gdbarch
->addr_bits_remove
= core_addr_identity
;
498 current_gdbarch
->print_insn
= legacy_print_insn
;
499 current_gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
500 /* gdbarch_alloc() */
502 return current_gdbarch
;
506 /* Free a gdbarch struct. This should never happen in normal
507 operation --- once you've created a gdbarch, you keep it around.
508 However, if an architecture's init function encounters an error
509 building the structure, it may need to clean up a partially
510 constructed gdbarch. */
513 gdbarch_free (struct gdbarch
*arch
)
515 gdb_assert (arch
!= NULL
);
516 free_gdbarch_data (arch
);
521 /* Ensure that all values in a GDBARCH are reasonable. */
524 verify_gdbarch (struct gdbarch
*gdbarch
)
526 /* Only perform sanity checks on a multi-arch target. */
530 if (gdbarch
->byte_order
== 0)
531 internal_error (__FILE__
, __LINE__
,
532 "verify_gdbarch: byte-order unset");
533 if (gdbarch
->bfd_arch_info
== NULL
)
534 internal_error (__FILE__
, __LINE__
,
535 "verify_gdbarch: bfd_arch_info unset");
536 /* Check those that need to be defined for the given multi-arch level. */
537 /* Skip verify of short_bit, invalid_p == 0 */
538 /* Skip verify of int_bit, invalid_p == 0 */
539 /* Skip verify of long_bit, invalid_p == 0 */
540 /* Skip verify of long_long_bit, invalid_p == 0 */
541 /* Skip verify of float_bit, invalid_p == 0 */
542 /* Skip verify of double_bit, invalid_p == 0 */
543 /* Skip verify of long_double_bit, invalid_p == 0 */
544 /* Skip verify of ptr_bit, invalid_p == 0 */
545 if (gdbarch
->addr_bit
== 0)
546 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
547 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
548 /* Skip verify of ieee_float, invalid_p == 0 */
549 /* Skip verify of read_pc, invalid_p == 0 */
550 /* Skip verify of write_pc, invalid_p == 0 */
551 /* Skip verify of read_fp, invalid_p == 0 */
552 /* Skip verify of write_fp, invalid_p == 0 */
553 /* Skip verify of read_sp, invalid_p == 0 */
554 /* Skip verify of write_sp, invalid_p == 0 */
555 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
556 /* Skip verify of register_read, has predicate */
557 /* Skip verify of register_write, has predicate */
558 if ((GDB_MULTI_ARCH
>= 2)
559 && (gdbarch
->num_regs
== -1))
560 internal_error (__FILE__
, __LINE__
,
561 "gdbarch: verify_gdbarch: num_regs invalid");
562 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
563 if ((GDB_MULTI_ARCH
>= 2)
564 && (gdbarch
->sp_regnum
== -1))
565 internal_error (__FILE__
, __LINE__
,
566 "gdbarch: verify_gdbarch: sp_regnum invalid");
567 if ((GDB_MULTI_ARCH
>= 2)
568 && (gdbarch
->fp_regnum
== -1))
569 internal_error (__FILE__
, __LINE__
,
570 "gdbarch: verify_gdbarch: fp_regnum invalid");
571 if ((GDB_MULTI_ARCH
>= 2)
572 && (gdbarch
->pc_regnum
== -1))
573 internal_error (__FILE__
, __LINE__
,
574 "gdbarch: verify_gdbarch: pc_regnum invalid");
575 /* Skip verify of fp0_regnum, invalid_p == 0 */
576 /* Skip verify of npc_regnum, invalid_p == 0 */
577 /* Skip verify of nnpc_regnum, invalid_p == 0 */
578 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
579 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
580 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
581 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
582 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
583 /* Skip verify of register_name, invalid_p == 0 */
584 if ((GDB_MULTI_ARCH
>= 2)
585 && (gdbarch
->register_size
== -1))
586 internal_error (__FILE__
, __LINE__
,
587 "gdbarch: verify_gdbarch: register_size invalid");
588 if ((GDB_MULTI_ARCH
>= 2)
589 && (gdbarch
->register_bytes
== -1))
590 internal_error (__FILE__
, __LINE__
,
591 "gdbarch: verify_gdbarch: register_bytes invalid");
592 if ((GDB_MULTI_ARCH
>= 2)
593 && (gdbarch
->register_byte
== 0))
594 internal_error (__FILE__
, __LINE__
,
595 "gdbarch: verify_gdbarch: register_byte invalid");
596 if ((GDB_MULTI_ARCH
>= 2)
597 && (gdbarch
->register_raw_size
== 0))
598 internal_error (__FILE__
, __LINE__
,
599 "gdbarch: verify_gdbarch: register_raw_size invalid");
600 if ((GDB_MULTI_ARCH
>= 2)
601 && (gdbarch
->max_register_raw_size
== -1))
602 internal_error (__FILE__
, __LINE__
,
603 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
604 if ((GDB_MULTI_ARCH
>= 2)
605 && (gdbarch
->register_virtual_size
== 0))
606 internal_error (__FILE__
, __LINE__
,
607 "gdbarch: verify_gdbarch: register_virtual_size invalid");
608 if ((GDB_MULTI_ARCH
>= 2)
609 && (gdbarch
->max_register_virtual_size
== -1))
610 internal_error (__FILE__
, __LINE__
,
611 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
612 if ((GDB_MULTI_ARCH
>= 2)
613 && (gdbarch
->register_virtual_type
== 0))
614 internal_error (__FILE__
, __LINE__
,
615 "gdbarch: verify_gdbarch: register_virtual_type invalid");
616 /* Skip verify of do_registers_info, invalid_p == 0 */
617 /* Skip verify of register_sim_regno, invalid_p == 0 */
618 /* Skip verify of register_bytes_ok, has predicate */
619 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
620 /* Skip verify of cannot_store_register, invalid_p == 0 */
621 if ((GDB_MULTI_ARCH
>= 1)
622 && (gdbarch
->use_generic_dummy_frames
== -1))
623 internal_error (__FILE__
, __LINE__
,
624 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
625 if ((GDB_MULTI_ARCH
>= 2)
626 && (gdbarch
->call_dummy_location
== 0))
627 internal_error (__FILE__
, __LINE__
,
628 "gdbarch: verify_gdbarch: call_dummy_location invalid");
629 if ((GDB_MULTI_ARCH
>= 2)
630 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
631 internal_error (__FILE__
, __LINE__
,
632 "gdbarch: verify_gdbarch: call_dummy_address invalid");
633 if ((GDB_MULTI_ARCH
>= 2)
634 && (gdbarch
->call_dummy_start_offset
== -1))
635 internal_error (__FILE__
, __LINE__
,
636 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
637 if ((GDB_MULTI_ARCH
>= 2)
638 && (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1))
639 internal_error (__FILE__
, __LINE__
,
640 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
641 if ((GDB_MULTI_ARCH
>= 1)
642 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
643 internal_error (__FILE__
, __LINE__
,
644 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
645 if ((GDB_MULTI_ARCH
>= 2)
646 && (gdbarch
->call_dummy_length
== -1))
647 internal_error (__FILE__
, __LINE__
,
648 "gdbarch: verify_gdbarch: call_dummy_length invalid");
649 if ((GDB_MULTI_ARCH
>= 2)
650 && (gdbarch
->pc_in_call_dummy
== 0))
651 internal_error (__FILE__
, __LINE__
,
652 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
653 if ((GDB_MULTI_ARCH
>= 1)
654 && (gdbarch
->call_dummy_p
== -1))
655 internal_error (__FILE__
, __LINE__
,
656 "gdbarch: verify_gdbarch: call_dummy_p invalid");
657 /* Skip verify of call_dummy_words, invalid_p == 0 */
658 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
659 if ((GDB_MULTI_ARCH
>= 1)
660 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
661 internal_error (__FILE__
, __LINE__
,
662 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
663 if ((GDB_MULTI_ARCH
>= 2)
664 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
665 internal_error (__FILE__
, __LINE__
,
666 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
667 if ((GDB_MULTI_ARCH
>= 2)
668 && (gdbarch
->fix_call_dummy
== 0))
669 internal_error (__FILE__
, __LINE__
,
670 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
671 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
672 /* Skip verify of init_frame_pc, invalid_p == 0 */
673 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
674 if ((GDB_MULTI_ARCH
>= 1)
675 && (gdbarch
->get_saved_register
== 0))
676 internal_error (__FILE__
, __LINE__
,
677 "gdbarch: verify_gdbarch: get_saved_register invalid");
678 /* Skip verify of register_convertible, invalid_p == 0 */
679 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
680 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
681 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
682 /* Skip verify of store_pseudo_register, invalid_p == 0 */
683 /* Skip verify of pointer_to_address, invalid_p == 0 */
684 /* Skip verify of address_to_pointer, invalid_p == 0 */
685 /* Skip verify of integer_to_address, has predicate */
686 /* Skip verify of return_value_on_stack, invalid_p == 0 */
687 if ((GDB_MULTI_ARCH
>= 2)
688 && (gdbarch
->extract_return_value
== 0))
689 internal_error (__FILE__
, __LINE__
,
690 "gdbarch: verify_gdbarch: extract_return_value invalid");
691 if ((GDB_MULTI_ARCH
>= 1)
692 && (gdbarch
->push_arguments
== 0))
693 internal_error (__FILE__
, __LINE__
,
694 "gdbarch: verify_gdbarch: push_arguments invalid");
695 if ((GDB_MULTI_ARCH
>= 2)
696 && (gdbarch
->push_dummy_frame
== 0))
697 internal_error (__FILE__
, __LINE__
,
698 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
699 if ((GDB_MULTI_ARCH
>= 1)
700 && (gdbarch
->push_return_address
== 0))
701 internal_error (__FILE__
, __LINE__
,
702 "gdbarch: verify_gdbarch: push_return_address invalid");
703 if ((GDB_MULTI_ARCH
>= 2)
704 && (gdbarch
->pop_frame
== 0))
705 internal_error (__FILE__
, __LINE__
,
706 "gdbarch: verify_gdbarch: pop_frame invalid");
707 if ((GDB_MULTI_ARCH
>= 2)
708 && (gdbarch
->store_struct_return
== 0))
709 internal_error (__FILE__
, __LINE__
,
710 "gdbarch: verify_gdbarch: store_struct_return invalid");
711 if ((GDB_MULTI_ARCH
>= 2)
712 && (gdbarch
->store_return_value
== 0))
713 internal_error (__FILE__
, __LINE__
,
714 "gdbarch: verify_gdbarch: store_return_value invalid");
715 /* Skip verify of extract_struct_value_address, has predicate */
716 if ((GDB_MULTI_ARCH
>= 2)
717 && (gdbarch
->use_struct_convention
== 0))
718 internal_error (__FILE__
, __LINE__
,
719 "gdbarch: verify_gdbarch: use_struct_convention invalid");
720 if ((GDB_MULTI_ARCH
>= 2)
721 && (gdbarch
->frame_init_saved_regs
== 0))
722 internal_error (__FILE__
, __LINE__
,
723 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
724 if ((GDB_MULTI_ARCH
>= 2)
725 && (gdbarch
->init_extra_frame_info
== 0))
726 internal_error (__FILE__
, __LINE__
,
727 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
728 if ((GDB_MULTI_ARCH
>= 2)
729 && (gdbarch
->skip_prologue
== 0))
730 internal_error (__FILE__
, __LINE__
,
731 "gdbarch: verify_gdbarch: skip_prologue invalid");
732 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
733 if ((GDB_MULTI_ARCH
>= 2)
734 && (gdbarch
->inner_than
== 0))
735 internal_error (__FILE__
, __LINE__
,
736 "gdbarch: verify_gdbarch: inner_than invalid");
737 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
738 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
739 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH
>= 2)
741 && (gdbarch
->decr_pc_after_break
== -1))
742 internal_error (__FILE__
, __LINE__
,
743 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
744 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
745 if ((GDB_MULTI_ARCH
>= 2)
746 && (gdbarch
->function_start_offset
== -1))
747 internal_error (__FILE__
, __LINE__
,
748 "gdbarch: verify_gdbarch: function_start_offset invalid");
749 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
750 if ((GDB_MULTI_ARCH
>= 2)
751 && (gdbarch
->frame_args_skip
== -1))
752 internal_error (__FILE__
, __LINE__
,
753 "gdbarch: verify_gdbarch: frame_args_skip invalid");
754 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
755 if ((GDB_MULTI_ARCH
>= 2)
756 && (gdbarch
->frame_chain
== 0))
757 internal_error (__FILE__
, __LINE__
,
758 "gdbarch: verify_gdbarch: frame_chain invalid");
759 if ((GDB_MULTI_ARCH
>= 1)
760 && (gdbarch
->frame_chain_valid
== 0))
761 internal_error (__FILE__
, __LINE__
,
762 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
763 if ((GDB_MULTI_ARCH
>= 2)
764 && (gdbarch
->frame_saved_pc
== 0))
765 internal_error (__FILE__
, __LINE__
,
766 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
767 if ((GDB_MULTI_ARCH
>= 2)
768 && (gdbarch
->frame_args_address
== 0))
769 internal_error (__FILE__
, __LINE__
,
770 "gdbarch: verify_gdbarch: frame_args_address invalid");
771 if ((GDB_MULTI_ARCH
>= 2)
772 && (gdbarch
->frame_locals_address
== 0))
773 internal_error (__FILE__
, __LINE__
,
774 "gdbarch: verify_gdbarch: frame_locals_address invalid");
775 if ((GDB_MULTI_ARCH
>= 2)
776 && (gdbarch
->saved_pc_after_call
== 0))
777 internal_error (__FILE__
, __LINE__
,
778 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
779 if ((GDB_MULTI_ARCH
>= 2)
780 && (gdbarch
->frame_num_args
== 0))
781 internal_error (__FILE__
, __LINE__
,
782 "gdbarch: verify_gdbarch: frame_num_args invalid");
783 /* Skip verify of stack_align, has predicate */
784 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
785 /* Skip verify of reg_struct_has_addr, has predicate */
786 /* Skip verify of save_dummy_frame_tos, has predicate */
787 if (gdbarch
->float_format
== 0)
788 gdbarch
->float_format
= default_float_format (gdbarch
);
789 if (gdbarch
->double_format
== 0)
790 gdbarch
->double_format
= default_double_format (gdbarch
);
791 if (gdbarch
->long_double_format
== 0)
792 gdbarch
->long_double_format
= &floatformat_unknown
;
793 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
794 /* Skip verify of addr_bits_remove, invalid_p == 0 */
795 /* Skip verify of software_single_step, has predicate */
796 /* Skip verify of print_insn, invalid_p == 0 */
797 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
801 /* Print out the details of the current architecture. */
803 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
804 just happens to match the global variable ``current_gdbarch''. That
805 way macros refering to that variable get the local and not the global
806 version - ulgh. Once everything is parameterised with gdbarch, this
810 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
812 fprintf_unfiltered (file
,
813 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: register_read = 0x%08lx\n",
818 (long) current_gdbarch
->register_read
);
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: register_write = 0x%08lx\n",
822 (long) current_gdbarch
->register_write
);
823 #ifdef ADDRESS_TO_POINTER
825 /* Macro might contain `[{}]' when not multi-arch */
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: %s # %s\n",
828 "ADDRESS_TO_POINTER(type, buf, addr)",
829 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
832 fprintf_unfiltered (file
,
833 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
834 (long) current_gdbarch
->address_to_pointer
835 /*ADDRESS_TO_POINTER ()*/);
837 #ifdef ADDR_BITS_REMOVE
838 fprintf_unfiltered (file
,
839 "gdbarch_dump: %s # %s\n",
840 "ADDR_BITS_REMOVE(addr)",
841 XSTRING (ADDR_BITS_REMOVE (addr
)));
843 fprintf_unfiltered (file
,
844 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
845 (long) current_gdbarch
->addr_bits_remove
846 /*ADDR_BITS_REMOVE ()*/);
848 #ifdef BELIEVE_PCC_PROMOTION
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
851 XSTRING (BELIEVE_PCC_PROMOTION
));
852 fprintf_unfiltered (file
,
853 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
854 (long) BELIEVE_PCC_PROMOTION
);
856 #ifdef BELIEVE_PCC_PROMOTION_TYPE
857 fprintf_unfiltered (file
,
858 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
859 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
862 (long) BELIEVE_PCC_PROMOTION_TYPE
);
864 #ifdef BREAKPOINT_FROM_PC
865 fprintf_unfiltered (file
,
866 "gdbarch_dump: %s # %s\n",
867 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
868 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
870 fprintf_unfiltered (file
,
871 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
872 (long) current_gdbarch
->breakpoint_from_pc
873 /*BREAKPOINT_FROM_PC ()*/);
875 #ifdef CALL_DUMMY_ADDRESS
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: %s # %s\n",
878 "CALL_DUMMY_ADDRESS()",
879 XSTRING (CALL_DUMMY_ADDRESS ()));
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
883 (long) current_gdbarch
->call_dummy_address
884 /*CALL_DUMMY_ADDRESS ()*/);
886 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
887 fprintf_unfiltered (file
,
888 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
889 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
890 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
891 fprintf_unfiltered (file
,
892 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
893 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
895 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
896 fprintf_unfiltered (file
,
897 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
898 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
901 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
903 #ifdef CALL_DUMMY_LENGTH
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
906 XSTRING (CALL_DUMMY_LENGTH
));
907 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
910 (long) CALL_DUMMY_LENGTH
);
912 #ifdef CALL_DUMMY_LOCATION
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
915 XSTRING (CALL_DUMMY_LOCATION
));
916 fprintf_unfiltered (file
,
917 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
918 (long) CALL_DUMMY_LOCATION
);
921 fprintf_unfiltered (file
,
922 "gdbarch_dump: CALL_DUMMY_P # %s\n",
923 XSTRING (CALL_DUMMY_P
));
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
926 (long) CALL_DUMMY_P
);
928 #ifdef CALL_DUMMY_STACK_ADJUST
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
931 XSTRING (CALL_DUMMY_STACK_ADJUST
));
932 if (CALL_DUMMY_STACK_ADJUST_P
)
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
935 (long) CALL_DUMMY_STACK_ADJUST
);
937 #ifdef CALL_DUMMY_STACK_ADJUST_P
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
940 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
943 (long) CALL_DUMMY_STACK_ADJUST_P
);
945 #ifdef CALL_DUMMY_START_OFFSET
946 fprintf_unfiltered (file
,
947 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
948 XSTRING (CALL_DUMMY_START_OFFSET
));
949 fprintf_unfiltered (file
,
950 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
951 (long) CALL_DUMMY_START_OFFSET
);
953 #ifdef CALL_DUMMY_WORDS
954 fprintf_unfiltered (file
,
955 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
956 XSTRING (CALL_DUMMY_WORDS
));
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
959 (long) CALL_DUMMY_WORDS
);
961 #ifdef CANNOT_FETCH_REGISTER
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: %s # %s\n",
964 "CANNOT_FETCH_REGISTER(regnum)",
965 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
967 fprintf_unfiltered (file
,
968 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
969 (long) current_gdbarch
->cannot_fetch_register
970 /*CANNOT_FETCH_REGISTER ()*/);
972 #ifdef CANNOT_STORE_REGISTER
973 fprintf_unfiltered (file
,
974 "gdbarch_dump: %s # %s\n",
975 "CANNOT_STORE_REGISTER(regnum)",
976 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
978 fprintf_unfiltered (file
,
979 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
980 (long) current_gdbarch
->cannot_store_register
981 /*CANNOT_STORE_REGISTER ()*/);
983 #ifdef COERCE_FLOAT_TO_DOUBLE
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: %s # %s\n",
986 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
987 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
989 fprintf_unfiltered (file
,
990 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
991 (long) current_gdbarch
->coerce_float_to_double
992 /*COERCE_FLOAT_TO_DOUBLE ()*/);
994 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
995 fprintf_unfiltered (file
,
996 "gdbarch_dump: %s # %s\n",
997 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
998 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1000 fprintf_unfiltered (file
,
1001 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
1002 (long) current_gdbarch
->convert_from_func_ptr_addr
1003 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
1005 #ifdef DECR_PC_AFTER_BREAK
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1008 XSTRING (DECR_PC_AFTER_BREAK
));
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1011 (long) DECR_PC_AFTER_BREAK
);
1013 #ifdef DO_REGISTERS_INFO
1015 /* Macro might contain `[{}]' when not multi-arch */
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: %s # %s\n",
1018 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1019 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1024 (long) current_gdbarch
->do_registers_info
1025 /*DO_REGISTERS_INFO ()*/);
1027 #ifdef DWARF2_REG_TO_REGNUM
1028 fprintf_unfiltered (file
,
1029 "gdbarch_dump: %s # %s\n",
1030 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1031 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1033 fprintf_unfiltered (file
,
1034 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1035 (long) current_gdbarch
->dwarf2_reg_to_regnum
1036 /*DWARF2_REG_TO_REGNUM ()*/);
1038 #ifdef DWARF_REG_TO_REGNUM
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: %s # %s\n",
1041 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1042 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1046 (long) current_gdbarch
->dwarf_reg_to_regnum
1047 /*DWARF_REG_TO_REGNUM ()*/);
1049 #ifdef ECOFF_REG_TO_REGNUM
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: %s # %s\n",
1052 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1053 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1057 (long) current_gdbarch
->ecoff_reg_to_regnum
1058 /*ECOFF_REG_TO_REGNUM ()*/);
1060 #ifdef EXTRACT_RETURN_VALUE
1062 /* Macro might contain `[{}]' when not multi-arch */
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: %s # %s\n",
1065 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1066 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1071 (long) current_gdbarch
->extract_return_value
1072 /*EXTRACT_RETURN_VALUE ()*/);
1074 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1075 fprintf_unfiltered (file
,
1076 "gdbarch_dump: %s # %s\n",
1077 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1078 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1082 (long) current_gdbarch
->extract_struct_value_address
1083 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1085 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1088 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1091 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
1093 #ifdef FETCH_PSEUDO_REGISTER
1095 /* Macro might contain `[{}]' when not multi-arch */
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: %s # %s\n",
1098 "FETCH_PSEUDO_REGISTER(regnum)",
1099 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1104 (long) current_gdbarch
->fetch_pseudo_register
1105 /*FETCH_PSEUDO_REGISTER ()*/);
1107 #ifdef FIX_CALL_DUMMY
1109 /* Macro might contain `[{}]' when not multi-arch */
1110 fprintf_unfiltered (file
,
1111 "gdbarch_dump: %s # %s\n",
1112 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1113 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1118 (long) current_gdbarch
->fix_call_dummy
1119 /*FIX_CALL_DUMMY ()*/);
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: FP0_REGNUM # %s\n",
1124 XSTRING (FP0_REGNUM
));
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: FP0_REGNUM = %ld\n",
1130 fprintf_unfiltered (file
,
1131 "gdbarch_dump: FP_REGNUM # %s\n",
1132 XSTRING (FP_REGNUM
));
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: FP_REGNUM = %ld\n",
1137 #ifdef FRAMELESS_FUNCTION_INVOCATION
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: %s # %s\n",
1140 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1141 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1143 fprintf_unfiltered (file
,
1144 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1145 (long) current_gdbarch
->frameless_function_invocation
1146 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1148 #ifdef FRAME_ARGS_ADDRESS
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: %s # %s\n",
1151 "FRAME_ARGS_ADDRESS(fi)",
1152 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1154 fprintf_unfiltered (file
,
1155 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1156 (long) current_gdbarch
->frame_args_address
1157 /*FRAME_ARGS_ADDRESS ()*/);
1159 #ifdef FRAME_ARGS_SKIP
1160 fprintf_unfiltered (file
,
1161 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1162 XSTRING (FRAME_ARGS_SKIP
));
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1165 (long) FRAME_ARGS_SKIP
);
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: %s # %s\n",
1170 "FRAME_CHAIN(frame)",
1171 XSTRING (FRAME_CHAIN (frame
)));
1173 fprintf_unfiltered (file
,
1174 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1175 (long) current_gdbarch
->frame_chain
1176 /*FRAME_CHAIN ()*/);
1178 #ifdef FRAME_CHAIN_VALID
1179 fprintf_unfiltered (file
,
1180 "gdbarch_dump: %s # %s\n",
1181 "FRAME_CHAIN_VALID(chain, thisframe)",
1182 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1184 fprintf_unfiltered (file
,
1185 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1186 (long) current_gdbarch
->frame_chain_valid
1187 /*FRAME_CHAIN_VALID ()*/);
1189 #ifdef FRAME_INIT_SAVED_REGS
1191 /* Macro might contain `[{}]' when not multi-arch */
1192 fprintf_unfiltered (file
,
1193 "gdbarch_dump: %s # %s\n",
1194 "FRAME_INIT_SAVED_REGS(frame)",
1195 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1200 (long) current_gdbarch
->frame_init_saved_regs
1201 /*FRAME_INIT_SAVED_REGS ()*/);
1203 #ifdef FRAME_LOCALS_ADDRESS
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: %s # %s\n",
1206 "FRAME_LOCALS_ADDRESS(fi)",
1207 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1209 fprintf_unfiltered (file
,
1210 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1211 (long) current_gdbarch
->frame_locals_address
1212 /*FRAME_LOCALS_ADDRESS ()*/);
1214 #ifdef FRAME_NUM_ARGS
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: %s # %s\n",
1217 "FRAME_NUM_ARGS(frame)",
1218 XSTRING (FRAME_NUM_ARGS (frame
)));
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1222 (long) current_gdbarch
->frame_num_args
1223 /*FRAME_NUM_ARGS ()*/);
1225 #ifdef FRAME_SAVED_PC
1226 fprintf_unfiltered (file
,
1227 "gdbarch_dump: %s # %s\n",
1228 "FRAME_SAVED_PC(fi)",
1229 XSTRING (FRAME_SAVED_PC (fi
)));
1231 fprintf_unfiltered (file
,
1232 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1233 (long) current_gdbarch
->frame_saved_pc
1234 /*FRAME_SAVED_PC ()*/);
1236 #ifdef FUNCTION_START_OFFSET
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1239 XSTRING (FUNCTION_START_OFFSET
));
1240 fprintf_unfiltered (file
,
1241 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1242 (long) FUNCTION_START_OFFSET
);
1244 #ifdef GET_SAVED_REGISTER
1246 /* Macro might contain `[{}]' when not multi-arch */
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: %s # %s\n",
1249 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1250 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1253 fprintf_unfiltered (file
,
1254 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1255 (long) current_gdbarch
->get_saved_register
1256 /*GET_SAVED_REGISTER ()*/);
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: IEEE_FLOAT # %s\n",
1261 XSTRING (IEEE_FLOAT
));
1262 fprintf_unfiltered (file
,
1263 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1266 #ifdef INIT_EXTRA_FRAME_INFO
1268 /* Macro might contain `[{}]' when not multi-arch */
1269 fprintf_unfiltered (file
,
1270 "gdbarch_dump: %s # %s\n",
1271 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1272 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1275 fprintf_unfiltered (file
,
1276 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1277 (long) current_gdbarch
->init_extra_frame_info
1278 /*INIT_EXTRA_FRAME_INFO ()*/);
1280 #ifdef INIT_FRAME_PC
1282 /* Macro might contain `[{}]' when not multi-arch */
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: %s # %s\n",
1285 "INIT_FRAME_PC(fromleaf, prev)",
1286 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1289 fprintf_unfiltered (file
,
1290 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1291 (long) current_gdbarch
->init_frame_pc
1292 /*INIT_FRAME_PC ()*/);
1294 #ifdef INIT_FRAME_PC_FIRST
1296 /* Macro might contain `[{}]' when not multi-arch */
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: %s # %s\n",
1299 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1300 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1305 (long) current_gdbarch
->init_frame_pc_first
1306 /*INIT_FRAME_PC_FIRST ()*/);
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: %s # %s\n",
1311 "INNER_THAN(lhs, rhs)",
1312 XSTRING (INNER_THAN (lhs
, rhs
)));
1314 fprintf_unfiltered (file
,
1315 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1316 (long) current_gdbarch
->inner_than
1319 #ifdef INTEGER_TO_ADDRESS
1320 fprintf_unfiltered (file
,
1321 "gdbarch_dump: %s # %s\n",
1322 "INTEGER_TO_ADDRESS(type, buf)",
1323 XSTRING (INTEGER_TO_ADDRESS (type
, buf
)));
1325 fprintf_unfiltered (file
,
1326 "gdbarch_dump: INTEGER_TO_ADDRESS = 0x%08lx\n",
1327 (long) current_gdbarch
->integer_to_address
1328 /*INTEGER_TO_ADDRESS ()*/);
1330 #ifdef MAX_REGISTER_RAW_SIZE
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1333 XSTRING (MAX_REGISTER_RAW_SIZE
));
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1336 (long) MAX_REGISTER_RAW_SIZE
);
1338 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1339 fprintf_unfiltered (file
,
1340 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1341 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1344 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1346 #ifdef MEMORY_INSERT_BREAKPOINT
1347 fprintf_unfiltered (file
,
1348 "gdbarch_dump: %s # %s\n",
1349 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1350 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1354 (long) current_gdbarch
->memory_insert_breakpoint
1355 /*MEMORY_INSERT_BREAKPOINT ()*/);
1357 #ifdef MEMORY_REMOVE_BREAKPOINT
1358 fprintf_unfiltered (file
,
1359 "gdbarch_dump: %s # %s\n",
1360 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1361 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1365 (long) current_gdbarch
->memory_remove_breakpoint
1366 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: NNPC_REGNUM # %s\n",
1371 XSTRING (NNPC_REGNUM
));
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1374 (long) NNPC_REGNUM
);
1377 fprintf_unfiltered (file
,
1378 "gdbarch_dump: NPC_REGNUM # %s\n",
1379 XSTRING (NPC_REGNUM
));
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: NPC_REGNUM = %ld\n",
1384 #ifdef NUM_PSEUDO_REGS
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1387 XSTRING (NUM_PSEUDO_REGS
));
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1390 (long) NUM_PSEUDO_REGS
);
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: NUM_REGS # %s\n",
1395 XSTRING (NUM_REGS
));
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: NUM_REGS = %ld\n",
1400 #ifdef PARM_BOUNDARY
1401 fprintf_unfiltered (file
,
1402 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1403 XSTRING (PARM_BOUNDARY
));
1404 fprintf_unfiltered (file
,
1405 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1406 (long) PARM_BOUNDARY
);
1408 #ifdef PC_IN_CALL_DUMMY
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: %s # %s\n",
1411 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1412 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1416 (long) current_gdbarch
->pc_in_call_dummy
1417 /*PC_IN_CALL_DUMMY ()*/);
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: PC_REGNUM # %s\n",
1422 XSTRING (PC_REGNUM
));
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: PC_REGNUM = %ld\n",
1427 #ifdef POINTER_TO_ADDRESS
1428 fprintf_unfiltered (file
,
1429 "gdbarch_dump: %s # %s\n",
1430 "POINTER_TO_ADDRESS(type, buf)",
1431 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1435 (long) current_gdbarch
->pointer_to_address
1436 /*POINTER_TO_ADDRESS ()*/);
1440 /* Macro might contain `[{}]' when not multi-arch */
1441 fprintf_unfiltered (file
,
1442 "gdbarch_dump: %s # %s\n",
1444 XSTRING (POP_FRAME (-)));
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1449 (long) current_gdbarch
->pop_frame
1452 #ifdef PREPARE_TO_PROCEED
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: %s # %s\n",
1455 "PREPARE_TO_PROCEED(select_it)",
1456 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1458 fprintf_unfiltered (file
,
1459 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1460 (long) current_gdbarch
->prepare_to_proceed
1461 /*PREPARE_TO_PROCEED ()*/);
1463 #ifdef PROLOGUE_FRAMELESS_P
1464 fprintf_unfiltered (file
,
1465 "gdbarch_dump: %s # %s\n",
1466 "PROLOGUE_FRAMELESS_P(ip)",
1467 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1469 fprintf_unfiltered (file
,
1470 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1471 (long) current_gdbarch
->prologue_frameless_p
1472 /*PROLOGUE_FRAMELESS_P ()*/);
1474 #ifdef PUSH_ARGUMENTS
1475 fprintf_unfiltered (file
,
1476 "gdbarch_dump: %s # %s\n",
1477 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1478 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1480 fprintf_unfiltered (file
,
1481 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1482 (long) current_gdbarch
->push_arguments
1483 /*PUSH_ARGUMENTS ()*/);
1485 #ifdef PUSH_DUMMY_FRAME
1487 /* Macro might contain `[{}]' when not multi-arch */
1488 fprintf_unfiltered (file
,
1489 "gdbarch_dump: %s # %s\n",
1490 "PUSH_DUMMY_FRAME(-)",
1491 XSTRING (PUSH_DUMMY_FRAME (-)));
1494 fprintf_unfiltered (file
,
1495 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1496 (long) current_gdbarch
->push_dummy_frame
1497 /*PUSH_DUMMY_FRAME ()*/);
1499 #ifdef PUSH_RETURN_ADDRESS
1500 fprintf_unfiltered (file
,
1501 "gdbarch_dump: %s # %s\n",
1502 "PUSH_RETURN_ADDRESS(pc, sp)",
1503 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1505 fprintf_unfiltered (file
,
1506 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1507 (long) current_gdbarch
->push_return_address
1508 /*PUSH_RETURN_ADDRESS ()*/);
1510 #ifdef REGISTER_BYTE
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: %s # %s\n",
1513 "REGISTER_BYTE(reg_nr)",
1514 XSTRING (REGISTER_BYTE (reg_nr
)));
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1518 (long) current_gdbarch
->register_byte
1519 /*REGISTER_BYTE ()*/);
1521 #ifdef REGISTER_BYTES
1522 fprintf_unfiltered (file
,
1523 "gdbarch_dump: REGISTER_BYTES # %s\n",
1524 XSTRING (REGISTER_BYTES
));
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1527 (long) REGISTER_BYTES
);
1529 #ifdef REGISTER_BYTES_OK
1530 fprintf_unfiltered (file
,
1531 "gdbarch_dump: %s # %s\n",
1532 "REGISTER_BYTES_OK(nr_bytes)",
1533 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1535 fprintf_unfiltered (file
,
1536 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1537 (long) current_gdbarch
->register_bytes_ok
1538 /*REGISTER_BYTES_OK ()*/);
1540 #ifdef REGISTER_CONVERTIBLE
1541 fprintf_unfiltered (file
,
1542 "gdbarch_dump: %s # %s\n",
1543 "REGISTER_CONVERTIBLE(nr)",
1544 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1546 fprintf_unfiltered (file
,
1547 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1548 (long) current_gdbarch
->register_convertible
1549 /*REGISTER_CONVERTIBLE ()*/);
1551 #ifdef REGISTER_CONVERT_TO_RAW
1553 /* Macro might contain `[{}]' when not multi-arch */
1554 fprintf_unfiltered (file
,
1555 "gdbarch_dump: %s # %s\n",
1556 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1557 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1562 (long) current_gdbarch
->register_convert_to_raw
1563 /*REGISTER_CONVERT_TO_RAW ()*/);
1565 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1567 /* Macro might contain `[{}]' when not multi-arch */
1568 fprintf_unfiltered (file
,
1569 "gdbarch_dump: %s # %s\n",
1570 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1571 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1576 (long) current_gdbarch
->register_convert_to_virtual
1577 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1579 #ifdef REGISTER_NAME
1580 fprintf_unfiltered (file
,
1581 "gdbarch_dump: %s # %s\n",
1582 "REGISTER_NAME(regnr)",
1583 XSTRING (REGISTER_NAME (regnr
)));
1585 fprintf_unfiltered (file
,
1586 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1587 (long) current_gdbarch
->register_name
1588 /*REGISTER_NAME ()*/);
1590 #ifdef REGISTER_RAW_SIZE
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: %s # %s\n",
1593 "REGISTER_RAW_SIZE(reg_nr)",
1594 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1598 (long) current_gdbarch
->register_raw_size
1599 /*REGISTER_RAW_SIZE ()*/);
1601 #ifdef REGISTER_SIM_REGNO
1602 fprintf_unfiltered (file
,
1603 "gdbarch_dump: %s # %s\n",
1604 "REGISTER_SIM_REGNO(reg_nr)",
1605 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1607 fprintf_unfiltered (file
,
1608 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1609 (long) current_gdbarch
->register_sim_regno
1610 /*REGISTER_SIM_REGNO ()*/);
1612 #ifdef REGISTER_SIZE
1613 fprintf_unfiltered (file
,
1614 "gdbarch_dump: REGISTER_SIZE # %s\n",
1615 XSTRING (REGISTER_SIZE
));
1616 fprintf_unfiltered (file
,
1617 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1618 (long) REGISTER_SIZE
);
1620 #ifdef REGISTER_VIRTUAL_SIZE
1621 fprintf_unfiltered (file
,
1622 "gdbarch_dump: %s # %s\n",
1623 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1624 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1628 (long) current_gdbarch
->register_virtual_size
1629 /*REGISTER_VIRTUAL_SIZE ()*/);
1631 #ifdef REGISTER_VIRTUAL_TYPE
1632 fprintf_unfiltered (file
,
1633 "gdbarch_dump: %s # %s\n",
1634 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1635 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1637 fprintf_unfiltered (file
,
1638 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1639 (long) current_gdbarch
->register_virtual_type
1640 /*REGISTER_VIRTUAL_TYPE ()*/);
1642 #ifdef REG_STRUCT_HAS_ADDR
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: %s # %s\n",
1645 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1646 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1648 fprintf_unfiltered (file
,
1649 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1650 (long) current_gdbarch
->reg_struct_has_addr
1651 /*REG_STRUCT_HAS_ADDR ()*/);
1653 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1655 /* Macro might contain `[{}]' when not multi-arch */
1656 fprintf_unfiltered (file
,
1657 "gdbarch_dump: %s # %s\n",
1658 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1659 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1662 fprintf_unfiltered (file
,
1663 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1664 (long) current_gdbarch
->remote_translate_xfer_address
1665 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1667 #ifdef RETURN_VALUE_ON_STACK
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: %s # %s\n",
1670 "RETURN_VALUE_ON_STACK(type)",
1671 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1673 fprintf_unfiltered (file
,
1674 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1675 (long) current_gdbarch
->return_value_on_stack
1676 /*RETURN_VALUE_ON_STACK ()*/);
1678 #ifdef SAVED_PC_AFTER_CALL
1679 fprintf_unfiltered (file
,
1680 "gdbarch_dump: %s # %s\n",
1681 "SAVED_PC_AFTER_CALL(frame)",
1682 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1686 (long) current_gdbarch
->saved_pc_after_call
1687 /*SAVED_PC_AFTER_CALL ()*/);
1689 #ifdef SAVE_DUMMY_FRAME_TOS
1691 /* Macro might contain `[{}]' when not multi-arch */
1692 fprintf_unfiltered (file
,
1693 "gdbarch_dump: %s # %s\n",
1694 "SAVE_DUMMY_FRAME_TOS(sp)",
1695 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1698 fprintf_unfiltered (file
,
1699 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1700 (long) current_gdbarch
->save_dummy_frame_tos
1701 /*SAVE_DUMMY_FRAME_TOS ()*/);
1703 #ifdef SDB_REG_TO_REGNUM
1704 fprintf_unfiltered (file
,
1705 "gdbarch_dump: %s # %s\n",
1706 "SDB_REG_TO_REGNUM(sdb_regnr)",
1707 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1709 fprintf_unfiltered (file
,
1710 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1711 (long) current_gdbarch
->sdb_reg_to_regnum
1712 /*SDB_REG_TO_REGNUM ()*/);
1714 #ifdef SIZEOF_CALL_DUMMY_WORDS
1715 fprintf_unfiltered (file
,
1716 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1717 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1718 fprintf_unfiltered (file
,
1719 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1720 (long) SIZEOF_CALL_DUMMY_WORDS
);
1722 #ifdef SKIP_PROLOGUE
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: %s # %s\n",
1725 "SKIP_PROLOGUE(ip)",
1726 XSTRING (SKIP_PROLOGUE (ip
)));
1728 fprintf_unfiltered (file
,
1729 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1730 (long) current_gdbarch
->skip_prologue
1731 /*SKIP_PROLOGUE ()*/);
1733 #ifdef SKIP_TRAMPOLINE_CODE
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: %s # %s\n",
1736 "SKIP_TRAMPOLINE_CODE(pc)",
1737 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1739 fprintf_unfiltered (file
,
1740 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1741 (long) current_gdbarch
->skip_trampoline_code
1742 /*SKIP_TRAMPOLINE_CODE ()*/);
1744 #ifdef SOFTWARE_SINGLE_STEP
1746 /* Macro might contain `[{}]' when not multi-arch */
1747 fprintf_unfiltered (file
,
1748 "gdbarch_dump: %s # %s\n",
1749 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1750 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1753 fprintf_unfiltered (file
,
1754 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1755 (long) current_gdbarch
->software_single_step
1756 /*SOFTWARE_SINGLE_STEP ()*/);
1759 fprintf_unfiltered (file
,
1760 "gdbarch_dump: SP_REGNUM # %s\n",
1761 XSTRING (SP_REGNUM
));
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: SP_REGNUM = %ld\n",
1766 #ifdef STAB_REG_TO_REGNUM
1767 fprintf_unfiltered (file
,
1768 "gdbarch_dump: %s # %s\n",
1769 "STAB_REG_TO_REGNUM(stab_regnr)",
1770 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1772 fprintf_unfiltered (file
,
1773 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1774 (long) current_gdbarch
->stab_reg_to_regnum
1775 /*STAB_REG_TO_REGNUM ()*/);
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: %s # %s\n",
1781 XSTRING (STACK_ALIGN (sp
)));
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1785 (long) current_gdbarch
->stack_align
1786 /*STACK_ALIGN ()*/);
1788 #ifdef STORE_PSEUDO_REGISTER
1790 /* Macro might contain `[{}]' when not multi-arch */
1791 fprintf_unfiltered (file
,
1792 "gdbarch_dump: %s # %s\n",
1793 "STORE_PSEUDO_REGISTER(regnum)",
1794 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1797 fprintf_unfiltered (file
,
1798 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1799 (long) current_gdbarch
->store_pseudo_register
1800 /*STORE_PSEUDO_REGISTER ()*/);
1802 #ifdef STORE_RETURN_VALUE
1804 /* Macro might contain `[{}]' when not multi-arch */
1805 fprintf_unfiltered (file
,
1806 "gdbarch_dump: %s # %s\n",
1807 "STORE_RETURN_VALUE(type, valbuf)",
1808 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1813 (long) current_gdbarch
->store_return_value
1814 /*STORE_RETURN_VALUE ()*/);
1816 #ifdef STORE_STRUCT_RETURN
1818 /* Macro might contain `[{}]' when not multi-arch */
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: %s # %s\n",
1821 "STORE_STRUCT_RETURN(addr, sp)",
1822 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1825 fprintf_unfiltered (file
,
1826 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1827 (long) current_gdbarch
->store_struct_return
1828 /*STORE_STRUCT_RETURN ()*/);
1830 #ifdef TARGET_ADDR_BIT
1831 fprintf_unfiltered (file
,
1832 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1833 XSTRING (TARGET_ADDR_BIT
));
1834 fprintf_unfiltered (file
,
1835 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1836 (long) TARGET_ADDR_BIT
);
1838 #ifdef TARGET_ARCHITECTURE
1839 fprintf_unfiltered (file
,
1840 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1841 XSTRING (TARGET_ARCHITECTURE
));
1842 if (TARGET_ARCHITECTURE
!= NULL
)
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1845 TARGET_ARCHITECTURE
->printable_name
);
1847 #ifdef TARGET_BFD_VMA_BIT
1848 fprintf_unfiltered (file
,
1849 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1850 XSTRING (TARGET_BFD_VMA_BIT
));
1851 fprintf_unfiltered (file
,
1852 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1853 (long) TARGET_BFD_VMA_BIT
);
1855 #ifdef TARGET_BYTE_ORDER
1856 fprintf_unfiltered (file
,
1857 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1858 XSTRING (TARGET_BYTE_ORDER
));
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1861 (long) TARGET_BYTE_ORDER
);
1863 #ifdef TARGET_DOUBLE_BIT
1864 fprintf_unfiltered (file
,
1865 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1866 XSTRING (TARGET_DOUBLE_BIT
));
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1869 (long) TARGET_DOUBLE_BIT
);
1871 #ifdef TARGET_DOUBLE_FORMAT
1872 fprintf_unfiltered (file
,
1873 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1874 XSTRING (TARGET_DOUBLE_FORMAT
));
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1877 (long) TARGET_DOUBLE_FORMAT
);
1879 #ifdef TARGET_FLOAT_BIT
1880 fprintf_unfiltered (file
,
1881 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1882 XSTRING (TARGET_FLOAT_BIT
));
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1885 (long) TARGET_FLOAT_BIT
);
1887 #ifdef TARGET_FLOAT_FORMAT
1888 fprintf_unfiltered (file
,
1889 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1890 XSTRING (TARGET_FLOAT_FORMAT
));
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1893 (long) TARGET_FLOAT_FORMAT
);
1895 #ifdef TARGET_INT_BIT
1896 fprintf_unfiltered (file
,
1897 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1898 XSTRING (TARGET_INT_BIT
));
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1901 (long) TARGET_INT_BIT
);
1903 #ifdef TARGET_LONG_BIT
1904 fprintf_unfiltered (file
,
1905 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1906 XSTRING (TARGET_LONG_BIT
));
1907 fprintf_unfiltered (file
,
1908 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1909 (long) TARGET_LONG_BIT
);
1911 #ifdef TARGET_LONG_DOUBLE_BIT
1912 fprintf_unfiltered (file
,
1913 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1914 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1917 (long) TARGET_LONG_DOUBLE_BIT
);
1919 #ifdef TARGET_LONG_DOUBLE_FORMAT
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1922 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1923 fprintf_unfiltered (file
,
1924 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1925 (long) TARGET_LONG_DOUBLE_FORMAT
);
1927 #ifdef TARGET_LONG_LONG_BIT
1928 fprintf_unfiltered (file
,
1929 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1930 XSTRING (TARGET_LONG_LONG_BIT
));
1931 fprintf_unfiltered (file
,
1932 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1933 (long) TARGET_LONG_LONG_BIT
);
1935 #ifdef TARGET_PRINT_INSN
1936 fprintf_unfiltered (file
,
1937 "gdbarch_dump: %s # %s\n",
1938 "TARGET_PRINT_INSN(vma, info)",
1939 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1943 (long) current_gdbarch
->print_insn
1944 /*TARGET_PRINT_INSN ()*/);
1946 #ifdef TARGET_PTR_BIT
1947 fprintf_unfiltered (file
,
1948 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1949 XSTRING (TARGET_PTR_BIT
));
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1952 (long) TARGET_PTR_BIT
);
1954 #ifdef TARGET_READ_FP
1955 fprintf_unfiltered (file
,
1956 "gdbarch_dump: %s # %s\n",
1958 XSTRING (TARGET_READ_FP ()));
1960 fprintf_unfiltered (file
,
1961 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1962 (long) current_gdbarch
->read_fp
1963 /*TARGET_READ_FP ()*/);
1965 #ifdef TARGET_READ_PC
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: %s # %s\n",
1968 "TARGET_READ_PC(ptid)",
1969 XSTRING (TARGET_READ_PC (ptid
)));
1971 fprintf_unfiltered (file
,
1972 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1973 (long) current_gdbarch
->read_pc
1974 /*TARGET_READ_PC ()*/);
1976 #ifdef TARGET_READ_SP
1977 fprintf_unfiltered (file
,
1978 "gdbarch_dump: %s # %s\n",
1980 XSTRING (TARGET_READ_SP ()));
1982 fprintf_unfiltered (file
,
1983 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1984 (long) current_gdbarch
->read_sp
1985 /*TARGET_READ_SP ()*/);
1987 #ifdef TARGET_SHORT_BIT
1988 fprintf_unfiltered (file
,
1989 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1990 XSTRING (TARGET_SHORT_BIT
));
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1993 (long) TARGET_SHORT_BIT
);
1995 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1997 /* Macro might contain `[{}]' when not multi-arch */
1998 fprintf_unfiltered (file
,
1999 "gdbarch_dump: %s # %s\n",
2000 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
2001 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
2006 (long) current_gdbarch
->virtual_frame_pointer
2007 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
2009 #ifdef TARGET_WRITE_FP
2011 /* Macro might contain `[{}]' when not multi-arch */
2012 fprintf_unfiltered (file
,
2013 "gdbarch_dump: %s # %s\n",
2014 "TARGET_WRITE_FP(val)",
2015 XSTRING (TARGET_WRITE_FP (val
)));
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
2020 (long) current_gdbarch
->write_fp
2021 /*TARGET_WRITE_FP ()*/);
2023 #ifdef TARGET_WRITE_PC
2025 /* Macro might contain `[{}]' when not multi-arch */
2026 fprintf_unfiltered (file
,
2027 "gdbarch_dump: %s # %s\n",
2028 "TARGET_WRITE_PC(val, ptid)",
2029 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2034 (long) current_gdbarch
->write_pc
2035 /*TARGET_WRITE_PC ()*/);
2037 #ifdef TARGET_WRITE_SP
2039 /* Macro might contain `[{}]' when not multi-arch */
2040 fprintf_unfiltered (file
,
2041 "gdbarch_dump: %s # %s\n",
2042 "TARGET_WRITE_SP(val)",
2043 XSTRING (TARGET_WRITE_SP (val
)));
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2048 (long) current_gdbarch
->write_sp
2049 /*TARGET_WRITE_SP ()*/);
2051 #ifdef USE_GENERIC_DUMMY_FRAMES
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2054 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2057 (long) USE_GENERIC_DUMMY_FRAMES
);
2059 #ifdef USE_STRUCT_CONVENTION
2060 fprintf_unfiltered (file
,
2061 "gdbarch_dump: %s # %s\n",
2062 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2063 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2067 (long) current_gdbarch
->use_struct_convention
2068 /*USE_STRUCT_CONVENTION ()*/);
2070 if (current_gdbarch
->dump_tdep
!= NULL
)
2071 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2074 struct gdbarch_tdep
*
2075 gdbarch_tdep (struct gdbarch
*gdbarch
)
2077 if (gdbarch_debug
>= 2)
2078 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2079 return gdbarch
->tdep
;
2083 const struct bfd_arch_info
*
2084 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2086 if (gdbarch_debug
>= 2)
2087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2088 return gdbarch
->bfd_arch_info
;
2092 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2094 if (gdbarch_debug
>= 2)
2095 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2096 return gdbarch
->byte_order
;
2100 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2102 /* Skip verify of short_bit, invalid_p == 0 */
2103 if (gdbarch_debug
>= 2)
2104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2105 return gdbarch
->short_bit
;
2109 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2112 gdbarch
->short_bit
= short_bit
;
2116 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2118 /* Skip verify of int_bit, invalid_p == 0 */
2119 if (gdbarch_debug
>= 2)
2120 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2121 return gdbarch
->int_bit
;
2125 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2128 gdbarch
->int_bit
= int_bit
;
2132 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2134 /* Skip verify of long_bit, invalid_p == 0 */
2135 if (gdbarch_debug
>= 2)
2136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2137 return gdbarch
->long_bit
;
2141 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2144 gdbarch
->long_bit
= long_bit
;
2148 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2150 /* Skip verify of long_long_bit, invalid_p == 0 */
2151 if (gdbarch_debug
>= 2)
2152 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2153 return gdbarch
->long_long_bit
;
2157 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2160 gdbarch
->long_long_bit
= long_long_bit
;
2164 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2166 /* Skip verify of float_bit, invalid_p == 0 */
2167 if (gdbarch_debug
>= 2)
2168 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2169 return gdbarch
->float_bit
;
2173 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2176 gdbarch
->float_bit
= float_bit
;
2180 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2182 /* Skip verify of double_bit, invalid_p == 0 */
2183 if (gdbarch_debug
>= 2)
2184 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2185 return gdbarch
->double_bit
;
2189 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2192 gdbarch
->double_bit
= double_bit
;
2196 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2198 /* Skip verify of long_double_bit, invalid_p == 0 */
2199 if (gdbarch_debug
>= 2)
2200 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2201 return gdbarch
->long_double_bit
;
2205 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2206 int long_double_bit
)
2208 gdbarch
->long_double_bit
= long_double_bit
;
2212 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2214 /* Skip verify of ptr_bit, invalid_p == 0 */
2215 if (gdbarch_debug
>= 2)
2216 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2217 return gdbarch
->ptr_bit
;
2221 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2224 gdbarch
->ptr_bit
= ptr_bit
;
2228 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2230 if (gdbarch
->addr_bit
== 0)
2231 internal_error (__FILE__
, __LINE__
,
2232 "gdbarch: gdbarch_addr_bit invalid");
2233 if (gdbarch_debug
>= 2)
2234 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2235 return gdbarch
->addr_bit
;
2239 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2242 gdbarch
->addr_bit
= addr_bit
;
2246 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2248 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2249 if (gdbarch_debug
>= 2)
2250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2251 return gdbarch
->bfd_vma_bit
;
2255 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2258 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2262 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2264 /* Skip verify of ieee_float, invalid_p == 0 */
2265 if (gdbarch_debug
>= 2)
2266 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2267 return gdbarch
->ieee_float
;
2271 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2274 gdbarch
->ieee_float
= ieee_float
;
2278 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2280 if (gdbarch
->read_pc
== 0)
2281 internal_error (__FILE__
, __LINE__
,
2282 "gdbarch: gdbarch_read_pc invalid");
2283 if (gdbarch_debug
>= 2)
2284 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2285 return gdbarch
->read_pc (ptid
);
2289 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2290 gdbarch_read_pc_ftype read_pc
)
2292 gdbarch
->read_pc
= read_pc
;
2296 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2298 if (gdbarch
->write_pc
== 0)
2299 internal_error (__FILE__
, __LINE__
,
2300 "gdbarch: gdbarch_write_pc invalid");
2301 if (gdbarch_debug
>= 2)
2302 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2303 gdbarch
->write_pc (val
, ptid
);
2307 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2308 gdbarch_write_pc_ftype write_pc
)
2310 gdbarch
->write_pc
= write_pc
;
2314 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2316 if (gdbarch
->read_fp
== 0)
2317 internal_error (__FILE__
, __LINE__
,
2318 "gdbarch: gdbarch_read_fp invalid");
2319 if (gdbarch_debug
>= 2)
2320 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2321 return gdbarch
->read_fp ();
2325 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2326 gdbarch_read_fp_ftype read_fp
)
2328 gdbarch
->read_fp
= read_fp
;
2332 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2334 if (gdbarch
->write_fp
== 0)
2335 internal_error (__FILE__
, __LINE__
,
2336 "gdbarch: gdbarch_write_fp invalid");
2337 if (gdbarch_debug
>= 2)
2338 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2339 gdbarch
->write_fp (val
);
2343 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2344 gdbarch_write_fp_ftype write_fp
)
2346 gdbarch
->write_fp
= write_fp
;
2350 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2352 if (gdbarch
->read_sp
== 0)
2353 internal_error (__FILE__
, __LINE__
,
2354 "gdbarch: gdbarch_read_sp invalid");
2355 if (gdbarch_debug
>= 2)
2356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2357 return gdbarch
->read_sp ();
2361 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2362 gdbarch_read_sp_ftype read_sp
)
2364 gdbarch
->read_sp
= read_sp
;
2368 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2370 if (gdbarch
->write_sp
== 0)
2371 internal_error (__FILE__
, __LINE__
,
2372 "gdbarch: gdbarch_write_sp invalid");
2373 if (gdbarch_debug
>= 2)
2374 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2375 gdbarch
->write_sp (val
);
2379 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2380 gdbarch_write_sp_ftype write_sp
)
2382 gdbarch
->write_sp
= write_sp
;
2386 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2388 if (gdbarch
->virtual_frame_pointer
== 0)
2389 internal_error (__FILE__
, __LINE__
,
2390 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2391 if (gdbarch_debug
>= 2)
2392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2393 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2397 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2398 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2400 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2404 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2406 return gdbarch
->register_read
!= 0;
2410 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2412 if (gdbarch
->register_read
== 0)
2413 internal_error (__FILE__
, __LINE__
,
2414 "gdbarch: gdbarch_register_read invalid");
2415 if (gdbarch_debug
>= 2)
2416 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2417 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2421 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2422 gdbarch_register_read_ftype register_read
)
2424 gdbarch
->register_read
= register_read
;
2428 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2430 return gdbarch
->register_write
!= 0;
2434 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2436 if (gdbarch
->register_write
== 0)
2437 internal_error (__FILE__
, __LINE__
,
2438 "gdbarch: gdbarch_register_write invalid");
2439 if (gdbarch_debug
>= 2)
2440 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2441 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2445 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2446 gdbarch_register_write_ftype register_write
)
2448 gdbarch
->register_write
= register_write
;
2452 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2454 if (gdbarch
->num_regs
== -1)
2455 internal_error (__FILE__
, __LINE__
,
2456 "gdbarch: gdbarch_num_regs invalid");
2457 if (gdbarch_debug
>= 2)
2458 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2459 return gdbarch
->num_regs
;
2463 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2466 gdbarch
->num_regs
= num_regs
;
2470 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2472 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2473 if (gdbarch_debug
>= 2)
2474 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2475 return gdbarch
->num_pseudo_regs
;
2479 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2480 int num_pseudo_regs
)
2482 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2486 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2488 if (gdbarch
->sp_regnum
== -1)
2489 internal_error (__FILE__
, __LINE__
,
2490 "gdbarch: gdbarch_sp_regnum invalid");
2491 if (gdbarch_debug
>= 2)
2492 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2493 return gdbarch
->sp_regnum
;
2497 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2500 gdbarch
->sp_regnum
= sp_regnum
;
2504 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2506 if (gdbarch
->fp_regnum
== -1)
2507 internal_error (__FILE__
, __LINE__
,
2508 "gdbarch: gdbarch_fp_regnum invalid");
2509 if (gdbarch_debug
>= 2)
2510 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2511 return gdbarch
->fp_regnum
;
2515 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2518 gdbarch
->fp_regnum
= fp_regnum
;
2522 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2524 if (gdbarch
->pc_regnum
== -1)
2525 internal_error (__FILE__
, __LINE__
,
2526 "gdbarch: gdbarch_pc_regnum invalid");
2527 if (gdbarch_debug
>= 2)
2528 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2529 return gdbarch
->pc_regnum
;
2533 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2536 gdbarch
->pc_regnum
= pc_regnum
;
2540 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2542 /* Skip verify of fp0_regnum, invalid_p == 0 */
2543 if (gdbarch_debug
>= 2)
2544 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2545 return gdbarch
->fp0_regnum
;
2549 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2552 gdbarch
->fp0_regnum
= fp0_regnum
;
2556 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2558 /* Skip verify of npc_regnum, invalid_p == 0 */
2559 if (gdbarch_debug
>= 2)
2560 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2561 return gdbarch
->npc_regnum
;
2565 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2568 gdbarch
->npc_regnum
= npc_regnum
;
2572 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2574 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2575 if (gdbarch_debug
>= 2)
2576 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2577 return gdbarch
->nnpc_regnum
;
2581 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2584 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2588 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2590 if (gdbarch
->stab_reg_to_regnum
== 0)
2591 internal_error (__FILE__
, __LINE__
,
2592 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2593 if (gdbarch_debug
>= 2)
2594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2595 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2599 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2600 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2602 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2606 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2608 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2609 internal_error (__FILE__
, __LINE__
,
2610 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2611 if (gdbarch_debug
>= 2)
2612 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2613 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2617 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2618 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2620 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2624 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2626 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2627 internal_error (__FILE__
, __LINE__
,
2628 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2629 if (gdbarch_debug
>= 2)
2630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2631 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2635 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2636 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2638 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2642 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2644 if (gdbarch
->sdb_reg_to_regnum
== 0)
2645 internal_error (__FILE__
, __LINE__
,
2646 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2647 if (gdbarch_debug
>= 2)
2648 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2649 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2653 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2654 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2656 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2660 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2662 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2663 internal_error (__FILE__
, __LINE__
,
2664 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2665 if (gdbarch_debug
>= 2)
2666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2667 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2671 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2672 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2674 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2678 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2680 if (gdbarch
->register_name
== 0)
2681 internal_error (__FILE__
, __LINE__
,
2682 "gdbarch: gdbarch_register_name invalid");
2683 if (gdbarch_debug
>= 2)
2684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2685 return gdbarch
->register_name (regnr
);
2689 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2690 gdbarch_register_name_ftype register_name
)
2692 gdbarch
->register_name
= register_name
;
2696 gdbarch_register_size (struct gdbarch
*gdbarch
)
2698 if (gdbarch
->register_size
== -1)
2699 internal_error (__FILE__
, __LINE__
,
2700 "gdbarch: gdbarch_register_size invalid");
2701 if (gdbarch_debug
>= 2)
2702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2703 return gdbarch
->register_size
;
2707 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2710 gdbarch
->register_size
= register_size
;
2714 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2716 if (gdbarch
->register_bytes
== -1)
2717 internal_error (__FILE__
, __LINE__
,
2718 "gdbarch: gdbarch_register_bytes invalid");
2719 if (gdbarch_debug
>= 2)
2720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2721 return gdbarch
->register_bytes
;
2725 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2728 gdbarch
->register_bytes
= register_bytes
;
2732 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2734 if (gdbarch
->register_byte
== 0)
2735 internal_error (__FILE__
, __LINE__
,
2736 "gdbarch: gdbarch_register_byte invalid");
2737 if (gdbarch_debug
>= 2)
2738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2739 return gdbarch
->register_byte (reg_nr
);
2743 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2744 gdbarch_register_byte_ftype register_byte
)
2746 gdbarch
->register_byte
= register_byte
;
2750 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2752 if (gdbarch
->register_raw_size
== 0)
2753 internal_error (__FILE__
, __LINE__
,
2754 "gdbarch: gdbarch_register_raw_size invalid");
2755 if (gdbarch_debug
>= 2)
2756 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2757 return gdbarch
->register_raw_size (reg_nr
);
2761 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2762 gdbarch_register_raw_size_ftype register_raw_size
)
2764 gdbarch
->register_raw_size
= register_raw_size
;
2768 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2770 if (gdbarch
->max_register_raw_size
== -1)
2771 internal_error (__FILE__
, __LINE__
,
2772 "gdbarch: gdbarch_max_register_raw_size invalid");
2773 if (gdbarch_debug
>= 2)
2774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2775 return gdbarch
->max_register_raw_size
;
2779 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2780 int max_register_raw_size
)
2782 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2786 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2788 if (gdbarch
->register_virtual_size
== 0)
2789 internal_error (__FILE__
, __LINE__
,
2790 "gdbarch: gdbarch_register_virtual_size invalid");
2791 if (gdbarch_debug
>= 2)
2792 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2793 return gdbarch
->register_virtual_size (reg_nr
);
2797 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2798 gdbarch_register_virtual_size_ftype register_virtual_size
)
2800 gdbarch
->register_virtual_size
= register_virtual_size
;
2804 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2806 if (gdbarch
->max_register_virtual_size
== -1)
2807 internal_error (__FILE__
, __LINE__
,
2808 "gdbarch: gdbarch_max_register_virtual_size invalid");
2809 if (gdbarch_debug
>= 2)
2810 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2811 return gdbarch
->max_register_virtual_size
;
2815 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2816 int max_register_virtual_size
)
2818 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2822 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2824 if (gdbarch
->register_virtual_type
== 0)
2825 internal_error (__FILE__
, __LINE__
,
2826 "gdbarch: gdbarch_register_virtual_type invalid");
2827 if (gdbarch_debug
>= 2)
2828 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2829 return gdbarch
->register_virtual_type (reg_nr
);
2833 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2834 gdbarch_register_virtual_type_ftype register_virtual_type
)
2836 gdbarch
->register_virtual_type
= register_virtual_type
;
2840 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2842 if (gdbarch
->do_registers_info
== 0)
2843 internal_error (__FILE__
, __LINE__
,
2844 "gdbarch: gdbarch_do_registers_info invalid");
2845 if (gdbarch_debug
>= 2)
2846 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2847 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2851 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2852 gdbarch_do_registers_info_ftype do_registers_info
)
2854 gdbarch
->do_registers_info
= do_registers_info
;
2858 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2860 if (gdbarch
->register_sim_regno
== 0)
2861 internal_error (__FILE__
, __LINE__
,
2862 "gdbarch: gdbarch_register_sim_regno invalid");
2863 if (gdbarch_debug
>= 2)
2864 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2865 return gdbarch
->register_sim_regno (reg_nr
);
2869 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2870 gdbarch_register_sim_regno_ftype register_sim_regno
)
2872 gdbarch
->register_sim_regno
= register_sim_regno
;
2876 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2878 return gdbarch
->register_bytes_ok
!= 0;
2882 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2884 if (gdbarch
->register_bytes_ok
== 0)
2885 internal_error (__FILE__
, __LINE__
,
2886 "gdbarch: gdbarch_register_bytes_ok invalid");
2887 if (gdbarch_debug
>= 2)
2888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2889 return gdbarch
->register_bytes_ok (nr_bytes
);
2893 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2894 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2896 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2900 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2902 if (gdbarch
->cannot_fetch_register
== 0)
2903 internal_error (__FILE__
, __LINE__
,
2904 "gdbarch: gdbarch_cannot_fetch_register invalid");
2905 if (gdbarch_debug
>= 2)
2906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2907 return gdbarch
->cannot_fetch_register (regnum
);
2911 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2912 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2914 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2918 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2920 if (gdbarch
->cannot_store_register
== 0)
2921 internal_error (__FILE__
, __LINE__
,
2922 "gdbarch: gdbarch_cannot_store_register invalid");
2923 if (gdbarch_debug
>= 2)
2924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2925 return gdbarch
->cannot_store_register (regnum
);
2929 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2930 gdbarch_cannot_store_register_ftype cannot_store_register
)
2932 gdbarch
->cannot_store_register
= cannot_store_register
;
2936 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2938 if (gdbarch
->use_generic_dummy_frames
== -1)
2939 internal_error (__FILE__
, __LINE__
,
2940 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2941 if (gdbarch_debug
>= 2)
2942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2943 return gdbarch
->use_generic_dummy_frames
;
2947 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2948 int use_generic_dummy_frames
)
2950 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2954 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2956 if (gdbarch
->call_dummy_location
== 0)
2957 internal_error (__FILE__
, __LINE__
,
2958 "gdbarch: gdbarch_call_dummy_location invalid");
2959 if (gdbarch_debug
>= 2)
2960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2961 return gdbarch
->call_dummy_location
;
2965 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2966 int call_dummy_location
)
2968 gdbarch
->call_dummy_location
= call_dummy_location
;
2972 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2974 if (gdbarch
->call_dummy_address
== 0)
2975 internal_error (__FILE__
, __LINE__
,
2976 "gdbarch: gdbarch_call_dummy_address invalid");
2977 if (gdbarch_debug
>= 2)
2978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2979 return gdbarch
->call_dummy_address ();
2983 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2984 gdbarch_call_dummy_address_ftype call_dummy_address
)
2986 gdbarch
->call_dummy_address
= call_dummy_address
;
2990 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2992 if (gdbarch
->call_dummy_start_offset
== -1)
2993 internal_error (__FILE__
, __LINE__
,
2994 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2995 if (gdbarch_debug
>= 2)
2996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2997 return gdbarch
->call_dummy_start_offset
;
3001 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3002 CORE_ADDR call_dummy_start_offset
)
3004 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3008 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3010 if (gdbarch
->call_dummy_breakpoint_offset_p
&& gdbarch
->call_dummy_breakpoint_offset
== -1)
3011 internal_error (__FILE__
, __LINE__
,
3012 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3013 if (gdbarch_debug
>= 2)
3014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3015 return gdbarch
->call_dummy_breakpoint_offset
;
3019 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3020 CORE_ADDR call_dummy_breakpoint_offset
)
3022 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3026 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3028 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3029 internal_error (__FILE__
, __LINE__
,
3030 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3031 if (gdbarch_debug
>= 2)
3032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3033 return gdbarch
->call_dummy_breakpoint_offset_p
;
3037 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3038 int call_dummy_breakpoint_offset_p
)
3040 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3044 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3046 if (gdbarch
->call_dummy_length
== -1)
3047 internal_error (__FILE__
, __LINE__
,
3048 "gdbarch: gdbarch_call_dummy_length invalid");
3049 if (gdbarch_debug
>= 2)
3050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3051 return gdbarch
->call_dummy_length
;
3055 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3056 int call_dummy_length
)
3058 gdbarch
->call_dummy_length
= call_dummy_length
;
3062 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3064 if (gdbarch
->pc_in_call_dummy
== 0)
3065 internal_error (__FILE__
, __LINE__
,
3066 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3067 if (gdbarch_debug
>= 2)
3068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3069 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3073 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3074 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3076 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3080 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3082 if (gdbarch
->call_dummy_p
== -1)
3083 internal_error (__FILE__
, __LINE__
,
3084 "gdbarch: gdbarch_call_dummy_p invalid");
3085 if (gdbarch_debug
>= 2)
3086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3087 return gdbarch
->call_dummy_p
;
3091 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3094 gdbarch
->call_dummy_p
= call_dummy_p
;
3098 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3100 /* Skip verify of call_dummy_words, invalid_p == 0 */
3101 if (gdbarch_debug
>= 2)
3102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3103 return gdbarch
->call_dummy_words
;
3107 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3108 LONGEST
* call_dummy_words
)
3110 gdbarch
->call_dummy_words
= call_dummy_words
;
3114 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3116 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3117 if (gdbarch_debug
>= 2)
3118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3119 return gdbarch
->sizeof_call_dummy_words
;
3123 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3124 int sizeof_call_dummy_words
)
3126 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3130 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3132 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3133 internal_error (__FILE__
, __LINE__
,
3134 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3135 if (gdbarch_debug
>= 2)
3136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3137 return gdbarch
->call_dummy_stack_adjust_p
;
3141 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3142 int call_dummy_stack_adjust_p
)
3144 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3148 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3150 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3151 internal_error (__FILE__
, __LINE__
,
3152 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3153 if (gdbarch_debug
>= 2)
3154 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3155 return gdbarch
->call_dummy_stack_adjust
;
3159 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3160 int call_dummy_stack_adjust
)
3162 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3166 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
)
3168 if (gdbarch
->fix_call_dummy
== 0)
3169 internal_error (__FILE__
, __LINE__
,
3170 "gdbarch: gdbarch_fix_call_dummy invalid");
3171 if (gdbarch_debug
>= 2)
3172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3173 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3177 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3178 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3180 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3184 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3186 if (gdbarch
->init_frame_pc_first
== 0)
3187 internal_error (__FILE__
, __LINE__
,
3188 "gdbarch: gdbarch_init_frame_pc_first invalid");
3189 if (gdbarch_debug
>= 2)
3190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3191 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3195 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3196 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3198 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3202 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3204 if (gdbarch
->init_frame_pc
== 0)
3205 internal_error (__FILE__
, __LINE__
,
3206 "gdbarch: gdbarch_init_frame_pc invalid");
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3209 gdbarch
->init_frame_pc (fromleaf
, prev
);
3213 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3214 gdbarch_init_frame_pc_ftype init_frame_pc
)
3216 gdbarch
->init_frame_pc
= init_frame_pc
;
3220 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3222 if (gdbarch_debug
>= 2)
3223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3224 return gdbarch
->believe_pcc_promotion
;
3228 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3229 int believe_pcc_promotion
)
3231 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3235 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3237 if (gdbarch_debug
>= 2)
3238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3239 return gdbarch
->believe_pcc_promotion_type
;
3243 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3244 int believe_pcc_promotion_type
)
3246 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3250 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3252 if (gdbarch
->coerce_float_to_double
== 0)
3253 internal_error (__FILE__
, __LINE__
,
3254 "gdbarch: gdbarch_coerce_float_to_double invalid");
3255 if (gdbarch_debug
>= 2)
3256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3257 return gdbarch
->coerce_float_to_double (formal
, actual
);
3261 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3262 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3264 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3268 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
)
3270 if (gdbarch
->get_saved_register
== 0)
3271 internal_error (__FILE__
, __LINE__
,
3272 "gdbarch: gdbarch_get_saved_register invalid");
3273 if (gdbarch_debug
>= 2)
3274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3275 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3279 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3280 gdbarch_get_saved_register_ftype get_saved_register
)
3282 gdbarch
->get_saved_register
= get_saved_register
;
3286 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3288 if (gdbarch
->register_convertible
== 0)
3289 internal_error (__FILE__
, __LINE__
,
3290 "gdbarch: gdbarch_register_convertible invalid");
3291 if (gdbarch_debug
>= 2)
3292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3293 return gdbarch
->register_convertible (nr
);
3297 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3298 gdbarch_register_convertible_ftype register_convertible
)
3300 gdbarch
->register_convertible
= register_convertible
;
3304 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3306 if (gdbarch
->register_convert_to_virtual
== 0)
3307 internal_error (__FILE__
, __LINE__
,
3308 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3311 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3315 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3316 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3318 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3322 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3324 if (gdbarch
->register_convert_to_raw
== 0)
3325 internal_error (__FILE__
, __LINE__
,
3326 "gdbarch: gdbarch_register_convert_to_raw invalid");
3327 if (gdbarch_debug
>= 2)
3328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3329 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3333 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3334 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3336 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3340 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3342 if (gdbarch
->fetch_pseudo_register
== 0)
3343 internal_error (__FILE__
, __LINE__
,
3344 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3345 if (gdbarch_debug
>= 2)
3346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3347 gdbarch
->fetch_pseudo_register (regnum
);
3351 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3352 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3354 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3358 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3360 if (gdbarch
->store_pseudo_register
== 0)
3361 internal_error (__FILE__
, __LINE__
,
3362 "gdbarch: gdbarch_store_pseudo_register invalid");
3363 if (gdbarch_debug
>= 2)
3364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3365 gdbarch
->store_pseudo_register (regnum
);
3369 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3370 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3372 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3376 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3378 if (gdbarch
->pointer_to_address
== 0)
3379 internal_error (__FILE__
, __LINE__
,
3380 "gdbarch: gdbarch_pointer_to_address invalid");
3381 if (gdbarch_debug
>= 2)
3382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3383 return gdbarch
->pointer_to_address (type
, buf
);
3387 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3388 gdbarch_pointer_to_address_ftype pointer_to_address
)
3390 gdbarch
->pointer_to_address
= pointer_to_address
;
3394 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3396 if (gdbarch
->address_to_pointer
== 0)
3397 internal_error (__FILE__
, __LINE__
,
3398 "gdbarch: gdbarch_address_to_pointer invalid");
3399 if (gdbarch_debug
>= 2)
3400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3401 gdbarch
->address_to_pointer (type
, buf
, addr
);
3405 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3406 gdbarch_address_to_pointer_ftype address_to_pointer
)
3408 gdbarch
->address_to_pointer
= address_to_pointer
;
3412 gdbarch_integer_to_address_p (struct gdbarch
*gdbarch
)
3414 return gdbarch
->integer_to_address
!= 0;
3418 gdbarch_integer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3420 if (gdbarch
->integer_to_address
== 0)
3421 internal_error (__FILE__
, __LINE__
,
3422 "gdbarch: gdbarch_integer_to_address invalid");
3423 if (gdbarch_debug
>= 2)
3424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_integer_to_address called\n");
3425 return gdbarch
->integer_to_address (type
, buf
);
3429 set_gdbarch_integer_to_address (struct gdbarch
*gdbarch
,
3430 gdbarch_integer_to_address_ftype integer_to_address
)
3432 gdbarch
->integer_to_address
= integer_to_address
;
3436 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3438 if (gdbarch
->return_value_on_stack
== 0)
3439 internal_error (__FILE__
, __LINE__
,
3440 "gdbarch: gdbarch_return_value_on_stack invalid");
3441 if (gdbarch_debug
>= 2)
3442 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3443 return gdbarch
->return_value_on_stack (type
);
3447 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3448 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3450 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3454 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3456 if (gdbarch
->extract_return_value
== 0)
3457 internal_error (__FILE__
, __LINE__
,
3458 "gdbarch: gdbarch_extract_return_value invalid");
3459 if (gdbarch_debug
>= 2)
3460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3461 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3465 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3466 gdbarch_extract_return_value_ftype extract_return_value
)
3468 gdbarch
->extract_return_value
= extract_return_value
;
3472 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3474 if (gdbarch
->push_arguments
== 0)
3475 internal_error (__FILE__
, __LINE__
,
3476 "gdbarch: gdbarch_push_arguments invalid");
3477 if (gdbarch_debug
>= 2)
3478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3479 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3483 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3484 gdbarch_push_arguments_ftype push_arguments
)
3486 gdbarch
->push_arguments
= push_arguments
;
3490 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3492 if (gdbarch
->push_dummy_frame
== 0)
3493 internal_error (__FILE__
, __LINE__
,
3494 "gdbarch: gdbarch_push_dummy_frame invalid");
3495 if (gdbarch_debug
>= 2)
3496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3497 gdbarch
->push_dummy_frame ();
3501 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3502 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3504 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3508 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3510 if (gdbarch
->push_return_address
== 0)
3511 internal_error (__FILE__
, __LINE__
,
3512 "gdbarch: gdbarch_push_return_address invalid");
3513 if (gdbarch_debug
>= 2)
3514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3515 return gdbarch
->push_return_address (pc
, sp
);
3519 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3520 gdbarch_push_return_address_ftype push_return_address
)
3522 gdbarch
->push_return_address
= push_return_address
;
3526 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3528 if (gdbarch
->pop_frame
== 0)
3529 internal_error (__FILE__
, __LINE__
,
3530 "gdbarch: gdbarch_pop_frame invalid");
3531 if (gdbarch_debug
>= 2)
3532 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3533 gdbarch
->pop_frame ();
3537 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3538 gdbarch_pop_frame_ftype pop_frame
)
3540 gdbarch
->pop_frame
= pop_frame
;
3544 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3546 if (gdbarch
->store_struct_return
== 0)
3547 internal_error (__FILE__
, __LINE__
,
3548 "gdbarch: gdbarch_store_struct_return invalid");
3549 if (gdbarch_debug
>= 2)
3550 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3551 gdbarch
->store_struct_return (addr
, sp
);
3555 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3556 gdbarch_store_struct_return_ftype store_struct_return
)
3558 gdbarch
->store_struct_return
= store_struct_return
;
3562 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3564 if (gdbarch
->store_return_value
== 0)
3565 internal_error (__FILE__
, __LINE__
,
3566 "gdbarch: gdbarch_store_return_value invalid");
3567 if (gdbarch_debug
>= 2)
3568 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3569 gdbarch
->store_return_value (type
, valbuf
);
3573 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3574 gdbarch_store_return_value_ftype store_return_value
)
3576 gdbarch
->store_return_value
= store_return_value
;
3580 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3582 return gdbarch
->extract_struct_value_address
!= 0;
3586 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3588 if (gdbarch
->extract_struct_value_address
== 0)
3589 internal_error (__FILE__
, __LINE__
,
3590 "gdbarch: gdbarch_extract_struct_value_address invalid");
3591 if (gdbarch_debug
>= 2)
3592 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3593 return gdbarch
->extract_struct_value_address (regbuf
);
3597 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3598 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3600 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3604 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3606 if (gdbarch
->use_struct_convention
== 0)
3607 internal_error (__FILE__
, __LINE__
,
3608 "gdbarch: gdbarch_use_struct_convention invalid");
3609 if (gdbarch_debug
>= 2)
3610 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3611 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3615 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3616 gdbarch_use_struct_convention_ftype use_struct_convention
)
3618 gdbarch
->use_struct_convention
= use_struct_convention
;
3622 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3624 if (gdbarch
->frame_init_saved_regs
== 0)
3625 internal_error (__FILE__
, __LINE__
,
3626 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3627 if (gdbarch_debug
>= 2)
3628 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3629 gdbarch
->frame_init_saved_regs (frame
);
3633 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3634 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3636 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3640 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3642 if (gdbarch
->init_extra_frame_info
== 0)
3643 internal_error (__FILE__
, __LINE__
,
3644 "gdbarch: gdbarch_init_extra_frame_info invalid");
3645 if (gdbarch_debug
>= 2)
3646 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3647 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3651 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3652 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3654 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3658 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3660 if (gdbarch
->skip_prologue
== 0)
3661 internal_error (__FILE__
, __LINE__
,
3662 "gdbarch: gdbarch_skip_prologue invalid");
3663 if (gdbarch_debug
>= 2)
3664 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3665 return gdbarch
->skip_prologue (ip
);
3669 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3670 gdbarch_skip_prologue_ftype skip_prologue
)
3672 gdbarch
->skip_prologue
= skip_prologue
;
3676 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3678 if (gdbarch
->prologue_frameless_p
== 0)
3679 internal_error (__FILE__
, __LINE__
,
3680 "gdbarch: gdbarch_prologue_frameless_p invalid");
3681 if (gdbarch_debug
>= 2)
3682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3683 return gdbarch
->prologue_frameless_p (ip
);
3687 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3688 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3690 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3694 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3696 if (gdbarch
->inner_than
== 0)
3697 internal_error (__FILE__
, __LINE__
,
3698 "gdbarch: gdbarch_inner_than invalid");
3699 if (gdbarch_debug
>= 2)
3700 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3701 return gdbarch
->inner_than (lhs
, rhs
);
3705 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3706 gdbarch_inner_than_ftype inner_than
)
3708 gdbarch
->inner_than
= inner_than
;
3712 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3714 if (gdbarch
->breakpoint_from_pc
== 0)
3715 internal_error (__FILE__
, __LINE__
,
3716 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3717 if (gdbarch_debug
>= 2)
3718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3719 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3723 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3724 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3726 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3730 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3732 if (gdbarch
->memory_insert_breakpoint
== 0)
3733 internal_error (__FILE__
, __LINE__
,
3734 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3735 if (gdbarch_debug
>= 2)
3736 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3737 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3741 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3742 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3744 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3748 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3750 if (gdbarch
->memory_remove_breakpoint
== 0)
3751 internal_error (__FILE__
, __LINE__
,
3752 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3753 if (gdbarch_debug
>= 2)
3754 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3755 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3759 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3760 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3762 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3766 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3768 if (gdbarch
->decr_pc_after_break
== -1)
3769 internal_error (__FILE__
, __LINE__
,
3770 "gdbarch: gdbarch_decr_pc_after_break invalid");
3771 if (gdbarch_debug
>= 2)
3772 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3773 return gdbarch
->decr_pc_after_break
;
3777 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3778 CORE_ADDR decr_pc_after_break
)
3780 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3784 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3786 if (gdbarch
->prepare_to_proceed
== 0)
3787 internal_error (__FILE__
, __LINE__
,
3788 "gdbarch: gdbarch_prepare_to_proceed invalid");
3789 if (gdbarch_debug
>= 2)
3790 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3791 return gdbarch
->prepare_to_proceed (select_it
);
3795 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3796 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3798 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3802 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3804 if (gdbarch
->function_start_offset
== -1)
3805 internal_error (__FILE__
, __LINE__
,
3806 "gdbarch: gdbarch_function_start_offset invalid");
3807 if (gdbarch_debug
>= 2)
3808 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3809 return gdbarch
->function_start_offset
;
3813 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3814 CORE_ADDR function_start_offset
)
3816 gdbarch
->function_start_offset
= function_start_offset
;
3820 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3822 if (gdbarch
->remote_translate_xfer_address
== 0)
3823 internal_error (__FILE__
, __LINE__
,
3824 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3825 if (gdbarch_debug
>= 2)
3826 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3827 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3831 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3832 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3834 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3838 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3840 if (gdbarch
->frame_args_skip
== -1)
3841 internal_error (__FILE__
, __LINE__
,
3842 "gdbarch: gdbarch_frame_args_skip invalid");
3843 if (gdbarch_debug
>= 2)
3844 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3845 return gdbarch
->frame_args_skip
;
3849 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3850 CORE_ADDR frame_args_skip
)
3852 gdbarch
->frame_args_skip
= frame_args_skip
;
3856 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3858 if (gdbarch
->frameless_function_invocation
== 0)
3859 internal_error (__FILE__
, __LINE__
,
3860 "gdbarch: gdbarch_frameless_function_invocation invalid");
3861 if (gdbarch_debug
>= 2)
3862 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3863 return gdbarch
->frameless_function_invocation (fi
);
3867 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3868 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3870 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3874 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3876 if (gdbarch
->frame_chain
== 0)
3877 internal_error (__FILE__
, __LINE__
,
3878 "gdbarch: gdbarch_frame_chain invalid");
3879 if (gdbarch_debug
>= 2)
3880 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3881 return gdbarch
->frame_chain (frame
);
3885 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3886 gdbarch_frame_chain_ftype frame_chain
)
3888 gdbarch
->frame_chain
= frame_chain
;
3892 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3894 if (gdbarch
->frame_chain_valid
== 0)
3895 internal_error (__FILE__
, __LINE__
,
3896 "gdbarch: gdbarch_frame_chain_valid invalid");
3897 if (gdbarch_debug
>= 2)
3898 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3899 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3903 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3904 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3906 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3910 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3912 if (gdbarch
->frame_saved_pc
== 0)
3913 internal_error (__FILE__
, __LINE__
,
3914 "gdbarch: gdbarch_frame_saved_pc invalid");
3915 if (gdbarch_debug
>= 2)
3916 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3917 return gdbarch
->frame_saved_pc (fi
);
3921 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3922 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3924 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3928 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3930 if (gdbarch
->frame_args_address
== 0)
3931 internal_error (__FILE__
, __LINE__
,
3932 "gdbarch: gdbarch_frame_args_address invalid");
3933 if (gdbarch_debug
>= 2)
3934 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3935 return gdbarch
->frame_args_address (fi
);
3939 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3940 gdbarch_frame_args_address_ftype frame_args_address
)
3942 gdbarch
->frame_args_address
= frame_args_address
;
3946 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3948 if (gdbarch
->frame_locals_address
== 0)
3949 internal_error (__FILE__
, __LINE__
,
3950 "gdbarch: gdbarch_frame_locals_address invalid");
3951 if (gdbarch_debug
>= 2)
3952 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3953 return gdbarch
->frame_locals_address (fi
);
3957 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3958 gdbarch_frame_locals_address_ftype frame_locals_address
)
3960 gdbarch
->frame_locals_address
= frame_locals_address
;
3964 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3966 if (gdbarch
->saved_pc_after_call
== 0)
3967 internal_error (__FILE__
, __LINE__
,
3968 "gdbarch: gdbarch_saved_pc_after_call invalid");
3969 if (gdbarch_debug
>= 2)
3970 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3971 return gdbarch
->saved_pc_after_call (frame
);
3975 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3976 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3978 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3982 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3984 if (gdbarch
->frame_num_args
== 0)
3985 internal_error (__FILE__
, __LINE__
,
3986 "gdbarch: gdbarch_frame_num_args invalid");
3987 if (gdbarch_debug
>= 2)
3988 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3989 return gdbarch
->frame_num_args (frame
);
3993 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3994 gdbarch_frame_num_args_ftype frame_num_args
)
3996 gdbarch
->frame_num_args
= frame_num_args
;
4000 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4002 return gdbarch
->stack_align
!= 0;
4006 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4008 if (gdbarch
->stack_align
== 0)
4009 internal_error (__FILE__
, __LINE__
,
4010 "gdbarch: gdbarch_stack_align invalid");
4011 if (gdbarch_debug
>= 2)
4012 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4013 return gdbarch
->stack_align (sp
);
4017 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4018 gdbarch_stack_align_ftype stack_align
)
4020 gdbarch
->stack_align
= stack_align
;
4024 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4026 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4027 if (gdbarch_debug
>= 2)
4028 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4029 return gdbarch
->extra_stack_alignment_needed
;
4033 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4034 int extra_stack_alignment_needed
)
4036 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4040 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4042 return gdbarch
->reg_struct_has_addr
!= 0;
4046 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4048 if (gdbarch
->reg_struct_has_addr
== 0)
4049 internal_error (__FILE__
, __LINE__
,
4050 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4051 if (gdbarch_debug
>= 2)
4052 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4053 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4057 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4058 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4060 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4064 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4066 return gdbarch
->save_dummy_frame_tos
!= 0;
4070 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4072 if (gdbarch
->save_dummy_frame_tos
== 0)
4073 internal_error (__FILE__
, __LINE__
,
4074 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4075 if (gdbarch_debug
>= 2)
4076 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4077 gdbarch
->save_dummy_frame_tos (sp
);
4081 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4082 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4084 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4088 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4090 if (gdbarch_debug
>= 2)
4091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4092 return gdbarch
->parm_boundary
;
4096 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4099 gdbarch
->parm_boundary
= parm_boundary
;
4102 const struct floatformat
*
4103 gdbarch_float_format (struct gdbarch
*gdbarch
)
4105 if (gdbarch_debug
>= 2)
4106 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4107 return gdbarch
->float_format
;
4111 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4112 const struct floatformat
* float_format
)
4114 gdbarch
->float_format
= float_format
;
4117 const struct floatformat
*
4118 gdbarch_double_format (struct gdbarch
*gdbarch
)
4120 if (gdbarch_debug
>= 2)
4121 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4122 return gdbarch
->double_format
;
4126 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4127 const struct floatformat
* double_format
)
4129 gdbarch
->double_format
= double_format
;
4132 const struct floatformat
*
4133 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4135 if (gdbarch_debug
>= 2)
4136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4137 return gdbarch
->long_double_format
;
4141 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4142 const struct floatformat
* long_double_format
)
4144 gdbarch
->long_double_format
= long_double_format
;
4148 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4150 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4151 internal_error (__FILE__
, __LINE__
,
4152 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4153 if (gdbarch_debug
>= 2)
4154 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4155 return gdbarch
->convert_from_func_ptr_addr (addr
);
4159 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4160 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4162 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4166 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4168 if (gdbarch
->addr_bits_remove
== 0)
4169 internal_error (__FILE__
, __LINE__
,
4170 "gdbarch: gdbarch_addr_bits_remove invalid");
4171 if (gdbarch_debug
>= 2)
4172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4173 return gdbarch
->addr_bits_remove (addr
);
4177 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4178 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4180 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4184 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4186 return gdbarch
->software_single_step
!= 0;
4190 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4192 if (gdbarch
->software_single_step
== 0)
4193 internal_error (__FILE__
, __LINE__
,
4194 "gdbarch: gdbarch_software_single_step invalid");
4195 if (gdbarch_debug
>= 2)
4196 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4197 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4201 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4202 gdbarch_software_single_step_ftype software_single_step
)
4204 gdbarch
->software_single_step
= software_single_step
;
4208 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4210 if (gdbarch
->print_insn
== 0)
4211 internal_error (__FILE__
, __LINE__
,
4212 "gdbarch: gdbarch_print_insn invalid");
4213 if (gdbarch_debug
>= 2)
4214 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4215 return gdbarch
->print_insn (vma
, info
);
4219 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4220 gdbarch_print_insn_ftype print_insn
)
4222 gdbarch
->print_insn
= print_insn
;
4226 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4228 if (gdbarch
->skip_trampoline_code
== 0)
4229 internal_error (__FILE__
, __LINE__
,
4230 "gdbarch: gdbarch_skip_trampoline_code invalid");
4231 if (gdbarch_debug
>= 2)
4232 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4233 return gdbarch
->skip_trampoline_code (pc
);
4237 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4238 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4240 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4244 /* Keep a registry of per-architecture data-pointers required by GDB
4250 gdbarch_data_init_ftype
*init
;
4251 gdbarch_data_free_ftype
*free
;
4254 struct gdbarch_data_registration
4256 struct gdbarch_data
*data
;
4257 struct gdbarch_data_registration
*next
;
4260 struct gdbarch_data_registry
4263 struct gdbarch_data_registration
*registrations
;
4266 struct gdbarch_data_registry gdbarch_data_registry
=
4271 struct gdbarch_data
*
4272 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4273 gdbarch_data_free_ftype
*free
)
4275 struct gdbarch_data_registration
**curr
;
4276 for (curr
= &gdbarch_data_registry
.registrations
;
4278 curr
= &(*curr
)->next
);
4279 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4280 (*curr
)->next
= NULL
;
4281 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4282 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4283 (*curr
)->data
->init
= init
;
4284 (*curr
)->data
->free
= free
;
4285 return (*curr
)->data
;
4289 /* Walk through all the registered users initializing each in turn. */
4292 init_gdbarch_data (struct gdbarch
*gdbarch
)
4294 struct gdbarch_data_registration
*rego
;
4295 for (rego
= gdbarch_data_registry
.registrations
;
4299 struct gdbarch_data
*data
= rego
->data
;
4300 gdb_assert (data
->index
< gdbarch
->nr_data
);
4301 if (data
->init
!= NULL
)
4303 void *pointer
= data
->init (gdbarch
);
4304 set_gdbarch_data (gdbarch
, data
, pointer
);
4309 /* Create/delete the gdbarch data vector. */
4312 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4314 gdb_assert (gdbarch
->data
== NULL
);
4315 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4316 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4320 free_gdbarch_data (struct gdbarch
*gdbarch
)
4322 struct gdbarch_data_registration
*rego
;
4323 gdb_assert (gdbarch
->data
!= NULL
);
4324 for (rego
= gdbarch_data_registry
.registrations
;
4328 struct gdbarch_data
*data
= rego
->data
;
4329 gdb_assert (data
->index
< gdbarch
->nr_data
);
4330 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4332 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4333 gdbarch
->data
[data
->index
] = NULL
;
4336 xfree (gdbarch
->data
);
4337 gdbarch
->data
= NULL
;
4341 /* Initialize the current value of thee specified per-architecture
4345 set_gdbarch_data (struct gdbarch
*gdbarch
,
4346 struct gdbarch_data
*data
,
4349 gdb_assert (data
->index
< gdbarch
->nr_data
);
4350 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4351 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4352 gdbarch
->data
[data
->index
] = pointer
;
4355 /* Return the current value of the specified per-architecture
4359 gdbarch_data (struct gdbarch_data
*data
)
4361 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4362 return current_gdbarch
->data
[data
->index
];
4367 /* Keep a registry of swapped data required by GDB modules. */
4372 struct gdbarch_swap_registration
*source
;
4373 struct gdbarch_swap
*next
;
4376 struct gdbarch_swap_registration
4379 unsigned long sizeof_data
;
4380 gdbarch_swap_ftype
*init
;
4381 struct gdbarch_swap_registration
*next
;
4384 struct gdbarch_swap_registry
4387 struct gdbarch_swap_registration
*registrations
;
4390 struct gdbarch_swap_registry gdbarch_swap_registry
=
4396 register_gdbarch_swap (void *data
,
4397 unsigned long sizeof_data
,
4398 gdbarch_swap_ftype
*init
)
4400 struct gdbarch_swap_registration
**rego
;
4401 for (rego
= &gdbarch_swap_registry
.registrations
;
4403 rego
= &(*rego
)->next
);
4404 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4405 (*rego
)->next
= NULL
;
4406 (*rego
)->init
= init
;
4407 (*rego
)->data
= data
;
4408 (*rego
)->sizeof_data
= sizeof_data
;
4413 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4415 struct gdbarch_swap_registration
*rego
;
4416 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4417 for (rego
= gdbarch_swap_registry
.registrations
;
4421 if (rego
->data
!= NULL
)
4423 (*curr
) = XMALLOC (struct gdbarch_swap
);
4424 (*curr
)->source
= rego
;
4425 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4426 (*curr
)->next
= NULL
;
4427 memset (rego
->data
, 0, rego
->sizeof_data
);
4428 curr
= &(*curr
)->next
;
4430 if (rego
->init
!= NULL
)
4436 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4438 struct gdbarch_swap
*curr
;
4439 for (curr
= gdbarch
->swap
;
4442 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4446 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4448 struct gdbarch_swap
*curr
;
4449 for (curr
= gdbarch
->swap
;
4452 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4456 /* Keep a registry of the architectures known by GDB. */
4458 struct gdbarch_registration
4460 enum bfd_architecture bfd_architecture
;
4461 gdbarch_init_ftype
*init
;
4462 gdbarch_dump_tdep_ftype
*dump_tdep
;
4463 struct gdbarch_list
*arches
;
4464 struct gdbarch_registration
*next
;
4467 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4470 append_name (const char ***buf
, int *nr
, const char *name
)
4472 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4478 gdbarch_printable_names (void)
4482 /* Accumulate a list of names based on the registed list of
4484 enum bfd_architecture a
;
4486 const char **arches
= NULL
;
4487 struct gdbarch_registration
*rego
;
4488 for (rego
= gdbarch_registry
;
4492 const struct bfd_arch_info
*ap
;
4493 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4495 internal_error (__FILE__
, __LINE__
,
4496 "gdbarch_architecture_names: multi-arch unknown");
4499 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4504 append_name (&arches
, &nr_arches
, NULL
);
4508 /* Just return all the architectures that BFD knows. Assume that
4509 the legacy architecture framework supports them. */
4510 return bfd_arch_list ();
4515 gdbarch_register (enum bfd_architecture bfd_architecture
,
4516 gdbarch_init_ftype
*init
,
4517 gdbarch_dump_tdep_ftype
*dump_tdep
)
4519 struct gdbarch_registration
**curr
;
4520 const struct bfd_arch_info
*bfd_arch_info
;
4521 /* Check that BFD recognizes this architecture */
4522 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4523 if (bfd_arch_info
== NULL
)
4525 internal_error (__FILE__
, __LINE__
,
4526 "gdbarch: Attempt to register unknown architecture (%d)",
4529 /* Check that we haven't seen this architecture before */
4530 for (curr
= &gdbarch_registry
;
4532 curr
= &(*curr
)->next
)
4534 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4535 internal_error (__FILE__
, __LINE__
,
4536 "gdbarch: Duplicate registraration of architecture (%s)",
4537 bfd_arch_info
->printable_name
);
4541 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4542 bfd_arch_info
->printable_name
,
4545 (*curr
) = XMALLOC (struct gdbarch_registration
);
4546 (*curr
)->bfd_architecture
= bfd_architecture
;
4547 (*curr
)->init
= init
;
4548 (*curr
)->dump_tdep
= dump_tdep
;
4549 (*curr
)->arches
= NULL
;
4550 (*curr
)->next
= NULL
;
4551 /* When non- multi-arch, install whatever target dump routine we've
4552 been provided - hopefully that routine has been written correctly
4553 and works regardless of multi-arch. */
4554 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4555 && startup_gdbarch
.dump_tdep
== NULL
)
4556 startup_gdbarch
.dump_tdep
= dump_tdep
;
4560 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4561 gdbarch_init_ftype
*init
)
4563 gdbarch_register (bfd_architecture
, init
, NULL
);
4567 /* Look for an architecture using gdbarch_info. Base search on only
4568 BFD_ARCH_INFO and BYTE_ORDER. */
4570 struct gdbarch_list
*
4571 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4572 const struct gdbarch_info
*info
)
4574 for (; arches
!= NULL
; arches
= arches
->next
)
4576 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4578 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4586 /* Update the current architecture. Return ZERO if the update request
4590 gdbarch_update_p (struct gdbarch_info info
)
4592 struct gdbarch
*new_gdbarch
;
4593 struct gdbarch_list
**list
;
4594 struct gdbarch_registration
*rego
;
4596 /* Fill in missing parts of the INFO struct using a number of
4597 sources: ``set ...''; INFOabfd supplied; existing target. */
4599 /* ``(gdb) set architecture ...'' */
4600 if (info
.bfd_arch_info
== NULL
4601 && !TARGET_ARCHITECTURE_AUTO
)
4602 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4603 if (info
.bfd_arch_info
== NULL
4604 && info
.abfd
!= NULL
4605 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4606 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4607 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4608 if (info
.bfd_arch_info
== NULL
)
4609 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4611 /* ``(gdb) set byte-order ...'' */
4612 if (info
.byte_order
== 0
4613 && !TARGET_BYTE_ORDER_AUTO
)
4614 info
.byte_order
= TARGET_BYTE_ORDER
;
4615 /* From the INFO struct. */
4616 if (info
.byte_order
== 0
4617 && info
.abfd
!= NULL
)
4618 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4619 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4621 /* From the current target. */
4622 if (info
.byte_order
== 0)
4623 info
.byte_order
= TARGET_BYTE_ORDER
;
4625 /* Must have found some sort of architecture. */
4626 gdb_assert (info
.bfd_arch_info
!= NULL
);
4630 fprintf_unfiltered (gdb_stdlog
,
4631 "gdbarch_update: info.bfd_arch_info %s\n",
4632 (info
.bfd_arch_info
!= NULL
4633 ? info
.bfd_arch_info
->printable_name
4635 fprintf_unfiltered (gdb_stdlog
,
4636 "gdbarch_update: info.byte_order %d (%s)\n",
4638 (info
.byte_order
== BIG_ENDIAN
? "big"
4639 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4641 fprintf_unfiltered (gdb_stdlog
,
4642 "gdbarch_update: info.abfd 0x%lx\n",
4644 fprintf_unfiltered (gdb_stdlog
,
4645 "gdbarch_update: info.tdep_info 0x%lx\n",
4646 (long) info
.tdep_info
);
4649 /* Find the target that knows about this architecture. */
4650 for (rego
= gdbarch_registry
;
4653 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4658 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4662 /* Ask the target for a replacement architecture. */
4663 new_gdbarch
= rego
->init (info
, rego
->arches
);
4665 /* Did the target like it? No. Reject the change. */
4666 if (new_gdbarch
== NULL
)
4669 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4673 /* Did the architecture change? No. Do nothing. */
4674 if (current_gdbarch
== new_gdbarch
)
4677 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4679 new_gdbarch
->bfd_arch_info
->printable_name
);
4683 /* Swap all data belonging to the old target out */
4684 swapout_gdbarch_swap (current_gdbarch
);
4686 /* Is this a pre-existing architecture? Yes. Swap it in. */
4687 for (list
= ®o
->arches
;
4689 list
= &(*list
)->next
)
4691 if ((*list
)->gdbarch
== new_gdbarch
)
4694 fprintf_unfiltered (gdb_stdlog
,
4695 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4697 new_gdbarch
->bfd_arch_info
->printable_name
);
4698 current_gdbarch
= new_gdbarch
;
4699 swapin_gdbarch_swap (new_gdbarch
);
4700 architecture_changed_event ();
4705 /* Append this new architecture to this targets list. */
4706 (*list
) = XMALLOC (struct gdbarch_list
);
4707 (*list
)->next
= NULL
;
4708 (*list
)->gdbarch
= new_gdbarch
;
4710 /* Switch to this new architecture. Dump it out. */
4711 current_gdbarch
= new_gdbarch
;
4714 fprintf_unfiltered (gdb_stdlog
,
4715 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4717 new_gdbarch
->bfd_arch_info
->printable_name
);
4720 /* Check that the newly installed architecture is valid. Plug in
4721 any post init values. */
4722 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4723 verify_gdbarch (new_gdbarch
);
4725 /* Initialize the per-architecture memory (swap) areas.
4726 CURRENT_GDBARCH must be update before these modules are
4728 init_gdbarch_swap (new_gdbarch
);
4730 /* Initialize the per-architecture data-pointer of all parties that
4731 registered an interest in this architecture. CURRENT_GDBARCH
4732 must be updated before these modules are called. */
4733 init_gdbarch_data (new_gdbarch
);
4734 architecture_changed_event ();
4737 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4745 /* Pointer to the target-dependent disassembly function. */
4746 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4747 disassemble_info tm_print_insn_info
;
4750 extern void _initialize_gdbarch (void);
4753 _initialize_gdbarch (void)
4755 struct cmd_list_element
*c
;
4757 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4758 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4759 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4760 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4761 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4763 add_show_from_set (add_set_cmd ("arch",
4766 (char *)&gdbarch_debug
,
4767 "Set architecture debugging.\n\
4768 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4770 c
= add_set_cmd ("archdebug",
4773 (char *)&gdbarch_debug
,
4774 "Set architecture debugging.\n\
4775 When non-zero, architecture debugging is enabled.", &setlist
);
4777 deprecate_cmd (c
, "set debug arch");
4778 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");