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_software_single_step_ftype
*software_single_step
;
254 /* The default architecture uses host values (for want of a better
257 extern const struct bfd_arch_info bfd_default_arch_struct
;
259 struct gdbarch startup_gdbarch
=
261 /* basic architecture information */
262 &bfd_default_arch_struct
,
264 /* target specific vector and its dump routine */
266 /*per-architecture data-pointers and swap regions */
268 /* Multi-arch values */
272 8 * sizeof (LONGEST
),
275 8 * sizeof (long double),
330 generic_get_saved_register
,
385 /* startup_gdbarch() */
388 struct gdbarch
*current_gdbarch
= &startup_gdbarch
;
390 /* Do any initialization needed for a non-multiarch configuration
391 after the _initialize_MODULE functions have been run. */
393 initialize_non_multiarch ()
395 alloc_gdbarch_data (&startup_gdbarch
);
396 init_gdbarch_data (&startup_gdbarch
);
400 /* Create a new ``struct gdbarch'' based on information provided by
401 ``struct gdbarch_info''. */
404 gdbarch_alloc (const struct gdbarch_info
*info
,
405 struct gdbarch_tdep
*tdep
)
407 struct gdbarch
*gdbarch
= XMALLOC (struct gdbarch
);
408 memset (gdbarch
, 0, sizeof (*gdbarch
));
410 alloc_gdbarch_data (gdbarch
);
412 gdbarch
->tdep
= tdep
;
414 gdbarch
->bfd_arch_info
= info
->bfd_arch_info
;
415 gdbarch
->byte_order
= info
->byte_order
;
417 /* Force the explicit initialization of these. */
418 gdbarch
->short_bit
= 2*TARGET_CHAR_BIT
;
419 gdbarch
->int_bit
= 4*TARGET_CHAR_BIT
;
420 gdbarch
->long_bit
= 4*TARGET_CHAR_BIT
;
421 gdbarch
->long_long_bit
= 2*TARGET_LONG_BIT
;
422 gdbarch
->float_bit
= 4*TARGET_CHAR_BIT
;
423 gdbarch
->double_bit
= 8*TARGET_CHAR_BIT
;
424 gdbarch
->long_double_bit
= 2*TARGET_DOUBLE_BIT
;
425 gdbarch
->ptr_bit
= TARGET_INT_BIT
;
426 gdbarch
->bfd_vma_bit
= TARGET_ARCHITECTURE
->bits_per_address
;
427 gdbarch
->read_pc
= generic_target_read_pc
;
428 gdbarch
->write_pc
= generic_target_write_pc
;
429 gdbarch
->read_fp
= generic_target_read_fp
;
430 gdbarch
->write_fp
= generic_target_write_fp
;
431 gdbarch
->read_sp
= generic_target_read_sp
;
432 gdbarch
->write_sp
= generic_target_write_sp
;
433 gdbarch
->num_regs
= -1;
434 gdbarch
->sp_regnum
= -1;
435 gdbarch
->fp_regnum
= -1;
436 gdbarch
->pc_regnum
= -1;
437 gdbarch
->fp0_regnum
= -1;
438 gdbarch
->npc_regnum
= -1;
439 gdbarch
->nnpc_regnum
= -1;
440 gdbarch
->stab_reg_to_regnum
= no_op_reg_to_regnum
;
441 gdbarch
->ecoff_reg_to_regnum
= no_op_reg_to_regnum
;
442 gdbarch
->dwarf_reg_to_regnum
= no_op_reg_to_regnum
;
443 gdbarch
->sdb_reg_to_regnum
= no_op_reg_to_regnum
;
444 gdbarch
->dwarf2_reg_to_regnum
= no_op_reg_to_regnum
;
445 gdbarch
->register_name
= legacy_register_name
;
446 gdbarch
->register_size
= -1;
447 gdbarch
->register_bytes
= -1;
448 gdbarch
->max_register_raw_size
= -1;
449 gdbarch
->max_register_virtual_size
= -1;
450 gdbarch
->do_registers_info
= do_registers_info
;
451 gdbarch
->register_sim_regno
= default_register_sim_regno
;
452 gdbarch
->use_generic_dummy_frames
= -1;
453 gdbarch
->call_dummy_start_offset
= -1;
454 gdbarch
->call_dummy_breakpoint_offset
= -1;
455 gdbarch
->call_dummy_breakpoint_offset_p
= -1;
456 gdbarch
->call_dummy_length
= -1;
457 gdbarch
->call_dummy_p
= -1;
458 gdbarch
->call_dummy_words
= legacy_call_dummy_words
;
459 gdbarch
->sizeof_call_dummy_words
= legacy_sizeof_call_dummy_words
;
460 gdbarch
->call_dummy_stack_adjust_p
= -1;
461 gdbarch
->coerce_float_to_double
= default_coerce_float_to_double
;
462 gdbarch
->register_convertible
= generic_register_convertible_not
;
463 gdbarch
->pointer_to_address
= unsigned_pointer_to_address
;
464 gdbarch
->address_to_pointer
= unsigned_address_to_pointer
;
465 gdbarch
->return_value_on_stack
= generic_return_value_on_stack_not
;
466 gdbarch
->prologue_frameless_p
= generic_prologue_frameless_p
;
467 gdbarch
->breakpoint_from_pc
= legacy_breakpoint_from_pc
;
468 gdbarch
->memory_insert_breakpoint
= default_memory_insert_breakpoint
;
469 gdbarch
->memory_remove_breakpoint
= default_memory_remove_breakpoint
;
470 gdbarch
->decr_pc_after_break
= -1;
471 gdbarch
->prepare_to_proceed
= default_prepare_to_proceed
;
472 gdbarch
->function_start_offset
= -1;
473 gdbarch
->remote_translate_xfer_address
= generic_remote_translate_xfer_address
;
474 gdbarch
->frame_args_skip
= -1;
475 gdbarch
->frameless_function_invocation
= generic_frameless_function_invocation_not
;
476 gdbarch
->extra_stack_alignment_needed
= 1;
477 gdbarch
->convert_from_func_ptr_addr
= default_convert_from_func_ptr_addr
;
478 /* gdbarch_alloc() */
484 /* Free a gdbarch struct. This should never happen in normal
485 operation --- once you've created a gdbarch, you keep it around.
486 However, if an architecture's init function encounters an error
487 building the structure, it may need to clean up a partially
488 constructed gdbarch. */
491 gdbarch_free (struct gdbarch
*arch
)
493 gdb_assert (arch
!= NULL
);
494 free_gdbarch_data (arch
);
499 /* Ensure that all values in a GDBARCH are reasonable. */
502 verify_gdbarch (struct gdbarch
*gdbarch
)
504 /* Only perform sanity checks on a multi-arch target. */
508 if (gdbarch
->byte_order
== 0)
509 internal_error (__FILE__
, __LINE__
,
510 "verify_gdbarch: byte-order unset");
511 if (gdbarch
->bfd_arch_info
== NULL
)
512 internal_error (__FILE__
, __LINE__
,
513 "verify_gdbarch: bfd_arch_info unset");
514 /* Check those that need to be defined for the given multi-arch level. */
515 /* Skip verify of short_bit, invalid_p == 0 */
516 /* Skip verify of int_bit, invalid_p == 0 */
517 /* Skip verify of long_bit, invalid_p == 0 */
518 /* Skip verify of long_long_bit, invalid_p == 0 */
519 /* Skip verify of float_bit, invalid_p == 0 */
520 /* Skip verify of double_bit, invalid_p == 0 */
521 /* Skip verify of long_double_bit, invalid_p == 0 */
522 /* Skip verify of ptr_bit, invalid_p == 0 */
523 if (gdbarch
->addr_bit
== 0)
524 gdbarch
->addr_bit
= TARGET_PTR_BIT
;
525 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
526 /* Skip verify of ieee_float, invalid_p == 0 */
527 /* Skip verify of read_pc, invalid_p == 0 */
528 /* Skip verify of write_pc, invalid_p == 0 */
529 /* Skip verify of read_fp, invalid_p == 0 */
530 /* Skip verify of write_fp, invalid_p == 0 */
531 /* Skip verify of read_sp, invalid_p == 0 */
532 /* Skip verify of write_sp, invalid_p == 0 */
533 /* Skip verify of register_read, has predicate */
534 /* Skip verify of register_write, has predicate */
535 if ((GDB_MULTI_ARCH
>= 2)
536 && (gdbarch
->num_regs
== -1))
537 internal_error (__FILE__
, __LINE__
,
538 "gdbarch: verify_gdbarch: num_regs invalid");
539 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
540 if ((GDB_MULTI_ARCH
>= 2)
541 && (gdbarch
->sp_regnum
== -1))
542 internal_error (__FILE__
, __LINE__
,
543 "gdbarch: verify_gdbarch: sp_regnum invalid");
544 if ((GDB_MULTI_ARCH
>= 2)
545 && (gdbarch
->fp_regnum
== -1))
546 internal_error (__FILE__
, __LINE__
,
547 "gdbarch: verify_gdbarch: fp_regnum invalid");
548 if ((GDB_MULTI_ARCH
>= 2)
549 && (gdbarch
->pc_regnum
== -1))
550 internal_error (__FILE__
, __LINE__
,
551 "gdbarch: verify_gdbarch: pc_regnum invalid");
552 /* Skip verify of fp0_regnum, invalid_p == 0 */
553 /* Skip verify of npc_regnum, invalid_p == 0 */
554 /* Skip verify of nnpc_regnum, invalid_p == 0 */
555 /* Skip verify of stab_reg_to_regnum, invalid_p == 0 */
556 /* Skip verify of ecoff_reg_to_regnum, invalid_p == 0 */
557 /* Skip verify of dwarf_reg_to_regnum, invalid_p == 0 */
558 /* Skip verify of sdb_reg_to_regnum, invalid_p == 0 */
559 /* Skip verify of dwarf2_reg_to_regnum, invalid_p == 0 */
560 /* Skip verify of register_name, invalid_p == 0 */
561 if ((GDB_MULTI_ARCH
>= 2)
562 && (gdbarch
->register_size
== -1))
563 internal_error (__FILE__
, __LINE__
,
564 "gdbarch: verify_gdbarch: register_size invalid");
565 if ((GDB_MULTI_ARCH
>= 2)
566 && (gdbarch
->register_bytes
== -1))
567 internal_error (__FILE__
, __LINE__
,
568 "gdbarch: verify_gdbarch: register_bytes invalid");
569 if ((GDB_MULTI_ARCH
>= 2)
570 && (gdbarch
->register_byte
== 0))
571 internal_error (__FILE__
, __LINE__
,
572 "gdbarch: verify_gdbarch: register_byte invalid");
573 if ((GDB_MULTI_ARCH
>= 2)
574 && (gdbarch
->register_raw_size
== 0))
575 internal_error (__FILE__
, __LINE__
,
576 "gdbarch: verify_gdbarch: register_raw_size invalid");
577 if ((GDB_MULTI_ARCH
>= 2)
578 && (gdbarch
->max_register_raw_size
== -1))
579 internal_error (__FILE__
, __LINE__
,
580 "gdbarch: verify_gdbarch: max_register_raw_size invalid");
581 if ((GDB_MULTI_ARCH
>= 2)
582 && (gdbarch
->register_virtual_size
== 0))
583 internal_error (__FILE__
, __LINE__
,
584 "gdbarch: verify_gdbarch: register_virtual_size invalid");
585 if ((GDB_MULTI_ARCH
>= 2)
586 && (gdbarch
->max_register_virtual_size
== -1))
587 internal_error (__FILE__
, __LINE__
,
588 "gdbarch: verify_gdbarch: max_register_virtual_size invalid");
589 if ((GDB_MULTI_ARCH
>= 2)
590 && (gdbarch
->register_virtual_type
== 0))
591 internal_error (__FILE__
, __LINE__
,
592 "gdbarch: verify_gdbarch: register_virtual_type invalid");
593 /* Skip verify of do_registers_info, invalid_p == 0 */
594 /* Skip verify of register_sim_regno, invalid_p == 0 */
595 /* Skip verify of register_bytes_ok, has predicate */
596 if ((GDB_MULTI_ARCH
>= 1)
597 && (gdbarch
->use_generic_dummy_frames
== -1))
598 internal_error (__FILE__
, __LINE__
,
599 "gdbarch: verify_gdbarch: use_generic_dummy_frames invalid");
600 if ((GDB_MULTI_ARCH
>= 2)
601 && (gdbarch
->call_dummy_location
== 0))
602 internal_error (__FILE__
, __LINE__
,
603 "gdbarch: verify_gdbarch: call_dummy_location invalid");
604 if ((GDB_MULTI_ARCH
>= 2)
605 && (gdbarch
->call_dummy_location
== AT_ENTRY_POINT
&& gdbarch
->call_dummy_address
== 0))
606 internal_error (__FILE__
, __LINE__
,
607 "gdbarch: verify_gdbarch: call_dummy_address invalid");
608 if ((GDB_MULTI_ARCH
>= 2)
609 && (gdbarch
->call_dummy_start_offset
== -1))
610 internal_error (__FILE__
, __LINE__
,
611 "gdbarch: verify_gdbarch: call_dummy_start_offset invalid");
612 if ((GDB_MULTI_ARCH
>= 2)
613 && (gdbarch
->call_dummy_breakpoint_offset
== -1))
614 internal_error (__FILE__
, __LINE__
,
615 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset invalid");
616 if ((GDB_MULTI_ARCH
>= 1)
617 && (gdbarch
->call_dummy_breakpoint_offset_p
== -1))
618 internal_error (__FILE__
, __LINE__
,
619 "gdbarch: verify_gdbarch: call_dummy_breakpoint_offset_p invalid");
620 if ((GDB_MULTI_ARCH
>= 2)
621 && (gdbarch
->call_dummy_length
== -1))
622 internal_error (__FILE__
, __LINE__
,
623 "gdbarch: verify_gdbarch: call_dummy_length invalid");
624 if ((GDB_MULTI_ARCH
>= 2)
625 && (gdbarch
->pc_in_call_dummy
== 0))
626 internal_error (__FILE__
, __LINE__
,
627 "gdbarch: verify_gdbarch: pc_in_call_dummy invalid");
628 if ((GDB_MULTI_ARCH
>= 1)
629 && (gdbarch
->call_dummy_p
== -1))
630 internal_error (__FILE__
, __LINE__
,
631 "gdbarch: verify_gdbarch: call_dummy_p invalid");
632 /* Skip verify of call_dummy_words, invalid_p == 0 */
633 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
634 if ((GDB_MULTI_ARCH
>= 1)
635 && (gdbarch
->call_dummy_stack_adjust_p
== -1))
636 internal_error (__FILE__
, __LINE__
,
637 "gdbarch: verify_gdbarch: call_dummy_stack_adjust_p invalid");
638 if ((GDB_MULTI_ARCH
>= 2)
639 && (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0))
640 internal_error (__FILE__
, __LINE__
,
641 "gdbarch: verify_gdbarch: call_dummy_stack_adjust invalid");
642 if ((GDB_MULTI_ARCH
>= 2)
643 && (gdbarch
->fix_call_dummy
== 0))
644 internal_error (__FILE__
, __LINE__
,
645 "gdbarch: verify_gdbarch: fix_call_dummy invalid");
646 /* Skip verify of coerce_float_to_double, invalid_p == 0 */
647 if ((GDB_MULTI_ARCH
>= 1)
648 && (gdbarch
->get_saved_register
== 0))
649 internal_error (__FILE__
, __LINE__
,
650 "gdbarch: verify_gdbarch: get_saved_register invalid");
651 /* Skip verify of register_convertible, invalid_p == 0 */
652 /* Skip verify of register_convert_to_virtual, invalid_p == 0 */
653 /* Skip verify of register_convert_to_raw, invalid_p == 0 */
654 /* Skip verify of fetch_pseudo_register, invalid_p == 0 */
655 /* Skip verify of store_pseudo_register, invalid_p == 0 */
656 /* Skip verify of pointer_to_address, invalid_p == 0 */
657 /* Skip verify of address_to_pointer, invalid_p == 0 */
658 /* Skip verify of return_value_on_stack, invalid_p == 0 */
659 if ((GDB_MULTI_ARCH
>= 2)
660 && (gdbarch
->extract_return_value
== 0))
661 internal_error (__FILE__
, __LINE__
,
662 "gdbarch: verify_gdbarch: extract_return_value invalid");
663 if ((GDB_MULTI_ARCH
>= 1)
664 && (gdbarch
->push_arguments
== 0))
665 internal_error (__FILE__
, __LINE__
,
666 "gdbarch: verify_gdbarch: push_arguments invalid");
667 if ((GDB_MULTI_ARCH
>= 2)
668 && (gdbarch
->push_dummy_frame
== 0))
669 internal_error (__FILE__
, __LINE__
,
670 "gdbarch: verify_gdbarch: push_dummy_frame invalid");
671 if ((GDB_MULTI_ARCH
>= 1)
672 && (gdbarch
->push_return_address
== 0))
673 internal_error (__FILE__
, __LINE__
,
674 "gdbarch: verify_gdbarch: push_return_address invalid");
675 if ((GDB_MULTI_ARCH
>= 2)
676 && (gdbarch
->pop_frame
== 0))
677 internal_error (__FILE__
, __LINE__
,
678 "gdbarch: verify_gdbarch: pop_frame invalid");
679 /* Skip verify of d10v_make_daddr, invalid_p == 0 */
680 /* Skip verify of d10v_make_iaddr, invalid_p == 0 */
681 /* Skip verify of d10v_daddr_p, invalid_p == 0 */
682 /* Skip verify of d10v_iaddr_p, invalid_p == 0 */
683 /* Skip verify of d10v_convert_daddr_to_raw, invalid_p == 0 */
684 /* Skip verify of d10v_convert_iaddr_to_raw, invalid_p == 0 */
685 if ((GDB_MULTI_ARCH
>= 2)
686 && (gdbarch
->store_struct_return
== 0))
687 internal_error (__FILE__
, __LINE__
,
688 "gdbarch: verify_gdbarch: store_struct_return invalid");
689 if ((GDB_MULTI_ARCH
>= 2)
690 && (gdbarch
->store_return_value
== 0))
691 internal_error (__FILE__
, __LINE__
,
692 "gdbarch: verify_gdbarch: store_return_value invalid");
693 if ((GDB_MULTI_ARCH
>= 2)
694 && (gdbarch
->extract_struct_value_address
== 0))
695 internal_error (__FILE__
, __LINE__
,
696 "gdbarch: verify_gdbarch: extract_struct_value_address invalid");
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 software_single_step, has predicate */
779 /* Print out the details of the current architecture. */
781 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
782 just happens to match the global variable ``current_gdbarch''. That
783 way macros refering to that variable get the local and not the global
784 version - ulgh. Once everything is parameterised with gdbarch, this
788 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
790 fprintf_unfiltered (file
,
791 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
793 #ifdef TARGET_ARCHITECTURE
794 fprintf_unfiltered (file
,
795 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
796 XSTRING (TARGET_ARCHITECTURE
));
798 #ifdef TARGET_BYTE_ORDER
799 fprintf_unfiltered (file
,
800 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
801 XSTRING (TARGET_BYTE_ORDER
));
803 #ifdef TARGET_SHORT_BIT
804 fprintf_unfiltered (file
,
805 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
806 XSTRING (TARGET_SHORT_BIT
));
808 #ifdef TARGET_INT_BIT
809 fprintf_unfiltered (file
,
810 "gdbarch_dump: TARGET_INT_BIT # %s\n",
811 XSTRING (TARGET_INT_BIT
));
813 #ifdef TARGET_LONG_BIT
814 fprintf_unfiltered (file
,
815 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
816 XSTRING (TARGET_LONG_BIT
));
818 #ifdef TARGET_LONG_LONG_BIT
819 fprintf_unfiltered (file
,
820 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
821 XSTRING (TARGET_LONG_LONG_BIT
));
823 #ifdef TARGET_FLOAT_BIT
824 fprintf_unfiltered (file
,
825 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
826 XSTRING (TARGET_FLOAT_BIT
));
828 #ifdef TARGET_DOUBLE_BIT
829 fprintf_unfiltered (file
,
830 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
831 XSTRING (TARGET_DOUBLE_BIT
));
833 #ifdef TARGET_LONG_DOUBLE_BIT
834 fprintf_unfiltered (file
,
835 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
836 XSTRING (TARGET_LONG_DOUBLE_BIT
));
838 #ifdef TARGET_PTR_BIT
839 fprintf_unfiltered (file
,
840 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
841 XSTRING (TARGET_PTR_BIT
));
843 #ifdef TARGET_ADDR_BIT
844 fprintf_unfiltered (file
,
845 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
846 XSTRING (TARGET_ADDR_BIT
));
848 #ifdef TARGET_BFD_VMA_BIT
849 fprintf_unfiltered (file
,
850 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
851 XSTRING (TARGET_BFD_VMA_BIT
));
854 fprintf_unfiltered (file
,
855 "gdbarch_dump: IEEE_FLOAT # %s\n",
856 XSTRING (IEEE_FLOAT
));
858 #ifdef TARGET_READ_PC
859 fprintf_unfiltered (file
,
860 "gdbarch_dump: %s # %s\n",
861 "TARGET_READ_PC(ptid)",
862 XSTRING (TARGET_READ_PC (ptid
)));
864 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
865 /* Macro might contain `[{}]' when not multi-arch */
866 fprintf_unfiltered (file
,
867 "gdbarch_dump: %s # %s\n",
868 "TARGET_WRITE_PC(val, ptid)",
869 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
871 #ifdef TARGET_READ_FP
872 fprintf_unfiltered (file
,
873 "gdbarch_dump: %s # %s\n",
875 XSTRING (TARGET_READ_FP ()));
877 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
878 /* Macro might contain `[{}]' when not multi-arch */
879 fprintf_unfiltered (file
,
880 "gdbarch_dump: %s # %s\n",
881 "TARGET_WRITE_FP(val)",
882 XSTRING (TARGET_WRITE_FP (val
)));
884 #ifdef TARGET_READ_SP
885 fprintf_unfiltered (file
,
886 "gdbarch_dump: %s # %s\n",
888 XSTRING (TARGET_READ_SP ()));
890 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
891 /* Macro might contain `[{}]' when not multi-arch */
892 fprintf_unfiltered (file
,
893 "gdbarch_dump: %s # %s\n",
894 "TARGET_WRITE_SP(val)",
895 XSTRING (TARGET_WRITE_SP (val
)));
898 fprintf_unfiltered (file
,
899 "gdbarch_dump: NUM_REGS # %s\n",
902 #ifdef NUM_PSEUDO_REGS
903 fprintf_unfiltered (file
,
904 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
905 XSTRING (NUM_PSEUDO_REGS
));
908 fprintf_unfiltered (file
,
909 "gdbarch_dump: SP_REGNUM # %s\n",
910 XSTRING (SP_REGNUM
));
913 fprintf_unfiltered (file
,
914 "gdbarch_dump: FP_REGNUM # %s\n",
915 XSTRING (FP_REGNUM
));
918 fprintf_unfiltered (file
,
919 "gdbarch_dump: PC_REGNUM # %s\n",
920 XSTRING (PC_REGNUM
));
923 fprintf_unfiltered (file
,
924 "gdbarch_dump: FP0_REGNUM # %s\n",
925 XSTRING (FP0_REGNUM
));
928 fprintf_unfiltered (file
,
929 "gdbarch_dump: NPC_REGNUM # %s\n",
930 XSTRING (NPC_REGNUM
));
933 fprintf_unfiltered (file
,
934 "gdbarch_dump: NNPC_REGNUM # %s\n",
935 XSTRING (NNPC_REGNUM
));
937 #ifdef STAB_REG_TO_REGNUM
938 fprintf_unfiltered (file
,
939 "gdbarch_dump: %s # %s\n",
940 "STAB_REG_TO_REGNUM(stab_regnr)",
941 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
943 #ifdef ECOFF_REG_TO_REGNUM
944 fprintf_unfiltered (file
,
945 "gdbarch_dump: %s # %s\n",
946 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
947 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
949 #ifdef DWARF_REG_TO_REGNUM
950 fprintf_unfiltered (file
,
951 "gdbarch_dump: %s # %s\n",
952 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
953 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
955 #ifdef SDB_REG_TO_REGNUM
956 fprintf_unfiltered (file
,
957 "gdbarch_dump: %s # %s\n",
958 "SDB_REG_TO_REGNUM(sdb_regnr)",
959 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
961 #ifdef DWARF2_REG_TO_REGNUM
962 fprintf_unfiltered (file
,
963 "gdbarch_dump: %s # %s\n",
964 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
965 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
968 fprintf_unfiltered (file
,
969 "gdbarch_dump: %s # %s\n",
970 "REGISTER_NAME(regnr)",
971 XSTRING (REGISTER_NAME (regnr
)));
974 fprintf_unfiltered (file
,
975 "gdbarch_dump: REGISTER_SIZE # %s\n",
976 XSTRING (REGISTER_SIZE
));
978 #ifdef REGISTER_BYTES
979 fprintf_unfiltered (file
,
980 "gdbarch_dump: REGISTER_BYTES # %s\n",
981 XSTRING (REGISTER_BYTES
));
984 fprintf_unfiltered (file
,
985 "gdbarch_dump: %s # %s\n",
986 "REGISTER_BYTE(reg_nr)",
987 XSTRING (REGISTER_BYTE (reg_nr
)));
989 #ifdef REGISTER_RAW_SIZE
990 fprintf_unfiltered (file
,
991 "gdbarch_dump: %s # %s\n",
992 "REGISTER_RAW_SIZE(reg_nr)",
993 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
995 #ifdef MAX_REGISTER_RAW_SIZE
996 fprintf_unfiltered (file
,
997 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
998 XSTRING (MAX_REGISTER_RAW_SIZE
));
1000 #ifdef REGISTER_VIRTUAL_SIZE
1001 fprintf_unfiltered (file
,
1002 "gdbarch_dump: %s # %s\n",
1003 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1004 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1006 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1007 fprintf_unfiltered (file
,
1008 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1009 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1011 #ifdef REGISTER_VIRTUAL_TYPE
1012 fprintf_unfiltered (file
,
1013 "gdbarch_dump: %s # %s\n",
1014 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1015 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1017 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1018 /* Macro might contain `[{}]' when not multi-arch */
1019 fprintf_unfiltered (file
,
1020 "gdbarch_dump: %s # %s\n",
1021 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1022 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1024 #ifdef REGISTER_SIM_REGNO
1025 fprintf_unfiltered (file
,
1026 "gdbarch_dump: %s # %s\n",
1027 "REGISTER_SIM_REGNO(reg_nr)",
1028 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1030 #ifdef REGISTER_BYTES_OK
1031 fprintf_unfiltered (file
,
1032 "gdbarch_dump: %s # %s\n",
1033 "REGISTER_BYTES_OK(nr_bytes)",
1034 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1036 #ifdef USE_GENERIC_DUMMY_FRAMES
1037 fprintf_unfiltered (file
,
1038 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1039 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1041 #ifdef CALL_DUMMY_LOCATION
1042 fprintf_unfiltered (file
,
1043 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1044 XSTRING (CALL_DUMMY_LOCATION
));
1046 #ifdef CALL_DUMMY_ADDRESS
1047 fprintf_unfiltered (file
,
1048 "gdbarch_dump: %s # %s\n",
1049 "CALL_DUMMY_ADDRESS()",
1050 XSTRING (CALL_DUMMY_ADDRESS ()));
1052 #ifdef CALL_DUMMY_START_OFFSET
1053 fprintf_unfiltered (file
,
1054 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1055 XSTRING (CALL_DUMMY_START_OFFSET
));
1057 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1058 fprintf_unfiltered (file
,
1059 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1060 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1062 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1063 fprintf_unfiltered (file
,
1064 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1065 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1067 #ifdef CALL_DUMMY_LENGTH
1068 fprintf_unfiltered (file
,
1069 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1070 XSTRING (CALL_DUMMY_LENGTH
));
1072 #ifdef PC_IN_CALL_DUMMY
1073 fprintf_unfiltered (file
,
1074 "gdbarch_dump: %s # %s\n",
1075 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1076 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1079 fprintf_unfiltered (file
,
1080 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1081 XSTRING (CALL_DUMMY_P
));
1083 #ifdef CALL_DUMMY_WORDS
1084 fprintf_unfiltered (file
,
1085 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1086 XSTRING (CALL_DUMMY_WORDS
));
1088 #ifdef SIZEOF_CALL_DUMMY_WORDS
1089 fprintf_unfiltered (file
,
1090 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1091 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1093 #ifdef CALL_DUMMY_STACK_ADJUST_P
1094 fprintf_unfiltered (file
,
1095 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1096 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1098 #ifdef CALL_DUMMY_STACK_ADJUST
1099 fprintf_unfiltered (file
,
1100 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1101 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1103 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1104 /* Macro might contain `[{}]' when not multi-arch */
1105 fprintf_unfiltered (file
,
1106 "gdbarch_dump: %s # %s\n",
1107 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1108 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1110 #ifdef BELIEVE_PCC_PROMOTION
1111 fprintf_unfiltered (file
,
1112 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1113 XSTRING (BELIEVE_PCC_PROMOTION
));
1115 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1116 fprintf_unfiltered (file
,
1117 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1118 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1120 #ifdef COERCE_FLOAT_TO_DOUBLE
1121 fprintf_unfiltered (file
,
1122 "gdbarch_dump: %s # %s\n",
1123 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1124 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1126 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1127 /* Macro might contain `[{}]' when not multi-arch */
1128 fprintf_unfiltered (file
,
1129 "gdbarch_dump: %s # %s\n",
1130 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1131 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1133 #ifdef REGISTER_CONVERTIBLE
1134 fprintf_unfiltered (file
,
1135 "gdbarch_dump: %s # %s\n",
1136 "REGISTER_CONVERTIBLE(nr)",
1137 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1139 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1140 /* Macro might contain `[{}]' when not multi-arch */
1141 fprintf_unfiltered (file
,
1142 "gdbarch_dump: %s # %s\n",
1143 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1144 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1146 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1147 /* Macro might contain `[{}]' when not multi-arch */
1148 fprintf_unfiltered (file
,
1149 "gdbarch_dump: %s # %s\n",
1150 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1151 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1153 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1154 /* Macro might contain `[{}]' when not multi-arch */
1155 fprintf_unfiltered (file
,
1156 "gdbarch_dump: %s # %s\n",
1157 "FETCH_PSEUDO_REGISTER(regnum)",
1158 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1160 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1161 /* Macro might contain `[{}]' when not multi-arch */
1162 fprintf_unfiltered (file
,
1163 "gdbarch_dump: %s # %s\n",
1164 "STORE_PSEUDO_REGISTER(regnum)",
1165 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1167 #ifdef POINTER_TO_ADDRESS
1168 fprintf_unfiltered (file
,
1169 "gdbarch_dump: %s # %s\n",
1170 "POINTER_TO_ADDRESS(type, buf)",
1171 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1173 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1174 /* Macro might contain `[{}]' when not multi-arch */
1175 fprintf_unfiltered (file
,
1176 "gdbarch_dump: %s # %s\n",
1177 "ADDRESS_TO_POINTER(type, buf, addr)",
1178 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1180 #ifdef RETURN_VALUE_ON_STACK
1181 fprintf_unfiltered (file
,
1182 "gdbarch_dump: %s # %s\n",
1183 "RETURN_VALUE_ON_STACK(type)",
1184 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1186 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1187 /* Macro might contain `[{}]' when not multi-arch */
1188 fprintf_unfiltered (file
,
1189 "gdbarch_dump: %s # %s\n",
1190 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1191 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1193 #ifdef PUSH_ARGUMENTS
1194 fprintf_unfiltered (file
,
1195 "gdbarch_dump: %s # %s\n",
1196 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1197 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1199 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1200 /* Macro might contain `[{}]' when not multi-arch */
1201 fprintf_unfiltered (file
,
1202 "gdbarch_dump: %s # %s\n",
1203 "PUSH_DUMMY_FRAME(-)",
1204 XSTRING (PUSH_DUMMY_FRAME (-)));
1206 #ifdef PUSH_RETURN_ADDRESS
1207 fprintf_unfiltered (file
,
1208 "gdbarch_dump: %s # %s\n",
1209 "PUSH_RETURN_ADDRESS(pc, sp)",
1210 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1212 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1213 /* Macro might contain `[{}]' when not multi-arch */
1214 fprintf_unfiltered (file
,
1215 "gdbarch_dump: %s # %s\n",
1217 XSTRING (POP_FRAME (-)));
1219 #ifdef D10V_MAKE_DADDR
1220 fprintf_unfiltered (file
,
1221 "gdbarch_dump: %s # %s\n",
1222 "D10V_MAKE_DADDR(x)",
1223 XSTRING (D10V_MAKE_DADDR (x
)));
1225 #ifdef D10V_MAKE_IADDR
1226 fprintf_unfiltered (file
,
1227 "gdbarch_dump: %s # %s\n",
1228 "D10V_MAKE_IADDR(x)",
1229 XSTRING (D10V_MAKE_IADDR (x
)));
1232 fprintf_unfiltered (file
,
1233 "gdbarch_dump: %s # %s\n",
1235 XSTRING (D10V_DADDR_P (x
)));
1238 fprintf_unfiltered (file
,
1239 "gdbarch_dump: %s # %s\n",
1241 XSTRING (D10V_IADDR_P (x
)));
1243 #ifdef D10V_CONVERT_DADDR_TO_RAW
1244 fprintf_unfiltered (file
,
1245 "gdbarch_dump: %s # %s\n",
1246 "D10V_CONVERT_DADDR_TO_RAW(x)",
1247 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1249 #ifdef D10V_CONVERT_IADDR_TO_RAW
1250 fprintf_unfiltered (file
,
1251 "gdbarch_dump: %s # %s\n",
1252 "D10V_CONVERT_IADDR_TO_RAW(x)",
1253 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1255 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1256 /* Macro might contain `[{}]' when not multi-arch */
1257 fprintf_unfiltered (file
,
1258 "gdbarch_dump: %s # %s\n",
1259 "STORE_STRUCT_RETURN(addr, sp)",
1260 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1262 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1263 /* Macro might contain `[{}]' when not multi-arch */
1264 fprintf_unfiltered (file
,
1265 "gdbarch_dump: %s # %s\n",
1266 "STORE_RETURN_VALUE(type, valbuf)",
1267 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1269 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1270 fprintf_unfiltered (file
,
1271 "gdbarch_dump: %s # %s\n",
1272 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1273 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1275 #ifdef USE_STRUCT_CONVENTION
1276 fprintf_unfiltered (file
,
1277 "gdbarch_dump: %s # %s\n",
1278 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1279 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1281 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1282 /* Macro might contain `[{}]' when not multi-arch */
1283 fprintf_unfiltered (file
,
1284 "gdbarch_dump: %s # %s\n",
1285 "FRAME_INIT_SAVED_REGS(frame)",
1286 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1288 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1289 /* Macro might contain `[{}]' when not multi-arch */
1290 fprintf_unfiltered (file
,
1291 "gdbarch_dump: %s # %s\n",
1292 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1293 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1295 #ifdef SKIP_PROLOGUE
1296 fprintf_unfiltered (file
,
1297 "gdbarch_dump: %s # %s\n",
1298 "SKIP_PROLOGUE(ip)",
1299 XSTRING (SKIP_PROLOGUE (ip
)));
1301 #ifdef PROLOGUE_FRAMELESS_P
1302 fprintf_unfiltered (file
,
1303 "gdbarch_dump: %s # %s\n",
1304 "PROLOGUE_FRAMELESS_P(ip)",
1305 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1308 fprintf_unfiltered (file
,
1309 "gdbarch_dump: %s # %s\n",
1310 "INNER_THAN(lhs, rhs)",
1311 XSTRING (INNER_THAN (lhs
, rhs
)));
1313 #ifdef BREAKPOINT_FROM_PC
1314 fprintf_unfiltered (file
,
1315 "gdbarch_dump: %s # %s\n",
1316 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1317 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1319 #ifdef MEMORY_INSERT_BREAKPOINT
1320 fprintf_unfiltered (file
,
1321 "gdbarch_dump: %s # %s\n",
1322 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1323 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1325 #ifdef MEMORY_REMOVE_BREAKPOINT
1326 fprintf_unfiltered (file
,
1327 "gdbarch_dump: %s # %s\n",
1328 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1329 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1331 #ifdef DECR_PC_AFTER_BREAK
1332 fprintf_unfiltered (file
,
1333 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1334 XSTRING (DECR_PC_AFTER_BREAK
));
1336 #ifdef PREPARE_TO_PROCEED
1337 fprintf_unfiltered (file
,
1338 "gdbarch_dump: %s # %s\n",
1339 "PREPARE_TO_PROCEED(select_it)",
1340 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1342 #ifdef FUNCTION_START_OFFSET
1343 fprintf_unfiltered (file
,
1344 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1345 XSTRING (FUNCTION_START_OFFSET
));
1347 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1348 /* Macro might contain `[{}]' when not multi-arch */
1349 fprintf_unfiltered (file
,
1350 "gdbarch_dump: %s # %s\n",
1351 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1352 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1354 #ifdef FRAME_ARGS_SKIP
1355 fprintf_unfiltered (file
,
1356 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1357 XSTRING (FRAME_ARGS_SKIP
));
1359 #ifdef FRAMELESS_FUNCTION_INVOCATION
1360 fprintf_unfiltered (file
,
1361 "gdbarch_dump: %s # %s\n",
1362 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1363 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1366 fprintf_unfiltered (file
,
1367 "gdbarch_dump: %s # %s\n",
1368 "FRAME_CHAIN(frame)",
1369 XSTRING (FRAME_CHAIN (frame
)));
1371 #ifdef FRAME_CHAIN_VALID
1372 fprintf_unfiltered (file
,
1373 "gdbarch_dump: %s # %s\n",
1374 "FRAME_CHAIN_VALID(chain, thisframe)",
1375 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1377 #ifdef FRAME_SAVED_PC
1378 fprintf_unfiltered (file
,
1379 "gdbarch_dump: %s # %s\n",
1380 "FRAME_SAVED_PC(fi)",
1381 XSTRING (FRAME_SAVED_PC (fi
)));
1383 #ifdef FRAME_ARGS_ADDRESS
1384 fprintf_unfiltered (file
,
1385 "gdbarch_dump: %s # %s\n",
1386 "FRAME_ARGS_ADDRESS(fi)",
1387 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1389 #ifdef FRAME_LOCALS_ADDRESS
1390 fprintf_unfiltered (file
,
1391 "gdbarch_dump: %s # %s\n",
1392 "FRAME_LOCALS_ADDRESS(fi)",
1393 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1395 #ifdef SAVED_PC_AFTER_CALL
1396 fprintf_unfiltered (file
,
1397 "gdbarch_dump: %s # %s\n",
1398 "SAVED_PC_AFTER_CALL(frame)",
1399 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1401 #ifdef FRAME_NUM_ARGS
1402 fprintf_unfiltered (file
,
1403 "gdbarch_dump: %s # %s\n",
1404 "FRAME_NUM_ARGS(frame)",
1405 XSTRING (FRAME_NUM_ARGS (frame
)));
1408 fprintf_unfiltered (file
,
1409 "gdbarch_dump: %s # %s\n",
1411 XSTRING (STACK_ALIGN (sp
)));
1413 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1414 fprintf_unfiltered (file
,
1415 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1416 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1418 #ifdef REG_STRUCT_HAS_ADDR
1419 fprintf_unfiltered (file
,
1420 "gdbarch_dump: %s # %s\n",
1421 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1422 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1424 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1425 /* Macro might contain `[{}]' when not multi-arch */
1426 fprintf_unfiltered (file
,
1427 "gdbarch_dump: %s # %s\n",
1428 "SAVE_DUMMY_FRAME_TOS(sp)",
1429 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1431 #ifdef PARM_BOUNDARY
1432 fprintf_unfiltered (file
,
1433 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1434 XSTRING (PARM_BOUNDARY
));
1436 #ifdef TARGET_FLOAT_FORMAT
1437 fprintf_unfiltered (file
,
1438 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1439 XSTRING (TARGET_FLOAT_FORMAT
));
1441 #ifdef TARGET_DOUBLE_FORMAT
1442 fprintf_unfiltered (file
,
1443 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1444 XSTRING (TARGET_DOUBLE_FORMAT
));
1446 #ifdef TARGET_LONG_DOUBLE_FORMAT
1447 fprintf_unfiltered (file
,
1448 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1449 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1451 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1452 fprintf_unfiltered (file
,
1453 "gdbarch_dump: %s # %s\n",
1454 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1455 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1457 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1458 /* Macro might contain `[{}]' when not multi-arch */
1459 fprintf_unfiltered (file
,
1460 "gdbarch_dump: %s # %s\n",
1461 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1462 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1464 #ifdef TARGET_ARCHITECTURE
1465 if (TARGET_ARCHITECTURE
!= NULL
)
1466 fprintf_unfiltered (file
,
1467 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1468 TARGET_ARCHITECTURE
->printable_name
);
1470 #ifdef TARGET_BYTE_ORDER
1471 fprintf_unfiltered (file
,
1472 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1473 (long) TARGET_BYTE_ORDER
);
1475 #ifdef TARGET_SHORT_BIT
1476 fprintf_unfiltered (file
,
1477 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1478 (long) TARGET_SHORT_BIT
);
1480 #ifdef TARGET_INT_BIT
1481 fprintf_unfiltered (file
,
1482 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1483 (long) TARGET_INT_BIT
);
1485 #ifdef TARGET_LONG_BIT
1486 fprintf_unfiltered (file
,
1487 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1488 (long) TARGET_LONG_BIT
);
1490 #ifdef TARGET_LONG_LONG_BIT
1491 fprintf_unfiltered (file
,
1492 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1493 (long) TARGET_LONG_LONG_BIT
);
1495 #ifdef TARGET_FLOAT_BIT
1496 fprintf_unfiltered (file
,
1497 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1498 (long) TARGET_FLOAT_BIT
);
1500 #ifdef TARGET_DOUBLE_BIT
1501 fprintf_unfiltered (file
,
1502 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1503 (long) TARGET_DOUBLE_BIT
);
1505 #ifdef TARGET_LONG_DOUBLE_BIT
1506 fprintf_unfiltered (file
,
1507 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1508 (long) TARGET_LONG_DOUBLE_BIT
);
1510 #ifdef TARGET_PTR_BIT
1511 fprintf_unfiltered (file
,
1512 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1513 (long) TARGET_PTR_BIT
);
1515 #ifdef TARGET_ADDR_BIT
1516 fprintf_unfiltered (file
,
1517 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1518 (long) TARGET_ADDR_BIT
);
1520 #ifdef TARGET_BFD_VMA_BIT
1521 fprintf_unfiltered (file
,
1522 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1523 (long) TARGET_BFD_VMA_BIT
);
1526 fprintf_unfiltered (file
,
1527 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1530 #ifdef TARGET_READ_PC
1532 fprintf_unfiltered (file
,
1533 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1534 (long) current_gdbarch
->read_pc
1535 /*TARGET_READ_PC ()*/);
1537 #ifdef TARGET_WRITE_PC
1539 fprintf_unfiltered (file
,
1540 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1541 (long) current_gdbarch
->write_pc
1542 /*TARGET_WRITE_PC ()*/);
1544 #ifdef TARGET_READ_FP
1546 fprintf_unfiltered (file
,
1547 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1548 (long) current_gdbarch
->read_fp
1549 /*TARGET_READ_FP ()*/);
1551 #ifdef TARGET_WRITE_FP
1553 fprintf_unfiltered (file
,
1554 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1555 (long) current_gdbarch
->write_fp
1556 /*TARGET_WRITE_FP ()*/);
1558 #ifdef TARGET_READ_SP
1560 fprintf_unfiltered (file
,
1561 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1562 (long) current_gdbarch
->read_sp
1563 /*TARGET_READ_SP ()*/);
1565 #ifdef TARGET_WRITE_SP
1567 fprintf_unfiltered (file
,
1568 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1569 (long) current_gdbarch
->write_sp
1570 /*TARGET_WRITE_SP ()*/);
1573 fprintf_unfiltered (file
,
1574 "gdbarch_dump: register_read = 0x%08lx\n",
1575 (long) current_gdbarch
->register_read
);
1577 fprintf_unfiltered (file
,
1578 "gdbarch_dump: register_write = 0x%08lx\n",
1579 (long) current_gdbarch
->register_write
);
1581 fprintf_unfiltered (file
,
1582 "gdbarch_dump: NUM_REGS = %ld\n",
1585 #ifdef NUM_PSEUDO_REGS
1586 fprintf_unfiltered (file
,
1587 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1588 (long) NUM_PSEUDO_REGS
);
1591 fprintf_unfiltered (file
,
1592 "gdbarch_dump: SP_REGNUM = %ld\n",
1596 fprintf_unfiltered (file
,
1597 "gdbarch_dump: FP_REGNUM = %ld\n",
1601 fprintf_unfiltered (file
,
1602 "gdbarch_dump: PC_REGNUM = %ld\n",
1606 fprintf_unfiltered (file
,
1607 "gdbarch_dump: FP0_REGNUM = %ld\n",
1611 fprintf_unfiltered (file
,
1612 "gdbarch_dump: NPC_REGNUM = %ld\n",
1616 fprintf_unfiltered (file
,
1617 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1618 (long) NNPC_REGNUM
);
1620 #ifdef STAB_REG_TO_REGNUM
1622 fprintf_unfiltered (file
,
1623 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1624 (long) current_gdbarch
->stab_reg_to_regnum
1625 /*STAB_REG_TO_REGNUM ()*/);
1627 #ifdef ECOFF_REG_TO_REGNUM
1629 fprintf_unfiltered (file
,
1630 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1631 (long) current_gdbarch
->ecoff_reg_to_regnum
1632 /*ECOFF_REG_TO_REGNUM ()*/);
1634 #ifdef DWARF_REG_TO_REGNUM
1636 fprintf_unfiltered (file
,
1637 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1638 (long) current_gdbarch
->dwarf_reg_to_regnum
1639 /*DWARF_REG_TO_REGNUM ()*/);
1641 #ifdef SDB_REG_TO_REGNUM
1643 fprintf_unfiltered (file
,
1644 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1645 (long) current_gdbarch
->sdb_reg_to_regnum
1646 /*SDB_REG_TO_REGNUM ()*/);
1648 #ifdef DWARF2_REG_TO_REGNUM
1650 fprintf_unfiltered (file
,
1651 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1652 (long) current_gdbarch
->dwarf2_reg_to_regnum
1653 /*DWARF2_REG_TO_REGNUM ()*/);
1655 #ifdef REGISTER_NAME
1657 fprintf_unfiltered (file
,
1658 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1659 (long) current_gdbarch
->register_name
1660 /*REGISTER_NAME ()*/);
1662 #ifdef REGISTER_SIZE
1663 fprintf_unfiltered (file
,
1664 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1665 (long) REGISTER_SIZE
);
1667 #ifdef REGISTER_BYTES
1668 fprintf_unfiltered (file
,
1669 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1670 (long) REGISTER_BYTES
);
1672 #ifdef REGISTER_BYTE
1674 fprintf_unfiltered (file
,
1675 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1676 (long) current_gdbarch
->register_byte
1677 /*REGISTER_BYTE ()*/);
1679 #ifdef REGISTER_RAW_SIZE
1681 fprintf_unfiltered (file
,
1682 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1683 (long) current_gdbarch
->register_raw_size
1684 /*REGISTER_RAW_SIZE ()*/);
1686 #ifdef MAX_REGISTER_RAW_SIZE
1687 fprintf_unfiltered (file
,
1688 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1689 (long) MAX_REGISTER_RAW_SIZE
);
1691 #ifdef REGISTER_VIRTUAL_SIZE
1693 fprintf_unfiltered (file
,
1694 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1695 (long) current_gdbarch
->register_virtual_size
1696 /*REGISTER_VIRTUAL_SIZE ()*/);
1698 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1699 fprintf_unfiltered (file
,
1700 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1701 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1703 #ifdef REGISTER_VIRTUAL_TYPE
1705 fprintf_unfiltered (file
,
1706 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1707 (long) current_gdbarch
->register_virtual_type
1708 /*REGISTER_VIRTUAL_TYPE ()*/);
1710 #ifdef DO_REGISTERS_INFO
1712 fprintf_unfiltered (file
,
1713 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1714 (long) current_gdbarch
->do_registers_info
1715 /*DO_REGISTERS_INFO ()*/);
1717 #ifdef REGISTER_SIM_REGNO
1719 fprintf_unfiltered (file
,
1720 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1721 (long) current_gdbarch
->register_sim_regno
1722 /*REGISTER_SIM_REGNO ()*/);
1724 #ifdef REGISTER_BYTES_OK
1726 fprintf_unfiltered (file
,
1727 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1728 (long) current_gdbarch
->register_bytes_ok
1729 /*REGISTER_BYTES_OK ()*/);
1731 #ifdef USE_GENERIC_DUMMY_FRAMES
1732 fprintf_unfiltered (file
,
1733 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1734 (long) USE_GENERIC_DUMMY_FRAMES
);
1736 #ifdef CALL_DUMMY_LOCATION
1737 fprintf_unfiltered (file
,
1738 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1739 (long) CALL_DUMMY_LOCATION
);
1741 #ifdef CALL_DUMMY_ADDRESS
1743 fprintf_unfiltered (file
,
1744 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1745 (long) current_gdbarch
->call_dummy_address
1746 /*CALL_DUMMY_ADDRESS ()*/);
1748 #ifdef CALL_DUMMY_START_OFFSET
1749 fprintf_unfiltered (file
,
1750 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1751 (long) CALL_DUMMY_START_OFFSET
);
1753 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1754 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1755 fprintf_unfiltered (file
,
1756 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1757 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1759 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1760 fprintf_unfiltered (file
,
1761 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1762 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1764 #ifdef CALL_DUMMY_LENGTH
1765 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1766 fprintf_unfiltered (file
,
1767 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1768 (long) CALL_DUMMY_LENGTH
);
1770 #ifdef PC_IN_CALL_DUMMY
1772 fprintf_unfiltered (file
,
1773 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1774 (long) current_gdbarch
->pc_in_call_dummy
1775 /*PC_IN_CALL_DUMMY ()*/);
1778 fprintf_unfiltered (file
,
1779 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1780 (long) CALL_DUMMY_P
);
1782 #ifdef CALL_DUMMY_WORDS
1783 fprintf_unfiltered (file
,
1784 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1785 (long) CALL_DUMMY_WORDS
);
1787 #ifdef SIZEOF_CALL_DUMMY_WORDS
1788 fprintf_unfiltered (file
,
1789 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1790 (long) SIZEOF_CALL_DUMMY_WORDS
);
1792 #ifdef CALL_DUMMY_STACK_ADJUST_P
1793 fprintf_unfiltered (file
,
1794 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1795 (long) CALL_DUMMY_STACK_ADJUST_P
);
1797 #ifdef CALL_DUMMY_STACK_ADJUST
1798 if (CALL_DUMMY_STACK_ADJUST_P
)
1799 fprintf_unfiltered (file
,
1800 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1801 (long) CALL_DUMMY_STACK_ADJUST
);
1803 #ifdef FIX_CALL_DUMMY
1805 fprintf_unfiltered (file
,
1806 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1807 (long) current_gdbarch
->fix_call_dummy
1808 /*FIX_CALL_DUMMY ()*/);
1810 #ifdef BELIEVE_PCC_PROMOTION
1811 fprintf_unfiltered (file
,
1812 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1813 (long) BELIEVE_PCC_PROMOTION
);
1815 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1816 fprintf_unfiltered (file
,
1817 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1818 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1820 #ifdef COERCE_FLOAT_TO_DOUBLE
1822 fprintf_unfiltered (file
,
1823 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1824 (long) current_gdbarch
->coerce_float_to_double
1825 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1827 #ifdef GET_SAVED_REGISTER
1829 fprintf_unfiltered (file
,
1830 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1831 (long) current_gdbarch
->get_saved_register
1832 /*GET_SAVED_REGISTER ()*/);
1834 #ifdef REGISTER_CONVERTIBLE
1836 fprintf_unfiltered (file
,
1837 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1838 (long) current_gdbarch
->register_convertible
1839 /*REGISTER_CONVERTIBLE ()*/);
1841 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1843 fprintf_unfiltered (file
,
1844 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1845 (long) current_gdbarch
->register_convert_to_virtual
1846 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1848 #ifdef REGISTER_CONVERT_TO_RAW
1850 fprintf_unfiltered (file
,
1851 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1852 (long) current_gdbarch
->register_convert_to_raw
1853 /*REGISTER_CONVERT_TO_RAW ()*/);
1855 #ifdef FETCH_PSEUDO_REGISTER
1857 fprintf_unfiltered (file
,
1858 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1859 (long) current_gdbarch
->fetch_pseudo_register
1860 /*FETCH_PSEUDO_REGISTER ()*/);
1862 #ifdef STORE_PSEUDO_REGISTER
1864 fprintf_unfiltered (file
,
1865 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1866 (long) current_gdbarch
->store_pseudo_register
1867 /*STORE_PSEUDO_REGISTER ()*/);
1869 #ifdef POINTER_TO_ADDRESS
1871 fprintf_unfiltered (file
,
1872 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1873 (long) current_gdbarch
->pointer_to_address
1874 /*POINTER_TO_ADDRESS ()*/);
1876 #ifdef ADDRESS_TO_POINTER
1878 fprintf_unfiltered (file
,
1879 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1880 (long) current_gdbarch
->address_to_pointer
1881 /*ADDRESS_TO_POINTER ()*/);
1883 #ifdef RETURN_VALUE_ON_STACK
1885 fprintf_unfiltered (file
,
1886 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1887 (long) current_gdbarch
->return_value_on_stack
1888 /*RETURN_VALUE_ON_STACK ()*/);
1890 #ifdef EXTRACT_RETURN_VALUE
1892 fprintf_unfiltered (file
,
1893 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1894 (long) current_gdbarch
->extract_return_value
1895 /*EXTRACT_RETURN_VALUE ()*/);
1897 #ifdef PUSH_ARGUMENTS
1899 fprintf_unfiltered (file
,
1900 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1901 (long) current_gdbarch
->push_arguments
1902 /*PUSH_ARGUMENTS ()*/);
1904 #ifdef PUSH_DUMMY_FRAME
1906 fprintf_unfiltered (file
,
1907 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1908 (long) current_gdbarch
->push_dummy_frame
1909 /*PUSH_DUMMY_FRAME ()*/);
1911 #ifdef PUSH_RETURN_ADDRESS
1913 fprintf_unfiltered (file
,
1914 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1915 (long) current_gdbarch
->push_return_address
1916 /*PUSH_RETURN_ADDRESS ()*/);
1920 fprintf_unfiltered (file
,
1921 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1922 (long) current_gdbarch
->pop_frame
1925 #ifdef D10V_MAKE_DADDR
1927 fprintf_unfiltered (file
,
1928 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1929 (long) current_gdbarch
->d10v_make_daddr
1930 /*D10V_MAKE_DADDR ()*/);
1932 #ifdef D10V_MAKE_IADDR
1934 fprintf_unfiltered (file
,
1935 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1936 (long) current_gdbarch
->d10v_make_iaddr
1937 /*D10V_MAKE_IADDR ()*/);
1941 fprintf_unfiltered (file
,
1942 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1943 (long) current_gdbarch
->d10v_daddr_p
1944 /*D10V_DADDR_P ()*/);
1948 fprintf_unfiltered (file
,
1949 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1950 (long) current_gdbarch
->d10v_iaddr_p
1951 /*D10V_IADDR_P ()*/);
1953 #ifdef D10V_CONVERT_DADDR_TO_RAW
1955 fprintf_unfiltered (file
,
1956 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1957 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1958 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1960 #ifdef D10V_CONVERT_IADDR_TO_RAW
1962 fprintf_unfiltered (file
,
1963 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1964 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1965 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1967 #ifdef STORE_STRUCT_RETURN
1969 fprintf_unfiltered (file
,
1970 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1971 (long) current_gdbarch
->store_struct_return
1972 /*STORE_STRUCT_RETURN ()*/);
1974 #ifdef STORE_RETURN_VALUE
1976 fprintf_unfiltered (file
,
1977 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1978 (long) current_gdbarch
->store_return_value
1979 /*STORE_RETURN_VALUE ()*/);
1981 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1983 fprintf_unfiltered (file
,
1984 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1985 (long) current_gdbarch
->extract_struct_value_address
1986 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1988 #ifdef USE_STRUCT_CONVENTION
1990 fprintf_unfiltered (file
,
1991 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1992 (long) current_gdbarch
->use_struct_convention
1993 /*USE_STRUCT_CONVENTION ()*/);
1995 #ifdef FRAME_INIT_SAVED_REGS
1997 fprintf_unfiltered (file
,
1998 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1999 (long) current_gdbarch
->frame_init_saved_regs
2000 /*FRAME_INIT_SAVED_REGS ()*/);
2002 #ifdef INIT_EXTRA_FRAME_INFO
2004 fprintf_unfiltered (file
,
2005 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
2006 (long) current_gdbarch
->init_extra_frame_info
2007 /*INIT_EXTRA_FRAME_INFO ()*/);
2009 #ifdef SKIP_PROLOGUE
2011 fprintf_unfiltered (file
,
2012 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
2013 (long) current_gdbarch
->skip_prologue
2014 /*SKIP_PROLOGUE ()*/);
2016 #ifdef PROLOGUE_FRAMELESS_P
2018 fprintf_unfiltered (file
,
2019 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2020 (long) current_gdbarch
->prologue_frameless_p
2021 /*PROLOGUE_FRAMELESS_P ()*/);
2025 fprintf_unfiltered (file
,
2026 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2027 (long) current_gdbarch
->inner_than
2030 #ifdef BREAKPOINT_FROM_PC
2032 fprintf_unfiltered (file
,
2033 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2034 (long) current_gdbarch
->breakpoint_from_pc
2035 /*BREAKPOINT_FROM_PC ()*/);
2037 #ifdef MEMORY_INSERT_BREAKPOINT
2039 fprintf_unfiltered (file
,
2040 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2041 (long) current_gdbarch
->memory_insert_breakpoint
2042 /*MEMORY_INSERT_BREAKPOINT ()*/);
2044 #ifdef MEMORY_REMOVE_BREAKPOINT
2046 fprintf_unfiltered (file
,
2047 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2048 (long) current_gdbarch
->memory_remove_breakpoint
2049 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2051 #ifdef DECR_PC_AFTER_BREAK
2052 fprintf_unfiltered (file
,
2053 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2054 (long) DECR_PC_AFTER_BREAK
);
2056 #ifdef PREPARE_TO_PROCEED
2058 fprintf_unfiltered (file
,
2059 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2060 (long) current_gdbarch
->prepare_to_proceed
2061 /*PREPARE_TO_PROCEED ()*/);
2063 #ifdef FUNCTION_START_OFFSET
2064 fprintf_unfiltered (file
,
2065 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2066 (long) FUNCTION_START_OFFSET
);
2068 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2070 fprintf_unfiltered (file
,
2071 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2072 (long) current_gdbarch
->remote_translate_xfer_address
2073 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2075 #ifdef FRAME_ARGS_SKIP
2076 fprintf_unfiltered (file
,
2077 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2078 (long) FRAME_ARGS_SKIP
);
2080 #ifdef FRAMELESS_FUNCTION_INVOCATION
2082 fprintf_unfiltered (file
,
2083 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2084 (long) current_gdbarch
->frameless_function_invocation
2085 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2089 fprintf_unfiltered (file
,
2090 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2091 (long) current_gdbarch
->frame_chain
2092 /*FRAME_CHAIN ()*/);
2094 #ifdef FRAME_CHAIN_VALID
2096 fprintf_unfiltered (file
,
2097 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2098 (long) current_gdbarch
->frame_chain_valid
2099 /*FRAME_CHAIN_VALID ()*/);
2101 #ifdef FRAME_SAVED_PC
2103 fprintf_unfiltered (file
,
2104 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2105 (long) current_gdbarch
->frame_saved_pc
2106 /*FRAME_SAVED_PC ()*/);
2108 #ifdef FRAME_ARGS_ADDRESS
2110 fprintf_unfiltered (file
,
2111 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2112 (long) current_gdbarch
->frame_args_address
2113 /*FRAME_ARGS_ADDRESS ()*/);
2115 #ifdef FRAME_LOCALS_ADDRESS
2117 fprintf_unfiltered (file
,
2118 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2119 (long) current_gdbarch
->frame_locals_address
2120 /*FRAME_LOCALS_ADDRESS ()*/);
2122 #ifdef SAVED_PC_AFTER_CALL
2124 fprintf_unfiltered (file
,
2125 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2126 (long) current_gdbarch
->saved_pc_after_call
2127 /*SAVED_PC_AFTER_CALL ()*/);
2129 #ifdef FRAME_NUM_ARGS
2131 fprintf_unfiltered (file
,
2132 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2133 (long) current_gdbarch
->frame_num_args
2134 /*FRAME_NUM_ARGS ()*/);
2138 fprintf_unfiltered (file
,
2139 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2140 (long) current_gdbarch
->stack_align
2141 /*STACK_ALIGN ()*/);
2143 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2144 fprintf_unfiltered (file
,
2145 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2146 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2148 #ifdef REG_STRUCT_HAS_ADDR
2150 fprintf_unfiltered (file
,
2151 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2152 (long) current_gdbarch
->reg_struct_has_addr
2153 /*REG_STRUCT_HAS_ADDR ()*/);
2155 #ifdef SAVE_DUMMY_FRAME_TOS
2157 fprintf_unfiltered (file
,
2158 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2159 (long) current_gdbarch
->save_dummy_frame_tos
2160 /*SAVE_DUMMY_FRAME_TOS ()*/);
2162 #ifdef PARM_BOUNDARY
2163 fprintf_unfiltered (file
,
2164 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2165 (long) PARM_BOUNDARY
);
2167 #ifdef TARGET_FLOAT_FORMAT
2168 fprintf_unfiltered (file
,
2169 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2170 (long) TARGET_FLOAT_FORMAT
);
2172 #ifdef TARGET_DOUBLE_FORMAT
2173 fprintf_unfiltered (file
,
2174 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2175 (long) TARGET_DOUBLE_FORMAT
);
2177 #ifdef TARGET_LONG_DOUBLE_FORMAT
2178 fprintf_unfiltered (file
,
2179 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2180 (long) TARGET_LONG_DOUBLE_FORMAT
);
2182 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2184 fprintf_unfiltered (file
,
2185 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2186 (long) current_gdbarch
->convert_from_func_ptr_addr
2187 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2189 #ifdef SOFTWARE_SINGLE_STEP
2191 fprintf_unfiltered (file
,
2192 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2193 (long) current_gdbarch
->software_single_step
2194 /*SOFTWARE_SINGLE_STEP ()*/);
2196 if (current_gdbarch
->dump_tdep
!= NULL
)
2197 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2200 struct gdbarch_tdep
*
2201 gdbarch_tdep (struct gdbarch
*gdbarch
)
2203 if (gdbarch_debug
>= 2)
2204 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2205 return gdbarch
->tdep
;
2209 const struct bfd_arch_info
*
2210 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2212 if (gdbarch_debug
>= 2)
2213 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2214 return gdbarch
->bfd_arch_info
;
2218 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2220 if (gdbarch_debug
>= 2)
2221 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2222 return gdbarch
->byte_order
;
2226 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2228 /* Skip verify of short_bit, invalid_p == 0 */
2229 if (gdbarch_debug
>= 2)
2230 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2231 return gdbarch
->short_bit
;
2235 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2238 gdbarch
->short_bit
= short_bit
;
2242 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2244 /* Skip verify of int_bit, invalid_p == 0 */
2245 if (gdbarch_debug
>= 2)
2246 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2247 return gdbarch
->int_bit
;
2251 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2254 gdbarch
->int_bit
= int_bit
;
2258 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2260 /* Skip verify of long_bit, invalid_p == 0 */
2261 if (gdbarch_debug
>= 2)
2262 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2263 return gdbarch
->long_bit
;
2267 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2270 gdbarch
->long_bit
= long_bit
;
2274 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2276 /* Skip verify of long_long_bit, invalid_p == 0 */
2277 if (gdbarch_debug
>= 2)
2278 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2279 return gdbarch
->long_long_bit
;
2283 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2286 gdbarch
->long_long_bit
= long_long_bit
;
2290 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2292 /* Skip verify of float_bit, invalid_p == 0 */
2293 if (gdbarch_debug
>= 2)
2294 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2295 return gdbarch
->float_bit
;
2299 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2302 gdbarch
->float_bit
= float_bit
;
2306 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2308 /* Skip verify of double_bit, invalid_p == 0 */
2309 if (gdbarch_debug
>= 2)
2310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2311 return gdbarch
->double_bit
;
2315 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2318 gdbarch
->double_bit
= double_bit
;
2322 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2324 /* Skip verify of long_double_bit, invalid_p == 0 */
2325 if (gdbarch_debug
>= 2)
2326 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2327 return gdbarch
->long_double_bit
;
2331 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2332 int long_double_bit
)
2334 gdbarch
->long_double_bit
= long_double_bit
;
2338 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2340 /* Skip verify of ptr_bit, invalid_p == 0 */
2341 if (gdbarch_debug
>= 2)
2342 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2343 return gdbarch
->ptr_bit
;
2347 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2350 gdbarch
->ptr_bit
= ptr_bit
;
2354 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2356 if (gdbarch
->addr_bit
== 0)
2357 internal_error (__FILE__
, __LINE__
,
2358 "gdbarch: gdbarch_addr_bit invalid");
2359 if (gdbarch_debug
>= 2)
2360 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2361 return gdbarch
->addr_bit
;
2365 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2368 gdbarch
->addr_bit
= addr_bit
;
2372 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2374 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2375 if (gdbarch_debug
>= 2)
2376 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2377 return gdbarch
->bfd_vma_bit
;
2381 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2384 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2388 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2390 /* Skip verify of ieee_float, invalid_p == 0 */
2391 if (gdbarch_debug
>= 2)
2392 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2393 return gdbarch
->ieee_float
;
2397 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2400 gdbarch
->ieee_float
= ieee_float
;
2404 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2406 if (gdbarch
->read_pc
== 0)
2407 internal_error (__FILE__
, __LINE__
,
2408 "gdbarch: gdbarch_read_pc invalid");
2409 if (gdbarch_debug
>= 2)
2410 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2411 return gdbarch
->read_pc (ptid
);
2415 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2416 gdbarch_read_pc_ftype read_pc
)
2418 gdbarch
->read_pc
= read_pc
;
2422 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2424 if (gdbarch
->write_pc
== 0)
2425 internal_error (__FILE__
, __LINE__
,
2426 "gdbarch: gdbarch_write_pc invalid");
2427 if (gdbarch_debug
>= 2)
2428 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2429 gdbarch
->write_pc (val
, ptid
);
2433 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2434 gdbarch_write_pc_ftype write_pc
)
2436 gdbarch
->write_pc
= write_pc
;
2440 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2442 if (gdbarch
->read_fp
== 0)
2443 internal_error (__FILE__
, __LINE__
,
2444 "gdbarch: gdbarch_read_fp invalid");
2445 if (gdbarch_debug
>= 2)
2446 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2447 return gdbarch
->read_fp ();
2451 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2452 gdbarch_read_fp_ftype read_fp
)
2454 gdbarch
->read_fp
= read_fp
;
2458 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2460 if (gdbarch
->write_fp
== 0)
2461 internal_error (__FILE__
, __LINE__
,
2462 "gdbarch: gdbarch_write_fp invalid");
2463 if (gdbarch_debug
>= 2)
2464 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2465 gdbarch
->write_fp (val
);
2469 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2470 gdbarch_write_fp_ftype write_fp
)
2472 gdbarch
->write_fp
= write_fp
;
2476 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2478 if (gdbarch
->read_sp
== 0)
2479 internal_error (__FILE__
, __LINE__
,
2480 "gdbarch: gdbarch_read_sp invalid");
2481 if (gdbarch_debug
>= 2)
2482 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2483 return gdbarch
->read_sp ();
2487 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2488 gdbarch_read_sp_ftype read_sp
)
2490 gdbarch
->read_sp
= read_sp
;
2494 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2496 if (gdbarch
->write_sp
== 0)
2497 internal_error (__FILE__
, __LINE__
,
2498 "gdbarch: gdbarch_write_sp invalid");
2499 if (gdbarch_debug
>= 2)
2500 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2501 gdbarch
->write_sp (val
);
2505 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2506 gdbarch_write_sp_ftype write_sp
)
2508 gdbarch
->write_sp
= write_sp
;
2512 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2514 return gdbarch
->register_read
!= 0;
2518 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2520 if (gdbarch
->register_read
== 0)
2521 internal_error (__FILE__
, __LINE__
,
2522 "gdbarch: gdbarch_register_read invalid");
2523 if (gdbarch_debug
>= 2)
2524 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2525 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2529 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2530 gdbarch_register_read_ftype register_read
)
2532 gdbarch
->register_read
= register_read
;
2536 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2538 return gdbarch
->register_write
!= 0;
2542 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2544 if (gdbarch
->register_write
== 0)
2545 internal_error (__FILE__
, __LINE__
,
2546 "gdbarch: gdbarch_register_write invalid");
2547 if (gdbarch_debug
>= 2)
2548 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2549 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2553 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2554 gdbarch_register_write_ftype register_write
)
2556 gdbarch
->register_write
= register_write
;
2560 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2562 if (gdbarch
->num_regs
== -1)
2563 internal_error (__FILE__
, __LINE__
,
2564 "gdbarch: gdbarch_num_regs invalid");
2565 if (gdbarch_debug
>= 2)
2566 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2567 return gdbarch
->num_regs
;
2571 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2574 gdbarch
->num_regs
= num_regs
;
2578 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2580 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2581 if (gdbarch_debug
>= 2)
2582 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2583 return gdbarch
->num_pseudo_regs
;
2587 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2588 int num_pseudo_regs
)
2590 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2594 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2596 if (gdbarch
->sp_regnum
== -1)
2597 internal_error (__FILE__
, __LINE__
,
2598 "gdbarch: gdbarch_sp_regnum invalid");
2599 if (gdbarch_debug
>= 2)
2600 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2601 return gdbarch
->sp_regnum
;
2605 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2608 gdbarch
->sp_regnum
= sp_regnum
;
2612 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2614 if (gdbarch
->fp_regnum
== -1)
2615 internal_error (__FILE__
, __LINE__
,
2616 "gdbarch: gdbarch_fp_regnum invalid");
2617 if (gdbarch_debug
>= 2)
2618 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2619 return gdbarch
->fp_regnum
;
2623 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2626 gdbarch
->fp_regnum
= fp_regnum
;
2630 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2632 if (gdbarch
->pc_regnum
== -1)
2633 internal_error (__FILE__
, __LINE__
,
2634 "gdbarch: gdbarch_pc_regnum invalid");
2635 if (gdbarch_debug
>= 2)
2636 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2637 return gdbarch
->pc_regnum
;
2641 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2644 gdbarch
->pc_regnum
= pc_regnum
;
2648 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2650 /* Skip verify of fp0_regnum, invalid_p == 0 */
2651 if (gdbarch_debug
>= 2)
2652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2653 return gdbarch
->fp0_regnum
;
2657 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2660 gdbarch
->fp0_regnum
= fp0_regnum
;
2664 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2666 /* Skip verify of npc_regnum, invalid_p == 0 */
2667 if (gdbarch_debug
>= 2)
2668 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2669 return gdbarch
->npc_regnum
;
2673 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2676 gdbarch
->npc_regnum
= npc_regnum
;
2680 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2682 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2683 if (gdbarch_debug
>= 2)
2684 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2685 return gdbarch
->nnpc_regnum
;
2689 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2692 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2696 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2698 if (gdbarch
->stab_reg_to_regnum
== 0)
2699 internal_error (__FILE__
, __LINE__
,
2700 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2701 if (gdbarch_debug
>= 2)
2702 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2703 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2707 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2708 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2710 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2714 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2716 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2717 internal_error (__FILE__
, __LINE__
,
2718 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2719 if (gdbarch_debug
>= 2)
2720 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2721 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2725 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2726 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2728 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2732 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2734 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2735 internal_error (__FILE__
, __LINE__
,
2736 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2737 if (gdbarch_debug
>= 2)
2738 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2739 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2743 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2744 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2746 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2750 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2752 if (gdbarch
->sdb_reg_to_regnum
== 0)
2753 internal_error (__FILE__
, __LINE__
,
2754 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2755 if (gdbarch_debug
>= 2)
2756 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2757 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2761 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2762 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2764 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2768 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2770 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2771 internal_error (__FILE__
, __LINE__
,
2772 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2773 if (gdbarch_debug
>= 2)
2774 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2775 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2779 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2780 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2782 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2786 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2788 if (gdbarch
->register_name
== 0)
2789 internal_error (__FILE__
, __LINE__
,
2790 "gdbarch: gdbarch_register_name invalid");
2791 if (gdbarch_debug
>= 2)
2792 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2793 return gdbarch
->register_name (regnr
);
2797 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2798 gdbarch_register_name_ftype register_name
)
2800 gdbarch
->register_name
= register_name
;
2804 gdbarch_register_size (struct gdbarch
*gdbarch
)
2806 if (gdbarch
->register_size
== -1)
2807 internal_error (__FILE__
, __LINE__
,
2808 "gdbarch: gdbarch_register_size invalid");
2809 if (gdbarch_debug
>= 2)
2810 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2811 return gdbarch
->register_size
;
2815 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2818 gdbarch
->register_size
= register_size
;
2822 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2824 if (gdbarch
->register_bytes
== -1)
2825 internal_error (__FILE__
, __LINE__
,
2826 "gdbarch: gdbarch_register_bytes invalid");
2827 if (gdbarch_debug
>= 2)
2828 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2829 return gdbarch
->register_bytes
;
2833 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2836 gdbarch
->register_bytes
= register_bytes
;
2840 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2842 if (gdbarch
->register_byte
== 0)
2843 internal_error (__FILE__
, __LINE__
,
2844 "gdbarch: gdbarch_register_byte invalid");
2845 if (gdbarch_debug
>= 2)
2846 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2847 return gdbarch
->register_byte (reg_nr
);
2851 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2852 gdbarch_register_byte_ftype register_byte
)
2854 gdbarch
->register_byte
= register_byte
;
2858 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2860 if (gdbarch
->register_raw_size
== 0)
2861 internal_error (__FILE__
, __LINE__
,
2862 "gdbarch: gdbarch_register_raw_size invalid");
2863 if (gdbarch_debug
>= 2)
2864 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2865 return gdbarch
->register_raw_size (reg_nr
);
2869 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2870 gdbarch_register_raw_size_ftype register_raw_size
)
2872 gdbarch
->register_raw_size
= register_raw_size
;
2876 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2878 if (gdbarch
->max_register_raw_size
== -1)
2879 internal_error (__FILE__
, __LINE__
,
2880 "gdbarch: gdbarch_max_register_raw_size invalid");
2881 if (gdbarch_debug
>= 2)
2882 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2883 return gdbarch
->max_register_raw_size
;
2887 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2888 int max_register_raw_size
)
2890 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2894 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2896 if (gdbarch
->register_virtual_size
== 0)
2897 internal_error (__FILE__
, __LINE__
,
2898 "gdbarch: gdbarch_register_virtual_size invalid");
2899 if (gdbarch_debug
>= 2)
2900 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2901 return gdbarch
->register_virtual_size (reg_nr
);
2905 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2906 gdbarch_register_virtual_size_ftype register_virtual_size
)
2908 gdbarch
->register_virtual_size
= register_virtual_size
;
2912 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2914 if (gdbarch
->max_register_virtual_size
== -1)
2915 internal_error (__FILE__
, __LINE__
,
2916 "gdbarch: gdbarch_max_register_virtual_size invalid");
2917 if (gdbarch_debug
>= 2)
2918 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2919 return gdbarch
->max_register_virtual_size
;
2923 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2924 int max_register_virtual_size
)
2926 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2930 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2932 if (gdbarch
->register_virtual_type
== 0)
2933 internal_error (__FILE__
, __LINE__
,
2934 "gdbarch: gdbarch_register_virtual_type invalid");
2935 if (gdbarch_debug
>= 2)
2936 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2937 return gdbarch
->register_virtual_type (reg_nr
);
2941 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2942 gdbarch_register_virtual_type_ftype register_virtual_type
)
2944 gdbarch
->register_virtual_type
= register_virtual_type
;
2948 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2950 if (gdbarch
->do_registers_info
== 0)
2951 internal_error (__FILE__
, __LINE__
,
2952 "gdbarch: gdbarch_do_registers_info invalid");
2953 if (gdbarch_debug
>= 2)
2954 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2955 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2959 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2960 gdbarch_do_registers_info_ftype do_registers_info
)
2962 gdbarch
->do_registers_info
= do_registers_info
;
2966 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2968 if (gdbarch
->register_sim_regno
== 0)
2969 internal_error (__FILE__
, __LINE__
,
2970 "gdbarch: gdbarch_register_sim_regno invalid");
2971 if (gdbarch_debug
>= 2)
2972 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2973 return gdbarch
->register_sim_regno (reg_nr
);
2977 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2978 gdbarch_register_sim_regno_ftype register_sim_regno
)
2980 gdbarch
->register_sim_regno
= register_sim_regno
;
2984 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2986 return gdbarch
->register_bytes_ok
!= 0;
2990 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2992 if (gdbarch
->register_bytes_ok
== 0)
2993 internal_error (__FILE__
, __LINE__
,
2994 "gdbarch: gdbarch_register_bytes_ok invalid");
2995 if (gdbarch_debug
>= 2)
2996 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2997 return gdbarch
->register_bytes_ok (nr_bytes
);
3001 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
3002 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3004 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3008 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3010 if (gdbarch
->use_generic_dummy_frames
== -1)
3011 internal_error (__FILE__
, __LINE__
,
3012 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3013 if (gdbarch_debug
>= 2)
3014 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3015 return gdbarch
->use_generic_dummy_frames
;
3019 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3020 int use_generic_dummy_frames
)
3022 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3026 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3028 if (gdbarch
->call_dummy_location
== 0)
3029 internal_error (__FILE__
, __LINE__
,
3030 "gdbarch: gdbarch_call_dummy_location invalid");
3031 if (gdbarch_debug
>= 2)
3032 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3033 return gdbarch
->call_dummy_location
;
3037 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3038 int call_dummy_location
)
3040 gdbarch
->call_dummy_location
= call_dummy_location
;
3044 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3046 if (gdbarch
->call_dummy_address
== 0)
3047 internal_error (__FILE__
, __LINE__
,
3048 "gdbarch: gdbarch_call_dummy_address invalid");
3049 if (gdbarch_debug
>= 2)
3050 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3051 return gdbarch
->call_dummy_address ();
3055 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3056 gdbarch_call_dummy_address_ftype call_dummy_address
)
3058 gdbarch
->call_dummy_address
= call_dummy_address
;
3062 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3064 if (gdbarch
->call_dummy_start_offset
== -1)
3065 internal_error (__FILE__
, __LINE__
,
3066 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3067 if (gdbarch_debug
>= 2)
3068 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3069 return gdbarch
->call_dummy_start_offset
;
3073 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3074 CORE_ADDR call_dummy_start_offset
)
3076 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3080 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3082 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3083 internal_error (__FILE__
, __LINE__
,
3084 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3085 if (gdbarch_debug
>= 2)
3086 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3087 return gdbarch
->call_dummy_breakpoint_offset
;
3091 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3092 CORE_ADDR call_dummy_breakpoint_offset
)
3094 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3098 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3100 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3101 internal_error (__FILE__
, __LINE__
,
3102 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3103 if (gdbarch_debug
>= 2)
3104 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3105 return gdbarch
->call_dummy_breakpoint_offset_p
;
3109 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3110 int call_dummy_breakpoint_offset_p
)
3112 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3116 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3118 if (gdbarch
->call_dummy_length
== -1)
3119 internal_error (__FILE__
, __LINE__
,
3120 "gdbarch: gdbarch_call_dummy_length invalid");
3121 if (gdbarch_debug
>= 2)
3122 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3123 return gdbarch
->call_dummy_length
;
3127 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3128 int call_dummy_length
)
3130 gdbarch
->call_dummy_length
= call_dummy_length
;
3134 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3136 if (gdbarch
->pc_in_call_dummy
== 0)
3137 internal_error (__FILE__
, __LINE__
,
3138 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3139 if (gdbarch_debug
>= 2)
3140 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3141 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3145 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3146 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3148 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3152 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3154 if (gdbarch
->call_dummy_p
== -1)
3155 internal_error (__FILE__
, __LINE__
,
3156 "gdbarch: gdbarch_call_dummy_p invalid");
3157 if (gdbarch_debug
>= 2)
3158 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3159 return gdbarch
->call_dummy_p
;
3163 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3166 gdbarch
->call_dummy_p
= call_dummy_p
;
3170 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3172 /* Skip verify of call_dummy_words, invalid_p == 0 */
3173 if (gdbarch_debug
>= 2)
3174 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3175 return gdbarch
->call_dummy_words
;
3179 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3180 LONGEST
* call_dummy_words
)
3182 gdbarch
->call_dummy_words
= call_dummy_words
;
3186 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3188 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3189 if (gdbarch_debug
>= 2)
3190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3191 return gdbarch
->sizeof_call_dummy_words
;
3195 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3196 int sizeof_call_dummy_words
)
3198 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3202 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3204 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3205 internal_error (__FILE__
, __LINE__
,
3206 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3207 if (gdbarch_debug
>= 2)
3208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3209 return gdbarch
->call_dummy_stack_adjust_p
;
3213 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3214 int call_dummy_stack_adjust_p
)
3216 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3220 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3222 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3223 internal_error (__FILE__
, __LINE__
,
3224 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3225 if (gdbarch_debug
>= 2)
3226 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3227 return gdbarch
->call_dummy_stack_adjust
;
3231 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3232 int call_dummy_stack_adjust
)
3234 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3238 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
)
3240 if (gdbarch
->fix_call_dummy
== 0)
3241 internal_error (__FILE__
, __LINE__
,
3242 "gdbarch: gdbarch_fix_call_dummy invalid");
3243 if (gdbarch_debug
>= 2)
3244 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3245 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3249 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3250 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3252 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3256 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3258 if (gdbarch_debug
>= 2)
3259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3260 return gdbarch
->believe_pcc_promotion
;
3264 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3265 int believe_pcc_promotion
)
3267 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3271 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3273 if (gdbarch_debug
>= 2)
3274 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3275 return gdbarch
->believe_pcc_promotion_type
;
3279 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3280 int believe_pcc_promotion_type
)
3282 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3286 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3288 if (gdbarch
->coerce_float_to_double
== 0)
3289 internal_error (__FILE__
, __LINE__
,
3290 "gdbarch: gdbarch_coerce_float_to_double invalid");
3291 if (gdbarch_debug
>= 2)
3292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3293 return gdbarch
->coerce_float_to_double (formal
, actual
);
3297 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3298 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3300 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3304 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
)
3306 if (gdbarch
->get_saved_register
== 0)
3307 internal_error (__FILE__
, __LINE__
,
3308 "gdbarch: gdbarch_get_saved_register invalid");
3309 if (gdbarch_debug
>= 2)
3310 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3311 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3315 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3316 gdbarch_get_saved_register_ftype get_saved_register
)
3318 gdbarch
->get_saved_register
= get_saved_register
;
3322 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3324 if (gdbarch
->register_convertible
== 0)
3325 internal_error (__FILE__
, __LINE__
,
3326 "gdbarch: gdbarch_register_convertible invalid");
3327 if (gdbarch_debug
>= 2)
3328 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3329 return gdbarch
->register_convertible (nr
);
3333 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3334 gdbarch_register_convertible_ftype register_convertible
)
3336 gdbarch
->register_convertible
= register_convertible
;
3340 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3342 if (gdbarch
->register_convert_to_virtual
== 0)
3343 internal_error (__FILE__
, __LINE__
,
3344 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3345 if (gdbarch_debug
>= 2)
3346 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3347 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3351 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3352 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3354 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3358 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3360 if (gdbarch
->register_convert_to_raw
== 0)
3361 internal_error (__FILE__
, __LINE__
,
3362 "gdbarch: gdbarch_register_convert_to_raw invalid");
3363 if (gdbarch_debug
>= 2)
3364 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3365 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3369 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3370 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3372 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3376 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3378 if (gdbarch
->fetch_pseudo_register
== 0)
3379 internal_error (__FILE__
, __LINE__
,
3380 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3381 if (gdbarch_debug
>= 2)
3382 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3383 gdbarch
->fetch_pseudo_register (regnum
);
3387 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3388 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3390 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3394 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3396 if (gdbarch
->store_pseudo_register
== 0)
3397 internal_error (__FILE__
, __LINE__
,
3398 "gdbarch: gdbarch_store_pseudo_register invalid");
3399 if (gdbarch_debug
>= 2)
3400 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3401 gdbarch
->store_pseudo_register (regnum
);
3405 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3406 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3408 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3412 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3414 if (gdbarch
->pointer_to_address
== 0)
3415 internal_error (__FILE__
, __LINE__
,
3416 "gdbarch: gdbarch_pointer_to_address invalid");
3417 if (gdbarch_debug
>= 2)
3418 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3419 return gdbarch
->pointer_to_address (type
, buf
);
3423 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3424 gdbarch_pointer_to_address_ftype pointer_to_address
)
3426 gdbarch
->pointer_to_address
= pointer_to_address
;
3430 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3432 if (gdbarch
->address_to_pointer
== 0)
3433 internal_error (__FILE__
, __LINE__
,
3434 "gdbarch: gdbarch_address_to_pointer invalid");
3435 if (gdbarch_debug
>= 2)
3436 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3437 gdbarch
->address_to_pointer (type
, buf
, addr
);
3441 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3442 gdbarch_address_to_pointer_ftype address_to_pointer
)
3444 gdbarch
->address_to_pointer
= address_to_pointer
;
3448 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3450 if (gdbarch
->return_value_on_stack
== 0)
3451 internal_error (__FILE__
, __LINE__
,
3452 "gdbarch: gdbarch_return_value_on_stack invalid");
3453 if (gdbarch_debug
>= 2)
3454 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3455 return gdbarch
->return_value_on_stack (type
);
3459 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3460 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3462 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3466 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3468 if (gdbarch
->extract_return_value
== 0)
3469 internal_error (__FILE__
, __LINE__
,
3470 "gdbarch: gdbarch_extract_return_value invalid");
3471 if (gdbarch_debug
>= 2)
3472 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3473 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3477 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3478 gdbarch_extract_return_value_ftype extract_return_value
)
3480 gdbarch
->extract_return_value
= extract_return_value
;
3484 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3486 if (gdbarch
->push_arguments
== 0)
3487 internal_error (__FILE__
, __LINE__
,
3488 "gdbarch: gdbarch_push_arguments invalid");
3489 if (gdbarch_debug
>= 2)
3490 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3491 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3495 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3496 gdbarch_push_arguments_ftype push_arguments
)
3498 gdbarch
->push_arguments
= push_arguments
;
3502 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3504 if (gdbarch
->push_dummy_frame
== 0)
3505 internal_error (__FILE__
, __LINE__
,
3506 "gdbarch: gdbarch_push_dummy_frame invalid");
3507 if (gdbarch_debug
>= 2)
3508 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3509 gdbarch
->push_dummy_frame ();
3513 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3514 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3516 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3520 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3522 if (gdbarch
->push_return_address
== 0)
3523 internal_error (__FILE__
, __LINE__
,
3524 "gdbarch: gdbarch_push_return_address invalid");
3525 if (gdbarch_debug
>= 2)
3526 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3527 return gdbarch
->push_return_address (pc
, sp
);
3531 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3532 gdbarch_push_return_address_ftype push_return_address
)
3534 gdbarch
->push_return_address
= push_return_address
;
3538 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3540 if (gdbarch
->pop_frame
== 0)
3541 internal_error (__FILE__
, __LINE__
,
3542 "gdbarch: gdbarch_pop_frame invalid");
3543 if (gdbarch_debug
>= 2)
3544 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3545 gdbarch
->pop_frame ();
3549 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3550 gdbarch_pop_frame_ftype pop_frame
)
3552 gdbarch
->pop_frame
= pop_frame
;
3556 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3558 if (gdbarch
->d10v_make_daddr
== 0)
3559 internal_error (__FILE__
, __LINE__
,
3560 "gdbarch: gdbarch_d10v_make_daddr invalid");
3561 if (gdbarch_debug
>= 2)
3562 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3563 return gdbarch
->d10v_make_daddr (x
);
3567 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3568 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3570 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3574 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3576 if (gdbarch
->d10v_make_iaddr
== 0)
3577 internal_error (__FILE__
, __LINE__
,
3578 "gdbarch: gdbarch_d10v_make_iaddr invalid");
3579 if (gdbarch_debug
>= 2)
3580 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3581 return gdbarch
->d10v_make_iaddr (x
);
3585 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3586 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3588 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3592 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3594 if (gdbarch
->d10v_daddr_p
== 0)
3595 internal_error (__FILE__
, __LINE__
,
3596 "gdbarch: gdbarch_d10v_daddr_p invalid");
3597 if (gdbarch_debug
>= 2)
3598 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3599 return gdbarch
->d10v_daddr_p (x
);
3603 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3604 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3606 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3610 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3612 if (gdbarch
->d10v_iaddr_p
== 0)
3613 internal_error (__FILE__
, __LINE__
,
3614 "gdbarch: gdbarch_d10v_iaddr_p invalid");
3615 if (gdbarch_debug
>= 2)
3616 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3617 return gdbarch
->d10v_iaddr_p (x
);
3621 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3622 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3624 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3628 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3630 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3631 internal_error (__FILE__
, __LINE__
,
3632 "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3633 if (gdbarch_debug
>= 2)
3634 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3635 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3639 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3640 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3642 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3646 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3648 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3649 internal_error (__FILE__
, __LINE__
,
3650 "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3651 if (gdbarch_debug
>= 2)
3652 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3653 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3657 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3658 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3660 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3664 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3666 if (gdbarch
->store_struct_return
== 0)
3667 internal_error (__FILE__
, __LINE__
,
3668 "gdbarch: gdbarch_store_struct_return invalid");
3669 if (gdbarch_debug
>= 2)
3670 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3671 gdbarch
->store_struct_return (addr
, sp
);
3675 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3676 gdbarch_store_struct_return_ftype store_struct_return
)
3678 gdbarch
->store_struct_return
= store_struct_return
;
3682 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3684 if (gdbarch
->store_return_value
== 0)
3685 internal_error (__FILE__
, __LINE__
,
3686 "gdbarch: gdbarch_store_return_value invalid");
3687 if (gdbarch_debug
>= 2)
3688 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3689 gdbarch
->store_return_value (type
, valbuf
);
3693 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3694 gdbarch_store_return_value_ftype store_return_value
)
3696 gdbarch
->store_return_value
= store_return_value
;
3700 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3702 if (gdbarch
->extract_struct_value_address
== 0)
3703 internal_error (__FILE__
, __LINE__
,
3704 "gdbarch: gdbarch_extract_struct_value_address invalid");
3705 if (gdbarch_debug
>= 2)
3706 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3707 return gdbarch
->extract_struct_value_address (regbuf
);
3711 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3712 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3714 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3718 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3720 if (gdbarch
->use_struct_convention
== 0)
3721 internal_error (__FILE__
, __LINE__
,
3722 "gdbarch: gdbarch_use_struct_convention invalid");
3723 if (gdbarch_debug
>= 2)
3724 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3725 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3729 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3730 gdbarch_use_struct_convention_ftype use_struct_convention
)
3732 gdbarch
->use_struct_convention
= use_struct_convention
;
3736 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3738 if (gdbarch
->frame_init_saved_regs
== 0)
3739 internal_error (__FILE__
, __LINE__
,
3740 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3741 if (gdbarch_debug
>= 2)
3742 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3743 gdbarch
->frame_init_saved_regs (frame
);
3747 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3748 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3750 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3754 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3756 if (gdbarch
->init_extra_frame_info
== 0)
3757 internal_error (__FILE__
, __LINE__
,
3758 "gdbarch: gdbarch_init_extra_frame_info invalid");
3759 if (gdbarch_debug
>= 2)
3760 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3761 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3765 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3766 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3768 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3772 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3774 if (gdbarch
->skip_prologue
== 0)
3775 internal_error (__FILE__
, __LINE__
,
3776 "gdbarch: gdbarch_skip_prologue invalid");
3777 if (gdbarch_debug
>= 2)
3778 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3779 return gdbarch
->skip_prologue (ip
);
3783 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3784 gdbarch_skip_prologue_ftype skip_prologue
)
3786 gdbarch
->skip_prologue
= skip_prologue
;
3790 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3792 if (gdbarch
->prologue_frameless_p
== 0)
3793 internal_error (__FILE__
, __LINE__
,
3794 "gdbarch: gdbarch_prologue_frameless_p invalid");
3795 if (gdbarch_debug
>= 2)
3796 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3797 return gdbarch
->prologue_frameless_p (ip
);
3801 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3802 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3804 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3808 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3810 if (gdbarch
->inner_than
== 0)
3811 internal_error (__FILE__
, __LINE__
,
3812 "gdbarch: gdbarch_inner_than invalid");
3813 if (gdbarch_debug
>= 2)
3814 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3815 return gdbarch
->inner_than (lhs
, rhs
);
3819 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3820 gdbarch_inner_than_ftype inner_than
)
3822 gdbarch
->inner_than
= inner_than
;
3826 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3828 if (gdbarch
->breakpoint_from_pc
== 0)
3829 internal_error (__FILE__
, __LINE__
,
3830 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3831 if (gdbarch_debug
>= 2)
3832 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3833 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3837 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3838 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3840 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3844 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3846 if (gdbarch
->memory_insert_breakpoint
== 0)
3847 internal_error (__FILE__
, __LINE__
,
3848 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3849 if (gdbarch_debug
>= 2)
3850 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3851 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3855 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3856 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3858 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3862 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3864 if (gdbarch
->memory_remove_breakpoint
== 0)
3865 internal_error (__FILE__
, __LINE__
,
3866 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3867 if (gdbarch_debug
>= 2)
3868 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3869 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3873 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3874 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3876 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3880 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3882 if (gdbarch
->decr_pc_after_break
== -1)
3883 internal_error (__FILE__
, __LINE__
,
3884 "gdbarch: gdbarch_decr_pc_after_break invalid");
3885 if (gdbarch_debug
>= 2)
3886 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3887 return gdbarch
->decr_pc_after_break
;
3891 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3892 CORE_ADDR decr_pc_after_break
)
3894 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3898 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3900 if (gdbarch
->prepare_to_proceed
== 0)
3901 internal_error (__FILE__
, __LINE__
,
3902 "gdbarch: gdbarch_prepare_to_proceed invalid");
3903 if (gdbarch_debug
>= 2)
3904 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3905 return gdbarch
->prepare_to_proceed (select_it
);
3909 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3910 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3912 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3916 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3918 if (gdbarch
->function_start_offset
== -1)
3919 internal_error (__FILE__
, __LINE__
,
3920 "gdbarch: gdbarch_function_start_offset invalid");
3921 if (gdbarch_debug
>= 2)
3922 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3923 return gdbarch
->function_start_offset
;
3927 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3928 CORE_ADDR function_start_offset
)
3930 gdbarch
->function_start_offset
= function_start_offset
;
3934 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3936 if (gdbarch
->remote_translate_xfer_address
== 0)
3937 internal_error (__FILE__
, __LINE__
,
3938 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3939 if (gdbarch_debug
>= 2)
3940 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3941 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3945 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3946 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3948 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3952 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3954 if (gdbarch
->frame_args_skip
== -1)
3955 internal_error (__FILE__
, __LINE__
,
3956 "gdbarch: gdbarch_frame_args_skip invalid");
3957 if (gdbarch_debug
>= 2)
3958 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3959 return gdbarch
->frame_args_skip
;
3963 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3964 CORE_ADDR frame_args_skip
)
3966 gdbarch
->frame_args_skip
= frame_args_skip
;
3970 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3972 if (gdbarch
->frameless_function_invocation
== 0)
3973 internal_error (__FILE__
, __LINE__
,
3974 "gdbarch: gdbarch_frameless_function_invocation invalid");
3975 if (gdbarch_debug
>= 2)
3976 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3977 return gdbarch
->frameless_function_invocation (fi
);
3981 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3982 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3984 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3988 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3990 if (gdbarch
->frame_chain
== 0)
3991 internal_error (__FILE__
, __LINE__
,
3992 "gdbarch: gdbarch_frame_chain invalid");
3993 if (gdbarch_debug
>= 2)
3994 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3995 return gdbarch
->frame_chain (frame
);
3999 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4000 gdbarch_frame_chain_ftype frame_chain
)
4002 gdbarch
->frame_chain
= frame_chain
;
4006 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4008 if (gdbarch
->frame_chain_valid
== 0)
4009 internal_error (__FILE__
, __LINE__
,
4010 "gdbarch: gdbarch_frame_chain_valid invalid");
4011 if (gdbarch_debug
>= 2)
4012 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4013 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4017 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4018 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4020 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4024 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4026 if (gdbarch
->frame_saved_pc
== 0)
4027 internal_error (__FILE__
, __LINE__
,
4028 "gdbarch: gdbarch_frame_saved_pc invalid");
4029 if (gdbarch_debug
>= 2)
4030 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4031 return gdbarch
->frame_saved_pc (fi
);
4035 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4036 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4038 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4042 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4044 if (gdbarch
->frame_args_address
== 0)
4045 internal_error (__FILE__
, __LINE__
,
4046 "gdbarch: gdbarch_frame_args_address invalid");
4047 if (gdbarch_debug
>= 2)
4048 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4049 return gdbarch
->frame_args_address (fi
);
4053 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4054 gdbarch_frame_args_address_ftype frame_args_address
)
4056 gdbarch
->frame_args_address
= frame_args_address
;
4060 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4062 if (gdbarch
->frame_locals_address
== 0)
4063 internal_error (__FILE__
, __LINE__
,
4064 "gdbarch: gdbarch_frame_locals_address invalid");
4065 if (gdbarch_debug
>= 2)
4066 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4067 return gdbarch
->frame_locals_address (fi
);
4071 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4072 gdbarch_frame_locals_address_ftype frame_locals_address
)
4074 gdbarch
->frame_locals_address
= frame_locals_address
;
4078 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4080 if (gdbarch
->saved_pc_after_call
== 0)
4081 internal_error (__FILE__
, __LINE__
,
4082 "gdbarch: gdbarch_saved_pc_after_call invalid");
4083 if (gdbarch_debug
>= 2)
4084 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4085 return gdbarch
->saved_pc_after_call (frame
);
4089 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4090 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4092 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4096 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4098 if (gdbarch
->frame_num_args
== 0)
4099 internal_error (__FILE__
, __LINE__
,
4100 "gdbarch: gdbarch_frame_num_args invalid");
4101 if (gdbarch_debug
>= 2)
4102 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4103 return gdbarch
->frame_num_args (frame
);
4107 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4108 gdbarch_frame_num_args_ftype frame_num_args
)
4110 gdbarch
->frame_num_args
= frame_num_args
;
4114 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4116 return gdbarch
->stack_align
!= 0;
4120 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4122 if (gdbarch
->stack_align
== 0)
4123 internal_error (__FILE__
, __LINE__
,
4124 "gdbarch: gdbarch_stack_align invalid");
4125 if (gdbarch_debug
>= 2)
4126 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4127 return gdbarch
->stack_align (sp
);
4131 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4132 gdbarch_stack_align_ftype stack_align
)
4134 gdbarch
->stack_align
= stack_align
;
4138 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4140 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4141 if (gdbarch_debug
>= 2)
4142 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4143 return gdbarch
->extra_stack_alignment_needed
;
4147 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4148 int extra_stack_alignment_needed
)
4150 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4154 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4156 return gdbarch
->reg_struct_has_addr
!= 0;
4160 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4162 if (gdbarch
->reg_struct_has_addr
== 0)
4163 internal_error (__FILE__
, __LINE__
,
4164 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4165 if (gdbarch_debug
>= 2)
4166 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4167 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4171 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4172 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4174 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4178 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4180 return gdbarch
->save_dummy_frame_tos
!= 0;
4184 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4186 if (gdbarch
->save_dummy_frame_tos
== 0)
4187 internal_error (__FILE__
, __LINE__
,
4188 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4189 if (gdbarch_debug
>= 2)
4190 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4191 gdbarch
->save_dummy_frame_tos (sp
);
4195 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4196 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4198 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4202 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4204 if (gdbarch_debug
>= 2)
4205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4206 return gdbarch
->parm_boundary
;
4210 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4213 gdbarch
->parm_boundary
= parm_boundary
;
4216 const struct floatformat
*
4217 gdbarch_float_format (struct gdbarch
*gdbarch
)
4219 if (gdbarch_debug
>= 2)
4220 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4221 return gdbarch
->float_format
;
4225 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4226 const struct floatformat
* float_format
)
4228 gdbarch
->float_format
= float_format
;
4231 const struct floatformat
*
4232 gdbarch_double_format (struct gdbarch
*gdbarch
)
4234 if (gdbarch_debug
>= 2)
4235 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4236 return gdbarch
->double_format
;
4240 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4241 const struct floatformat
* double_format
)
4243 gdbarch
->double_format
= double_format
;
4246 const struct floatformat
*
4247 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4249 if (gdbarch_debug
>= 2)
4250 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4251 return gdbarch
->long_double_format
;
4255 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4256 const struct floatformat
* long_double_format
)
4258 gdbarch
->long_double_format
= long_double_format
;
4262 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4264 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4265 internal_error (__FILE__
, __LINE__
,
4266 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4267 if (gdbarch_debug
>= 2)
4268 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4269 return gdbarch
->convert_from_func_ptr_addr (addr
);
4273 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4274 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4276 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4280 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4282 return gdbarch
->software_single_step
!= 0;
4286 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4288 if (gdbarch
->software_single_step
== 0)
4289 internal_error (__FILE__
, __LINE__
,
4290 "gdbarch: gdbarch_software_single_step invalid");
4291 if (gdbarch_debug
>= 2)
4292 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4293 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4297 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4298 gdbarch_software_single_step_ftype software_single_step
)
4300 gdbarch
->software_single_step
= software_single_step
;
4304 /* Keep a registry of per-architecture data-pointers required by GDB
4310 gdbarch_data_init_ftype
*init
;
4311 gdbarch_data_free_ftype
*free
;
4314 struct gdbarch_data_registration
4316 struct gdbarch_data
*data
;
4317 struct gdbarch_data_registration
*next
;
4320 struct gdbarch_data_registry
4323 struct gdbarch_data_registration
*registrations
;
4326 struct gdbarch_data_registry gdbarch_data_registry
=
4331 struct gdbarch_data
*
4332 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4333 gdbarch_data_free_ftype
*free
)
4335 struct gdbarch_data_registration
**curr
;
4336 for (curr
= &gdbarch_data_registry
.registrations
;
4338 curr
= &(*curr
)->next
);
4339 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4340 (*curr
)->next
= NULL
;
4341 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4342 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4343 (*curr
)->data
->init
= init
;
4344 (*curr
)->data
->free
= free
;
4345 return (*curr
)->data
;
4349 /* Walk through all the registered users initializing each in turn. */
4352 init_gdbarch_data (struct gdbarch
*gdbarch
)
4354 struct gdbarch_data_registration
*rego
;
4355 for (rego
= gdbarch_data_registry
.registrations
;
4359 struct gdbarch_data
*data
= rego
->data
;
4360 gdb_assert (data
->index
< gdbarch
->nr_data
);
4361 if (data
->init
!= NULL
)
4363 void *pointer
= data
->init (gdbarch
);
4364 set_gdbarch_data (gdbarch
, data
, pointer
);
4369 /* Create/delete the gdbarch data vector. */
4372 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4374 gdb_assert (gdbarch
->data
== NULL
);
4375 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4376 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4380 free_gdbarch_data (struct gdbarch
*gdbarch
)
4382 struct gdbarch_data_registration
*rego
;
4383 gdb_assert (gdbarch
->data
!= NULL
);
4384 for (rego
= gdbarch_data_registry
.registrations
;
4388 struct gdbarch_data
*data
= rego
->data
;
4389 gdb_assert (data
->index
< gdbarch
->nr_data
);
4390 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4392 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4393 gdbarch
->data
[data
->index
] = NULL
;
4396 xfree (gdbarch
->data
);
4397 gdbarch
->data
= NULL
;
4401 /* Initialize the current value of thee specified per-architecture
4405 set_gdbarch_data (struct gdbarch
*gdbarch
,
4406 struct gdbarch_data
*data
,
4409 gdb_assert (data
->index
< gdbarch
->nr_data
);
4410 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4411 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4412 gdbarch
->data
[data
->index
] = pointer
;
4415 /* Return the current value of the specified per-architecture
4419 gdbarch_data (struct gdbarch_data
*data
)
4421 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4422 return current_gdbarch
->data
[data
->index
];
4427 /* Keep a registry of swapped data required by GDB modules. */
4432 struct gdbarch_swap_registration
*source
;
4433 struct gdbarch_swap
*next
;
4436 struct gdbarch_swap_registration
4439 unsigned long sizeof_data
;
4440 gdbarch_swap_ftype
*init
;
4441 struct gdbarch_swap_registration
*next
;
4444 struct gdbarch_swap_registry
4447 struct gdbarch_swap_registration
*registrations
;
4450 struct gdbarch_swap_registry gdbarch_swap_registry
=
4456 register_gdbarch_swap (void *data
,
4457 unsigned long sizeof_data
,
4458 gdbarch_swap_ftype
*init
)
4460 struct gdbarch_swap_registration
**rego
;
4461 for (rego
= &gdbarch_swap_registry
.registrations
;
4463 rego
= &(*rego
)->next
);
4464 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4465 (*rego
)->next
= NULL
;
4466 (*rego
)->init
= init
;
4467 (*rego
)->data
= data
;
4468 (*rego
)->sizeof_data
= sizeof_data
;
4473 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4475 struct gdbarch_swap_registration
*rego
;
4476 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4477 for (rego
= gdbarch_swap_registry
.registrations
;
4481 if (rego
->data
!= NULL
)
4483 (*curr
) = XMALLOC (struct gdbarch_swap
);
4484 (*curr
)->source
= rego
;
4485 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4486 (*curr
)->next
= NULL
;
4487 memset (rego
->data
, 0, rego
->sizeof_data
);
4488 curr
= &(*curr
)->next
;
4490 if (rego
->init
!= NULL
)
4496 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4498 struct gdbarch_swap
*curr
;
4499 for (curr
= gdbarch
->swap
;
4502 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4506 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4508 struct gdbarch_swap
*curr
;
4509 for (curr
= gdbarch
->swap
;
4512 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4516 /* Keep a registry of the architectures known by GDB. */
4518 struct gdbarch_registration
4520 enum bfd_architecture bfd_architecture
;
4521 gdbarch_init_ftype
*init
;
4522 gdbarch_dump_tdep_ftype
*dump_tdep
;
4523 struct gdbarch_list
*arches
;
4524 struct gdbarch_registration
*next
;
4527 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4530 append_name (const char ***buf
, int *nr
, const char *name
)
4532 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4538 gdbarch_printable_names (void)
4542 /* Accumulate a list of names based on the registed list of
4544 enum bfd_architecture a
;
4546 const char **arches
= NULL
;
4547 struct gdbarch_registration
*rego
;
4548 for (rego
= gdbarch_registry
;
4552 const struct bfd_arch_info
*ap
;
4553 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4555 internal_error (__FILE__
, __LINE__
,
4556 "gdbarch_architecture_names: multi-arch unknown");
4559 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4564 append_name (&arches
, &nr_arches
, NULL
);
4568 /* Just return all the architectures that BFD knows. Assume that
4569 the legacy architecture framework supports them. */
4570 return bfd_arch_list ();
4575 gdbarch_register (enum bfd_architecture bfd_architecture
,
4576 gdbarch_init_ftype
*init
,
4577 gdbarch_dump_tdep_ftype
*dump_tdep
)
4579 struct gdbarch_registration
**curr
;
4580 const struct bfd_arch_info
*bfd_arch_info
;
4581 /* Check that BFD recognizes this architecture */
4582 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4583 if (bfd_arch_info
== NULL
)
4585 internal_error (__FILE__
, __LINE__
,
4586 "gdbarch: Attempt to register unknown architecture (%d)",
4589 /* Check that we haven't seen this architecture before */
4590 for (curr
= &gdbarch_registry
;
4592 curr
= &(*curr
)->next
)
4594 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4595 internal_error (__FILE__
, __LINE__
,
4596 "gdbarch: Duplicate registraration of architecture (%s)",
4597 bfd_arch_info
->printable_name
);
4601 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4602 bfd_arch_info
->printable_name
,
4605 (*curr
) = XMALLOC (struct gdbarch_registration
);
4606 (*curr
)->bfd_architecture
= bfd_architecture
;
4607 (*curr
)->init
= init
;
4608 (*curr
)->dump_tdep
= dump_tdep
;
4609 (*curr
)->arches
= NULL
;
4610 (*curr
)->next
= NULL
;
4611 /* When non- multi-arch, install whatever target dump routine we've
4612 been provided - hopefully that routine has been written correctly
4613 and works regardless of multi-arch. */
4614 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4615 && startup_gdbarch
.dump_tdep
== NULL
)
4616 startup_gdbarch
.dump_tdep
= dump_tdep
;
4620 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4621 gdbarch_init_ftype
*init
)
4623 gdbarch_register (bfd_architecture
, init
, NULL
);
4627 /* Look for an architecture using gdbarch_info. Base search on only
4628 BFD_ARCH_INFO and BYTE_ORDER. */
4630 struct gdbarch_list
*
4631 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4632 const struct gdbarch_info
*info
)
4634 for (; arches
!= NULL
; arches
= arches
->next
)
4636 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4638 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4646 /* Update the current architecture. Return ZERO if the update request
4650 gdbarch_update_p (struct gdbarch_info info
)
4652 struct gdbarch
*new_gdbarch
;
4653 struct gdbarch_list
**list
;
4654 struct gdbarch_registration
*rego
;
4656 /* Fill in missing parts of the INFO struct using a number of
4657 sources: ``set ...''; INFOabfd supplied; existing target. */
4659 /* ``(gdb) set architecture ...'' */
4660 if (info
.bfd_arch_info
== NULL
4661 && !TARGET_ARCHITECTURE_AUTO
)
4662 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4663 if (info
.bfd_arch_info
== NULL
4664 && info
.abfd
!= NULL
4665 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4666 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4667 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4668 if (info
.bfd_arch_info
== NULL
)
4669 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4671 /* ``(gdb) set byte-order ...'' */
4672 if (info
.byte_order
== 0
4673 && !TARGET_BYTE_ORDER_AUTO
)
4674 info
.byte_order
= TARGET_BYTE_ORDER
;
4675 /* From the INFO struct. */
4676 if (info
.byte_order
== 0
4677 && info
.abfd
!= NULL
)
4678 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4679 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4681 /* From the current target. */
4682 if (info
.byte_order
== 0)
4683 info
.byte_order
= TARGET_BYTE_ORDER
;
4685 /* Must have found some sort of architecture. */
4686 gdb_assert (info
.bfd_arch_info
!= NULL
);
4690 fprintf_unfiltered (gdb_stdlog
,
4691 "gdbarch_update: info.bfd_arch_info %s\n",
4692 (info
.bfd_arch_info
!= NULL
4693 ? info
.bfd_arch_info
->printable_name
4695 fprintf_unfiltered (gdb_stdlog
,
4696 "gdbarch_update: info.byte_order %d (%s)\n",
4698 (info
.byte_order
== BIG_ENDIAN
? "big"
4699 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4701 fprintf_unfiltered (gdb_stdlog
,
4702 "gdbarch_update: info.abfd 0x%lx\n",
4704 fprintf_unfiltered (gdb_stdlog
,
4705 "gdbarch_update: info.tdep_info 0x%lx\n",
4706 (long) info
.tdep_info
);
4709 /* Find the target that knows about this architecture. */
4710 for (rego
= gdbarch_registry
;
4713 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4718 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4722 /* Ask the target for a replacement architecture. */
4723 new_gdbarch
= rego
->init (info
, rego
->arches
);
4725 /* Did the target like it? No. Reject the change. */
4726 if (new_gdbarch
== NULL
)
4729 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4733 /* Did the architecture change? No. Do nothing. */
4734 if (current_gdbarch
== new_gdbarch
)
4737 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4739 new_gdbarch
->bfd_arch_info
->printable_name
);
4743 /* Swap all data belonging to the old target out */
4744 swapout_gdbarch_swap (current_gdbarch
);
4746 /* Is this a pre-existing architecture? Yes. Swap it in. */
4747 for (list
= ®o
->arches
;
4749 list
= &(*list
)->next
)
4751 if ((*list
)->gdbarch
== new_gdbarch
)
4754 fprintf_unfiltered (gdb_stdlog
,
4755 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4757 new_gdbarch
->bfd_arch_info
->printable_name
);
4758 current_gdbarch
= new_gdbarch
;
4759 swapin_gdbarch_swap (new_gdbarch
);
4764 /* Append this new architecture to this targets list. */
4765 (*list
) = XMALLOC (struct gdbarch_list
);
4766 (*list
)->next
= NULL
;
4767 (*list
)->gdbarch
= new_gdbarch
;
4769 /* Switch to this new architecture. Dump it out. */
4770 current_gdbarch
= new_gdbarch
;
4773 fprintf_unfiltered (gdb_stdlog
,
4774 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4776 new_gdbarch
->bfd_arch_info
->printable_name
);
4779 /* Check that the newly installed architecture is valid. Plug in
4780 any post init values. */
4781 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4782 verify_gdbarch (new_gdbarch
);
4784 /* Initialize the per-architecture memory (swap) areas.
4785 CURRENT_GDBARCH must be update before these modules are
4787 init_gdbarch_swap (new_gdbarch
);
4789 /* Initialize the per-architecture data-pointer of all parties that
4790 registered an interest in this architecture. CURRENT_GDBARCH
4791 must be updated before these modules are called. */
4792 init_gdbarch_data (new_gdbarch
);
4795 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4803 /* Pointer to the target-dependent disassembly function. */
4804 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4805 disassemble_info tm_print_insn_info
;
4808 extern void _initialize_gdbarch (void);
4811 _initialize_gdbarch (void)
4813 struct cmd_list_element
*c
;
4815 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4816 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4817 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4818 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4819 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4821 add_show_from_set (add_set_cmd ("arch",
4824 (char *)&gdbarch_debug
,
4825 "Set architecture debugging.\n\
4826 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4828 c
= add_set_cmd ("archdebug",
4831 (char *)&gdbarch_debug
,
4832 "Set architecture debugging.\n\
4833 When non-zero, architecture debugging is enabled.", &setlist
);
4835 deprecate_cmd (c
, "set debug arch");
4836 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");