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"
65 /* Static function declarations */
67 static void verify_gdbarch (struct gdbarch
*gdbarch
);
68 static void alloc_gdbarch_data (struct gdbarch
*);
69 static void init_gdbarch_data (struct gdbarch
*);
70 static void free_gdbarch_data (struct gdbarch
*);
71 static void init_gdbarch_swap (struct gdbarch
*);
72 static void swapout_gdbarch_swap (struct gdbarch
*);
73 static void swapin_gdbarch_swap (struct gdbarch
*);
75 /* Convenience macro for allocting typesafe memory. */
78 #define XMALLOC(TYPE) (TYPE*) xmalloc (sizeof (TYPE))
82 /* Non-zero if we want to trace architecture code. */
85 #define GDBARCH_DEBUG 0
87 int gdbarch_debug
= GDBARCH_DEBUG
;
90 /* Maintain the struct gdbarch object */
94 /* basic architectural information */
95 const struct bfd_arch_info
* bfd_arch_info
;
98 /* target specific vector. */
99 struct gdbarch_tdep
*tdep
;
100 gdbarch_dump_tdep_ftype
*dump_tdep
;
102 /* per-architecture data-pointers */
106 /* per-architecture swap-regions */
107 struct gdbarch_swap
*swap
;
109 /* Multi-arch values.
111 When extending this structure you must:
115 Declare set/get functions and define the corresponding
118 gdbarch_alloc(): If zero/NULL is not a suitable default,
119 initialize the new field.
121 verify_gdbarch(): Confirm that the target updated the field
124 gdbarch_dump(): Add a fprintf_unfiltered call so that the new
127 ``startup_gdbarch()'': Append an initial value to the static
128 variable (base values on the host's c-type system).
130 get_gdbarch(): Implement the set/get functions (probably using
131 the macro's as shortcuts).
146 gdbarch_read_pc_ftype
*read_pc
;
147 gdbarch_write_pc_ftype
*write_pc
;
148 gdbarch_read_fp_ftype
*read_fp
;
149 gdbarch_write_fp_ftype
*write_fp
;
150 gdbarch_read_sp_ftype
*read_sp
;
151 gdbarch_write_sp_ftype
*write_sp
;
152 gdbarch_register_read_ftype
*register_read
;
153 gdbarch_register_write_ftype
*register_write
;
162 gdbarch_stab_reg_to_regnum_ftype
*stab_reg_to_regnum
;
163 gdbarch_ecoff_reg_to_regnum_ftype
*ecoff_reg_to_regnum
;
164 gdbarch_dwarf_reg_to_regnum_ftype
*dwarf_reg_to_regnum
;
165 gdbarch_sdb_reg_to_regnum_ftype
*sdb_reg_to_regnum
;
166 gdbarch_dwarf2_reg_to_regnum_ftype
*dwarf2_reg_to_regnum
;
167 gdbarch_register_name_ftype
*register_name
;
170 gdbarch_register_byte_ftype
*register_byte
;
171 gdbarch_register_raw_size_ftype
*register_raw_size
;
172 int max_register_raw_size
;
173 gdbarch_register_virtual_size_ftype
*register_virtual_size
;
174 int max_register_virtual_size
;
175 gdbarch_register_virtual_type_ftype
*register_virtual_type
;
176 gdbarch_do_registers_info_ftype
*do_registers_info
;
177 gdbarch_register_sim_regno_ftype
*register_sim_regno
;
178 gdbarch_register_bytes_ok_ftype
*register_bytes_ok
;
179 int use_generic_dummy_frames
;
180 int call_dummy_location
;
181 gdbarch_call_dummy_address_ftype
*call_dummy_address
;
182 CORE_ADDR call_dummy_start_offset
;
183 CORE_ADDR call_dummy_breakpoint_offset
;
184 int call_dummy_breakpoint_offset_p
;
185 int call_dummy_length
;
186 gdbarch_pc_in_call_dummy_ftype
*pc_in_call_dummy
;
188 LONGEST
* call_dummy_words
;
189 int sizeof_call_dummy_words
;
190 int call_dummy_stack_adjust_p
;
191 int call_dummy_stack_adjust
;
192 gdbarch_fix_call_dummy_ftype
*fix_call_dummy
;
193 int believe_pcc_promotion
;
194 int believe_pcc_promotion_type
;
195 gdbarch_coerce_float_to_double_ftype
*coerce_float_to_double
;
196 gdbarch_get_saved_register_ftype
*get_saved_register
;
197 gdbarch_register_convertible_ftype
*register_convertible
;
198 gdbarch_register_convert_to_virtual_ftype
*register_convert_to_virtual
;
199 gdbarch_register_convert_to_raw_ftype
*register_convert_to_raw
;
200 gdbarch_fetch_pseudo_register_ftype
*fetch_pseudo_register
;
201 gdbarch_store_pseudo_register_ftype
*store_pseudo_register
;
202 gdbarch_pointer_to_address_ftype
*pointer_to_address
;
203 gdbarch_address_to_pointer_ftype
*address_to_pointer
;
204 gdbarch_return_value_on_stack_ftype
*return_value_on_stack
;
205 gdbarch_extract_return_value_ftype
*extract_return_value
;
206 gdbarch_push_arguments_ftype
*push_arguments
;
207 gdbarch_push_dummy_frame_ftype
*push_dummy_frame
;
208 gdbarch_push_return_address_ftype
*push_return_address
;
209 gdbarch_pop_frame_ftype
*pop_frame
;
210 gdbarch_d10v_make_daddr_ftype
*d10v_make_daddr
;
211 gdbarch_d10v_make_iaddr_ftype
*d10v_make_iaddr
;
212 gdbarch_d10v_daddr_p_ftype
*d10v_daddr_p
;
213 gdbarch_d10v_iaddr_p_ftype
*d10v_iaddr_p
;
214 gdbarch_d10v_convert_daddr_to_raw_ftype
*d10v_convert_daddr_to_raw
;
215 gdbarch_d10v_convert_iaddr_to_raw_ftype
*d10v_convert_iaddr_to_raw
;
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
;
255 /* The default architecture uses host values (for want of a better
258 extern const struct bfd_arch_info bfd_default_arch_struct
;
260 struct gdbarch startup_gdbarch
=
262 /* basic architecture information */
263 &bfd_default_arch_struct
,
265 /* target specific vector and its dump routine */
267 /*per-architecture data-pointers and swap regions */
269 /* Multi-arch values */
273 8 * sizeof (LONGEST
),
276 8 * sizeof (long double),
331 generic_get_saved_register
,
387 /* startup_gdbarch() */
390 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
392 /* Do any initialization needed for a non-multiarch configuration
393 after the _initialize_MODULE functions have been run. */
395 initialize_non_multiarch ()
397 alloc_gdbarch_data (&startup_gdbarch
);
398 init_gdbarch_data (&startup_gdbarch
);
402 /* Create a new ``struct gdbarch'' based on information provided by
403 ``struct gdbarch_info''. */
406 gdbarch_alloc (const struct gdbarch_info
*info
,
407 struct gdbarch_tdep
*tdep
)
409 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
410 memset (gdbarch
, 0, sizeof (*gdbarch
));
412 alloc_gdbarch_data (gdbarch
);
414 gdbarch
->tdep
= tdep
;
416 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
417 gdbarch
->byte_order
= info
->byte_order
;
419 /* Force the explicit initialization of these. */
420 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
421 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
422 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
423 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
424 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
425 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
426 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
427 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
428 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
429 gdbarch
->read_pc
= generic_target_read_pc
;
430 gdbarch
->write_pc
= generic_target_write_pc
;
431 gdbarch
->read_fp
= generic_target_read_fp
;
432 gdbarch
->write_fp
= generic_target_write_fp
;
433 gdbarch
->read_sp
= generic_target_read_sp
;
434 gdbarch
->write_sp
= generic_target_write_sp
;
435 gdbarch
->num_regs
= -1;
436 gdbarch
->sp_regnum
= -1;
437 gdbarch
->fp_regnum
= -1;
438 gdbarch
->pc_regnum
= -1;
439 gdbarch
->fp0_regnum
= -1;
440 gdbarch
->npc_regnum
= -1;
441 gdbarch
->nnpc_regnum
= -1;
442 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
443 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
444 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
445 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
446 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
447 gdbarch
->register_name
= legacy_register_name
;
448 gdbarch
->register_size
= -1;
449 gdbarch
->register_bytes
= -1;
450 gdbarch
->max_register_raw_size
= -1;
451 gdbarch
->max_register_virtual_size
= -1;
452 gdbarch
->do_registers_info
= do_registers_info
;
453 gdbarch
->register_sim_regno
= default_register_sim_regno
;
454 gdbarch
->use_generic_dummy_frames
= -1;
455 gdbarch
->call_dummy_start_offset
= -1;
456 gdbarch
->call_dummy_breakpoint_offset
= -1;
457 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
458 gdbarch
->call_dummy_length
= -1;
459 gdbarch
->call_dummy_p
= -1;
460 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
461 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
462 gdbarch
->call_dummy_stack_adjust_p
= -1;
463 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
464 gdbarch
->register_convertible
= generic_register_convertible_not
;
465 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
466 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
467 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
468 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
469 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
470 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
471 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
472 gdbarch
->decr_pc_after_break
= -1;
473 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
474 gdbarch
->function_start_offset
= -1;
475 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
476 gdbarch
->frame_args_skip
= -1;
477 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
478 gdbarch
->extra_stack_alignment_needed
= 1;
479 gdbarch
->convert_from_func_ptr_addr
= core_addr_identity
;
480 gdbarch
->addr_bits_remove
= core_addr_identity
;
481 /* gdbarch_alloc() */
487 /* Free a gdbarch struct. This should never happen in normal
488 operation --- once you've created a gdbarch, you keep it around.
489 However, if an architecture's init function encounters an error
490 building the structure, it may need to clean up a partially
491 constructed gdbarch. */
494 gdbarch_free (struct gdbarch
*arch
)
496 gdb_assert (arch
!= NULL
);
497 free_gdbarch_data (arch
);
502 /* Ensure that all values in a GDBARCH are reasonable. */
505 verify_gdbarch (struct gdbarch
*gdbarch
)
507 /* Only perform sanity checks on a multi-arch target. */
511 if (gdbarch
->byte_order
== 0)
512 internal_error (__FILE__
, __LINE__
,
513 "verify_gdbarch: byte-order unset");
514 if (gdbarch
->bfd_arch_info
== NULL
)
515 internal_error (__FILE__
, __LINE__
,
516 "verify_gdbarch: bfd_arch_info unset");
517 /* Check those that need to be defined for the given multi-arch level. */
518 /* Skip verify of short_bit, invalid_p == 0 */
519 /* Skip verify of int_bit, invalid_p == 0 */
520 /* Skip verify of long_bit, invalid_p == 0 */
521 /* Skip verify of long_long_bit, invalid_p == 0 */
522 /* Skip verify of float_bit, invalid_p == 0 */
523 /* Skip verify of double_bit, invalid_p == 0 */
524 /* Skip verify of long_double_bit, invalid_p == 0 */
525 /* Skip verify of ptr_bit, invalid_p == 0 */
526 if (gdbarch
->addr_bit
== 0)
527 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
528 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
529 /* Skip verify of ieee_float, invalid_p == 0 */
530 /* Skip verify of read_pc, invalid_p == 0 */
531 /* Skip verify of write_pc, invalid_p == 0 */
532 /* Skip verify of read_fp, invalid_p == 0 */
533 /* Skip verify of write_fp, invalid_p == 0 */
534 /* Skip verify of read_sp, invalid_p == 0 */
535 /* Skip verify of write_sp, invalid_p == 0 */
536 /* Skip verify of register_read, has predicate */
537 /* Skip verify of register_write, has predicate */
538 if ((GDB_MULTI_ARCH
>= 2)
539 && (gdbarch
->num_regs
== -1))
540 internal_error (__FILE__
, __LINE__
,
541 "gdbarch: verify_gdbarch: num_regs invalid");
542 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
543 if ((GDB_MULTI_ARCH
>= 2)
544 && (gdbarch
->sp_regnum
== -1))
545 internal_error (__FILE__
, __LINE__
,
546 "gdbarch: verify_gdbarch: sp_regnum invalid");
547 if ((GDB_MULTI_ARCH
>= 2)
548 && (gdbarch
->fp_regnum
== -1))
549 internal_error (__FILE__
, __LINE__
,
550 "gdbarch: verify_gdbarch: fp_regnum invalid");
551 if ((GDB_MULTI_ARCH
>= 2)
552 && (gdbarch
->pc_regnum
== -1))
553 internal_error (__FILE__
, __LINE__
,
554 "gdbarch: verify_gdbarch: pc_regnum invalid");
555 /* Skip verify of fp0_regnum, invalid_p == 0 */
556 /* Skip verify of npc_regnum, invalid_p == 0 */
557 /* Skip verify of nnpc_regnum, invalid_p == 0 */
558 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
559 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
560 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
561 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
562 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
563 /* Skip verify of register_name, invalid_p == 0 */
564 if ((GDB_MULTI_ARCH
>= 2)
565 && (gdbarch
->register_size
== -1))
566 internal_error (__FILE__
, __LINE__
,
567 "gdbarch: verify_gdbarch: register_size invalid");
568 if ((GDB_MULTI_ARCH
>= 2)
569 && (gdbarch
->register_bytes
== -1))
570 internal_error (__FILE__
, __LINE__
,
571 "gdbarch: verify_gdbarch: register_bytes invalid");
572 if ((GDB_MULTI_ARCH
>= 2)
573 && (gdbarch
->register_byte
== 0))
574 internal_error (__FILE__
, __LINE__
,
575 "gdbarch: verify_gdbarch: register_byte invalid");
576 if ((GDB_MULTI_ARCH
>= 2)
577 && (gdbarch
->register_raw_size
== 0))
578 internal_error (__FILE__
, __LINE__
,
579 "gdbarch: verify_gdbarch: register_raw_size invalid");
580 if ((GDB_MULTI_ARCH
>= 2)
581 && (gdbarch
->max_register_raw_size
== -1))
582 internal_error (__FILE__
, __LINE__
,
583 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
584 if ((GDB_MULTI_ARCH
>= 2)
585 && (gdbarch
->register_virtual_size
== 0))
586 internal_error (__FILE__
, __LINE__
,
587 "gdbarch: verify_gdbarch: register_virtual_size invalid");
588 if ((GDB_MULTI_ARCH
>= 2)
589 && (gdbarch
->max_register_virtual_size
== -1))
590 internal_error (__FILE__
, __LINE__
,
591 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
592 if ((GDB_MULTI_ARCH
>= 2)
593 && (gdbarch
->register_virtual_type
== 0))
594 internal_error (__FILE__
, __LINE__
,
595 "gdbarch: verify_gdbarch: register_virtual_type invalid");
596 /* Skip verify of do_registers_info, invalid_p == 0 */
597 /* Skip verify of register_sim_regno, invalid_p == 0 */
598 /* Skip verify of register_bytes_ok, has predicate */
599 if ((GDB_MULTI_ARCH
>= 1)
600 && (gdbarch
->use_generic_dummy_frames
== -1))
601 internal_error (__FILE__
, __LINE__
,
602 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
603 if ((GDB_MULTI_ARCH
>= 2)
604 && (gdbarch
->call_dummy_location
== 0))
605 internal_error (__FILE__
, __LINE__
,
606 "gdbarch: verify_gdbarch: call_dummy_location invalid");
607 if ((GDB_MULTI_ARCH
>= 2)
608 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
609 internal_error (__FILE__
, __LINE__
,
610 "gdbarch: verify_gdbarch: call_dummy_address invalid");
611 if ((GDB_MULTI_ARCH
>= 2)
612 && (gdbarch
->call_dummy_start_offset
== -1))
613 internal_error (__FILE__
, __LINE__
,
614 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
615 if ((GDB_MULTI_ARCH
>= 2)
616 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
617 internal_error (__FILE__
, __LINE__
,
618 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
619 if ((GDB_MULTI_ARCH
>= 1)
620 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
621 internal_error (__FILE__
, __LINE__
,
622 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
623 if ((GDB_MULTI_ARCH
>= 2)
624 && (gdbarch
->call_dummy_length
== -1))
625 internal_error (__FILE__
, __LINE__
,
626 "gdbarch: verify_gdbarch: call_dummy_length invalid");
627 if ((GDB_MULTI_ARCH
>= 2)
628 && (gdbarch
->pc_in_call_dummy
== 0))
629 internal_error (__FILE__
, __LINE__
,
630 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
631 if ((GDB_MULTI_ARCH
>= 1)
632 && (gdbarch
->call_dummy_p
== -1))
633 internal_error (__FILE__
, __LINE__
,
634 "gdbarch: verify_gdbarch: call_dummy_p invalid");
635 /* Skip verify of call_dummy_words, invalid_p == 0 */
636 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
637 if ((GDB_MULTI_ARCH
>= 1)
638 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
639 internal_error (__FILE__
, __LINE__
,
640 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
641 if ((GDB_MULTI_ARCH
>= 2)
642 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
643 internal_error (__FILE__
, __LINE__
,
644 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
645 if ((GDB_MULTI_ARCH
>= 2)
646 && (gdbarch
->fix_call_dummy
== 0))
647 internal_error (__FILE__
, __LINE__
,
648 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
649 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
650 if ((GDB_MULTI_ARCH
>= 1)
651 && (gdbarch
->get_saved_register
== 0))
652 internal_error (__FILE__
, __LINE__
,
653 "gdbarch: verify_gdbarch: get_saved_register invalid");
654 /* Skip verify of register_convertible, invalid_p == 0 */
655 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
656 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
657 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
658 /* Skip verify of store_pseudo_register, invalid_p == 0 */
659 /* Skip verify of pointer_to_address, invalid_p == 0 */
660 /* Skip verify of address_to_pointer, invalid_p == 0 */
661 /* Skip verify of return_value_on_stack, invalid_p == 0 */
662 if ((GDB_MULTI_ARCH
>= 2)
663 && (gdbarch
->extract_return_value
== 0))
664 internal_error (__FILE__
, __LINE__
,
665 "gdbarch: verify_gdbarch: extract_return_value invalid");
666 if ((GDB_MULTI_ARCH
>= 1)
667 && (gdbarch
->push_arguments
== 0))
668 internal_error (__FILE__
, __LINE__
,
669 "gdbarch: verify_gdbarch: push_arguments invalid");
670 if ((GDB_MULTI_ARCH
>= 2)
671 && (gdbarch
->push_dummy_frame
== 0))
672 internal_error (__FILE__
, __LINE__
,
673 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
674 if ((GDB_MULTI_ARCH
>= 1)
675 && (gdbarch
->push_return_address
== 0))
676 internal_error (__FILE__
, __LINE__
,
677 "gdbarch: verify_gdbarch: push_return_address invalid");
678 if ((GDB_MULTI_ARCH
>= 2)
679 && (gdbarch
->pop_frame
== 0))
680 internal_error (__FILE__
, __LINE__
,
681 "gdbarch: verify_gdbarch: pop_frame invalid");
682 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
683 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
684 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
685 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
686 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
687 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
688 if ((GDB_MULTI_ARCH
>= 2)
689 && (gdbarch
->store_struct_return
== 0))
690 internal_error (__FILE__
, __LINE__
,
691 "gdbarch: verify_gdbarch: store_struct_return invalid");
692 if ((GDB_MULTI_ARCH
>= 2)
693 && (gdbarch
->store_return_value
== 0))
694 internal_error (__FILE__
, __LINE__
,
695 "gdbarch: verify_gdbarch: store_return_value invalid");
696 /* Skip verify of extract_struct_value_address, has predicate */
697 if ((GDB_MULTI_ARCH
>= 2)
698 && (gdbarch
->use_struct_convention
== 0))
699 internal_error (__FILE__
, __LINE__
,
700 "gdbarch: verify_gdbarch: use_struct_convention invalid");
701 if ((GDB_MULTI_ARCH
>= 2)
702 && (gdbarch
->frame_init_saved_regs
== 0))
703 internal_error (__FILE__
, __LINE__
,
704 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
705 if ((GDB_MULTI_ARCH
>= 2)
706 && (gdbarch
->init_extra_frame_info
== 0))
707 internal_error (__FILE__
, __LINE__
,
708 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
709 if ((GDB_MULTI_ARCH
>= 2)
710 && (gdbarch
->skip_prologue
== 0))
711 internal_error (__FILE__
, __LINE__
,
712 "gdbarch: verify_gdbarch: skip_prologue invalid");
713 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
714 if ((GDB_MULTI_ARCH
>= 2)
715 && (gdbarch
->inner_than
== 0))
716 internal_error (__FILE__
, __LINE__
,
717 "gdbarch: verify_gdbarch: inner_than invalid");
718 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
719 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
720 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
721 if ((GDB_MULTI_ARCH
>= 2)
722 && (gdbarch
->decr_pc_after_break
== -1))
723 internal_error (__FILE__
, __LINE__
,
724 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
725 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
726 if ((GDB_MULTI_ARCH
>= 2)
727 && (gdbarch
->function_start_offset
== -1))
728 internal_error (__FILE__
, __LINE__
,
729 "gdbarch: verify_gdbarch: function_start_offset invalid");
730 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
731 if ((GDB_MULTI_ARCH
>= 2)
732 && (gdbarch
->frame_args_skip
== -1))
733 internal_error (__FILE__
, __LINE__
,
734 "gdbarch: verify_gdbarch: frame_args_skip invalid");
735 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
736 if ((GDB_MULTI_ARCH
>= 2)
737 && (gdbarch
->frame_chain
== 0))
738 internal_error (__FILE__
, __LINE__
,
739 "gdbarch: verify_gdbarch: frame_chain invalid");
740 if ((GDB_MULTI_ARCH
>= 1)
741 && (gdbarch
->frame_chain_valid
== 0))
742 internal_error (__FILE__
, __LINE__
,
743 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
744 if ((GDB_MULTI_ARCH
>= 2)
745 && (gdbarch
->frame_saved_pc
== 0))
746 internal_error (__FILE__
, __LINE__
,
747 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
748 if ((GDB_MULTI_ARCH
>= 2)
749 && (gdbarch
->frame_args_address
== 0))
750 internal_error (__FILE__
, __LINE__
,
751 "gdbarch: verify_gdbarch: frame_args_address invalid");
752 if ((GDB_MULTI_ARCH
>= 2)
753 && (gdbarch
->frame_locals_address
== 0))
754 internal_error (__FILE__
, __LINE__
,
755 "gdbarch: verify_gdbarch: frame_locals_address invalid");
756 if ((GDB_MULTI_ARCH
>= 2)
757 && (gdbarch
->saved_pc_after_call
== 0))
758 internal_error (__FILE__
, __LINE__
,
759 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
760 if ((GDB_MULTI_ARCH
>= 2)
761 && (gdbarch
->frame_num_args
== 0))
762 internal_error (__FILE__
, __LINE__
,
763 "gdbarch: verify_gdbarch: frame_num_args invalid");
764 /* Skip verify of stack_align, has predicate */
765 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
766 /* Skip verify of reg_struct_has_addr, has predicate */
767 /* Skip verify of save_dummy_frame_tos, has predicate */
768 if (gdbarch
->float_format
== 0)
769 gdbarch
->float_format
= default_float_format (gdbarch
);
770 if (gdbarch
->double_format
== 0)
771 gdbarch
->double_format
= default_double_format (gdbarch
);
772 if (gdbarch
->long_double_format
== 0)
773 gdbarch
->long_double_format
= &floatformat_unknown
;
774 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
775 /* Skip verify of addr_bits_remove, invalid_p == 0 */
776 /* Skip verify of software_single_step, has predicate */
780 /* Print out the details of the current architecture. */
782 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
783 just happens to match the global variable ``current_gdbarch''. That
784 way macros refering to that variable get the local and not the global
785 version - ulgh. Once everything is parameterised with gdbarch, this
789 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
791 fprintf_unfiltered (file
,
792 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
794 #ifdef TARGET_ARCHITECTURE
795 fprintf_unfiltered (file
,
796 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
797 XSTRING (TARGET_ARCHITECTURE
));
799 #ifdef TARGET_BYTE_ORDER
800 fprintf_unfiltered (file
,
801 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
802 XSTRING (TARGET_BYTE_ORDER
));
804 #ifdef TARGET_SHORT_BIT
805 fprintf_unfiltered (file
,
806 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
807 XSTRING (TARGET_SHORT_BIT
));
809 #ifdef TARGET_INT_BIT
810 fprintf_unfiltered (file
,
811 "gdbarch_dump: TARGET_INT_BIT # %s\n",
812 XSTRING (TARGET_INT_BIT
));
814 #ifdef TARGET_LONG_BIT
815 fprintf_unfiltered (file
,
816 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
817 XSTRING (TARGET_LONG_BIT
));
819 #ifdef TARGET_LONG_LONG_BIT
820 fprintf_unfiltered (file
,
821 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
822 XSTRING (TARGET_LONG_LONG_BIT
));
824 #ifdef TARGET_FLOAT_BIT
825 fprintf_unfiltered (file
,
826 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
827 XSTRING (TARGET_FLOAT_BIT
));
829 #ifdef TARGET_DOUBLE_BIT
830 fprintf_unfiltered (file
,
831 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
832 XSTRING (TARGET_DOUBLE_BIT
));
834 #ifdef TARGET_LONG_DOUBLE_BIT
835 fprintf_unfiltered (file
,
836 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
837 XSTRING (TARGET_LONG_DOUBLE_BIT
));
839 #ifdef TARGET_PTR_BIT
840 fprintf_unfiltered (file
,
841 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
842 XSTRING (TARGET_PTR_BIT
));
844 #ifdef TARGET_ADDR_BIT
845 fprintf_unfiltered (file
,
846 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
847 XSTRING (TARGET_ADDR_BIT
));
849 #ifdef TARGET_BFD_VMA_BIT
850 fprintf_unfiltered (file
,
851 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
852 XSTRING (TARGET_BFD_VMA_BIT
));
855 fprintf_unfiltered (file
,
856 "gdbarch_dump: IEEE_FLOAT # %s\n",
857 XSTRING (IEEE_FLOAT
));
859 #ifdef TARGET_READ_PC
860 fprintf_unfiltered (file
,
861 "gdbarch_dump: %s # %s\n",
862 "TARGET_READ_PC(ptid)",
863 XSTRING (TARGET_READ_PC (ptid
)));
865 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
866 /* Macro might contain `[{}]' when not multi-arch */
867 fprintf_unfiltered (file
,
868 "gdbarch_dump: %s # %s\n",
869 "TARGET_WRITE_PC(val, ptid)",
870 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
872 #ifdef TARGET_READ_FP
873 fprintf_unfiltered (file
,
874 "gdbarch_dump: %s # %s\n",
876 XSTRING (TARGET_READ_FP ()));
878 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
879 /* Macro might contain `[{}]' when not multi-arch */
880 fprintf_unfiltered (file
,
881 "gdbarch_dump: %s # %s\n",
882 "TARGET_WRITE_FP(val)",
883 XSTRING (TARGET_WRITE_FP (val
)));
885 #ifdef TARGET_READ_SP
886 fprintf_unfiltered (file
,
887 "gdbarch_dump: %s # %s\n",
889 XSTRING (TARGET_READ_SP ()));
891 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
892 /* Macro might contain `[{}]' when not multi-arch */
893 fprintf_unfiltered (file
,
894 "gdbarch_dump: %s # %s\n",
895 "TARGET_WRITE_SP(val)",
896 XSTRING (TARGET_WRITE_SP (val
)));
899 fprintf_unfiltered (file
,
900 "gdbarch_dump: NUM_REGS # %s\n",
903 #ifdef NUM_PSEUDO_REGS
904 fprintf_unfiltered (file
,
905 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
906 XSTRING (NUM_PSEUDO_REGS
));
909 fprintf_unfiltered (file
,
910 "gdbarch_dump: SP_REGNUM # %s\n",
911 XSTRING (SP_REGNUM
));
914 fprintf_unfiltered (file
,
915 "gdbarch_dump: FP_REGNUM # %s\n",
916 XSTRING (FP_REGNUM
));
919 fprintf_unfiltered (file
,
920 "gdbarch_dump: PC_REGNUM # %s\n",
921 XSTRING (PC_REGNUM
));
924 fprintf_unfiltered (file
,
925 "gdbarch_dump: FP0_REGNUM # %s\n",
926 XSTRING (FP0_REGNUM
));
929 fprintf_unfiltered (file
,
930 "gdbarch_dump: NPC_REGNUM # %s\n",
931 XSTRING (NPC_REGNUM
));
934 fprintf_unfiltered (file
,
935 "gdbarch_dump: NNPC_REGNUM # %s\n",
936 XSTRING (NNPC_REGNUM
));
938 #ifdef STAB_REG_TO_REGNUM
939 fprintf_unfiltered (file
,
940 "gdbarch_dump: %s # %s\n",
941 "STAB_REG_TO_REGNUM(stab_regnr)",
942 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
944 #ifdef ECOFF_REG_TO_REGNUM
945 fprintf_unfiltered (file
,
946 "gdbarch_dump: %s # %s\n",
947 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
948 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
950 #ifdef DWARF_REG_TO_REGNUM
951 fprintf_unfiltered (file
,
952 "gdbarch_dump: %s # %s\n",
953 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
954 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
956 #ifdef SDB_REG_TO_REGNUM
957 fprintf_unfiltered (file
,
958 "gdbarch_dump: %s # %s\n",
959 "SDB_REG_TO_REGNUM(sdb_regnr)",
960 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
962 #ifdef DWARF2_REG_TO_REGNUM
963 fprintf_unfiltered (file
,
964 "gdbarch_dump: %s # %s\n",
965 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
966 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
969 fprintf_unfiltered (file
,
970 "gdbarch_dump: %s # %s\n",
971 "REGISTER_NAME(regnr)",
972 XSTRING (REGISTER_NAME (regnr
)));
975 fprintf_unfiltered (file
,
976 "gdbarch_dump: REGISTER_SIZE # %s\n",
977 XSTRING (REGISTER_SIZE
));
979 #ifdef REGISTER_BYTES
980 fprintf_unfiltered (file
,
981 "gdbarch_dump: REGISTER_BYTES # %s\n",
982 XSTRING (REGISTER_BYTES
));
985 fprintf_unfiltered (file
,
986 "gdbarch_dump: %s # %s\n",
987 "REGISTER_BYTE(reg_nr)",
988 XSTRING (REGISTER_BYTE (reg_nr
)));
990 #ifdef REGISTER_RAW_SIZE
991 fprintf_unfiltered (file
,
992 "gdbarch_dump: %s # %s\n",
993 "REGISTER_RAW_SIZE(reg_nr)",
994 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
996 #ifdef MAX_REGISTER_RAW_SIZE
997 fprintf_unfiltered (file
,
998 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
999 XSTRING (MAX_REGISTER_RAW_SIZE
));
1001 #ifdef REGISTER_VIRTUAL_SIZE
1002 fprintf_unfiltered (file
,
1003 "gdbarch_dump: %s # %s\n",
1004 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1005 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1007 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1008 fprintf_unfiltered (file
,
1009 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1010 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1012 #ifdef REGISTER_VIRTUAL_TYPE
1013 fprintf_unfiltered (file
,
1014 "gdbarch_dump: %s # %s\n",
1015 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1016 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1018 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1019 /* Macro might contain `[{}]' when not multi-arch */
1020 fprintf_unfiltered (file
,
1021 "gdbarch_dump: %s # %s\n",
1022 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1023 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1025 #ifdef REGISTER_SIM_REGNO
1026 fprintf_unfiltered (file
,
1027 "gdbarch_dump: %s # %s\n",
1028 "REGISTER_SIM_REGNO(reg_nr)",
1029 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1031 #ifdef REGISTER_BYTES_OK
1032 fprintf_unfiltered (file
,
1033 "gdbarch_dump: %s # %s\n",
1034 "REGISTER_BYTES_OK(nr_bytes)",
1035 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1037 #ifdef USE_GENERIC_DUMMY_FRAMES
1038 fprintf_unfiltered (file
,
1039 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1040 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1042 #ifdef CALL_DUMMY_LOCATION
1043 fprintf_unfiltered (file
,
1044 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1045 XSTRING (CALL_DUMMY_LOCATION
));
1047 #ifdef CALL_DUMMY_ADDRESS
1048 fprintf_unfiltered (file
,
1049 "gdbarch_dump: %s # %s\n",
1050 "CALL_DUMMY_ADDRESS()",
1051 XSTRING (CALL_DUMMY_ADDRESS ()));
1053 #ifdef CALL_DUMMY_START_OFFSET
1054 fprintf_unfiltered (file
,
1055 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1056 XSTRING (CALL_DUMMY_START_OFFSET
));
1058 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1059 fprintf_unfiltered (file
,
1060 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1061 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1063 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1064 fprintf_unfiltered (file
,
1065 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1066 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1068 #ifdef CALL_DUMMY_LENGTH
1069 fprintf_unfiltered (file
,
1070 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1071 XSTRING (CALL_DUMMY_LENGTH
));
1073 #ifdef PC_IN_CALL_DUMMY
1074 fprintf_unfiltered (file
,
1075 "gdbarch_dump: %s # %s\n",
1076 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1077 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1080 fprintf_unfiltered (file
,
1081 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1082 XSTRING (CALL_DUMMY_P
));
1084 #ifdef CALL_DUMMY_WORDS
1085 fprintf_unfiltered (file
,
1086 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1087 XSTRING (CALL_DUMMY_WORDS
));
1089 #ifdef SIZEOF_CALL_DUMMY_WORDS
1090 fprintf_unfiltered (file
,
1091 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1092 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1094 #ifdef CALL_DUMMY_STACK_ADJUST_P
1095 fprintf_unfiltered (file
,
1096 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1097 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1099 #ifdef CALL_DUMMY_STACK_ADJUST
1100 fprintf_unfiltered (file
,
1101 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1102 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1104 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1105 /* Macro might contain `[{}]' when not multi-arch */
1106 fprintf_unfiltered (file
,
1107 "gdbarch_dump: %s # %s\n",
1108 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1109 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1111 #ifdef BELIEVE_PCC_PROMOTION
1112 fprintf_unfiltered (file
,
1113 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1114 XSTRING (BELIEVE_PCC_PROMOTION
));
1116 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1117 fprintf_unfiltered (file
,
1118 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1119 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1121 #ifdef COERCE_FLOAT_TO_DOUBLE
1122 fprintf_unfiltered (file
,
1123 "gdbarch_dump: %s # %s\n",
1124 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1125 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1127 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1128 /* Macro might contain `[{}]' when not multi-arch */
1129 fprintf_unfiltered (file
,
1130 "gdbarch_dump: %s # %s\n",
1131 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1132 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1134 #ifdef REGISTER_CONVERTIBLE
1135 fprintf_unfiltered (file
,
1136 "gdbarch_dump: %s # %s\n",
1137 "REGISTER_CONVERTIBLE(nr)",
1138 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1140 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1141 /* Macro might contain `[{}]' when not multi-arch */
1142 fprintf_unfiltered (file
,
1143 "gdbarch_dump: %s # %s\n",
1144 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1145 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1147 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1148 /* Macro might contain `[{}]' when not multi-arch */
1149 fprintf_unfiltered (file
,
1150 "gdbarch_dump: %s # %s\n",
1151 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1152 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1154 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1155 /* Macro might contain `[{}]' when not multi-arch */
1156 fprintf_unfiltered (file
,
1157 "gdbarch_dump: %s # %s\n",
1158 "FETCH_PSEUDO_REGISTER(regnum)",
1159 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1161 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1162 /* Macro might contain `[{}]' when not multi-arch */
1163 fprintf_unfiltered (file
,
1164 "gdbarch_dump: %s # %s\n",
1165 "STORE_PSEUDO_REGISTER(regnum)",
1166 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1168 #ifdef POINTER_TO_ADDRESS
1169 fprintf_unfiltered (file
,
1170 "gdbarch_dump: %s # %s\n",
1171 "POINTER_TO_ADDRESS(type, buf)",
1172 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1174 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1175 /* Macro might contain `[{}]' when not multi-arch */
1176 fprintf_unfiltered (file
,
1177 "gdbarch_dump: %s # %s\n",
1178 "ADDRESS_TO_POINTER(type, buf, addr)",
1179 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1181 #ifdef RETURN_VALUE_ON_STACK
1182 fprintf_unfiltered (file
,
1183 "gdbarch_dump: %s # %s\n",
1184 "RETURN_VALUE_ON_STACK(type)",
1185 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1187 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1188 /* Macro might contain `[{}]' when not multi-arch */
1189 fprintf_unfiltered (file
,
1190 "gdbarch_dump: %s # %s\n",
1191 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1192 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1194 #ifdef PUSH_ARGUMENTS
1195 fprintf_unfiltered (file
,
1196 "gdbarch_dump: %s # %s\n",
1197 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1198 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1200 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1201 /* Macro might contain `[{}]' when not multi-arch */
1202 fprintf_unfiltered (file
,
1203 "gdbarch_dump: %s # %s\n",
1204 "PUSH_DUMMY_FRAME(-)",
1205 XSTRING (PUSH_DUMMY_FRAME (-)));
1207 #ifdef PUSH_RETURN_ADDRESS
1208 fprintf_unfiltered (file
,
1209 "gdbarch_dump: %s # %s\n",
1210 "PUSH_RETURN_ADDRESS(pc, sp)",
1211 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1213 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1214 /* Macro might contain `[{}]' when not multi-arch */
1215 fprintf_unfiltered (file
,
1216 "gdbarch_dump: %s # %s\n",
1218 XSTRING (POP_FRAME (-)));
1220 #ifdef D10V_MAKE_DADDR
1221 fprintf_unfiltered (file
,
1222 "gdbarch_dump: %s # %s\n",
1223 "D10V_MAKE_DADDR(x)",
1224 XSTRING (D10V_MAKE_DADDR (x
)));
1226 #ifdef D10V_MAKE_IADDR
1227 fprintf_unfiltered (file
,
1228 "gdbarch_dump: %s # %s\n",
1229 "D10V_MAKE_IADDR(x)",
1230 XSTRING (D10V_MAKE_IADDR (x
)));
1233 fprintf_unfiltered (file
,
1234 "gdbarch_dump: %s # %s\n",
1236 XSTRING (D10V_DADDR_P (x
)));
1239 fprintf_unfiltered (file
,
1240 "gdbarch_dump: %s # %s\n",
1242 XSTRING (D10V_IADDR_P (x
)));
1244 #ifdef D10V_CONVERT_DADDR_TO_RAW
1245 fprintf_unfiltered (file
,
1246 "gdbarch_dump: %s # %s\n",
1247 "D10V_CONVERT_DADDR_TO_RAW(x)",
1248 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1250 #ifdef D10V_CONVERT_IADDR_TO_RAW
1251 fprintf_unfiltered (file
,
1252 "gdbarch_dump: %s # %s\n",
1253 "D10V_CONVERT_IADDR_TO_RAW(x)",
1254 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1256 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1257 /* Macro might contain `[{}]' when not multi-arch */
1258 fprintf_unfiltered (file
,
1259 "gdbarch_dump: %s # %s\n",
1260 "STORE_STRUCT_RETURN(addr, sp)",
1261 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1263 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1264 /* Macro might contain `[{}]' when not multi-arch */
1265 fprintf_unfiltered (file
,
1266 "gdbarch_dump: %s # %s\n",
1267 "STORE_RETURN_VALUE(type, valbuf)",
1268 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1270 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1271 fprintf_unfiltered (file
,
1272 "gdbarch_dump: %s # %s\n",
1273 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1274 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1276 #ifdef USE_STRUCT_CONVENTION
1277 fprintf_unfiltered (file
,
1278 "gdbarch_dump: %s # %s\n",
1279 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1280 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1282 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1283 /* Macro might contain `[{}]' when not multi-arch */
1284 fprintf_unfiltered (file
,
1285 "gdbarch_dump: %s # %s\n",
1286 "FRAME_INIT_SAVED_REGS(frame)",
1287 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1289 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1290 /* Macro might contain `[{}]' when not multi-arch */
1291 fprintf_unfiltered (file
,
1292 "gdbarch_dump: %s # %s\n",
1293 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1294 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1296 #ifdef SKIP_PROLOGUE
1297 fprintf_unfiltered (file
,
1298 "gdbarch_dump: %s # %s\n",
1299 "SKIP_PROLOGUE(ip)",
1300 XSTRING (SKIP_PROLOGUE (ip
)));
1302 #ifdef PROLOGUE_FRAMELESS_P
1303 fprintf_unfiltered (file
,
1304 "gdbarch_dump: %s # %s\n",
1305 "PROLOGUE_FRAMELESS_P(ip)",
1306 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1309 fprintf_unfiltered (file
,
1310 "gdbarch_dump: %s # %s\n",
1311 "INNER_THAN(lhs, rhs)",
1312 XSTRING (INNER_THAN (lhs
, rhs
)));
1314 #ifdef BREAKPOINT_FROM_PC
1315 fprintf_unfiltered (file
,
1316 "gdbarch_dump: %s # %s\n",
1317 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1318 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1320 #ifdef MEMORY_INSERT_BREAKPOINT
1321 fprintf_unfiltered (file
,
1322 "gdbarch_dump: %s # %s\n",
1323 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1324 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1326 #ifdef MEMORY_REMOVE_BREAKPOINT
1327 fprintf_unfiltered (file
,
1328 "gdbarch_dump: %s # %s\n",
1329 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1330 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1332 #ifdef DECR_PC_AFTER_BREAK
1333 fprintf_unfiltered (file
,
1334 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1335 XSTRING (DECR_PC_AFTER_BREAK
));
1337 #ifdef PREPARE_TO_PROCEED
1338 fprintf_unfiltered (file
,
1339 "gdbarch_dump: %s # %s\n",
1340 "PREPARE_TO_PROCEED(select_it)",
1341 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1343 #ifdef FUNCTION_START_OFFSET
1344 fprintf_unfiltered (file
,
1345 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1346 XSTRING (FUNCTION_START_OFFSET
));
1348 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1349 /* Macro might contain `[{}]' when not multi-arch */
1350 fprintf_unfiltered (file
,
1351 "gdbarch_dump: %s # %s\n",
1352 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1353 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1355 #ifdef FRAME_ARGS_SKIP
1356 fprintf_unfiltered (file
,
1357 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1358 XSTRING (FRAME_ARGS_SKIP
));
1360 #ifdef FRAMELESS_FUNCTION_INVOCATION
1361 fprintf_unfiltered (file
,
1362 "gdbarch_dump: %s # %s\n",
1363 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1364 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1367 fprintf_unfiltered (file
,
1368 "gdbarch_dump: %s # %s\n",
1369 "FRAME_CHAIN(frame)",
1370 XSTRING (FRAME_CHAIN (frame
)));
1372 #ifdef FRAME_CHAIN_VALID
1373 fprintf_unfiltered (file
,
1374 "gdbarch_dump: %s # %s\n",
1375 "FRAME_CHAIN_VALID(chain, thisframe)",
1376 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1378 #ifdef FRAME_SAVED_PC
1379 fprintf_unfiltered (file
,
1380 "gdbarch_dump: %s # %s\n",
1381 "FRAME_SAVED_PC(fi)",
1382 XSTRING (FRAME_SAVED_PC (fi
)));
1384 #ifdef FRAME_ARGS_ADDRESS
1385 fprintf_unfiltered (file
,
1386 "gdbarch_dump: %s # %s\n",
1387 "FRAME_ARGS_ADDRESS(fi)",
1388 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1390 #ifdef FRAME_LOCALS_ADDRESS
1391 fprintf_unfiltered (file
,
1392 "gdbarch_dump: %s # %s\n",
1393 "FRAME_LOCALS_ADDRESS(fi)",
1394 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1396 #ifdef SAVED_PC_AFTER_CALL
1397 fprintf_unfiltered (file
,
1398 "gdbarch_dump: %s # %s\n",
1399 "SAVED_PC_AFTER_CALL(frame)",
1400 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1402 #ifdef FRAME_NUM_ARGS
1403 fprintf_unfiltered (file
,
1404 "gdbarch_dump: %s # %s\n",
1405 "FRAME_NUM_ARGS(frame)",
1406 XSTRING (FRAME_NUM_ARGS (frame
)));
1409 fprintf_unfiltered (file
,
1410 "gdbarch_dump: %s # %s\n",
1412 XSTRING (STACK_ALIGN (sp
)));
1414 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1415 fprintf_unfiltered (file
,
1416 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1417 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1419 #ifdef REG_STRUCT_HAS_ADDR
1420 fprintf_unfiltered (file
,
1421 "gdbarch_dump: %s # %s\n",
1422 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1423 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1425 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1426 /* Macro might contain `[{}]' when not multi-arch */
1427 fprintf_unfiltered (file
,
1428 "gdbarch_dump: %s # %s\n",
1429 "SAVE_DUMMY_FRAME_TOS(sp)",
1430 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1432 #ifdef PARM_BOUNDARY
1433 fprintf_unfiltered (file
,
1434 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1435 XSTRING (PARM_BOUNDARY
));
1437 #ifdef TARGET_FLOAT_FORMAT
1438 fprintf_unfiltered (file
,
1439 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1440 XSTRING (TARGET_FLOAT_FORMAT
));
1442 #ifdef TARGET_DOUBLE_FORMAT
1443 fprintf_unfiltered (file
,
1444 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1445 XSTRING (TARGET_DOUBLE_FORMAT
));
1447 #ifdef TARGET_LONG_DOUBLE_FORMAT
1448 fprintf_unfiltered (file
,
1449 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1450 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1452 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1453 fprintf_unfiltered (file
,
1454 "gdbarch_dump: %s # %s\n",
1455 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1456 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1458 #ifdef ADDR_BITS_REMOVE
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: %s # %s\n",
1461 "ADDR_BITS_REMOVE(addr)",
1462 XSTRING (ADDR_BITS_REMOVE (addr
)));
1464 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1465 /* Macro might contain `[{}]' when not multi-arch */
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: %s # %s\n",
1468 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1469 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1471 #ifdef TARGET_ARCHITECTURE
1472 if (TARGET_ARCHITECTURE
!= NULL
)
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1475 TARGET_ARCHITECTURE
->printable_name
);
1477 #ifdef TARGET_BYTE_ORDER
1478 fprintf_unfiltered (file
,
1479 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1480 (long) TARGET_BYTE_ORDER
);
1482 #ifdef TARGET_SHORT_BIT
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1485 (long) TARGET_SHORT_BIT
);
1487 #ifdef TARGET_INT_BIT
1488 fprintf_unfiltered (file
,
1489 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1490 (long) TARGET_INT_BIT
);
1492 #ifdef TARGET_LONG_BIT
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1495 (long) TARGET_LONG_BIT
);
1497 #ifdef TARGET_LONG_LONG_BIT
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1500 (long) TARGET_LONG_LONG_BIT
);
1502 #ifdef TARGET_FLOAT_BIT
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1505 (long) TARGET_FLOAT_BIT
);
1507 #ifdef TARGET_DOUBLE_BIT
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1510 (long) TARGET_DOUBLE_BIT
);
1512 #ifdef TARGET_LONG_DOUBLE_BIT
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1515 (long) TARGET_LONG_DOUBLE_BIT
);
1517 #ifdef TARGET_PTR_BIT
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1520 (long) TARGET_PTR_BIT
);
1522 #ifdef TARGET_ADDR_BIT
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1525 (long) TARGET_ADDR_BIT
);
1527 #ifdef TARGET_BFD_VMA_BIT
1528 fprintf_unfiltered (file
,
1529 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1530 (long) TARGET_BFD_VMA_BIT
);
1533 fprintf_unfiltered (file
,
1534 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1537 #ifdef TARGET_READ_PC
1539 fprintf_unfiltered (file
,
1540 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1541 (long) current_gdbarch
->read_pc
1542 /*TARGET_READ_PC ()*/);
1544 #ifdef TARGET_WRITE_PC
1546 fprintf_unfiltered (file
,
1547 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1548 (long) current_gdbarch
->write_pc
1549 /*TARGET_WRITE_PC ()*/);
1551 #ifdef TARGET_READ_FP
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1555 (long) current_gdbarch
->read_fp
1556 /*TARGET_READ_FP ()*/);
1558 #ifdef TARGET_WRITE_FP
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1562 (long) current_gdbarch
->write_fp
1563 /*TARGET_WRITE_FP ()*/);
1565 #ifdef TARGET_READ_SP
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1569 (long) current_gdbarch
->read_sp
1570 /*TARGET_READ_SP ()*/);
1572 #ifdef TARGET_WRITE_SP
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1576 (long) current_gdbarch
->write_sp
1577 /*TARGET_WRITE_SP ()*/);
1580 fprintf_unfiltered (file
,
1581 "gdbarch_dump: register_read = 0x%08lx\n",
1582 (long) current_gdbarch
->register_read
);
1584 fprintf_unfiltered (file
,
1585 "gdbarch_dump: register_write = 0x%08lx\n",
1586 (long) current_gdbarch
->register_write
);
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: NUM_REGS = %ld\n",
1592 #ifdef NUM_PSEUDO_REGS
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1595 (long) NUM_PSEUDO_REGS
);
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: SP_REGNUM = %ld\n",
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: FP_REGNUM = %ld\n",
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: PC_REGNUM = %ld\n",
1613 fprintf_unfiltered (file
,
1614 "gdbarch_dump: FP0_REGNUM = %ld\n",
1618 fprintf_unfiltered (file
,
1619 "gdbarch_dump: NPC_REGNUM = %ld\n",
1623 fprintf_unfiltered (file
,
1624 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1625 (long) NNPC_REGNUM
);
1627 #ifdef STAB_REG_TO_REGNUM
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1631 (long) current_gdbarch
->stab_reg_to_regnum
1632 /*STAB_REG_TO_REGNUM ()*/);
1634 #ifdef ECOFF_REG_TO_REGNUM
1636 fprintf_unfiltered (file
,
1637 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1638 (long) current_gdbarch
->ecoff_reg_to_regnum
1639 /*ECOFF_REG_TO_REGNUM ()*/);
1641 #ifdef DWARF_REG_TO_REGNUM
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1645 (long) current_gdbarch
->dwarf_reg_to_regnum
1646 /*DWARF_REG_TO_REGNUM ()*/);
1648 #ifdef SDB_REG_TO_REGNUM
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1652 (long) current_gdbarch
->sdb_reg_to_regnum
1653 /*SDB_REG_TO_REGNUM ()*/);
1655 #ifdef DWARF2_REG_TO_REGNUM
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1659 (long) current_gdbarch
->dwarf2_reg_to_regnum
1660 /*DWARF2_REG_TO_REGNUM ()*/);
1662 #ifdef REGISTER_NAME
1664 fprintf_unfiltered (file
,
1665 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1666 (long) current_gdbarch
->register_name
1667 /*REGISTER_NAME ()*/);
1669 #ifdef REGISTER_SIZE
1670 fprintf_unfiltered (file
,
1671 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1672 (long) REGISTER_SIZE
);
1674 #ifdef REGISTER_BYTES
1675 fprintf_unfiltered (file
,
1676 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1677 (long) REGISTER_BYTES
);
1679 #ifdef REGISTER_BYTE
1681 fprintf_unfiltered (file
,
1682 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1683 (long) current_gdbarch
->register_byte
1684 /*REGISTER_BYTE ()*/);
1686 #ifdef REGISTER_RAW_SIZE
1688 fprintf_unfiltered (file
,
1689 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1690 (long) current_gdbarch
->register_raw_size
1691 /*REGISTER_RAW_SIZE ()*/);
1693 #ifdef MAX_REGISTER_RAW_SIZE
1694 fprintf_unfiltered (file
,
1695 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1696 (long) MAX_REGISTER_RAW_SIZE
);
1698 #ifdef REGISTER_VIRTUAL_SIZE
1700 fprintf_unfiltered (file
,
1701 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1702 (long) current_gdbarch
->register_virtual_size
1703 /*REGISTER_VIRTUAL_SIZE ()*/);
1705 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1706 fprintf_unfiltered (file
,
1707 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1708 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1710 #ifdef REGISTER_VIRTUAL_TYPE
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1714 (long) current_gdbarch
->register_virtual_type
1715 /*REGISTER_VIRTUAL_TYPE ()*/);
1717 #ifdef DO_REGISTERS_INFO
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1721 (long) current_gdbarch
->do_registers_info
1722 /*DO_REGISTERS_INFO ()*/);
1724 #ifdef REGISTER_SIM_REGNO
1726 fprintf_unfiltered (file
,
1727 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1728 (long) current_gdbarch
->register_sim_regno
1729 /*REGISTER_SIM_REGNO ()*/);
1731 #ifdef REGISTER_BYTES_OK
1733 fprintf_unfiltered (file
,
1734 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1735 (long) current_gdbarch
->register_bytes_ok
1736 /*REGISTER_BYTES_OK ()*/);
1738 #ifdef USE_GENERIC_DUMMY_FRAMES
1739 fprintf_unfiltered (file
,
1740 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1741 (long) USE_GENERIC_DUMMY_FRAMES
);
1743 #ifdef CALL_DUMMY_LOCATION
1744 fprintf_unfiltered (file
,
1745 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1746 (long) CALL_DUMMY_LOCATION
);
1748 #ifdef CALL_DUMMY_ADDRESS
1750 fprintf_unfiltered (file
,
1751 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1752 (long) current_gdbarch
->call_dummy_address
1753 /*CALL_DUMMY_ADDRESS ()*/);
1755 #ifdef CALL_DUMMY_START_OFFSET
1756 fprintf_unfiltered (file
,
1757 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1758 (long) CALL_DUMMY_START_OFFSET
);
1760 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1761 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1762 fprintf_unfiltered (file
,
1763 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1764 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1766 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1767 fprintf_unfiltered (file
,
1768 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1769 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1771 #ifdef CALL_DUMMY_LENGTH
1772 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1773 fprintf_unfiltered (file
,
1774 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1775 (long) CALL_DUMMY_LENGTH
);
1777 #ifdef PC_IN_CALL_DUMMY
1779 fprintf_unfiltered (file
,
1780 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1781 (long) current_gdbarch
->pc_in_call_dummy
1782 /*PC_IN_CALL_DUMMY ()*/);
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1787 (long) CALL_DUMMY_P
);
1789 #ifdef CALL_DUMMY_WORDS
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1792 (long) CALL_DUMMY_WORDS
);
1794 #ifdef SIZEOF_CALL_DUMMY_WORDS
1795 fprintf_unfiltered (file
,
1796 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1797 (long) SIZEOF_CALL_DUMMY_WORDS
);
1799 #ifdef CALL_DUMMY_STACK_ADJUST_P
1800 fprintf_unfiltered (file
,
1801 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1802 (long) CALL_DUMMY_STACK_ADJUST_P
);
1804 #ifdef CALL_DUMMY_STACK_ADJUST
1805 if (CALL_DUMMY_STACK_ADJUST_P
)
1806 fprintf_unfiltered (file
,
1807 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1808 (long) CALL_DUMMY_STACK_ADJUST
);
1810 #ifdef FIX_CALL_DUMMY
1812 fprintf_unfiltered (file
,
1813 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1814 (long) current_gdbarch
->fix_call_dummy
1815 /*FIX_CALL_DUMMY ()*/);
1817 #ifdef BELIEVE_PCC_PROMOTION
1818 fprintf_unfiltered (file
,
1819 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1820 (long) BELIEVE_PCC_PROMOTION
);
1822 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1823 fprintf_unfiltered (file
,
1824 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1825 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1827 #ifdef COERCE_FLOAT_TO_DOUBLE
1829 fprintf_unfiltered (file
,
1830 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1831 (long) current_gdbarch
->coerce_float_to_double
1832 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1834 #ifdef GET_SAVED_REGISTER
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1838 (long) current_gdbarch
->get_saved_register
1839 /*GET_SAVED_REGISTER ()*/);
1841 #ifdef REGISTER_CONVERTIBLE
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1845 (long) current_gdbarch
->register_convertible
1846 /*REGISTER_CONVERTIBLE ()*/);
1848 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1852 (long) current_gdbarch
->register_convert_to_virtual
1853 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1855 #ifdef REGISTER_CONVERT_TO_RAW
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1859 (long) current_gdbarch
->register_convert_to_raw
1860 /*REGISTER_CONVERT_TO_RAW ()*/);
1862 #ifdef FETCH_PSEUDO_REGISTER
1864 fprintf_unfiltered (file
,
1865 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1866 (long) current_gdbarch
->fetch_pseudo_register
1867 /*FETCH_PSEUDO_REGISTER ()*/);
1869 #ifdef STORE_PSEUDO_REGISTER
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1873 (long) current_gdbarch
->store_pseudo_register
1874 /*STORE_PSEUDO_REGISTER ()*/);
1876 #ifdef POINTER_TO_ADDRESS
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1880 (long) current_gdbarch
->pointer_to_address
1881 /*POINTER_TO_ADDRESS ()*/);
1883 #ifdef ADDRESS_TO_POINTER
1885 fprintf_unfiltered (file
,
1886 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1887 (long) current_gdbarch
->address_to_pointer
1888 /*ADDRESS_TO_POINTER ()*/);
1890 #ifdef RETURN_VALUE_ON_STACK
1892 fprintf_unfiltered (file
,
1893 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1894 (long) current_gdbarch
->return_value_on_stack
1895 /*RETURN_VALUE_ON_STACK ()*/);
1897 #ifdef EXTRACT_RETURN_VALUE
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1901 (long) current_gdbarch
->extract_return_value
1902 /*EXTRACT_RETURN_VALUE ()*/);
1904 #ifdef PUSH_ARGUMENTS
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1908 (long) current_gdbarch
->push_arguments
1909 /*PUSH_ARGUMENTS ()*/);
1911 #ifdef PUSH_DUMMY_FRAME
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1915 (long) current_gdbarch
->push_dummy_frame
1916 /*PUSH_DUMMY_FRAME ()*/);
1918 #ifdef PUSH_RETURN_ADDRESS
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1922 (long) current_gdbarch
->push_return_address
1923 /*PUSH_RETURN_ADDRESS ()*/);
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1929 (long) current_gdbarch
->pop_frame
1932 #ifdef D10V_MAKE_DADDR
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1936 (long) current_gdbarch
->d10v_make_daddr
1937 /*D10V_MAKE_DADDR ()*/);
1939 #ifdef D10V_MAKE_IADDR
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1943 (long) current_gdbarch
->d10v_make_iaddr
1944 /*D10V_MAKE_IADDR ()*/);
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1950 (long) current_gdbarch
->d10v_daddr_p
1951 /*D10V_DADDR_P ()*/);
1955 fprintf_unfiltered (file
,
1956 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1957 (long) current_gdbarch
->d10v_iaddr_p
1958 /*D10V_IADDR_P ()*/);
1960 #ifdef D10V_CONVERT_DADDR_TO_RAW
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1964 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1965 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1967 #ifdef D10V_CONVERT_IADDR_TO_RAW
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1971 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1972 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1974 #ifdef STORE_STRUCT_RETURN
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1978 (long) current_gdbarch
->store_struct_return
1979 /*STORE_STRUCT_RETURN ()*/);
1981 #ifdef STORE_RETURN_VALUE
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1985 (long) current_gdbarch
->store_return_value
1986 /*STORE_RETURN_VALUE ()*/);
1988 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1992 (long) current_gdbarch
->extract_struct_value_address
1993 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1995 #ifdef USE_STRUCT_CONVENTION
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1999 (long) current_gdbarch
->use_struct_convention
2000 /*USE_STRUCT_CONVENTION ()*/);
2002 #ifdef FRAME_INIT_SAVED_REGS
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
2006 (long) current_gdbarch
->frame_init_saved_regs
2007 /*FRAME_INIT_SAVED_REGS ()*/);
2009 #ifdef INIT_EXTRA_FRAME_INFO
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
2013 (long) current_gdbarch
->init_extra_frame_info
2014 /*INIT_EXTRA_FRAME_INFO ()*/);
2016 #ifdef SKIP_PROLOGUE
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
2020 (long) current_gdbarch
->skip_prologue
2021 /*SKIP_PROLOGUE ()*/);
2023 #ifdef PROLOGUE_FRAMELESS_P
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2027 (long) current_gdbarch
->prologue_frameless_p
2028 /*PROLOGUE_FRAMELESS_P ()*/);
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2034 (long) current_gdbarch
->inner_than
2037 #ifdef BREAKPOINT_FROM_PC
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2041 (long) current_gdbarch
->breakpoint_from_pc
2042 /*BREAKPOINT_FROM_PC ()*/);
2044 #ifdef MEMORY_INSERT_BREAKPOINT
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2048 (long) current_gdbarch
->memory_insert_breakpoint
2049 /*MEMORY_INSERT_BREAKPOINT ()*/);
2051 #ifdef MEMORY_REMOVE_BREAKPOINT
2053 fprintf_unfiltered (file
,
2054 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2055 (long) current_gdbarch
->memory_remove_breakpoint
2056 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2058 #ifdef DECR_PC_AFTER_BREAK
2059 fprintf_unfiltered (file
,
2060 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2061 (long) DECR_PC_AFTER_BREAK
);
2063 #ifdef PREPARE_TO_PROCEED
2065 fprintf_unfiltered (file
,
2066 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2067 (long) current_gdbarch
->prepare_to_proceed
2068 /*PREPARE_TO_PROCEED ()*/);
2070 #ifdef FUNCTION_START_OFFSET
2071 fprintf_unfiltered (file
,
2072 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2073 (long) FUNCTION_START_OFFSET
);
2075 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2077 fprintf_unfiltered (file
,
2078 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2079 (long) current_gdbarch
->remote_translate_xfer_address
2080 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2082 #ifdef FRAME_ARGS_SKIP
2083 fprintf_unfiltered (file
,
2084 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2085 (long) FRAME_ARGS_SKIP
);
2087 #ifdef FRAMELESS_FUNCTION_INVOCATION
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2091 (long) current_gdbarch
->frameless_function_invocation
2092 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2096 fprintf_unfiltered (file
,
2097 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2098 (long) current_gdbarch
->frame_chain
2099 /*FRAME_CHAIN ()*/);
2101 #ifdef FRAME_CHAIN_VALID
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2105 (long) current_gdbarch
->frame_chain_valid
2106 /*FRAME_CHAIN_VALID ()*/);
2108 #ifdef FRAME_SAVED_PC
2110 fprintf_unfiltered (file
,
2111 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2112 (long) current_gdbarch
->frame_saved_pc
2113 /*FRAME_SAVED_PC ()*/);
2115 #ifdef FRAME_ARGS_ADDRESS
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2119 (long) current_gdbarch
->frame_args_address
2120 /*FRAME_ARGS_ADDRESS ()*/);
2122 #ifdef FRAME_LOCALS_ADDRESS
2124 fprintf_unfiltered (file
,
2125 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2126 (long) current_gdbarch
->frame_locals_address
2127 /*FRAME_LOCALS_ADDRESS ()*/);
2129 #ifdef SAVED_PC_AFTER_CALL
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2133 (long) current_gdbarch
->saved_pc_after_call
2134 /*SAVED_PC_AFTER_CALL ()*/);
2136 #ifdef FRAME_NUM_ARGS
2138 fprintf_unfiltered (file
,
2139 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2140 (long) current_gdbarch
->frame_num_args
2141 /*FRAME_NUM_ARGS ()*/);
2145 fprintf_unfiltered (file
,
2146 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2147 (long) current_gdbarch
->stack_align
2148 /*STACK_ALIGN ()*/);
2150 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2151 fprintf_unfiltered (file
,
2152 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2153 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2155 #ifdef REG_STRUCT_HAS_ADDR
2157 fprintf_unfiltered (file
,
2158 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2159 (long) current_gdbarch
->reg_struct_has_addr
2160 /*REG_STRUCT_HAS_ADDR ()*/);
2162 #ifdef SAVE_DUMMY_FRAME_TOS
2164 fprintf_unfiltered (file
,
2165 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2166 (long) current_gdbarch
->save_dummy_frame_tos
2167 /*SAVE_DUMMY_FRAME_TOS ()*/);
2169 #ifdef PARM_BOUNDARY
2170 fprintf_unfiltered (file
,
2171 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2172 (long) PARM_BOUNDARY
);
2174 #ifdef TARGET_FLOAT_FORMAT
2175 fprintf_unfiltered (file
,
2176 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2177 (long) TARGET_FLOAT_FORMAT
);
2179 #ifdef TARGET_DOUBLE_FORMAT
2180 fprintf_unfiltered (file
,
2181 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2182 (long) TARGET_DOUBLE_FORMAT
);
2184 #ifdef TARGET_LONG_DOUBLE_FORMAT
2185 fprintf_unfiltered (file
,
2186 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2187 (long) TARGET_LONG_DOUBLE_FORMAT
);
2189 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2191 fprintf_unfiltered (file
,
2192 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2193 (long) current_gdbarch
->convert_from_func_ptr_addr
2194 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2196 #ifdef ADDR_BITS_REMOVE
2198 fprintf_unfiltered (file
,
2199 "gdbarch_dump: ADDR_BITS_REMOVE = 0x%08lx\n",
2200 (long) current_gdbarch
->addr_bits_remove
2201 /*ADDR_BITS_REMOVE ()*/);
2203 #ifdef SOFTWARE_SINGLE_STEP
2205 fprintf_unfiltered (file
,
2206 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2207 (long) current_gdbarch
->software_single_step
2208 /*SOFTWARE_SINGLE_STEP ()*/);
2210 if (current_gdbarch
->dump_tdep
!= NULL
)
2211 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2214 struct gdbarch_tdep
*
2215 gdbarch_tdep (struct gdbarch
*gdbarch
)
2217 if (gdbarch_debug
>= 2)
2218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2219 return gdbarch
->tdep
;
2223 const struct bfd_arch_info
*
2224 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2226 if (gdbarch_debug
>= 2)
2227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2228 return gdbarch
->bfd_arch_info
;
2232 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2234 if (gdbarch_debug
>= 2)
2235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2236 return gdbarch
->byte_order
;
2240 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2242 /* Skip verify of short_bit, invalid_p == 0 */
2243 if (gdbarch_debug
>= 2)
2244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2245 return gdbarch
->short_bit
;
2249 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2252 gdbarch
->short_bit
= short_bit
;
2256 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2258 /* Skip verify of int_bit, invalid_p == 0 */
2259 if (gdbarch_debug
>= 2)
2260 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2261 return gdbarch
->int_bit
;
2265 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2268 gdbarch
->int_bit
= int_bit
;
2272 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2274 /* Skip verify of long_bit, invalid_p == 0 */
2275 if (gdbarch_debug
>= 2)
2276 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2277 return gdbarch
->long_bit
;
2281 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2284 gdbarch
->long_bit
= long_bit
;
2288 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2290 /* Skip verify of long_long_bit, invalid_p == 0 */
2291 if (gdbarch_debug
>= 2)
2292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2293 return gdbarch
->long_long_bit
;
2297 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2300 gdbarch
->long_long_bit
= long_long_bit
;
2304 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2306 /* Skip verify of float_bit, invalid_p == 0 */
2307 if (gdbarch_debug
>= 2)
2308 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2309 return gdbarch
->float_bit
;
2313 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2316 gdbarch
->float_bit
= float_bit
;
2320 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2322 /* Skip verify of double_bit, invalid_p == 0 */
2323 if (gdbarch_debug
>= 2)
2324 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2325 return gdbarch
->double_bit
;
2329 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2332 gdbarch
->double_bit
= double_bit
;
2336 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2338 /* Skip verify of long_double_bit, invalid_p == 0 */
2339 if (gdbarch_debug
>= 2)
2340 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2341 return gdbarch
->long_double_bit
;
2345 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2346 int long_double_bit
)
2348 gdbarch
->long_double_bit
= long_double_bit
;
2352 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2354 /* Skip verify of ptr_bit, invalid_p == 0 */
2355 if (gdbarch_debug
>= 2)
2356 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2357 return gdbarch
->ptr_bit
;
2361 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2364 gdbarch
->ptr_bit
= ptr_bit
;
2368 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2370 if (gdbarch
->addr_bit
== 0)
2371 internal_error (__FILE__
, __LINE__
,
2372 "gdbarch: gdbarch_addr_bit invalid");
2373 if (gdbarch_debug
>= 2)
2374 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2375 return gdbarch
->addr_bit
;
2379 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2382 gdbarch
->addr_bit
= addr_bit
;
2386 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2388 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2389 if (gdbarch_debug
>= 2)
2390 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2391 return gdbarch
->bfd_vma_bit
;
2395 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2398 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2402 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2404 /* Skip verify of ieee_float, invalid_p == 0 */
2405 if (gdbarch_debug
>= 2)
2406 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2407 return gdbarch
->ieee_float
;
2411 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2414 gdbarch
->ieee_float
= ieee_float
;
2418 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2420 if (gdbarch
->read_pc
== 0)
2421 internal_error (__FILE__
, __LINE__
,
2422 "gdbarch: gdbarch_read_pc invalid");
2423 if (gdbarch_debug
>= 2)
2424 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2425 return gdbarch
->read_pc (ptid
);
2429 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2430 gdbarch_read_pc_ftype read_pc
)
2432 gdbarch
->read_pc
= read_pc
;
2436 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2438 if (gdbarch
->write_pc
== 0)
2439 internal_error (__FILE__
, __LINE__
,
2440 "gdbarch: gdbarch_write_pc invalid");
2441 if (gdbarch_debug
>= 2)
2442 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2443 gdbarch
->write_pc (val
, ptid
);
2447 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2448 gdbarch_write_pc_ftype write_pc
)
2450 gdbarch
->write_pc
= write_pc
;
2454 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2456 if (gdbarch
->read_fp
== 0)
2457 internal_error (__FILE__
, __LINE__
,
2458 "gdbarch: gdbarch_read_fp invalid");
2459 if (gdbarch_debug
>= 2)
2460 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2461 return gdbarch
->read_fp ();
2465 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2466 gdbarch_read_fp_ftype read_fp
)
2468 gdbarch
->read_fp
= read_fp
;
2472 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2474 if (gdbarch
->write_fp
== 0)
2475 internal_error (__FILE__
, __LINE__
,
2476 "gdbarch: gdbarch_write_fp invalid");
2477 if (gdbarch_debug
>= 2)
2478 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2479 gdbarch
->write_fp (val
);
2483 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2484 gdbarch_write_fp_ftype write_fp
)
2486 gdbarch
->write_fp
= write_fp
;
2490 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2492 if (gdbarch
->read_sp
== 0)
2493 internal_error (__FILE__
, __LINE__
,
2494 "gdbarch: gdbarch_read_sp invalid");
2495 if (gdbarch_debug
>= 2)
2496 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2497 return gdbarch
->read_sp ();
2501 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2502 gdbarch_read_sp_ftype read_sp
)
2504 gdbarch
->read_sp
= read_sp
;
2508 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2510 if (gdbarch
->write_sp
== 0)
2511 internal_error (__FILE__
, __LINE__
,
2512 "gdbarch: gdbarch_write_sp invalid");
2513 if (gdbarch_debug
>= 2)
2514 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2515 gdbarch
->write_sp (val
);
2519 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2520 gdbarch_write_sp_ftype write_sp
)
2522 gdbarch
->write_sp
= write_sp
;
2526 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2528 return gdbarch
->register_read
!= 0;
2532 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2534 if (gdbarch
->register_read
== 0)
2535 internal_error (__FILE__
, __LINE__
,
2536 "gdbarch: gdbarch_register_read invalid");
2537 if (gdbarch_debug
>= 2)
2538 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2539 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2543 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2544 gdbarch_register_read_ftype register_read
)
2546 gdbarch
->register_read
= register_read
;
2550 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2552 return gdbarch
->register_write
!= 0;
2556 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2558 if (gdbarch
->register_write
== 0)
2559 internal_error (__FILE__
, __LINE__
,
2560 "gdbarch: gdbarch_register_write invalid");
2561 if (gdbarch_debug
>= 2)
2562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2563 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2567 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2568 gdbarch_register_write_ftype register_write
)
2570 gdbarch
->register_write
= register_write
;
2574 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2576 if (gdbarch
->num_regs
== -1)
2577 internal_error (__FILE__
, __LINE__
,
2578 "gdbarch: gdbarch_num_regs invalid");
2579 if (gdbarch_debug
>= 2)
2580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2581 return gdbarch
->num_regs
;
2585 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2588 gdbarch
->num_regs
= num_regs
;
2592 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2594 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2595 if (gdbarch_debug
>= 2)
2596 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2597 return gdbarch
->num_pseudo_regs
;
2601 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2602 int num_pseudo_regs
)
2604 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2608 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2610 if (gdbarch
->sp_regnum
== -1)
2611 internal_error (__FILE__
, __LINE__
,
2612 "gdbarch: gdbarch_sp_regnum invalid");
2613 if (gdbarch_debug
>= 2)
2614 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2615 return gdbarch
->sp_regnum
;
2619 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2622 gdbarch
->sp_regnum
= sp_regnum
;
2626 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2628 if (gdbarch
->fp_regnum
== -1)
2629 internal_error (__FILE__
, __LINE__
,
2630 "gdbarch: gdbarch_fp_regnum invalid");
2631 if (gdbarch_debug
>= 2)
2632 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2633 return gdbarch
->fp_regnum
;
2637 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2640 gdbarch
->fp_regnum
= fp_regnum
;
2644 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2646 if (gdbarch
->pc_regnum
== -1)
2647 internal_error (__FILE__
, __LINE__
,
2648 "gdbarch: gdbarch_pc_regnum invalid");
2649 if (gdbarch_debug
>= 2)
2650 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2651 return gdbarch
->pc_regnum
;
2655 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2658 gdbarch
->pc_regnum
= pc_regnum
;
2662 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2664 /* Skip verify of fp0_regnum, invalid_p == 0 */
2665 if (gdbarch_debug
>= 2)
2666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2667 return gdbarch
->fp0_regnum
;
2671 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2674 gdbarch
->fp0_regnum
= fp0_regnum
;
2678 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2680 /* Skip verify of npc_regnum, invalid_p == 0 */
2681 if (gdbarch_debug
>= 2)
2682 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2683 return gdbarch
->npc_regnum
;
2687 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2690 gdbarch
->npc_regnum
= npc_regnum
;
2694 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2696 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2697 if (gdbarch_debug
>= 2)
2698 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2699 return gdbarch
->nnpc_regnum
;
2703 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2706 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2710 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2712 if (gdbarch
->stab_reg_to_regnum
== 0)
2713 internal_error (__FILE__
, __LINE__
,
2714 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2715 if (gdbarch_debug
>= 2)
2716 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2717 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2721 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2722 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2724 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2728 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2730 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2731 internal_error (__FILE__
, __LINE__
,
2732 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2733 if (gdbarch_debug
>= 2)
2734 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2735 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2739 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2740 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2742 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2746 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2748 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2749 internal_error (__FILE__
, __LINE__
,
2750 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2751 if (gdbarch_debug
>= 2)
2752 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2753 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2757 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2758 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2760 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2764 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2766 if (gdbarch
->sdb_reg_to_regnum
== 0)
2767 internal_error (__FILE__
, __LINE__
,
2768 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2769 if (gdbarch_debug
>= 2)
2770 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2771 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2775 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2776 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2778 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2782 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2784 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2785 internal_error (__FILE__
, __LINE__
,
2786 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2787 if (gdbarch_debug
>= 2)
2788 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2789 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2793 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2794 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2796 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2800 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2802 if (gdbarch
->register_name
== 0)
2803 internal_error (__FILE__
, __LINE__
,
2804 "gdbarch: gdbarch_register_name invalid");
2805 if (gdbarch_debug
>= 2)
2806 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2807 return gdbarch
->register_name (regnr
);
2811 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2812 gdbarch_register_name_ftype register_name
)
2814 gdbarch
->register_name
= register_name
;
2818 gdbarch_register_size (struct gdbarch
*gdbarch
)
2820 if (gdbarch
->register_size
== -1)
2821 internal_error (__FILE__
, __LINE__
,
2822 "gdbarch: gdbarch_register_size invalid");
2823 if (gdbarch_debug
>= 2)
2824 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2825 return gdbarch
->register_size
;
2829 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2832 gdbarch
->register_size
= register_size
;
2836 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2838 if (gdbarch
->register_bytes
== -1)
2839 internal_error (__FILE__
, __LINE__
,
2840 "gdbarch: gdbarch_register_bytes invalid");
2841 if (gdbarch_debug
>= 2)
2842 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2843 return gdbarch
->register_bytes
;
2847 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2850 gdbarch
->register_bytes
= register_bytes
;
2854 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2856 if (gdbarch
->register_byte
== 0)
2857 internal_error (__FILE__
, __LINE__
,
2858 "gdbarch: gdbarch_register_byte invalid");
2859 if (gdbarch_debug
>= 2)
2860 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2861 return gdbarch
->register_byte (reg_nr
);
2865 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2866 gdbarch_register_byte_ftype register_byte
)
2868 gdbarch
->register_byte
= register_byte
;
2872 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2874 if (gdbarch
->register_raw_size
== 0)
2875 internal_error (__FILE__
, __LINE__
,
2876 "gdbarch: gdbarch_register_raw_size invalid");
2877 if (gdbarch_debug
>= 2)
2878 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2879 return gdbarch
->register_raw_size (reg_nr
);
2883 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2884 gdbarch_register_raw_size_ftype register_raw_size
)
2886 gdbarch
->register_raw_size
= register_raw_size
;
2890 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2892 if (gdbarch
->max_register_raw_size
== -1)
2893 internal_error (__FILE__
, __LINE__
,
2894 "gdbarch: gdbarch_max_register_raw_size invalid");
2895 if (gdbarch_debug
>= 2)
2896 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2897 return gdbarch
->max_register_raw_size
;
2901 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2902 int max_register_raw_size
)
2904 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2908 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2910 if (gdbarch
->register_virtual_size
== 0)
2911 internal_error (__FILE__
, __LINE__
,
2912 "gdbarch: gdbarch_register_virtual_size invalid");
2913 if (gdbarch_debug
>= 2)
2914 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2915 return gdbarch
->register_virtual_size (reg_nr
);
2919 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2920 gdbarch_register_virtual_size_ftype register_virtual_size
)
2922 gdbarch
->register_virtual_size
= register_virtual_size
;
2926 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2928 if (gdbarch
->max_register_virtual_size
== -1)
2929 internal_error (__FILE__
, __LINE__
,
2930 "gdbarch: gdbarch_max_register_virtual_size invalid");
2931 if (gdbarch_debug
>= 2)
2932 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2933 return gdbarch
->max_register_virtual_size
;
2937 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2938 int max_register_virtual_size
)
2940 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2944 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2946 if (gdbarch
->register_virtual_type
== 0)
2947 internal_error (__FILE__
, __LINE__
,
2948 "gdbarch: gdbarch_register_virtual_type invalid");
2949 if (gdbarch_debug
>= 2)
2950 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2951 return gdbarch
->register_virtual_type (reg_nr
);
2955 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2956 gdbarch_register_virtual_type_ftype register_virtual_type
)
2958 gdbarch
->register_virtual_type
= register_virtual_type
;
2962 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2964 if (gdbarch
->do_registers_info
== 0)
2965 internal_error (__FILE__
, __LINE__
,
2966 "gdbarch: gdbarch_do_registers_info invalid");
2967 if (gdbarch_debug
>= 2)
2968 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2969 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2973 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2974 gdbarch_do_registers_info_ftype do_registers_info
)
2976 gdbarch
->do_registers_info
= do_registers_info
;
2980 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2982 if (gdbarch
->register_sim_regno
== 0)
2983 internal_error (__FILE__
, __LINE__
,
2984 "gdbarch: gdbarch_register_sim_regno invalid");
2985 if (gdbarch_debug
>= 2)
2986 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2987 return gdbarch
->register_sim_regno (reg_nr
);
2991 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2992 gdbarch_register_sim_regno_ftype register_sim_regno
)
2994 gdbarch
->register_sim_regno
= register_sim_regno
;
2998 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
3000 return gdbarch
->register_bytes_ok
!= 0;
3004 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
3006 if (gdbarch
->register_bytes_ok
== 0)
3007 internal_error (__FILE__
, __LINE__
,
3008 "gdbarch: gdbarch_register_bytes_ok invalid");
3009 if (gdbarch_debug
>= 2)
3010 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
3011 return gdbarch
->register_bytes_ok (nr_bytes
);
3015 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3016 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3018 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3022 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3024 if (gdbarch
->use_generic_dummy_frames
== -1)
3025 internal_error (__FILE__
, __LINE__
,
3026 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3027 if (gdbarch_debug
>= 2)
3028 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3029 return gdbarch
->use_generic_dummy_frames
;
3033 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3034 int use_generic_dummy_frames
)
3036 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3040 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3042 if (gdbarch
->call_dummy_location
== 0)
3043 internal_error (__FILE__
, __LINE__
,
3044 "gdbarch: gdbarch_call_dummy_location invalid");
3045 if (gdbarch_debug
>= 2)
3046 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3047 return gdbarch
->call_dummy_location
;
3051 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3052 int call_dummy_location
)
3054 gdbarch
->call_dummy_location
= call_dummy_location
;
3058 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3060 if (gdbarch
->call_dummy_address
== 0)
3061 internal_error (__FILE__
, __LINE__
,
3062 "gdbarch: gdbarch_call_dummy_address invalid");
3063 if (gdbarch_debug
>= 2)
3064 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3065 return gdbarch
->call_dummy_address ();
3069 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3070 gdbarch_call_dummy_address_ftype call_dummy_address
)
3072 gdbarch
->call_dummy_address
= call_dummy_address
;
3076 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3078 if (gdbarch
->call_dummy_start_offset
== -1)
3079 internal_error (__FILE__
, __LINE__
,
3080 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3081 if (gdbarch_debug
>= 2)
3082 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3083 return gdbarch
->call_dummy_start_offset
;
3087 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3088 CORE_ADDR call_dummy_start_offset
)
3090 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3094 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3096 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3097 internal_error (__FILE__
, __LINE__
,
3098 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3099 if (gdbarch_debug
>= 2)
3100 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3101 return gdbarch
->call_dummy_breakpoint_offset
;
3105 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3106 CORE_ADDR call_dummy_breakpoint_offset
)
3108 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3112 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3114 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3115 internal_error (__FILE__
, __LINE__
,
3116 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3117 if (gdbarch_debug
>= 2)
3118 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3119 return gdbarch
->call_dummy_breakpoint_offset_p
;
3123 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3124 int call_dummy_breakpoint_offset_p
)
3126 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3130 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3132 if (gdbarch
->call_dummy_length
== -1)
3133 internal_error (__FILE__
, __LINE__
,
3134 "gdbarch: gdbarch_call_dummy_length invalid");
3135 if (gdbarch_debug
>= 2)
3136 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3137 return gdbarch
->call_dummy_length
;
3141 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3142 int call_dummy_length
)
3144 gdbarch
->call_dummy_length
= call_dummy_length
;
3148 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3150 if (gdbarch
->pc_in_call_dummy
== 0)
3151 internal_error (__FILE__
, __LINE__
,
3152 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3153 if (gdbarch_debug
>= 2)
3154 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3155 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3159 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3160 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3162 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3166 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3168 if (gdbarch
->call_dummy_p
== -1)
3169 internal_error (__FILE__
, __LINE__
,
3170 "gdbarch: gdbarch_call_dummy_p invalid");
3171 if (gdbarch_debug
>= 2)
3172 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3173 return gdbarch
->call_dummy_p
;
3177 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3180 gdbarch
->call_dummy_p
= call_dummy_p
;
3184 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3186 /* Skip verify of call_dummy_words, invalid_p == 0 */
3187 if (gdbarch_debug
>= 2)
3188 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3189 return gdbarch
->call_dummy_words
;
3193 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3194 LONGEST
* call_dummy_words
)
3196 gdbarch
->call_dummy_words
= call_dummy_words
;
3200 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3202 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3203 if (gdbarch_debug
>= 2)
3204 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3205 return gdbarch
->sizeof_call_dummy_words
;
3209 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3210 int sizeof_call_dummy_words
)
3212 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3216 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3218 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3219 internal_error (__FILE__
, __LINE__
,
3220 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3221 if (gdbarch_debug
>= 2)
3222 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3223 return gdbarch
->call_dummy_stack_adjust_p
;
3227 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3228 int call_dummy_stack_adjust_p
)
3230 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3234 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3236 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3237 internal_error (__FILE__
, __LINE__
,
3238 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3239 if (gdbarch_debug
>= 2)
3240 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3241 return gdbarch
->call_dummy_stack_adjust
;
3245 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3246 int call_dummy_stack_adjust
)
3248 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3252 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
)
3254 if (gdbarch
->fix_call_dummy
== 0)
3255 internal_error (__FILE__
, __LINE__
,
3256 "gdbarch: gdbarch_fix_call_dummy invalid");
3257 if (gdbarch_debug
>= 2)
3258 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3259 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3263 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3264 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3266 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3270 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3272 if (gdbarch_debug
>= 2)
3273 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3274 return gdbarch
->believe_pcc_promotion
;
3278 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3279 int believe_pcc_promotion
)
3281 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3285 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3287 if (gdbarch_debug
>= 2)
3288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3289 return gdbarch
->believe_pcc_promotion_type
;
3293 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3294 int believe_pcc_promotion_type
)
3296 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3300 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3302 if (gdbarch
->coerce_float_to_double
== 0)
3303 internal_error (__FILE__
, __LINE__
,
3304 "gdbarch: gdbarch_coerce_float_to_double invalid");
3305 if (gdbarch_debug
>= 2)
3306 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3307 return gdbarch
->coerce_float_to_double (formal
, actual
);
3311 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3312 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3314 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3318 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
)
3320 if (gdbarch
->get_saved_register
== 0)
3321 internal_error (__FILE__
, __LINE__
,
3322 "gdbarch: gdbarch_get_saved_register invalid");
3323 if (gdbarch_debug
>= 2)
3324 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3325 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3329 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3330 gdbarch_get_saved_register_ftype get_saved_register
)
3332 gdbarch
->get_saved_register
= get_saved_register
;
3336 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3338 if (gdbarch
->register_convertible
== 0)
3339 internal_error (__FILE__
, __LINE__
,
3340 "gdbarch: gdbarch_register_convertible invalid");
3341 if (gdbarch_debug
>= 2)
3342 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3343 return gdbarch
->register_convertible (nr
);
3347 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3348 gdbarch_register_convertible_ftype register_convertible
)
3350 gdbarch
->register_convertible
= register_convertible
;
3354 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3356 if (gdbarch
->register_convert_to_virtual
== 0)
3357 internal_error (__FILE__
, __LINE__
,
3358 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3359 if (gdbarch_debug
>= 2)
3360 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3361 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3365 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3366 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3368 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3372 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3374 if (gdbarch
->register_convert_to_raw
== 0)
3375 internal_error (__FILE__
, __LINE__
,
3376 "gdbarch: gdbarch_register_convert_to_raw invalid");
3377 if (gdbarch_debug
>= 2)
3378 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3379 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3383 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3384 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3386 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3390 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3392 if (gdbarch
->fetch_pseudo_register
== 0)
3393 internal_error (__FILE__
, __LINE__
,
3394 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3395 if (gdbarch_debug
>= 2)
3396 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3397 gdbarch
->fetch_pseudo_register (regnum
);
3401 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3402 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3404 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3408 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3410 if (gdbarch
->store_pseudo_register
== 0)
3411 internal_error (__FILE__
, __LINE__
,
3412 "gdbarch: gdbarch_store_pseudo_register invalid");
3413 if (gdbarch_debug
>= 2)
3414 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3415 gdbarch
->store_pseudo_register (regnum
);
3419 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3420 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3422 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3426 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3428 if (gdbarch
->pointer_to_address
== 0)
3429 internal_error (__FILE__
, __LINE__
,
3430 "gdbarch: gdbarch_pointer_to_address invalid");
3431 if (gdbarch_debug
>= 2)
3432 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3433 return gdbarch
->pointer_to_address (type
, buf
);
3437 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3438 gdbarch_pointer_to_address_ftype pointer_to_address
)
3440 gdbarch
->pointer_to_address
= pointer_to_address
;
3444 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3446 if (gdbarch
->address_to_pointer
== 0)
3447 internal_error (__FILE__
, __LINE__
,
3448 "gdbarch: gdbarch_address_to_pointer invalid");
3449 if (gdbarch_debug
>= 2)
3450 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3451 gdbarch
->address_to_pointer (type
, buf
, addr
);
3455 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3456 gdbarch_address_to_pointer_ftype address_to_pointer
)
3458 gdbarch
->address_to_pointer
= address_to_pointer
;
3462 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3464 if (gdbarch
->return_value_on_stack
== 0)
3465 internal_error (__FILE__
, __LINE__
,
3466 "gdbarch: gdbarch_return_value_on_stack invalid");
3467 if (gdbarch_debug
>= 2)
3468 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3469 return gdbarch
->return_value_on_stack (type
);
3473 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3474 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3476 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3480 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3482 if (gdbarch
->extract_return_value
== 0)
3483 internal_error (__FILE__
, __LINE__
,
3484 "gdbarch: gdbarch_extract_return_value invalid");
3485 if (gdbarch_debug
>= 2)
3486 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3487 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3491 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3492 gdbarch_extract_return_value_ftype extract_return_value
)
3494 gdbarch
->extract_return_value
= extract_return_value
;
3498 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3500 if (gdbarch
->push_arguments
== 0)
3501 internal_error (__FILE__
, __LINE__
,
3502 "gdbarch: gdbarch_push_arguments invalid");
3503 if (gdbarch_debug
>= 2)
3504 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3505 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3509 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3510 gdbarch_push_arguments_ftype push_arguments
)
3512 gdbarch
->push_arguments
= push_arguments
;
3516 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3518 if (gdbarch
->push_dummy_frame
== 0)
3519 internal_error (__FILE__
, __LINE__
,
3520 "gdbarch: gdbarch_push_dummy_frame invalid");
3521 if (gdbarch_debug
>= 2)
3522 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3523 gdbarch
->push_dummy_frame ();
3527 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3528 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3530 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3534 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3536 if (gdbarch
->push_return_address
== 0)
3537 internal_error (__FILE__
, __LINE__
,
3538 "gdbarch: gdbarch_push_return_address invalid");
3539 if (gdbarch_debug
>= 2)
3540 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3541 return gdbarch
->push_return_address (pc
, sp
);
3545 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3546 gdbarch_push_return_address_ftype push_return_address
)
3548 gdbarch
->push_return_address
= push_return_address
;
3552 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3554 if (gdbarch
->pop_frame
== 0)
3555 internal_error (__FILE__
, __LINE__
,
3556 "gdbarch: gdbarch_pop_frame invalid");
3557 if (gdbarch_debug
>= 2)
3558 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3559 gdbarch
->pop_frame ();
3563 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3564 gdbarch_pop_frame_ftype pop_frame
)
3566 gdbarch
->pop_frame
= pop_frame
;
3570 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3572 if (gdbarch
->d10v_make_daddr
== 0)
3573 internal_error (__FILE__
, __LINE__
,
3574 "gdbarch: gdbarch_d10v_make_daddr invalid");
3575 if (gdbarch_debug
>= 2)
3576 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3577 return gdbarch
->d10v_make_daddr (x
);
3581 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3582 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3584 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3588 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3590 if (gdbarch
->d10v_make_iaddr
== 0)
3591 internal_error (__FILE__
, __LINE__
,
3592 "gdbarch: gdbarch_d10v_make_iaddr invalid");
3593 if (gdbarch_debug
>= 2)
3594 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3595 return gdbarch
->d10v_make_iaddr (x
);
3599 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3600 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3602 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3606 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3608 if (gdbarch
->d10v_daddr_p
== 0)
3609 internal_error (__FILE__
, __LINE__
,
3610 "gdbarch: gdbarch_d10v_daddr_p invalid");
3611 if (gdbarch_debug
>= 2)
3612 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3613 return gdbarch
->d10v_daddr_p (x
);
3617 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3618 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3620 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3624 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3626 if (gdbarch
->d10v_iaddr_p
== 0)
3627 internal_error (__FILE__
, __LINE__
,
3628 "gdbarch: gdbarch_d10v_iaddr_p invalid");
3629 if (gdbarch_debug
>= 2)
3630 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3631 return gdbarch
->d10v_iaddr_p (x
);
3635 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3636 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3638 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3642 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3644 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3645 internal_error (__FILE__
, __LINE__
,
3646 "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3647 if (gdbarch_debug
>= 2)
3648 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3649 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3653 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3654 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3656 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3660 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3662 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3663 internal_error (__FILE__
, __LINE__
,
3664 "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3665 if (gdbarch_debug
>= 2)
3666 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3667 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3671 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3672 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3674 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3678 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3680 if (gdbarch
->store_struct_return
== 0)
3681 internal_error (__FILE__
, __LINE__
,
3682 "gdbarch: gdbarch_store_struct_return invalid");
3683 if (gdbarch_debug
>= 2)
3684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3685 gdbarch
->store_struct_return (addr
, sp
);
3689 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3690 gdbarch_store_struct_return_ftype store_struct_return
)
3692 gdbarch
->store_struct_return
= store_struct_return
;
3696 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3698 if (gdbarch
->store_return_value
== 0)
3699 internal_error (__FILE__
, __LINE__
,
3700 "gdbarch: gdbarch_store_return_value invalid");
3701 if (gdbarch_debug
>= 2)
3702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3703 gdbarch
->store_return_value (type
, valbuf
);
3707 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3708 gdbarch_store_return_value_ftype store_return_value
)
3710 gdbarch
->store_return_value
= store_return_value
;
3714 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3716 return gdbarch
->extract_struct_value_address
!= 0;
3720 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3722 if (gdbarch
->extract_struct_value_address
== 0)
3723 internal_error (__FILE__
, __LINE__
,
3724 "gdbarch: gdbarch_extract_struct_value_address invalid");
3725 if (gdbarch_debug
>= 2)
3726 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3727 return gdbarch
->extract_struct_value_address (regbuf
);
3731 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3732 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3734 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3738 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3740 if (gdbarch
->use_struct_convention
== 0)
3741 internal_error (__FILE__
, __LINE__
,
3742 "gdbarch: gdbarch_use_struct_convention invalid");
3743 if (gdbarch_debug
>= 2)
3744 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3745 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3749 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3750 gdbarch_use_struct_convention_ftype use_struct_convention
)
3752 gdbarch
->use_struct_convention
= use_struct_convention
;
3756 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3758 if (gdbarch
->frame_init_saved_regs
== 0)
3759 internal_error (__FILE__
, __LINE__
,
3760 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3761 if (gdbarch_debug
>= 2)
3762 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3763 gdbarch
->frame_init_saved_regs (frame
);
3767 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3768 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3770 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3774 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3776 if (gdbarch
->init_extra_frame_info
== 0)
3777 internal_error (__FILE__
, __LINE__
,
3778 "gdbarch: gdbarch_init_extra_frame_info invalid");
3779 if (gdbarch_debug
>= 2)
3780 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3781 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3785 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3786 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3788 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3792 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3794 if (gdbarch
->skip_prologue
== 0)
3795 internal_error (__FILE__
, __LINE__
,
3796 "gdbarch: gdbarch_skip_prologue invalid");
3797 if (gdbarch_debug
>= 2)
3798 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3799 return gdbarch
->skip_prologue (ip
);
3803 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3804 gdbarch_skip_prologue_ftype skip_prologue
)
3806 gdbarch
->skip_prologue
= skip_prologue
;
3810 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3812 if (gdbarch
->prologue_frameless_p
== 0)
3813 internal_error (__FILE__
, __LINE__
,
3814 "gdbarch: gdbarch_prologue_frameless_p invalid");
3815 if (gdbarch_debug
>= 2)
3816 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3817 return gdbarch
->prologue_frameless_p (ip
);
3821 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3822 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3824 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3828 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3830 if (gdbarch
->inner_than
== 0)
3831 internal_error (__FILE__
, __LINE__
,
3832 "gdbarch: gdbarch_inner_than invalid");
3833 if (gdbarch_debug
>= 2)
3834 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3835 return gdbarch
->inner_than (lhs
, rhs
);
3839 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3840 gdbarch_inner_than_ftype inner_than
)
3842 gdbarch
->inner_than
= inner_than
;
3846 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3848 if (gdbarch
->breakpoint_from_pc
== 0)
3849 internal_error (__FILE__
, __LINE__
,
3850 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3851 if (gdbarch_debug
>= 2)
3852 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3853 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3857 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3858 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3860 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3864 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3866 if (gdbarch
->memory_insert_breakpoint
== 0)
3867 internal_error (__FILE__
, __LINE__
,
3868 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3869 if (gdbarch_debug
>= 2)
3870 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3871 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3875 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3876 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3878 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3882 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3884 if (gdbarch
->memory_remove_breakpoint
== 0)
3885 internal_error (__FILE__
, __LINE__
,
3886 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3887 if (gdbarch_debug
>= 2)
3888 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3889 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3893 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3894 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3896 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3900 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3902 if (gdbarch
->decr_pc_after_break
== -1)
3903 internal_error (__FILE__
, __LINE__
,
3904 "gdbarch: gdbarch_decr_pc_after_break invalid");
3905 if (gdbarch_debug
>= 2)
3906 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3907 return gdbarch
->decr_pc_after_break
;
3911 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3912 CORE_ADDR decr_pc_after_break
)
3914 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3918 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3920 if (gdbarch
->prepare_to_proceed
== 0)
3921 internal_error (__FILE__
, __LINE__
,
3922 "gdbarch: gdbarch_prepare_to_proceed invalid");
3923 if (gdbarch_debug
>= 2)
3924 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3925 return gdbarch
->prepare_to_proceed (select_it
);
3929 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3930 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3932 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3936 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3938 if (gdbarch
->function_start_offset
== -1)
3939 internal_error (__FILE__
, __LINE__
,
3940 "gdbarch: gdbarch_function_start_offset invalid");
3941 if (gdbarch_debug
>= 2)
3942 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3943 return gdbarch
->function_start_offset
;
3947 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3948 CORE_ADDR function_start_offset
)
3950 gdbarch
->function_start_offset
= function_start_offset
;
3954 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3956 if (gdbarch
->remote_translate_xfer_address
== 0)
3957 internal_error (__FILE__
, __LINE__
,
3958 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3959 if (gdbarch_debug
>= 2)
3960 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3961 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3965 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3966 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3968 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3972 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3974 if (gdbarch
->frame_args_skip
== -1)
3975 internal_error (__FILE__
, __LINE__
,
3976 "gdbarch: gdbarch_frame_args_skip invalid");
3977 if (gdbarch_debug
>= 2)
3978 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3979 return gdbarch
->frame_args_skip
;
3983 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3984 CORE_ADDR frame_args_skip
)
3986 gdbarch
->frame_args_skip
= frame_args_skip
;
3990 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3992 if (gdbarch
->frameless_function_invocation
== 0)
3993 internal_error (__FILE__
, __LINE__
,
3994 "gdbarch: gdbarch_frameless_function_invocation invalid");
3995 if (gdbarch_debug
>= 2)
3996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3997 return gdbarch
->frameless_function_invocation (fi
);
4001 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
4002 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
4004 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
4008 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4010 if (gdbarch
->frame_chain
== 0)
4011 internal_error (__FILE__
, __LINE__
,
4012 "gdbarch: gdbarch_frame_chain invalid");
4013 if (gdbarch_debug
>= 2)
4014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
4015 return gdbarch
->frame_chain (frame
);
4019 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4020 gdbarch_frame_chain_ftype frame_chain
)
4022 gdbarch
->frame_chain
= frame_chain
;
4026 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4028 if (gdbarch
->frame_chain_valid
== 0)
4029 internal_error (__FILE__
, __LINE__
,
4030 "gdbarch: gdbarch_frame_chain_valid invalid");
4031 if (gdbarch_debug
>= 2)
4032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4033 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4037 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4038 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4040 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4044 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4046 if (gdbarch
->frame_saved_pc
== 0)
4047 internal_error (__FILE__
, __LINE__
,
4048 "gdbarch: gdbarch_frame_saved_pc invalid");
4049 if (gdbarch_debug
>= 2)
4050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4051 return gdbarch
->frame_saved_pc (fi
);
4055 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4056 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4058 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4062 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4064 if (gdbarch
->frame_args_address
== 0)
4065 internal_error (__FILE__
, __LINE__
,
4066 "gdbarch: gdbarch_frame_args_address invalid");
4067 if (gdbarch_debug
>= 2)
4068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4069 return gdbarch
->frame_args_address (fi
);
4073 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4074 gdbarch_frame_args_address_ftype frame_args_address
)
4076 gdbarch
->frame_args_address
= frame_args_address
;
4080 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4082 if (gdbarch
->frame_locals_address
== 0)
4083 internal_error (__FILE__
, __LINE__
,
4084 "gdbarch: gdbarch_frame_locals_address invalid");
4085 if (gdbarch_debug
>= 2)
4086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4087 return gdbarch
->frame_locals_address (fi
);
4091 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4092 gdbarch_frame_locals_address_ftype frame_locals_address
)
4094 gdbarch
->frame_locals_address
= frame_locals_address
;
4098 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4100 if (gdbarch
->saved_pc_after_call
== 0)
4101 internal_error (__FILE__
, __LINE__
,
4102 "gdbarch: gdbarch_saved_pc_after_call invalid");
4103 if (gdbarch_debug
>= 2)
4104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4105 return gdbarch
->saved_pc_after_call (frame
);
4109 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4110 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4112 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4116 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4118 if (gdbarch
->frame_num_args
== 0)
4119 internal_error (__FILE__
, __LINE__
,
4120 "gdbarch: gdbarch_frame_num_args invalid");
4121 if (gdbarch_debug
>= 2)
4122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4123 return gdbarch
->frame_num_args (frame
);
4127 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4128 gdbarch_frame_num_args_ftype frame_num_args
)
4130 gdbarch
->frame_num_args
= frame_num_args
;
4134 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4136 return gdbarch
->stack_align
!= 0;
4140 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4142 if (gdbarch
->stack_align
== 0)
4143 internal_error (__FILE__
, __LINE__
,
4144 "gdbarch: gdbarch_stack_align invalid");
4145 if (gdbarch_debug
>= 2)
4146 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4147 return gdbarch
->stack_align (sp
);
4151 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4152 gdbarch_stack_align_ftype stack_align
)
4154 gdbarch
->stack_align
= stack_align
;
4158 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4160 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4161 if (gdbarch_debug
>= 2)
4162 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4163 return gdbarch
->extra_stack_alignment_needed
;
4167 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4168 int extra_stack_alignment_needed
)
4170 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4174 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4176 return gdbarch
->reg_struct_has_addr
!= 0;
4180 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4182 if (gdbarch
->reg_struct_has_addr
== 0)
4183 internal_error (__FILE__
, __LINE__
,
4184 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4185 if (gdbarch_debug
>= 2)
4186 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4187 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4191 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4192 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4194 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4198 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4200 return gdbarch
->save_dummy_frame_tos
!= 0;
4204 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4206 if (gdbarch
->save_dummy_frame_tos
== 0)
4207 internal_error (__FILE__
, __LINE__
,
4208 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4209 if (gdbarch_debug
>= 2)
4210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4211 gdbarch
->save_dummy_frame_tos (sp
);
4215 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4216 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4218 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4222 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4224 if (gdbarch_debug
>= 2)
4225 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4226 return gdbarch
->parm_boundary
;
4230 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4233 gdbarch
->parm_boundary
= parm_boundary
;
4236 const struct floatformat
*
4237 gdbarch_float_format (struct gdbarch
*gdbarch
)
4239 if (gdbarch_debug
>= 2)
4240 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4241 return gdbarch
->float_format
;
4245 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4246 const struct floatformat
* float_format
)
4248 gdbarch
->float_format
= float_format
;
4251 const struct floatformat
*
4252 gdbarch_double_format (struct gdbarch
*gdbarch
)
4254 if (gdbarch_debug
>= 2)
4255 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4256 return gdbarch
->double_format
;
4260 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4261 const struct floatformat
* double_format
)
4263 gdbarch
->double_format
= double_format
;
4266 const struct floatformat
*
4267 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4269 if (gdbarch_debug
>= 2)
4270 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4271 return gdbarch
->long_double_format
;
4275 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4276 const struct floatformat
* long_double_format
)
4278 gdbarch
->long_double_format
= long_double_format
;
4282 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4284 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4285 internal_error (__FILE__
, __LINE__
,
4286 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4287 if (gdbarch_debug
>= 2)
4288 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4289 return gdbarch
->convert_from_func_ptr_addr (addr
);
4293 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4294 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4296 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4300 gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4302 if (gdbarch
->addr_bits_remove
== 0)
4303 internal_error (__FILE__
, __LINE__
,
4304 "gdbarch: gdbarch_addr_bits_remove invalid");
4305 if (gdbarch_debug
>= 2)
4306 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bits_remove called\n");
4307 return gdbarch
->addr_bits_remove (addr
);
4311 set_gdbarch_addr_bits_remove (struct gdbarch
*gdbarch
,
4312 gdbarch_addr_bits_remove_ftype addr_bits_remove
)
4314 gdbarch
->addr_bits_remove
= addr_bits_remove
;
4318 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4320 return gdbarch
->software_single_step
!= 0;
4324 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4326 if (gdbarch
->software_single_step
== 0)
4327 internal_error (__FILE__
, __LINE__
,
4328 "gdbarch: gdbarch_software_single_step invalid");
4329 if (gdbarch_debug
>= 2)
4330 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4331 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4335 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4336 gdbarch_software_single_step_ftype software_single_step
)
4338 gdbarch
->software_single_step
= software_single_step
;
4342 /* Keep a registry of per-architecture data-pointers required by GDB
4348 gdbarch_data_init_ftype
*init
;
4349 gdbarch_data_free_ftype
*free
;
4352 struct gdbarch_data_registration
4354 struct gdbarch_data
*data
;
4355 struct gdbarch_data_registration
*next
;
4358 struct gdbarch_data_registry
4361 struct gdbarch_data_registration
*registrations
;
4364 struct gdbarch_data_registry gdbarch_data_registry
=
4369 struct gdbarch_data
*
4370 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4371 gdbarch_data_free_ftype
*free
)
4373 struct gdbarch_data_registration
**curr
;
4374 for (curr
= &gdbarch_data_registry
.registrations
;
4376 curr
= &(*curr
)->next
);
4377 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4378 (*curr
)->next
= NULL
;
4379 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4380 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4381 (*curr
)->data
->init
= init
;
4382 (*curr
)->data
->free
= free
;
4383 return (*curr
)->data
;
4387 /* Walk through all the registered users initializing each in turn. */
4390 init_gdbarch_data (struct gdbarch
*gdbarch
)
4392 struct gdbarch_data_registration
*rego
;
4393 for (rego
= gdbarch_data_registry
.registrations
;
4397 struct gdbarch_data
*data
= rego
->data
;
4398 gdb_assert (data
->index
< gdbarch
->nr_data
);
4399 if (data
->init
!= NULL
)
4401 void *pointer
= data
->init (gdbarch
);
4402 set_gdbarch_data (gdbarch
, data
, pointer
);
4407 /* Create/delete the gdbarch data vector. */
4410 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4412 gdb_assert (gdbarch
->data
== NULL
);
4413 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4414 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4418 free_gdbarch_data (struct gdbarch
*gdbarch
)
4420 struct gdbarch_data_registration
*rego
;
4421 gdb_assert (gdbarch
->data
!= NULL
);
4422 for (rego
= gdbarch_data_registry
.registrations
;
4426 struct gdbarch_data
*data
= rego
->data
;
4427 gdb_assert (data
->index
< gdbarch
->nr_data
);
4428 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4430 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4431 gdbarch
->data
[data
->index
] = NULL
;
4434 xfree (gdbarch
->data
);
4435 gdbarch
->data
= NULL
;
4439 /* Initialize the current value of thee specified per-architecture
4443 set_gdbarch_data (struct gdbarch
*gdbarch
,
4444 struct gdbarch_data
*data
,
4447 gdb_assert (data
->index
< gdbarch
->nr_data
);
4448 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4449 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4450 gdbarch
->data
[data
->index
] = pointer
;
4453 /* Return the current value of the specified per-architecture
4457 gdbarch_data (struct gdbarch_data
*data
)
4459 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4460 return current_gdbarch
->data
[data
->index
];
4465 /* Keep a registry of swapped data required by GDB modules. */
4470 struct gdbarch_swap_registration
*source
;
4471 struct gdbarch_swap
*next
;
4474 struct gdbarch_swap_registration
4477 unsigned long sizeof_data
;
4478 gdbarch_swap_ftype
*init
;
4479 struct gdbarch_swap_registration
*next
;
4482 struct gdbarch_swap_registry
4485 struct gdbarch_swap_registration
*registrations
;
4488 struct gdbarch_swap_registry gdbarch_swap_registry
=
4494 register_gdbarch_swap (void *data
,
4495 unsigned long sizeof_data
,
4496 gdbarch_swap_ftype
*init
)
4498 struct gdbarch_swap_registration
**rego
;
4499 for (rego
= &gdbarch_swap_registry
.registrations
;
4501 rego
= &(*rego
)->next
);
4502 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4503 (*rego
)->next
= NULL
;
4504 (*rego
)->init
= init
;
4505 (*rego
)->data
= data
;
4506 (*rego
)->sizeof_data
= sizeof_data
;
4511 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4513 struct gdbarch_swap_registration
*rego
;
4514 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4515 for (rego
= gdbarch_swap_registry
.registrations
;
4519 if (rego
->data
!= NULL
)
4521 (*curr
) = XMALLOC (struct gdbarch_swap
);
4522 (*curr
)->source
= rego
;
4523 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4524 (*curr
)->next
= NULL
;
4525 memset (rego
->data
, 0, rego
->sizeof_data
);
4526 curr
= &(*curr
)->next
;
4528 if (rego
->init
!= NULL
)
4534 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4536 struct gdbarch_swap
*curr
;
4537 for (curr
= gdbarch
->swap
;
4540 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4544 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4546 struct gdbarch_swap
*curr
;
4547 for (curr
= gdbarch
->swap
;
4550 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4554 /* Keep a registry of the architectures known by GDB. */
4556 struct gdbarch_registration
4558 enum bfd_architecture bfd_architecture
;
4559 gdbarch_init_ftype
*init
;
4560 gdbarch_dump_tdep_ftype
*dump_tdep
;
4561 struct gdbarch_list
*arches
;
4562 struct gdbarch_registration
*next
;
4565 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4568 append_name (const char ***buf
, int *nr
, const char *name
)
4570 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4576 gdbarch_printable_names (void)
4580 /* Accumulate a list of names based on the registed list of
4582 enum bfd_architecture a
;
4584 const char **arches
= NULL
;
4585 struct gdbarch_registration
*rego
;
4586 for (rego
= gdbarch_registry
;
4590 const struct bfd_arch_info
*ap
;
4591 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4593 internal_error (__FILE__
, __LINE__
,
4594 "gdbarch_architecture_names: multi-arch unknown");
4597 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4602 append_name (&arches
, &nr_arches
, NULL
);
4606 /* Just return all the architectures that BFD knows. Assume that
4607 the legacy architecture framework supports them. */
4608 return bfd_arch_list ();
4613 gdbarch_register (enum bfd_architecture bfd_architecture
,
4614 gdbarch_init_ftype
*init
,
4615 gdbarch_dump_tdep_ftype
*dump_tdep
)
4617 struct gdbarch_registration
**curr
;
4618 const struct bfd_arch_info
*bfd_arch_info
;
4619 /* Check that BFD recognizes this architecture */
4620 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4621 if (bfd_arch_info
== NULL
)
4623 internal_error (__FILE__
, __LINE__
,
4624 "gdbarch: Attempt to register unknown architecture (%d)",
4627 /* Check that we haven't seen this architecture before */
4628 for (curr
= &gdbarch_registry
;
4630 curr
= &(*curr
)->next
)
4632 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4633 internal_error (__FILE__
, __LINE__
,
4634 "gdbarch: Duplicate registraration of architecture (%s)",
4635 bfd_arch_info
->printable_name
);
4639 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4640 bfd_arch_info
->printable_name
,
4643 (*curr
) = XMALLOC (struct gdbarch_registration
);
4644 (*curr
)->bfd_architecture
= bfd_architecture
;
4645 (*curr
)->init
= init
;
4646 (*curr
)->dump_tdep
= dump_tdep
;
4647 (*curr
)->arches
= NULL
;
4648 (*curr
)->next
= NULL
;
4649 /* When non- multi-arch, install whatever target dump routine we've
4650 been provided - hopefully that routine has been written correctly
4651 and works regardless of multi-arch. */
4652 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4653 && startup_gdbarch
.dump_tdep
== NULL
)
4654 startup_gdbarch
.dump_tdep
= dump_tdep
;
4658 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4659 gdbarch_init_ftype
*init
)
4661 gdbarch_register (bfd_architecture
, init
, NULL
);
4665 /* Look for an architecture using gdbarch_info. Base search on only
4666 BFD_ARCH_INFO and BYTE_ORDER. */
4668 struct gdbarch_list
*
4669 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4670 const struct gdbarch_info
*info
)
4672 for (; arches
!= NULL
; arches
= arches
->next
)
4674 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4676 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4684 /* Update the current architecture. Return ZERO if the update request
4688 gdbarch_update_p (struct gdbarch_info info
)
4690 struct gdbarch
*new_gdbarch
;
4691 struct gdbarch_list
**list
;
4692 struct gdbarch_registration
*rego
;
4694 /* Fill in missing parts of the INFO struct using a number of
4695 sources: ``set ...''; INFOabfd supplied; existing target. */
4697 /* ``(gdb) set architecture ...'' */
4698 if (info
.bfd_arch_info
== NULL
4699 && !TARGET_ARCHITECTURE_AUTO
)
4700 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4701 if (info
.bfd_arch_info
== NULL
4702 && info
.abfd
!= NULL
4703 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4704 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4705 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4706 if (info
.bfd_arch_info
== NULL
)
4707 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4709 /* ``(gdb) set byte-order ...'' */
4710 if (info
.byte_order
== 0
4711 && !TARGET_BYTE_ORDER_AUTO
)
4712 info
.byte_order
= TARGET_BYTE_ORDER
;
4713 /* From the INFO struct. */
4714 if (info
.byte_order
== 0
4715 && info
.abfd
!= NULL
)
4716 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4717 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4719 /* From the current target. */
4720 if (info
.byte_order
== 0)
4721 info
.byte_order
= TARGET_BYTE_ORDER
;
4723 /* Must have found some sort of architecture. */
4724 gdb_assert (info
.bfd_arch_info
!= NULL
);
4728 fprintf_unfiltered (gdb_stdlog
,
4729 "gdbarch_update: info.bfd_arch_info %s\n",
4730 (info
.bfd_arch_info
!= NULL
4731 ? info
.bfd_arch_info
->printable_name
4733 fprintf_unfiltered (gdb_stdlog
,
4734 "gdbarch_update: info.byte_order %d (%s)\n",
4736 (info
.byte_order
== BIG_ENDIAN
? "big"
4737 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4739 fprintf_unfiltered (gdb_stdlog
,
4740 "gdbarch_update: info.abfd 0x%lx\n",
4742 fprintf_unfiltered (gdb_stdlog
,
4743 "gdbarch_update: info.tdep_info 0x%lx\n",
4744 (long) info
.tdep_info
);
4747 /* Find the target that knows about this architecture. */
4748 for (rego
= gdbarch_registry
;
4751 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4756 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4760 /* Ask the target for a replacement architecture. */
4761 new_gdbarch
= rego
->init (info
, rego
->arches
);
4763 /* Did the target like it? No. Reject the change. */
4764 if (new_gdbarch
== NULL
)
4767 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4771 /* Did the architecture change? No. Do nothing. */
4772 if (current_gdbarch
== new_gdbarch
)
4775 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4777 new_gdbarch
->bfd_arch_info
->printable_name
);
4781 /* Swap all data belonging to the old target out */
4782 swapout_gdbarch_swap (current_gdbarch
);
4784 /* Is this a pre-existing architecture? Yes. Swap it in. */
4785 for (list
= ®o
->arches
;
4787 list
= &(*list
)->next
)
4789 if ((*list
)->gdbarch
== new_gdbarch
)
4792 fprintf_unfiltered (gdb_stdlog
,
4793 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4795 new_gdbarch
->bfd_arch_info
->printable_name
);
4796 current_gdbarch
= new_gdbarch
;
4797 swapin_gdbarch_swap (new_gdbarch
);
4802 /* Append this new architecture to this targets list. */
4803 (*list
) = XMALLOC (struct gdbarch_list
);
4804 (*list
)->next
= NULL
;
4805 (*list
)->gdbarch
= new_gdbarch
;
4807 /* Switch to this new architecture. Dump it out. */
4808 current_gdbarch
= new_gdbarch
;
4811 fprintf_unfiltered (gdb_stdlog
,
4812 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4814 new_gdbarch
->bfd_arch_info
->printable_name
);
4817 /* Check that the newly installed architecture is valid. Plug in
4818 any post init values. */
4819 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4820 verify_gdbarch (new_gdbarch
);
4822 /* Initialize the per-architecture memory (swap) areas.
4823 CURRENT_GDBARCH must be update before these modules are
4825 init_gdbarch_swap (new_gdbarch
);
4827 /* Initialize the per-architecture data-pointer of all parties that
4828 registered an interest in this architecture. CURRENT_GDBARCH
4829 must be updated before these modules are called. */
4830 init_gdbarch_data (new_gdbarch
);
4833 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4841 /* Pointer to the target-dependent disassembly function. */
4842 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4843 disassemble_info tm_print_insn_info
;
4846 extern void _initialize_gdbarch (void);
4849 _initialize_gdbarch (void)
4851 struct cmd_list_element
*c
;
4853 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4854 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4855 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4856 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4857 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4859 add_show_from_set (add_set_cmd ("arch",
4862 (char *)&gdbarch_debug
,
4863 "Set architecture debugging.\n\
4864 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4866 c
= add_set_cmd ("archdebug",
4869 (char *)&gdbarch_debug
,
4870 "Set architecture debugging.\n\
4871 When non-zero, architecture debugging is enabled.", &setlist
);
4873 deprecate_cmd (c
, "set debug arch");
4874 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");