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 /* Skip verify of extract_struct_value_address, has predicate */
694 if ((GDB_MULTI_ARCH
>= 2)
695 && (gdbarch
->use_struct_convention
== 0))
696 internal_error (__FILE__
, __LINE__
,
697 "gdbarch: verify_gdbarch: use_struct_convention invalid");
698 if ((GDB_MULTI_ARCH
>= 2)
699 && (gdbarch
->frame_init_saved_regs
== 0))
700 internal_error (__FILE__
, __LINE__
,
701 "gdbarch: verify_gdbarch: frame_init_saved_regs invalid");
702 if ((GDB_MULTI_ARCH
>= 2)
703 && (gdbarch
->init_extra_frame_info
== 0))
704 internal_error (__FILE__
, __LINE__
,
705 "gdbarch: verify_gdbarch: init_extra_frame_info invalid");
706 if ((GDB_MULTI_ARCH
>= 2)
707 && (gdbarch
->skip_prologue
== 0))
708 internal_error (__FILE__
, __LINE__
,
709 "gdbarch: verify_gdbarch: skip_prologue invalid");
710 /* Skip verify of prologue_frameless_p, invalid_p == 0 */
711 if ((GDB_MULTI_ARCH
>= 2)
712 && (gdbarch
->inner_than
== 0))
713 internal_error (__FILE__
, __LINE__
,
714 "gdbarch: verify_gdbarch: inner_than invalid");
715 /* Skip verify of breakpoint_from_pc, invalid_p == 0 */
716 /* Skip verify of memory_insert_breakpoint, invalid_p == 0 */
717 /* Skip verify of memory_remove_breakpoint, invalid_p == 0 */
718 if ((GDB_MULTI_ARCH
>= 2)
719 && (gdbarch
->decr_pc_after_break
== -1))
720 internal_error (__FILE__
, __LINE__
,
721 "gdbarch: verify_gdbarch: decr_pc_after_break invalid");
722 /* Skip verify of prepare_to_proceed, invalid_p == 0 */
723 if ((GDB_MULTI_ARCH
>= 2)
724 && (gdbarch
->function_start_offset
== -1))
725 internal_error (__FILE__
, __LINE__
,
726 "gdbarch: verify_gdbarch: function_start_offset invalid");
727 /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
728 if ((GDB_MULTI_ARCH
>= 2)
729 && (gdbarch
->frame_args_skip
== -1))
730 internal_error (__FILE__
, __LINE__
,
731 "gdbarch: verify_gdbarch: frame_args_skip invalid");
732 /* Skip verify of frameless_function_invocation, invalid_p == 0 */
733 if ((GDB_MULTI_ARCH
>= 2)
734 && (gdbarch
->frame_chain
== 0))
735 internal_error (__FILE__
, __LINE__
,
736 "gdbarch: verify_gdbarch: frame_chain invalid");
737 if ((GDB_MULTI_ARCH
>= 1)
738 && (gdbarch
->frame_chain_valid
== 0))
739 internal_error (__FILE__
, __LINE__
,
740 "gdbarch: verify_gdbarch: frame_chain_valid invalid");
741 if ((GDB_MULTI_ARCH
>= 2)
742 && (gdbarch
->frame_saved_pc
== 0))
743 internal_error (__FILE__
, __LINE__
,
744 "gdbarch: verify_gdbarch: frame_saved_pc invalid");
745 if ((GDB_MULTI_ARCH
>= 2)
746 && (gdbarch
->frame_args_address
== 0))
747 internal_error (__FILE__
, __LINE__
,
748 "gdbarch: verify_gdbarch: frame_args_address invalid");
749 if ((GDB_MULTI_ARCH
>= 2)
750 && (gdbarch
->frame_locals_address
== 0))
751 internal_error (__FILE__
, __LINE__
,
752 "gdbarch: verify_gdbarch: frame_locals_address invalid");
753 if ((GDB_MULTI_ARCH
>= 2)
754 && (gdbarch
->saved_pc_after_call
== 0))
755 internal_error (__FILE__
, __LINE__
,
756 "gdbarch: verify_gdbarch: saved_pc_after_call invalid");
757 if ((GDB_MULTI_ARCH
>= 2)
758 && (gdbarch
->frame_num_args
== 0))
759 internal_error (__FILE__
, __LINE__
,
760 "gdbarch: verify_gdbarch: frame_num_args invalid");
761 /* Skip verify of stack_align, has predicate */
762 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
763 /* Skip verify of reg_struct_has_addr, has predicate */
764 /* Skip verify of save_dummy_frame_tos, has predicate */
765 if (gdbarch
->float_format
== 0)
766 gdbarch
->float_format
= default_float_format (gdbarch
);
767 if (gdbarch
->double_format
== 0)
768 gdbarch
->double_format
= default_double_format (gdbarch
);
769 if (gdbarch
->long_double_format
== 0)
770 gdbarch
->long_double_format
= &floatformat_unknown
;
771 /* Skip verify of convert_from_func_ptr_addr, invalid_p == 0 */
772 /* Skip verify of software_single_step, has predicate */
776 /* Print out the details of the current architecture. */
778 /* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
779 just happens to match the global variable ``current_gdbarch''. That
780 way macros refering to that variable get the local and not the global
781 version - ulgh. Once everything is parameterised with gdbarch, this
785 gdbarch_dump (struct gdbarch
*gdbarch
, struct ui_file
*file
)
787 fprintf_unfiltered (file
,
788 "gdbarch_dump: GDB_MULTI_ARCH = %d\n",
790 #ifdef TARGET_ARCHITECTURE
791 fprintf_unfiltered (file
,
792 "gdbarch_dump: TARGET_ARCHITECTURE # %s\n",
793 XSTRING (TARGET_ARCHITECTURE
));
795 #ifdef TARGET_BYTE_ORDER
796 fprintf_unfiltered (file
,
797 "gdbarch_dump: TARGET_BYTE_ORDER # %s\n",
798 XSTRING (TARGET_BYTE_ORDER
));
800 #ifdef TARGET_SHORT_BIT
801 fprintf_unfiltered (file
,
802 "gdbarch_dump: TARGET_SHORT_BIT # %s\n",
803 XSTRING (TARGET_SHORT_BIT
));
805 #ifdef TARGET_INT_BIT
806 fprintf_unfiltered (file
,
807 "gdbarch_dump: TARGET_INT_BIT # %s\n",
808 XSTRING (TARGET_INT_BIT
));
810 #ifdef TARGET_LONG_BIT
811 fprintf_unfiltered (file
,
812 "gdbarch_dump: TARGET_LONG_BIT # %s\n",
813 XSTRING (TARGET_LONG_BIT
));
815 #ifdef TARGET_LONG_LONG_BIT
816 fprintf_unfiltered (file
,
817 "gdbarch_dump: TARGET_LONG_LONG_BIT # %s\n",
818 XSTRING (TARGET_LONG_LONG_BIT
));
820 #ifdef TARGET_FLOAT_BIT
821 fprintf_unfiltered (file
,
822 "gdbarch_dump: TARGET_FLOAT_BIT # %s\n",
823 XSTRING (TARGET_FLOAT_BIT
));
825 #ifdef TARGET_DOUBLE_BIT
826 fprintf_unfiltered (file
,
827 "gdbarch_dump: TARGET_DOUBLE_BIT # %s\n",
828 XSTRING (TARGET_DOUBLE_BIT
));
830 #ifdef TARGET_LONG_DOUBLE_BIT
831 fprintf_unfiltered (file
,
832 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT # %s\n",
833 XSTRING (TARGET_LONG_DOUBLE_BIT
));
835 #ifdef TARGET_PTR_BIT
836 fprintf_unfiltered (file
,
837 "gdbarch_dump: TARGET_PTR_BIT # %s\n",
838 XSTRING (TARGET_PTR_BIT
));
840 #ifdef TARGET_ADDR_BIT
841 fprintf_unfiltered (file
,
842 "gdbarch_dump: TARGET_ADDR_BIT # %s\n",
843 XSTRING (TARGET_ADDR_BIT
));
845 #ifdef TARGET_BFD_VMA_BIT
846 fprintf_unfiltered (file
,
847 "gdbarch_dump: TARGET_BFD_VMA_BIT # %s\n",
848 XSTRING (TARGET_BFD_VMA_BIT
));
851 fprintf_unfiltered (file
,
852 "gdbarch_dump: IEEE_FLOAT # %s\n",
853 XSTRING (IEEE_FLOAT
));
855 #ifdef TARGET_READ_PC
856 fprintf_unfiltered (file
,
857 "gdbarch_dump: %s # %s\n",
858 "TARGET_READ_PC(ptid)",
859 XSTRING (TARGET_READ_PC (ptid
)));
861 #if defined (TARGET_WRITE_PC) && GDB_MULTI_ARCH
862 /* Macro might contain `[{}]' when not multi-arch */
863 fprintf_unfiltered (file
,
864 "gdbarch_dump: %s # %s\n",
865 "TARGET_WRITE_PC(val, ptid)",
866 XSTRING (TARGET_WRITE_PC (val
, ptid
)));
868 #ifdef TARGET_READ_FP
869 fprintf_unfiltered (file
,
870 "gdbarch_dump: %s # %s\n",
872 XSTRING (TARGET_READ_FP ()));
874 #if defined (TARGET_WRITE_FP) && GDB_MULTI_ARCH
875 /* Macro might contain `[{}]' when not multi-arch */
876 fprintf_unfiltered (file
,
877 "gdbarch_dump: %s # %s\n",
878 "TARGET_WRITE_FP(val)",
879 XSTRING (TARGET_WRITE_FP (val
)));
881 #ifdef TARGET_READ_SP
882 fprintf_unfiltered (file
,
883 "gdbarch_dump: %s # %s\n",
885 XSTRING (TARGET_READ_SP ()));
887 #if defined (TARGET_WRITE_SP) && GDB_MULTI_ARCH
888 /* Macro might contain `[{}]' when not multi-arch */
889 fprintf_unfiltered (file
,
890 "gdbarch_dump: %s # %s\n",
891 "TARGET_WRITE_SP(val)",
892 XSTRING (TARGET_WRITE_SP (val
)));
895 fprintf_unfiltered (file
,
896 "gdbarch_dump: NUM_REGS # %s\n",
899 #ifdef NUM_PSEUDO_REGS
900 fprintf_unfiltered (file
,
901 "gdbarch_dump: NUM_PSEUDO_REGS # %s\n",
902 XSTRING (NUM_PSEUDO_REGS
));
905 fprintf_unfiltered (file
,
906 "gdbarch_dump: SP_REGNUM # %s\n",
907 XSTRING (SP_REGNUM
));
910 fprintf_unfiltered (file
,
911 "gdbarch_dump: FP_REGNUM # %s\n",
912 XSTRING (FP_REGNUM
));
915 fprintf_unfiltered (file
,
916 "gdbarch_dump: PC_REGNUM # %s\n",
917 XSTRING (PC_REGNUM
));
920 fprintf_unfiltered (file
,
921 "gdbarch_dump: FP0_REGNUM # %s\n",
922 XSTRING (FP0_REGNUM
));
925 fprintf_unfiltered (file
,
926 "gdbarch_dump: NPC_REGNUM # %s\n",
927 XSTRING (NPC_REGNUM
));
930 fprintf_unfiltered (file
,
931 "gdbarch_dump: NNPC_REGNUM # %s\n",
932 XSTRING (NNPC_REGNUM
));
934 #ifdef STAB_REG_TO_REGNUM
935 fprintf_unfiltered (file
,
936 "gdbarch_dump: %s # %s\n",
937 "STAB_REG_TO_REGNUM(stab_regnr)",
938 XSTRING (STAB_REG_TO_REGNUM (stab_regnr
)));
940 #ifdef ECOFF_REG_TO_REGNUM
941 fprintf_unfiltered (file
,
942 "gdbarch_dump: %s # %s\n",
943 "ECOFF_REG_TO_REGNUM(ecoff_regnr)",
944 XSTRING (ECOFF_REG_TO_REGNUM (ecoff_regnr
)));
946 #ifdef DWARF_REG_TO_REGNUM
947 fprintf_unfiltered (file
,
948 "gdbarch_dump: %s # %s\n",
949 "DWARF_REG_TO_REGNUM(dwarf_regnr)",
950 XSTRING (DWARF_REG_TO_REGNUM (dwarf_regnr
)));
952 #ifdef SDB_REG_TO_REGNUM
953 fprintf_unfiltered (file
,
954 "gdbarch_dump: %s # %s\n",
955 "SDB_REG_TO_REGNUM(sdb_regnr)",
956 XSTRING (SDB_REG_TO_REGNUM (sdb_regnr
)));
958 #ifdef DWARF2_REG_TO_REGNUM
959 fprintf_unfiltered (file
,
960 "gdbarch_dump: %s # %s\n",
961 "DWARF2_REG_TO_REGNUM(dwarf2_regnr)",
962 XSTRING (DWARF2_REG_TO_REGNUM (dwarf2_regnr
)));
965 fprintf_unfiltered (file
,
966 "gdbarch_dump: %s # %s\n",
967 "REGISTER_NAME(regnr)",
968 XSTRING (REGISTER_NAME (regnr
)));
971 fprintf_unfiltered (file
,
972 "gdbarch_dump: REGISTER_SIZE # %s\n",
973 XSTRING (REGISTER_SIZE
));
975 #ifdef REGISTER_BYTES
976 fprintf_unfiltered (file
,
977 "gdbarch_dump: REGISTER_BYTES # %s\n",
978 XSTRING (REGISTER_BYTES
));
981 fprintf_unfiltered (file
,
982 "gdbarch_dump: %s # %s\n",
983 "REGISTER_BYTE(reg_nr)",
984 XSTRING (REGISTER_BYTE (reg_nr
)));
986 #ifdef REGISTER_RAW_SIZE
987 fprintf_unfiltered (file
,
988 "gdbarch_dump: %s # %s\n",
989 "REGISTER_RAW_SIZE(reg_nr)",
990 XSTRING (REGISTER_RAW_SIZE (reg_nr
)));
992 #ifdef MAX_REGISTER_RAW_SIZE
993 fprintf_unfiltered (file
,
994 "gdbarch_dump: MAX_REGISTER_RAW_SIZE # %s\n",
995 XSTRING (MAX_REGISTER_RAW_SIZE
));
997 #ifdef REGISTER_VIRTUAL_SIZE
998 fprintf_unfiltered (file
,
999 "gdbarch_dump: %s # %s\n",
1000 "REGISTER_VIRTUAL_SIZE(reg_nr)",
1001 XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr
)));
1003 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1004 fprintf_unfiltered (file
,
1005 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE # %s\n",
1006 XSTRING (MAX_REGISTER_VIRTUAL_SIZE
));
1008 #ifdef REGISTER_VIRTUAL_TYPE
1009 fprintf_unfiltered (file
,
1010 "gdbarch_dump: %s # %s\n",
1011 "REGISTER_VIRTUAL_TYPE(reg_nr)",
1012 XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr
)));
1014 #if defined (DO_REGISTERS_INFO) && GDB_MULTI_ARCH
1015 /* Macro might contain `[{}]' when not multi-arch */
1016 fprintf_unfiltered (file
,
1017 "gdbarch_dump: %s # %s\n",
1018 "DO_REGISTERS_INFO(reg_nr, fpregs)",
1019 XSTRING (DO_REGISTERS_INFO (reg_nr
, fpregs
)));
1021 #ifdef REGISTER_SIM_REGNO
1022 fprintf_unfiltered (file
,
1023 "gdbarch_dump: %s # %s\n",
1024 "REGISTER_SIM_REGNO(reg_nr)",
1025 XSTRING (REGISTER_SIM_REGNO (reg_nr
)));
1027 #ifdef REGISTER_BYTES_OK
1028 fprintf_unfiltered (file
,
1029 "gdbarch_dump: %s # %s\n",
1030 "REGISTER_BYTES_OK(nr_bytes)",
1031 XSTRING (REGISTER_BYTES_OK (nr_bytes
)));
1033 #ifdef USE_GENERIC_DUMMY_FRAMES
1034 fprintf_unfiltered (file
,
1035 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES # %s\n",
1036 XSTRING (USE_GENERIC_DUMMY_FRAMES
));
1038 #ifdef CALL_DUMMY_LOCATION
1039 fprintf_unfiltered (file
,
1040 "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n",
1041 XSTRING (CALL_DUMMY_LOCATION
));
1043 #ifdef CALL_DUMMY_ADDRESS
1044 fprintf_unfiltered (file
,
1045 "gdbarch_dump: %s # %s\n",
1046 "CALL_DUMMY_ADDRESS()",
1047 XSTRING (CALL_DUMMY_ADDRESS ()));
1049 #ifdef CALL_DUMMY_START_OFFSET
1050 fprintf_unfiltered (file
,
1051 "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
1052 XSTRING (CALL_DUMMY_START_OFFSET
));
1054 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1055 fprintf_unfiltered (file
,
1056 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n",
1057 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET
));
1059 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1060 fprintf_unfiltered (file
,
1061 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P # %s\n",
1062 XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET_P
));
1064 #ifdef CALL_DUMMY_LENGTH
1065 fprintf_unfiltered (file
,
1066 "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n",
1067 XSTRING (CALL_DUMMY_LENGTH
));
1069 #ifdef PC_IN_CALL_DUMMY
1070 fprintf_unfiltered (file
,
1071 "gdbarch_dump: %s # %s\n",
1072 "PC_IN_CALL_DUMMY(pc, sp, frame_address)",
1073 XSTRING (PC_IN_CALL_DUMMY (pc
, sp
, frame_address
)));
1076 fprintf_unfiltered (file
,
1077 "gdbarch_dump: CALL_DUMMY_P # %s\n",
1078 XSTRING (CALL_DUMMY_P
));
1080 #ifdef CALL_DUMMY_WORDS
1081 fprintf_unfiltered (file
,
1082 "gdbarch_dump: CALL_DUMMY_WORDS # %s\n",
1083 XSTRING (CALL_DUMMY_WORDS
));
1085 #ifdef SIZEOF_CALL_DUMMY_WORDS
1086 fprintf_unfiltered (file
,
1087 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
1088 XSTRING (SIZEOF_CALL_DUMMY_WORDS
));
1090 #ifdef CALL_DUMMY_STACK_ADJUST_P
1091 fprintf_unfiltered (file
,
1092 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
1093 XSTRING (CALL_DUMMY_STACK_ADJUST_P
));
1095 #ifdef CALL_DUMMY_STACK_ADJUST
1096 fprintf_unfiltered (file
,
1097 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
1098 XSTRING (CALL_DUMMY_STACK_ADJUST
));
1100 #if defined (FIX_CALL_DUMMY) && GDB_MULTI_ARCH
1101 /* Macro might contain `[{}]' when not multi-arch */
1102 fprintf_unfiltered (file
,
1103 "gdbarch_dump: %s # %s\n",
1104 "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)",
1105 XSTRING (FIX_CALL_DUMMY (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
)));
1107 #ifdef BELIEVE_PCC_PROMOTION
1108 fprintf_unfiltered (file
,
1109 "gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
1110 XSTRING (BELIEVE_PCC_PROMOTION
));
1112 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1113 fprintf_unfiltered (file
,
1114 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE # %s\n",
1115 XSTRING (BELIEVE_PCC_PROMOTION_TYPE
));
1117 #ifdef COERCE_FLOAT_TO_DOUBLE
1118 fprintf_unfiltered (file
,
1119 "gdbarch_dump: %s # %s\n",
1120 "COERCE_FLOAT_TO_DOUBLE(formal, actual)",
1121 XSTRING (COERCE_FLOAT_TO_DOUBLE (formal
, actual
)));
1123 #if defined (GET_SAVED_REGISTER) && GDB_MULTI_ARCH
1124 /* Macro might contain `[{}]' when not multi-arch */
1125 fprintf_unfiltered (file
,
1126 "gdbarch_dump: %s # %s\n",
1127 "GET_SAVED_REGISTER(raw_buffer, optimized, addrp, frame, regnum, lval)",
1128 XSTRING (GET_SAVED_REGISTER (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
)));
1130 #ifdef REGISTER_CONVERTIBLE
1131 fprintf_unfiltered (file
,
1132 "gdbarch_dump: %s # %s\n",
1133 "REGISTER_CONVERTIBLE(nr)",
1134 XSTRING (REGISTER_CONVERTIBLE (nr
)));
1136 #if defined (REGISTER_CONVERT_TO_VIRTUAL) && GDB_MULTI_ARCH
1137 /* Macro might contain `[{}]' when not multi-arch */
1138 fprintf_unfiltered (file
,
1139 "gdbarch_dump: %s # %s\n",
1140 "REGISTER_CONVERT_TO_VIRTUAL(regnum, type, from, to)",
1141 XSTRING (REGISTER_CONVERT_TO_VIRTUAL (regnum
, type
, from
, to
)));
1143 #if defined (REGISTER_CONVERT_TO_RAW) && GDB_MULTI_ARCH
1144 /* Macro might contain `[{}]' when not multi-arch */
1145 fprintf_unfiltered (file
,
1146 "gdbarch_dump: %s # %s\n",
1147 "REGISTER_CONVERT_TO_RAW(type, regnum, from, to)",
1148 XSTRING (REGISTER_CONVERT_TO_RAW (type
, regnum
, from
, to
)));
1150 #if defined (FETCH_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1151 /* Macro might contain `[{}]' when not multi-arch */
1152 fprintf_unfiltered (file
,
1153 "gdbarch_dump: %s # %s\n",
1154 "FETCH_PSEUDO_REGISTER(regnum)",
1155 XSTRING (FETCH_PSEUDO_REGISTER (regnum
)));
1157 #if defined (STORE_PSEUDO_REGISTER) && GDB_MULTI_ARCH
1158 /* Macro might contain `[{}]' when not multi-arch */
1159 fprintf_unfiltered (file
,
1160 "gdbarch_dump: %s # %s\n",
1161 "STORE_PSEUDO_REGISTER(regnum)",
1162 XSTRING (STORE_PSEUDO_REGISTER (regnum
)));
1164 #ifdef POINTER_TO_ADDRESS
1165 fprintf_unfiltered (file
,
1166 "gdbarch_dump: %s # %s\n",
1167 "POINTER_TO_ADDRESS(type, buf)",
1168 XSTRING (POINTER_TO_ADDRESS (type
, buf
)));
1170 #if defined (ADDRESS_TO_POINTER) && GDB_MULTI_ARCH
1171 /* Macro might contain `[{}]' when not multi-arch */
1172 fprintf_unfiltered (file
,
1173 "gdbarch_dump: %s # %s\n",
1174 "ADDRESS_TO_POINTER(type, buf, addr)",
1175 XSTRING (ADDRESS_TO_POINTER (type
, buf
, addr
)));
1177 #ifdef RETURN_VALUE_ON_STACK
1178 fprintf_unfiltered (file
,
1179 "gdbarch_dump: %s # %s\n",
1180 "RETURN_VALUE_ON_STACK(type)",
1181 XSTRING (RETURN_VALUE_ON_STACK (type
)));
1183 #if defined (EXTRACT_RETURN_VALUE) && GDB_MULTI_ARCH
1184 /* Macro might contain `[{}]' when not multi-arch */
1185 fprintf_unfiltered (file
,
1186 "gdbarch_dump: %s # %s\n",
1187 "EXTRACT_RETURN_VALUE(type, regbuf, valbuf)",
1188 XSTRING (EXTRACT_RETURN_VALUE (type
, regbuf
, valbuf
)));
1190 #ifdef PUSH_ARGUMENTS
1191 fprintf_unfiltered (file
,
1192 "gdbarch_dump: %s # %s\n",
1193 "PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr)",
1194 XSTRING (PUSH_ARGUMENTS (nargs
, args
, sp
, struct_return
, struct_addr
)));
1196 #if defined (PUSH_DUMMY_FRAME) && GDB_MULTI_ARCH
1197 /* Macro might contain `[{}]' when not multi-arch */
1198 fprintf_unfiltered (file
,
1199 "gdbarch_dump: %s # %s\n",
1200 "PUSH_DUMMY_FRAME(-)",
1201 XSTRING (PUSH_DUMMY_FRAME (-)));
1203 #ifdef PUSH_RETURN_ADDRESS
1204 fprintf_unfiltered (file
,
1205 "gdbarch_dump: %s # %s\n",
1206 "PUSH_RETURN_ADDRESS(pc, sp)",
1207 XSTRING (PUSH_RETURN_ADDRESS (pc
, sp
)));
1209 #if defined (POP_FRAME) && GDB_MULTI_ARCH
1210 /* Macro might contain `[{}]' when not multi-arch */
1211 fprintf_unfiltered (file
,
1212 "gdbarch_dump: %s # %s\n",
1214 XSTRING (POP_FRAME (-)));
1216 #ifdef D10V_MAKE_DADDR
1217 fprintf_unfiltered (file
,
1218 "gdbarch_dump: %s # %s\n",
1219 "D10V_MAKE_DADDR(x)",
1220 XSTRING (D10V_MAKE_DADDR (x
)));
1222 #ifdef D10V_MAKE_IADDR
1223 fprintf_unfiltered (file
,
1224 "gdbarch_dump: %s # %s\n",
1225 "D10V_MAKE_IADDR(x)",
1226 XSTRING (D10V_MAKE_IADDR (x
)));
1229 fprintf_unfiltered (file
,
1230 "gdbarch_dump: %s # %s\n",
1232 XSTRING (D10V_DADDR_P (x
)));
1235 fprintf_unfiltered (file
,
1236 "gdbarch_dump: %s # %s\n",
1238 XSTRING (D10V_IADDR_P (x
)));
1240 #ifdef D10V_CONVERT_DADDR_TO_RAW
1241 fprintf_unfiltered (file
,
1242 "gdbarch_dump: %s # %s\n",
1243 "D10V_CONVERT_DADDR_TO_RAW(x)",
1244 XSTRING (D10V_CONVERT_DADDR_TO_RAW (x
)));
1246 #ifdef D10V_CONVERT_IADDR_TO_RAW
1247 fprintf_unfiltered (file
,
1248 "gdbarch_dump: %s # %s\n",
1249 "D10V_CONVERT_IADDR_TO_RAW(x)",
1250 XSTRING (D10V_CONVERT_IADDR_TO_RAW (x
)));
1252 #if defined (STORE_STRUCT_RETURN) && GDB_MULTI_ARCH
1253 /* Macro might contain `[{}]' when not multi-arch */
1254 fprintf_unfiltered (file
,
1255 "gdbarch_dump: %s # %s\n",
1256 "STORE_STRUCT_RETURN(addr, sp)",
1257 XSTRING (STORE_STRUCT_RETURN (addr
, sp
)));
1259 #if defined (STORE_RETURN_VALUE) && GDB_MULTI_ARCH
1260 /* Macro might contain `[{}]' when not multi-arch */
1261 fprintf_unfiltered (file
,
1262 "gdbarch_dump: %s # %s\n",
1263 "STORE_RETURN_VALUE(type, valbuf)",
1264 XSTRING (STORE_RETURN_VALUE (type
, valbuf
)));
1266 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1267 fprintf_unfiltered (file
,
1268 "gdbarch_dump: %s # %s\n",
1269 "EXTRACT_STRUCT_VALUE_ADDRESS(regbuf)",
1270 XSTRING (EXTRACT_STRUCT_VALUE_ADDRESS (regbuf
)));
1272 #ifdef USE_STRUCT_CONVENTION
1273 fprintf_unfiltered (file
,
1274 "gdbarch_dump: %s # %s\n",
1275 "USE_STRUCT_CONVENTION(gcc_p, value_type)",
1276 XSTRING (USE_STRUCT_CONVENTION (gcc_p
, value_type
)));
1278 #if defined (FRAME_INIT_SAVED_REGS) && GDB_MULTI_ARCH
1279 /* Macro might contain `[{}]' when not multi-arch */
1280 fprintf_unfiltered (file
,
1281 "gdbarch_dump: %s # %s\n",
1282 "FRAME_INIT_SAVED_REGS(frame)",
1283 XSTRING (FRAME_INIT_SAVED_REGS (frame
)));
1285 #if defined (INIT_EXTRA_FRAME_INFO) && GDB_MULTI_ARCH
1286 /* Macro might contain `[{}]' when not multi-arch */
1287 fprintf_unfiltered (file
,
1288 "gdbarch_dump: %s # %s\n",
1289 "INIT_EXTRA_FRAME_INFO(fromleaf, frame)",
1290 XSTRING (INIT_EXTRA_FRAME_INFO (fromleaf
, frame
)));
1292 #ifdef SKIP_PROLOGUE
1293 fprintf_unfiltered (file
,
1294 "gdbarch_dump: %s # %s\n",
1295 "SKIP_PROLOGUE(ip)",
1296 XSTRING (SKIP_PROLOGUE (ip
)));
1298 #ifdef PROLOGUE_FRAMELESS_P
1299 fprintf_unfiltered (file
,
1300 "gdbarch_dump: %s # %s\n",
1301 "PROLOGUE_FRAMELESS_P(ip)",
1302 XSTRING (PROLOGUE_FRAMELESS_P (ip
)));
1305 fprintf_unfiltered (file
,
1306 "gdbarch_dump: %s # %s\n",
1307 "INNER_THAN(lhs, rhs)",
1308 XSTRING (INNER_THAN (lhs
, rhs
)));
1310 #ifdef BREAKPOINT_FROM_PC
1311 fprintf_unfiltered (file
,
1312 "gdbarch_dump: %s # %s\n",
1313 "BREAKPOINT_FROM_PC(pcptr, lenptr)",
1314 XSTRING (BREAKPOINT_FROM_PC (pcptr
, lenptr
)));
1316 #ifdef MEMORY_INSERT_BREAKPOINT
1317 fprintf_unfiltered (file
,
1318 "gdbarch_dump: %s # %s\n",
1319 "MEMORY_INSERT_BREAKPOINT(addr, contents_cache)",
1320 XSTRING (MEMORY_INSERT_BREAKPOINT (addr
, contents_cache
)));
1322 #ifdef MEMORY_REMOVE_BREAKPOINT
1323 fprintf_unfiltered (file
,
1324 "gdbarch_dump: %s # %s\n",
1325 "MEMORY_REMOVE_BREAKPOINT(addr, contents_cache)",
1326 XSTRING (MEMORY_REMOVE_BREAKPOINT (addr
, contents_cache
)));
1328 #ifdef DECR_PC_AFTER_BREAK
1329 fprintf_unfiltered (file
,
1330 "gdbarch_dump: DECR_PC_AFTER_BREAK # %s\n",
1331 XSTRING (DECR_PC_AFTER_BREAK
));
1333 #ifdef PREPARE_TO_PROCEED
1334 fprintf_unfiltered (file
,
1335 "gdbarch_dump: %s # %s\n",
1336 "PREPARE_TO_PROCEED(select_it)",
1337 XSTRING (PREPARE_TO_PROCEED (select_it
)));
1339 #ifdef FUNCTION_START_OFFSET
1340 fprintf_unfiltered (file
,
1341 "gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
1342 XSTRING (FUNCTION_START_OFFSET
));
1344 #if defined (REMOTE_TRANSLATE_XFER_ADDRESS) && GDB_MULTI_ARCH
1345 /* Macro might contain `[{}]' when not multi-arch */
1346 fprintf_unfiltered (file
,
1347 "gdbarch_dump: %s # %s\n",
1348 "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
1349 XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr
, gdb_len
, rem_addr
, rem_len
)));
1351 #ifdef FRAME_ARGS_SKIP
1352 fprintf_unfiltered (file
,
1353 "gdbarch_dump: FRAME_ARGS_SKIP # %s\n",
1354 XSTRING (FRAME_ARGS_SKIP
));
1356 #ifdef FRAMELESS_FUNCTION_INVOCATION
1357 fprintf_unfiltered (file
,
1358 "gdbarch_dump: %s # %s\n",
1359 "FRAMELESS_FUNCTION_INVOCATION(fi)",
1360 XSTRING (FRAMELESS_FUNCTION_INVOCATION (fi
)));
1363 fprintf_unfiltered (file
,
1364 "gdbarch_dump: %s # %s\n",
1365 "FRAME_CHAIN(frame)",
1366 XSTRING (FRAME_CHAIN (frame
)));
1368 #ifdef FRAME_CHAIN_VALID
1369 fprintf_unfiltered (file
,
1370 "gdbarch_dump: %s # %s\n",
1371 "FRAME_CHAIN_VALID(chain, thisframe)",
1372 XSTRING (FRAME_CHAIN_VALID (chain
, thisframe
)));
1374 #ifdef FRAME_SAVED_PC
1375 fprintf_unfiltered (file
,
1376 "gdbarch_dump: %s # %s\n",
1377 "FRAME_SAVED_PC(fi)",
1378 XSTRING (FRAME_SAVED_PC (fi
)));
1380 #ifdef FRAME_ARGS_ADDRESS
1381 fprintf_unfiltered (file
,
1382 "gdbarch_dump: %s # %s\n",
1383 "FRAME_ARGS_ADDRESS(fi)",
1384 XSTRING (FRAME_ARGS_ADDRESS (fi
)));
1386 #ifdef FRAME_LOCALS_ADDRESS
1387 fprintf_unfiltered (file
,
1388 "gdbarch_dump: %s # %s\n",
1389 "FRAME_LOCALS_ADDRESS(fi)",
1390 XSTRING (FRAME_LOCALS_ADDRESS (fi
)));
1392 #ifdef SAVED_PC_AFTER_CALL
1393 fprintf_unfiltered (file
,
1394 "gdbarch_dump: %s # %s\n",
1395 "SAVED_PC_AFTER_CALL(frame)",
1396 XSTRING (SAVED_PC_AFTER_CALL (frame
)));
1398 #ifdef FRAME_NUM_ARGS
1399 fprintf_unfiltered (file
,
1400 "gdbarch_dump: %s # %s\n",
1401 "FRAME_NUM_ARGS(frame)",
1402 XSTRING (FRAME_NUM_ARGS (frame
)));
1405 fprintf_unfiltered (file
,
1406 "gdbarch_dump: %s # %s\n",
1408 XSTRING (STACK_ALIGN (sp
)));
1410 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
1411 fprintf_unfiltered (file
,
1412 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
1413 XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED
));
1415 #ifdef REG_STRUCT_HAS_ADDR
1416 fprintf_unfiltered (file
,
1417 "gdbarch_dump: %s # %s\n",
1418 "REG_STRUCT_HAS_ADDR(gcc_p, type)",
1419 XSTRING (REG_STRUCT_HAS_ADDR (gcc_p
, type
)));
1421 #if defined (SAVE_DUMMY_FRAME_TOS) && GDB_MULTI_ARCH
1422 /* Macro might contain `[{}]' when not multi-arch */
1423 fprintf_unfiltered (file
,
1424 "gdbarch_dump: %s # %s\n",
1425 "SAVE_DUMMY_FRAME_TOS(sp)",
1426 XSTRING (SAVE_DUMMY_FRAME_TOS (sp
)));
1428 #ifdef PARM_BOUNDARY
1429 fprintf_unfiltered (file
,
1430 "gdbarch_dump: PARM_BOUNDARY # %s\n",
1431 XSTRING (PARM_BOUNDARY
));
1433 #ifdef TARGET_FLOAT_FORMAT
1434 fprintf_unfiltered (file
,
1435 "gdbarch_dump: TARGET_FLOAT_FORMAT # %s\n",
1436 XSTRING (TARGET_FLOAT_FORMAT
));
1438 #ifdef TARGET_DOUBLE_FORMAT
1439 fprintf_unfiltered (file
,
1440 "gdbarch_dump: TARGET_DOUBLE_FORMAT # %s\n",
1441 XSTRING (TARGET_DOUBLE_FORMAT
));
1443 #ifdef TARGET_LONG_DOUBLE_FORMAT
1444 fprintf_unfiltered (file
,
1445 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT # %s\n",
1446 XSTRING (TARGET_LONG_DOUBLE_FORMAT
));
1448 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
1449 fprintf_unfiltered (file
,
1450 "gdbarch_dump: %s # %s\n",
1451 "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
1452 XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr
)));
1454 #if defined (SOFTWARE_SINGLE_STEP) && GDB_MULTI_ARCH
1455 /* Macro might contain `[{}]' when not multi-arch */
1456 fprintf_unfiltered (file
,
1457 "gdbarch_dump: %s # %s\n",
1458 "SOFTWARE_SINGLE_STEP(sig, insert_breakpoints_p)",
1459 XSTRING (SOFTWARE_SINGLE_STEP (sig
, insert_breakpoints_p
)));
1461 #ifdef TARGET_ARCHITECTURE
1462 if (TARGET_ARCHITECTURE
!= NULL
)
1463 fprintf_unfiltered (file
,
1464 "gdbarch_dump: TARGET_ARCHITECTURE = %s\n",
1465 TARGET_ARCHITECTURE
->printable_name
);
1467 #ifdef TARGET_BYTE_ORDER
1468 fprintf_unfiltered (file
,
1469 "gdbarch_dump: TARGET_BYTE_ORDER = %ld\n",
1470 (long) TARGET_BYTE_ORDER
);
1472 #ifdef TARGET_SHORT_BIT
1473 fprintf_unfiltered (file
,
1474 "gdbarch_dump: TARGET_SHORT_BIT = %ld\n",
1475 (long) TARGET_SHORT_BIT
);
1477 #ifdef TARGET_INT_BIT
1478 fprintf_unfiltered (file
,
1479 "gdbarch_dump: TARGET_INT_BIT = %ld\n",
1480 (long) TARGET_INT_BIT
);
1482 #ifdef TARGET_LONG_BIT
1483 fprintf_unfiltered (file
,
1484 "gdbarch_dump: TARGET_LONG_BIT = %ld\n",
1485 (long) TARGET_LONG_BIT
);
1487 #ifdef TARGET_LONG_LONG_BIT
1488 fprintf_unfiltered (file
,
1489 "gdbarch_dump: TARGET_LONG_LONG_BIT = %ld\n",
1490 (long) TARGET_LONG_LONG_BIT
);
1492 #ifdef TARGET_FLOAT_BIT
1493 fprintf_unfiltered (file
,
1494 "gdbarch_dump: TARGET_FLOAT_BIT = %ld\n",
1495 (long) TARGET_FLOAT_BIT
);
1497 #ifdef TARGET_DOUBLE_BIT
1498 fprintf_unfiltered (file
,
1499 "gdbarch_dump: TARGET_DOUBLE_BIT = %ld\n",
1500 (long) TARGET_DOUBLE_BIT
);
1502 #ifdef TARGET_LONG_DOUBLE_BIT
1503 fprintf_unfiltered (file
,
1504 "gdbarch_dump: TARGET_LONG_DOUBLE_BIT = %ld\n",
1505 (long) TARGET_LONG_DOUBLE_BIT
);
1507 #ifdef TARGET_PTR_BIT
1508 fprintf_unfiltered (file
,
1509 "gdbarch_dump: TARGET_PTR_BIT = %ld\n",
1510 (long) TARGET_PTR_BIT
);
1512 #ifdef TARGET_ADDR_BIT
1513 fprintf_unfiltered (file
,
1514 "gdbarch_dump: TARGET_ADDR_BIT = %ld\n",
1515 (long) TARGET_ADDR_BIT
);
1517 #ifdef TARGET_BFD_VMA_BIT
1518 fprintf_unfiltered (file
,
1519 "gdbarch_dump: TARGET_BFD_VMA_BIT = %ld\n",
1520 (long) TARGET_BFD_VMA_BIT
);
1523 fprintf_unfiltered (file
,
1524 "gdbarch_dump: IEEE_FLOAT = %ld\n",
1527 #ifdef TARGET_READ_PC
1529 fprintf_unfiltered (file
,
1530 "gdbarch_dump: TARGET_READ_PC = 0x%08lx\n",
1531 (long) current_gdbarch
->read_pc
1532 /*TARGET_READ_PC ()*/);
1534 #ifdef TARGET_WRITE_PC
1536 fprintf_unfiltered (file
,
1537 "gdbarch_dump: TARGET_WRITE_PC = 0x%08lx\n",
1538 (long) current_gdbarch
->write_pc
1539 /*TARGET_WRITE_PC ()*/);
1541 #ifdef TARGET_READ_FP
1543 fprintf_unfiltered (file
,
1544 "gdbarch_dump: TARGET_READ_FP = 0x%08lx\n",
1545 (long) current_gdbarch
->read_fp
1546 /*TARGET_READ_FP ()*/);
1548 #ifdef TARGET_WRITE_FP
1550 fprintf_unfiltered (file
,
1551 "gdbarch_dump: TARGET_WRITE_FP = 0x%08lx\n",
1552 (long) current_gdbarch
->write_fp
1553 /*TARGET_WRITE_FP ()*/);
1555 #ifdef TARGET_READ_SP
1557 fprintf_unfiltered (file
,
1558 "gdbarch_dump: TARGET_READ_SP = 0x%08lx\n",
1559 (long) current_gdbarch
->read_sp
1560 /*TARGET_READ_SP ()*/);
1562 #ifdef TARGET_WRITE_SP
1564 fprintf_unfiltered (file
,
1565 "gdbarch_dump: TARGET_WRITE_SP = 0x%08lx\n",
1566 (long) current_gdbarch
->write_sp
1567 /*TARGET_WRITE_SP ()*/);
1570 fprintf_unfiltered (file
,
1571 "gdbarch_dump: register_read = 0x%08lx\n",
1572 (long) current_gdbarch
->register_read
);
1574 fprintf_unfiltered (file
,
1575 "gdbarch_dump: register_write = 0x%08lx\n",
1576 (long) current_gdbarch
->register_write
);
1578 fprintf_unfiltered (file
,
1579 "gdbarch_dump: NUM_REGS = %ld\n",
1582 #ifdef NUM_PSEUDO_REGS
1583 fprintf_unfiltered (file
,
1584 "gdbarch_dump: NUM_PSEUDO_REGS = %ld\n",
1585 (long) NUM_PSEUDO_REGS
);
1588 fprintf_unfiltered (file
,
1589 "gdbarch_dump: SP_REGNUM = %ld\n",
1593 fprintf_unfiltered (file
,
1594 "gdbarch_dump: FP_REGNUM = %ld\n",
1598 fprintf_unfiltered (file
,
1599 "gdbarch_dump: PC_REGNUM = %ld\n",
1603 fprintf_unfiltered (file
,
1604 "gdbarch_dump: FP0_REGNUM = %ld\n",
1608 fprintf_unfiltered (file
,
1609 "gdbarch_dump: NPC_REGNUM = %ld\n",
1613 fprintf_unfiltered (file
,
1614 "gdbarch_dump: NNPC_REGNUM = %ld\n",
1615 (long) NNPC_REGNUM
);
1617 #ifdef STAB_REG_TO_REGNUM
1619 fprintf_unfiltered (file
,
1620 "gdbarch_dump: STAB_REG_TO_REGNUM = 0x%08lx\n",
1621 (long) current_gdbarch
->stab_reg_to_regnum
1622 /*STAB_REG_TO_REGNUM ()*/);
1624 #ifdef ECOFF_REG_TO_REGNUM
1626 fprintf_unfiltered (file
,
1627 "gdbarch_dump: ECOFF_REG_TO_REGNUM = 0x%08lx\n",
1628 (long) current_gdbarch
->ecoff_reg_to_regnum
1629 /*ECOFF_REG_TO_REGNUM ()*/);
1631 #ifdef DWARF_REG_TO_REGNUM
1633 fprintf_unfiltered (file
,
1634 "gdbarch_dump: DWARF_REG_TO_REGNUM = 0x%08lx\n",
1635 (long) current_gdbarch
->dwarf_reg_to_regnum
1636 /*DWARF_REG_TO_REGNUM ()*/);
1638 #ifdef SDB_REG_TO_REGNUM
1640 fprintf_unfiltered (file
,
1641 "gdbarch_dump: SDB_REG_TO_REGNUM = 0x%08lx\n",
1642 (long) current_gdbarch
->sdb_reg_to_regnum
1643 /*SDB_REG_TO_REGNUM ()*/);
1645 #ifdef DWARF2_REG_TO_REGNUM
1647 fprintf_unfiltered (file
,
1648 "gdbarch_dump: DWARF2_REG_TO_REGNUM = 0x%08lx\n",
1649 (long) current_gdbarch
->dwarf2_reg_to_regnum
1650 /*DWARF2_REG_TO_REGNUM ()*/);
1652 #ifdef REGISTER_NAME
1654 fprintf_unfiltered (file
,
1655 "gdbarch_dump: REGISTER_NAME = 0x%08lx\n",
1656 (long) current_gdbarch
->register_name
1657 /*REGISTER_NAME ()*/);
1659 #ifdef REGISTER_SIZE
1660 fprintf_unfiltered (file
,
1661 "gdbarch_dump: REGISTER_SIZE = %ld\n",
1662 (long) REGISTER_SIZE
);
1664 #ifdef REGISTER_BYTES
1665 fprintf_unfiltered (file
,
1666 "gdbarch_dump: REGISTER_BYTES = %ld\n",
1667 (long) REGISTER_BYTES
);
1669 #ifdef REGISTER_BYTE
1671 fprintf_unfiltered (file
,
1672 "gdbarch_dump: REGISTER_BYTE = 0x%08lx\n",
1673 (long) current_gdbarch
->register_byte
1674 /*REGISTER_BYTE ()*/);
1676 #ifdef REGISTER_RAW_SIZE
1678 fprintf_unfiltered (file
,
1679 "gdbarch_dump: REGISTER_RAW_SIZE = 0x%08lx\n",
1680 (long) current_gdbarch
->register_raw_size
1681 /*REGISTER_RAW_SIZE ()*/);
1683 #ifdef MAX_REGISTER_RAW_SIZE
1684 fprintf_unfiltered (file
,
1685 "gdbarch_dump: MAX_REGISTER_RAW_SIZE = %ld\n",
1686 (long) MAX_REGISTER_RAW_SIZE
);
1688 #ifdef REGISTER_VIRTUAL_SIZE
1690 fprintf_unfiltered (file
,
1691 "gdbarch_dump: REGISTER_VIRTUAL_SIZE = 0x%08lx\n",
1692 (long) current_gdbarch
->register_virtual_size
1693 /*REGISTER_VIRTUAL_SIZE ()*/);
1695 #ifdef MAX_REGISTER_VIRTUAL_SIZE
1696 fprintf_unfiltered (file
,
1697 "gdbarch_dump: MAX_REGISTER_VIRTUAL_SIZE = %ld\n",
1698 (long) MAX_REGISTER_VIRTUAL_SIZE
);
1700 #ifdef REGISTER_VIRTUAL_TYPE
1702 fprintf_unfiltered (file
,
1703 "gdbarch_dump: REGISTER_VIRTUAL_TYPE = 0x%08lx\n",
1704 (long) current_gdbarch
->register_virtual_type
1705 /*REGISTER_VIRTUAL_TYPE ()*/);
1707 #ifdef DO_REGISTERS_INFO
1709 fprintf_unfiltered (file
,
1710 "gdbarch_dump: DO_REGISTERS_INFO = 0x%08lx\n",
1711 (long) current_gdbarch
->do_registers_info
1712 /*DO_REGISTERS_INFO ()*/);
1714 #ifdef REGISTER_SIM_REGNO
1716 fprintf_unfiltered (file
,
1717 "gdbarch_dump: REGISTER_SIM_REGNO = 0x%08lx\n",
1718 (long) current_gdbarch
->register_sim_regno
1719 /*REGISTER_SIM_REGNO ()*/);
1721 #ifdef REGISTER_BYTES_OK
1723 fprintf_unfiltered (file
,
1724 "gdbarch_dump: REGISTER_BYTES_OK = 0x%08lx\n",
1725 (long) current_gdbarch
->register_bytes_ok
1726 /*REGISTER_BYTES_OK ()*/);
1728 #ifdef USE_GENERIC_DUMMY_FRAMES
1729 fprintf_unfiltered (file
,
1730 "gdbarch_dump: USE_GENERIC_DUMMY_FRAMES = %ld\n",
1731 (long) USE_GENERIC_DUMMY_FRAMES
);
1733 #ifdef CALL_DUMMY_LOCATION
1734 fprintf_unfiltered (file
,
1735 "gdbarch_dump: CALL_DUMMY_LOCATION = %ld\n",
1736 (long) CALL_DUMMY_LOCATION
);
1738 #ifdef CALL_DUMMY_ADDRESS
1740 fprintf_unfiltered (file
,
1741 "gdbarch_dump: CALL_DUMMY_ADDRESS = 0x%08lx\n",
1742 (long) current_gdbarch
->call_dummy_address
1743 /*CALL_DUMMY_ADDRESS ()*/);
1745 #ifdef CALL_DUMMY_START_OFFSET
1746 fprintf_unfiltered (file
,
1747 "gdbarch_dump: CALL_DUMMY_START_OFFSET = 0x%08lx\n",
1748 (long) CALL_DUMMY_START_OFFSET
);
1750 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET
1751 if (CALL_DUMMY_BREAKPOINT_OFFSET_P
)
1752 fprintf_unfiltered (file
,
1753 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = 0x%08lx\n",
1754 (long) CALL_DUMMY_BREAKPOINT_OFFSET
);
1756 #ifdef CALL_DUMMY_BREAKPOINT_OFFSET_P
1757 fprintf_unfiltered (file
,
1758 "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET_P = %ld\n",
1759 (long) CALL_DUMMY_BREAKPOINT_OFFSET_P
);
1761 #ifdef CALL_DUMMY_LENGTH
1762 if (CALL_DUMMY_LOCATION
== BEFORE_TEXT_END
|| CALL_DUMMY_LOCATION
== AFTER_TEXT_END
)
1763 fprintf_unfiltered (file
,
1764 "gdbarch_dump: CALL_DUMMY_LENGTH = %ld\n",
1765 (long) CALL_DUMMY_LENGTH
);
1767 #ifdef PC_IN_CALL_DUMMY
1769 fprintf_unfiltered (file
,
1770 "gdbarch_dump: PC_IN_CALL_DUMMY = 0x%08lx\n",
1771 (long) current_gdbarch
->pc_in_call_dummy
1772 /*PC_IN_CALL_DUMMY ()*/);
1775 fprintf_unfiltered (file
,
1776 "gdbarch_dump: CALL_DUMMY_P = %ld\n",
1777 (long) CALL_DUMMY_P
);
1779 #ifdef CALL_DUMMY_WORDS
1780 fprintf_unfiltered (file
,
1781 "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n",
1782 (long) CALL_DUMMY_WORDS
);
1784 #ifdef SIZEOF_CALL_DUMMY_WORDS
1785 fprintf_unfiltered (file
,
1786 "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
1787 (long) SIZEOF_CALL_DUMMY_WORDS
);
1789 #ifdef CALL_DUMMY_STACK_ADJUST_P
1790 fprintf_unfiltered (file
,
1791 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
1792 (long) CALL_DUMMY_STACK_ADJUST_P
);
1794 #ifdef CALL_DUMMY_STACK_ADJUST
1795 if (CALL_DUMMY_STACK_ADJUST_P
)
1796 fprintf_unfiltered (file
,
1797 "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
1798 (long) CALL_DUMMY_STACK_ADJUST
);
1800 #ifdef FIX_CALL_DUMMY
1802 fprintf_unfiltered (file
,
1803 "gdbarch_dump: FIX_CALL_DUMMY = 0x%08lx\n",
1804 (long) current_gdbarch
->fix_call_dummy
1805 /*FIX_CALL_DUMMY ()*/);
1807 #ifdef BELIEVE_PCC_PROMOTION
1808 fprintf_unfiltered (file
,
1809 "gdbarch_dump: BELIEVE_PCC_PROMOTION = %ld\n",
1810 (long) BELIEVE_PCC_PROMOTION
);
1812 #ifdef BELIEVE_PCC_PROMOTION_TYPE
1813 fprintf_unfiltered (file
,
1814 "gdbarch_dump: BELIEVE_PCC_PROMOTION_TYPE = %ld\n",
1815 (long) BELIEVE_PCC_PROMOTION_TYPE
);
1817 #ifdef COERCE_FLOAT_TO_DOUBLE
1819 fprintf_unfiltered (file
,
1820 "gdbarch_dump: COERCE_FLOAT_TO_DOUBLE = 0x%08lx\n",
1821 (long) current_gdbarch
->coerce_float_to_double
1822 /*COERCE_FLOAT_TO_DOUBLE ()*/);
1824 #ifdef GET_SAVED_REGISTER
1826 fprintf_unfiltered (file
,
1827 "gdbarch_dump: GET_SAVED_REGISTER = 0x%08lx\n",
1828 (long) current_gdbarch
->get_saved_register
1829 /*GET_SAVED_REGISTER ()*/);
1831 #ifdef REGISTER_CONVERTIBLE
1833 fprintf_unfiltered (file
,
1834 "gdbarch_dump: REGISTER_CONVERTIBLE = 0x%08lx\n",
1835 (long) current_gdbarch
->register_convertible
1836 /*REGISTER_CONVERTIBLE ()*/);
1838 #ifdef REGISTER_CONVERT_TO_VIRTUAL
1840 fprintf_unfiltered (file
,
1841 "gdbarch_dump: REGISTER_CONVERT_TO_VIRTUAL = 0x%08lx\n",
1842 (long) current_gdbarch
->register_convert_to_virtual
1843 /*REGISTER_CONVERT_TO_VIRTUAL ()*/);
1845 #ifdef REGISTER_CONVERT_TO_RAW
1847 fprintf_unfiltered (file
,
1848 "gdbarch_dump: REGISTER_CONVERT_TO_RAW = 0x%08lx\n",
1849 (long) current_gdbarch
->register_convert_to_raw
1850 /*REGISTER_CONVERT_TO_RAW ()*/);
1852 #ifdef FETCH_PSEUDO_REGISTER
1854 fprintf_unfiltered (file
,
1855 "gdbarch_dump: FETCH_PSEUDO_REGISTER = 0x%08lx\n",
1856 (long) current_gdbarch
->fetch_pseudo_register
1857 /*FETCH_PSEUDO_REGISTER ()*/);
1859 #ifdef STORE_PSEUDO_REGISTER
1861 fprintf_unfiltered (file
,
1862 "gdbarch_dump: STORE_PSEUDO_REGISTER = 0x%08lx\n",
1863 (long) current_gdbarch
->store_pseudo_register
1864 /*STORE_PSEUDO_REGISTER ()*/);
1866 #ifdef POINTER_TO_ADDRESS
1868 fprintf_unfiltered (file
,
1869 "gdbarch_dump: POINTER_TO_ADDRESS = 0x%08lx\n",
1870 (long) current_gdbarch
->pointer_to_address
1871 /*POINTER_TO_ADDRESS ()*/);
1873 #ifdef ADDRESS_TO_POINTER
1875 fprintf_unfiltered (file
,
1876 "gdbarch_dump: ADDRESS_TO_POINTER = 0x%08lx\n",
1877 (long) current_gdbarch
->address_to_pointer
1878 /*ADDRESS_TO_POINTER ()*/);
1880 #ifdef RETURN_VALUE_ON_STACK
1882 fprintf_unfiltered (file
,
1883 "gdbarch_dump: RETURN_VALUE_ON_STACK = 0x%08lx\n",
1884 (long) current_gdbarch
->return_value_on_stack
1885 /*RETURN_VALUE_ON_STACK ()*/);
1887 #ifdef EXTRACT_RETURN_VALUE
1889 fprintf_unfiltered (file
,
1890 "gdbarch_dump: EXTRACT_RETURN_VALUE = 0x%08lx\n",
1891 (long) current_gdbarch
->extract_return_value
1892 /*EXTRACT_RETURN_VALUE ()*/);
1894 #ifdef PUSH_ARGUMENTS
1896 fprintf_unfiltered (file
,
1897 "gdbarch_dump: PUSH_ARGUMENTS = 0x%08lx\n",
1898 (long) current_gdbarch
->push_arguments
1899 /*PUSH_ARGUMENTS ()*/);
1901 #ifdef PUSH_DUMMY_FRAME
1903 fprintf_unfiltered (file
,
1904 "gdbarch_dump: PUSH_DUMMY_FRAME = 0x%08lx\n",
1905 (long) current_gdbarch
->push_dummy_frame
1906 /*PUSH_DUMMY_FRAME ()*/);
1908 #ifdef PUSH_RETURN_ADDRESS
1910 fprintf_unfiltered (file
,
1911 "gdbarch_dump: PUSH_RETURN_ADDRESS = 0x%08lx\n",
1912 (long) current_gdbarch
->push_return_address
1913 /*PUSH_RETURN_ADDRESS ()*/);
1917 fprintf_unfiltered (file
,
1918 "gdbarch_dump: POP_FRAME = 0x%08lx\n",
1919 (long) current_gdbarch
->pop_frame
1922 #ifdef D10V_MAKE_DADDR
1924 fprintf_unfiltered (file
,
1925 "gdbarch_dump: D10V_MAKE_DADDR = 0x%08lx\n",
1926 (long) current_gdbarch
->d10v_make_daddr
1927 /*D10V_MAKE_DADDR ()*/);
1929 #ifdef D10V_MAKE_IADDR
1931 fprintf_unfiltered (file
,
1932 "gdbarch_dump: D10V_MAKE_IADDR = 0x%08lx\n",
1933 (long) current_gdbarch
->d10v_make_iaddr
1934 /*D10V_MAKE_IADDR ()*/);
1938 fprintf_unfiltered (file
,
1939 "gdbarch_dump: D10V_DADDR_P = 0x%08lx\n",
1940 (long) current_gdbarch
->d10v_daddr_p
1941 /*D10V_DADDR_P ()*/);
1945 fprintf_unfiltered (file
,
1946 "gdbarch_dump: D10V_IADDR_P = 0x%08lx\n",
1947 (long) current_gdbarch
->d10v_iaddr_p
1948 /*D10V_IADDR_P ()*/);
1950 #ifdef D10V_CONVERT_DADDR_TO_RAW
1952 fprintf_unfiltered (file
,
1953 "gdbarch_dump: D10V_CONVERT_DADDR_TO_RAW = 0x%08lx\n",
1954 (long) current_gdbarch
->d10v_convert_daddr_to_raw
1955 /*D10V_CONVERT_DADDR_TO_RAW ()*/);
1957 #ifdef D10V_CONVERT_IADDR_TO_RAW
1959 fprintf_unfiltered (file
,
1960 "gdbarch_dump: D10V_CONVERT_IADDR_TO_RAW = 0x%08lx\n",
1961 (long) current_gdbarch
->d10v_convert_iaddr_to_raw
1962 /*D10V_CONVERT_IADDR_TO_RAW ()*/);
1964 #ifdef STORE_STRUCT_RETURN
1966 fprintf_unfiltered (file
,
1967 "gdbarch_dump: STORE_STRUCT_RETURN = 0x%08lx\n",
1968 (long) current_gdbarch
->store_struct_return
1969 /*STORE_STRUCT_RETURN ()*/);
1971 #ifdef STORE_RETURN_VALUE
1973 fprintf_unfiltered (file
,
1974 "gdbarch_dump: STORE_RETURN_VALUE = 0x%08lx\n",
1975 (long) current_gdbarch
->store_return_value
1976 /*STORE_RETURN_VALUE ()*/);
1978 #ifdef EXTRACT_STRUCT_VALUE_ADDRESS
1980 fprintf_unfiltered (file
,
1981 "gdbarch_dump: EXTRACT_STRUCT_VALUE_ADDRESS = 0x%08lx\n",
1982 (long) current_gdbarch
->extract_struct_value_address
1983 /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/);
1985 #ifdef USE_STRUCT_CONVENTION
1987 fprintf_unfiltered (file
,
1988 "gdbarch_dump: USE_STRUCT_CONVENTION = 0x%08lx\n",
1989 (long) current_gdbarch
->use_struct_convention
1990 /*USE_STRUCT_CONVENTION ()*/);
1992 #ifdef FRAME_INIT_SAVED_REGS
1994 fprintf_unfiltered (file
,
1995 "gdbarch_dump: FRAME_INIT_SAVED_REGS = 0x%08lx\n",
1996 (long) current_gdbarch
->frame_init_saved_regs
1997 /*FRAME_INIT_SAVED_REGS ()*/);
1999 #ifdef INIT_EXTRA_FRAME_INFO
2001 fprintf_unfiltered (file
,
2002 "gdbarch_dump: INIT_EXTRA_FRAME_INFO = 0x%08lx\n",
2003 (long) current_gdbarch
->init_extra_frame_info
2004 /*INIT_EXTRA_FRAME_INFO ()*/);
2006 #ifdef SKIP_PROLOGUE
2008 fprintf_unfiltered (file
,
2009 "gdbarch_dump: SKIP_PROLOGUE = 0x%08lx\n",
2010 (long) current_gdbarch
->skip_prologue
2011 /*SKIP_PROLOGUE ()*/);
2013 #ifdef PROLOGUE_FRAMELESS_P
2015 fprintf_unfiltered (file
,
2016 "gdbarch_dump: PROLOGUE_FRAMELESS_P = 0x%08lx\n",
2017 (long) current_gdbarch
->prologue_frameless_p
2018 /*PROLOGUE_FRAMELESS_P ()*/);
2022 fprintf_unfiltered (file
,
2023 "gdbarch_dump: INNER_THAN = 0x%08lx\n",
2024 (long) current_gdbarch
->inner_than
2027 #ifdef BREAKPOINT_FROM_PC
2029 fprintf_unfiltered (file
,
2030 "gdbarch_dump: BREAKPOINT_FROM_PC = 0x%08lx\n",
2031 (long) current_gdbarch
->breakpoint_from_pc
2032 /*BREAKPOINT_FROM_PC ()*/);
2034 #ifdef MEMORY_INSERT_BREAKPOINT
2036 fprintf_unfiltered (file
,
2037 "gdbarch_dump: MEMORY_INSERT_BREAKPOINT = 0x%08lx\n",
2038 (long) current_gdbarch
->memory_insert_breakpoint
2039 /*MEMORY_INSERT_BREAKPOINT ()*/);
2041 #ifdef MEMORY_REMOVE_BREAKPOINT
2043 fprintf_unfiltered (file
,
2044 "gdbarch_dump: MEMORY_REMOVE_BREAKPOINT = 0x%08lx\n",
2045 (long) current_gdbarch
->memory_remove_breakpoint
2046 /*MEMORY_REMOVE_BREAKPOINT ()*/);
2048 #ifdef DECR_PC_AFTER_BREAK
2049 fprintf_unfiltered (file
,
2050 "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n",
2051 (long) DECR_PC_AFTER_BREAK
);
2053 #ifdef PREPARE_TO_PROCEED
2055 fprintf_unfiltered (file
,
2056 "gdbarch_dump: PREPARE_TO_PROCEED = 0x%08lx\n",
2057 (long) current_gdbarch
->prepare_to_proceed
2058 /*PREPARE_TO_PROCEED ()*/);
2060 #ifdef FUNCTION_START_OFFSET
2061 fprintf_unfiltered (file
,
2062 "gdbarch_dump: FUNCTION_START_OFFSET = %ld\n",
2063 (long) FUNCTION_START_OFFSET
);
2065 #ifdef REMOTE_TRANSLATE_XFER_ADDRESS
2067 fprintf_unfiltered (file
,
2068 "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = 0x%08lx\n",
2069 (long) current_gdbarch
->remote_translate_xfer_address
2070 /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
2072 #ifdef FRAME_ARGS_SKIP
2073 fprintf_unfiltered (file
,
2074 "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n",
2075 (long) FRAME_ARGS_SKIP
);
2077 #ifdef FRAMELESS_FUNCTION_INVOCATION
2079 fprintf_unfiltered (file
,
2080 "gdbarch_dump: FRAMELESS_FUNCTION_INVOCATION = 0x%08lx\n",
2081 (long) current_gdbarch
->frameless_function_invocation
2082 /*FRAMELESS_FUNCTION_INVOCATION ()*/);
2086 fprintf_unfiltered (file
,
2087 "gdbarch_dump: FRAME_CHAIN = 0x%08lx\n",
2088 (long) current_gdbarch
->frame_chain
2089 /*FRAME_CHAIN ()*/);
2091 #ifdef FRAME_CHAIN_VALID
2093 fprintf_unfiltered (file
,
2094 "gdbarch_dump: FRAME_CHAIN_VALID = 0x%08lx\n",
2095 (long) current_gdbarch
->frame_chain_valid
2096 /*FRAME_CHAIN_VALID ()*/);
2098 #ifdef FRAME_SAVED_PC
2100 fprintf_unfiltered (file
,
2101 "gdbarch_dump: FRAME_SAVED_PC = 0x%08lx\n",
2102 (long) current_gdbarch
->frame_saved_pc
2103 /*FRAME_SAVED_PC ()*/);
2105 #ifdef FRAME_ARGS_ADDRESS
2107 fprintf_unfiltered (file
,
2108 "gdbarch_dump: FRAME_ARGS_ADDRESS = 0x%08lx\n",
2109 (long) current_gdbarch
->frame_args_address
2110 /*FRAME_ARGS_ADDRESS ()*/);
2112 #ifdef FRAME_LOCALS_ADDRESS
2114 fprintf_unfiltered (file
,
2115 "gdbarch_dump: FRAME_LOCALS_ADDRESS = 0x%08lx\n",
2116 (long) current_gdbarch
->frame_locals_address
2117 /*FRAME_LOCALS_ADDRESS ()*/);
2119 #ifdef SAVED_PC_AFTER_CALL
2121 fprintf_unfiltered (file
,
2122 "gdbarch_dump: SAVED_PC_AFTER_CALL = 0x%08lx\n",
2123 (long) current_gdbarch
->saved_pc_after_call
2124 /*SAVED_PC_AFTER_CALL ()*/);
2126 #ifdef FRAME_NUM_ARGS
2128 fprintf_unfiltered (file
,
2129 "gdbarch_dump: FRAME_NUM_ARGS = 0x%08lx\n",
2130 (long) current_gdbarch
->frame_num_args
2131 /*FRAME_NUM_ARGS ()*/);
2135 fprintf_unfiltered (file
,
2136 "gdbarch_dump: STACK_ALIGN = 0x%08lx\n",
2137 (long) current_gdbarch
->stack_align
2138 /*STACK_ALIGN ()*/);
2140 #ifdef EXTRA_STACK_ALIGNMENT_NEEDED
2141 fprintf_unfiltered (file
,
2142 "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
2143 (long) EXTRA_STACK_ALIGNMENT_NEEDED
);
2145 #ifdef REG_STRUCT_HAS_ADDR
2147 fprintf_unfiltered (file
,
2148 "gdbarch_dump: REG_STRUCT_HAS_ADDR = 0x%08lx\n",
2149 (long) current_gdbarch
->reg_struct_has_addr
2150 /*REG_STRUCT_HAS_ADDR ()*/);
2152 #ifdef SAVE_DUMMY_FRAME_TOS
2154 fprintf_unfiltered (file
,
2155 "gdbarch_dump: SAVE_DUMMY_FRAME_TOS = 0x%08lx\n",
2156 (long) current_gdbarch
->save_dummy_frame_tos
2157 /*SAVE_DUMMY_FRAME_TOS ()*/);
2159 #ifdef PARM_BOUNDARY
2160 fprintf_unfiltered (file
,
2161 "gdbarch_dump: PARM_BOUNDARY = %ld\n",
2162 (long) PARM_BOUNDARY
);
2164 #ifdef TARGET_FLOAT_FORMAT
2165 fprintf_unfiltered (file
,
2166 "gdbarch_dump: TARGET_FLOAT_FORMAT = %ld\n",
2167 (long) TARGET_FLOAT_FORMAT
);
2169 #ifdef TARGET_DOUBLE_FORMAT
2170 fprintf_unfiltered (file
,
2171 "gdbarch_dump: TARGET_DOUBLE_FORMAT = %ld\n",
2172 (long) TARGET_DOUBLE_FORMAT
);
2174 #ifdef TARGET_LONG_DOUBLE_FORMAT
2175 fprintf_unfiltered (file
,
2176 "gdbarch_dump: TARGET_LONG_DOUBLE_FORMAT = %ld\n",
2177 (long) TARGET_LONG_DOUBLE_FORMAT
);
2179 #ifdef CONVERT_FROM_FUNC_PTR_ADDR
2181 fprintf_unfiltered (file
,
2182 "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = 0x%08lx\n",
2183 (long) current_gdbarch
->convert_from_func_ptr_addr
2184 /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
2186 #ifdef SOFTWARE_SINGLE_STEP
2188 fprintf_unfiltered (file
,
2189 "gdbarch_dump: SOFTWARE_SINGLE_STEP = 0x%08lx\n",
2190 (long) current_gdbarch
->software_single_step
2191 /*SOFTWARE_SINGLE_STEP ()*/);
2193 if (current_gdbarch
->dump_tdep
!= NULL
)
2194 current_gdbarch
->dump_tdep (current_gdbarch
, file
);
2197 struct gdbarch_tdep
*
2198 gdbarch_tdep (struct gdbarch
*gdbarch
)
2200 if (gdbarch_debug
>= 2)
2201 fprintf_unfiltered (gdb_stdlog
, "gdbarch_tdep called\n");
2202 return gdbarch
->tdep
;
2206 const struct bfd_arch_info
*
2207 gdbarch_bfd_arch_info (struct gdbarch
*gdbarch
)
2209 if (gdbarch_debug
>= 2)
2210 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_arch_info called\n");
2211 return gdbarch
->bfd_arch_info
;
2215 gdbarch_byte_order (struct gdbarch
*gdbarch
)
2217 if (gdbarch_debug
>= 2)
2218 fprintf_unfiltered (gdb_stdlog
, "gdbarch_byte_order called\n");
2219 return gdbarch
->byte_order
;
2223 gdbarch_short_bit (struct gdbarch
*gdbarch
)
2225 /* Skip verify of short_bit, invalid_p == 0 */
2226 if (gdbarch_debug
>= 2)
2227 fprintf_unfiltered (gdb_stdlog
, "gdbarch_short_bit called\n");
2228 return gdbarch
->short_bit
;
2232 set_gdbarch_short_bit (struct gdbarch
*gdbarch
,
2235 gdbarch
->short_bit
= short_bit
;
2239 gdbarch_int_bit (struct gdbarch
*gdbarch
)
2241 /* Skip verify of int_bit, invalid_p == 0 */
2242 if (gdbarch_debug
>= 2)
2243 fprintf_unfiltered (gdb_stdlog
, "gdbarch_int_bit called\n");
2244 return gdbarch
->int_bit
;
2248 set_gdbarch_int_bit (struct gdbarch
*gdbarch
,
2251 gdbarch
->int_bit
= int_bit
;
2255 gdbarch_long_bit (struct gdbarch
*gdbarch
)
2257 /* Skip verify of long_bit, invalid_p == 0 */
2258 if (gdbarch_debug
>= 2)
2259 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_bit called\n");
2260 return gdbarch
->long_bit
;
2264 set_gdbarch_long_bit (struct gdbarch
*gdbarch
,
2267 gdbarch
->long_bit
= long_bit
;
2271 gdbarch_long_long_bit (struct gdbarch
*gdbarch
)
2273 /* Skip verify of long_long_bit, invalid_p == 0 */
2274 if (gdbarch_debug
>= 2)
2275 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_long_bit called\n");
2276 return gdbarch
->long_long_bit
;
2280 set_gdbarch_long_long_bit (struct gdbarch
*gdbarch
,
2283 gdbarch
->long_long_bit
= long_long_bit
;
2287 gdbarch_float_bit (struct gdbarch
*gdbarch
)
2289 /* Skip verify of float_bit, invalid_p == 0 */
2290 if (gdbarch_debug
>= 2)
2291 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_bit called\n");
2292 return gdbarch
->float_bit
;
2296 set_gdbarch_float_bit (struct gdbarch
*gdbarch
,
2299 gdbarch
->float_bit
= float_bit
;
2303 gdbarch_double_bit (struct gdbarch
*gdbarch
)
2305 /* Skip verify of double_bit, invalid_p == 0 */
2306 if (gdbarch_debug
>= 2)
2307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_bit called\n");
2308 return gdbarch
->double_bit
;
2312 set_gdbarch_double_bit (struct gdbarch
*gdbarch
,
2315 gdbarch
->double_bit
= double_bit
;
2319 gdbarch_long_double_bit (struct gdbarch
*gdbarch
)
2321 /* Skip verify of long_double_bit, invalid_p == 0 */
2322 if (gdbarch_debug
>= 2)
2323 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_bit called\n");
2324 return gdbarch
->long_double_bit
;
2328 set_gdbarch_long_double_bit (struct gdbarch
*gdbarch
,
2329 int long_double_bit
)
2331 gdbarch
->long_double_bit
= long_double_bit
;
2335 gdbarch_ptr_bit (struct gdbarch
*gdbarch
)
2337 /* Skip verify of ptr_bit, invalid_p == 0 */
2338 if (gdbarch_debug
>= 2)
2339 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ptr_bit called\n");
2340 return gdbarch
->ptr_bit
;
2344 set_gdbarch_ptr_bit (struct gdbarch
*gdbarch
,
2347 gdbarch
->ptr_bit
= ptr_bit
;
2351 gdbarch_addr_bit (struct gdbarch
*gdbarch
)
2353 if (gdbarch
->addr_bit
== 0)
2354 internal_error (__FILE__
, __LINE__
,
2355 "gdbarch: gdbarch_addr_bit invalid");
2356 if (gdbarch_debug
>= 2)
2357 fprintf_unfiltered (gdb_stdlog
, "gdbarch_addr_bit called\n");
2358 return gdbarch
->addr_bit
;
2362 set_gdbarch_addr_bit (struct gdbarch
*gdbarch
,
2365 gdbarch
->addr_bit
= addr_bit
;
2369 gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
)
2371 /* Skip verify of bfd_vma_bit, invalid_p == 0 */
2372 if (gdbarch_debug
>= 2)
2373 fprintf_unfiltered (gdb_stdlog
, "gdbarch_bfd_vma_bit called\n");
2374 return gdbarch
->bfd_vma_bit
;
2378 set_gdbarch_bfd_vma_bit (struct gdbarch
*gdbarch
,
2381 gdbarch
->bfd_vma_bit
= bfd_vma_bit
;
2385 gdbarch_ieee_float (struct gdbarch
*gdbarch
)
2387 /* Skip verify of ieee_float, invalid_p == 0 */
2388 if (gdbarch_debug
>= 2)
2389 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ieee_float called\n");
2390 return gdbarch
->ieee_float
;
2394 set_gdbarch_ieee_float (struct gdbarch
*gdbarch
,
2397 gdbarch
->ieee_float
= ieee_float
;
2401 gdbarch_read_pc (struct gdbarch
*gdbarch
, ptid_t ptid
)
2403 if (gdbarch
->read_pc
== 0)
2404 internal_error (__FILE__
, __LINE__
,
2405 "gdbarch: gdbarch_read_pc invalid");
2406 if (gdbarch_debug
>= 2)
2407 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_pc called\n");
2408 return gdbarch
->read_pc (ptid
);
2412 set_gdbarch_read_pc (struct gdbarch
*gdbarch
,
2413 gdbarch_read_pc_ftype read_pc
)
2415 gdbarch
->read_pc
= read_pc
;
2419 gdbarch_write_pc (struct gdbarch
*gdbarch
, CORE_ADDR val
, ptid_t ptid
)
2421 if (gdbarch
->write_pc
== 0)
2422 internal_error (__FILE__
, __LINE__
,
2423 "gdbarch: gdbarch_write_pc invalid");
2424 if (gdbarch_debug
>= 2)
2425 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_pc called\n");
2426 gdbarch
->write_pc (val
, ptid
);
2430 set_gdbarch_write_pc (struct gdbarch
*gdbarch
,
2431 gdbarch_write_pc_ftype write_pc
)
2433 gdbarch
->write_pc
= write_pc
;
2437 gdbarch_read_fp (struct gdbarch
*gdbarch
)
2439 if (gdbarch
->read_fp
== 0)
2440 internal_error (__FILE__
, __LINE__
,
2441 "gdbarch: gdbarch_read_fp invalid");
2442 if (gdbarch_debug
>= 2)
2443 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_fp called\n");
2444 return gdbarch
->read_fp ();
2448 set_gdbarch_read_fp (struct gdbarch
*gdbarch
,
2449 gdbarch_read_fp_ftype read_fp
)
2451 gdbarch
->read_fp
= read_fp
;
2455 gdbarch_write_fp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2457 if (gdbarch
->write_fp
== 0)
2458 internal_error (__FILE__
, __LINE__
,
2459 "gdbarch: gdbarch_write_fp invalid");
2460 if (gdbarch_debug
>= 2)
2461 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_fp called\n");
2462 gdbarch
->write_fp (val
);
2466 set_gdbarch_write_fp (struct gdbarch
*gdbarch
,
2467 gdbarch_write_fp_ftype write_fp
)
2469 gdbarch
->write_fp
= write_fp
;
2473 gdbarch_read_sp (struct gdbarch
*gdbarch
)
2475 if (gdbarch
->read_sp
== 0)
2476 internal_error (__FILE__
, __LINE__
,
2477 "gdbarch: gdbarch_read_sp invalid");
2478 if (gdbarch_debug
>= 2)
2479 fprintf_unfiltered (gdb_stdlog
, "gdbarch_read_sp called\n");
2480 return gdbarch
->read_sp ();
2484 set_gdbarch_read_sp (struct gdbarch
*gdbarch
,
2485 gdbarch_read_sp_ftype read_sp
)
2487 gdbarch
->read_sp
= read_sp
;
2491 gdbarch_write_sp (struct gdbarch
*gdbarch
, CORE_ADDR val
)
2493 if (gdbarch
->write_sp
== 0)
2494 internal_error (__FILE__
, __LINE__
,
2495 "gdbarch: gdbarch_write_sp invalid");
2496 if (gdbarch_debug
>= 2)
2497 fprintf_unfiltered (gdb_stdlog
, "gdbarch_write_sp called\n");
2498 gdbarch
->write_sp (val
);
2502 set_gdbarch_write_sp (struct gdbarch
*gdbarch
,
2503 gdbarch_write_sp_ftype write_sp
)
2505 gdbarch
->write_sp
= write_sp
;
2509 gdbarch_register_read_p (struct gdbarch
*gdbarch
)
2511 return gdbarch
->register_read
!= 0;
2515 gdbarch_register_read (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2517 if (gdbarch
->register_read
== 0)
2518 internal_error (__FILE__
, __LINE__
,
2519 "gdbarch: gdbarch_register_read invalid");
2520 if (gdbarch_debug
>= 2)
2521 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_read called\n");
2522 gdbarch
->register_read (gdbarch
, regnum
, buf
);
2526 set_gdbarch_register_read (struct gdbarch
*gdbarch
,
2527 gdbarch_register_read_ftype register_read
)
2529 gdbarch
->register_read
= register_read
;
2533 gdbarch_register_write_p (struct gdbarch
*gdbarch
)
2535 return gdbarch
->register_write
!= 0;
2539 gdbarch_register_write (struct gdbarch
*gdbarch
, int regnum
, char *buf
)
2541 if (gdbarch
->register_write
== 0)
2542 internal_error (__FILE__
, __LINE__
,
2543 "gdbarch: gdbarch_register_write invalid");
2544 if (gdbarch_debug
>= 2)
2545 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_write called\n");
2546 gdbarch
->register_write (gdbarch
, regnum
, buf
);
2550 set_gdbarch_register_write (struct gdbarch
*gdbarch
,
2551 gdbarch_register_write_ftype register_write
)
2553 gdbarch
->register_write
= register_write
;
2557 gdbarch_num_regs (struct gdbarch
*gdbarch
)
2559 if (gdbarch
->num_regs
== -1)
2560 internal_error (__FILE__
, __LINE__
,
2561 "gdbarch: gdbarch_num_regs invalid");
2562 if (gdbarch_debug
>= 2)
2563 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_regs called\n");
2564 return gdbarch
->num_regs
;
2568 set_gdbarch_num_regs (struct gdbarch
*gdbarch
,
2571 gdbarch
->num_regs
= num_regs
;
2575 gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
)
2577 /* Skip verify of num_pseudo_regs, invalid_p == 0 */
2578 if (gdbarch_debug
>= 2)
2579 fprintf_unfiltered (gdb_stdlog
, "gdbarch_num_pseudo_regs called\n");
2580 return gdbarch
->num_pseudo_regs
;
2584 set_gdbarch_num_pseudo_regs (struct gdbarch
*gdbarch
,
2585 int num_pseudo_regs
)
2587 gdbarch
->num_pseudo_regs
= num_pseudo_regs
;
2591 gdbarch_sp_regnum (struct gdbarch
*gdbarch
)
2593 if (gdbarch
->sp_regnum
== -1)
2594 internal_error (__FILE__
, __LINE__
,
2595 "gdbarch: gdbarch_sp_regnum invalid");
2596 if (gdbarch_debug
>= 2)
2597 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sp_regnum called\n");
2598 return gdbarch
->sp_regnum
;
2602 set_gdbarch_sp_regnum (struct gdbarch
*gdbarch
,
2605 gdbarch
->sp_regnum
= sp_regnum
;
2609 gdbarch_fp_regnum (struct gdbarch
*gdbarch
)
2611 if (gdbarch
->fp_regnum
== -1)
2612 internal_error (__FILE__
, __LINE__
,
2613 "gdbarch: gdbarch_fp_regnum invalid");
2614 if (gdbarch_debug
>= 2)
2615 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp_regnum called\n");
2616 return gdbarch
->fp_regnum
;
2620 set_gdbarch_fp_regnum (struct gdbarch
*gdbarch
,
2623 gdbarch
->fp_regnum
= fp_regnum
;
2627 gdbarch_pc_regnum (struct gdbarch
*gdbarch
)
2629 if (gdbarch
->pc_regnum
== -1)
2630 internal_error (__FILE__
, __LINE__
,
2631 "gdbarch: gdbarch_pc_regnum invalid");
2632 if (gdbarch_debug
>= 2)
2633 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_regnum called\n");
2634 return gdbarch
->pc_regnum
;
2638 set_gdbarch_pc_regnum (struct gdbarch
*gdbarch
,
2641 gdbarch
->pc_regnum
= pc_regnum
;
2645 gdbarch_fp0_regnum (struct gdbarch
*gdbarch
)
2647 /* Skip verify of fp0_regnum, invalid_p == 0 */
2648 if (gdbarch_debug
>= 2)
2649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fp0_regnum called\n");
2650 return gdbarch
->fp0_regnum
;
2654 set_gdbarch_fp0_regnum (struct gdbarch
*gdbarch
,
2657 gdbarch
->fp0_regnum
= fp0_regnum
;
2661 gdbarch_npc_regnum (struct gdbarch
*gdbarch
)
2663 /* Skip verify of npc_regnum, invalid_p == 0 */
2664 if (gdbarch_debug
>= 2)
2665 fprintf_unfiltered (gdb_stdlog
, "gdbarch_npc_regnum called\n");
2666 return gdbarch
->npc_regnum
;
2670 set_gdbarch_npc_regnum (struct gdbarch
*gdbarch
,
2673 gdbarch
->npc_regnum
= npc_regnum
;
2677 gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
)
2679 /* Skip verify of nnpc_regnum, invalid_p == 0 */
2680 if (gdbarch_debug
>= 2)
2681 fprintf_unfiltered (gdb_stdlog
, "gdbarch_nnpc_regnum called\n");
2682 return gdbarch
->nnpc_regnum
;
2686 set_gdbarch_nnpc_regnum (struct gdbarch
*gdbarch
,
2689 gdbarch
->nnpc_regnum
= nnpc_regnum
;
2693 gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
, int stab_regnr
)
2695 if (gdbarch
->stab_reg_to_regnum
== 0)
2696 internal_error (__FILE__
, __LINE__
,
2697 "gdbarch: gdbarch_stab_reg_to_regnum invalid");
2698 if (gdbarch_debug
>= 2)
2699 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stab_reg_to_regnum called\n");
2700 return gdbarch
->stab_reg_to_regnum (stab_regnr
);
2704 set_gdbarch_stab_reg_to_regnum (struct gdbarch
*gdbarch
,
2705 gdbarch_stab_reg_to_regnum_ftype stab_reg_to_regnum
)
2707 gdbarch
->stab_reg_to_regnum
= stab_reg_to_regnum
;
2711 gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
, int ecoff_regnr
)
2713 if (gdbarch
->ecoff_reg_to_regnum
== 0)
2714 internal_error (__FILE__
, __LINE__
,
2715 "gdbarch: gdbarch_ecoff_reg_to_regnum invalid");
2716 if (gdbarch_debug
>= 2)
2717 fprintf_unfiltered (gdb_stdlog
, "gdbarch_ecoff_reg_to_regnum called\n");
2718 return gdbarch
->ecoff_reg_to_regnum (ecoff_regnr
);
2722 set_gdbarch_ecoff_reg_to_regnum (struct gdbarch
*gdbarch
,
2723 gdbarch_ecoff_reg_to_regnum_ftype ecoff_reg_to_regnum
)
2725 gdbarch
->ecoff_reg_to_regnum
= ecoff_reg_to_regnum
;
2729 gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf_regnr
)
2731 if (gdbarch
->dwarf_reg_to_regnum
== 0)
2732 internal_error (__FILE__
, __LINE__
,
2733 "gdbarch: gdbarch_dwarf_reg_to_regnum invalid");
2734 if (gdbarch_debug
>= 2)
2735 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf_reg_to_regnum called\n");
2736 return gdbarch
->dwarf_reg_to_regnum (dwarf_regnr
);
2740 set_gdbarch_dwarf_reg_to_regnum (struct gdbarch
*gdbarch
,
2741 gdbarch_dwarf_reg_to_regnum_ftype dwarf_reg_to_regnum
)
2743 gdbarch
->dwarf_reg_to_regnum
= dwarf_reg_to_regnum
;
2747 gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
, int sdb_regnr
)
2749 if (gdbarch
->sdb_reg_to_regnum
== 0)
2750 internal_error (__FILE__
, __LINE__
,
2751 "gdbarch: gdbarch_sdb_reg_to_regnum invalid");
2752 if (gdbarch_debug
>= 2)
2753 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sdb_reg_to_regnum called\n");
2754 return gdbarch
->sdb_reg_to_regnum (sdb_regnr
);
2758 set_gdbarch_sdb_reg_to_regnum (struct gdbarch
*gdbarch
,
2759 gdbarch_sdb_reg_to_regnum_ftype sdb_reg_to_regnum
)
2761 gdbarch
->sdb_reg_to_regnum
= sdb_reg_to_regnum
;
2765 gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
, int dwarf2_regnr
)
2767 if (gdbarch
->dwarf2_reg_to_regnum
== 0)
2768 internal_error (__FILE__
, __LINE__
,
2769 "gdbarch: gdbarch_dwarf2_reg_to_regnum invalid");
2770 if (gdbarch_debug
>= 2)
2771 fprintf_unfiltered (gdb_stdlog
, "gdbarch_dwarf2_reg_to_regnum called\n");
2772 return gdbarch
->dwarf2_reg_to_regnum (dwarf2_regnr
);
2776 set_gdbarch_dwarf2_reg_to_regnum (struct gdbarch
*gdbarch
,
2777 gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum
)
2779 gdbarch
->dwarf2_reg_to_regnum
= dwarf2_reg_to_regnum
;
2783 gdbarch_register_name (struct gdbarch
*gdbarch
, int regnr
)
2785 if (gdbarch
->register_name
== 0)
2786 internal_error (__FILE__
, __LINE__
,
2787 "gdbarch: gdbarch_register_name invalid");
2788 if (gdbarch_debug
>= 2)
2789 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_name called\n");
2790 return gdbarch
->register_name (regnr
);
2794 set_gdbarch_register_name (struct gdbarch
*gdbarch
,
2795 gdbarch_register_name_ftype register_name
)
2797 gdbarch
->register_name
= register_name
;
2801 gdbarch_register_size (struct gdbarch
*gdbarch
)
2803 if (gdbarch
->register_size
== -1)
2804 internal_error (__FILE__
, __LINE__
,
2805 "gdbarch: gdbarch_register_size invalid");
2806 if (gdbarch_debug
>= 2)
2807 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_size called\n");
2808 return gdbarch
->register_size
;
2812 set_gdbarch_register_size (struct gdbarch
*gdbarch
,
2815 gdbarch
->register_size
= register_size
;
2819 gdbarch_register_bytes (struct gdbarch
*gdbarch
)
2821 if (gdbarch
->register_bytes
== -1)
2822 internal_error (__FILE__
, __LINE__
,
2823 "gdbarch: gdbarch_register_bytes invalid");
2824 if (gdbarch_debug
>= 2)
2825 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes called\n");
2826 return gdbarch
->register_bytes
;
2830 set_gdbarch_register_bytes (struct gdbarch
*gdbarch
,
2833 gdbarch
->register_bytes
= register_bytes
;
2837 gdbarch_register_byte (struct gdbarch
*gdbarch
, int reg_nr
)
2839 if (gdbarch
->register_byte
== 0)
2840 internal_error (__FILE__
, __LINE__
,
2841 "gdbarch: gdbarch_register_byte invalid");
2842 if (gdbarch_debug
>= 2)
2843 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_byte called\n");
2844 return gdbarch
->register_byte (reg_nr
);
2848 set_gdbarch_register_byte (struct gdbarch
*gdbarch
,
2849 gdbarch_register_byte_ftype register_byte
)
2851 gdbarch
->register_byte
= register_byte
;
2855 gdbarch_register_raw_size (struct gdbarch
*gdbarch
, int reg_nr
)
2857 if (gdbarch
->register_raw_size
== 0)
2858 internal_error (__FILE__
, __LINE__
,
2859 "gdbarch: gdbarch_register_raw_size invalid");
2860 if (gdbarch_debug
>= 2)
2861 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_raw_size called\n");
2862 return gdbarch
->register_raw_size (reg_nr
);
2866 set_gdbarch_register_raw_size (struct gdbarch
*gdbarch
,
2867 gdbarch_register_raw_size_ftype register_raw_size
)
2869 gdbarch
->register_raw_size
= register_raw_size
;
2873 gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
)
2875 if (gdbarch
->max_register_raw_size
== -1)
2876 internal_error (__FILE__
, __LINE__
,
2877 "gdbarch: gdbarch_max_register_raw_size invalid");
2878 if (gdbarch_debug
>= 2)
2879 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_raw_size called\n");
2880 return gdbarch
->max_register_raw_size
;
2884 set_gdbarch_max_register_raw_size (struct gdbarch
*gdbarch
,
2885 int max_register_raw_size
)
2887 gdbarch
->max_register_raw_size
= max_register_raw_size
;
2891 gdbarch_register_virtual_size (struct gdbarch
*gdbarch
, int reg_nr
)
2893 if (gdbarch
->register_virtual_size
== 0)
2894 internal_error (__FILE__
, __LINE__
,
2895 "gdbarch: gdbarch_register_virtual_size invalid");
2896 if (gdbarch_debug
>= 2)
2897 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_size called\n");
2898 return gdbarch
->register_virtual_size (reg_nr
);
2902 set_gdbarch_register_virtual_size (struct gdbarch
*gdbarch
,
2903 gdbarch_register_virtual_size_ftype register_virtual_size
)
2905 gdbarch
->register_virtual_size
= register_virtual_size
;
2909 gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
)
2911 if (gdbarch
->max_register_virtual_size
== -1)
2912 internal_error (__FILE__
, __LINE__
,
2913 "gdbarch: gdbarch_max_register_virtual_size invalid");
2914 if (gdbarch_debug
>= 2)
2915 fprintf_unfiltered (gdb_stdlog
, "gdbarch_max_register_virtual_size called\n");
2916 return gdbarch
->max_register_virtual_size
;
2920 set_gdbarch_max_register_virtual_size (struct gdbarch
*gdbarch
,
2921 int max_register_virtual_size
)
2923 gdbarch
->max_register_virtual_size
= max_register_virtual_size
;
2927 gdbarch_register_virtual_type (struct gdbarch
*gdbarch
, int reg_nr
)
2929 if (gdbarch
->register_virtual_type
== 0)
2930 internal_error (__FILE__
, __LINE__
,
2931 "gdbarch: gdbarch_register_virtual_type invalid");
2932 if (gdbarch_debug
>= 2)
2933 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_virtual_type called\n");
2934 return gdbarch
->register_virtual_type (reg_nr
);
2938 set_gdbarch_register_virtual_type (struct gdbarch
*gdbarch
,
2939 gdbarch_register_virtual_type_ftype register_virtual_type
)
2941 gdbarch
->register_virtual_type
= register_virtual_type
;
2945 gdbarch_do_registers_info (struct gdbarch
*gdbarch
, int reg_nr
, int fpregs
)
2947 if (gdbarch
->do_registers_info
== 0)
2948 internal_error (__FILE__
, __LINE__
,
2949 "gdbarch: gdbarch_do_registers_info invalid");
2950 if (gdbarch_debug
>= 2)
2951 fprintf_unfiltered (gdb_stdlog
, "gdbarch_do_registers_info called\n");
2952 gdbarch
->do_registers_info (reg_nr
, fpregs
);
2956 set_gdbarch_do_registers_info (struct gdbarch
*gdbarch
,
2957 gdbarch_do_registers_info_ftype do_registers_info
)
2959 gdbarch
->do_registers_info
= do_registers_info
;
2963 gdbarch_register_sim_regno (struct gdbarch
*gdbarch
, int reg_nr
)
2965 if (gdbarch
->register_sim_regno
== 0)
2966 internal_error (__FILE__
, __LINE__
,
2967 "gdbarch: gdbarch_register_sim_regno invalid");
2968 if (gdbarch_debug
>= 2)
2969 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_sim_regno called\n");
2970 return gdbarch
->register_sim_regno (reg_nr
);
2974 set_gdbarch_register_sim_regno (struct gdbarch
*gdbarch
,
2975 gdbarch_register_sim_regno_ftype register_sim_regno
)
2977 gdbarch
->register_sim_regno
= register_sim_regno
;
2981 gdbarch_register_bytes_ok_p (struct gdbarch
*gdbarch
)
2983 return gdbarch
->register_bytes_ok
!= 0;
2987 gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
, long nr_bytes
)
2989 if (gdbarch
->register_bytes_ok
== 0)
2990 internal_error (__FILE__
, __LINE__
,
2991 "gdbarch: gdbarch_register_bytes_ok invalid");
2992 if (gdbarch_debug
>= 2)
2993 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_bytes_ok called\n");
2994 return gdbarch
->register_bytes_ok (nr_bytes
);
2998 set_gdbarch_register_bytes_ok (struct gdbarch
*gdbarch
,
2999 gdbarch_register_bytes_ok_ftype register_bytes_ok
)
3001 gdbarch
->register_bytes_ok
= register_bytes_ok
;
3005 gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
)
3007 if (gdbarch
->use_generic_dummy_frames
== -1)
3008 internal_error (__FILE__
, __LINE__
,
3009 "gdbarch: gdbarch_use_generic_dummy_frames invalid");
3010 if (gdbarch_debug
>= 2)
3011 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_generic_dummy_frames called\n");
3012 return gdbarch
->use_generic_dummy_frames
;
3016 set_gdbarch_use_generic_dummy_frames (struct gdbarch
*gdbarch
,
3017 int use_generic_dummy_frames
)
3019 gdbarch
->use_generic_dummy_frames
= use_generic_dummy_frames
;
3023 gdbarch_call_dummy_location (struct gdbarch
*gdbarch
)
3025 if (gdbarch
->call_dummy_location
== 0)
3026 internal_error (__FILE__
, __LINE__
,
3027 "gdbarch: gdbarch_call_dummy_location invalid");
3028 if (gdbarch_debug
>= 2)
3029 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_location called\n");
3030 return gdbarch
->call_dummy_location
;
3034 set_gdbarch_call_dummy_location (struct gdbarch
*gdbarch
,
3035 int call_dummy_location
)
3037 gdbarch
->call_dummy_location
= call_dummy_location
;
3041 gdbarch_call_dummy_address (struct gdbarch
*gdbarch
)
3043 if (gdbarch
->call_dummy_address
== 0)
3044 internal_error (__FILE__
, __LINE__
,
3045 "gdbarch: gdbarch_call_dummy_address invalid");
3046 if (gdbarch_debug
>= 2)
3047 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_address called\n");
3048 return gdbarch
->call_dummy_address ();
3052 set_gdbarch_call_dummy_address (struct gdbarch
*gdbarch
,
3053 gdbarch_call_dummy_address_ftype call_dummy_address
)
3055 gdbarch
->call_dummy_address
= call_dummy_address
;
3059 gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
)
3061 if (gdbarch
->call_dummy_start_offset
== -1)
3062 internal_error (__FILE__
, __LINE__
,
3063 "gdbarch: gdbarch_call_dummy_start_offset invalid");
3064 if (gdbarch_debug
>= 2)
3065 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_start_offset called\n");
3066 return gdbarch
->call_dummy_start_offset
;
3070 set_gdbarch_call_dummy_start_offset (struct gdbarch
*gdbarch
,
3071 CORE_ADDR call_dummy_start_offset
)
3073 gdbarch
->call_dummy_start_offset
= call_dummy_start_offset
;
3077 gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
)
3079 if (gdbarch
->call_dummy_breakpoint_offset
== -1)
3080 internal_error (__FILE__
, __LINE__
,
3081 "gdbarch: gdbarch_call_dummy_breakpoint_offset invalid");
3082 if (gdbarch_debug
>= 2)
3083 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset called\n");
3084 return gdbarch
->call_dummy_breakpoint_offset
;
3088 set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch
*gdbarch
,
3089 CORE_ADDR call_dummy_breakpoint_offset
)
3091 gdbarch
->call_dummy_breakpoint_offset
= call_dummy_breakpoint_offset
;
3095 gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
)
3097 if (gdbarch
->call_dummy_breakpoint_offset_p
== -1)
3098 internal_error (__FILE__
, __LINE__
,
3099 "gdbarch: gdbarch_call_dummy_breakpoint_offset_p invalid");
3100 if (gdbarch_debug
>= 2)
3101 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_breakpoint_offset_p called\n");
3102 return gdbarch
->call_dummy_breakpoint_offset_p
;
3106 set_gdbarch_call_dummy_breakpoint_offset_p (struct gdbarch
*gdbarch
,
3107 int call_dummy_breakpoint_offset_p
)
3109 gdbarch
->call_dummy_breakpoint_offset_p
= call_dummy_breakpoint_offset_p
;
3113 gdbarch_call_dummy_length (struct gdbarch
*gdbarch
)
3115 if (gdbarch
->call_dummy_length
== -1)
3116 internal_error (__FILE__
, __LINE__
,
3117 "gdbarch: gdbarch_call_dummy_length invalid");
3118 if (gdbarch_debug
>= 2)
3119 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_length called\n");
3120 return gdbarch
->call_dummy_length
;
3124 set_gdbarch_call_dummy_length (struct gdbarch
*gdbarch
,
3125 int call_dummy_length
)
3127 gdbarch
->call_dummy_length
= call_dummy_length
;
3131 gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
, CORE_ADDR frame_address
)
3133 if (gdbarch
->pc_in_call_dummy
== 0)
3134 internal_error (__FILE__
, __LINE__
,
3135 "gdbarch: gdbarch_pc_in_call_dummy invalid");
3136 if (gdbarch_debug
>= 2)
3137 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pc_in_call_dummy called\n");
3138 return gdbarch
->pc_in_call_dummy (pc
, sp
, frame_address
);
3142 set_gdbarch_pc_in_call_dummy (struct gdbarch
*gdbarch
,
3143 gdbarch_pc_in_call_dummy_ftype pc_in_call_dummy
)
3145 gdbarch
->pc_in_call_dummy
= pc_in_call_dummy
;
3149 gdbarch_call_dummy_p (struct gdbarch
*gdbarch
)
3151 if (gdbarch
->call_dummy_p
== -1)
3152 internal_error (__FILE__
, __LINE__
,
3153 "gdbarch: gdbarch_call_dummy_p invalid");
3154 if (gdbarch_debug
>= 2)
3155 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_p called\n");
3156 return gdbarch
->call_dummy_p
;
3160 set_gdbarch_call_dummy_p (struct gdbarch
*gdbarch
,
3163 gdbarch
->call_dummy_p
= call_dummy_p
;
3167 gdbarch_call_dummy_words (struct gdbarch
*gdbarch
)
3169 /* Skip verify of call_dummy_words, invalid_p == 0 */
3170 if (gdbarch_debug
>= 2)
3171 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_words called\n");
3172 return gdbarch
->call_dummy_words
;
3176 set_gdbarch_call_dummy_words (struct gdbarch
*gdbarch
,
3177 LONGEST
* call_dummy_words
)
3179 gdbarch
->call_dummy_words
= call_dummy_words
;
3183 gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
)
3185 /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
3186 if (gdbarch_debug
>= 2)
3187 fprintf_unfiltered (gdb_stdlog
, "gdbarch_sizeof_call_dummy_words called\n");
3188 return gdbarch
->sizeof_call_dummy_words
;
3192 set_gdbarch_sizeof_call_dummy_words (struct gdbarch
*gdbarch
,
3193 int sizeof_call_dummy_words
)
3195 gdbarch
->sizeof_call_dummy_words
= sizeof_call_dummy_words
;
3199 gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
)
3201 if (gdbarch
->call_dummy_stack_adjust_p
== -1)
3202 internal_error (__FILE__
, __LINE__
,
3203 "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
3204 if (gdbarch_debug
>= 2)
3205 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust_p called\n");
3206 return gdbarch
->call_dummy_stack_adjust_p
;
3210 set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch
*gdbarch
,
3211 int call_dummy_stack_adjust_p
)
3213 gdbarch
->call_dummy_stack_adjust_p
= call_dummy_stack_adjust_p
;
3217 gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
)
3219 if (gdbarch
->call_dummy_stack_adjust_p
&& gdbarch
->call_dummy_stack_adjust
== 0)
3220 internal_error (__FILE__
, __LINE__
,
3221 "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
3222 if (gdbarch_debug
>= 2)
3223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_call_dummy_stack_adjust called\n");
3224 return gdbarch
->call_dummy_stack_adjust
;
3228 set_gdbarch_call_dummy_stack_adjust (struct gdbarch
*gdbarch
,
3229 int call_dummy_stack_adjust
)
3231 gdbarch
->call_dummy_stack_adjust
= call_dummy_stack_adjust
;
3235 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
)
3237 if (gdbarch
->fix_call_dummy
== 0)
3238 internal_error (__FILE__
, __LINE__
,
3239 "gdbarch: gdbarch_fix_call_dummy invalid");
3240 if (gdbarch_debug
>= 2)
3241 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fix_call_dummy called\n");
3242 gdbarch
->fix_call_dummy (dummy
, pc
, fun
, nargs
, args
, type
, gcc_p
);
3246 set_gdbarch_fix_call_dummy (struct gdbarch
*gdbarch
,
3247 gdbarch_fix_call_dummy_ftype fix_call_dummy
)
3249 gdbarch
->fix_call_dummy
= fix_call_dummy
;
3253 gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
)
3255 if (gdbarch_debug
>= 2)
3256 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion called\n");
3257 return gdbarch
->believe_pcc_promotion
;
3261 set_gdbarch_believe_pcc_promotion (struct gdbarch
*gdbarch
,
3262 int believe_pcc_promotion
)
3264 gdbarch
->believe_pcc_promotion
= believe_pcc_promotion
;
3268 gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
)
3270 if (gdbarch_debug
>= 2)
3271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_believe_pcc_promotion_type called\n");
3272 return gdbarch
->believe_pcc_promotion_type
;
3276 set_gdbarch_believe_pcc_promotion_type (struct gdbarch
*gdbarch
,
3277 int believe_pcc_promotion_type
)
3279 gdbarch
->believe_pcc_promotion_type
= believe_pcc_promotion_type
;
3283 gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
, struct type
*formal
, struct type
*actual
)
3285 if (gdbarch
->coerce_float_to_double
== 0)
3286 internal_error (__FILE__
, __LINE__
,
3287 "gdbarch: gdbarch_coerce_float_to_double invalid");
3288 if (gdbarch_debug
>= 2)
3289 fprintf_unfiltered (gdb_stdlog
, "gdbarch_coerce_float_to_double called\n");
3290 return gdbarch
->coerce_float_to_double (formal
, actual
);
3294 set_gdbarch_coerce_float_to_double (struct gdbarch
*gdbarch
,
3295 gdbarch_coerce_float_to_double_ftype coerce_float_to_double
)
3297 gdbarch
->coerce_float_to_double
= coerce_float_to_double
;
3301 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
)
3303 if (gdbarch
->get_saved_register
== 0)
3304 internal_error (__FILE__
, __LINE__
,
3305 "gdbarch: gdbarch_get_saved_register invalid");
3306 if (gdbarch_debug
>= 2)
3307 fprintf_unfiltered (gdb_stdlog
, "gdbarch_get_saved_register called\n");
3308 gdbarch
->get_saved_register (raw_buffer
, optimized
, addrp
, frame
, regnum
, lval
);
3312 set_gdbarch_get_saved_register (struct gdbarch
*gdbarch
,
3313 gdbarch_get_saved_register_ftype get_saved_register
)
3315 gdbarch
->get_saved_register
= get_saved_register
;
3319 gdbarch_register_convertible (struct gdbarch
*gdbarch
, int nr
)
3321 if (gdbarch
->register_convertible
== 0)
3322 internal_error (__FILE__
, __LINE__
,
3323 "gdbarch: gdbarch_register_convertible invalid");
3324 if (gdbarch_debug
>= 2)
3325 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convertible called\n");
3326 return gdbarch
->register_convertible (nr
);
3330 set_gdbarch_register_convertible (struct gdbarch
*gdbarch
,
3331 gdbarch_register_convertible_ftype register_convertible
)
3333 gdbarch
->register_convertible
= register_convertible
;
3337 gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
, int regnum
, struct type
*type
, char *from
, char *to
)
3339 if (gdbarch
->register_convert_to_virtual
== 0)
3340 internal_error (__FILE__
, __LINE__
,
3341 "gdbarch: gdbarch_register_convert_to_virtual invalid");
3342 if (gdbarch_debug
>= 2)
3343 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_virtual called\n");
3344 gdbarch
->register_convert_to_virtual (regnum
, type
, from
, to
);
3348 set_gdbarch_register_convert_to_virtual (struct gdbarch
*gdbarch
,
3349 gdbarch_register_convert_to_virtual_ftype register_convert_to_virtual
)
3351 gdbarch
->register_convert_to_virtual
= register_convert_to_virtual
;
3355 gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
, struct type
*type
, int regnum
, char *from
, char *to
)
3357 if (gdbarch
->register_convert_to_raw
== 0)
3358 internal_error (__FILE__
, __LINE__
,
3359 "gdbarch: gdbarch_register_convert_to_raw invalid");
3360 if (gdbarch_debug
>= 2)
3361 fprintf_unfiltered (gdb_stdlog
, "gdbarch_register_convert_to_raw called\n");
3362 gdbarch
->register_convert_to_raw (type
, regnum
, from
, to
);
3366 set_gdbarch_register_convert_to_raw (struct gdbarch
*gdbarch
,
3367 gdbarch_register_convert_to_raw_ftype register_convert_to_raw
)
3369 gdbarch
->register_convert_to_raw
= register_convert_to_raw
;
3373 gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3375 if (gdbarch
->fetch_pseudo_register
== 0)
3376 internal_error (__FILE__
, __LINE__
,
3377 "gdbarch: gdbarch_fetch_pseudo_register invalid");
3378 if (gdbarch_debug
>= 2)
3379 fprintf_unfiltered (gdb_stdlog
, "gdbarch_fetch_pseudo_register called\n");
3380 gdbarch
->fetch_pseudo_register (regnum
);
3384 set_gdbarch_fetch_pseudo_register (struct gdbarch
*gdbarch
,
3385 gdbarch_fetch_pseudo_register_ftype fetch_pseudo_register
)
3387 gdbarch
->fetch_pseudo_register
= fetch_pseudo_register
;
3391 gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
, int regnum
)
3393 if (gdbarch
->store_pseudo_register
== 0)
3394 internal_error (__FILE__
, __LINE__
,
3395 "gdbarch: gdbarch_store_pseudo_register invalid");
3396 if (gdbarch_debug
>= 2)
3397 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_pseudo_register called\n");
3398 gdbarch
->store_pseudo_register (regnum
);
3402 set_gdbarch_store_pseudo_register (struct gdbarch
*gdbarch
,
3403 gdbarch_store_pseudo_register_ftype store_pseudo_register
)
3405 gdbarch
->store_pseudo_register
= store_pseudo_register
;
3409 gdbarch_pointer_to_address (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
)
3411 if (gdbarch
->pointer_to_address
== 0)
3412 internal_error (__FILE__
, __LINE__
,
3413 "gdbarch: gdbarch_pointer_to_address invalid");
3414 if (gdbarch_debug
>= 2)
3415 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pointer_to_address called\n");
3416 return gdbarch
->pointer_to_address (type
, buf
);
3420 set_gdbarch_pointer_to_address (struct gdbarch
*gdbarch
,
3421 gdbarch_pointer_to_address_ftype pointer_to_address
)
3423 gdbarch
->pointer_to_address
= pointer_to_address
;
3427 gdbarch_address_to_pointer (struct gdbarch
*gdbarch
, struct type
*type
, void *buf
, CORE_ADDR addr
)
3429 if (gdbarch
->address_to_pointer
== 0)
3430 internal_error (__FILE__
, __LINE__
,
3431 "gdbarch: gdbarch_address_to_pointer invalid");
3432 if (gdbarch_debug
>= 2)
3433 fprintf_unfiltered (gdb_stdlog
, "gdbarch_address_to_pointer called\n");
3434 gdbarch
->address_to_pointer (type
, buf
, addr
);
3438 set_gdbarch_address_to_pointer (struct gdbarch
*gdbarch
,
3439 gdbarch_address_to_pointer_ftype address_to_pointer
)
3441 gdbarch
->address_to_pointer
= address_to_pointer
;
3445 gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
, struct type
*type
)
3447 if (gdbarch
->return_value_on_stack
== 0)
3448 internal_error (__FILE__
, __LINE__
,
3449 "gdbarch: gdbarch_return_value_on_stack invalid");
3450 if (gdbarch_debug
>= 2)
3451 fprintf_unfiltered (gdb_stdlog
, "gdbarch_return_value_on_stack called\n");
3452 return gdbarch
->return_value_on_stack (type
);
3456 set_gdbarch_return_value_on_stack (struct gdbarch
*gdbarch
,
3457 gdbarch_return_value_on_stack_ftype return_value_on_stack
)
3459 gdbarch
->return_value_on_stack
= return_value_on_stack
;
3463 gdbarch_extract_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *regbuf
, char *valbuf
)
3465 if (gdbarch
->extract_return_value
== 0)
3466 internal_error (__FILE__
, __LINE__
,
3467 "gdbarch: gdbarch_extract_return_value invalid");
3468 if (gdbarch_debug
>= 2)
3469 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_return_value called\n");
3470 gdbarch
->extract_return_value (type
, regbuf
, valbuf
);
3474 set_gdbarch_extract_return_value (struct gdbarch
*gdbarch
,
3475 gdbarch_extract_return_value_ftype extract_return_value
)
3477 gdbarch
->extract_return_value
= extract_return_value
;
3481 gdbarch_push_arguments (struct gdbarch
*gdbarch
, int nargs
, struct value
**args
, CORE_ADDR sp
, int struct_return
, CORE_ADDR struct_addr
)
3483 if (gdbarch
->push_arguments
== 0)
3484 internal_error (__FILE__
, __LINE__
,
3485 "gdbarch: gdbarch_push_arguments invalid");
3486 if (gdbarch_debug
>= 2)
3487 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_arguments called\n");
3488 return gdbarch
->push_arguments (nargs
, args
, sp
, struct_return
, struct_addr
);
3492 set_gdbarch_push_arguments (struct gdbarch
*gdbarch
,
3493 gdbarch_push_arguments_ftype push_arguments
)
3495 gdbarch
->push_arguments
= push_arguments
;
3499 gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
)
3501 if (gdbarch
->push_dummy_frame
== 0)
3502 internal_error (__FILE__
, __LINE__
,
3503 "gdbarch: gdbarch_push_dummy_frame invalid");
3504 if (gdbarch_debug
>= 2)
3505 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_dummy_frame called\n");
3506 gdbarch
->push_dummy_frame ();
3510 set_gdbarch_push_dummy_frame (struct gdbarch
*gdbarch
,
3511 gdbarch_push_dummy_frame_ftype push_dummy_frame
)
3513 gdbarch
->push_dummy_frame
= push_dummy_frame
;
3517 gdbarch_push_return_address (struct gdbarch
*gdbarch
, CORE_ADDR pc
, CORE_ADDR sp
)
3519 if (gdbarch
->push_return_address
== 0)
3520 internal_error (__FILE__
, __LINE__
,
3521 "gdbarch: gdbarch_push_return_address invalid");
3522 if (gdbarch_debug
>= 2)
3523 fprintf_unfiltered (gdb_stdlog
, "gdbarch_push_return_address called\n");
3524 return gdbarch
->push_return_address (pc
, sp
);
3528 set_gdbarch_push_return_address (struct gdbarch
*gdbarch
,
3529 gdbarch_push_return_address_ftype push_return_address
)
3531 gdbarch
->push_return_address
= push_return_address
;
3535 gdbarch_pop_frame (struct gdbarch
*gdbarch
)
3537 if (gdbarch
->pop_frame
== 0)
3538 internal_error (__FILE__
, __LINE__
,
3539 "gdbarch: gdbarch_pop_frame invalid");
3540 if (gdbarch_debug
>= 2)
3541 fprintf_unfiltered (gdb_stdlog
, "gdbarch_pop_frame called\n");
3542 gdbarch
->pop_frame ();
3546 set_gdbarch_pop_frame (struct gdbarch
*gdbarch
,
3547 gdbarch_pop_frame_ftype pop_frame
)
3549 gdbarch
->pop_frame
= pop_frame
;
3553 gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3555 if (gdbarch
->d10v_make_daddr
== 0)
3556 internal_error (__FILE__
, __LINE__
,
3557 "gdbarch: gdbarch_d10v_make_daddr invalid");
3558 if (gdbarch_debug
>= 2)
3559 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_daddr called\n");
3560 return gdbarch
->d10v_make_daddr (x
);
3564 set_gdbarch_d10v_make_daddr (struct gdbarch
*gdbarch
,
3565 gdbarch_d10v_make_daddr_ftype d10v_make_daddr
)
3567 gdbarch
->d10v_make_daddr
= d10v_make_daddr
;
3571 gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3573 if (gdbarch
->d10v_make_iaddr
== 0)
3574 internal_error (__FILE__
, __LINE__
,
3575 "gdbarch: gdbarch_d10v_make_iaddr invalid");
3576 if (gdbarch_debug
>= 2)
3577 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_make_iaddr called\n");
3578 return gdbarch
->d10v_make_iaddr (x
);
3582 set_gdbarch_d10v_make_iaddr (struct gdbarch
*gdbarch
,
3583 gdbarch_d10v_make_iaddr_ftype d10v_make_iaddr
)
3585 gdbarch
->d10v_make_iaddr
= d10v_make_iaddr
;
3589 gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3591 if (gdbarch
->d10v_daddr_p
== 0)
3592 internal_error (__FILE__
, __LINE__
,
3593 "gdbarch: gdbarch_d10v_daddr_p invalid");
3594 if (gdbarch_debug
>= 2)
3595 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_daddr_p called\n");
3596 return gdbarch
->d10v_daddr_p (x
);
3600 set_gdbarch_d10v_daddr_p (struct gdbarch
*gdbarch
,
3601 gdbarch_d10v_daddr_p_ftype d10v_daddr_p
)
3603 gdbarch
->d10v_daddr_p
= d10v_daddr_p
;
3607 gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3609 if (gdbarch
->d10v_iaddr_p
== 0)
3610 internal_error (__FILE__
, __LINE__
,
3611 "gdbarch: gdbarch_d10v_iaddr_p invalid");
3612 if (gdbarch_debug
>= 2)
3613 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_iaddr_p called\n");
3614 return gdbarch
->d10v_iaddr_p (x
);
3618 set_gdbarch_d10v_iaddr_p (struct gdbarch
*gdbarch
,
3619 gdbarch_d10v_iaddr_p_ftype d10v_iaddr_p
)
3621 gdbarch
->d10v_iaddr_p
= d10v_iaddr_p
;
3625 gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3627 if (gdbarch
->d10v_convert_daddr_to_raw
== 0)
3628 internal_error (__FILE__
, __LINE__
,
3629 "gdbarch: gdbarch_d10v_convert_daddr_to_raw invalid");
3630 if (gdbarch_debug
>= 2)
3631 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_daddr_to_raw called\n");
3632 return gdbarch
->d10v_convert_daddr_to_raw (x
);
3636 set_gdbarch_d10v_convert_daddr_to_raw (struct gdbarch
*gdbarch
,
3637 gdbarch_d10v_convert_daddr_to_raw_ftype d10v_convert_daddr_to_raw
)
3639 gdbarch
->d10v_convert_daddr_to_raw
= d10v_convert_daddr_to_raw
;
3643 gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
, CORE_ADDR x
)
3645 if (gdbarch
->d10v_convert_iaddr_to_raw
== 0)
3646 internal_error (__FILE__
, __LINE__
,
3647 "gdbarch: gdbarch_d10v_convert_iaddr_to_raw invalid");
3648 if (gdbarch_debug
>= 2)
3649 fprintf_unfiltered (gdb_stdlog
, "gdbarch_d10v_convert_iaddr_to_raw called\n");
3650 return gdbarch
->d10v_convert_iaddr_to_raw (x
);
3654 set_gdbarch_d10v_convert_iaddr_to_raw (struct gdbarch
*gdbarch
,
3655 gdbarch_d10v_convert_iaddr_to_raw_ftype d10v_convert_iaddr_to_raw
)
3657 gdbarch
->d10v_convert_iaddr_to_raw
= d10v_convert_iaddr_to_raw
;
3661 gdbarch_store_struct_return (struct gdbarch
*gdbarch
, CORE_ADDR addr
, CORE_ADDR sp
)
3663 if (gdbarch
->store_struct_return
== 0)
3664 internal_error (__FILE__
, __LINE__
,
3665 "gdbarch: gdbarch_store_struct_return invalid");
3666 if (gdbarch_debug
>= 2)
3667 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_struct_return called\n");
3668 gdbarch
->store_struct_return (addr
, sp
);
3672 set_gdbarch_store_struct_return (struct gdbarch
*gdbarch
,
3673 gdbarch_store_struct_return_ftype store_struct_return
)
3675 gdbarch
->store_struct_return
= store_struct_return
;
3679 gdbarch_store_return_value (struct gdbarch
*gdbarch
, struct type
*type
, char *valbuf
)
3681 if (gdbarch
->store_return_value
== 0)
3682 internal_error (__FILE__
, __LINE__
,
3683 "gdbarch: gdbarch_store_return_value invalid");
3684 if (gdbarch_debug
>= 2)
3685 fprintf_unfiltered (gdb_stdlog
, "gdbarch_store_return_value called\n");
3686 gdbarch
->store_return_value (type
, valbuf
);
3690 set_gdbarch_store_return_value (struct gdbarch
*gdbarch
,
3691 gdbarch_store_return_value_ftype store_return_value
)
3693 gdbarch
->store_return_value
= store_return_value
;
3697 gdbarch_extract_struct_value_address_p (struct gdbarch
*gdbarch
)
3699 return gdbarch
->extract_struct_value_address
!= 0;
3703 gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
, char *regbuf
)
3705 if (gdbarch
->extract_struct_value_address
== 0)
3706 internal_error (__FILE__
, __LINE__
,
3707 "gdbarch: gdbarch_extract_struct_value_address invalid");
3708 if (gdbarch_debug
>= 2)
3709 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extract_struct_value_address called\n");
3710 return gdbarch
->extract_struct_value_address (regbuf
);
3714 set_gdbarch_extract_struct_value_address (struct gdbarch
*gdbarch
,
3715 gdbarch_extract_struct_value_address_ftype extract_struct_value_address
)
3717 gdbarch
->extract_struct_value_address
= extract_struct_value_address
;
3721 gdbarch_use_struct_convention (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*value_type
)
3723 if (gdbarch
->use_struct_convention
== 0)
3724 internal_error (__FILE__
, __LINE__
,
3725 "gdbarch: gdbarch_use_struct_convention invalid");
3726 if (gdbarch_debug
>= 2)
3727 fprintf_unfiltered (gdb_stdlog
, "gdbarch_use_struct_convention called\n");
3728 return gdbarch
->use_struct_convention (gcc_p
, value_type
);
3732 set_gdbarch_use_struct_convention (struct gdbarch
*gdbarch
,
3733 gdbarch_use_struct_convention_ftype use_struct_convention
)
3735 gdbarch
->use_struct_convention
= use_struct_convention
;
3739 gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3741 if (gdbarch
->frame_init_saved_regs
== 0)
3742 internal_error (__FILE__
, __LINE__
,
3743 "gdbarch: gdbarch_frame_init_saved_regs invalid");
3744 if (gdbarch_debug
>= 2)
3745 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_init_saved_regs called\n");
3746 gdbarch
->frame_init_saved_regs (frame
);
3750 set_gdbarch_frame_init_saved_regs (struct gdbarch
*gdbarch
,
3751 gdbarch_frame_init_saved_regs_ftype frame_init_saved_regs
)
3753 gdbarch
->frame_init_saved_regs
= frame_init_saved_regs
;
3757 gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
, int fromleaf
, struct frame_info
*frame
)
3759 if (gdbarch
->init_extra_frame_info
== 0)
3760 internal_error (__FILE__
, __LINE__
,
3761 "gdbarch: gdbarch_init_extra_frame_info invalid");
3762 if (gdbarch_debug
>= 2)
3763 fprintf_unfiltered (gdb_stdlog
, "gdbarch_init_extra_frame_info called\n");
3764 gdbarch
->init_extra_frame_info (fromleaf
, frame
);
3768 set_gdbarch_init_extra_frame_info (struct gdbarch
*gdbarch
,
3769 gdbarch_init_extra_frame_info_ftype init_extra_frame_info
)
3771 gdbarch
->init_extra_frame_info
= init_extra_frame_info
;
3775 gdbarch_skip_prologue (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3777 if (gdbarch
->skip_prologue
== 0)
3778 internal_error (__FILE__
, __LINE__
,
3779 "gdbarch: gdbarch_skip_prologue invalid");
3780 if (gdbarch_debug
>= 2)
3781 fprintf_unfiltered (gdb_stdlog
, "gdbarch_skip_prologue called\n");
3782 return gdbarch
->skip_prologue (ip
);
3786 set_gdbarch_skip_prologue (struct gdbarch
*gdbarch
,
3787 gdbarch_skip_prologue_ftype skip_prologue
)
3789 gdbarch
->skip_prologue
= skip_prologue
;
3793 gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
, CORE_ADDR ip
)
3795 if (gdbarch
->prologue_frameless_p
== 0)
3796 internal_error (__FILE__
, __LINE__
,
3797 "gdbarch: gdbarch_prologue_frameless_p invalid");
3798 if (gdbarch_debug
>= 2)
3799 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prologue_frameless_p called\n");
3800 return gdbarch
->prologue_frameless_p (ip
);
3804 set_gdbarch_prologue_frameless_p (struct gdbarch
*gdbarch
,
3805 gdbarch_prologue_frameless_p_ftype prologue_frameless_p
)
3807 gdbarch
->prologue_frameless_p
= prologue_frameless_p
;
3811 gdbarch_inner_than (struct gdbarch
*gdbarch
, CORE_ADDR lhs
, CORE_ADDR rhs
)
3813 if (gdbarch
->inner_than
== 0)
3814 internal_error (__FILE__
, __LINE__
,
3815 "gdbarch: gdbarch_inner_than invalid");
3816 if (gdbarch_debug
>= 2)
3817 fprintf_unfiltered (gdb_stdlog
, "gdbarch_inner_than called\n");
3818 return gdbarch
->inner_than (lhs
, rhs
);
3822 set_gdbarch_inner_than (struct gdbarch
*gdbarch
,
3823 gdbarch_inner_than_ftype inner_than
)
3825 gdbarch
->inner_than
= inner_than
;
3829 gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
, CORE_ADDR
*pcptr
, int *lenptr
)
3831 if (gdbarch
->breakpoint_from_pc
== 0)
3832 internal_error (__FILE__
, __LINE__
,
3833 "gdbarch: gdbarch_breakpoint_from_pc invalid");
3834 if (gdbarch_debug
>= 2)
3835 fprintf_unfiltered (gdb_stdlog
, "gdbarch_breakpoint_from_pc called\n");
3836 return gdbarch
->breakpoint_from_pc (pcptr
, lenptr
);
3840 set_gdbarch_breakpoint_from_pc (struct gdbarch
*gdbarch
,
3841 gdbarch_breakpoint_from_pc_ftype breakpoint_from_pc
)
3843 gdbarch
->breakpoint_from_pc
= breakpoint_from_pc
;
3847 gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3849 if (gdbarch
->memory_insert_breakpoint
== 0)
3850 internal_error (__FILE__
, __LINE__
,
3851 "gdbarch: gdbarch_memory_insert_breakpoint invalid");
3852 if (gdbarch_debug
>= 2)
3853 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_insert_breakpoint called\n");
3854 return gdbarch
->memory_insert_breakpoint (addr
, contents_cache
);
3858 set_gdbarch_memory_insert_breakpoint (struct gdbarch
*gdbarch
,
3859 gdbarch_memory_insert_breakpoint_ftype memory_insert_breakpoint
)
3861 gdbarch
->memory_insert_breakpoint
= memory_insert_breakpoint
;
3865 gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
, CORE_ADDR addr
, char *contents_cache
)
3867 if (gdbarch
->memory_remove_breakpoint
== 0)
3868 internal_error (__FILE__
, __LINE__
,
3869 "gdbarch: gdbarch_memory_remove_breakpoint invalid");
3870 if (gdbarch_debug
>= 2)
3871 fprintf_unfiltered (gdb_stdlog
, "gdbarch_memory_remove_breakpoint called\n");
3872 return gdbarch
->memory_remove_breakpoint (addr
, contents_cache
);
3876 set_gdbarch_memory_remove_breakpoint (struct gdbarch
*gdbarch
,
3877 gdbarch_memory_remove_breakpoint_ftype memory_remove_breakpoint
)
3879 gdbarch
->memory_remove_breakpoint
= memory_remove_breakpoint
;
3883 gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
)
3885 if (gdbarch
->decr_pc_after_break
== -1)
3886 internal_error (__FILE__
, __LINE__
,
3887 "gdbarch: gdbarch_decr_pc_after_break invalid");
3888 if (gdbarch_debug
>= 2)
3889 fprintf_unfiltered (gdb_stdlog
, "gdbarch_decr_pc_after_break called\n");
3890 return gdbarch
->decr_pc_after_break
;
3894 set_gdbarch_decr_pc_after_break (struct gdbarch
*gdbarch
,
3895 CORE_ADDR decr_pc_after_break
)
3897 gdbarch
->decr_pc_after_break
= decr_pc_after_break
;
3901 gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
, int select_it
)
3903 if (gdbarch
->prepare_to_proceed
== 0)
3904 internal_error (__FILE__
, __LINE__
,
3905 "gdbarch: gdbarch_prepare_to_proceed invalid");
3906 if (gdbarch_debug
>= 2)
3907 fprintf_unfiltered (gdb_stdlog
, "gdbarch_prepare_to_proceed called\n");
3908 return gdbarch
->prepare_to_proceed (select_it
);
3912 set_gdbarch_prepare_to_proceed (struct gdbarch
*gdbarch
,
3913 gdbarch_prepare_to_proceed_ftype prepare_to_proceed
)
3915 gdbarch
->prepare_to_proceed
= prepare_to_proceed
;
3919 gdbarch_function_start_offset (struct gdbarch
*gdbarch
)
3921 if (gdbarch
->function_start_offset
== -1)
3922 internal_error (__FILE__
, __LINE__
,
3923 "gdbarch: gdbarch_function_start_offset invalid");
3924 if (gdbarch_debug
>= 2)
3925 fprintf_unfiltered (gdb_stdlog
, "gdbarch_function_start_offset called\n");
3926 return gdbarch
->function_start_offset
;
3930 set_gdbarch_function_start_offset (struct gdbarch
*gdbarch
,
3931 CORE_ADDR function_start_offset
)
3933 gdbarch
->function_start_offset
= function_start_offset
;
3937 gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
, CORE_ADDR gdb_addr
, int gdb_len
, CORE_ADDR
*rem_addr
, int *rem_len
)
3939 if (gdbarch
->remote_translate_xfer_address
== 0)
3940 internal_error (__FILE__
, __LINE__
,
3941 "gdbarch: gdbarch_remote_translate_xfer_address invalid");
3942 if (gdbarch_debug
>= 2)
3943 fprintf_unfiltered (gdb_stdlog
, "gdbarch_remote_translate_xfer_address called\n");
3944 gdbarch
->remote_translate_xfer_address (gdb_addr
, gdb_len
, rem_addr
, rem_len
);
3948 set_gdbarch_remote_translate_xfer_address (struct gdbarch
*gdbarch
,
3949 gdbarch_remote_translate_xfer_address_ftype remote_translate_xfer_address
)
3951 gdbarch
->remote_translate_xfer_address
= remote_translate_xfer_address
;
3955 gdbarch_frame_args_skip (struct gdbarch
*gdbarch
)
3957 if (gdbarch
->frame_args_skip
== -1)
3958 internal_error (__FILE__
, __LINE__
,
3959 "gdbarch: gdbarch_frame_args_skip invalid");
3960 if (gdbarch_debug
>= 2)
3961 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_skip called\n");
3962 return gdbarch
->frame_args_skip
;
3966 set_gdbarch_frame_args_skip (struct gdbarch
*gdbarch
,
3967 CORE_ADDR frame_args_skip
)
3969 gdbarch
->frame_args_skip
= frame_args_skip
;
3973 gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
3975 if (gdbarch
->frameless_function_invocation
== 0)
3976 internal_error (__FILE__
, __LINE__
,
3977 "gdbarch: gdbarch_frameless_function_invocation invalid");
3978 if (gdbarch_debug
>= 2)
3979 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frameless_function_invocation called\n");
3980 return gdbarch
->frameless_function_invocation (fi
);
3984 set_gdbarch_frameless_function_invocation (struct gdbarch
*gdbarch
,
3985 gdbarch_frameless_function_invocation_ftype frameless_function_invocation
)
3987 gdbarch
->frameless_function_invocation
= frameless_function_invocation
;
3991 gdbarch_frame_chain (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
3993 if (gdbarch
->frame_chain
== 0)
3994 internal_error (__FILE__
, __LINE__
,
3995 "gdbarch: gdbarch_frame_chain invalid");
3996 if (gdbarch_debug
>= 2)
3997 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain called\n");
3998 return gdbarch
->frame_chain (frame
);
4002 set_gdbarch_frame_chain (struct gdbarch
*gdbarch
,
4003 gdbarch_frame_chain_ftype frame_chain
)
4005 gdbarch
->frame_chain
= frame_chain
;
4009 gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
, CORE_ADDR chain
, struct frame_info
*thisframe
)
4011 if (gdbarch
->frame_chain_valid
== 0)
4012 internal_error (__FILE__
, __LINE__
,
4013 "gdbarch: gdbarch_frame_chain_valid invalid");
4014 if (gdbarch_debug
>= 2)
4015 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_chain_valid called\n");
4016 return gdbarch
->frame_chain_valid (chain
, thisframe
);
4020 set_gdbarch_frame_chain_valid (struct gdbarch
*gdbarch
,
4021 gdbarch_frame_chain_valid_ftype frame_chain_valid
)
4023 gdbarch
->frame_chain_valid
= frame_chain_valid
;
4027 gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4029 if (gdbarch
->frame_saved_pc
== 0)
4030 internal_error (__FILE__
, __LINE__
,
4031 "gdbarch: gdbarch_frame_saved_pc invalid");
4032 if (gdbarch_debug
>= 2)
4033 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_saved_pc called\n");
4034 return gdbarch
->frame_saved_pc (fi
);
4038 set_gdbarch_frame_saved_pc (struct gdbarch
*gdbarch
,
4039 gdbarch_frame_saved_pc_ftype frame_saved_pc
)
4041 gdbarch
->frame_saved_pc
= frame_saved_pc
;
4045 gdbarch_frame_args_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4047 if (gdbarch
->frame_args_address
== 0)
4048 internal_error (__FILE__
, __LINE__
,
4049 "gdbarch: gdbarch_frame_args_address invalid");
4050 if (gdbarch_debug
>= 2)
4051 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_args_address called\n");
4052 return gdbarch
->frame_args_address (fi
);
4056 set_gdbarch_frame_args_address (struct gdbarch
*gdbarch
,
4057 gdbarch_frame_args_address_ftype frame_args_address
)
4059 gdbarch
->frame_args_address
= frame_args_address
;
4063 gdbarch_frame_locals_address (struct gdbarch
*gdbarch
, struct frame_info
*fi
)
4065 if (gdbarch
->frame_locals_address
== 0)
4066 internal_error (__FILE__
, __LINE__
,
4067 "gdbarch: gdbarch_frame_locals_address invalid");
4068 if (gdbarch_debug
>= 2)
4069 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_locals_address called\n");
4070 return gdbarch
->frame_locals_address (fi
);
4074 set_gdbarch_frame_locals_address (struct gdbarch
*gdbarch
,
4075 gdbarch_frame_locals_address_ftype frame_locals_address
)
4077 gdbarch
->frame_locals_address
= frame_locals_address
;
4081 gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4083 if (gdbarch
->saved_pc_after_call
== 0)
4084 internal_error (__FILE__
, __LINE__
,
4085 "gdbarch: gdbarch_saved_pc_after_call invalid");
4086 if (gdbarch_debug
>= 2)
4087 fprintf_unfiltered (gdb_stdlog
, "gdbarch_saved_pc_after_call called\n");
4088 return gdbarch
->saved_pc_after_call (frame
);
4092 set_gdbarch_saved_pc_after_call (struct gdbarch
*gdbarch
,
4093 gdbarch_saved_pc_after_call_ftype saved_pc_after_call
)
4095 gdbarch
->saved_pc_after_call
= saved_pc_after_call
;
4099 gdbarch_frame_num_args (struct gdbarch
*gdbarch
, struct frame_info
*frame
)
4101 if (gdbarch
->frame_num_args
== 0)
4102 internal_error (__FILE__
, __LINE__
,
4103 "gdbarch: gdbarch_frame_num_args invalid");
4104 if (gdbarch_debug
>= 2)
4105 fprintf_unfiltered (gdb_stdlog
, "gdbarch_frame_num_args called\n");
4106 return gdbarch
->frame_num_args (frame
);
4110 set_gdbarch_frame_num_args (struct gdbarch
*gdbarch
,
4111 gdbarch_frame_num_args_ftype frame_num_args
)
4113 gdbarch
->frame_num_args
= frame_num_args
;
4117 gdbarch_stack_align_p (struct gdbarch
*gdbarch
)
4119 return gdbarch
->stack_align
!= 0;
4123 gdbarch_stack_align (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4125 if (gdbarch
->stack_align
== 0)
4126 internal_error (__FILE__
, __LINE__
,
4127 "gdbarch: gdbarch_stack_align invalid");
4128 if (gdbarch_debug
>= 2)
4129 fprintf_unfiltered (gdb_stdlog
, "gdbarch_stack_align called\n");
4130 return gdbarch
->stack_align (sp
);
4134 set_gdbarch_stack_align (struct gdbarch
*gdbarch
,
4135 gdbarch_stack_align_ftype stack_align
)
4137 gdbarch
->stack_align
= stack_align
;
4141 gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
)
4143 /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
4144 if (gdbarch_debug
>= 2)
4145 fprintf_unfiltered (gdb_stdlog
, "gdbarch_extra_stack_alignment_needed called\n");
4146 return gdbarch
->extra_stack_alignment_needed
;
4150 set_gdbarch_extra_stack_alignment_needed (struct gdbarch
*gdbarch
,
4151 int extra_stack_alignment_needed
)
4153 gdbarch
->extra_stack_alignment_needed
= extra_stack_alignment_needed
;
4157 gdbarch_reg_struct_has_addr_p (struct gdbarch
*gdbarch
)
4159 return gdbarch
->reg_struct_has_addr
!= 0;
4163 gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
, int gcc_p
, struct type
*type
)
4165 if (gdbarch
->reg_struct_has_addr
== 0)
4166 internal_error (__FILE__
, __LINE__
,
4167 "gdbarch: gdbarch_reg_struct_has_addr invalid");
4168 if (gdbarch_debug
>= 2)
4169 fprintf_unfiltered (gdb_stdlog
, "gdbarch_reg_struct_has_addr called\n");
4170 return gdbarch
->reg_struct_has_addr (gcc_p
, type
);
4174 set_gdbarch_reg_struct_has_addr (struct gdbarch
*gdbarch
,
4175 gdbarch_reg_struct_has_addr_ftype reg_struct_has_addr
)
4177 gdbarch
->reg_struct_has_addr
= reg_struct_has_addr
;
4181 gdbarch_save_dummy_frame_tos_p (struct gdbarch
*gdbarch
)
4183 return gdbarch
->save_dummy_frame_tos
!= 0;
4187 gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
, CORE_ADDR sp
)
4189 if (gdbarch
->save_dummy_frame_tos
== 0)
4190 internal_error (__FILE__
, __LINE__
,
4191 "gdbarch: gdbarch_save_dummy_frame_tos invalid");
4192 if (gdbarch_debug
>= 2)
4193 fprintf_unfiltered (gdb_stdlog
, "gdbarch_save_dummy_frame_tos called\n");
4194 gdbarch
->save_dummy_frame_tos (sp
);
4198 set_gdbarch_save_dummy_frame_tos (struct gdbarch
*gdbarch
,
4199 gdbarch_save_dummy_frame_tos_ftype save_dummy_frame_tos
)
4201 gdbarch
->save_dummy_frame_tos
= save_dummy_frame_tos
;
4205 gdbarch_parm_boundary (struct gdbarch
*gdbarch
)
4207 if (gdbarch_debug
>= 2)
4208 fprintf_unfiltered (gdb_stdlog
, "gdbarch_parm_boundary called\n");
4209 return gdbarch
->parm_boundary
;
4213 set_gdbarch_parm_boundary (struct gdbarch
*gdbarch
,
4216 gdbarch
->parm_boundary
= parm_boundary
;
4219 const struct floatformat
*
4220 gdbarch_float_format (struct gdbarch
*gdbarch
)
4222 if (gdbarch_debug
>= 2)
4223 fprintf_unfiltered (gdb_stdlog
, "gdbarch_float_format called\n");
4224 return gdbarch
->float_format
;
4228 set_gdbarch_float_format (struct gdbarch
*gdbarch
,
4229 const struct floatformat
* float_format
)
4231 gdbarch
->float_format
= float_format
;
4234 const struct floatformat
*
4235 gdbarch_double_format (struct gdbarch
*gdbarch
)
4237 if (gdbarch_debug
>= 2)
4238 fprintf_unfiltered (gdb_stdlog
, "gdbarch_double_format called\n");
4239 return gdbarch
->double_format
;
4243 set_gdbarch_double_format (struct gdbarch
*gdbarch
,
4244 const struct floatformat
* double_format
)
4246 gdbarch
->double_format
= double_format
;
4249 const struct floatformat
*
4250 gdbarch_long_double_format (struct gdbarch
*gdbarch
)
4252 if (gdbarch_debug
>= 2)
4253 fprintf_unfiltered (gdb_stdlog
, "gdbarch_long_double_format called\n");
4254 return gdbarch
->long_double_format
;
4258 set_gdbarch_long_double_format (struct gdbarch
*gdbarch
,
4259 const struct floatformat
* long_double_format
)
4261 gdbarch
->long_double_format
= long_double_format
;
4265 gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
, CORE_ADDR addr
)
4267 if (gdbarch
->convert_from_func_ptr_addr
== 0)
4268 internal_error (__FILE__
, __LINE__
,
4269 "gdbarch: gdbarch_convert_from_func_ptr_addr invalid");
4270 if (gdbarch_debug
>= 2)
4271 fprintf_unfiltered (gdb_stdlog
, "gdbarch_convert_from_func_ptr_addr called\n");
4272 return gdbarch
->convert_from_func_ptr_addr (addr
);
4276 set_gdbarch_convert_from_func_ptr_addr (struct gdbarch
*gdbarch
,
4277 gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr
)
4279 gdbarch
->convert_from_func_ptr_addr
= convert_from_func_ptr_addr
;
4283 gdbarch_software_single_step_p (struct gdbarch
*gdbarch
)
4285 return gdbarch
->software_single_step
!= 0;
4289 gdbarch_software_single_step (struct gdbarch
*gdbarch
, enum target_signal sig
, int insert_breakpoints_p
)
4291 if (gdbarch
->software_single_step
== 0)
4292 internal_error (__FILE__
, __LINE__
,
4293 "gdbarch: gdbarch_software_single_step invalid");
4294 if (gdbarch_debug
>= 2)
4295 fprintf_unfiltered (gdb_stdlog
, "gdbarch_software_single_step called\n");
4296 gdbarch
->software_single_step (sig
, insert_breakpoints_p
);
4300 set_gdbarch_software_single_step (struct gdbarch
*gdbarch
,
4301 gdbarch_software_single_step_ftype software_single_step
)
4303 gdbarch
->software_single_step
= software_single_step
;
4307 /* Keep a registry of per-architecture data-pointers required by GDB
4313 gdbarch_data_init_ftype
*init
;
4314 gdbarch_data_free_ftype
*free
;
4317 struct gdbarch_data_registration
4319 struct gdbarch_data
*data
;
4320 struct gdbarch_data_registration
*next
;
4323 struct gdbarch_data_registry
4326 struct gdbarch_data_registration
*registrations
;
4329 struct gdbarch_data_registry gdbarch_data_registry
=
4334 struct gdbarch_data
*
4335 register_gdbarch_data (gdbarch_data_init_ftype
*init
,
4336 gdbarch_data_free_ftype
*free
)
4338 struct gdbarch_data_registration
**curr
;
4339 for (curr
= &gdbarch_data_registry
.registrations
;
4341 curr
= &(*curr
)->next
);
4342 (*curr
) = XMALLOC (struct gdbarch_data_registration
);
4343 (*curr
)->next
= NULL
;
4344 (*curr
)->data
= XMALLOC (struct gdbarch_data
);
4345 (*curr
)->data
->index
= gdbarch_data_registry
.nr
++;
4346 (*curr
)->data
->init
= init
;
4347 (*curr
)->data
->free
= free
;
4348 return (*curr
)->data
;
4352 /* Walk through all the registered users initializing each in turn. */
4355 init_gdbarch_data (struct gdbarch
*gdbarch
)
4357 struct gdbarch_data_registration
*rego
;
4358 for (rego
= gdbarch_data_registry
.registrations
;
4362 struct gdbarch_data
*data
= rego
->data
;
4363 gdb_assert (data
->index
< gdbarch
->nr_data
);
4364 if (data
->init
!= NULL
)
4366 void *pointer
= data
->init (gdbarch
);
4367 set_gdbarch_data (gdbarch
, data
, pointer
);
4372 /* Create/delete the gdbarch data vector. */
4375 alloc_gdbarch_data (struct gdbarch
*gdbarch
)
4377 gdb_assert (gdbarch
->data
== NULL
);
4378 gdbarch
->nr_data
= gdbarch_data_registry
.nr
;
4379 gdbarch
->data
= xcalloc (gdbarch
->nr_data
, sizeof (void*));
4383 free_gdbarch_data (struct gdbarch
*gdbarch
)
4385 struct gdbarch_data_registration
*rego
;
4386 gdb_assert (gdbarch
->data
!= NULL
);
4387 for (rego
= gdbarch_data_registry
.registrations
;
4391 struct gdbarch_data
*data
= rego
->data
;
4392 gdb_assert (data
->index
< gdbarch
->nr_data
);
4393 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4395 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4396 gdbarch
->data
[data
->index
] = NULL
;
4399 xfree (gdbarch
->data
);
4400 gdbarch
->data
= NULL
;
4404 /* Initialize the current value of thee specified per-architecture
4408 set_gdbarch_data (struct gdbarch
*gdbarch
,
4409 struct gdbarch_data
*data
,
4412 gdb_assert (data
->index
< gdbarch
->nr_data
);
4413 if (data
->free
!= NULL
&& gdbarch
->data
[data
->index
] != NULL
)
4414 data
->free (gdbarch
, gdbarch
->data
[data
->index
]);
4415 gdbarch
->data
[data
->index
] = pointer
;
4418 /* Return the current value of the specified per-architecture
4422 gdbarch_data (struct gdbarch_data
*data
)
4424 gdb_assert (data
->index
< current_gdbarch
->nr_data
);
4425 return current_gdbarch
->data
[data
->index
];
4430 /* Keep a registry of swapped data required by GDB modules. */
4435 struct gdbarch_swap_registration
*source
;
4436 struct gdbarch_swap
*next
;
4439 struct gdbarch_swap_registration
4442 unsigned long sizeof_data
;
4443 gdbarch_swap_ftype
*init
;
4444 struct gdbarch_swap_registration
*next
;
4447 struct gdbarch_swap_registry
4450 struct gdbarch_swap_registration
*registrations
;
4453 struct gdbarch_swap_registry gdbarch_swap_registry
=
4459 register_gdbarch_swap (void *data
,
4460 unsigned long sizeof_data
,
4461 gdbarch_swap_ftype
*init
)
4463 struct gdbarch_swap_registration
**rego
;
4464 for (rego
= &gdbarch_swap_registry
.registrations
;
4466 rego
= &(*rego
)->next
);
4467 (*rego
) = XMALLOC (struct gdbarch_swap_registration
);
4468 (*rego
)->next
= NULL
;
4469 (*rego
)->init
= init
;
4470 (*rego
)->data
= data
;
4471 (*rego
)->sizeof_data
= sizeof_data
;
4476 init_gdbarch_swap (struct gdbarch
*gdbarch
)
4478 struct gdbarch_swap_registration
*rego
;
4479 struct gdbarch_swap
**curr
= &gdbarch
->swap
;
4480 for (rego
= gdbarch_swap_registry
.registrations
;
4484 if (rego
->data
!= NULL
)
4486 (*curr
) = XMALLOC (struct gdbarch_swap
);
4487 (*curr
)->source
= rego
;
4488 (*curr
)->swap
= xmalloc (rego
->sizeof_data
);
4489 (*curr
)->next
= NULL
;
4490 memset (rego
->data
, 0, rego
->sizeof_data
);
4491 curr
= &(*curr
)->next
;
4493 if (rego
->init
!= NULL
)
4499 swapout_gdbarch_swap (struct gdbarch
*gdbarch
)
4501 struct gdbarch_swap
*curr
;
4502 for (curr
= gdbarch
->swap
;
4505 memcpy (curr
->swap
, curr
->source
->data
, curr
->source
->sizeof_data
);
4509 swapin_gdbarch_swap (struct gdbarch
*gdbarch
)
4511 struct gdbarch_swap
*curr
;
4512 for (curr
= gdbarch
->swap
;
4515 memcpy (curr
->source
->data
, curr
->swap
, curr
->source
->sizeof_data
);
4519 /* Keep a registry of the architectures known by GDB. */
4521 struct gdbarch_registration
4523 enum bfd_architecture bfd_architecture
;
4524 gdbarch_init_ftype
*init
;
4525 gdbarch_dump_tdep_ftype
*dump_tdep
;
4526 struct gdbarch_list
*arches
;
4527 struct gdbarch_registration
*next
;
4530 static struct gdbarch_registration
*gdbarch_registry
= NULL
;
4533 append_name (const char ***buf
, int *nr
, const char *name
)
4535 *buf
= xrealloc (*buf
, sizeof (char**) * (*nr
+ 1));
4541 gdbarch_printable_names (void)
4545 /* Accumulate a list of names based on the registed list of
4547 enum bfd_architecture a
;
4549 const char **arches
= NULL
;
4550 struct gdbarch_registration
*rego
;
4551 for (rego
= gdbarch_registry
;
4555 const struct bfd_arch_info
*ap
;
4556 ap
= bfd_lookup_arch (rego
->bfd_architecture
, 0);
4558 internal_error (__FILE__
, __LINE__
,
4559 "gdbarch_architecture_names: multi-arch unknown");
4562 append_name (&arches
, &nr_arches
, ap
->printable_name
);
4567 append_name (&arches
, &nr_arches
, NULL
);
4571 /* Just return all the architectures that BFD knows. Assume that
4572 the legacy architecture framework supports them. */
4573 return bfd_arch_list ();
4578 gdbarch_register (enum bfd_architecture bfd_architecture
,
4579 gdbarch_init_ftype
*init
,
4580 gdbarch_dump_tdep_ftype
*dump_tdep
)
4582 struct gdbarch_registration
**curr
;
4583 const struct bfd_arch_info
*bfd_arch_info
;
4584 /* Check that BFD recognizes this architecture */
4585 bfd_arch_info
= bfd_lookup_arch (bfd_architecture
, 0);
4586 if (bfd_arch_info
== NULL
)
4588 internal_error (__FILE__
, __LINE__
,
4589 "gdbarch: Attempt to register unknown architecture (%d)",
4592 /* Check that we haven't seen this architecture before */
4593 for (curr
= &gdbarch_registry
;
4595 curr
= &(*curr
)->next
)
4597 if (bfd_architecture
== (*curr
)->bfd_architecture
)
4598 internal_error (__FILE__
, __LINE__
,
4599 "gdbarch: Duplicate registraration of architecture (%s)",
4600 bfd_arch_info
->printable_name
);
4604 fprintf_unfiltered (gdb_stdlog
, "register_gdbarch_init (%s, 0x%08lx)\n",
4605 bfd_arch_info
->printable_name
,
4608 (*curr
) = XMALLOC (struct gdbarch_registration
);
4609 (*curr
)->bfd_architecture
= bfd_architecture
;
4610 (*curr
)->init
= init
;
4611 (*curr
)->dump_tdep
= dump_tdep
;
4612 (*curr
)->arches
= NULL
;
4613 (*curr
)->next
= NULL
;
4614 /* When non- multi-arch, install whatever target dump routine we've
4615 been provided - hopefully that routine has been written correctly
4616 and works regardless of multi-arch. */
4617 if (!GDB_MULTI_ARCH
&& dump_tdep
!= NULL
4618 && startup_gdbarch
.dump_tdep
== NULL
)
4619 startup_gdbarch
.dump_tdep
= dump_tdep
;
4623 register_gdbarch_init (enum bfd_architecture bfd_architecture
,
4624 gdbarch_init_ftype
*init
)
4626 gdbarch_register (bfd_architecture
, init
, NULL
);
4630 /* Look for an architecture using gdbarch_info. Base search on only
4631 BFD_ARCH_INFO and BYTE_ORDER. */
4633 struct gdbarch_list
*
4634 gdbarch_list_lookup_by_info (struct gdbarch_list
*arches
,
4635 const struct gdbarch_info
*info
)
4637 for (; arches
!= NULL
; arches
= arches
->next
)
4639 if (info
->bfd_arch_info
!= arches
->gdbarch
->bfd_arch_info
)
4641 if (info
->byte_order
!= arches
->gdbarch
->byte_order
)
4649 /* Update the current architecture. Return ZERO if the update request
4653 gdbarch_update_p (struct gdbarch_info info
)
4655 struct gdbarch
*new_gdbarch
;
4656 struct gdbarch_list
**list
;
4657 struct gdbarch_registration
*rego
;
4659 /* Fill in missing parts of the INFO struct using a number of
4660 sources: ``set ...''; INFOabfd supplied; existing target. */
4662 /* ``(gdb) set architecture ...'' */
4663 if (info
.bfd_arch_info
== NULL
4664 && !TARGET_ARCHITECTURE_AUTO
)
4665 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4666 if (info
.bfd_arch_info
== NULL
4667 && info
.abfd
!= NULL
4668 && bfd_get_arch (info
.abfd
) != bfd_arch_unknown
4669 && bfd_get_arch (info
.abfd
) != bfd_arch_obscure
)
4670 info
.bfd_arch_info
= bfd_get_arch_info (info
.abfd
);
4671 if (info
.bfd_arch_info
== NULL
)
4672 info
.bfd_arch_info
= TARGET_ARCHITECTURE
;
4674 /* ``(gdb) set byte-order ...'' */
4675 if (info
.byte_order
== 0
4676 && !TARGET_BYTE_ORDER_AUTO
)
4677 info
.byte_order
= TARGET_BYTE_ORDER
;
4678 /* From the INFO struct. */
4679 if (info
.byte_order
== 0
4680 && info
.abfd
!= NULL
)
4681 info
.byte_order
= (bfd_big_endian (info
.abfd
) ? BIG_ENDIAN
4682 : bfd_little_endian (info
.abfd
) ? LITTLE_ENDIAN
4684 /* From the current target. */
4685 if (info
.byte_order
== 0)
4686 info
.byte_order
= TARGET_BYTE_ORDER
;
4688 /* Must have found some sort of architecture. */
4689 gdb_assert (info
.bfd_arch_info
!= NULL
);
4693 fprintf_unfiltered (gdb_stdlog
,
4694 "gdbarch_update: info.bfd_arch_info %s\n",
4695 (info
.bfd_arch_info
!= NULL
4696 ? info
.bfd_arch_info
->printable_name
4698 fprintf_unfiltered (gdb_stdlog
,
4699 "gdbarch_update: info.byte_order %d (%s)\n",
4701 (info
.byte_order
== BIG_ENDIAN
? "big"
4702 : info
.byte_order
== LITTLE_ENDIAN
? "little"
4704 fprintf_unfiltered (gdb_stdlog
,
4705 "gdbarch_update: info.abfd 0x%lx\n",
4707 fprintf_unfiltered (gdb_stdlog
,
4708 "gdbarch_update: info.tdep_info 0x%lx\n",
4709 (long) info
.tdep_info
);
4712 /* Find the target that knows about this architecture. */
4713 for (rego
= gdbarch_registry
;
4716 if (rego
->bfd_architecture
== info
.bfd_arch_info
->arch
)
4721 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: No matching architecture\n");
4725 /* Ask the target for a replacement architecture. */
4726 new_gdbarch
= rego
->init (info
, rego
->arches
);
4728 /* Did the target like it? No. Reject the change. */
4729 if (new_gdbarch
== NULL
)
4732 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Target rejected architecture\n");
4736 /* Did the architecture change? No. Do nothing. */
4737 if (current_gdbarch
== new_gdbarch
)
4740 fprintf_unfiltered (gdb_stdlog
, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
4742 new_gdbarch
->bfd_arch_info
->printable_name
);
4746 /* Swap all data belonging to the old target out */
4747 swapout_gdbarch_swap (current_gdbarch
);
4749 /* Is this a pre-existing architecture? Yes. Swap it in. */
4750 for (list
= ®o
->arches
;
4752 list
= &(*list
)->next
)
4754 if ((*list
)->gdbarch
== new_gdbarch
)
4757 fprintf_unfiltered (gdb_stdlog
,
4758 "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
4760 new_gdbarch
->bfd_arch_info
->printable_name
);
4761 current_gdbarch
= new_gdbarch
;
4762 swapin_gdbarch_swap (new_gdbarch
);
4767 /* Append this new architecture to this targets list. */
4768 (*list
) = XMALLOC (struct gdbarch_list
);
4769 (*list
)->next
= NULL
;
4770 (*list
)->gdbarch
= new_gdbarch
;
4772 /* Switch to this new architecture. Dump it out. */
4773 current_gdbarch
= new_gdbarch
;
4776 fprintf_unfiltered (gdb_stdlog
,
4777 "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
4779 new_gdbarch
->bfd_arch_info
->printable_name
);
4782 /* Check that the newly installed architecture is valid. Plug in
4783 any post init values. */
4784 new_gdbarch
->dump_tdep
= rego
->dump_tdep
;
4785 verify_gdbarch (new_gdbarch
);
4787 /* Initialize the per-architecture memory (swap) areas.
4788 CURRENT_GDBARCH must be update before these modules are
4790 init_gdbarch_swap (new_gdbarch
);
4792 /* Initialize the per-architecture data-pointer of all parties that
4793 registered an interest in this architecture. CURRENT_GDBARCH
4794 must be updated before these modules are called. */
4795 init_gdbarch_data (new_gdbarch
);
4798 gdbarch_dump (current_gdbarch
, gdb_stdlog
);
4806 /* Pointer to the target-dependent disassembly function. */
4807 int (*tm_print_insn
) (bfd_vma
, disassemble_info
*);
4808 disassemble_info tm_print_insn_info
;
4811 extern void _initialize_gdbarch (void);
4814 _initialize_gdbarch (void)
4816 struct cmd_list_element
*c
;
4818 INIT_DISASSEMBLE_INFO_NO_ARCH (tm_print_insn_info
, gdb_stdout
, (fprintf_ftype
)fprintf_filtered
);
4819 tm_print_insn_info
.flavour
= bfd_target_unknown_flavour
;
4820 tm_print_insn_info
.read_memory_func
= dis_asm_read_memory
;
4821 tm_print_insn_info
.memory_error_func
= dis_asm_memory_error
;
4822 tm_print_insn_info
.print_address_func
= dis_asm_print_address
;
4824 add_show_from_set (add_set_cmd ("arch",
4827 (char *)&gdbarch_debug
,
4828 "Set architecture debugging.\n\
4829 When non-zero, architecture debugging is enabled.", &setdebuglist
),
4831 c
= add_set_cmd ("archdebug",
4834 (char *)&gdbarch_debug
,
4835 "Set architecture debugging.\n\
4836 When non-zero, architecture debugging is enabled.", &setlist
);
4838 deprecate_cmd (c
, "set debug arch");
4839 deprecate_cmd (add_show_from_set (c
, &showlist
), "show debug arch");