1 /* *INDENT-OFF* */ /* THIS FILE IS GENERATED */
3 /* Dynamic architecture support for GDB, the GNU debugger.
4 Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* This file was created with the aid of ``gdbarch.sh''.
25 The Bourne shell script ``gdbarch.sh'' creates the files
26 ``new-gdbarch.c'' and ``new-gdbarch.h and then compares them
27 against the existing ``gdbarch.[hc]''. Any differences found
30 If editing this file, please also run gdbarch.sh and merge any
31 changes into that script. Conversely, when making sweeping changes
32 to this file, modifying gdbarch.sh and using its output may prove
37 #include "arch-utils.h"
41 #include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
43 /* Just include everything in sight so that the every old definition
44 of macro is visible. */
45 #include "gdb_string.h"
50 #include "breakpoint.h"
55 #include "gdbthread.h"
57 #include "symfile.h" /* for overlay functions */
61 #include "floatformat.h"
63 #include "gdb_assert.h"
64 #include "gdb-events.h"
66 /* Static function declarations */
68 static void verify_gdbarch (struct gdbarch
*gdbarch
);
69 static void alloc_gdbarch_data (struct gdbarch
*);
70 static void init_gdbarch_data (struct gdbarch
*);
71 static void free_gdbarch_data (struct gdbarch
*);
72 static void init_gdbarch_swap (struct gdbarch
*);
73 static void swapout_gdbarch_swap (struct gdbarch
*);
74 static void swapin_gdbarch_swap (struct gdbarch
*);
76 /* Convenience macro for allocting typesafe memory. */
79 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
83 /* Non-zero if we want to trace architecture code. */
86 #define GDBARCH_DEBUG 0
88 int gdbarch_debug
= GDBARCH_DEBUG
;
91 /* Maintain the struct gdbarch object */
95 /* basic architectural information */
96 const struct bfd_arch_info
* bfd_arch_info
;
99 /* target specific vector. */
100 struct gdbarch_tdep
*tdep
;
101 gdbarch_dump_tdep_ftype
*dump_tdep
;
103 /* per-architecture data-pointers */
107 /* per-architecture swap-regions */
108 struct gdbarch_swap
*swap
;
110 /* Multi-arch values.
112 When extending this structure you must:
116 Declare set/get functions and define the corresponding
119 gdbarch_alloc(): If zero/NULL is not a suitable default,
120 initialize the new field.
122 verify_gdbarch(): Confirm that the target updated the field
125 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
128 ``startup_gdbarch()'': Append an initial value to the static
129 variable (base values on the host's c-type system).
131 get_gdbarch(): Implement the set/get functions (probably using
132 the macro's as shortcuts).
147 gdbarch_read_pc_ftype
*read_pc
;
148 gdbarch_write_pc_ftype
*write_pc
;
149 gdbarch_read_fp_ftype
*read_fp
;
150 gdbarch_write_fp_ftype
*write_fp
;
151 gdbarch_read_sp_ftype
*read_sp
;
152 gdbarch_write_sp_ftype
*write_sp
;
153 gdbarch_virtual_frame_pointer_ftype
*virtual_frame_pointer
;
154 gdbarch_register_read_ftype
*register_read
;
155 gdbarch_register_write_ftype
*register_write
;
164 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
165 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
166 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
167 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
168 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
169 gdbarch_register_name_ftype
*register_name
;
172 gdbarch_register_byte_ftype
*register_byte
;
173 gdbarch_register_raw_size_ftype
*register_raw_size
;
174 int max_register_raw_size
;
175 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
176 int max_register_virtual_size
;
177 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
178 gdbarch_do_registers_info_ftype
*do_registers_info
;
179 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
180 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
181 gdbarch_cannot_fetch_register_ftype
*cannot_fetch_register
;
182 gdbarch_cannot_store_register_ftype
*cannot_store_register
;
183 int use_generic_dummy_frames
;
184 int call_dummy_location
;
185 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
186 CORE_ADDR call_dummy_start_offset
;
187 CORE_ADDR call_dummy_breakpoint_offset
;
188 int call_dummy_breakpoint_offset_p
;
189 int call_dummy_length
;
190 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
192 LONGEST
* call_dummy_words
;
193 int sizeof_call_dummy_words
;
194 int call_dummy_stack_adjust_p
;
195 int call_dummy_stack_adjust
;
196 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
197 gdbarch_init_frame_pc_first_ftype
*init_frame_pc_first
;
198 gdbarch_init_frame_pc_ftype
*init_frame_pc
;
199 int believe_pcc_promotion
;
200 int believe_pcc_promotion_type
;
201 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
202 gdbarch_get_saved_register_ftype
*get_saved_register
;
203 gdbarch_register_convertible_ftype
*register_convertible
;
204 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
205 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
206 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
207 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
208 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
209 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
210 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
211 gdbarch_extract_return_value_ftype
*extract_return_value
;
212 gdbarch_push_arguments_ftype
*push_arguments
;
213 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
214 gdbarch_push_return_address_ftype
*push_return_address
;
215 gdbarch_pop_frame_ftype
*pop_frame
;
216 gdbarch_store_struct_return_ftype
*store_struct_return
;
217 gdbarch_store_return_value_ftype
*store_return_value
;
218 gdbarch_extract_struct_value_address_ftype
*extract_struct_value_address
;
219 gdbarch_use_struct_convention_ftype
*use_struct_convention
;
220 gdbarch_frame_init_saved_regs_ftype
*frame_init_saved_regs
;
221 gdbarch_init_extra_frame_info_ftype
*init_extra_frame_info
;
222 gdbarch_skip_prologue_ftype
*skip_prologue
;
223 gdbarch_prologue_frameless_p_ftype
*prologue_frameless_p
;
224 gdbarch_inner_than_ftype
*inner_than
;
225 gdbarch_breakpoint_from_pc_ftype
*breakpoint_from_pc
;
226 gdbarch_memory_insert_breakpoint_ftype
*memory_insert_breakpoint
;
227 gdbarch_memory_remove_breakpoint_ftype
*memory_remove_breakpoint
;
228 CORE_ADDR decr_pc_after_break
;
229 gdbarch_prepare_to_proceed_ftype
*prepare_to_proceed
;
230 CORE_ADDR function_start_offset
;
231 gdbarch_remote_translate_xfer_address_ftype
*remote_translate_xfer_address
;
232 CORE_ADDR frame_args_skip
;
233 gdbarch_frameless_function_invocation_ftype
*frameless_function_invocation
;
234 gdbarch_frame_chain_ftype
*frame_chain
;
235 gdbarch_frame_chain_valid_ftype
*frame_chain_valid
;
236 gdbarch_frame_saved_pc_ftype
*frame_saved_pc
;
237 gdbarch_frame_args_address_ftype
*frame_args_address
;
238 gdbarch_frame_locals_address_ftype
*frame_locals_address
;
239 gdbarch_saved_pc_after_call_ftype
*saved_pc_after_call
;
240 gdbarch_frame_num_args_ftype
*frame_num_args
;
241 gdbarch_stack_align_ftype
*stack_align
;
242 int extra_stack_alignment_needed
;
243 gdbarch_reg_struct_has_addr_ftype
*reg_struct_has_addr
;
244 gdbarch_save_dummy_frame_tos_ftype
*save_dummy_frame_tos
;
246 const struct floatformat
* float_format
;
247 const struct floatformat
* double_format
;
248 const struct floatformat
* long_double_format
;
249 gdbarch_convert_from_func_ptr_addr_ftype
*convert_from_func_ptr_addr
;
250 gdbarch_addr_bits_remove_ftype
*addr_bits_remove
;
251 gdbarch_software_single_step_ftype
*software_single_step
;
252 gdbarch_print_insn_ftype
*print_insn
;
253 gdbarch_skip_trampoline_code_ftype
*skip_trampoline_code
;
257 /* The default architecture uses host values (for want of a better
260 extern const struct bfd_arch_info bfd_default_arch_struct
;
262 struct gdbarch startup_gdbarch
=
264 /* basic architecture information */
265 &bfd_default_arch_struct
,
267 /* target specific vector and its dump routine */
269 /*per-architecture data-pointers and swap regions */
271 /* Multi-arch values */
275 8 * sizeof (LONGEST
),
278 8 * sizeof (long double),
338 generic_get_saved_register
,
390 /* startup_gdbarch() */
393 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
395 /* Do any initialization needed for a non-multiarch configuration
396 after the _initialize_MODULE functions have been run. */
398 initialize_non_multiarch ()
400 alloc_gdbarch_data (&startup_gdbarch
);
401 init_gdbarch_data (&startup_gdbarch
);
405 /* Create a new ``struct gdbarch'' based on information provided by
406 ``struct gdbarch_info''. */
409 gdbarch_alloc (const struct gdbarch_info
*info
,
410 struct gdbarch_tdep
*tdep
)
412 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
413 memset (gdbarch
, 0, sizeof (*gdbarch
));
415 alloc_gdbarch_data (gdbarch
);
417 gdbarch
->tdep
= tdep
;
419 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
420 gdbarch
->byte_order
= info
->byte_order
;
422 /* Force the explicit initialization of these. */
423 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
424 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
425 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
426 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
427 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
428 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
429 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
430 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
431 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
432 gdbarch
->read_pc
= generic_target_read_pc
;
433 gdbarch
->write_pc
= generic_target_write_pc
;
434 gdbarch
->read_fp
= generic_target_read_fp
;
435 gdbarch
->write_fp
= generic_target_write_fp
;
436 gdbarch
->read_sp
= generic_target_read_sp
;
437 gdbarch
->write_sp
= generic_target_write_sp
;
438 gdbarch
->virtual_frame_pointer
= legacy_virtual_frame_pointer
;
439 gdbarch
->num_regs
= -1;
440 gdbarch
->sp_regnum
= -1;
441 gdbarch
->fp_regnum
= -1;
442 gdbarch
->pc_regnum
= -1;
443 gdbarch
->fp0_regnum
= -1;
444 gdbarch
->npc_regnum
= -1;
445 gdbarch
->nnpc_regnum
= -1;
446 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
447 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
448 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
449 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
450 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
451 gdbarch
->register_name
= legacy_register_name
;
452 gdbarch
->register_size
= -1;
453 gdbarch
->register_bytes
= -1;
454 gdbarch
->max_register_raw_size
= -1;
455 gdbarch
->max_register_virtual_size
= -1;
456 gdbarch
->do_registers_info
= do_registers_info
;
457 gdbarch
->register_sim_regno
= default_register_sim_regno
;
458 gdbarch
->cannot_fetch_register
= cannot_register_not
;
459 gdbarch
->cannot_store_register
= cannot_register_not
;
460 gdbarch
->use_generic_dummy_frames
= -1;
461 gdbarch
->call_dummy_start_offset
= -1;
462 gdbarch
->call_dummy_breakpoint_offset
= -1;
463 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
464 gdbarch
->call_dummy_length
= -1;
465 gdbarch
->call_dummy_p
= -1;
466 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
467 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
468 gdbarch
->call_dummy_stack_adjust_p
= -1;
469 gdbarch
->init_frame_pc_first
= init_frame_pc_noop
;
470 gdbarch
->init_frame_pc
= init_frame_pc_default
;
471 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
472 gdbarch
->register_convertible
= generic_register_convertible_not
;
473 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
474 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
475 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
476 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
477 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
478 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
479 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
480 gdbarch
->decr_pc_after_break
= -1;
481 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
482 gdbarch
->function_start_offset
= -1;
483 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
484 gdbarch
->frame_args_skip
= -1;
485 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
486 gdbarch
->extra_stack_alignment_needed
= 1;
487 gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
488 gdbarch
->addr_bits_remove
= core_addr_identity
;
489 gdbarch
->print_insn
= legacy_print_insn
;
490 gdbarch
->skip_trampoline_code
= generic_skip_trampoline_code
;
491 /* gdbarch_alloc() */
497 /* Free a gdbarch struct. This should never happen in normal
498 operation --- once you've created a gdbarch, you keep it around.
499 However, if an architecture's init function encounters an error
500 building the structure, it may need to clean up a partially
501 constructed gdbarch. */
504 gdbarch_free (struct gdbarch
*arch
)
506 gdb_assert (arch
!= NULL
);
507 free_gdbarch_data (arch
);
512 /* Ensure that all values in a GDBARCH are reasonable. */
515 verify_gdbarch (struct gdbarch
*gdbarch
)
517 /* Only perform sanity checks on a multi-arch target. */
521 if (gdbarch
->byte_order
== 0)
522 internal_error (__FILE__
, __LINE__
,
523 "verify_gdbarch: byte-order unset");
524 if (gdbarch
->bfd_arch_info
== NULL
)
525 internal_error (__FILE__
, __LINE__
,
526 "verify_gdbarch: bfd_arch_info unset");
527 /* Check those that need to be defined for the given multi-arch level. */
528 /* Skip verify of short_bit, invalid_p == 0 */
529 /* Skip verify of int_bit, invalid_p == 0 */
530 /* Skip verify of long_bit, invalid_p == 0 */
531 /* Skip verify of long_long_bit, invalid_p == 0 */
532 /* Skip verify of float_bit, invalid_p == 0 */
533 /* Skip verify of double_bit, invalid_p == 0 */
534 /* Skip verify of long_double_bit, invalid_p == 0 */
535 /* Skip verify of ptr_bit, invalid_p == 0 */
536 if (gdbarch
->addr_bit
== 0)
537 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
538 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
539 /* Skip verify of ieee_float, invalid_p == 0 */
540 /* Skip verify of read_pc, invalid_p == 0 */
541 /* Skip verify of write_pc, invalid_p == 0 */
542 /* Skip verify of read_fp, invalid_p == 0 */
543 /* Skip verify of write_fp, invalid_p == 0 */
544 /* Skip verify of read_sp, invalid_p == 0 */
545 /* Skip verify of write_sp, invalid_p == 0 */
546 /* Skip verify of virtual_frame_pointer, invalid_p == 0 */
547 /* Skip verify of register_read, has predicate */
548 /* Skip verify of register_write, has predicate */
549 if ((GDB_MULTI_ARCH
>= 2)
550 && (gdbarch
->num_regs
== -1))
551 internal_error (__FILE__
, __LINE__
,
552 "gdbarch: verify_gdbarch: num_regs invalid");
553 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
554 if ((GDB_MULTI_ARCH
>= 2)
555 && (gdbarch
->sp_regnum
== -1))
556 internal_error (__FILE__
, __LINE__
,
557 "gdbarch: verify_gdbarch: sp_regnum invalid");
558 if ((GDB_MULTI_ARCH
>= 2)
559 && (gdbarch
->fp_regnum
== -1))
560 internal_error (__FILE__
, __LINE__
,
561 "gdbarch: verify_gdbarch: fp_regnum invalid");
562 if ((GDB_MULTI_ARCH
>= 2)
563 && (gdbarch
->pc_regnum
== -1))
564 internal_error (__FILE__
, __LINE__
,
565 "gdbarch: verify_gdbarch: pc_regnum invalid");
566 /* Skip verify of fp0_regnum, invalid_p == 0 */
567 /* Skip verify of npc_regnum, invalid_p == 0 */
568 /* Skip verify of nnpc_regnum, invalid_p == 0 */
569 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
570 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
571 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
572 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
573 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
574 /* Skip verify of register_name, invalid_p == 0 */
575 if ((GDB_MULTI_ARCH
>= 2)
576 && (gdbarch
->register_size
== -1))
577 internal_error (__FILE__
, __LINE__
,
578 "gdbarch: verify_gdbarch: register_size invalid");
579 if ((GDB_MULTI_ARCH
>= 2)
580 && (gdbarch
->register_bytes
== -1))
581 internal_error (__FILE__
, __LINE__
,
582 "gdbarch: verify_gdbarch: register_bytes invalid");
583 if ((GDB_MULTI_ARCH
>= 2)
584 && (gdbarch
->register_byte
== 0))
585 internal_error (__FILE__
, __LINE__
,
586 "gdbarch: verify_gdbarch: register_byte invalid");
587 if ((GDB_MULTI_ARCH
>= 2)
588 && (gdbarch
->register_raw_size
== 0))
589 internal_error (__FILE__
, __LINE__
,
590 "gdbarch: verify_gdbarch: register_raw_size invalid");
591 if ((GDB_MULTI_ARCH
>= 2)
592 && (gdbarch
->max_register_raw_size
== -1))
593 internal_error (__FILE__
, __LINE__
,
594 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
595 if ((GDB_MULTI_ARCH
>= 2)
596 && (gdbarch
->register_virtual_size
== 0))
597 internal_error (__FILE__
, __LINE__
,
598 "gdbarch: verify_gdbarch: register_virtual_size invalid");
599 if ((GDB_MULTI_ARCH
>= 2)
600 && (gdbarch
->max_register_virtual_size
== -1))
601 internal_error (__FILE__
, __LINE__
,
602 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
603 if ((GDB_MULTI_ARCH
>= 2)
604 && (gdbarch
->register_virtual_type
== 0))
605 internal_error (__FILE__
, __LINE__
,
606 "gdbarch: verify_gdbarch: register_virtual_type invalid");
607 /* Skip verify of do_registers_info, invalid_p == 0 */
608 /* Skip verify of register_sim_regno, invalid_p == 0 */
609 /* Skip verify of register_bytes_ok, has predicate */
610 /* Skip verify of cannot_fetch_register, invalid_p == 0 */
611 /* Skip verify of cannot_store_register, invalid_p == 0 */
612 if ((GDB_MULTI_ARCH
>= 1)
613 && (gdbarch
->use_generic_dummy_frames
== -1))
614 internal_error (__FILE__
, __LINE__
,
615 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
616 if ((GDB_MULTI_ARCH
>= 2)
617 && (gdbarch
->call_dummy_location
== 0))
618 internal_error (__FILE__
, __LINE__
,
619 "gdbarch: verify_gdbarch: call_dummy_location invalid");
620 if ((GDB_MULTI_ARCH
>= 2)
621 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
622 internal_error (__FILE__
, __LINE__
,
623 "gdbarch: verify_gdbarch: call_dummy_address invalid");
624 if ((GDB_MULTI_ARCH
>= 2)
625 && (gdbarch
->call_dummy_start_offset
== -1))
626 internal_error (__FILE__
, __LINE__
,
627 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
628 if ((GDB_MULTI_ARCH
>= 2)
629 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
630 internal_error (__FILE__
, __LINE__
,
631 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
632 if ((GDB_MULTI_ARCH
>= 1)
633 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
634 internal_error (__FILE__
, __LINE__
,
635 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
636 if ((GDB_MULTI_ARCH
>= 2)
637 && (gdbarch
->call_dummy_length
== -1))
638 internal_error (__FILE__
, __LINE__
,
639 "gdbarch: verify_gdbarch: call_dummy_length invalid");
640 if ((GDB_MULTI_ARCH
>= 2)
641 && (gdbarch
->pc_in_call_dummy
== 0))
642 internal_error (__FILE__
, __LINE__
,
643 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
644 if ((GDB_MULTI_ARCH
>= 1)
645 && (gdbarch
->call_dummy_p
== -1))
646 internal_error (__FILE__
, __LINE__
,
647 "gdbarch: verify_gdbarch: call_dummy_p invalid");
648 /* Skip verify of call_dummy_words, invalid_p == 0 */
649 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
650 if ((GDB_MULTI_ARCH
>= 1)
651 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
652 internal_error (__FILE__
, __LINE__
,
653 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
654 if ((GDB_MULTI_ARCH
>= 2)
655 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
656 internal_error (__FILE__
, __LINE__
,
657 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
658 if ((GDB_MULTI_ARCH
>= 2)
659 && (gdbarch
->fix_call_dummy
== 0))
660 internal_error (__FILE__
, __LINE__
,
661 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
662 /* Skip verify of init_frame_pc_first, invalid_p == 0 */
663 /* Skip verify of init_frame_pc, invalid_p == 0 */
664 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
665 if ((GDB_MULTI_ARCH
>= 1)
666 && (gdbarch
->get_saved_register
== 0))
667 internal_error (__FILE__
, __LINE__
,
668 "gdbarch: verify_gdbarch: get_saved_register invalid");
669 /* Skip verify of register_convertible, invalid_p == 0 */
670 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
671 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
672 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
673 /* Skip verify of store_pseudo_register, invalid_p == 0 */
674 /* Skip verify of pointer_to_address, invalid_p == 0 */
675 /* Skip verify of address_to_pointer, invalid_p == 0 */
676 /* Skip verify of return_value_on_stack, invalid_p == 0 */
677 if ((GDB_MULTI_ARCH
>= 2)
678 && (gdbarch
->extract_return_value
== 0))
679 internal_error (__FILE__
, __LINE__
,
680 "gdbarch: verify_gdbarch: extract_return_value invalid");
681 if ((GDB_MULTI_ARCH
>= 1)
682 && (gdbarch
->push_arguments
== 0))
683 internal_error (__FILE__
, __LINE__
,
684 "gdbarch: verify_gdbarch: push_arguments invalid");
685 if ((GDB_MULTI_ARCH
>= 2)
686 && (gdbarch
->push_dummy_frame
== 0))
687 internal_error (__FILE__
, __LINE__
,
688 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
689 if ((GDB_MULTI_ARCH
>= 1)
690 && (gdbarch
->push_return_address
== 0))
691 internal_error (__FILE__
, __LINE__
,
692 "gdbarch: verify_gdbarch: push_return_address invalid");
693 if ((GDB_MULTI_ARCH
>= 2)
694 && (gdbarch
->pop_frame
== 0))
695 internal_error (__FILE__
, __LINE__
,
696 "gdbarch: verify_gdbarch: pop_frame invalid");
697 if ((GDB_MULTI_ARCH
>= 2)
698 && (gdbarch
->store_struct_return
== 0))
699 internal_error (__FILE__
, __LINE__
,
700 "gdbarch: verify_gdbarch: store_struct_return invalid");
701 if ((GDB_MULTI_ARCH
>= 2)
702 && (gdbarch
->store_return_value
== 0))
703 internal_error (__FILE__
, __LINE__
,
704 "gdbarch: verify_gdbarch: store_return_value invalid");
705 /* Skip verify of extract_struct_value_address, has predicate */
706 if ((GDB_MULTI_ARCH
>= 2)
707 && (gdbarch
->use_struct_convention
== 0))
708 internal_error (__FILE__
, __LINE__
,
709 "gdbarch: verify_gdbarch: use_struct_convention invalid");
710 if ((GDB_MULTI_ARCH
>= 2)
711 && (gdbarch
->frame_init_saved_regs
== 0))
712 internal_error (__FILE__
, __LINE__
,
713 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
714 if ((GDB_MULTI_ARCH
>= 2)
715 && (gdbarch
->init_extra_frame_info
== 0))
716 internal_error (__FILE__
, __LINE__
,
717 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
718 if ((GDB_MULTI_ARCH
>= 2)
719 && (gdbarch
->skip_prologue
== 0))
720 internal_error (__FILE__
, __LINE__
,
721 "gdbarch: verify_gdbarch: skip_prologue invalid");
722 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->inner_than
== 0))
725 internal_error (__FILE__
, __LINE__
,
726 "gdbarch: verify_gdbarch: inner_than invalid");
727 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
728 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
729 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
730 if ((GDB_MULTI_ARCH
>= 2)
731 && (gdbarch
->decr_pc_after_break
== -1))
732 internal_error (__FILE__
, __LINE__
,
733 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
734 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
735 if ((GDB_MULTI_ARCH
>= 2)
736 && (gdbarch
->function_start_offset
== -1))
737 internal_error (__FILE__
, __LINE__
,
738 "gdbarch: verify_gdbarch: function_start_offset invalid");
739 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
740 if ((GDB_MULTI_ARCH
>= 2)
741 && (gdbarch
->frame_args_skip
== -1))
742 internal_error (__FILE__
, __LINE__
,
743 "gdbarch: verify_gdbarch: frame_args_skip invalid");
744 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
745 if ((GDB_MULTI_ARCH
>= 2)
746 && (gdbarch
->frame_chain
== 0))
747 internal_error (__FILE__
, __LINE__
,
748 "gdbarch: verify_gdbarch: frame_chain invalid");
749 if ((GDB_MULTI_ARCH
>= 1)
750 && (gdbarch
->frame_chain_valid
== 0))
751 internal_error (__FILE__
, __LINE__
,
752 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
753 if ((GDB_MULTI_ARCH
>= 2)
754 && (gdbarch
->frame_saved_pc
== 0))
755 internal_error (__FILE__
, __LINE__
,
756 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
757 if ((GDB_MULTI_ARCH
>= 2)
758 && (gdbarch
->frame_args_address
== 0))
759 internal_error (__FILE__
, __LINE__
,
760 "gdbarch: verify_gdbarch: frame_args_address invalid");
761 if ((GDB_MULTI_ARCH
>= 2)
762 && (gdbarch
->frame_locals_address
== 0))
763 internal_error (__FILE__
, __LINE__
,
764 "gdbarch: verify_gdbarch: frame_locals_address invalid");
765 if ((GDB_MULTI_ARCH
>= 2)
766 && (gdbarch
->saved_pc_after_call
== 0))
767 internal_error (__FILE__
, __LINE__
,
768 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
769 if ((GDB_MULTI_ARCH
>= 2)
770 && (gdbarch
->frame_num_args
== 0))
771 internal_error (__FILE__
, __LINE__
,
772 "gdbarch: verify_gdbarch: frame_num_args invalid");
773 /* Skip verify of stack_align, has predicate */
774 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
775 /* Skip verify of reg_struct_has_addr, has predicate */
776 /* Skip verify of save_dummy_frame_tos, has predicate */
777 if (gdbarch
->float_format
== 0)
778 gdbarch
->float_format
= default_float_format (gdbarch
);
779 if (gdbarch
->double_format
== 0)
780 gdbarch
->double_format
= default_double_format (gdbarch
);
781 if (gdbarch
->long_double_format
== 0)
782 gdbarch
->long_double_format
= &floatformat_unknown
;
783 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
784 /* Skip verify of addr_bits_remove, invalid_p == 0 */
785 /* Skip verify of software_single_step, has predicate */
786 /* Skip verify of print_insn, invalid_p == 0 */
787 /* Skip verify of skip_trampoline_code, invalid_p == 0 */
791 /* Print out the details of the current architecture. */
793 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
794 just happens to match the global variable ``current_gdbarch''. That
795 way macros refering to that variable get the local and not the global
796 version - ulgh. Once everything is parameterised with gdbarch, this
800 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
802 fprintf_unfiltered (file
,
803 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: register_read = 0x%08lx\n",
808 (long) current_gdbarch
->register_read
);
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: register_write = 0x%08lx\n",
812 (long) current_gdbarch
->register_write
);
813 #ifdef ADDRESS_TO_POINTER
815 /* Macro might contain `[{}]' when not multi-arch */
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: %s # %s\n",
818 "ADDRESS_TO_POINTER(type, buf, addr)",
819 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
822 fprintf_unfiltered (file
,
823 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
824 (long) current_gdbarch
->address_to_pointer
825 /*ADDRESS_TO_POINTER ()*/);
827 #ifdef ADDR_BITS_REMOVE
828 fprintf_unfiltered (file
,
829 "gdbarch_dump: %s # %s\n",
830 "ADDR_BITS_REMOVE(addr)",
831 XSTRING (ADDR_BITS_REMOVE (addr
)));
833 fprintf_unfiltered (file
,
834 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
835 (long) current_gdbarch
->addr_bits_remove
836 /*ADDR_BITS_REMOVE ()*/);
838 #ifdef BELIEVE_PCC_PROMOTION
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
841 XSTRING (BELIEVE_PCC_PROMOTION
));
842 fprintf_unfiltered (file
,
843 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
844 (long) BELIEVE_PCC_PROMOTION
);
846 #ifdef BELIEVE_PCC_PROMOTION_TYPE
847 fprintf_unfiltered (file
,
848 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
849 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
852 (long) BELIEVE_PCC_PROMOTION_TYPE
);
854 #ifdef BREAKPOINT_FROM_PC
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: %s # %s\n",
857 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
858 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
862 (long) current_gdbarch
->breakpoint_from_pc
863 /*BREAKPOINT_FROM_PC ()*/);
865 #ifdef CALL_DUMMY_ADDRESS
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: %s # %s\n",
868 "CALL_DUMMY_ADDRESS()",
869 XSTRING (CALL_DUMMY_ADDRESS ()));
871 fprintf_unfiltered (file
,
872 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
873 (long) current_gdbarch
->call_dummy_address
874 /*CALL_DUMMY_ADDRESS ()*/);
876 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
877 fprintf_unfiltered (file
,
878 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
879 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
880 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
881 fprintf_unfiltered (file
,
882 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
883 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
885 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
888 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
891 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
893 #ifdef CALL_DUMMY_LENGTH
894 fprintf_unfiltered (file
,
895 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
896 XSTRING (CALL_DUMMY_LENGTH
));
897 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
900 (long) CALL_DUMMY_LENGTH
);
902 #ifdef CALL_DUMMY_LOCATION
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
905 XSTRING (CALL_DUMMY_LOCATION
));
906 fprintf_unfiltered (file
,
907 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
908 (long) CALL_DUMMY_LOCATION
);
911 fprintf_unfiltered (file
,
912 "gdbarch_dump: CALL_DUMMY_P # %s\n",
913 XSTRING (CALL_DUMMY_P
));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
916 (long) CALL_DUMMY_P
);
918 #ifdef CALL_DUMMY_STACK_ADJUST
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
921 XSTRING (CALL_DUMMY_STACK_ADJUST
));
922 if (CALL_DUMMY_STACK_ADJUST_P
)
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
925 (long) CALL_DUMMY_STACK_ADJUST
);
927 #ifdef CALL_DUMMY_STACK_ADJUST_P
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
930 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
931 fprintf_unfiltered (file
,
932 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
933 (long) CALL_DUMMY_STACK_ADJUST_P
);
935 #ifdef CALL_DUMMY_START_OFFSET
936 fprintf_unfiltered (file
,
937 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
938 XSTRING (CALL_DUMMY_START_OFFSET
));
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
941 (long) CALL_DUMMY_START_OFFSET
);
943 #ifdef CALL_DUMMY_WORDS
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
946 XSTRING (CALL_DUMMY_WORDS
));
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
949 (long) CALL_DUMMY_WORDS
);
951 #ifdef CANNOT_FETCH_REGISTER
952 fprintf_unfiltered (file
,
953 "gdbarch_dump: %s # %s\n",
954 "CANNOT_FETCH_REGISTER(regnum)",
955 XSTRING (CANNOT_FETCH_REGISTER (regnum
)));
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: CANNOT_FETCH_REGISTER = 0x%08lx\n",
959 (long) current_gdbarch
->cannot_fetch_register
960 /*CANNOT_FETCH_REGISTER ()*/);
962 #ifdef CANNOT_STORE_REGISTER
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: %s # %s\n",
965 "CANNOT_STORE_REGISTER(regnum)",
966 XSTRING (CANNOT_STORE_REGISTER (regnum
)));
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: CANNOT_STORE_REGISTER = 0x%08lx\n",
970 (long) current_gdbarch
->cannot_store_register
971 /*CANNOT_STORE_REGISTER ()*/);
973 #ifdef COERCE_FLOAT_TO_DOUBLE
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: %s # %s\n",
976 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
977 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
981 (long) current_gdbarch
->coerce_float_to_double
982 /*COERCE_FLOAT_TO_DOUBLE ()*/);
984 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: %s # %s\n",
987 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
988 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
992 (long) current_gdbarch
->convert_from_func_ptr_addr
993 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
995 #ifdef DECR_PC_AFTER_BREAK
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
998 XSTRING (DECR_PC_AFTER_BREAK
));
999 fprintf_unfiltered (file
,
1000 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
1001 (long) DECR_PC_AFTER_BREAK
);
1003 #ifdef DO_REGISTERS_INFO
1005 /* Macro might contain `[{}]' when not multi-arch */
1006 fprintf_unfiltered (file
,
1007 "gdbarch_dump: %s # %s\n",
1008 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1009 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1014 (long) current_gdbarch
->do_registers_info
1015 /*DO_REGISTERS_INFO ()*/);
1017 #ifdef DWARF2_REG_TO_REGNUM
1018 fprintf_unfiltered (file
,
1019 "gdbarch_dump: %s # %s\n",
1020 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
1021 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
1023 fprintf_unfiltered (file
,
1024 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1025 (long) current_gdbarch
->dwarf2_reg_to_regnum
1026 /*DWARF2_REG_TO_REGNUM ()*/);
1028 #ifdef DWARF_REG_TO_REGNUM
1029 fprintf_unfiltered (file
,
1030 "gdbarch_dump: %s # %s\n",
1031 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
1032 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1036 (long) current_gdbarch
->dwarf_reg_to_regnum
1037 /*DWARF_REG_TO_REGNUM ()*/);
1039 #ifdef ECOFF_REG_TO_REGNUM
1040 fprintf_unfiltered (file
,
1041 "gdbarch_dump: %s # %s\n",
1042 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
1043 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
1045 fprintf_unfiltered (file
,
1046 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1047 (long) current_gdbarch
->ecoff_reg_to_regnum
1048 /*ECOFF_REG_TO_REGNUM ()*/);
1050 #ifdef EXTRACT_RETURN_VALUE
1052 /* Macro might contain `[{}]' when not multi-arch */
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: %s # %s\n",
1055 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1056 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1061 (long) current_gdbarch
->extract_return_value
1062 /*EXTRACT_RETURN_VALUE ()*/);
1064 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: %s # %s\n",
1067 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1068 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1072 (long) current_gdbarch
->extract_struct_value_address
1073 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1075 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1078 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
1081 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
1083 #ifdef FETCH_PSEUDO_REGISTER
1085 /* Macro might contain `[{}]' when not multi-arch */
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: %s # %s\n",
1088 "FETCH_PSEUDO_REGISTER(regnum)",
1089 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1092 fprintf_unfiltered (file
,
1093 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1094 (long) current_gdbarch
->fetch_pseudo_register
1095 /*FETCH_PSEUDO_REGISTER ()*/);
1097 #ifdef FIX_CALL_DUMMY
1099 /* Macro might contain `[{}]' when not multi-arch */
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: %s # %s\n",
1102 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1103 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1108 (long) current_gdbarch
->fix_call_dummy
1109 /*FIX_CALL_DUMMY ()*/);
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: FP0_REGNUM # %s\n",
1114 XSTRING (FP0_REGNUM
));
1115 fprintf_unfiltered (file
,
1116 "gdbarch_dump: FP0_REGNUM = %ld\n",
1120 fprintf_unfiltered (file
,
1121 "gdbarch_dump: FP_REGNUM # %s\n",
1122 XSTRING (FP_REGNUM
));
1123 fprintf_unfiltered (file
,
1124 "gdbarch_dump: FP_REGNUM = %ld\n",
1127 #ifdef FRAMELESS_FUNCTION_INVOCATION
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: %s # %s\n",
1130 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1131 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1133 fprintf_unfiltered (file
,
1134 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
1135 (long) current_gdbarch
->frameless_function_invocation
1136 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
1138 #ifdef FRAME_ARGS_ADDRESS
1139 fprintf_unfiltered (file
,
1140 "gdbarch_dump: %s # %s\n",
1141 "FRAME_ARGS_ADDRESS(fi)",
1142 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1144 fprintf_unfiltered (file
,
1145 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
1146 (long) current_gdbarch
->frame_args_address
1147 /*FRAME_ARGS_ADDRESS ()*/);
1149 #ifdef FRAME_ARGS_SKIP
1150 fprintf_unfiltered (file
,
1151 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1152 XSTRING (FRAME_ARGS_SKIP
));
1153 fprintf_unfiltered (file
,
1154 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
1155 (long) FRAME_ARGS_SKIP
);
1158 fprintf_unfiltered (file
,
1159 "gdbarch_dump: %s # %s\n",
1160 "FRAME_CHAIN(frame)",
1161 XSTRING (FRAME_CHAIN (frame
)));
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
1165 (long) current_gdbarch
->frame_chain
1166 /*FRAME_CHAIN ()*/);
1168 #ifdef FRAME_CHAIN_VALID
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: %s # %s\n",
1171 "FRAME_CHAIN_VALID(chain, thisframe)",
1172 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1174 fprintf_unfiltered (file
,
1175 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
1176 (long) current_gdbarch
->frame_chain_valid
1177 /*FRAME_CHAIN_VALID ()*/);
1179 #ifdef FRAME_INIT_SAVED_REGS
1181 /* Macro might contain `[{}]' when not multi-arch */
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: %s # %s\n",
1184 "FRAME_INIT_SAVED_REGS(frame)",
1185 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1190 (long) current_gdbarch
->frame_init_saved_regs
1191 /*FRAME_INIT_SAVED_REGS ()*/);
1193 #ifdef FRAME_LOCALS_ADDRESS
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: %s # %s\n",
1196 "FRAME_LOCALS_ADDRESS(fi)",
1197 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1199 fprintf_unfiltered (file
,
1200 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
1201 (long) current_gdbarch
->frame_locals_address
1202 /*FRAME_LOCALS_ADDRESS ()*/);
1204 #ifdef FRAME_NUM_ARGS
1205 fprintf_unfiltered (file
,
1206 "gdbarch_dump: %s # %s\n",
1207 "FRAME_NUM_ARGS(frame)",
1208 XSTRING (FRAME_NUM_ARGS (frame
)));
1210 fprintf_unfiltered (file
,
1211 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
1212 (long) current_gdbarch
->frame_num_args
1213 /*FRAME_NUM_ARGS ()*/);
1215 #ifdef FRAME_SAVED_PC
1216 fprintf_unfiltered (file
,
1217 "gdbarch_dump: %s # %s\n",
1218 "FRAME_SAVED_PC(fi)",
1219 XSTRING (FRAME_SAVED_PC (fi
)));
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
1223 (long) current_gdbarch
->frame_saved_pc
1224 /*FRAME_SAVED_PC ()*/);
1226 #ifdef FUNCTION_START_OFFSET
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1229 XSTRING (FUNCTION_START_OFFSET
));
1230 fprintf_unfiltered (file
,
1231 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
1232 (long) FUNCTION_START_OFFSET
);
1234 #ifdef GET_SAVED_REGISTER
1236 /* Macro might contain `[{}]' when not multi-arch */
1237 fprintf_unfiltered (file
,
1238 "gdbarch_dump: %s # %s\n",
1239 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1240 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1243 fprintf_unfiltered (file
,
1244 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1245 (long) current_gdbarch
->get_saved_register
1246 /*GET_SAVED_REGISTER ()*/);
1249 fprintf_unfiltered (file
,
1250 "gdbarch_dump: IEEE_FLOAT # %s\n",
1251 XSTRING (IEEE_FLOAT
));
1252 fprintf_unfiltered (file
,
1253 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1256 #ifdef INIT_EXTRA_FRAME_INFO
1258 /* Macro might contain `[{}]' when not multi-arch */
1259 fprintf_unfiltered (file
,
1260 "gdbarch_dump: %s # %s\n",
1261 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1262 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
1267 (long) current_gdbarch
->init_extra_frame_info
1268 /*INIT_EXTRA_FRAME_INFO ()*/);
1270 #ifdef INIT_FRAME_PC
1272 /* Macro might contain `[{}]' when not multi-arch */
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: %s # %s\n",
1275 "INIT_FRAME_PC(fromleaf, prev)",
1276 XSTRING (INIT_FRAME_PC (fromleaf
, prev
)));
1279 fprintf_unfiltered (file
,
1280 "gdbarch_dump: INIT_FRAME_PC = 0x%08lx\n",
1281 (long) current_gdbarch
->init_frame_pc
1282 /*INIT_FRAME_PC ()*/);
1284 #ifdef INIT_FRAME_PC_FIRST
1286 /* Macro might contain `[{}]' when not multi-arch */
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: %s # %s\n",
1289 "INIT_FRAME_PC_FIRST(fromleaf, prev)",
1290 XSTRING (INIT_FRAME_PC_FIRST (fromleaf
, prev
)));
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: INIT_FRAME_PC_FIRST = 0x%08lx\n",
1295 (long) current_gdbarch
->init_frame_pc_first
1296 /*INIT_FRAME_PC_FIRST ()*/);
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: %s # %s\n",
1301 "INNER_THAN(lhs, rhs)",
1302 XSTRING (INNER_THAN (lhs
, rhs
)));
1304 fprintf_unfiltered (file
,
1305 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
1306 (long) current_gdbarch
->inner_than
1309 #ifdef MAX_REGISTER_RAW_SIZE
1310 fprintf_unfiltered (file
,
1311 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
1312 XSTRING (MAX_REGISTER_RAW_SIZE
));
1313 fprintf_unfiltered (file
,
1314 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1315 (long) MAX_REGISTER_RAW_SIZE
);
1317 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1318 fprintf_unfiltered (file
,
1319 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1320 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1323 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1325 #ifdef MEMORY_INSERT_BREAKPOINT
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: %s # %s\n",
1328 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1329 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1331 fprintf_unfiltered (file
,
1332 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
1333 (long) current_gdbarch
->memory_insert_breakpoint
1334 /*MEMORY_INSERT_BREAKPOINT ()*/);
1336 #ifdef MEMORY_REMOVE_BREAKPOINT
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: %s # %s\n",
1339 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1340 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1342 fprintf_unfiltered (file
,
1343 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
1344 (long) current_gdbarch
->memory_remove_breakpoint
1345 /*MEMORY_REMOVE_BREAKPOINT ()*/);
1348 fprintf_unfiltered (file
,
1349 "gdbarch_dump: NNPC_REGNUM # %s\n",
1350 XSTRING (NNPC_REGNUM
));
1351 fprintf_unfiltered (file
,
1352 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1353 (long) NNPC_REGNUM
);
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: NPC_REGNUM # %s\n",
1358 XSTRING (NPC_REGNUM
));
1359 fprintf_unfiltered (file
,
1360 "gdbarch_dump: NPC_REGNUM = %ld\n",
1363 #ifdef NUM_PSEUDO_REGS
1364 fprintf_unfiltered (file
,
1365 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
1366 XSTRING (NUM_PSEUDO_REGS
));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1369 (long) NUM_PSEUDO_REGS
);
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: NUM_REGS # %s\n",
1374 XSTRING (NUM_REGS
));
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: NUM_REGS = %ld\n",
1379 #ifdef PARM_BOUNDARY
1380 fprintf_unfiltered (file
,
1381 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1382 XSTRING (PARM_BOUNDARY
));
1383 fprintf_unfiltered (file
,
1384 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
1385 (long) PARM_BOUNDARY
);
1387 #ifdef PC_IN_CALL_DUMMY
1388 fprintf_unfiltered (file
,
1389 "gdbarch_dump: %s # %s\n",
1390 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1391 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1395 (long) current_gdbarch
->pc_in_call_dummy
1396 /*PC_IN_CALL_DUMMY ()*/);
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: PC_REGNUM # %s\n",
1401 XSTRING (PC_REGNUM
));
1402 fprintf_unfiltered (file
,
1403 "gdbarch_dump: PC_REGNUM = %ld\n",
1406 #ifdef POINTER_TO_ADDRESS
1407 fprintf_unfiltered (file
,
1408 "gdbarch_dump: %s # %s\n",
1409 "POINTER_TO_ADDRESS(type, buf)",
1410 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1412 fprintf_unfiltered (file
,
1413 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1414 (long) current_gdbarch
->pointer_to_address
1415 /*POINTER_TO_ADDRESS ()*/);
1419 /* Macro might contain `[{}]' when not multi-arch */
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: %s # %s\n",
1423 XSTRING (POP_FRAME (-)));
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1428 (long) current_gdbarch
->pop_frame
1431 #ifdef PREPARE_TO_PROCEED
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: %s # %s\n",
1434 "PREPARE_TO_PROCEED(select_it)",
1435 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
1439 (long) current_gdbarch
->prepare_to_proceed
1440 /*PREPARE_TO_PROCEED ()*/);
1442 #ifdef PROLOGUE_FRAMELESS_P
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: %s # %s\n",
1445 "PROLOGUE_FRAMELESS_P(ip)",
1446 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
1450 (long) current_gdbarch
->prologue_frameless_p
1451 /*PROLOGUE_FRAMELESS_P ()*/);
1453 #ifdef PUSH_ARGUMENTS
1454 fprintf_unfiltered (file
,
1455 "gdbarch_dump: %s # %s\n",
1456 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1457 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1461 (long) current_gdbarch
->push_arguments
1462 /*PUSH_ARGUMENTS ()*/);
1464 #ifdef PUSH_DUMMY_FRAME
1466 /* Macro might contain `[{}]' when not multi-arch */
1467 fprintf_unfiltered (file
,
1468 "gdbarch_dump: %s # %s\n",
1469 "PUSH_DUMMY_FRAME(-)",
1470 XSTRING (PUSH_DUMMY_FRAME (-)));
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1475 (long) current_gdbarch
->push_dummy_frame
1476 /*PUSH_DUMMY_FRAME ()*/);
1478 #ifdef PUSH_RETURN_ADDRESS
1479 fprintf_unfiltered (file
,
1480 "gdbarch_dump: %s # %s\n",
1481 "PUSH_RETURN_ADDRESS(pc, sp)",
1482 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1484 fprintf_unfiltered (file
,
1485 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1486 (long) current_gdbarch
->push_return_address
1487 /*PUSH_RETURN_ADDRESS ()*/);
1489 #ifdef REGISTER_BYTE
1490 fprintf_unfiltered (file
,
1491 "gdbarch_dump: %s # %s\n",
1492 "REGISTER_BYTE(reg_nr)",
1493 XSTRING (REGISTER_BYTE (reg_nr
)));
1495 fprintf_unfiltered (file
,
1496 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1497 (long) current_gdbarch
->register_byte
1498 /*REGISTER_BYTE ()*/);
1500 #ifdef REGISTER_BYTES
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: REGISTER_BYTES # %s\n",
1503 XSTRING (REGISTER_BYTES
));
1504 fprintf_unfiltered (file
,
1505 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1506 (long) REGISTER_BYTES
);
1508 #ifdef REGISTER_BYTES_OK
1509 fprintf_unfiltered (file
,
1510 "gdbarch_dump: %s # %s\n",
1511 "REGISTER_BYTES_OK(nr_bytes)",
1512 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1514 fprintf_unfiltered (file
,
1515 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1516 (long) current_gdbarch
->register_bytes_ok
1517 /*REGISTER_BYTES_OK ()*/);
1519 #ifdef REGISTER_CONVERTIBLE
1520 fprintf_unfiltered (file
,
1521 "gdbarch_dump: %s # %s\n",
1522 "REGISTER_CONVERTIBLE(nr)",
1523 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1525 fprintf_unfiltered (file
,
1526 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1527 (long) current_gdbarch
->register_convertible
1528 /*REGISTER_CONVERTIBLE ()*/);
1530 #ifdef REGISTER_CONVERT_TO_RAW
1532 /* Macro might contain `[{}]' when not multi-arch */
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: %s # %s\n",
1535 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1536 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1539 fprintf_unfiltered (file
,
1540 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1541 (long) current_gdbarch
->register_convert_to_raw
1542 /*REGISTER_CONVERT_TO_RAW ()*/);
1544 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1546 /* Macro might contain `[{}]' when not multi-arch */
1547 fprintf_unfiltered (file
,
1548 "gdbarch_dump: %s # %s\n",
1549 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1550 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1555 (long) current_gdbarch
->register_convert_to_virtual
1556 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1558 #ifdef REGISTER_NAME
1559 fprintf_unfiltered (file
,
1560 "gdbarch_dump: %s # %s\n",
1561 "REGISTER_NAME(regnr)",
1562 XSTRING (REGISTER_NAME (regnr
)));
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1566 (long) current_gdbarch
->register_name
1567 /*REGISTER_NAME ()*/);
1569 #ifdef REGISTER_RAW_SIZE
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: %s # %s\n",
1572 "REGISTER_RAW_SIZE(reg_nr)",
1573 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
1575 fprintf_unfiltered (file
,
1576 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1577 (long) current_gdbarch
->register_raw_size
1578 /*REGISTER_RAW_SIZE ()*/);
1580 #ifdef REGISTER_SIM_REGNO
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: %s # %s\n",
1583 "REGISTER_SIM_REGNO(reg_nr)",
1584 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1588 (long) current_gdbarch
->register_sim_regno
1589 /*REGISTER_SIM_REGNO ()*/);
1591 #ifdef REGISTER_SIZE
1592 fprintf_unfiltered (file
,
1593 "gdbarch_dump: REGISTER_SIZE # %s\n",
1594 XSTRING (REGISTER_SIZE
));
1595 fprintf_unfiltered (file
,
1596 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1597 (long) REGISTER_SIZE
);
1599 #ifdef REGISTER_VIRTUAL_SIZE
1600 fprintf_unfiltered (file
,
1601 "gdbarch_dump: %s # %s\n",
1602 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1603 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1605 fprintf_unfiltered (file
,
1606 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1607 (long) current_gdbarch
->register_virtual_size
1608 /*REGISTER_VIRTUAL_SIZE ()*/);
1610 #ifdef REGISTER_VIRTUAL_TYPE
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: %s # %s\n",
1613 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1614 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1616 fprintf_unfiltered (file
,
1617 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1618 (long) current_gdbarch
->register_virtual_type
1619 /*REGISTER_VIRTUAL_TYPE ()*/);
1621 #ifdef REG_STRUCT_HAS_ADDR
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: %s # %s\n",
1624 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1625 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1627 fprintf_unfiltered (file
,
1628 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
1629 (long) current_gdbarch
->reg_struct_has_addr
1630 /*REG_STRUCT_HAS_ADDR ()*/);
1632 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
1634 /* Macro might contain `[{}]' when not multi-arch */
1635 fprintf_unfiltered (file
,
1636 "gdbarch_dump: %s # %s\n",
1637 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1638 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1641 fprintf_unfiltered (file
,
1642 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
1643 (long) current_gdbarch
->remote_translate_xfer_address
1644 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
1646 #ifdef RETURN_VALUE_ON_STACK
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: %s # %s\n",
1649 "RETURN_VALUE_ON_STACK(type)",
1650 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1652 fprintf_unfiltered (file
,
1653 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1654 (long) current_gdbarch
->return_value_on_stack
1655 /*RETURN_VALUE_ON_STACK ()*/);
1657 #ifdef SAVED_PC_AFTER_CALL
1658 fprintf_unfiltered (file
,
1659 "gdbarch_dump: %s # %s\n",
1660 "SAVED_PC_AFTER_CALL(frame)",
1661 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
1665 (long) current_gdbarch
->saved_pc_after_call
1666 /*SAVED_PC_AFTER_CALL ()*/);
1668 #ifdef SAVE_DUMMY_FRAME_TOS
1670 /* Macro might contain `[{}]' when not multi-arch */
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: %s # %s\n",
1673 "SAVE_DUMMY_FRAME_TOS(sp)",
1674 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1677 fprintf_unfiltered (file
,
1678 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
1679 (long) current_gdbarch
->save_dummy_frame_tos
1680 /*SAVE_DUMMY_FRAME_TOS ()*/);
1682 #ifdef SDB_REG_TO_REGNUM
1683 fprintf_unfiltered (file
,
1684 "gdbarch_dump: %s # %s\n",
1685 "SDB_REG_TO_REGNUM(sdb_regnr)",
1686 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1690 (long) current_gdbarch
->sdb_reg_to_regnum
1691 /*SDB_REG_TO_REGNUM ()*/);
1693 #ifdef SIZEOF_CALL_DUMMY_WORDS
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1696 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1697 fprintf_unfiltered (file
,
1698 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1699 (long) SIZEOF_CALL_DUMMY_WORDS
);
1701 #ifdef SKIP_PROLOGUE
1702 fprintf_unfiltered (file
,
1703 "gdbarch_dump: %s # %s\n",
1704 "SKIP_PROLOGUE(ip)",
1705 XSTRING (SKIP_PROLOGUE (ip
)));
1707 fprintf_unfiltered (file
,
1708 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
1709 (long) current_gdbarch
->skip_prologue
1710 /*SKIP_PROLOGUE ()*/);
1712 #ifdef SKIP_TRAMPOLINE_CODE
1713 fprintf_unfiltered (file
,
1714 "gdbarch_dump: %s # %s\n",
1715 "SKIP_TRAMPOLINE_CODE(pc)",
1716 XSTRING (SKIP_TRAMPOLINE_CODE (pc
)));
1718 fprintf_unfiltered (file
,
1719 "gdbarch_dump: SKIP_TRAMPOLINE_CODE = 0x%08lx\n",
1720 (long) current_gdbarch
->skip_trampoline_code
1721 /*SKIP_TRAMPOLINE_CODE ()*/);
1723 #ifdef SOFTWARE_SINGLE_STEP
1725 /* Macro might contain `[{}]' when not multi-arch */
1726 fprintf_unfiltered (file
,
1727 "gdbarch_dump: %s # %s\n",
1728 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1729 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1732 fprintf_unfiltered (file
,
1733 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
1734 (long) current_gdbarch
->software_single_step
1735 /*SOFTWARE_SINGLE_STEP ()*/);
1738 fprintf_unfiltered (file
,
1739 "gdbarch_dump: SP_REGNUM # %s\n",
1740 XSTRING (SP_REGNUM
));
1741 fprintf_unfiltered (file
,
1742 "gdbarch_dump: SP_REGNUM = %ld\n",
1745 #ifdef STAB_REG_TO_REGNUM
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: %s # %s\n",
1748 "STAB_REG_TO_REGNUM(stab_regnr)",
1749 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
1751 fprintf_unfiltered (file
,
1752 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1753 (long) current_gdbarch
->stab_reg_to_regnum
1754 /*STAB_REG_TO_REGNUM ()*/);
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: %s # %s\n",
1760 XSTRING (STACK_ALIGN (sp
)));
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
1764 (long) current_gdbarch
->stack_align
1765 /*STACK_ALIGN ()*/);
1767 #ifdef STORE_PSEUDO_REGISTER
1769 /* Macro might contain `[{}]' when not multi-arch */
1770 fprintf_unfiltered (file
,
1771 "gdbarch_dump: %s # %s\n",
1772 "STORE_PSEUDO_REGISTER(regnum)",
1773 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1776 fprintf_unfiltered (file
,
1777 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1778 (long) current_gdbarch
->store_pseudo_register
1779 /*STORE_PSEUDO_REGISTER ()*/);
1781 #ifdef STORE_RETURN_VALUE
1783 /* Macro might contain `[{}]' when not multi-arch */
1784 fprintf_unfiltered (file
,
1785 "gdbarch_dump: %s # %s\n",
1786 "STORE_RETURN_VALUE(type, valbuf)",
1787 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1792 (long) current_gdbarch
->store_return_value
1793 /*STORE_RETURN_VALUE ()*/);
1795 #ifdef STORE_STRUCT_RETURN
1797 /* Macro might contain `[{}]' when not multi-arch */
1798 fprintf_unfiltered (file
,
1799 "gdbarch_dump: %s # %s\n",
1800 "STORE_STRUCT_RETURN(addr, sp)",
1801 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1804 fprintf_unfiltered (file
,
1805 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1806 (long) current_gdbarch
->store_struct_return
1807 /*STORE_STRUCT_RETURN ()*/);
1809 #ifdef TARGET_ADDR_BIT
1810 fprintf_unfiltered (file
,
1811 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
1812 XSTRING (TARGET_ADDR_BIT
));
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1815 (long) TARGET_ADDR_BIT
);
1817 #ifdef TARGET_ARCHITECTURE
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
1820 XSTRING (TARGET_ARCHITECTURE
));
1821 if (TARGET_ARCHITECTURE
!= NULL
)
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1824 TARGET_ARCHITECTURE
->printable_name
);
1826 #ifdef TARGET_BFD_VMA_BIT
1827 fprintf_unfiltered (file
,
1828 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
1829 XSTRING (TARGET_BFD_VMA_BIT
));
1830 fprintf_unfiltered (file
,
1831 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1832 (long) TARGET_BFD_VMA_BIT
);
1834 #ifdef TARGET_BYTE_ORDER
1835 fprintf_unfiltered (file
,
1836 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
1837 XSTRING (TARGET_BYTE_ORDER
));
1838 fprintf_unfiltered (file
,
1839 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1840 (long) TARGET_BYTE_ORDER
);
1842 #ifdef TARGET_DOUBLE_BIT
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
1845 XSTRING (TARGET_DOUBLE_BIT
));
1846 fprintf_unfiltered (file
,
1847 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1848 (long) TARGET_DOUBLE_BIT
);
1850 #ifdef TARGET_DOUBLE_FORMAT
1851 fprintf_unfiltered (file
,
1852 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1853 XSTRING (TARGET_DOUBLE_FORMAT
));
1854 fprintf_unfiltered (file
,
1855 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
1856 (long) TARGET_DOUBLE_FORMAT
);
1858 #ifdef TARGET_FLOAT_BIT
1859 fprintf_unfiltered (file
,
1860 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
1861 XSTRING (TARGET_FLOAT_BIT
));
1862 fprintf_unfiltered (file
,
1863 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1864 (long) TARGET_FLOAT_BIT
);
1866 #ifdef TARGET_FLOAT_FORMAT
1867 fprintf_unfiltered (file
,
1868 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1869 XSTRING (TARGET_FLOAT_FORMAT
));
1870 fprintf_unfiltered (file
,
1871 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
1872 (long) TARGET_FLOAT_FORMAT
);
1874 #ifdef TARGET_INT_BIT
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: TARGET_INT_BIT # %s\n",
1877 XSTRING (TARGET_INT_BIT
));
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1880 (long) TARGET_INT_BIT
);
1882 #ifdef TARGET_LONG_BIT
1883 fprintf_unfiltered (file
,
1884 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
1885 XSTRING (TARGET_LONG_BIT
));
1886 fprintf_unfiltered (file
,
1887 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1888 (long) TARGET_LONG_BIT
);
1890 #ifdef TARGET_LONG_DOUBLE_BIT
1891 fprintf_unfiltered (file
,
1892 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
1893 XSTRING (TARGET_LONG_DOUBLE_BIT
));
1894 fprintf_unfiltered (file
,
1895 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1896 (long) TARGET_LONG_DOUBLE_BIT
);
1898 #ifdef TARGET_LONG_DOUBLE_FORMAT
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1901 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1902 fprintf_unfiltered (file
,
1903 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
1904 (long) TARGET_LONG_DOUBLE_FORMAT
);
1906 #ifdef TARGET_LONG_LONG_BIT
1907 fprintf_unfiltered (file
,
1908 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
1909 XSTRING (TARGET_LONG_LONG_BIT
));
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1912 (long) TARGET_LONG_LONG_BIT
);
1914 #ifdef TARGET_PRINT_INSN
1915 fprintf_unfiltered (file
,
1916 "gdbarch_dump: %s # %s\n",
1917 "TARGET_PRINT_INSN(vma, info)",
1918 XSTRING (TARGET_PRINT_INSN (vma
, info
)));
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: TARGET_PRINT_INSN = 0x%08lx\n",
1922 (long) current_gdbarch
->print_insn
1923 /*TARGET_PRINT_INSN ()*/);
1925 #ifdef TARGET_PTR_BIT
1926 fprintf_unfiltered (file
,
1927 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
1928 XSTRING (TARGET_PTR_BIT
));
1929 fprintf_unfiltered (file
,
1930 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1931 (long) TARGET_PTR_BIT
);
1933 #ifdef TARGET_READ_FP
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: %s # %s\n",
1937 XSTRING (TARGET_READ_FP ()));
1939 fprintf_unfiltered (file
,
1940 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1941 (long) current_gdbarch
->read_fp
1942 /*TARGET_READ_FP ()*/);
1944 #ifdef TARGET_READ_PC
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: %s # %s\n",
1947 "TARGET_READ_PC(ptid)",
1948 XSTRING (TARGET_READ_PC (ptid
)));
1950 fprintf_unfiltered (file
,
1951 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1952 (long) current_gdbarch
->read_pc
1953 /*TARGET_READ_PC ()*/);
1955 #ifdef TARGET_READ_SP
1956 fprintf_unfiltered (file
,
1957 "gdbarch_dump: %s # %s\n",
1959 XSTRING (TARGET_READ_SP ()));
1961 fprintf_unfiltered (file
,
1962 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1963 (long) current_gdbarch
->read_sp
1964 /*TARGET_READ_SP ()*/);
1966 #ifdef TARGET_SHORT_BIT
1967 fprintf_unfiltered (file
,
1968 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
1969 XSTRING (TARGET_SHORT_BIT
));
1970 fprintf_unfiltered (file
,
1971 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1972 (long) TARGET_SHORT_BIT
);
1974 #ifdef TARGET_VIRTUAL_FRAME_POINTER
1976 /* Macro might contain `[{}]' when not multi-arch */
1977 fprintf_unfiltered (file
,
1978 "gdbarch_dump: %s # %s\n",
1979 "TARGET_VIRTUAL_FRAME_POINTER(pc, frame_regnum, frame_offset)",
1980 XSTRING (TARGET_VIRTUAL_FRAME_POINTER (pc
, frame_regnum
, frame_offset
)));
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: TARGET_VIRTUAL_FRAME_POINTER = 0x%08lx\n",
1985 (long) current_gdbarch
->virtual_frame_pointer
1986 /*TARGET_VIRTUAL_FRAME_POINTER ()*/);
1988 #ifdef TARGET_WRITE_FP
1990 /* Macro might contain `[{}]' when not multi-arch */
1991 fprintf_unfiltered (file
,
1992 "gdbarch_dump: %s # %s\n",
1993 "TARGET_WRITE_FP(val)",
1994 XSTRING (TARGET_WRITE_FP (val
)));
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1999 (long) current_gdbarch
->write_fp
2000 /*TARGET_WRITE_FP ()*/);
2002 #ifdef TARGET_WRITE_PC
2004 /* Macro might contain `[{}]' when not multi-arch */
2005 fprintf_unfiltered (file
,
2006 "gdbarch_dump: %s # %s\n",
2007 "TARGET_WRITE_PC(val, ptid)",
2008 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
2013 (long) current_gdbarch
->write_pc
2014 /*TARGET_WRITE_PC ()*/);
2016 #ifdef TARGET_WRITE_SP
2018 /* Macro might contain `[{}]' when not multi-arch */
2019 fprintf_unfiltered (file
,
2020 "gdbarch_dump: %s # %s\n",
2021 "TARGET_WRITE_SP(val)",
2022 XSTRING (TARGET_WRITE_SP (val
)));
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
2027 (long) current_gdbarch
->write_sp
2028 /*TARGET_WRITE_SP ()*/);
2030 #ifdef USE_GENERIC_DUMMY_FRAMES
2031 fprintf_unfiltered (file
,
2032 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
2033 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
2034 fprintf_unfiltered (file
,
2035 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
2036 (long) USE_GENERIC_DUMMY_FRAMES
);
2038 #ifdef USE_STRUCT_CONVENTION
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: %s # %s\n",
2041 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
2042 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
2044 fprintf_unfiltered (file
,
2045 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
2046 (long) current_gdbarch
->use_struct_convention
2047 /*USE_STRUCT_CONVENTION ()*/);
2049 if (current_gdbarch
->dump_tdep
!= NULL
)
2050 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2053 struct gdbarch_tdep
*
2054 gdbarch_tdep (struct gdbarch
*gdbarch
)
2056 if (gdbarch_debug
>= 2)
2057 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2058 return gdbarch
->tdep
;
2062 const struct bfd_arch_info
*
2063 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2065 if (gdbarch_debug
>= 2)
2066 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2067 return gdbarch
->bfd_arch_info
;
2071 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2073 if (gdbarch_debug
>= 2)
2074 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2075 return gdbarch
->byte_order
;
2079 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2081 /* Skip verify of short_bit, invalid_p == 0 */
2082 if (gdbarch_debug
>= 2)
2083 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2084 return gdbarch
->short_bit
;
2088 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2091 gdbarch
->short_bit
= short_bit
;
2095 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2097 /* Skip verify of int_bit, invalid_p == 0 */
2098 if (gdbarch_debug
>= 2)
2099 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2100 return gdbarch
->int_bit
;
2104 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2107 gdbarch
->int_bit
= int_bit
;
2111 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2113 /* Skip verify of long_bit, invalid_p == 0 */
2114 if (gdbarch_debug
>= 2)
2115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2116 return gdbarch
->long_bit
;
2120 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2123 gdbarch
->long_bit
= long_bit
;
2127 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2129 /* Skip verify of long_long_bit, invalid_p == 0 */
2130 if (gdbarch_debug
>= 2)
2131 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2132 return gdbarch
->long_long_bit
;
2136 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2139 gdbarch
->long_long_bit
= long_long_bit
;
2143 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2145 /* Skip verify of float_bit, invalid_p == 0 */
2146 if (gdbarch_debug
>= 2)
2147 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2148 return gdbarch
->float_bit
;
2152 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2155 gdbarch
->float_bit
= float_bit
;
2159 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2161 /* Skip verify of double_bit, invalid_p == 0 */
2162 if (gdbarch_debug
>= 2)
2163 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2164 return gdbarch
->double_bit
;
2168 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2171 gdbarch
->double_bit
= double_bit
;
2175 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2177 /* Skip verify of long_double_bit, invalid_p == 0 */
2178 if (gdbarch_debug
>= 2)
2179 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2180 return gdbarch
->long_double_bit
;
2184 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2185 int long_double_bit
)
2187 gdbarch
->long_double_bit
= long_double_bit
;
2191 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2193 /* Skip verify of ptr_bit, invalid_p == 0 */
2194 if (gdbarch_debug
>= 2)
2195 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2196 return gdbarch
->ptr_bit
;
2200 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2203 gdbarch
->ptr_bit
= ptr_bit
;
2207 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2209 if (gdbarch
->addr_bit
== 0)
2210 internal_error (__FILE__
, __LINE__
,
2211 "gdbarch: gdbarch_addr_bit invalid");
2212 if (gdbarch_debug
>= 2)
2213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2214 return gdbarch
->addr_bit
;
2218 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2221 gdbarch
->addr_bit
= addr_bit
;
2225 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2227 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2228 if (gdbarch_debug
>= 2)
2229 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2230 return gdbarch
->bfd_vma_bit
;
2234 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2237 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2241 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2243 /* Skip verify of ieee_float, invalid_p == 0 */
2244 if (gdbarch_debug
>= 2)
2245 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2246 return gdbarch
->ieee_float
;
2250 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2253 gdbarch
->ieee_float
= ieee_float
;
2257 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2259 if (gdbarch
->read_pc
== 0)
2260 internal_error (__FILE__
, __LINE__
,
2261 "gdbarch: gdbarch_read_pc invalid");
2262 if (gdbarch_debug
>= 2)
2263 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2264 return gdbarch
->read_pc (ptid
);
2268 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2269 gdbarch_read_pc_ftype read_pc
)
2271 gdbarch
->read_pc
= read_pc
;
2275 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2277 if (gdbarch
->write_pc
== 0)
2278 internal_error (__FILE__
, __LINE__
,
2279 "gdbarch: gdbarch_write_pc invalid");
2280 if (gdbarch_debug
>= 2)
2281 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2282 gdbarch
->write_pc (val
, ptid
);
2286 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2287 gdbarch_write_pc_ftype write_pc
)
2289 gdbarch
->write_pc
= write_pc
;
2293 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2295 if (gdbarch
->read_fp
== 0)
2296 internal_error (__FILE__
, __LINE__
,
2297 "gdbarch: gdbarch_read_fp invalid");
2298 if (gdbarch_debug
>= 2)
2299 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2300 return gdbarch
->read_fp ();
2304 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2305 gdbarch_read_fp_ftype read_fp
)
2307 gdbarch
->read_fp
= read_fp
;
2311 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2313 if (gdbarch
->write_fp
== 0)
2314 internal_error (__FILE__
, __LINE__
,
2315 "gdbarch: gdbarch_write_fp invalid");
2316 if (gdbarch_debug
>= 2)
2317 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2318 gdbarch
->write_fp (val
);
2322 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2323 gdbarch_write_fp_ftype write_fp
)
2325 gdbarch
->write_fp
= write_fp
;
2329 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2331 if (gdbarch
->read_sp
== 0)
2332 internal_error (__FILE__
, __LINE__
,
2333 "gdbarch: gdbarch_read_sp invalid");
2334 if (gdbarch_debug
>= 2)
2335 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2336 return gdbarch
->read_sp ();
2340 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2341 gdbarch_read_sp_ftype read_sp
)
2343 gdbarch
->read_sp
= read_sp
;
2347 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2349 if (gdbarch
->write_sp
== 0)
2350 internal_error (__FILE__
, __LINE__
,
2351 "gdbarch: gdbarch_write_sp invalid");
2352 if (gdbarch_debug
>= 2)
2353 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2354 gdbarch
->write_sp (val
);
2358 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2359 gdbarch_write_sp_ftype write_sp
)
2361 gdbarch
->write_sp
= write_sp
;
2365 gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
, CORE_ADDR pc
, int *frame_regnum
, LONGEST
*frame_offset
)
2367 if (gdbarch
->virtual_frame_pointer
== 0)
2368 internal_error (__FILE__
, __LINE__
,
2369 "gdbarch: gdbarch_virtual_frame_pointer invalid");
2370 if (gdbarch_debug
>= 2)
2371 fprintf_unfiltered (gdb_stdlog
, "gdbarch_virtual_frame_pointer called\n");
2372 gdbarch
->virtual_frame_pointer (pc
, frame_regnum
, frame_offset
);
2376 set_gdbarch_virtual_frame_pointer (struct gdbarch
*gdbarch
,
2377 gdbarch_virtual_frame_pointer_ftype virtual_frame_pointer
)
2379 gdbarch
->virtual_frame_pointer
= virtual_frame_pointer
;
2383 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2385 return gdbarch
->register_read
!= 0;
2389 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2391 if (gdbarch
->register_read
== 0)
2392 internal_error (__FILE__
, __LINE__
,
2393 "gdbarch: gdbarch_register_read invalid");
2394 if (gdbarch_debug
>= 2)
2395 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2396 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2400 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2401 gdbarch_register_read_ftype register_read
)
2403 gdbarch
->register_read
= register_read
;
2407 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2409 return gdbarch
->register_write
!= 0;
2413 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2415 if (gdbarch
->register_write
== 0)
2416 internal_error (__FILE__
, __LINE__
,
2417 "gdbarch: gdbarch_register_write invalid");
2418 if (gdbarch_debug
>= 2)
2419 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2420 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2424 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2425 gdbarch_register_write_ftype register_write
)
2427 gdbarch
->register_write
= register_write
;
2431 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2433 if (gdbarch
->num_regs
== -1)
2434 internal_error (__FILE__
, __LINE__
,
2435 "gdbarch: gdbarch_num_regs invalid");
2436 if (gdbarch_debug
>= 2)
2437 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2438 return gdbarch
->num_regs
;
2442 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2445 gdbarch
->num_regs
= num_regs
;
2449 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2451 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2452 if (gdbarch_debug
>= 2)
2453 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2454 return gdbarch
->num_pseudo_regs
;
2458 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2459 int num_pseudo_regs
)
2461 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2465 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2467 if (gdbarch
->sp_regnum
== -1)
2468 internal_error (__FILE__
, __LINE__
,
2469 "gdbarch: gdbarch_sp_regnum invalid");
2470 if (gdbarch_debug
>= 2)
2471 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2472 return gdbarch
->sp_regnum
;
2476 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2479 gdbarch
->sp_regnum
= sp_regnum
;
2483 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2485 if (gdbarch
->fp_regnum
== -1)
2486 internal_error (__FILE__
, __LINE__
,
2487 "gdbarch: gdbarch_fp_regnum invalid");
2488 if (gdbarch_debug
>= 2)
2489 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2490 return gdbarch
->fp_regnum
;
2494 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2497 gdbarch
->fp_regnum
= fp_regnum
;
2501 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2503 if (gdbarch
->pc_regnum
== -1)
2504 internal_error (__FILE__
, __LINE__
,
2505 "gdbarch: gdbarch_pc_regnum invalid");
2506 if (gdbarch_debug
>= 2)
2507 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2508 return gdbarch
->pc_regnum
;
2512 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2515 gdbarch
->pc_regnum
= pc_regnum
;
2519 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2521 /* Skip verify of fp0_regnum, invalid_p == 0 */
2522 if (gdbarch_debug
>= 2)
2523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2524 return gdbarch
->fp0_regnum
;
2528 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2531 gdbarch
->fp0_regnum
= fp0_regnum
;
2535 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2537 /* Skip verify of npc_regnum, invalid_p == 0 */
2538 if (gdbarch_debug
>= 2)
2539 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2540 return gdbarch
->npc_regnum
;
2544 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2547 gdbarch
->npc_regnum
= npc_regnum
;
2551 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2553 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2554 if (gdbarch_debug
>= 2)
2555 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2556 return gdbarch
->nnpc_regnum
;
2560 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2563 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2567 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2569 if (gdbarch
->stab_reg_to_regnum
== 0)
2570 internal_error (__FILE__
, __LINE__
,
2571 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2572 if (gdbarch_debug
>= 2)
2573 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2574 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2578 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2579 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2581 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2585 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2587 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2588 internal_error (__FILE__
, __LINE__
,
2589 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2590 if (gdbarch_debug
>= 2)
2591 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2592 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2596 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2597 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2599 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2603 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2605 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2606 internal_error (__FILE__
, __LINE__
,
2607 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2608 if (gdbarch_debug
>= 2)
2609 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2610 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2614 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2615 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2617 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2621 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2623 if (gdbarch
->sdb_reg_to_regnum
== 0)
2624 internal_error (__FILE__
, __LINE__
,
2625 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2626 if (gdbarch_debug
>= 2)
2627 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2628 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2632 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2633 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2635 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2639 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2641 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2642 internal_error (__FILE__
, __LINE__
,
2643 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2644 if (gdbarch_debug
>= 2)
2645 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2646 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2650 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2651 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2653 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2657 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2659 if (gdbarch
->register_name
== 0)
2660 internal_error (__FILE__
, __LINE__
,
2661 "gdbarch: gdbarch_register_name invalid");
2662 if (gdbarch_debug
>= 2)
2663 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2664 return gdbarch
->register_name (regnr
);
2668 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2669 gdbarch_register_name_ftype register_name
)
2671 gdbarch
->register_name
= register_name
;
2675 gdbarch_register_size (struct gdbarch
*gdbarch
)
2677 if (gdbarch
->register_size
== -1)
2678 internal_error (__FILE__
, __LINE__
,
2679 "gdbarch: gdbarch_register_size invalid");
2680 if (gdbarch_debug
>= 2)
2681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2682 return gdbarch
->register_size
;
2686 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2689 gdbarch
->register_size
= register_size
;
2693 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2695 if (gdbarch
->register_bytes
== -1)
2696 internal_error (__FILE__
, __LINE__
,
2697 "gdbarch: gdbarch_register_bytes invalid");
2698 if (gdbarch_debug
>= 2)
2699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2700 return gdbarch
->register_bytes
;
2704 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2707 gdbarch
->register_bytes
= register_bytes
;
2711 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2713 if (gdbarch
->register_byte
== 0)
2714 internal_error (__FILE__
, __LINE__
,
2715 "gdbarch: gdbarch_register_byte invalid");
2716 if (gdbarch_debug
>= 2)
2717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2718 return gdbarch
->register_byte (reg_nr
);
2722 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2723 gdbarch_register_byte_ftype register_byte
)
2725 gdbarch
->register_byte
= register_byte
;
2729 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2731 if (gdbarch
->register_raw_size
== 0)
2732 internal_error (__FILE__
, __LINE__
,
2733 "gdbarch: gdbarch_register_raw_size invalid");
2734 if (gdbarch_debug
>= 2)
2735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2736 return gdbarch
->register_raw_size (reg_nr
);
2740 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2741 gdbarch_register_raw_size_ftype register_raw_size
)
2743 gdbarch
->register_raw_size
= register_raw_size
;
2747 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2749 if (gdbarch
->max_register_raw_size
== -1)
2750 internal_error (__FILE__
, __LINE__
,
2751 "gdbarch: gdbarch_max_register_raw_size invalid");
2752 if (gdbarch_debug
>= 2)
2753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2754 return gdbarch
->max_register_raw_size
;
2758 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2759 int max_register_raw_size
)
2761 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2765 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2767 if (gdbarch
->register_virtual_size
== 0)
2768 internal_error (__FILE__
, __LINE__
,
2769 "gdbarch: gdbarch_register_virtual_size invalid");
2770 if (gdbarch_debug
>= 2)
2771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2772 return gdbarch
->register_virtual_size (reg_nr
);
2776 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2777 gdbarch_register_virtual_size_ftype register_virtual_size
)
2779 gdbarch
->register_virtual_size
= register_virtual_size
;
2783 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2785 if (gdbarch
->max_register_virtual_size
== -1)
2786 internal_error (__FILE__
, __LINE__
,
2787 "gdbarch: gdbarch_max_register_virtual_size invalid");
2788 if (gdbarch_debug
>= 2)
2789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2790 return gdbarch
->max_register_virtual_size
;
2794 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2795 int max_register_virtual_size
)
2797 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2801 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2803 if (gdbarch
->register_virtual_type
== 0)
2804 internal_error (__FILE__
, __LINE__
,
2805 "gdbarch: gdbarch_register_virtual_type invalid");
2806 if (gdbarch_debug
>= 2)
2807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2808 return gdbarch
->register_virtual_type (reg_nr
);
2812 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2813 gdbarch_register_virtual_type_ftype register_virtual_type
)
2815 gdbarch
->register_virtual_type
= register_virtual_type
;
2819 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2821 if (gdbarch
->do_registers_info
== 0)
2822 internal_error (__FILE__
, __LINE__
,
2823 "gdbarch: gdbarch_do_registers_info invalid");
2824 if (gdbarch_debug
>= 2)
2825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2826 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2830 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2831 gdbarch_do_registers_info_ftype do_registers_info
)
2833 gdbarch
->do_registers_info
= do_registers_info
;
2837 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2839 if (gdbarch
->register_sim_regno
== 0)
2840 internal_error (__FILE__
, __LINE__
,
2841 "gdbarch: gdbarch_register_sim_regno invalid");
2842 if (gdbarch_debug
>= 2)
2843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2844 return gdbarch
->register_sim_regno (reg_nr
);
2848 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2849 gdbarch_register_sim_regno_ftype register_sim_regno
)
2851 gdbarch
->register_sim_regno
= register_sim_regno
;
2855 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2857 return gdbarch
->register_bytes_ok
!= 0;
2861 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2863 if (gdbarch
->register_bytes_ok
== 0)
2864 internal_error (__FILE__
, __LINE__
,
2865 "gdbarch: gdbarch_register_bytes_ok invalid");
2866 if (gdbarch_debug
>= 2)
2867 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2868 return gdbarch
->register_bytes_ok (nr_bytes
);
2872 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2873 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
2875 gdbarch
->register_bytes_ok
= register_bytes_ok
;
2879 gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
, int regnum
)
2881 if (gdbarch
->cannot_fetch_register
== 0)
2882 internal_error (__FILE__
, __LINE__
,
2883 "gdbarch: gdbarch_cannot_fetch_register invalid");
2884 if (gdbarch_debug
>= 2)
2885 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_fetch_register called\n");
2886 return gdbarch
->cannot_fetch_register (regnum
);
2890 set_gdbarch_cannot_fetch_register (struct gdbarch
*gdbarch
,
2891 gdbarch_cannot_fetch_register_ftype cannot_fetch_register
)
2893 gdbarch
->cannot_fetch_register
= cannot_fetch_register
;
2897 gdbarch_cannot_store_register (struct gdbarch
*gdbarch
, int regnum
)
2899 if (gdbarch
->cannot_store_register
== 0)
2900 internal_error (__FILE__
, __LINE__
,
2901 "gdbarch: gdbarch_cannot_store_register invalid");
2902 if (gdbarch_debug
>= 2)
2903 fprintf_unfiltered (gdb_stdlog
, "gdbarch_cannot_store_register called\n");
2904 return gdbarch
->cannot_store_register (regnum
);
2908 set_gdbarch_cannot_store_register (struct gdbarch
*gdbarch
,
2909 gdbarch_cannot_store_register_ftype cannot_store_register
)
2911 gdbarch
->cannot_store_register
= cannot_store_register
;
2915 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
2917 if (gdbarch
->use_generic_dummy_frames
== -1)
2918 internal_error (__FILE__
, __LINE__
,
2919 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
2920 if (gdbarch_debug
>= 2)
2921 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
2922 return gdbarch
->use_generic_dummy_frames
;
2926 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
2927 int use_generic_dummy_frames
)
2929 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
2933 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
2935 if (gdbarch
->call_dummy_location
== 0)
2936 internal_error (__FILE__
, __LINE__
,
2937 "gdbarch: gdbarch_call_dummy_location invalid");
2938 if (gdbarch_debug
>= 2)
2939 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
2940 return gdbarch
->call_dummy_location
;
2944 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
2945 int call_dummy_location
)
2947 gdbarch
->call_dummy_location
= call_dummy_location
;
2951 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
2953 if (gdbarch
->call_dummy_address
== 0)
2954 internal_error (__FILE__
, __LINE__
,
2955 "gdbarch: gdbarch_call_dummy_address invalid");
2956 if (gdbarch_debug
>= 2)
2957 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
2958 return gdbarch
->call_dummy_address ();
2962 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
2963 gdbarch_call_dummy_address_ftype call_dummy_address
)
2965 gdbarch
->call_dummy_address
= call_dummy_address
;
2969 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
2971 if (gdbarch
->call_dummy_start_offset
== -1)
2972 internal_error (__FILE__
, __LINE__
,
2973 "gdbarch: gdbarch_call_dummy_start_offset invalid");
2974 if (gdbarch_debug
>= 2)
2975 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
2976 return gdbarch
->call_dummy_start_offset
;
2980 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
2981 CORE_ADDR call_dummy_start_offset
)
2983 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
2987 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
2989 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
2990 internal_error (__FILE__
, __LINE__
,
2991 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
2992 if (gdbarch_debug
>= 2)
2993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
2994 return gdbarch
->call_dummy_breakpoint_offset
;
2998 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
2999 CORE_ADDR call_dummy_breakpoint_offset
)
3001 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3005 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3007 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3008 internal_error (__FILE__
, __LINE__
,
3009 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3010 if (gdbarch_debug
>= 2)
3011 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3012 return gdbarch
->call_dummy_breakpoint_offset_p
;
3016 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3017 int call_dummy_breakpoint_offset_p
)
3019 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3023 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3025 if (gdbarch
->call_dummy_length
== -1)
3026 internal_error (__FILE__
, __LINE__
,
3027 "gdbarch: gdbarch_call_dummy_length invalid");
3028 if (gdbarch_debug
>= 2)
3029 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3030 return gdbarch
->call_dummy_length
;
3034 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3035 int call_dummy_length
)
3037 gdbarch
->call_dummy_length
= call_dummy_length
;
3041 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3043 if (gdbarch
->pc_in_call_dummy
== 0)
3044 internal_error (__FILE__
, __LINE__
,
3045 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3046 if (gdbarch_debug
>= 2)
3047 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3048 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3052 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3053 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3055 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3059 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3061 if (gdbarch
->call_dummy_p
== -1)
3062 internal_error (__FILE__
, __LINE__
,
3063 "gdbarch: gdbarch_call_dummy_p invalid");
3064 if (gdbarch_debug
>= 2)
3065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3066 return gdbarch
->call_dummy_p
;
3070 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3073 gdbarch
->call_dummy_p
= call_dummy_p
;
3077 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3079 /* Skip verify of call_dummy_words, invalid_p == 0 */
3080 if (gdbarch_debug
>= 2)
3081 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3082 return gdbarch
->call_dummy_words
;
3086 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3087 LONGEST
* call_dummy_words
)
3089 gdbarch
->call_dummy_words
= call_dummy_words
;
3093 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3095 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3096 if (gdbarch_debug
>= 2)
3097 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3098 return gdbarch
->sizeof_call_dummy_words
;
3102 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3103 int sizeof_call_dummy_words
)
3105 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3109 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3111 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3112 internal_error (__FILE__
, __LINE__
,
3113 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3114 if (gdbarch_debug
>= 2)
3115 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3116 return gdbarch
->call_dummy_stack_adjust_p
;
3120 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3121 int call_dummy_stack_adjust_p
)
3123 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3127 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3129 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3130 internal_error (__FILE__
, __LINE__
,
3131 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3132 if (gdbarch_debug
>= 2)
3133 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3134 return gdbarch
->call_dummy_stack_adjust
;
3138 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3139 int call_dummy_stack_adjust
)
3141 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3145 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
)
3147 if (gdbarch
->fix_call_dummy
== 0)
3148 internal_error (__FILE__
, __LINE__
,
3149 "gdbarch: gdbarch_fix_call_dummy invalid");
3150 if (gdbarch_debug
>= 2)
3151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3152 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3156 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3157 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3159 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3163 gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3165 if (gdbarch
->init_frame_pc_first
== 0)
3166 internal_error (__FILE__
, __LINE__
,
3167 "gdbarch: gdbarch_init_frame_pc_first invalid");
3168 if (gdbarch_debug
>= 2)
3169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc_first called\n");
3170 gdbarch
->init_frame_pc_first (fromleaf
, prev
);
3174 set_gdbarch_init_frame_pc_first (struct gdbarch
*gdbarch
,
3175 gdbarch_init_frame_pc_first_ftype init_frame_pc_first
)
3177 gdbarch
->init_frame_pc_first
= init_frame_pc_first
;
3181 gdbarch_init_frame_pc (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*prev
)
3183 if (gdbarch
->init_frame_pc
== 0)
3184 internal_error (__FILE__
, __LINE__
,
3185 "gdbarch: gdbarch_init_frame_pc invalid");
3186 if (gdbarch_debug
>= 2)
3187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_frame_pc called\n");
3188 gdbarch
->init_frame_pc (fromleaf
, prev
);
3192 set_gdbarch_init_frame_pc (struct gdbarch
*gdbarch
,
3193 gdbarch_init_frame_pc_ftype init_frame_pc
)
3195 gdbarch
->init_frame_pc
= init_frame_pc
;
3199 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3201 if (gdbarch_debug
>= 2)
3202 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3203 return gdbarch
->believe_pcc_promotion
;
3207 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3208 int believe_pcc_promotion
)
3210 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3214 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3216 if (gdbarch_debug
>= 2)
3217 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3218 return gdbarch
->believe_pcc_promotion_type
;
3222 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3223 int believe_pcc_promotion_type
)
3225 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3229 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3231 if (gdbarch
->coerce_float_to_double
== 0)
3232 internal_error (__FILE__
, __LINE__
,
3233 "gdbarch: gdbarch_coerce_float_to_double invalid");
3234 if (gdbarch_debug
>= 2)
3235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3236 return gdbarch
->coerce_float_to_double (formal
, actual
);
3240 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3241 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3243 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3247 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
)
3249 if (gdbarch
->get_saved_register
== 0)
3250 internal_error (__FILE__
, __LINE__
,
3251 "gdbarch: gdbarch_get_saved_register invalid");
3252 if (gdbarch_debug
>= 2)
3253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3254 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3258 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3259 gdbarch_get_saved_register_ftype get_saved_register
)
3261 gdbarch
->get_saved_register
= get_saved_register
;
3265 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3267 if (gdbarch
->register_convertible
== 0)
3268 internal_error (__FILE__
, __LINE__
,
3269 "gdbarch: gdbarch_register_convertible invalid");
3270 if (gdbarch_debug
>= 2)
3271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3272 return gdbarch
->register_convertible (nr
);
3276 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3277 gdbarch_register_convertible_ftype register_convertible
)
3279 gdbarch
->register_convertible
= register_convertible
;
3283 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3285 if (gdbarch
->register_convert_to_virtual
== 0)
3286 internal_error (__FILE__
, __LINE__
,
3287 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3288 if (gdbarch_debug
>= 2)
3289 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3290 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3294 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3295 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3297 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3301 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3303 if (gdbarch
->register_convert_to_raw
== 0)
3304 internal_error (__FILE__
, __LINE__
,
3305 "gdbarch: gdbarch_register_convert_to_raw invalid");
3306 if (gdbarch_debug
>= 2)
3307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3308 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3312 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3313 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3315 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3319 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3321 if (gdbarch
->fetch_pseudo_register
== 0)
3322 internal_error (__FILE__
, __LINE__
,
3323 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3324 if (gdbarch_debug
>= 2)
3325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3326 gdbarch
->fetch_pseudo_register (regnum
);
3330 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3331 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3333 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3337 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3339 if (gdbarch
->store_pseudo_register
== 0)
3340 internal_error (__FILE__
, __LINE__
,
3341 "gdbarch: gdbarch_store_pseudo_register invalid");
3342 if (gdbarch_debug
>= 2)
3343 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3344 gdbarch
->store_pseudo_register (regnum
);
3348 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3349 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3351 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3355 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3357 if (gdbarch
->pointer_to_address
== 0)
3358 internal_error (__FILE__
, __LINE__
,
3359 "gdbarch: gdbarch_pointer_to_address invalid");
3360 if (gdbarch_debug
>= 2)
3361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3362 return gdbarch
->pointer_to_address (type
, buf
);
3366 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3367 gdbarch_pointer_to_address_ftype pointer_to_address
)
3369 gdbarch
->pointer_to_address
= pointer_to_address
;
3373 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3375 if (gdbarch
->address_to_pointer
== 0)
3376 internal_error (__FILE__
, __LINE__
,
3377 "gdbarch: gdbarch_address_to_pointer invalid");
3378 if (gdbarch_debug
>= 2)
3379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3380 gdbarch
->address_to_pointer (type
, buf
, addr
);
3384 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3385 gdbarch_address_to_pointer_ftype address_to_pointer
)
3387 gdbarch
->address_to_pointer
= address_to_pointer
;
3391 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3393 if (gdbarch
->return_value_on_stack
== 0)
3394 internal_error (__FILE__
, __LINE__
,
3395 "gdbarch: gdbarch_return_value_on_stack invalid");
3396 if (gdbarch_debug
>= 2)
3397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3398 return gdbarch
->return_value_on_stack (type
);
3402 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3403 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3405 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3409 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3411 if (gdbarch
->extract_return_value
== 0)
3412 internal_error (__FILE__
, __LINE__
,
3413 "gdbarch: gdbarch_extract_return_value invalid");
3414 if (gdbarch_debug
>= 2)
3415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3416 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3420 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3421 gdbarch_extract_return_value_ftype extract_return_value
)
3423 gdbarch
->extract_return_value
= extract_return_value
;
3427 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3429 if (gdbarch
->push_arguments
== 0)
3430 internal_error (__FILE__
, __LINE__
,
3431 "gdbarch: gdbarch_push_arguments invalid");
3432 if (gdbarch_debug
>= 2)
3433 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3434 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3438 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3439 gdbarch_push_arguments_ftype push_arguments
)
3441 gdbarch
->push_arguments
= push_arguments
;
3445 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3447 if (gdbarch
->push_dummy_frame
== 0)
3448 internal_error (__FILE__
, __LINE__
,
3449 "gdbarch: gdbarch_push_dummy_frame invalid");
3450 if (gdbarch_debug
>= 2)
3451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3452 gdbarch
->push_dummy_frame ();
3456 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3457 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3459 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3463 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3465 if (gdbarch
->push_return_address
== 0)
3466 internal_error (__FILE__
, __LINE__
,
3467 "gdbarch: gdbarch_push_return_address invalid");
3468 if (gdbarch_debug
>= 2)
3469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3470 return gdbarch
->push_return_address (pc
, sp
);
3474 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3475 gdbarch_push_return_address_ftype push_return_address
)
3477 gdbarch
->push_return_address
= push_return_address
;
3481 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3483 if (gdbarch
->pop_frame
== 0)
3484 internal_error (__FILE__
, __LINE__
,
3485 "gdbarch: gdbarch_pop_frame invalid");
3486 if (gdbarch_debug
>= 2)
3487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3488 gdbarch
->pop_frame ();
3492 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3493 gdbarch_pop_frame_ftype pop_frame
)
3495 gdbarch
->pop_frame
= pop_frame
;
3499 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3501 if (gdbarch
->store_struct_return
== 0)
3502 internal_error (__FILE__
, __LINE__
,
3503 "gdbarch: gdbarch_store_struct_return invalid");
3504 if (gdbarch_debug
>= 2)
3505 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3506 gdbarch
->store_struct_return (addr
, sp
);
3510 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3511 gdbarch_store_struct_return_ftype store_struct_return
)
3513 gdbarch
->store_struct_return
= store_struct_return
;
3517 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3519 if (gdbarch
->store_return_value
== 0)
3520 internal_error (__FILE__
, __LINE__
,
3521 "gdbarch: gdbarch_store_return_value invalid");
3522 if (gdbarch_debug
>= 2)
3523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3524 gdbarch
->store_return_value (type
, valbuf
);
3528 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3529 gdbarch_store_return_value_ftype store_return_value
)
3531 gdbarch
->store_return_value
= store_return_value
;
3535 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3537 return gdbarch
->extract_struct_value_address
!= 0;
3541 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3543 if (gdbarch
->extract_struct_value_address
== 0)
3544 internal_error (__FILE__
, __LINE__
,
3545 "gdbarch: gdbarch_extract_struct_value_address invalid");
3546 if (gdbarch_debug
>= 2)
3547 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3548 return gdbarch
->extract_struct_value_address (regbuf
);
3552 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3553 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3555 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3559 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3561 if (gdbarch
->use_struct_convention
== 0)
3562 internal_error (__FILE__
, __LINE__
,
3563 "gdbarch: gdbarch_use_struct_convention invalid");
3564 if (gdbarch_debug
>= 2)
3565 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3566 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3570 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3571 gdbarch_use_struct_convention_ftype use_struct_convention
)
3573 gdbarch
->use_struct_convention
= use_struct_convention
;
3577 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3579 if (gdbarch
->frame_init_saved_regs
== 0)
3580 internal_error (__FILE__
, __LINE__
,
3581 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3582 if (gdbarch_debug
>= 2)
3583 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3584 gdbarch
->frame_init_saved_regs (frame
);
3588 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3589 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3591 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3595 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3597 if (gdbarch
->init_extra_frame_info
== 0)
3598 internal_error (__FILE__
, __LINE__
,
3599 "gdbarch: gdbarch_init_extra_frame_info invalid");
3600 if (gdbarch_debug
>= 2)
3601 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3602 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3606 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3607 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3609 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3613 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3615 if (gdbarch
->skip_prologue
== 0)
3616 internal_error (__FILE__
, __LINE__
,
3617 "gdbarch: gdbarch_skip_prologue invalid");
3618 if (gdbarch_debug
>= 2)
3619 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3620 return gdbarch
->skip_prologue (ip
);
3624 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3625 gdbarch_skip_prologue_ftype skip_prologue
)
3627 gdbarch
->skip_prologue
= skip_prologue
;
3631 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3633 if (gdbarch
->prologue_frameless_p
== 0)
3634 internal_error (__FILE__
, __LINE__
,
3635 "gdbarch: gdbarch_prologue_frameless_p invalid");
3636 if (gdbarch_debug
>= 2)
3637 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3638 return gdbarch
->prologue_frameless_p (ip
);
3642 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3643 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3645 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3649 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3651 if (gdbarch
->inner_than
== 0)
3652 internal_error (__FILE__
, __LINE__
,
3653 "gdbarch: gdbarch_inner_than invalid");
3654 if (gdbarch_debug
>= 2)
3655 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3656 return gdbarch
->inner_than (lhs
, rhs
);
3660 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3661 gdbarch_inner_than_ftype inner_than
)
3663 gdbarch
->inner_than
= inner_than
;
3667 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3669 if (gdbarch
->breakpoint_from_pc
== 0)
3670 internal_error (__FILE__
, __LINE__
,
3671 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3672 if (gdbarch_debug
>= 2)
3673 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3674 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3678 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3679 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3681 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3685 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3687 if (gdbarch
->memory_insert_breakpoint
== 0)
3688 internal_error (__FILE__
, __LINE__
,
3689 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3690 if (gdbarch_debug
>= 2)
3691 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3692 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3696 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3697 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3699 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3703 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3705 if (gdbarch
->memory_remove_breakpoint
== 0)
3706 internal_error (__FILE__
, __LINE__
,
3707 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3708 if (gdbarch_debug
>= 2)
3709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3710 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3714 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3715 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3717 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3721 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3723 if (gdbarch
->decr_pc_after_break
== -1)
3724 internal_error (__FILE__
, __LINE__
,
3725 "gdbarch: gdbarch_decr_pc_after_break invalid");
3726 if (gdbarch_debug
>= 2)
3727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3728 return gdbarch
->decr_pc_after_break
;
3732 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3733 CORE_ADDR decr_pc_after_break
)
3735 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3739 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3741 if (gdbarch
->prepare_to_proceed
== 0)
3742 internal_error (__FILE__
, __LINE__
,
3743 "gdbarch: gdbarch_prepare_to_proceed invalid");
3744 if (gdbarch_debug
>= 2)
3745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3746 return gdbarch
->prepare_to_proceed (select_it
);
3750 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3751 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3753 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3757 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3759 if (gdbarch
->function_start_offset
== -1)
3760 internal_error (__FILE__
, __LINE__
,
3761 "gdbarch: gdbarch_function_start_offset invalid");
3762 if (gdbarch_debug
>= 2)
3763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3764 return gdbarch
->function_start_offset
;
3768 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3769 CORE_ADDR function_start_offset
)
3771 gdbarch
->function_start_offset
= function_start_offset
;
3775 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3777 if (gdbarch
->remote_translate_xfer_address
== 0)
3778 internal_error (__FILE__
, __LINE__
,
3779 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3780 if (gdbarch_debug
>= 2)
3781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3782 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3786 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3787 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3789 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3793 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3795 if (gdbarch
->frame_args_skip
== -1)
3796 internal_error (__FILE__
, __LINE__
,
3797 "gdbarch: gdbarch_frame_args_skip invalid");
3798 if (gdbarch_debug
>= 2)
3799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3800 return gdbarch
->frame_args_skip
;
3804 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3805 CORE_ADDR frame_args_skip
)
3807 gdbarch
->frame_args_skip
= frame_args_skip
;
3811 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3813 if (gdbarch
->frameless_function_invocation
== 0)
3814 internal_error (__FILE__
, __LINE__
,
3815 "gdbarch: gdbarch_frameless_function_invocation invalid");
3816 if (gdbarch_debug
>= 2)
3817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3818 return gdbarch
->frameless_function_invocation (fi
);
3822 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3823 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3825 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3829 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3831 if (gdbarch
->frame_chain
== 0)
3832 internal_error (__FILE__
, __LINE__
,
3833 "gdbarch: gdbarch_frame_chain invalid");
3834 if (gdbarch_debug
>= 2)
3835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3836 return gdbarch
->frame_chain (frame
);
3840 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
3841 gdbarch_frame_chain_ftype frame_chain
)
3843 gdbarch
->frame_chain
= frame_chain
;
3847 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
3849 if (gdbarch
->frame_chain_valid
== 0)
3850 internal_error (__FILE__
, __LINE__
,
3851 "gdbarch: gdbarch_frame_chain_valid invalid");
3852 if (gdbarch_debug
>= 2)
3853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
3854 return gdbarch
->frame_chain_valid (chain
, thisframe
);
3858 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
3859 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
3861 gdbarch
->frame_chain_valid
= frame_chain_valid
;
3865 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3867 if (gdbarch
->frame_saved_pc
== 0)
3868 internal_error (__FILE__
, __LINE__
,
3869 "gdbarch: gdbarch_frame_saved_pc invalid");
3870 if (gdbarch_debug
>= 2)
3871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
3872 return gdbarch
->frame_saved_pc (fi
);
3876 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
3877 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
3879 gdbarch
->frame_saved_pc
= frame_saved_pc
;
3883 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3885 if (gdbarch
->frame_args_address
== 0)
3886 internal_error (__FILE__
, __LINE__
,
3887 "gdbarch: gdbarch_frame_args_address invalid");
3888 if (gdbarch_debug
>= 2)
3889 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
3890 return gdbarch
->frame_args_address (fi
);
3894 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
3895 gdbarch_frame_args_address_ftype frame_args_address
)
3897 gdbarch
->frame_args_address
= frame_args_address
;
3901 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3903 if (gdbarch
->frame_locals_address
== 0)
3904 internal_error (__FILE__
, __LINE__
,
3905 "gdbarch: gdbarch_frame_locals_address invalid");
3906 if (gdbarch_debug
>= 2)
3907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
3908 return gdbarch
->frame_locals_address (fi
);
3912 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
3913 gdbarch_frame_locals_address_ftype frame_locals_address
)
3915 gdbarch
->frame_locals_address
= frame_locals_address
;
3919 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3921 if (gdbarch
->saved_pc_after_call
== 0)
3922 internal_error (__FILE__
, __LINE__
,
3923 "gdbarch: gdbarch_saved_pc_after_call invalid");
3924 if (gdbarch_debug
>= 2)
3925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
3926 return gdbarch
->saved_pc_after_call (frame
);
3930 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
3931 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
3933 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
3937 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3939 if (gdbarch
->frame_num_args
== 0)
3940 internal_error (__FILE__
, __LINE__
,
3941 "gdbarch: gdbarch_frame_num_args invalid");
3942 if (gdbarch_debug
>= 2)
3943 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
3944 return gdbarch
->frame_num_args (frame
);
3948 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
3949 gdbarch_frame_num_args_ftype frame_num_args
)
3951 gdbarch
->frame_num_args
= frame_num_args
;
3955 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
3957 return gdbarch
->stack_align
!= 0;
3961 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
3963 if (gdbarch
->stack_align
== 0)
3964 internal_error (__FILE__
, __LINE__
,
3965 "gdbarch: gdbarch_stack_align invalid");
3966 if (gdbarch_debug
>= 2)
3967 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
3968 return gdbarch
->stack_align (sp
);
3972 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
3973 gdbarch_stack_align_ftype stack_align
)
3975 gdbarch
->stack_align
= stack_align
;
3979 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
3981 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
3982 if (gdbarch_debug
>= 2)
3983 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
3984 return gdbarch
->extra_stack_alignment_needed
;
3988 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
3989 int extra_stack_alignment_needed
)
3991 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
3995 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
3997 return gdbarch
->reg_struct_has_addr
!= 0;
4001 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4003 if (gdbarch
->reg_struct_has_addr
== 0)
4004 internal_error (__FILE__
, __LINE__
,
4005 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4006 if (gdbarch_debug
>= 2)
4007 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4008 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4012 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4013 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4015 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4019 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4021 return gdbarch
->save_dummy_frame_tos
!= 0;
4025 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4027 if (gdbarch
->save_dummy_frame_tos
== 0)
4028 internal_error (__FILE__
, __LINE__
,
4029 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4030 if (gdbarch_debug
>= 2)
4031 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4032 gdbarch
->save_dummy_frame_tos (sp
);
4036 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4037 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4039 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4043 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4045 if (gdbarch_debug
>= 2)
4046 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4047 return gdbarch
->parm_boundary
;
4051 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4054 gdbarch
->parm_boundary
= parm_boundary
;
4057 const struct floatformat
*
4058 gdbarch_float_format (struct gdbarch
*gdbarch
)
4060 if (gdbarch_debug
>= 2)
4061 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4062 return gdbarch
->float_format
;
4066 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4067 const struct floatformat
* float_format
)
4069 gdbarch
->float_format
= float_format
;
4072 const struct floatformat
*
4073 gdbarch_double_format (struct gdbarch
*gdbarch
)
4075 if (gdbarch_debug
>= 2)
4076 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4077 return gdbarch
->double_format
;
4081 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4082 const struct floatformat
* double_format
)
4084 gdbarch
->double_format
= double_format
;
4087 const struct floatformat
*
4088 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4090 if (gdbarch_debug
>= 2)
4091 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4092 return gdbarch
->long_double_format
;
4096 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4097 const struct floatformat
* long_double_format
)
4099 gdbarch
->long_double_format
= long_double_format
;
4103 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4105 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4106 internal_error (__FILE__
, __LINE__
,
4107 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4108 if (gdbarch_debug
>= 2)
4109 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4110 return gdbarch
->convert_from_func_ptr_addr (addr
);
4114 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4115 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4117 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4121 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4123 if (gdbarch
->addr_bits_remove
== 0)
4124 internal_error (__FILE__
, __LINE__
,
4125 "gdbarch: gdbarch_addr_bits_remove invalid");
4126 if (gdbarch_debug
>= 2)
4127 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4128 return gdbarch
->addr_bits_remove (addr
);
4132 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4133 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4135 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4139 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4141 return gdbarch
->software_single_step
!= 0;
4145 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4147 if (gdbarch
->software_single_step
== 0)
4148 internal_error (__FILE__
, __LINE__
,
4149 "gdbarch: gdbarch_software_single_step invalid");
4150 if (gdbarch_debug
>= 2)
4151 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4152 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4156 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4157 gdbarch_software_single_step_ftype software_single_step
)
4159 gdbarch
->software_single_step
= software_single_step
;
4163 gdbarch_print_insn (struct gdbarch
*gdbarch
, bfd_vma vma
, disassemble_info
*info
)
4165 if (gdbarch
->print_insn
== 0)
4166 internal_error (__FILE__
, __LINE__
,
4167 "gdbarch: gdbarch_print_insn invalid");
4168 if (gdbarch_debug
>= 2)
4169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_print_insn called\n");
4170 return gdbarch
->print_insn (vma
, info
);
4174 set_gdbarch_print_insn (struct gdbarch
*gdbarch
,
4175 gdbarch_print_insn_ftype print_insn
)
4177 gdbarch
->print_insn
= print_insn
;
4181 gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
, CORE_ADDR pc
)
4183 if (gdbarch
->skip_trampoline_code
== 0)
4184 internal_error (__FILE__
, __LINE__
,
4185 "gdbarch: gdbarch_skip_trampoline_code invalid");
4186 if (gdbarch_debug
>= 2)
4187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_trampoline_code called\n");
4188 return gdbarch
->skip_trampoline_code (pc
);
4192 set_gdbarch_skip_trampoline_code (struct gdbarch
*gdbarch
,
4193 gdbarch_skip_trampoline_code_ftype skip_trampoline_code
)
4195 gdbarch
->skip_trampoline_code
= skip_trampoline_code
;
4199 /* Keep a registry of per-architecture data-pointers required by GDB
4205 gdbarch_data_init_ftype
*init
;
4206 gdbarch_data_free_ftype
*free
;
4209 struct gdbarch_data_registration
4211 struct gdbarch_data
*data
;
4212 struct gdbarch_data_registration
*next
;
4215 struct gdbarch_data_registry
4218 struct gdbarch_data_registration
*registrations
;
4221 struct gdbarch_data_registry gdbarch_data_registry
=
4226 struct gdbarch_data
*
4227 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4228 gdbarch_data_free_ftype
*free
)
4230 struct gdbarch_data_registration
**curr
;
4231 for (curr
= &gdbarch_data_registry
.registrations
;
4233 curr
= &(*curr
)->next
);
4234 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4235 (*curr
)->next
= NULL
;
4236 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4237 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4238 (*curr
)->data
->init
= init
;
4239 (*curr
)->data
->free
= free
;
4240 return (*curr
)->data
;
4244 /* Walk through all the registered users initializing each in turn. */
4247 init_gdbarch_data (struct gdbarch
*gdbarch
)
4249 struct gdbarch_data_registration
*rego
;
4250 for (rego
= gdbarch_data_registry
.registrations
;
4254 struct gdbarch_data
*data
= rego
->data
;
4255 gdb_assert (data
->index
< gdbarch
->nr_data
);
4256 if (data
->init
!= NULL
)
4258 void *pointer
= data
->init (gdbarch
);
4259 set_gdbarch_data (gdbarch
, data
, pointer
);
4264 /* Create/delete the gdbarch data vector. */
4267 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4269 gdb_assert (gdbarch
->data
== NULL
);
4270 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4271 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4275 free_gdbarch_data (struct gdbarch
*gdbarch
)
4277 struct gdbarch_data_registration
*rego
;
4278 gdb_assert (gdbarch
->data
!= NULL
);
4279 for (rego
= gdbarch_data_registry
.registrations
;
4283 struct gdbarch_data
*data
= rego
->data
;
4284 gdb_assert (data
->index
< gdbarch
->nr_data
);
4285 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4287 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4288 gdbarch
->data
[data
->index
] = NULL
;
4291 xfree (gdbarch
->data
);
4292 gdbarch
->data
= NULL
;
4296 /* Initialize the current value of thee specified per-architecture
4300 set_gdbarch_data (struct gdbarch
*gdbarch
,
4301 struct gdbarch_data
*data
,
4304 gdb_assert (data
->index
< gdbarch
->nr_data
);
4305 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4306 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4307 gdbarch
->data
[data
->index
] = pointer
;
4310 /* Return the current value of the specified per-architecture
4314 gdbarch_data (struct gdbarch_data
*data
)
4316 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4317 return current_gdbarch
->data
[data
->index
];
4322 /* Keep a registry of swapped data required by GDB modules. */
4327 struct gdbarch_swap_registration
*source
;
4328 struct gdbarch_swap
*next
;
4331 struct gdbarch_swap_registration
4334 unsigned long sizeof_data
;
4335 gdbarch_swap_ftype
*init
;
4336 struct gdbarch_swap_registration
*next
;
4339 struct gdbarch_swap_registry
4342 struct gdbarch_swap_registration
*registrations
;
4345 struct gdbarch_swap_registry gdbarch_swap_registry
=
4351 register_gdbarch_swap (void *data
,
4352 unsigned long sizeof_data
,
4353 gdbarch_swap_ftype
*init
)
4355 struct gdbarch_swap_registration
**rego
;
4356 for (rego
= &gdbarch_swap_registry
.registrations
;
4358 rego
= &(*rego
)->next
);
4359 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4360 (*rego
)->next
= NULL
;
4361 (*rego
)->init
= init
;
4362 (*rego
)->data
= data
;
4363 (*rego
)->sizeof_data
= sizeof_data
;
4368 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4370 struct gdbarch_swap_registration
*rego
;
4371 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4372 for (rego
= gdbarch_swap_registry
.registrations
;
4376 if (rego
->data
!= NULL
)
4378 (*curr
) = XMALLOC (struct gdbarch_swap
);
4379 (*curr
)->source
= rego
;
4380 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4381 (*curr
)->next
= NULL
;
4382 memset (rego
->data
, 0, rego
->sizeof_data
);
4383 curr
= &(*curr
)->next
;
4385 if (rego
->init
!= NULL
)
4391 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4393 struct gdbarch_swap
*curr
;
4394 for (curr
= gdbarch
->swap
;
4397 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4401 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4403 struct gdbarch_swap
*curr
;
4404 for (curr
= gdbarch
->swap
;
4407 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4411 /* Keep a registry of the architectures known by GDB. */
4413 struct gdbarch_registration
4415 enum bfd_architecture bfd_architecture
;
4416 gdbarch_init_ftype
*init
;
4417 gdbarch_dump_tdep_ftype
*dump_tdep
;
4418 struct gdbarch_list
*arches
;
4419 struct gdbarch_registration
*next
;
4422 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4425 append_name (const char ***buf
, int *nr
, const char *name
)
4427 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4433 gdbarch_printable_names (void)
4437 /* Accumulate a list of names based on the registed list of
4439 enum bfd_architecture a
;
4441 const char **arches
= NULL
;
4442 struct gdbarch_registration
*rego
;
4443 for (rego
= gdbarch_registry
;
4447 const struct bfd_arch_info
*ap
;
4448 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4450 internal_error (__FILE__
, __LINE__
,
4451 "gdbarch_architecture_names: multi-arch unknown");
4454 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4459 append_name (&arches
, &nr_arches
, NULL
);
4463 /* Just return all the architectures that BFD knows. Assume that
4464 the legacy architecture framework supports them. */
4465 return bfd_arch_list ();
4470 gdbarch_register (enum bfd_architecture bfd_architecture
,
4471 gdbarch_init_ftype
*init
,
4472 gdbarch_dump_tdep_ftype
*dump_tdep
)
4474 struct gdbarch_registration
**curr
;
4475 const struct bfd_arch_info
*bfd_arch_info
;
4476 /* Check that BFD recognizes this architecture */
4477 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4478 if (bfd_arch_info
== NULL
)
4480 internal_error (__FILE__
, __LINE__
,
4481 "gdbarch: Attempt to register unknown architecture (%d)",
4484 /* Check that we haven't seen this architecture before */
4485 for (curr
= &gdbarch_registry
;
4487 curr
= &(*curr
)->next
)
4489 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4490 internal_error (__FILE__
, __LINE__
,
4491 "gdbarch: Duplicate registraration of architecture (%s)",
4492 bfd_arch_info
->printable_name
);
4496 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4497 bfd_arch_info
->printable_name
,
4500 (*curr
) = XMALLOC (struct gdbarch_registration
);
4501 (*curr
)->bfd_architecture
= bfd_architecture
;
4502 (*curr
)->init
= init
;
4503 (*curr
)->dump_tdep
= dump_tdep
;
4504 (*curr
)->arches
= NULL
;
4505 (*curr
)->next
= NULL
;
4506 /* When non- multi-arch, install whatever target dump routine we've
4507 been provided - hopefully that routine has been written correctly
4508 and works regardless of multi-arch. */
4509 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4510 && startup_gdbarch
.dump_tdep
== NULL
)
4511 startup_gdbarch
.dump_tdep
= dump_tdep
;
4515 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4516 gdbarch_init_ftype
*init
)
4518 gdbarch_register (bfd_architecture
, init
, NULL
);
4522 /* Look for an architecture using gdbarch_info. Base search on only
4523 BFD_ARCH_INFO and BYTE_ORDER. */
4525 struct gdbarch_list
*
4526 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4527 const struct gdbarch_info
*info
)
4529 for (; arches
!= NULL
; arches
= arches
->next
)
4531 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4533 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4541 /* Update the current architecture. Return ZERO if the update request
4545 gdbarch_update_p (struct gdbarch_info info
)
4547 struct gdbarch
*new_gdbarch
;
4548 struct gdbarch_list
**list
;
4549 struct gdbarch_registration
*rego
;
4551 /* Fill in missing parts of the INFO struct using a number of
4552 sources: ``set ...''; INFOabfd supplied; existing target. */
4554 /* ``(gdb) set architecture ...'' */
4555 if (info
.bfd_arch_info
== NULL
4556 && !TARGET_ARCHITECTURE_AUTO
)
4557 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4558 if (info
.bfd_arch_info
== NULL
4559 && info
.abfd
!= NULL
4560 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4561 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4562 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4563 if (info
.bfd_arch_info
== NULL
)
4564 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4566 /* ``(gdb) set byte-order ...'' */
4567 if (info
.byte_order
== 0
4568 && !TARGET_BYTE_ORDER_AUTO
)
4569 info
.byte_order
= TARGET_BYTE_ORDER
;
4570 /* From the INFO struct. */
4571 if (info
.byte_order
== 0
4572 && info
.abfd
!= NULL
)
4573 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4574 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4576 /* From the current target. */
4577 if (info
.byte_order
== 0)
4578 info
.byte_order
= TARGET_BYTE_ORDER
;
4580 /* Must have found some sort of architecture. */
4581 gdb_assert (info
.bfd_arch_info
!= NULL
);
4585 fprintf_unfiltered (gdb_stdlog
,
4586 "gdbarch_update: info.bfd_arch_info %s\n",
4587 (info
.bfd_arch_info
!= NULL
4588 ? info
.bfd_arch_info
->printable_name
4590 fprintf_unfiltered (gdb_stdlog
,
4591 "gdbarch_update: info.byte_order %d (%s)\n",
4593 (info
.byte_order
== BIG_ENDIAN
? "big"
4594 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4596 fprintf_unfiltered (gdb_stdlog
,
4597 "gdbarch_update: info.abfd 0x%lx\n",
4599 fprintf_unfiltered (gdb_stdlog
,
4600 "gdbarch_update: info.tdep_info 0x%lx\n",
4601 (long) info
.tdep_info
);
4604 /* Find the target that knows about this architecture. */
4605 for (rego
= gdbarch_registry
;
4608 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4617 /* Ask the target for a replacement architecture. */
4618 new_gdbarch
= rego
->init (info
, rego
->arches
);
4620 /* Did the target like it? No. Reject the change. */
4621 if (new_gdbarch
== NULL
)
4624 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4628 /* Did the architecture change? No. Do nothing. */
4629 if (current_gdbarch
== new_gdbarch
)
4632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4634 new_gdbarch
->bfd_arch_info
->printable_name
);
4638 /* Swap all data belonging to the old target out */
4639 swapout_gdbarch_swap (current_gdbarch
);
4641 /* Is this a pre-existing architecture? Yes. Swap it in. */
4642 for (list
= ®o
->arches
;
4644 list
= &(*list
)->next
)
4646 if ((*list
)->gdbarch
== new_gdbarch
)
4649 fprintf_unfiltered (gdb_stdlog
,
4650 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4652 new_gdbarch
->bfd_arch_info
->printable_name
);
4653 current_gdbarch
= new_gdbarch
;
4654 swapin_gdbarch_swap (new_gdbarch
);
4655 architecture_changed_event ();
4660 /* Append this new architecture to this targets list. */
4661 (*list
) = XMALLOC (struct gdbarch_list
);
4662 (*list
)->next
= NULL
;
4663 (*list
)->gdbarch
= new_gdbarch
;
4665 /* Switch to this new architecture. Dump it out. */
4666 current_gdbarch
= new_gdbarch
;
4669 fprintf_unfiltered (gdb_stdlog
,
4670 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4672 new_gdbarch
->bfd_arch_info
->printable_name
);
4675 /* Check that the newly installed architecture is valid. Plug in
4676 any post init values. */
4677 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4678 verify_gdbarch (new_gdbarch
);
4680 /* Initialize the per-architecture memory (swap) areas.
4681 CURRENT_GDBARCH must be update before these modules are
4683 init_gdbarch_swap (new_gdbarch
);
4685 /* Initialize the per-architecture data-pointer of all parties that
4686 registered an interest in this architecture. CURRENT_GDBARCH
4687 must be updated before these modules are called. */
4688 init_gdbarch_data (new_gdbarch
);
4689 architecture_changed_event ();
4692 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4700 /* Pointer to the target-dependent disassembly function. */
4701 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4702 disassemble_info tm_print_insn_info
;
4705 extern void _initialize_gdbarch (void);
4708 _initialize_gdbarch (void)
4710 struct cmd_list_element
*c
;
4712 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4713 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4714 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4715 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4716 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4718 add_show_from_set (add_set_cmd ("arch",
4721 (char *)&gdbarch_debug
,
4722 "Set architecture debugging.\n\
4723 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4725 c
= add_set_cmd ("archdebug",
4728 (char *)&gdbarch_debug
,
4729 "Set architecture debugging.\n\
4730 When non-zero, architecture debugging is enabled.", &setlist
);
4732 deprecate_cmd (c
, "set debug arch");
4733 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");